")
+ case reflect.Struct, reflect.Map, reflect.Slice:
+ return s.encode, nil
+ }
+
+ // If the map value doesn't have a struct/map/slice, just Encode() it.
+ if err := s.enc.Encode(s.s.Interface()); err != nil {
+ return nil, err
+ }
+ s.buff.Truncate(s.buff.Len() - 1) // Remove Encode added \n
+
+ return nil, nil
+}
+
+func (s *sliceEncode) encode() (stateFn, error) {
+ s.buff.WriteByte(leftParen)
+ for i := 0; i < s.s.Len(); i++ {
+ v := s.s.Index(i)
+ switch s.valueBaseType.Kind() {
+ case reflect.Struct:
+ if v.CanAddr() {
+ v = v.Addr()
+ }
+ if err := marshalStruct(v, s.buff, s.enc); err != nil {
+ return nil, err
+ }
+ case reflect.Map:
+ if err := marshalMap(v, s.buff, s.enc); err != nil {
+ return nil, err
+ }
+ case reflect.Slice:
+ if err := marshalSlice(v, s.buff, s.enc); err != nil {
+ return nil, err
+ }
+ default:
+ panic(fmt.Sprintf("critical bug: mapEncode.encode() called with value base type: %v", s.valueBaseType.Kind()))
+ }
+ s.buff.WriteByte(comma)
+ }
+ s.buff.Truncate(s.buff.Len() - 1) // Remove final comma
+ s.buff.WriteByte(rightParen)
+ return nil, nil
+}
+
+// writeAddFields writes the AdditionalFields struct field out to JSON as field
+// values. i must be a map[string]interface{} or this will panic.
+func writeAddFields(i interface{}, buff *bytes.Buffer, enc *json.Encoder) error {
+ m := i.(map[string]interface{})
+
+ x := 0
+ for k, v := range m {
+ buff.WriteString(fmt.Sprintf("%q:", k))
+ if err := enc.Encode(v); err != nil {
+ return err
+ }
+ buff.Truncate(buff.Len() - 1) // Remove Encode() added \n
+
+ if x+1 != len(m) {
+ buff.WriteByte(comma)
+ }
+ x++
+ }
+ return nil
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/json/struct.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/json/struct.go
new file mode 100644
index 000000000..07751544a
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/json/struct.go
@@ -0,0 +1,290 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package json
+
+import (
+ "encoding/json"
+ "fmt"
+ "reflect"
+ "strings"
+)
+
+func unmarshalStruct(jdec *json.Decoder, i interface{}) error {
+ v := reflect.ValueOf(i)
+ if v.Kind() != reflect.Ptr {
+ return fmt.Errorf("Unmarshal() received type %T, which is not a *struct", i)
+ }
+ v = v.Elem()
+ if v.Kind() != reflect.Struct {
+ return fmt.Errorf("Unmarshal() received type %T, which is not a *struct", i)
+ }
+
+ if hasUnmarshalJSON(v) {
+ // Indicates that this type has a custom Unmarshaler.
+ return jdec.Decode(v.Addr().Interface())
+ }
+
+ f := v.FieldByName(addField)
+ if f.Kind() == reflect.Invalid {
+ return fmt.Errorf("Unmarshal(%T) only supports structs that have the field AdditionalFields or implements json.Unmarshaler", i)
+ }
+
+ if f.Kind() != reflect.Map || !f.Type().AssignableTo(mapStrInterType) {
+ return fmt.Errorf("type %T has field 'AdditionalFields' that is not a map[string]interface{}", i)
+ }
+
+ dec := newDecoder(jdec, v)
+ return dec.run()
+}
+
+type decoder struct {
+ dec *json.Decoder
+ value reflect.Value // This will be a reflect.Struct
+ translator translateFields
+ key string
+}
+
+func newDecoder(dec *json.Decoder, value reflect.Value) *decoder {
+ return &decoder{value: value, dec: dec}
+}
+
+// run runs our decoder state machine.
+func (d *decoder) run() error {
+ var state = d.start
+ var err error
+ for {
+ state, err = state()
+ if err != nil {
+ return err
+ }
+ if state == nil {
+ return nil
+ }
+ }
+}
+
+// start looks for our opening delimeter '{' and then transitions to looping through our fields.
+func (d *decoder) start() (stateFn, error) {
+ var err error
+ d.translator, err = findFields(d.value)
+ if err != nil {
+ return nil, err
+ }
+
+ delim, err := d.dec.Token()
+ if err != nil {
+ return nil, err
+ }
+ if !delimIs(delim, '{') {
+ return nil, fmt.Errorf("Unmarshal expected opening {, received %v", delim)
+ }
+
+ return d.next, nil
+}
+
+// next gets the next struct field name from the raw json or stops the machine if we get our closing }.
+func (d *decoder) next() (stateFn, error) {
+ if !d.dec.More() {
+ // Remove the closing }.
+ if _, err := d.dec.Token(); err != nil {
+ return nil, err
+ }
+ return nil, nil
+ }
+
+ key, err := d.dec.Token()
+ if err != nil {
+ return nil, err
+ }
+
+ d.key = key.(string)
+ return d.storeValue, nil
+}
+
+// storeValue takes the next value and stores it our struct. If the field can't be found
+// in the struct, it pushes the operation to storeAdditional().
+func (d *decoder) storeValue() (stateFn, error) {
+ goName := d.translator.goName(d.key)
+ if goName == "" {
+ goName = d.key
+ }
+
+ // We don't have the field in the struct, so it goes in AdditionalFields.
+ f := d.value.FieldByName(goName)
+ if f.Kind() == reflect.Invalid {
+ return d.storeAdditional, nil
+ }
+
+ // Indicates that this type has a custom Unmarshaler.
+ if hasUnmarshalJSON(f) {
+ err := d.dec.Decode(f.Addr().Interface())
+ if err != nil {
+ return nil, err
+ }
+ return d.next, nil
+ }
+
+ t, isPtr, err := fieldBaseType(d.value, goName)
+ if err != nil {
+ return nil, fmt.Errorf("type(%s) had field(%s) %w", d.value.Type().Name(), goName, err)
+ }
+
+ switch t.Kind() {
+ // We need to recursively call ourselves on any *struct or struct.
+ case reflect.Struct:
+ if isPtr {
+ if f.IsNil() {
+ f.Set(reflect.New(t))
+ }
+ } else {
+ f = f.Addr()
+ }
+ if err := unmarshalStruct(d.dec, f.Interface()); err != nil {
+ return nil, err
+ }
+ return d.next, nil
+ case reflect.Map:
+ v := reflect.MakeMap(f.Type())
+ ptr := newValue(f.Type())
+ ptr.Elem().Set(v)
+ if err := unmarshalMap(d.dec, ptr); err != nil {
+ return nil, err
+ }
+ f.Set(ptr.Elem())
+ return d.next, nil
+ case reflect.Slice:
+ v := reflect.MakeSlice(f.Type(), 0, 0)
+ ptr := newValue(f.Type())
+ ptr.Elem().Set(v)
+ if err := unmarshalSlice(d.dec, ptr); err != nil {
+ return nil, err
+ }
+ f.Set(ptr.Elem())
+ return d.next, nil
+ }
+
+ if !isPtr {
+ f = f.Addr()
+ }
+
+ // For values that are pointers, we need them to be non-nil in order
+ // to decode into them.
+ if f.IsNil() {
+ f.Set(reflect.New(t))
+ }
+
+ if err := d.dec.Decode(f.Interface()); err != nil {
+ return nil, err
+ }
+
+ return d.next, nil
+}
+
+// storeAdditional pushes the key/value into our .AdditionalFields map.
+func (d *decoder) storeAdditional() (stateFn, error) {
+ rw := json.RawMessage{}
+ if err := d.dec.Decode(&rw); err != nil {
+ return nil, err
+ }
+ field := d.value.FieldByName(addField)
+ if field.IsNil() {
+ field.Set(reflect.MakeMap(field.Type()))
+ }
+ field.SetMapIndex(reflect.ValueOf(d.key), reflect.ValueOf(rw))
+ return d.next, nil
+}
+
+func fieldBaseType(v reflect.Value, fieldName string) (t reflect.Type, isPtr bool, err error) {
+ sf, ok := v.Type().FieldByName(fieldName)
+ if !ok {
+ return nil, false, fmt.Errorf("bug: fieldBaseType() lookup of field(%s) on type(%s): do not have field", fieldName, v.Type().Name())
+ }
+ t = sf.Type
+ if t.Kind() == reflect.Ptr {
+ t = t.Elem()
+ isPtr = true
+ }
+ if t.Kind() == reflect.Ptr {
+ return nil, isPtr, fmt.Errorf("received pointer to pointer type, not supported")
+ }
+ return t, isPtr, nil
+}
+
+type translateField struct {
+ jsonName string
+ goName string
+}
+
+// translateFields is a list of translateFields with a handy lookup method.
+type translateFields []translateField
+
+// goName loops through a list of fields looking for one contaning the jsonName and
+// returning the goName. If not found, returns the empty string.
+// Note: not a map because at this size slices are faster even in tight loops.
+func (t translateFields) goName(jsonName string) string {
+ for _, entry := range t {
+ if entry.jsonName == jsonName {
+ return entry.goName
+ }
+ }
+ return ""
+}
+
+// jsonName loops through a list of fields looking for one contaning the goName and
+// returning the jsonName. If not found, returns the empty string.
+// Note: not a map because at this size slices are faster even in tight loops.
+func (t translateFields) jsonName(goName string) string {
+ for _, entry := range t {
+ if entry.goName == goName {
+ return entry.jsonName
+ }
+ }
+ return ""
+}
+
+var umarshalerType = reflect.TypeOf((*json.Unmarshaler)(nil)).Elem()
+
+// findFields parses a struct and writes the field tags for lookup. It will return an error
+// if any field has a type of *struct or struct that does not implement json.Marshaler.
+func findFields(v reflect.Value) (translateFields, error) {
+ if v.Kind() == reflect.Ptr {
+ v = v.Elem()
+ }
+ if v.Kind() != reflect.Struct {
+ return nil, fmt.Errorf("findFields received a %s type, expected *struct or struct", v.Type().Name())
+ }
+ tfs := make([]translateField, 0, v.NumField())
+ for i := 0; i < v.NumField(); i++ {
+ tf := translateField{
+ goName: v.Type().Field(i).Name,
+ jsonName: parseTag(v.Type().Field(i).Tag.Get("json")),
+ }
+ switch tf.jsonName {
+ case "", "-":
+ tf.jsonName = tf.goName
+ }
+ tfs = append(tfs, tf)
+
+ f := v.Field(i)
+ if f.Kind() == reflect.Ptr {
+ f = f.Elem()
+ }
+ if f.Kind() == reflect.Struct {
+ if f.Type().Implements(umarshalerType) {
+ return nil, fmt.Errorf("struct type %q which has field %q which "+
+ "doesn't implement json.Unmarshaler", v.Type().Name(), v.Type().Field(i).Name)
+ }
+ }
+ }
+ return tfs, nil
+}
+
+// parseTag just returns the first entry in the tag. tag is the string
+// returned by reflect.StructField.Tag().Get().
+func parseTag(tag string) string {
+ if idx := strings.Index(tag, ","); idx != -1 {
+ return tag[:idx]
+ }
+ return tag
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/json/types/time/time.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/json/types/time/time.go
new file mode 100644
index 000000000..a1c99621e
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/json/types/time/time.go
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+// Package time provides for custom types to translate time from JSON and other formats
+// into time.Time objects.
+package time
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+ "time"
+)
+
+// Unix provides a type that can marshal and unmarshal a string representation
+// of the unix epoch into a time.Time object.
+type Unix struct {
+ T time.Time
+}
+
+// MarshalJSON implements encoding/json.MarshalJSON().
+func (u Unix) MarshalJSON() ([]byte, error) {
+ if u.T.IsZero() {
+ return []byte(""), nil
+ }
+ return []byte(fmt.Sprintf("%q", strconv.FormatInt(u.T.Unix(), 10))), nil
+}
+
+// UnmarshalJSON implements encoding/json.UnmarshalJSON().
+func (u *Unix) UnmarshalJSON(b []byte) error {
+ i, err := strconv.Atoi(strings.Trim(string(b), `"`))
+ if err != nil {
+ return fmt.Errorf("unix time(%s) could not be converted from string to int: %w", string(b), err)
+ }
+ u.T = time.Unix(int64(i), 0)
+ return nil
+}
+
+// DurationTime provides a type that can marshal and unmarshal a string representation
+// of a duration from now into a time.Time object.
+// Note: I'm not sure this is the best way to do this. What happens is we get a field
+// called "expires_in" that represents the seconds from now that this expires. We
+// turn that into a time we call .ExpiresOn. But maybe we should be recording
+// when the token was received at .TokenRecieved and .ExpiresIn should remain as a duration.
+// Then we could have a method called ExpiresOn(). Honestly, the whole thing is
+// bad because the server doesn't return a concrete time. I think this is
+// cleaner, but its not great either.
+type DurationTime struct {
+ T time.Time
+}
+
+// MarshalJSON implements encoding/json.MarshalJSON().
+func (d DurationTime) MarshalJSON() ([]byte, error) {
+ if d.T.IsZero() {
+ return []byte(""), nil
+ }
+
+ dt := time.Until(d.T)
+ return []byte(fmt.Sprintf("%d", int64(dt*time.Second))), nil
+}
+
+// UnmarshalJSON implements encoding/json.UnmarshalJSON().
+func (d *DurationTime) UnmarshalJSON(b []byte) error {
+ i, err := strconv.Atoi(strings.Trim(string(b), `"`))
+ if err != nil {
+ return fmt.Errorf("unix time(%s) could not be converted from string to int: %w", string(b), err)
+ }
+ d.T = time.Now().Add(time.Duration(i) * time.Second)
+ return nil
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/local/server.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/local/server.go
new file mode 100644
index 000000000..fda5d7dd3
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/local/server.go
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+// Package local contains a local HTTP server used with interactive authentication.
+package local
+
+import (
+ "context"
+ "fmt"
+ "html"
+ "net"
+ "net/http"
+ "strconv"
+ "strings"
+ "time"
+)
+
+var okPage = []byte(`
+
+
+
+
+ Authentication Complete
+
+
+ Authentication complete. You can return to the application. Feel free to close this browser tab.
+
+
+`)
+
+const failPage = `
+
+
+
+
+ Authentication Failed
+
+
+ Authentication failed. You can return to the application. Feel free to close this browser tab.
+ Error details: error %s error_description: %s
+
+
+`
+
+// Result is the result from the redirect.
+type Result struct {
+ // Code is the code sent by the authority server.
+ Code string
+ // Err is set if there was an error.
+ Err error
+}
+
+// Server is an HTTP server.
+type Server struct {
+ // Addr is the address the server is listening on.
+ Addr string
+ resultCh chan Result
+ s *http.Server
+ reqState string
+}
+
+// New creates a local HTTP server and starts it.
+func New(reqState string, port int) (*Server, error) {
+ var l net.Listener
+ var err error
+ var portStr string
+ if port > 0 {
+ // use port provided by caller
+ l, err = net.Listen("tcp", fmt.Sprintf("localhost:%d", port))
+ portStr = strconv.FormatInt(int64(port), 10)
+ } else {
+ // find a free port
+ for i := 0; i < 10; i++ {
+ l, err = net.Listen("tcp", "localhost:0")
+ if err != nil {
+ continue
+ }
+ addr := l.Addr().String()
+ portStr = addr[strings.LastIndex(addr, ":")+1:]
+ break
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+
+ serv := &Server{
+ Addr: fmt.Sprintf("http://localhost:%s", portStr),
+ s: &http.Server{Addr: "localhost:0", ReadHeaderTimeout: time.Second},
+ reqState: reqState,
+ resultCh: make(chan Result, 1),
+ }
+ serv.s.Handler = http.HandlerFunc(serv.handler)
+
+ if err := serv.start(l); err != nil {
+ return nil, err
+ }
+
+ return serv, nil
+}
+
+func (s *Server) start(l net.Listener) error {
+ go func() {
+ err := s.s.Serve(l)
+ if err != nil {
+ select {
+ case s.resultCh <- Result{Err: err}:
+ default:
+ }
+ }
+ }()
+
+ return nil
+}
+
+// Result gets the result of the redirect operation. Once a single result is returned, the server
+// is shutdown. ctx deadline will be honored.
+func (s *Server) Result(ctx context.Context) Result {
+ select {
+ case <-ctx.Done():
+ return Result{Err: ctx.Err()}
+ case r := <-s.resultCh:
+ return r
+ }
+}
+
+// Shutdown shuts down the server.
+func (s *Server) Shutdown() {
+ // Note: You might get clever and think you can do this in handler() as a defer, you can't.
+ _ = s.s.Shutdown(context.Background())
+}
+
+func (s *Server) putResult(r Result) {
+ select {
+ case s.resultCh <- r:
+ default:
+ }
+}
+
+func (s *Server) handler(w http.ResponseWriter, r *http.Request) {
+ q := r.URL.Query()
+
+ headerErr := q.Get("error")
+ if headerErr != "" {
+ desc := html.EscapeString(q.Get("error_description"))
+ // Note: It is a little weird we handle some errors by not going to the failPage. If they all should,
+ // change this to s.error() and make s.error() write the failPage instead of an error code.
+ _, _ = w.Write([]byte(fmt.Sprintf(failPage, headerErr, desc)))
+ s.putResult(Result{Err: fmt.Errorf(desc)})
+ return
+ }
+
+ respState := q.Get("state")
+ switch respState {
+ case s.reqState:
+ case "":
+ s.error(w, http.StatusInternalServerError, "server didn't send OAuth state")
+ return
+ default:
+ s.error(w, http.StatusInternalServerError, "mismatched OAuth state, req(%s), resp(%s)", s.reqState, respState)
+ return
+ }
+
+ code := q.Get("code")
+ if code == "" {
+ s.error(w, http.StatusInternalServerError, "authorization code missing in query string")
+ return
+ }
+
+ _, _ = w.Write(okPage)
+ s.putResult(Result{Code: code})
+}
+
+func (s *Server) error(w http.ResponseWriter, code int, str string, i ...interface{}) {
+ err := fmt.Errorf(str, i...)
+ http.Error(w, err.Error(), code)
+ s.putResult(Result{Err: err})
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/oauth.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/oauth.go
new file mode 100644
index 000000000..e06531344
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/oauth.go
@@ -0,0 +1,355 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package oauth
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "time"
+
+ "github.com/google/uuid"
+
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/errors"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/exported"
+ internalTime "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/json/types/time"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs"
+)
+
+// ResolveEndpointer contains the methods for resolving authority endpoints.
+type ResolveEndpointer interface {
+ ResolveEndpoints(ctx context.Context, authorityInfo authority.Info, userPrincipalName string) (authority.Endpoints, error)
+}
+
+// AccessTokens contains the methods for fetching tokens from different sources.
+type AccessTokens interface {
+ DeviceCodeResult(ctx context.Context, authParameters authority.AuthParams) (accesstokens.DeviceCodeResult, error)
+ FromUsernamePassword(ctx context.Context, authParameters authority.AuthParams) (accesstokens.TokenResponse, error)
+ FromAuthCode(ctx context.Context, req accesstokens.AuthCodeRequest) (accesstokens.TokenResponse, error)
+ FromRefreshToken(ctx context.Context, appType accesstokens.AppType, authParams authority.AuthParams, cc *accesstokens.Credential, refreshToken string) (accesstokens.TokenResponse, error)
+ FromClientSecret(ctx context.Context, authParameters authority.AuthParams, clientSecret string) (accesstokens.TokenResponse, error)
+ FromAssertion(ctx context.Context, authParameters authority.AuthParams, assertion string) (accesstokens.TokenResponse, error)
+ FromUserAssertionClientSecret(ctx context.Context, authParameters authority.AuthParams, userAssertion string, clientSecret string) (accesstokens.TokenResponse, error)
+ FromUserAssertionClientCertificate(ctx context.Context, authParameters authority.AuthParams, userAssertion string, assertion string) (accesstokens.TokenResponse, error)
+ FromDeviceCodeResult(ctx context.Context, authParameters authority.AuthParams, deviceCodeResult accesstokens.DeviceCodeResult) (accesstokens.TokenResponse, error)
+ FromSamlGrant(ctx context.Context, authParameters authority.AuthParams, samlGrant wstrust.SamlTokenInfo) (accesstokens.TokenResponse, error)
+}
+
+// FetchAuthority will be implemented by authority.Authority.
+type FetchAuthority interface {
+ UserRealm(context.Context, authority.AuthParams) (authority.UserRealm, error)
+ AADInstanceDiscovery(context.Context, authority.Info) (authority.InstanceDiscoveryResponse, error)
+}
+
+// FetchWSTrust contains the methods for interacting with WSTrust endpoints.
+type FetchWSTrust interface {
+ Mex(ctx context.Context, federationMetadataURL string) (defs.MexDocument, error)
+ SAMLTokenInfo(ctx context.Context, authParameters authority.AuthParams, cloudAudienceURN string, endpoint defs.Endpoint) (wstrust.SamlTokenInfo, error)
+}
+
+// Client provides tokens for various types of token requests.
+type Client struct {
+ Resolver ResolveEndpointer
+ AccessTokens AccessTokens
+ Authority FetchAuthority
+ WSTrust FetchWSTrust
+}
+
+// New is the constructor for Token.
+func New(httpClient ops.HTTPClient) *Client {
+ r := ops.New(httpClient)
+ return &Client{
+ Resolver: newAuthorityEndpoint(r),
+ AccessTokens: r.AccessTokens(),
+ Authority: r.Authority(),
+ WSTrust: r.WSTrust(),
+ }
+}
+
+// ResolveEndpoints gets the authorization and token endpoints and creates an AuthorityEndpoints instance.
+func (t *Client) ResolveEndpoints(ctx context.Context, authorityInfo authority.Info, userPrincipalName string) (authority.Endpoints, error) {
+ return t.Resolver.ResolveEndpoints(ctx, authorityInfo, userPrincipalName)
+}
+
+// AADInstanceDiscovery attempts to discover a tenant endpoint (used in OIDC auth with an authorization endpoint).
+// This is done by AAD which allows for aliasing of tenants (windows.sts.net is the same as login.windows.com).
+func (t *Client) AADInstanceDiscovery(ctx context.Context, authorityInfo authority.Info) (authority.InstanceDiscoveryResponse, error) {
+ return t.Authority.AADInstanceDiscovery(ctx, authorityInfo)
+}
+
+// AuthCode returns a token based on an authorization code.
+func (t *Client) AuthCode(ctx context.Context, req accesstokens.AuthCodeRequest) (accesstokens.TokenResponse, error) {
+ if err := scopeError(req.AuthParams); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+ if err := t.resolveEndpoint(ctx, &req.AuthParams, ""); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+
+ tResp, err := t.AccessTokens.FromAuthCode(ctx, req)
+ if err != nil {
+ return accesstokens.TokenResponse{}, fmt.Errorf("could not retrieve token from auth code: %w", err)
+ }
+ return tResp, nil
+}
+
+// Credential acquires a token from the authority using a client credentials grant.
+func (t *Client) Credential(ctx context.Context, authParams authority.AuthParams, cred *accesstokens.Credential) (accesstokens.TokenResponse, error) {
+ if cred.TokenProvider != nil {
+ now := time.Now()
+ scopes := make([]string, len(authParams.Scopes))
+ copy(scopes, authParams.Scopes)
+ params := exported.TokenProviderParameters{
+ Claims: authParams.Claims,
+ CorrelationID: uuid.New().String(),
+ Scopes: scopes,
+ TenantID: authParams.AuthorityInfo.Tenant,
+ }
+ tr, err := cred.TokenProvider(ctx, params)
+ if err != nil {
+ if len(scopes) == 0 {
+ err = fmt.Errorf("token request had an empty authority.AuthParams.Scopes, which may cause the following error: %w", err)
+ return accesstokens.TokenResponse{}, err
+ }
+ return accesstokens.TokenResponse{}, err
+ }
+ return accesstokens.TokenResponse{
+ TokenType: authParams.AuthnScheme.AccessTokenType(),
+ AccessToken: tr.AccessToken,
+ ExpiresOn: internalTime.DurationTime{
+ T: now.Add(time.Duration(tr.ExpiresInSeconds) * time.Second),
+ },
+ GrantedScopes: accesstokens.Scopes{Slice: authParams.Scopes},
+ }, nil
+ }
+
+ if err := t.resolveEndpoint(ctx, &authParams, ""); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+
+ if cred.Secret != "" {
+ return t.AccessTokens.FromClientSecret(ctx, authParams, cred.Secret)
+ }
+ jwt, err := cred.JWT(ctx, authParams)
+ if err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+ return t.AccessTokens.FromAssertion(ctx, authParams, jwt)
+}
+
+// Credential acquires a token from the authority using a client credentials grant.
+func (t *Client) OnBehalfOf(ctx context.Context, authParams authority.AuthParams, cred *accesstokens.Credential) (accesstokens.TokenResponse, error) {
+ if err := scopeError(authParams); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+ if err := t.resolveEndpoint(ctx, &authParams, ""); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+
+ if cred.Secret != "" {
+ return t.AccessTokens.FromUserAssertionClientSecret(ctx, authParams, authParams.UserAssertion, cred.Secret)
+ }
+ jwt, err := cred.JWT(ctx, authParams)
+ if err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+ tr, err := t.AccessTokens.FromUserAssertionClientCertificate(ctx, authParams, authParams.UserAssertion, jwt)
+ if err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+ return tr, nil
+}
+
+func (t *Client) Refresh(ctx context.Context, reqType accesstokens.AppType, authParams authority.AuthParams, cc *accesstokens.Credential, refreshToken accesstokens.RefreshToken) (accesstokens.TokenResponse, error) {
+ if err := scopeError(authParams); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+ if err := t.resolveEndpoint(ctx, &authParams, ""); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+
+ tr, err := t.AccessTokens.FromRefreshToken(ctx, reqType, authParams, cc, refreshToken.Secret)
+ if err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+ return tr, nil
+}
+
+// UsernamePassword retrieves a token where a username and password is used. However, if this is
+// a user realm of "Federated", this uses SAML tokens. If "Managed", uses normal username/password.
+func (t *Client) UsernamePassword(ctx context.Context, authParams authority.AuthParams) (accesstokens.TokenResponse, error) {
+ if err := scopeError(authParams); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+
+ if authParams.AuthorityInfo.AuthorityType == authority.ADFS {
+ if err := t.resolveEndpoint(ctx, &authParams, authParams.Username); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+ return t.AccessTokens.FromUsernamePassword(ctx, authParams)
+ }
+ if err := t.resolveEndpoint(ctx, &authParams, ""); err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+
+ userRealm, err := t.Authority.UserRealm(ctx, authParams)
+ if err != nil {
+ return accesstokens.TokenResponse{}, fmt.Errorf("problem getting user realm from authority: %w", err)
+ }
+
+ switch userRealm.AccountType {
+ case authority.Federated:
+ mexDoc, err := t.WSTrust.Mex(ctx, userRealm.FederationMetadataURL)
+ if err != nil {
+ err = fmt.Errorf("problem getting mex doc from federated url(%s): %w", userRealm.FederationMetadataURL, err)
+ return accesstokens.TokenResponse{}, err
+ }
+
+ saml, err := t.WSTrust.SAMLTokenInfo(ctx, authParams, userRealm.CloudAudienceURN, mexDoc.UsernamePasswordEndpoint)
+ if err != nil {
+ err = fmt.Errorf("problem getting SAML token info: %w", err)
+ return accesstokens.TokenResponse{}, err
+ }
+ tr, err := t.AccessTokens.FromSamlGrant(ctx, authParams, saml)
+ if err != nil {
+ return accesstokens.TokenResponse{}, err
+ }
+ return tr, nil
+ case authority.Managed:
+ if len(authParams.Scopes) == 0 {
+ err = fmt.Errorf("token request had an empty authority.AuthParams.Scopes, which may cause the following error: %w", err)
+ return accesstokens.TokenResponse{}, err
+ }
+ return t.AccessTokens.FromUsernamePassword(ctx, authParams)
+ }
+ return accesstokens.TokenResponse{}, errors.New("unknown account type")
+}
+
+// DeviceCode is the result of a call to Token.DeviceCode().
+type DeviceCode struct {
+ // Result is the device code result from the first call in the device code flow. This allows
+ // the caller to retrieve the displayed code that is used to authorize on the second device.
+ Result accesstokens.DeviceCodeResult
+ authParams authority.AuthParams
+
+ accessTokens AccessTokens
+}
+
+// Token returns a token AFTER the user uses the user code on the second device. This will block
+// until either: (1) the code is input by the user and the service releases a token, (2) the token
+// expires, (3) the Context passed to .DeviceCode() is cancelled or expires, (4) some other service
+// error occurs.
+func (d DeviceCode) Token(ctx context.Context) (accesstokens.TokenResponse, error) {
+ if d.accessTokens == nil {
+ return accesstokens.TokenResponse{}, fmt.Errorf("DeviceCode was either created outside its package or the creating method had an error. DeviceCode is not valid")
+ }
+
+ var cancel context.CancelFunc
+ if deadline, ok := ctx.Deadline(); !ok || d.Result.ExpiresOn.Before(deadline) {
+ ctx, cancel = context.WithDeadline(ctx, d.Result.ExpiresOn)
+ } else {
+ ctx, cancel = context.WithCancel(ctx)
+ }
+ defer cancel()
+
+ var interval = 50 * time.Millisecond
+ timer := time.NewTimer(interval)
+ defer timer.Stop()
+
+ for {
+ timer.Reset(interval)
+ select {
+ case <-ctx.Done():
+ return accesstokens.TokenResponse{}, ctx.Err()
+ case <-timer.C:
+ interval += interval * 2
+ if interval > 5*time.Second {
+ interval = 5 * time.Second
+ }
+ }
+
+ token, err := d.accessTokens.FromDeviceCodeResult(ctx, d.authParams, d.Result)
+ if err != nil && isWaitDeviceCodeErr(err) {
+ continue
+ }
+ return token, err // This handles if it was a non-wait error or success
+ }
+}
+
+type deviceCodeError struct {
+ Error string `json:"error"`
+}
+
+func isWaitDeviceCodeErr(err error) bool {
+ var c errors.CallErr
+ if !errors.As(err, &c) {
+ return false
+ }
+ if c.Resp.StatusCode != 400 {
+ return false
+ }
+ var dCErr deviceCodeError
+ defer c.Resp.Body.Close()
+ body, err := io.ReadAll(c.Resp.Body)
+ if err != nil {
+ return false
+ }
+ err = json.Unmarshal(body, &dCErr)
+ if err != nil {
+ return false
+ }
+ if dCErr.Error == "authorization_pending" || dCErr.Error == "slow_down" {
+ return true
+ }
+ return false
+}
+
+// DeviceCode returns a DeviceCode object that can be used to get the code that must be entered on the second
+// device and optionally the token once the code has been entered on the second device.
+func (t *Client) DeviceCode(ctx context.Context, authParams authority.AuthParams) (DeviceCode, error) {
+ if err := scopeError(authParams); err != nil {
+ return DeviceCode{}, err
+ }
+
+ if err := t.resolveEndpoint(ctx, &authParams, ""); err != nil {
+ return DeviceCode{}, err
+ }
+
+ dcr, err := t.AccessTokens.DeviceCodeResult(ctx, authParams)
+ if err != nil {
+ return DeviceCode{}, err
+ }
+
+ return DeviceCode{Result: dcr, authParams: authParams, accessTokens: t.AccessTokens}, nil
+}
+
+func (t *Client) resolveEndpoint(ctx context.Context, authParams *authority.AuthParams, userPrincipalName string) error {
+ endpoints, err := t.Resolver.ResolveEndpoints(ctx, authParams.AuthorityInfo, userPrincipalName)
+ if err != nil {
+ return fmt.Errorf("unable to resolve an endpoint: %w", err)
+ }
+ authParams.Endpoints = endpoints
+ return nil
+}
+
+// scopeError takes an authority.AuthParams and returns an error
+// if len(AuthParams.Scope) == 0.
+func scopeError(a authority.AuthParams) error {
+ // TODO(someone): we could look deeper at the message to determine if
+ // it's a scope error, but this is a good start.
+ /*
+ {error":"invalid_scope","error_description":"AADSTS1002012: The provided value for scope
+ openid offline_access profile is not valid. Client credential flows must have a scope value
+ with /.default suffixed to the resource identifier (application ID URI)...}
+ */
+ if len(a.Scopes) == 0 {
+ return fmt.Errorf("token request had an empty authority.AuthParams.Scopes, which is invalid")
+ }
+ return nil
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/accesstokens.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/accesstokens.go
new file mode 100644
index 000000000..a7b7b0742
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/accesstokens.go
@@ -0,0 +1,457 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+/*
+Package accesstokens exposes a REST client for querying backend systems to get various types of
+access tokens (oauth) for use in authentication.
+
+These calls are of type "application/x-www-form-urlencoded". This means we use url.Values to
+represent arguments and then encode them into the POST body message. We receive JSON in
+return for the requests. The request definition is defined in https://tools.ietf.org/html/rfc7521#section-4.2 .
+*/
+package accesstokens
+
+import (
+ "context"
+ "crypto"
+
+ /* #nosec */
+ "crypto/sha1"
+ "crypto/x509"
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "net/url"
+ "strconv"
+ "strings"
+ "time"
+
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/exported"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/grant"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust"
+ "github.com/golang-jwt/jwt/v5"
+ "github.com/google/uuid"
+)
+
+const (
+ grantType = "grant_type"
+ deviceCode = "device_code"
+ clientID = "client_id"
+ clientInfo = "client_info"
+ clientInfoVal = "1"
+ username = "username"
+ password = "password"
+)
+
+//go:generate stringer -type=AppType
+
+// AppType is whether the authorization code flow is for a public or confidential client.
+type AppType int8
+
+const (
+ // ATUnknown is the zero value when the type hasn't been set.
+ ATUnknown AppType = iota
+ // ATPublic indicates this if for the Public.Client.
+ ATPublic
+ // ATConfidential indicates this if for the Confidential.Client.
+ ATConfidential
+)
+
+type urlFormCaller interface {
+ URLFormCall(ctx context.Context, endpoint string, qv url.Values, resp interface{}) error
+}
+
+// DeviceCodeResponse represents the HTTP response received from the device code endpoint
+type DeviceCodeResponse struct {
+ authority.OAuthResponseBase
+
+ UserCode string `json:"user_code"`
+ DeviceCode string `json:"device_code"`
+ VerificationURL string `json:"verification_url"`
+ ExpiresIn int `json:"expires_in"`
+ Interval int `json:"interval"`
+ Message string `json:"message"`
+
+ AdditionalFields map[string]interface{}
+}
+
+// Convert converts the DeviceCodeResponse to a DeviceCodeResult
+func (dcr DeviceCodeResponse) Convert(clientID string, scopes []string) DeviceCodeResult {
+ expiresOn := time.Now().UTC().Add(time.Duration(dcr.ExpiresIn) * time.Second)
+ return NewDeviceCodeResult(dcr.UserCode, dcr.DeviceCode, dcr.VerificationURL, expiresOn, dcr.Interval, dcr.Message, clientID, scopes)
+}
+
+// Credential represents the credential used in confidential client flows. This can be either
+// a Secret or Cert/Key.
+type Credential struct {
+ // Secret contains the credential secret if we are doing auth by secret.
+ Secret string
+
+ // Cert is the public certificate, if we're authenticating by certificate.
+ Cert *x509.Certificate
+ // Key is the private key for signing, if we're authenticating by certificate.
+ Key crypto.PrivateKey
+ // X5c is the JWT assertion's x5c header value, required for SN/I authentication.
+ X5c []string
+
+ // AssertionCallback is a function provided by the application, if we're authenticating by assertion.
+ AssertionCallback func(context.Context, exported.AssertionRequestOptions) (string, error)
+
+ // TokenProvider is a function provided by the application that implements custom authentication
+ // logic for a confidential client
+ TokenProvider func(context.Context, exported.TokenProviderParameters) (exported.TokenProviderResult, error)
+}
+
+// JWT gets the jwt assertion when the credential is not using a secret.
+func (c *Credential) JWT(ctx context.Context, authParams authority.AuthParams) (string, error) {
+ if c.AssertionCallback != nil {
+ options := exported.AssertionRequestOptions{
+ ClientID: authParams.ClientID,
+ TokenEndpoint: authParams.Endpoints.TokenEndpoint,
+ }
+ return c.AssertionCallback(ctx, options)
+ }
+
+ token := jwt.NewWithClaims(jwt.SigningMethodRS256, jwt.MapClaims{
+ "aud": authParams.Endpoints.TokenEndpoint,
+ "exp": json.Number(strconv.FormatInt(time.Now().Add(10*time.Minute).Unix(), 10)),
+ "iss": authParams.ClientID,
+ "jti": uuid.New().String(),
+ "nbf": json.Number(strconv.FormatInt(time.Now().Unix(), 10)),
+ "sub": authParams.ClientID,
+ })
+ token.Header = map[string]interface{}{
+ "alg": "RS256",
+ "typ": "JWT",
+ "x5t": base64.StdEncoding.EncodeToString(thumbprint(c.Cert)),
+ }
+
+ if authParams.SendX5C {
+ token.Header["x5c"] = c.X5c
+ }
+
+ assertion, err := token.SignedString(c.Key)
+ if err != nil {
+ return "", fmt.Errorf("unable to sign a JWT token using private key: %w", err)
+ }
+ return assertion, nil
+}
+
+// thumbprint runs the asn1.Der bytes through sha1 for use in the x5t parameter of JWT.
+// https://tools.ietf.org/html/rfc7517#section-4.8
+func thumbprint(cert *x509.Certificate) []byte {
+ /* #nosec */
+ a := sha1.Sum(cert.Raw)
+ return a[:]
+}
+
+// Client represents the REST calls to get tokens from token generator backends.
+type Client struct {
+ // Comm provides the HTTP transport client.
+ Comm urlFormCaller
+
+ testing bool
+}
+
+// FromUsernamePassword uses a username and password to get an access token.
+func (c Client) FromUsernamePassword(ctx context.Context, authParameters authority.AuthParams) (TokenResponse, error) {
+ qv := url.Values{}
+ if err := addClaims(qv, authParameters); err != nil {
+ return TokenResponse{}, err
+ }
+ qv.Set(grantType, grant.Password)
+ qv.Set(username, authParameters.Username)
+ qv.Set(password, authParameters.Password)
+ qv.Set(clientID, authParameters.ClientID)
+ qv.Set(clientInfo, clientInfoVal)
+ addScopeQueryParam(qv, authParameters)
+
+ return c.doTokenResp(ctx, authParameters, qv)
+}
+
+// AuthCodeRequest stores the values required to request a token from the authority using an authorization code
+type AuthCodeRequest struct {
+ AuthParams authority.AuthParams
+ Code string
+ CodeChallenge string
+ Credential *Credential
+ AppType AppType
+}
+
+// NewCodeChallengeRequest returns an AuthCodeRequest that uses a code challenge..
+func NewCodeChallengeRequest(params authority.AuthParams, appType AppType, cc *Credential, code, challenge string) (AuthCodeRequest, error) {
+ if appType == ATUnknown {
+ return AuthCodeRequest{}, fmt.Errorf("bug: NewCodeChallengeRequest() called with AppType == ATUnknown")
+ }
+ return AuthCodeRequest{
+ AuthParams: params,
+ AppType: appType,
+ Code: code,
+ CodeChallenge: challenge,
+ Credential: cc,
+ }, nil
+}
+
+// FromAuthCode uses an authorization code to retrieve an access token.
+func (c Client) FromAuthCode(ctx context.Context, req AuthCodeRequest) (TokenResponse, error) {
+ var qv url.Values
+
+ switch req.AppType {
+ case ATUnknown:
+ return TokenResponse{}, fmt.Errorf("bug: Token.AuthCode() received request with AppType == ATUnknown")
+ case ATConfidential:
+ var err error
+ if req.Credential == nil {
+ return TokenResponse{}, fmt.Errorf("AuthCodeRequest had nil Credential for Confidential app")
+ }
+ qv, err = prepURLVals(ctx, req.Credential, req.AuthParams)
+ if err != nil {
+ return TokenResponse{}, err
+ }
+ case ATPublic:
+ qv = url.Values{}
+ default:
+ return TokenResponse{}, fmt.Errorf("bug: Token.AuthCode() received request with AppType == %v, which we do not recongnize", req.AppType)
+ }
+
+ qv.Set(grantType, grant.AuthCode)
+ qv.Set("code", req.Code)
+ qv.Set("code_verifier", req.CodeChallenge)
+ qv.Set("redirect_uri", req.AuthParams.Redirecturi)
+ qv.Set(clientID, req.AuthParams.ClientID)
+ qv.Set(clientInfo, clientInfoVal)
+ addScopeQueryParam(qv, req.AuthParams)
+ if err := addClaims(qv, req.AuthParams); err != nil {
+ return TokenResponse{}, err
+ }
+
+ return c.doTokenResp(ctx, req.AuthParams, qv)
+}
+
+// FromRefreshToken uses a refresh token (for refreshing credentials) to get a new access token.
+func (c Client) FromRefreshToken(ctx context.Context, appType AppType, authParams authority.AuthParams, cc *Credential, refreshToken string) (TokenResponse, error) {
+ qv := url.Values{}
+ if appType == ATConfidential {
+ var err error
+ qv, err = prepURLVals(ctx, cc, authParams)
+ if err != nil {
+ return TokenResponse{}, err
+ }
+ }
+ if err := addClaims(qv, authParams); err != nil {
+ return TokenResponse{}, err
+ }
+ qv.Set(grantType, grant.RefreshToken)
+ qv.Set(clientID, authParams.ClientID)
+ qv.Set(clientInfo, clientInfoVal)
+ qv.Set("refresh_token", refreshToken)
+ addScopeQueryParam(qv, authParams)
+
+ return c.doTokenResp(ctx, authParams, qv)
+}
+
+// FromClientSecret uses a client's secret (aka password) to get a new token.
+func (c Client) FromClientSecret(ctx context.Context, authParameters authority.AuthParams, clientSecret string) (TokenResponse, error) {
+ qv := url.Values{}
+ if err := addClaims(qv, authParameters); err != nil {
+ return TokenResponse{}, err
+ }
+ qv.Set(grantType, grant.ClientCredential)
+ qv.Set("client_secret", clientSecret)
+ qv.Set(clientID, authParameters.ClientID)
+ addScopeQueryParam(qv, authParameters)
+
+ token, err := c.doTokenResp(ctx, authParameters, qv)
+ if err != nil {
+ return token, fmt.Errorf("FromClientSecret(): %w", err)
+ }
+ return token, nil
+}
+
+func (c Client) FromAssertion(ctx context.Context, authParameters authority.AuthParams, assertion string) (TokenResponse, error) {
+ qv := url.Values{}
+ if err := addClaims(qv, authParameters); err != nil {
+ return TokenResponse{}, err
+ }
+ qv.Set(grantType, grant.ClientCredential)
+ qv.Set("client_assertion_type", grant.ClientAssertion)
+ qv.Set("client_assertion", assertion)
+ qv.Set(clientID, authParameters.ClientID)
+ qv.Set(clientInfo, clientInfoVal)
+ addScopeQueryParam(qv, authParameters)
+
+ token, err := c.doTokenResp(ctx, authParameters, qv)
+ if err != nil {
+ return token, fmt.Errorf("FromAssertion(): %w", err)
+ }
+ return token, nil
+}
+
+func (c Client) FromUserAssertionClientSecret(ctx context.Context, authParameters authority.AuthParams, userAssertion string, clientSecret string) (TokenResponse, error) {
+ qv := url.Values{}
+ if err := addClaims(qv, authParameters); err != nil {
+ return TokenResponse{}, err
+ }
+ qv.Set(grantType, grant.JWT)
+ qv.Set(clientID, authParameters.ClientID)
+ qv.Set("client_secret", clientSecret)
+ qv.Set("assertion", userAssertion)
+ qv.Set(clientInfo, clientInfoVal)
+ qv.Set("requested_token_use", "on_behalf_of")
+ addScopeQueryParam(qv, authParameters)
+
+ return c.doTokenResp(ctx, authParameters, qv)
+}
+
+func (c Client) FromUserAssertionClientCertificate(ctx context.Context, authParameters authority.AuthParams, userAssertion string, assertion string) (TokenResponse, error) {
+ qv := url.Values{}
+ if err := addClaims(qv, authParameters); err != nil {
+ return TokenResponse{}, err
+ }
+ qv.Set(grantType, grant.JWT)
+ qv.Set("client_assertion_type", grant.ClientAssertion)
+ qv.Set("client_assertion", assertion)
+ qv.Set(clientID, authParameters.ClientID)
+ qv.Set("assertion", userAssertion)
+ qv.Set(clientInfo, clientInfoVal)
+ qv.Set("requested_token_use", "on_behalf_of")
+ addScopeQueryParam(qv, authParameters)
+
+ return c.doTokenResp(ctx, authParameters, qv)
+}
+
+func (c Client) DeviceCodeResult(ctx context.Context, authParameters authority.AuthParams) (DeviceCodeResult, error) {
+ qv := url.Values{}
+ if err := addClaims(qv, authParameters); err != nil {
+ return DeviceCodeResult{}, err
+ }
+ qv.Set(clientID, authParameters.ClientID)
+ addScopeQueryParam(qv, authParameters)
+
+ endpoint := strings.Replace(authParameters.Endpoints.TokenEndpoint, "token", "devicecode", -1)
+
+ resp := DeviceCodeResponse{}
+ err := c.Comm.URLFormCall(ctx, endpoint, qv, &resp)
+ if err != nil {
+ return DeviceCodeResult{}, err
+ }
+
+ return resp.Convert(authParameters.ClientID, authParameters.Scopes), nil
+}
+
+func (c Client) FromDeviceCodeResult(ctx context.Context, authParameters authority.AuthParams, deviceCodeResult DeviceCodeResult) (TokenResponse, error) {
+ qv := url.Values{}
+ if err := addClaims(qv, authParameters); err != nil {
+ return TokenResponse{}, err
+ }
+ qv.Set(grantType, grant.DeviceCode)
+ qv.Set(deviceCode, deviceCodeResult.DeviceCode)
+ qv.Set(clientID, authParameters.ClientID)
+ qv.Set(clientInfo, clientInfoVal)
+ addScopeQueryParam(qv, authParameters)
+
+ return c.doTokenResp(ctx, authParameters, qv)
+}
+
+func (c Client) FromSamlGrant(ctx context.Context, authParameters authority.AuthParams, samlGrant wstrust.SamlTokenInfo) (TokenResponse, error) {
+ qv := url.Values{}
+ if err := addClaims(qv, authParameters); err != nil {
+ return TokenResponse{}, err
+ }
+ qv.Set(username, authParameters.Username)
+ qv.Set(password, authParameters.Password)
+ qv.Set(clientID, authParameters.ClientID)
+ qv.Set(clientInfo, clientInfoVal)
+ qv.Set("assertion", base64.StdEncoding.WithPadding(base64.StdPadding).EncodeToString([]byte(samlGrant.Assertion)))
+ addScopeQueryParam(qv, authParameters)
+
+ switch samlGrant.AssertionType {
+ case grant.SAMLV1:
+ qv.Set(grantType, grant.SAMLV1)
+ case grant.SAMLV2:
+ qv.Set(grantType, grant.SAMLV2)
+ default:
+ return TokenResponse{}, fmt.Errorf("GetAccessTokenFromSamlGrant returned unknown SAML assertion type: %q", samlGrant.AssertionType)
+ }
+
+ return c.doTokenResp(ctx, authParameters, qv)
+}
+
+func (c Client) doTokenResp(ctx context.Context, authParams authority.AuthParams, qv url.Values) (TokenResponse, error) {
+ resp := TokenResponse{}
+ if authParams.AuthnScheme != nil {
+ trParams := authParams.AuthnScheme.TokenRequestParams()
+ for k, v := range trParams {
+ qv.Set(k, v)
+ }
+ }
+ err := c.Comm.URLFormCall(ctx, authParams.Endpoints.TokenEndpoint, qv, &resp)
+ if err != nil {
+ return resp, err
+ }
+ resp.ComputeScope(authParams)
+ if c.testing {
+ return resp, nil
+ }
+ return resp, resp.Validate()
+}
+
+// prepURLVals returns an url.Values that sets various key/values if we are doing secrets
+// or JWT assertions.
+func prepURLVals(ctx context.Context, cc *Credential, authParams authority.AuthParams) (url.Values, error) {
+ params := url.Values{}
+ if cc.Secret != "" {
+ params.Set("client_secret", cc.Secret)
+ return params, nil
+ }
+
+ jwt, err := cc.JWT(ctx, authParams)
+ if err != nil {
+ return nil, err
+ }
+ params.Set("client_assertion", jwt)
+ params.Set("client_assertion_type", grant.ClientAssertion)
+ return params, nil
+}
+
+// openid required to get an id token
+// offline_access required to get a refresh token
+// profile required to get the client_info field back
+var detectDefaultScopes = map[string]bool{
+ "openid": true,
+ "offline_access": true,
+ "profile": true,
+}
+
+var defaultScopes = []string{"openid", "offline_access", "profile"}
+
+func AppendDefaultScopes(authParameters authority.AuthParams) []string {
+ scopes := make([]string, 0, len(authParameters.Scopes)+len(defaultScopes))
+ for _, scope := range authParameters.Scopes {
+ s := strings.TrimSpace(scope)
+ if s == "" {
+ continue
+ }
+ if detectDefaultScopes[scope] {
+ continue
+ }
+ scopes = append(scopes, scope)
+ }
+ scopes = append(scopes, defaultScopes...)
+ return scopes
+}
+
+// addClaims adds client capabilities and claims from AuthParams to the given url.Values
+func addClaims(v url.Values, ap authority.AuthParams) error {
+ claims, err := ap.MergeCapabilitiesAndClaims()
+ if err == nil && claims != "" {
+ v.Set("claims", claims)
+ }
+ return err
+}
+
+func addScopeQueryParam(queryParams url.Values, authParameters authority.AuthParams) {
+ scopes := AppendDefaultScopes(authParameters)
+ queryParams.Set("scope", strings.Join(scopes, " "))
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/apptype_string.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/apptype_string.go
new file mode 100644
index 000000000..3bec4a67c
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/apptype_string.go
@@ -0,0 +1,25 @@
+// Code generated by "stringer -type=AppType"; DO NOT EDIT.
+
+package accesstokens
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[ATUnknown-0]
+ _ = x[ATPublic-1]
+ _ = x[ATConfidential-2]
+}
+
+const _AppType_name = "ATUnknownATPublicATConfidential"
+
+var _AppType_index = [...]uint8{0, 9, 17, 31}
+
+func (i AppType) String() string {
+ if i < 0 || i >= AppType(len(_AppType_index)-1) {
+ return "AppType(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _AppType_name[_AppType_index[i]:_AppType_index[i+1]]
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/tokens.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/tokens.go
new file mode 100644
index 000000000..3107b45c1
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens/tokens.go
@@ -0,0 +1,339 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package accesstokens
+
+import (
+ "bytes"
+ "encoding/base64"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "reflect"
+ "strings"
+ "time"
+
+ internalTime "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/json/types/time"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/shared"
+)
+
+// IDToken consists of all the information used to validate a user.
+// https://docs.microsoft.com/azure/active-directory/develop/id-tokens .
+type IDToken struct {
+ PreferredUsername string `json:"preferred_username,omitempty"`
+ GivenName string `json:"given_name,omitempty"`
+ FamilyName string `json:"family_name,omitempty"`
+ MiddleName string `json:"middle_name,omitempty"`
+ Name string `json:"name,omitempty"`
+ Oid string `json:"oid,omitempty"`
+ TenantID string `json:"tid,omitempty"`
+ Subject string `json:"sub,omitempty"`
+ UPN string `json:"upn,omitempty"`
+ Email string `json:"email,omitempty"`
+ AlternativeID string `json:"alternative_id,omitempty"`
+ Issuer string `json:"iss,omitempty"`
+ Audience string `json:"aud,omitempty"`
+ ExpirationTime int64 `json:"exp,omitempty"`
+ IssuedAt int64 `json:"iat,omitempty"`
+ NotBefore int64 `json:"nbf,omitempty"`
+ RawToken string
+
+ AdditionalFields map[string]interface{}
+}
+
+var null = []byte("null")
+
+// UnmarshalJSON implements json.Unmarshaler.
+func (i *IDToken) UnmarshalJSON(b []byte) error {
+ if bytes.Equal(null, b) {
+ return nil
+ }
+
+ // Because we have a custom unmarshaler, you
+ // cannot directly call json.Unmarshal here. If you do, it will call this function
+ // recursively until reach our recursion limit. We have to create a new type
+ // that doesn't have this method in order to use json.Unmarshal.
+ type idToken2 IDToken
+
+ jwt := strings.Trim(string(b), `"`)
+ jwtArr := strings.Split(jwt, ".")
+ if len(jwtArr) < 2 {
+ return errors.New("IDToken returned from server is invalid")
+ }
+
+ jwtPart := jwtArr[1]
+ jwtDecoded, err := decodeJWT(jwtPart)
+ if err != nil {
+ return fmt.Errorf("unable to unmarshal IDToken, problem decoding JWT: %w", err)
+ }
+
+ token := idToken2{}
+ err = json.Unmarshal(jwtDecoded, &token)
+ if err != nil {
+ return fmt.Errorf("unable to unmarshal IDToken: %w", err)
+ }
+ token.RawToken = jwt
+
+ *i = IDToken(token)
+ return nil
+}
+
+// IsZero indicates if the IDToken is the zero value.
+func (i IDToken) IsZero() bool {
+ v := reflect.ValueOf(i)
+ for i := 0; i < v.NumField(); i++ {
+ field := v.Field(i)
+ if !field.IsZero() {
+ switch field.Kind() {
+ case reflect.Map, reflect.Slice:
+ if field.Len() == 0 {
+ continue
+ }
+ }
+ return false
+ }
+ }
+ return true
+}
+
+// LocalAccountID extracts an account's local account ID from an ID token.
+func (i IDToken) LocalAccountID() string {
+ if i.Oid != "" {
+ return i.Oid
+ }
+ return i.Subject
+}
+
+// jwtDecoder is provided to allow tests to provide their own.
+var jwtDecoder = decodeJWT
+
+// ClientInfo is used to create a Home Account ID for an account.
+type ClientInfo struct {
+ UID string `json:"uid"`
+ UTID string `json:"utid"`
+
+ AdditionalFields map[string]interface{}
+}
+
+// UnmarshalJSON implements json.Unmarshaler.s
+func (c *ClientInfo) UnmarshalJSON(b []byte) error {
+ s := strings.Trim(string(b), `"`)
+ // Client info may be empty in some flows, e.g. certificate exchange.
+ if len(s) == 0 {
+ return nil
+ }
+
+ // Because we have a custom unmarshaler, you
+ // cannot directly call json.Unmarshal here. If you do, it will call this function
+ // recursively until reach our recursion limit. We have to create a new type
+ // that doesn't have this method in order to use json.Unmarshal.
+ type clientInfo2 ClientInfo
+
+ raw, err := jwtDecoder(s)
+ if err != nil {
+ return fmt.Errorf("TokenResponse client_info field had JWT decode error: %w", err)
+ }
+
+ var c2 clientInfo2
+
+ err = json.Unmarshal(raw, &c2)
+ if err != nil {
+ return fmt.Errorf("was unable to unmarshal decoded JWT in TokenRespone to ClientInfo: %w", err)
+ }
+
+ *c = ClientInfo(c2)
+ return nil
+}
+
+// Scopes represents scopes in a TokenResponse.
+type Scopes struct {
+ Slice []string
+}
+
+// UnmarshalJSON implements json.Unmarshal.
+func (s *Scopes) UnmarshalJSON(b []byte) error {
+ str := strings.Trim(string(b), `"`)
+ if len(str) == 0 {
+ return nil
+ }
+ sl := strings.Split(str, " ")
+ s.Slice = sl
+ return nil
+}
+
+// TokenResponse is the information that is returned from a token endpoint during a token acquisition flow.
+type TokenResponse struct {
+ authority.OAuthResponseBase
+
+ AccessToken string `json:"access_token"`
+ RefreshToken string `json:"refresh_token"`
+ TokenType string `json:"token_type"`
+
+ FamilyID string `json:"foci"`
+ IDToken IDToken `json:"id_token"`
+ ClientInfo ClientInfo `json:"client_info"`
+ ExpiresOn internalTime.DurationTime `json:"expires_in"`
+ ExtExpiresOn internalTime.DurationTime `json:"ext_expires_in"`
+ GrantedScopes Scopes `json:"scope"`
+ DeclinedScopes []string // This is derived
+
+ AdditionalFields map[string]interface{}
+
+ scopesComputed bool
+}
+
+// ComputeScope computes the final scopes based on what was granted by the server and
+// what our AuthParams were from the authority server. Per OAuth spec, if no scopes are returned, the response should be treated as if all scopes were granted
+// This behavior can be observed in client assertion flows, but can happen at any time, this check ensures we treat
+// those special responses properly Link to spec: https://tools.ietf.org/html/rfc6749#section-3.3
+func (tr *TokenResponse) ComputeScope(authParams authority.AuthParams) {
+ if len(tr.GrantedScopes.Slice) == 0 {
+ tr.GrantedScopes = Scopes{Slice: authParams.Scopes}
+ } else {
+ tr.DeclinedScopes = findDeclinedScopes(authParams.Scopes, tr.GrantedScopes.Slice)
+ }
+ tr.scopesComputed = true
+}
+
+// HomeAccountID uniquely identifies the authenticated account, if any. It's "" when the token is an app token.
+func (tr *TokenResponse) HomeAccountID() string {
+ id := tr.IDToken.Subject
+ if uid := tr.ClientInfo.UID; uid != "" {
+ utid := tr.ClientInfo.UTID
+ if utid == "" {
+ utid = uid
+ }
+ id = fmt.Sprintf("%s.%s", uid, utid)
+ }
+ return id
+}
+
+// Validate validates the TokenResponse has basic valid values. It must be called
+// after ComputeScopes() is called.
+func (tr *TokenResponse) Validate() error {
+ if tr.Error != "" {
+ return fmt.Errorf("%s: %s", tr.Error, tr.ErrorDescription)
+ }
+
+ if tr.AccessToken == "" {
+ return errors.New("response is missing access_token")
+ }
+
+ if !tr.scopesComputed {
+ return fmt.Errorf("TokenResponse hasn't had ScopesComputed() called")
+ }
+ return nil
+}
+
+func (tr *TokenResponse) CacheKey(authParams authority.AuthParams) string {
+ if authParams.AuthorizationType == authority.ATOnBehalfOf {
+ return authParams.AssertionHash()
+ }
+ if authParams.AuthorizationType == authority.ATClientCredentials {
+ return authParams.AppKey()
+ }
+ if authParams.IsConfidentialClient || authParams.AuthorizationType == authority.ATRefreshToken {
+ return tr.HomeAccountID()
+ }
+ return ""
+}
+
+func findDeclinedScopes(requestedScopes []string, grantedScopes []string) []string {
+ declined := []string{}
+ grantedMap := map[string]bool{}
+ for _, s := range grantedScopes {
+ grantedMap[strings.ToLower(s)] = true
+ }
+ // Comparing the requested scopes with the granted scopes to see if there are any scopes that have been declined.
+ for _, r := range requestedScopes {
+ if !grantedMap[strings.ToLower(r)] {
+ declined = append(declined, r)
+ }
+ }
+ return declined
+}
+
+// decodeJWT decodes a JWT and converts it to a byte array representing a JSON object
+// JWT has headers and payload base64url encoded without padding
+// https://tools.ietf.org/html/rfc7519#section-3 and
+// https://tools.ietf.org/html/rfc7515#section-2
+func decodeJWT(data string) ([]byte, error) {
+ // https://tools.ietf.org/html/rfc7515#appendix-C
+ return base64.RawURLEncoding.DecodeString(data)
+}
+
+// RefreshToken is the JSON representation of a MSAL refresh token for encoding to storage.
+type RefreshToken struct {
+ HomeAccountID string `json:"home_account_id,omitempty"`
+ Environment string `json:"environment,omitempty"`
+ CredentialType string `json:"credential_type,omitempty"`
+ ClientID string `json:"client_id,omitempty"`
+ FamilyID string `json:"family_id,omitempty"`
+ Secret string `json:"secret,omitempty"`
+ Realm string `json:"realm,omitempty"`
+ Target string `json:"target,omitempty"`
+ UserAssertionHash string `json:"user_assertion_hash,omitempty"`
+
+ AdditionalFields map[string]interface{}
+}
+
+// NewRefreshToken is the constructor for RefreshToken.
+func NewRefreshToken(homeID, env, clientID, refreshToken, familyID string) RefreshToken {
+ return RefreshToken{
+ HomeAccountID: homeID,
+ Environment: env,
+ CredentialType: "RefreshToken",
+ ClientID: clientID,
+ FamilyID: familyID,
+ Secret: refreshToken,
+ }
+}
+
+// Key outputs the key that can be used to uniquely look up this entry in a map.
+func (rt RefreshToken) Key() string {
+ var fourth = rt.FamilyID
+ if fourth == "" {
+ fourth = rt.ClientID
+ }
+
+ key := strings.Join(
+ []string{rt.HomeAccountID, rt.Environment, rt.CredentialType, fourth},
+ shared.CacheKeySeparator,
+ )
+ return strings.ToLower(key)
+}
+
+func (rt RefreshToken) GetSecret() string {
+ return rt.Secret
+}
+
+// DeviceCodeResult stores the response from the STS device code endpoint.
+type DeviceCodeResult struct {
+ // UserCode is the code the user needs to provide when authentication at the verification URI.
+ UserCode string
+ // DeviceCode is the code used in the access token request.
+ DeviceCode string
+ // VerificationURL is the the URL where user can authenticate.
+ VerificationURL string
+ // ExpiresOn is the expiration time of device code in seconds.
+ ExpiresOn time.Time
+ // Interval is the interval at which the STS should be polled at.
+ Interval int
+ // Message is the message which should be displayed to the user.
+ Message string
+ // ClientID is the UUID issued by the authorization server for your application.
+ ClientID string
+ // Scopes is the OpenID scopes used to request access a protected API.
+ Scopes []string
+}
+
+// NewDeviceCodeResult creates a DeviceCodeResult instance.
+func NewDeviceCodeResult(userCode, deviceCode, verificationURL string, expiresOn time.Time, interval int, message, clientID string, scopes []string) DeviceCodeResult {
+ return DeviceCodeResult{userCode, deviceCode, verificationURL, expiresOn, interval, message, clientID, scopes}
+}
+
+func (dcr DeviceCodeResult) String() string {
+ return fmt.Sprintf("UserCode: (%v)\nDeviceCode: (%v)\nURL: (%v)\nMessage: (%v)\n", dcr.UserCode, dcr.DeviceCode, dcr.VerificationURL, dcr.Message)
+
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authority.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authority.go
new file mode 100644
index 000000000..c3c4a96fc
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authority.go
@@ -0,0 +1,610 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package authority
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/base64"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "os"
+ "path"
+ "strings"
+ "time"
+
+ "github.com/google/uuid"
+)
+
+const (
+ authorizationEndpoint = "https://%v/%v/oauth2/v2.0/authorize"
+ aadInstanceDiscoveryEndpoint = "https://%v/common/discovery/instance"
+ tenantDiscoveryEndpointWithRegion = "https://%s.%s/%s/v2.0/.well-known/openid-configuration"
+ regionName = "REGION_NAME"
+ defaultAPIVersion = "2021-10-01"
+ imdsEndpoint = "http://169.254.169.254/metadata/instance/compute/location?format=text&api-version=" + defaultAPIVersion
+ autoDetectRegion = "TryAutoDetect"
+ AccessTokenTypeBearer = "Bearer"
+)
+
+// These are various hosts that host AAD Instance discovery endpoints.
+const (
+ defaultHost = "login.microsoftonline.com"
+ loginMicrosoft = "login.microsoft.com"
+ loginWindows = "login.windows.net"
+ loginSTSWindows = "sts.windows.net"
+ loginMicrosoftOnline = defaultHost
+)
+
+// jsonCaller is an interface that allows us to mock the JSONCall method.
+type jsonCaller interface {
+ JSONCall(ctx context.Context, endpoint string, headers http.Header, qv url.Values, body, resp interface{}) error
+}
+
+var aadTrustedHostList = map[string]bool{
+ "login.windows.net": true, // Microsoft Azure Worldwide - Used in validation scenarios where host is not this list
+ "login.partner.microsoftonline.cn": true, // Microsoft Azure China
+ "login.microsoftonline.de": true, // Microsoft Azure Blackforest
+ "login-us.microsoftonline.com": true, // Microsoft Azure US Government - Legacy
+ "login.microsoftonline.us": true, // Microsoft Azure US Government
+ "login.microsoftonline.com": true, // Microsoft Azure Worldwide
+}
+
+// TrustedHost checks if an AAD host is trusted/valid.
+func TrustedHost(host string) bool {
+ if _, ok := aadTrustedHostList[host]; ok {
+ return true
+ }
+ return false
+}
+
+// OAuthResponseBase is the base JSON return message for an OAuth call.
+// This is embedded in other calls to get the base fields from every response.
+type OAuthResponseBase struct {
+ Error string `json:"error"`
+ SubError string `json:"suberror"`
+ ErrorDescription string `json:"error_description"`
+ ErrorCodes []int `json:"error_codes"`
+ CorrelationID string `json:"correlation_id"`
+ Claims string `json:"claims"`
+}
+
+// TenantDiscoveryResponse is the tenant endpoints from the OpenID configuration endpoint.
+type TenantDiscoveryResponse struct {
+ OAuthResponseBase
+
+ AuthorizationEndpoint string `json:"authorization_endpoint"`
+ TokenEndpoint string `json:"token_endpoint"`
+ Issuer string `json:"issuer"`
+
+ AdditionalFields map[string]interface{}
+}
+
+// Validate validates that the response had the correct values required.
+func (r *TenantDiscoveryResponse) Validate() error {
+ switch "" {
+ case r.AuthorizationEndpoint:
+ return errors.New("TenantDiscoveryResponse: authorize endpoint was not found in the openid configuration")
+ case r.TokenEndpoint:
+ return errors.New("TenantDiscoveryResponse: token endpoint was not found in the openid configuration")
+ case r.Issuer:
+ return errors.New("TenantDiscoveryResponse: issuer was not found in the openid configuration")
+ }
+ return nil
+}
+
+type InstanceDiscoveryMetadata struct {
+ PreferredNetwork string `json:"preferred_network"`
+ PreferredCache string `json:"preferred_cache"`
+ Aliases []string `json:"aliases"`
+
+ AdditionalFields map[string]interface{}
+}
+
+type InstanceDiscoveryResponse struct {
+ TenantDiscoveryEndpoint string `json:"tenant_discovery_endpoint"`
+ Metadata []InstanceDiscoveryMetadata `json:"metadata"`
+
+ AdditionalFields map[string]interface{}
+}
+
+//go:generate stringer -type=AuthorizeType
+
+// AuthorizeType represents the type of token flow.
+type AuthorizeType int
+
+// These are all the types of token flows.
+const (
+ ATUnknown AuthorizeType = iota
+ ATUsernamePassword
+ ATWindowsIntegrated
+ ATAuthCode
+ ATInteractive
+ ATClientCredentials
+ ATDeviceCode
+ ATRefreshToken
+ AccountByID
+ ATOnBehalfOf
+)
+
+// These are all authority types
+const (
+ AAD = "MSSTS"
+ ADFS = "ADFS"
+ DSTS = "DSTS"
+)
+
+// DSTSTenant is referenced throughout multiple files, let us use a const in case we ever need to change it.
+const DSTSTenant = "7a433bfc-2514-4697-b467-e0933190487f"
+
+// AuthenticationScheme is an extensibility mechanism designed to be used only by Azure Arc for proof of possession access tokens.
+type AuthenticationScheme interface {
+ // Extra parameters that are added to the request to the /token endpoint.
+ TokenRequestParams() map[string]string
+ // Key ID of the public / private key pair used by the encryption algorithm, if any.
+ // Tokens obtained by authentication schemes that use this are bound to the KeyId, i.e.
+ // if a different kid is presented, the access token cannot be used.
+ KeyID() string
+ // Creates the access token that goes into an Authorization HTTP header.
+ FormatAccessToken(accessToken string) (string, error)
+ //Expected to match the token_type parameter returned by ESTS. Used to disambiguate
+ // between ATs of different types (e.g. Bearer and PoP) when loading from cache etc.
+ AccessTokenType() string
+}
+
+// default authn scheme realizing AuthenticationScheme for "Bearer" tokens
+type BearerAuthenticationScheme struct{}
+
+var bearerAuthnScheme BearerAuthenticationScheme
+
+func (ba *BearerAuthenticationScheme) TokenRequestParams() map[string]string {
+ return nil
+}
+func (ba *BearerAuthenticationScheme) KeyID() string {
+ return ""
+}
+func (ba *BearerAuthenticationScheme) FormatAccessToken(accessToken string) (string, error) {
+ return accessToken, nil
+}
+func (ba *BearerAuthenticationScheme) AccessTokenType() string {
+ return AccessTokenTypeBearer
+}
+
+// AuthParams represents the parameters used for authorization for token acquisition.
+type AuthParams struct {
+ AuthorityInfo Info
+ CorrelationID string
+ Endpoints Endpoints
+ ClientID string
+ // Redirecturi is used for auth flows that specify a redirect URI (e.g. local server for interactive auth flow).
+ Redirecturi string
+ HomeAccountID string
+ // Username is the user-name portion for username/password auth flow.
+ Username string
+ // Password is the password portion for username/password auth flow.
+ Password string
+ // Scopes is the list of scopes the user consents to.
+ Scopes []string
+ // AuthorizationType specifies the auth flow being used.
+ AuthorizationType AuthorizeType
+ // State is a random value used to prevent cross-site request forgery attacks.
+ State string
+ // CodeChallenge is derived from a code verifier and is sent in the auth request.
+ CodeChallenge string
+ // CodeChallengeMethod describes the method used to create the CodeChallenge.
+ CodeChallengeMethod string
+ // Prompt specifies the user prompt type during interactive auth.
+ Prompt string
+ // IsConfidentialClient specifies if it is a confidential client.
+ IsConfidentialClient bool
+ // SendX5C specifies if x5c claim(public key of the certificate) should be sent to STS.
+ SendX5C bool
+ // UserAssertion is the access token used to acquire token on behalf of user
+ UserAssertion string
+ // Capabilities the client will include with each token request, for example "CP1".
+ // Call [NewClientCapabilities] to construct a value for this field.
+ Capabilities ClientCapabilities
+ // Claims required for an access token to satisfy a conditional access policy
+ Claims string
+ // KnownAuthorityHosts don't require metadata discovery because they're known to the user
+ KnownAuthorityHosts []string
+ // LoginHint is a username with which to pre-populate account selection during interactive auth
+ LoginHint string
+ // DomainHint is a directive that can be used to accelerate the user to their federated IdP sign-in page
+ DomainHint string
+ // AuthnScheme is an optional scheme for formatting access tokens
+ AuthnScheme AuthenticationScheme
+}
+
+// NewAuthParams creates an authorization parameters object.
+func NewAuthParams(clientID string, authorityInfo Info) AuthParams {
+ return AuthParams{
+ ClientID: clientID,
+ AuthorityInfo: authorityInfo,
+ CorrelationID: uuid.New().String(),
+ AuthnScheme: &bearerAuthnScheme,
+ }
+}
+
+// WithTenant returns a copy of the AuthParams having the specified tenant ID. If the given
+// ID is empty, the copy is identical to the original. This function returns an error in
+// several cases:
+// - ID isn't specific (for example, it's "common")
+// - ID is non-empty and the authority doesn't support tenants (for example, it's an ADFS authority)
+// - the client is configured to authenticate only Microsoft accounts via the "consumers" endpoint
+// - the resulting authority URL is invalid
+func (p AuthParams) WithTenant(ID string) (AuthParams, error) {
+ if ID == "" || ID == p.AuthorityInfo.Tenant {
+ return p, nil
+ }
+
+ var authority string
+ switch p.AuthorityInfo.AuthorityType {
+ case AAD:
+ if ID == "common" || ID == "consumers" || ID == "organizations" {
+ return p, fmt.Errorf(`tenant ID must be a specific tenant, not "%s"`, ID)
+ }
+ if p.AuthorityInfo.Tenant == "consumers" {
+ return p, errors.New(`client is configured to authenticate only personal Microsoft accounts, via the "consumers" endpoint`)
+ }
+ authority = "https://" + path.Join(p.AuthorityInfo.Host, ID)
+ case ADFS:
+ return p, errors.New("ADFS authority doesn't support tenants")
+ case DSTS:
+ return p, errors.New("dSTS authority doesn't support tenants")
+ }
+
+ info, err := NewInfoFromAuthorityURI(authority, p.AuthorityInfo.ValidateAuthority, p.AuthorityInfo.InstanceDiscoveryDisabled)
+ if err == nil {
+ info.Region = p.AuthorityInfo.Region
+ p.AuthorityInfo = info
+ }
+ return p, err
+}
+
+// MergeCapabilitiesAndClaims combines client capabilities and challenge claims into a value suitable for an authentication request's "claims" parameter.
+func (p AuthParams) MergeCapabilitiesAndClaims() (string, error) {
+ claims := p.Claims
+ if len(p.Capabilities.asMap) > 0 {
+ if claims == "" {
+ // without claims the result is simply the capabilities
+ return p.Capabilities.asJSON, nil
+ }
+ // Otherwise, merge claims and capabilties into a single JSON object.
+ // We handle the claims challenge as a map because we don't know its structure.
+ var challenge map[string]any
+ if err := json.Unmarshal([]byte(claims), &challenge); err != nil {
+ return "", fmt.Errorf(`claims must be JSON. Are they base64 encoded? json.Unmarshal returned "%v"`, err)
+ }
+ if err := merge(p.Capabilities.asMap, challenge); err != nil {
+ return "", err
+ }
+ b, err := json.Marshal(challenge)
+ if err != nil {
+ return "", err
+ }
+ claims = string(b)
+ }
+ return claims, nil
+}
+
+// merges a into b without overwriting b's values. Returns an error when a and b share a key for which either has a non-object value.
+func merge(a, b map[string]any) error {
+ for k, av := range a {
+ if bv, ok := b[k]; !ok {
+ // b doesn't contain this key => simply set it to a's value
+ b[k] = av
+ } else {
+ // b does contain this key => recursively merge a[k] into b[k], provided both are maps. If a[k] or b[k] isn't
+ // a map, return an error because merging would overwrite some value in b. Errors shouldn't occur in practice
+ // because the challenge will be from AAD, which knows the capabilities format.
+ if A, ok := av.(map[string]any); ok {
+ if B, ok := bv.(map[string]any); ok {
+ return merge(A, B)
+ } else {
+ // b[k] isn't a map
+ return errors.New("challenge claims conflict with client capabilities")
+ }
+ } else {
+ // a[k] isn't a map
+ return errors.New("challenge claims conflict with client capabilities")
+ }
+ }
+ }
+ return nil
+}
+
+// ClientCapabilities stores capabilities in the formats used by AuthParams.MergeCapabilitiesAndClaims.
+// [NewClientCapabilities] precomputes these representations because capabilities are static for the
+// lifetime of a client and are included with every authentication request i.e., these computations
+// always have the same result and would otherwise have to be repeated for every request.
+type ClientCapabilities struct {
+ // asJSON is for the common case: adding the capabilities to an auth request with no challenge claims
+ asJSON string
+ // asMap is for merging the capabilities with challenge claims
+ asMap map[string]any
+}
+
+func NewClientCapabilities(capabilities []string) (ClientCapabilities, error) {
+ c := ClientCapabilities{}
+ var err error
+ if len(capabilities) > 0 {
+ cpbs := make([]string, len(capabilities))
+ for i := 0; i < len(cpbs); i++ {
+ cpbs[i] = fmt.Sprintf(`"%s"`, capabilities[i])
+ }
+ c.asJSON = fmt.Sprintf(`{"access_token":{"xms_cc":{"values":[%s]}}}`, strings.Join(cpbs, ","))
+ // note our JSON is valid but we can't stop users breaking it with garbage like "}"
+ err = json.Unmarshal([]byte(c.asJSON), &c.asMap)
+ }
+ return c, err
+}
+
+// Info consists of information about the authority.
+type Info struct {
+ Host string
+ CanonicalAuthorityURI string
+ AuthorityType string
+ ValidateAuthority bool
+ Tenant string
+ Region string
+ InstanceDiscoveryDisabled bool
+}
+
+// NewInfoFromAuthorityURI creates an AuthorityInfo instance from the authority URL provided.
+func NewInfoFromAuthorityURI(authority string, validateAuthority bool, instanceDiscoveryDisabled bool) (Info, error) {
+
+ cannonicalAuthority := authority
+
+ // suffix authority with / if it doesn't have one
+ if !strings.HasSuffix(cannonicalAuthority, "/") {
+ cannonicalAuthority += "/"
+ }
+
+ u, err := url.Parse(strings.ToLower(cannonicalAuthority))
+
+ if err != nil {
+ return Info{}, fmt.Errorf("couldn't parse authority url: %w", err)
+ }
+ if u.Scheme != "https" {
+ return Info{}, errors.New("authority url scheme must be https")
+ }
+
+ pathParts := strings.Split(u.EscapedPath(), "/")
+ if len(pathParts) < 3 {
+ return Info{}, errors.New(`authority must be an URL such as "https://login.microsoftonline.com/"`)
+ }
+
+ authorityType := AAD
+ tenant := pathParts[1]
+ switch tenant {
+ case "adfs":
+ authorityType = ADFS
+ case "dstsv2":
+ if len(pathParts) != 4 {
+ return Info{}, fmt.Errorf("dSTS authority must be an https URL such as https:///dstsv2/%s", DSTSTenant)
+ }
+ if pathParts[2] != DSTSTenant {
+ return Info{}, fmt.Errorf("dSTS authority only accepts a single tenant %q", DSTSTenant)
+ }
+ authorityType = DSTS
+ tenant = DSTSTenant
+ }
+
+ // u.Host includes the port, if any, which is required for private cloud deployments
+ return Info{
+ Host: u.Host,
+ CanonicalAuthorityURI: cannonicalAuthority,
+ AuthorityType: authorityType,
+ ValidateAuthority: validateAuthority,
+ Tenant: tenant,
+ InstanceDiscoveryDisabled: instanceDiscoveryDisabled,
+ }, nil
+}
+
+// Endpoints consists of the endpoints from the tenant discovery response.
+type Endpoints struct {
+ AuthorizationEndpoint string
+ TokenEndpoint string
+ selfSignedJwtAudience string
+ authorityHost string
+}
+
+// NewEndpoints creates an Endpoints object.
+func NewEndpoints(authorizationEndpoint string, tokenEndpoint string, selfSignedJwtAudience string, authorityHost string) Endpoints {
+ return Endpoints{authorizationEndpoint, tokenEndpoint, selfSignedJwtAudience, authorityHost}
+}
+
+// UserRealmAccountType refers to the type of user realm.
+type UserRealmAccountType string
+
+// These are the different types of user realms.
+const (
+ Unknown UserRealmAccountType = ""
+ Federated UserRealmAccountType = "Federated"
+ Managed UserRealmAccountType = "Managed"
+)
+
+// UserRealm is used for the username password request to determine user type
+type UserRealm struct {
+ AccountType UserRealmAccountType `json:"account_type"`
+ DomainName string `json:"domain_name"`
+ CloudInstanceName string `json:"cloud_instance_name"`
+ CloudAudienceURN string `json:"cloud_audience_urn"`
+
+ // required if accountType is Federated
+ FederationProtocol string `json:"federation_protocol"`
+ FederationMetadataURL string `json:"federation_metadata_url"`
+
+ AdditionalFields map[string]interface{}
+}
+
+func (u UserRealm) validate() error {
+ switch "" {
+ case string(u.AccountType):
+ return errors.New("the account type (Federated or Managed) is missing")
+ case u.DomainName:
+ return errors.New("domain name of user realm is missing")
+ case u.CloudInstanceName:
+ return errors.New("cloud instance name of user realm is missing")
+ case u.CloudAudienceURN:
+ return errors.New("cloud Instance URN is missing")
+ }
+
+ if u.AccountType == Federated {
+ switch "" {
+ case u.FederationProtocol:
+ return errors.New("federation protocol of user realm is missing")
+ case u.FederationMetadataURL:
+ return errors.New("federation metadata URL of user realm is missing")
+ }
+ }
+ return nil
+}
+
+// Client represents the REST calls to authority backends.
+type Client struct {
+ // Comm provides the HTTP transport client.
+ Comm jsonCaller // *comm.Client
+}
+
+func (c Client) UserRealm(ctx context.Context, authParams AuthParams) (UserRealm, error) {
+ endpoint := fmt.Sprintf("https://%s/common/UserRealm/%s", authParams.Endpoints.authorityHost, url.PathEscape(authParams.Username))
+ qv := url.Values{
+ "api-version": []string{"1.0"},
+ }
+
+ resp := UserRealm{}
+ err := c.Comm.JSONCall(
+ ctx,
+ endpoint,
+ http.Header{"client-request-id": []string{authParams.CorrelationID}},
+ qv,
+ nil,
+ &resp,
+ )
+ if err != nil {
+ return resp, err
+ }
+
+ return resp, resp.validate()
+}
+
+func (c Client) GetTenantDiscoveryResponse(ctx context.Context, openIDConfigurationEndpoint string) (TenantDiscoveryResponse, error) {
+ resp := TenantDiscoveryResponse{}
+ err := c.Comm.JSONCall(
+ ctx,
+ openIDConfigurationEndpoint,
+ http.Header{},
+ nil,
+ nil,
+ &resp,
+ )
+
+ return resp, err
+}
+
+// AADInstanceDiscovery attempts to discover a tenant endpoint (used in OIDC auth with an authorization endpoint).
+// This is done by AAD which allows for aliasing of tenants (windows.sts.net is the same as login.windows.com).
+func (c Client) AADInstanceDiscovery(ctx context.Context, authorityInfo Info) (InstanceDiscoveryResponse, error) {
+ region := ""
+ var err error
+ resp := InstanceDiscoveryResponse{}
+ if authorityInfo.Region != "" && authorityInfo.Region != autoDetectRegion {
+ region = authorityInfo.Region
+ } else if authorityInfo.Region == autoDetectRegion {
+ region = detectRegion(ctx)
+ }
+ if region != "" {
+ environment := authorityInfo.Host
+ switch environment {
+ case loginMicrosoft, loginWindows, loginSTSWindows, defaultHost:
+ environment = loginMicrosoft
+ }
+
+ resp.TenantDiscoveryEndpoint = fmt.Sprintf(tenantDiscoveryEndpointWithRegion, region, environment, authorityInfo.Tenant)
+ metadata := InstanceDiscoveryMetadata{
+ PreferredNetwork: fmt.Sprintf("%v.%v", region, authorityInfo.Host),
+ PreferredCache: authorityInfo.Host,
+ Aliases: []string{fmt.Sprintf("%v.%v", region, authorityInfo.Host), authorityInfo.Host},
+ }
+ resp.Metadata = []InstanceDiscoveryMetadata{metadata}
+ } else {
+ qv := url.Values{}
+ qv.Set("api-version", "1.1")
+ qv.Set("authorization_endpoint", fmt.Sprintf(authorizationEndpoint, authorityInfo.Host, authorityInfo.Tenant))
+
+ discoveryHost := defaultHost
+ if TrustedHost(authorityInfo.Host) {
+ discoveryHost = authorityInfo.Host
+ }
+
+ endpoint := fmt.Sprintf(aadInstanceDiscoveryEndpoint, discoveryHost)
+ err = c.Comm.JSONCall(ctx, endpoint, http.Header{}, qv, nil, &resp)
+ }
+ return resp, err
+}
+
+func detectRegion(ctx context.Context) string {
+ region := os.Getenv(regionName)
+ if region != "" {
+ region = strings.ReplaceAll(region, " ", "")
+ return strings.ToLower(region)
+ }
+ // HTTP call to IMDS endpoint to get region
+ // Refer : https://identitydivision.visualstudio.com/DevEx/_git/AuthLibrariesApiReview?path=%2FPinAuthToRegion%2FAAD%20SDK%20Proposal%20to%20Pin%20Auth%20to%20region.md&_a=preview&version=GBdev
+ // Set a 2 second timeout for this http client which only does calls to IMDS endpoint
+ client := http.Client{
+ Timeout: time.Duration(2 * time.Second),
+ }
+ req, _ := http.NewRequestWithContext(ctx, http.MethodGet, imdsEndpoint, nil)
+ req.Header.Set("Metadata", "true")
+ resp, err := client.Do(req)
+ if err == nil {
+ defer resp.Body.Close()
+ }
+ // If the request times out or there is an error, it is retried once
+ if err != nil || resp.StatusCode != http.StatusOK {
+ resp, err = client.Do(req)
+ if err != nil || resp.StatusCode != http.StatusOK {
+ return ""
+ }
+ }
+ response, err := io.ReadAll(resp.Body)
+ if err != nil {
+ return ""
+ }
+ return string(response)
+}
+
+func (a *AuthParams) CacheKey(isAppCache bool) string {
+ if a.AuthorizationType == ATOnBehalfOf {
+ return a.AssertionHash()
+ }
+ if a.AuthorizationType == ATClientCredentials || isAppCache {
+ return a.AppKey()
+ }
+ if a.AuthorizationType == ATRefreshToken || a.AuthorizationType == AccountByID {
+ return a.HomeAccountID
+ }
+ return ""
+}
+func (a *AuthParams) AssertionHash() string {
+ hasher := sha256.New()
+ // Per documentation this never returns an error : https://pkg.go.dev/hash#pkg-types
+ _, _ = hasher.Write([]byte(a.UserAssertion))
+ sha := base64.URLEncoding.EncodeToString(hasher.Sum(nil))
+ return sha
+}
+
+func (a *AuthParams) AppKey() string {
+ if a.AuthorityInfo.Tenant != "" {
+ return fmt.Sprintf("%s_%s_AppTokenCache", a.ClientID, a.AuthorityInfo.Tenant)
+ }
+ return fmt.Sprintf("%s__AppTokenCache", a.ClientID)
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authorizetype_string.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authorizetype_string.go
new file mode 100644
index 000000000..10039773b
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority/authorizetype_string.go
@@ -0,0 +1,30 @@
+// Code generated by "stringer -type=AuthorizeType"; DO NOT EDIT.
+
+package authority
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[ATUnknown-0]
+ _ = x[ATUsernamePassword-1]
+ _ = x[ATWindowsIntegrated-2]
+ _ = x[ATAuthCode-3]
+ _ = x[ATInteractive-4]
+ _ = x[ATClientCredentials-5]
+ _ = x[ATDeviceCode-6]
+ _ = x[ATRefreshToken-7]
+}
+
+const _AuthorizeType_name = "ATUnknownATUsernamePasswordATWindowsIntegratedATAuthCodeATInteractiveATClientCredentialsATDeviceCodeATRefreshToken"
+
+var _AuthorizeType_index = [...]uint8{0, 9, 27, 46, 56, 69, 88, 100, 114}
+
+func (i AuthorizeType) String() string {
+ if i < 0 || i >= AuthorizeType(len(_AuthorizeType_index)-1) {
+ return "AuthorizeType(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _AuthorizeType_name[_AuthorizeType_index[i]:_AuthorizeType_index[i+1]]
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/comm/comm.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/comm/comm.go
new file mode 100644
index 000000000..d62aac74e
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/comm/comm.go
@@ -0,0 +1,319 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+// Package comm provides helpers for communicating with HTTP backends.
+package comm
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "encoding/xml"
+ "fmt"
+ "io"
+ "net/http"
+ "net/url"
+ "reflect"
+ "runtime"
+ "strings"
+ "time"
+
+ "github.com/google/uuid"
+
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/errors"
+ customJSON "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/json"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/version"
+)
+
+// HTTPClient represents an HTTP client.
+// It's usually an *http.Client from the standard library.
+type HTTPClient interface {
+ // Do sends an HTTP request and returns an HTTP response.
+ Do(req *http.Request) (*http.Response, error)
+
+ // CloseIdleConnections closes any idle connections in a "keep-alive" state.
+ CloseIdleConnections()
+}
+
+// Client provides a wrapper to our *http.Client that handles compression and serialization needs.
+type Client struct {
+ client HTTPClient
+}
+
+// New returns a new Client object.
+func New(httpClient HTTPClient) *Client {
+ if httpClient == nil {
+ panic("http.Client cannot == nil")
+ }
+
+ return &Client{client: httpClient}
+}
+
+// JSONCall connects to the REST endpoint passing the HTTP query values, headers and JSON conversion
+// of body in the HTTP body. It automatically handles compression and decompression with gzip. The response is JSON
+// unmarshalled into resp. resp must be a pointer to a struct. If the body struct contains a field called
+// "AdditionalFields" we use a custom marshal/unmarshal engine.
+func (c *Client) JSONCall(ctx context.Context, endpoint string, headers http.Header, qv url.Values, body, resp interface{}) error {
+ if qv == nil {
+ qv = url.Values{}
+ }
+
+ v := reflect.ValueOf(resp)
+ if err := c.checkResp(v); err != nil {
+ return err
+ }
+
+ // Choose a JSON marshal/unmarshal depending on if we have AdditionalFields attribute.
+ var marshal = json.Marshal
+ var unmarshal = json.Unmarshal
+ if _, ok := v.Elem().Type().FieldByName("AdditionalFields"); ok {
+ marshal = customJSON.Marshal
+ unmarshal = customJSON.Unmarshal
+ }
+
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, fmt.Sprintf("%s?%s", endpoint, qv.Encode()), nil)
+ if err != nil {
+ return fmt.Errorf("could not create request: %w", err)
+ }
+
+ addStdHeaders(headers)
+ req.Header = headers
+
+ if body != nil {
+ // Note: In case your wondering why we are not gzip encoding....
+ // I'm not sure if these various services support gzip on send.
+ headers.Add("Content-Type", "application/json; charset=utf-8")
+ data, err := marshal(body)
+ if err != nil {
+ return fmt.Errorf("bug: conn.Call(): could not marshal the body object: %w", err)
+ }
+ req.Body = io.NopCloser(bytes.NewBuffer(data))
+ req.Method = http.MethodPost
+ }
+
+ data, err := c.do(ctx, req)
+ if err != nil {
+ return err
+ }
+
+ if resp != nil {
+ if err := unmarshal(data, resp); err != nil {
+ return fmt.Errorf("json decode error: %w\njson message bytes were: %s", err, string(data))
+ }
+ }
+ return nil
+}
+
+// XMLCall connects to an endpoint and decodes the XML response into resp. This is used when
+// sending application/xml . If sending XML via SOAP, use SOAPCall().
+func (c *Client) XMLCall(ctx context.Context, endpoint string, headers http.Header, qv url.Values, resp interface{}) error {
+ if err := c.checkResp(reflect.ValueOf(resp)); err != nil {
+ return err
+ }
+
+ if qv == nil {
+ qv = url.Values{}
+ }
+
+ u, err := url.Parse(endpoint)
+ if err != nil {
+ return fmt.Errorf("could not parse path URL(%s): %w", endpoint, err)
+ }
+ u.RawQuery = qv.Encode()
+
+ headers.Set("Content-Type", "application/xml; charset=utf-8") // This was not set in he original Mex(), but...
+ addStdHeaders(headers)
+
+ return c.xmlCall(ctx, u, headers, "", resp)
+}
+
+// SOAPCall returns the SOAP message given an endpoint, action, body of the request and the response object to marshal into.
+func (c *Client) SOAPCall(ctx context.Context, endpoint, action string, headers http.Header, qv url.Values, body string, resp interface{}) error {
+ if body == "" {
+ return fmt.Errorf("cannot make a SOAP call with body set to empty string")
+ }
+
+ if err := c.checkResp(reflect.ValueOf(resp)); err != nil {
+ return err
+ }
+
+ if qv == nil {
+ qv = url.Values{}
+ }
+
+ u, err := url.Parse(endpoint)
+ if err != nil {
+ return fmt.Errorf("could not parse path URL(%s): %w", endpoint, err)
+ }
+ u.RawQuery = qv.Encode()
+
+ headers.Set("Content-Type", "application/soap+xml; charset=utf-8")
+ headers.Set("SOAPAction", action)
+ addStdHeaders(headers)
+
+ return c.xmlCall(ctx, u, headers, body, resp)
+}
+
+// xmlCall sends an XML in body and decodes into resp. This simply does the transport and relies on
+// an upper level call to set things such as SOAP parameters and Content-Type, if required.
+func (c *Client) xmlCall(ctx context.Context, u *url.URL, headers http.Header, body string, resp interface{}) error {
+ req := &http.Request{Method: http.MethodGet, URL: u, Header: headers}
+
+ if len(body) > 0 {
+ req.Method = http.MethodPost
+ req.Body = io.NopCloser(strings.NewReader(body))
+ }
+
+ data, err := c.do(ctx, req)
+ if err != nil {
+ return err
+ }
+
+ return xml.Unmarshal(data, resp)
+}
+
+// URLFormCall is used to make a call where we need to send application/x-www-form-urlencoded data
+// to the backend and receive JSON back. qv will be encoded into the request body.
+func (c *Client) URLFormCall(ctx context.Context, endpoint string, qv url.Values, resp interface{}) error {
+ if len(qv) == 0 {
+ return fmt.Errorf("URLFormCall() requires qv to have non-zero length")
+ }
+
+ if err := c.checkResp(reflect.ValueOf(resp)); err != nil {
+ return err
+ }
+
+ u, err := url.Parse(endpoint)
+ if err != nil {
+ return fmt.Errorf("could not parse path URL(%s): %w", endpoint, err)
+ }
+
+ headers := http.Header{}
+ headers.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
+ addStdHeaders(headers)
+
+ enc := qv.Encode()
+
+ req := &http.Request{
+ Method: http.MethodPost,
+ URL: u,
+ Header: headers,
+ ContentLength: int64(len(enc)),
+ Body: io.NopCloser(strings.NewReader(enc)),
+ GetBody: func() (io.ReadCloser, error) {
+ return io.NopCloser(strings.NewReader(enc)), nil
+ },
+ }
+
+ data, err := c.do(ctx, req)
+ if err != nil {
+ return err
+ }
+
+ v := reflect.ValueOf(resp)
+ if err := c.checkResp(v); err != nil {
+ return err
+ }
+
+ var unmarshal = json.Unmarshal
+ if _, ok := v.Elem().Type().FieldByName("AdditionalFields"); ok {
+ unmarshal = customJSON.Unmarshal
+ }
+ if resp != nil {
+ if err := unmarshal(data, resp); err != nil {
+ return fmt.Errorf("json decode error: %w\nraw message was: %s", err, string(data))
+ }
+ }
+ return nil
+}
+
+// do makes the HTTP call to the server and returns the contents of the body.
+func (c *Client) do(ctx context.Context, req *http.Request) ([]byte, error) {
+ if _, ok := ctx.Deadline(); !ok {
+ var cancel context.CancelFunc
+ ctx, cancel = context.WithTimeout(ctx, 30*time.Second)
+ defer cancel()
+ }
+ req = req.WithContext(ctx)
+
+ reply, err := c.client.Do(req)
+ if err != nil {
+ return nil, fmt.Errorf("server response error:\n %w", err)
+ }
+ defer reply.Body.Close()
+
+ data, err := c.readBody(reply)
+ if err != nil {
+ return nil, fmt.Errorf("could not read the body of an HTTP Response: %w", err)
+ }
+ reply.Body = io.NopCloser(bytes.NewBuffer(data))
+
+ // NOTE: This doesn't happen immediately after the call so that we can get an error message
+ // from the server and include it in our error.
+ switch reply.StatusCode {
+ case 200, 201:
+ default:
+ sd := strings.TrimSpace(string(data))
+ if sd != "" {
+ // We probably have the error in the body.
+ return nil, errors.CallErr{
+ Req: req,
+ Resp: reply,
+ Err: fmt.Errorf("http call(%s)(%s) error: reply status code was %d:\n%s", req.URL.String(), req.Method, reply.StatusCode, sd),
+ }
+ }
+ return nil, errors.CallErr{
+ Req: req,
+ Resp: reply,
+ Err: fmt.Errorf("http call(%s)(%s) error: reply status code was %d", req.URL.String(), req.Method, reply.StatusCode),
+ }
+ }
+
+ return data, nil
+}
+
+// checkResp checks a response object o make sure it is a pointer to a struct.
+func (c *Client) checkResp(v reflect.Value) error {
+ if v.Kind() != reflect.Ptr {
+ return fmt.Errorf("bug: resp argument must a *struct, was %T", v.Interface())
+ }
+ v = v.Elem()
+ if v.Kind() != reflect.Struct {
+ return fmt.Errorf("bug: resp argument must be a *struct, was %T", v.Interface())
+ }
+ return nil
+}
+
+// readBody reads the body out of an *http.Response. It supports gzip encoded responses.
+func (c *Client) readBody(resp *http.Response) ([]byte, error) {
+ var reader io.Reader = resp.Body
+ switch resp.Header.Get("Content-Encoding") {
+ case "":
+ // Do nothing
+ case "gzip":
+ reader = gzipDecompress(resp.Body)
+ default:
+ return nil, fmt.Errorf("bug: comm.Client.JSONCall(): content was send with unsupported content-encoding %s", resp.Header.Get("Content-Encoding"))
+ }
+ return io.ReadAll(reader)
+}
+
+var testID string
+
+// addStdHeaders adds the standard headers we use on all calls.
+func addStdHeaders(headers http.Header) http.Header {
+ headers.Set("Accept-Encoding", "gzip")
+ // So that I can have a static id for tests.
+ if testID != "" {
+ headers.Set("client-request-id", testID)
+ headers.Set("Return-Client-Request-Id", "false")
+ } else {
+ headers.Set("client-request-id", uuid.New().String())
+ headers.Set("Return-Client-Request-Id", "false")
+ }
+ headers.Set("x-client-sku", "MSAL.Go")
+ headers.Set("x-client-os", runtime.GOOS)
+ headers.Set("x-client-cpu", runtime.GOARCH)
+ headers.Set("x-client-ver", version.Version)
+ return headers
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/comm/compress.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/comm/compress.go
new file mode 100644
index 000000000..4d3dbfcf0
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/comm/compress.go
@@ -0,0 +1,33 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package comm
+
+import (
+ "compress/gzip"
+ "io"
+)
+
+func gzipDecompress(r io.Reader) io.Reader {
+ gzipReader, _ := gzip.NewReader(r)
+
+ pipeOut, pipeIn := io.Pipe()
+ go func() {
+ // decompression bomb would have to come from Azure services.
+ // If we want to limit, we should do that in comm.do().
+ _, err := io.Copy(pipeIn, gzipReader) //nolint
+ if err != nil {
+ // don't need the error.
+ pipeIn.CloseWithError(err) //nolint
+ gzipReader.Close()
+ return
+ }
+ if err := gzipReader.Close(); err != nil {
+ // don't need the error.
+ pipeIn.CloseWithError(err) //nolint
+ return
+ }
+ pipeIn.Close()
+ }()
+ return pipeOut
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/grant/grant.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/grant/grant.go
new file mode 100644
index 000000000..b628f61ac
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/grant/grant.go
@@ -0,0 +1,17 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+// Package grant holds types of grants issued by authorization services.
+package grant
+
+const (
+ Password = "password"
+ JWT = "urn:ietf:params:oauth:grant-type:jwt-bearer"
+ SAMLV1 = "urn:ietf:params:oauth:grant-type:saml1_1-bearer"
+ SAMLV2 = "urn:ietf:params:oauth:grant-type:saml2-bearer"
+ DeviceCode = "device_code"
+ AuthCode = "authorization_code"
+ RefreshToken = "refresh_token"
+ ClientCredential = "client_credentials"
+ ClientAssertion = "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
+)
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/ops.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/ops.go
new file mode 100644
index 000000000..1f9c543fa
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/ops.go
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+/*
+Package ops provides operations to various backend services using REST clients.
+
+The REST type provides several clients that can be used to communicate to backends.
+Usage is simple:
+
+ rest := ops.New()
+
+ // Creates an authority client and calls the UserRealm() method.
+ userRealm, err := rest.Authority().UserRealm(ctx, authParameters)
+ if err != nil {
+ // Do something
+ }
+*/
+package ops
+
+import (
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/comm"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust"
+)
+
+// HTTPClient represents an HTTP client.
+// It's usually an *http.Client from the standard library.
+type HTTPClient = comm.HTTPClient
+
+// REST provides REST clients for communicating with various backends used by MSAL.
+type REST struct {
+ client *comm.Client
+}
+
+// New is the constructor for REST.
+func New(httpClient HTTPClient) *REST {
+ return &REST{client: comm.New(httpClient)}
+}
+
+// Authority returns a client for querying information about various authorities.
+func (r *REST) Authority() authority.Client {
+ return authority.Client{Comm: r.client}
+}
+
+// AccessTokens returns a client that can be used to get various access tokens for
+// authorization purposes.
+func (r *REST) AccessTokens() accesstokens.Client {
+ return accesstokens.Client{Comm: r.client}
+}
+
+// WSTrust provides access to various metadata in a WSTrust service. This data can
+// be used to gain tokens based on SAML data using the client provided by AccessTokens().
+func (r *REST) WSTrust() wstrust.Client {
+ return wstrust.Client{Comm: r.client}
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/endpointtype_string.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/endpointtype_string.go
new file mode 100644
index 000000000..a2bb6278a
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/endpointtype_string.go
@@ -0,0 +1,25 @@
+// Code generated by "stringer -type=endpointType"; DO NOT EDIT.
+
+package defs
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[etUnknown-0]
+ _ = x[etUsernamePassword-1]
+ _ = x[etWindowsTransport-2]
+}
+
+const _endpointType_name = "etUnknownetUsernamePasswordetWindowsTransport"
+
+var _endpointType_index = [...]uint8{0, 9, 27, 45}
+
+func (i endpointType) String() string {
+ if i < 0 || i >= endpointType(len(_endpointType_index)-1) {
+ return "endpointType(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _endpointType_name[_endpointType_index[i]:_endpointType_index[i+1]]
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/mex_document_definitions.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/mex_document_definitions.go
new file mode 100644
index 000000000..649727002
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/mex_document_definitions.go
@@ -0,0 +1,394 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package defs
+
+import "encoding/xml"
+
+type Definitions struct {
+ XMLName xml.Name `xml:"definitions"`
+ Text string `xml:",chardata"`
+ Name string `xml:"name,attr"`
+ TargetNamespace string `xml:"targetNamespace,attr"`
+ WSDL string `xml:"wsdl,attr"`
+ XSD string `xml:"xsd,attr"`
+ T string `xml:"t,attr"`
+ SOAPENC string `xml:"soapenc,attr"`
+ SOAP string `xml:"soap,attr"`
+ TNS string `xml:"tns,attr"`
+ MSC string `xml:"msc,attr"`
+ WSAM string `xml:"wsam,attr"`
+ SOAP12 string `xml:"soap12,attr"`
+ WSA10 string `xml:"wsa10,attr"`
+ WSA string `xml:"wsa,attr"`
+ WSAW string `xml:"wsaw,attr"`
+ WSX string `xml:"wsx,attr"`
+ WSAP string `xml:"wsap,attr"`
+ WSU string `xml:"wsu,attr"`
+ Trust string `xml:"trust,attr"`
+ WSP string `xml:"wsp,attr"`
+ Policy []Policy `xml:"Policy"`
+ Types Types `xml:"types"`
+ Message []Message `xml:"message"`
+ PortType []PortType `xml:"portType"`
+ Binding []Binding `xml:"binding"`
+ Service Service `xml:"service"`
+}
+
+type Policy struct {
+ Text string `xml:",chardata"`
+ ID string `xml:"Id,attr"`
+ ExactlyOne ExactlyOne `xml:"ExactlyOne"`
+}
+
+type ExactlyOne struct {
+ Text string `xml:",chardata"`
+ All All `xml:"All"`
+}
+
+type All struct {
+ Text string `xml:",chardata"`
+ NegotiateAuthentication NegotiateAuthentication `xml:"NegotiateAuthentication"`
+ TransportBinding TransportBinding `xml:"TransportBinding"`
+ UsingAddressing Text `xml:"UsingAddressing"`
+ EndorsingSupportingTokens EndorsingSupportingTokens `xml:"EndorsingSupportingTokens"`
+ WSS11 WSS11 `xml:"Wss11"`
+ Trust10 Trust10 `xml:"Trust10"`
+ SignedSupportingTokens SignedSupportingTokens `xml:"SignedSupportingTokens"`
+ Trust13 WSTrust13 `xml:"Trust13"`
+ SignedEncryptedSupportingTokens SignedEncryptedSupportingTokens `xml:"SignedEncryptedSupportingTokens"`
+}
+
+type NegotiateAuthentication struct {
+ Text string `xml:",chardata"`
+ HTTP string `xml:"http,attr"`
+ XMLName xml.Name
+}
+
+type TransportBinding struct {
+ Text string `xml:",chardata"`
+ SP string `xml:"sp,attr"`
+ Policy TransportBindingPolicy `xml:"Policy"`
+}
+
+type TransportBindingPolicy struct {
+ Text string `xml:",chardata"`
+ TransportToken TransportToken `xml:"TransportToken"`
+ AlgorithmSuite AlgorithmSuite `xml:"AlgorithmSuite"`
+ Layout Layout `xml:"Layout"`
+ IncludeTimestamp Text `xml:"IncludeTimestamp"`
+}
+
+type TransportToken struct {
+ Text string `xml:",chardata"`
+ Policy TransportTokenPolicy `xml:"Policy"`
+}
+
+type TransportTokenPolicy struct {
+ Text string `xml:",chardata"`
+ HTTPSToken HTTPSToken `xml:"HttpsToken"`
+}
+
+type HTTPSToken struct {
+ Text string `xml:",chardata"`
+ RequireClientCertificate string `xml:"RequireClientCertificate,attr"`
+}
+
+type AlgorithmSuite struct {
+ Text string `xml:",chardata"`
+ Policy AlgorithmSuitePolicy `xml:"Policy"`
+}
+
+type AlgorithmSuitePolicy struct {
+ Text string `xml:",chardata"`
+ Basic256 Text `xml:"Basic256"`
+ Basic128 Text `xml:"Basic128"`
+}
+
+type Layout struct {
+ Text string `xml:",chardata"`
+ Policy LayoutPolicy `xml:"Policy"`
+}
+
+type LayoutPolicy struct {
+ Text string `xml:",chardata"`
+ Strict Text `xml:"Strict"`
+}
+
+type EndorsingSupportingTokens struct {
+ Text string `xml:",chardata"`
+ SP string `xml:"sp,attr"`
+ Policy EndorsingSupportingTokensPolicy `xml:"Policy"`
+}
+
+type EndorsingSupportingTokensPolicy struct {
+ Text string `xml:",chardata"`
+ X509Token X509Token `xml:"X509Token"`
+ RSAToken RSAToken `xml:"RsaToken"`
+ SignedParts SignedParts `xml:"SignedParts"`
+ KerberosToken KerberosToken `xml:"KerberosToken"`
+ IssuedToken IssuedToken `xml:"IssuedToken"`
+ KeyValueToken KeyValueToken `xml:"KeyValueToken"`
+}
+
+type X509Token struct {
+ Text string `xml:",chardata"`
+ IncludeToken string `xml:"IncludeToken,attr"`
+ Policy X509TokenPolicy `xml:"Policy"`
+}
+
+type X509TokenPolicy struct {
+ Text string `xml:",chardata"`
+ RequireThumbprintReference Text `xml:"RequireThumbprintReference"`
+ WSSX509V3Token10 Text `xml:"WssX509V3Token10"`
+}
+
+type RSAToken struct {
+ Text string `xml:",chardata"`
+ IncludeToken string `xml:"IncludeToken,attr"`
+ Optional string `xml:"Optional,attr"`
+ MSSP string `xml:"mssp,attr"`
+}
+
+type SignedParts struct {
+ Text string `xml:",chardata"`
+ Header SignedPartsHeader `xml:"Header"`
+}
+
+type SignedPartsHeader struct {
+ Text string `xml:",chardata"`
+ Name string `xml:"Name,attr"`
+ Namespace string `xml:"Namespace,attr"`
+}
+
+type KerberosToken struct {
+ Text string `xml:",chardata"`
+ IncludeToken string `xml:"IncludeToken,attr"`
+ Policy KerberosTokenPolicy `xml:"Policy"`
+}
+
+type KerberosTokenPolicy struct {
+ Text string `xml:",chardata"`
+ WSSGSSKerberosV5ApReqToken11 Text `xml:"WssGssKerberosV5ApReqToken11"`
+}
+
+type IssuedToken struct {
+ Text string `xml:",chardata"`
+ IncludeToken string `xml:"IncludeToken,attr"`
+ RequestSecurityTokenTemplate RequestSecurityTokenTemplate `xml:"RequestSecurityTokenTemplate"`
+ Policy IssuedTokenPolicy `xml:"Policy"`
+}
+
+type RequestSecurityTokenTemplate struct {
+ Text string `xml:",chardata"`
+ KeyType Text `xml:"KeyType"`
+ EncryptWith Text `xml:"EncryptWith"`
+ SignatureAlgorithm Text `xml:"SignatureAlgorithm"`
+ CanonicalizationAlgorithm Text `xml:"CanonicalizationAlgorithm"`
+ EncryptionAlgorithm Text `xml:"EncryptionAlgorithm"`
+ KeySize Text `xml:"KeySize"`
+ KeyWrapAlgorithm Text `xml:"KeyWrapAlgorithm"`
+}
+
+type IssuedTokenPolicy struct {
+ Text string `xml:",chardata"`
+ RequireInternalReference Text `xml:"RequireInternalReference"`
+}
+
+type KeyValueToken struct {
+ Text string `xml:",chardata"`
+ IncludeToken string `xml:"IncludeToken,attr"`
+ Optional string `xml:"Optional,attr"`
+}
+
+type WSS11 struct {
+ Text string `xml:",chardata"`
+ SP string `xml:"sp,attr"`
+ Policy Wss11Policy `xml:"Policy"`
+}
+
+type Wss11Policy struct {
+ Text string `xml:",chardata"`
+ MustSupportRefThumbprint Text `xml:"MustSupportRefThumbprint"`
+}
+
+type Trust10 struct {
+ Text string `xml:",chardata"`
+ SP string `xml:"sp,attr"`
+ Policy Trust10Policy `xml:"Policy"`
+}
+
+type Trust10Policy struct {
+ Text string `xml:",chardata"`
+ MustSupportIssuedTokens Text `xml:"MustSupportIssuedTokens"`
+ RequireClientEntropy Text `xml:"RequireClientEntropy"`
+ RequireServerEntropy Text `xml:"RequireServerEntropy"`
+}
+
+type SignedSupportingTokens struct {
+ Text string `xml:",chardata"`
+ SP string `xml:"sp,attr"`
+ Policy SupportingTokensPolicy `xml:"Policy"`
+}
+
+type SupportingTokensPolicy struct {
+ Text string `xml:",chardata"`
+ UsernameToken UsernameToken `xml:"UsernameToken"`
+}
+type UsernameToken struct {
+ Text string `xml:",chardata"`
+ IncludeToken string `xml:"IncludeToken,attr"`
+ Policy UsernameTokenPolicy `xml:"Policy"`
+}
+
+type UsernameTokenPolicy struct {
+ Text string `xml:",chardata"`
+ WSSUsernameToken10 WSSUsernameToken10 `xml:"WssUsernameToken10"`
+}
+
+type WSSUsernameToken10 struct {
+ Text string `xml:",chardata"`
+ XMLName xml.Name
+}
+
+type WSTrust13 struct {
+ Text string `xml:",chardata"`
+ SP string `xml:"sp,attr"`
+ Policy WSTrust13Policy `xml:"Policy"`
+}
+
+type WSTrust13Policy struct {
+ Text string `xml:",chardata"`
+ MustSupportIssuedTokens Text `xml:"MustSupportIssuedTokens"`
+ RequireClientEntropy Text `xml:"RequireClientEntropy"`
+ RequireServerEntropy Text `xml:"RequireServerEntropy"`
+}
+
+type SignedEncryptedSupportingTokens struct {
+ Text string `xml:",chardata"`
+ SP string `xml:"sp,attr"`
+ Policy SupportingTokensPolicy `xml:"Policy"`
+}
+
+type Types struct {
+ Text string `xml:",chardata"`
+ Schema Schema `xml:"schema"`
+}
+
+type Schema struct {
+ Text string `xml:",chardata"`
+ TargetNamespace string `xml:"targetNamespace,attr"`
+ Import []Import `xml:"import"`
+}
+
+type Import struct {
+ Text string `xml:",chardata"`
+ SchemaLocation string `xml:"schemaLocation,attr"`
+ Namespace string `xml:"namespace,attr"`
+}
+
+type Message struct {
+ Text string `xml:",chardata"`
+ Name string `xml:"name,attr"`
+ Part Part `xml:"part"`
+}
+
+type Part struct {
+ Text string `xml:",chardata"`
+ Name string `xml:"name,attr"`
+ Element string `xml:"element,attr"`
+}
+
+type PortType struct {
+ Text string `xml:",chardata"`
+ Name string `xml:"name,attr"`
+ Operation Operation `xml:"operation"`
+}
+
+type Operation struct {
+ Text string `xml:",chardata"`
+ Name string `xml:"name,attr"`
+ Input OperationIO `xml:"input"`
+ Output OperationIO `xml:"output"`
+}
+
+type OperationIO struct {
+ Text string `xml:",chardata"`
+ Action string `xml:"Action,attr"`
+ Message string `xml:"message,attr"`
+ Body OperationIOBody `xml:"body"`
+}
+
+type OperationIOBody struct {
+ Text string `xml:",chardata"`
+ Use string `xml:"use,attr"`
+}
+
+type Binding struct {
+ Text string `xml:",chardata"`
+ Name string `xml:"name,attr"`
+ Type string `xml:"type,attr"`
+ PolicyReference PolicyReference `xml:"PolicyReference"`
+ Binding DefinitionsBinding `xml:"binding"`
+ Operation BindingOperation `xml:"operation"`
+}
+
+type PolicyReference struct {
+ Text string `xml:",chardata"`
+ URI string `xml:"URI,attr"`
+}
+
+type DefinitionsBinding struct {
+ Text string `xml:",chardata"`
+ Transport string `xml:"transport,attr"`
+}
+
+type BindingOperation struct {
+ Text string `xml:",chardata"`
+ Name string `xml:"name,attr"`
+ Operation BindingOperationOperation `xml:"operation"`
+ Input BindingOperationIO `xml:"input"`
+ Output BindingOperationIO `xml:"output"`
+}
+
+type BindingOperationOperation struct {
+ Text string `xml:",chardata"`
+ SoapAction string `xml:"soapAction,attr"`
+ Style string `xml:"style,attr"`
+}
+
+type BindingOperationIO struct {
+ Text string `xml:",chardata"`
+ Body OperationIOBody `xml:"body"`
+}
+
+type Service struct {
+ Text string `xml:",chardata"`
+ Name string `xml:"name,attr"`
+ Port []Port `xml:"port"`
+}
+
+type Port struct {
+ Text string `xml:",chardata"`
+ Name string `xml:"name,attr"`
+ Binding string `xml:"binding,attr"`
+ Address Address `xml:"address"`
+ EndpointReference PortEndpointReference `xml:"EndpointReference"`
+}
+
+type Address struct {
+ Text string `xml:",chardata"`
+ Location string `xml:"location,attr"`
+}
+
+type PortEndpointReference struct {
+ Text string `xml:",chardata"`
+ Address Text `xml:"Address"`
+ Identity Identity `xml:"Identity"`
+}
+
+type Identity struct {
+ Text string `xml:",chardata"`
+ XMLNS string `xml:"xmlns,attr"`
+ SPN Text `xml:"Spn"`
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/saml_assertion_definitions.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/saml_assertion_definitions.go
new file mode 100644
index 000000000..7d0725565
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/saml_assertion_definitions.go
@@ -0,0 +1,230 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package defs
+
+import "encoding/xml"
+
+// TODO(msal): Someone (and it ain't gonna be me) needs to document these attributes or
+// at the least put a link to RFC.
+
+type SAMLDefinitions struct {
+ XMLName xml.Name `xml:"Envelope"`
+ Text string `xml:",chardata"`
+ S string `xml:"s,attr"`
+ A string `xml:"a,attr"`
+ U string `xml:"u,attr"`
+ Header Header `xml:"Header"`
+ Body Body `xml:"Body"`
+}
+
+type Header struct {
+ Text string `xml:",chardata"`
+ Action Action `xml:"Action"`
+ Security Security `xml:"Security"`
+}
+
+type Action struct {
+ Text string `xml:",chardata"`
+ MustUnderstand string `xml:"mustUnderstand,attr"`
+}
+
+type Security struct {
+ Text string `xml:",chardata"`
+ MustUnderstand string `xml:"mustUnderstand,attr"`
+ O string `xml:"o,attr"`
+ Timestamp Timestamp `xml:"Timestamp"`
+}
+
+type Timestamp struct {
+ Text string `xml:",chardata"`
+ ID string `xml:"Id,attr"`
+ Created Text `xml:"Created"`
+ Expires Text `xml:"Expires"`
+}
+
+type Text struct {
+ Text string `xml:",chardata"`
+}
+
+type Body struct {
+ Text string `xml:",chardata"`
+ RequestSecurityTokenResponseCollection RequestSecurityTokenResponseCollection `xml:"RequestSecurityTokenResponseCollection"`
+}
+
+type RequestSecurityTokenResponseCollection struct {
+ Text string `xml:",chardata"`
+ Trust string `xml:"trust,attr"`
+ RequestSecurityTokenResponse []RequestSecurityTokenResponse `xml:"RequestSecurityTokenResponse"`
+}
+
+type RequestSecurityTokenResponse struct {
+ Text string `xml:",chardata"`
+ Lifetime Lifetime `xml:"Lifetime"`
+ AppliesTo AppliesTo `xml:"AppliesTo"`
+ RequestedSecurityToken RequestedSecurityToken `xml:"RequestedSecurityToken"`
+ RequestedAttachedReference RequestedAttachedReference `xml:"RequestedAttachedReference"`
+ RequestedUnattachedReference RequestedUnattachedReference `xml:"RequestedUnattachedReference"`
+ TokenType Text `xml:"TokenType"`
+ RequestType Text `xml:"RequestType"`
+ KeyType Text `xml:"KeyType"`
+}
+
+type Lifetime struct {
+ Text string `xml:",chardata"`
+ Created WSUTimestamp `xml:"Created"`
+ Expires WSUTimestamp `xml:"Expires"`
+}
+
+type WSUTimestamp struct {
+ Text string `xml:",chardata"`
+ Wsu string `xml:"wsu,attr"`
+}
+
+type AppliesTo struct {
+ Text string `xml:",chardata"`
+ Wsp string `xml:"wsp,attr"`
+ EndpointReference EndpointReference `xml:"EndpointReference"`
+}
+
+type EndpointReference struct {
+ Text string `xml:",chardata"`
+ Wsa string `xml:"wsa,attr"`
+ Address Text `xml:"Address"`
+}
+
+type RequestedSecurityToken struct {
+ Text string `xml:",chardata"`
+ AssertionRawXML string `xml:",innerxml"`
+ Assertion Assertion `xml:"Assertion"`
+}
+
+type Assertion struct {
+ XMLName xml.Name // Normally its `xml:"Assertion"`, but I think they want to capture the xmlns
+ Text string `xml:",chardata"`
+ MajorVersion string `xml:"MajorVersion,attr"`
+ MinorVersion string `xml:"MinorVersion,attr"`
+ AssertionID string `xml:"AssertionID,attr"`
+ Issuer string `xml:"Issuer,attr"`
+ IssueInstant string `xml:"IssueInstant,attr"`
+ Saml string `xml:"saml,attr"`
+ Conditions Conditions `xml:"Conditions"`
+ AttributeStatement AttributeStatement `xml:"AttributeStatement"`
+ AuthenticationStatement AuthenticationStatement `xml:"AuthenticationStatement"`
+ Signature Signature `xml:"Signature"`
+}
+
+type Conditions struct {
+ Text string `xml:",chardata"`
+ NotBefore string `xml:"NotBefore,attr"`
+ NotOnOrAfter string `xml:"NotOnOrAfter,attr"`
+ AudienceRestrictionCondition AudienceRestrictionCondition `xml:"AudienceRestrictionCondition"`
+}
+
+type AudienceRestrictionCondition struct {
+ Text string `xml:",chardata"`
+ Audience Text `xml:"Audience"`
+}
+
+type AttributeStatement struct {
+ Text string `xml:",chardata"`
+ Subject Subject `xml:"Subject"`
+ Attribute []Attribute `xml:"Attribute"`
+}
+
+type Subject struct {
+ Text string `xml:",chardata"`
+ NameIdentifier NameIdentifier `xml:"NameIdentifier"`
+ SubjectConfirmation SubjectConfirmation `xml:"SubjectConfirmation"`
+}
+
+type NameIdentifier struct {
+ Text string `xml:",chardata"`
+ Format string `xml:"Format,attr"`
+}
+
+type SubjectConfirmation struct {
+ Text string `xml:",chardata"`
+ ConfirmationMethod Text `xml:"ConfirmationMethod"`
+}
+
+type Attribute struct {
+ Text string `xml:",chardata"`
+ AttributeName string `xml:"AttributeName,attr"`
+ AttributeNamespace string `xml:"AttributeNamespace,attr"`
+ AttributeValue Text `xml:"AttributeValue"`
+}
+
+type AuthenticationStatement struct {
+ Text string `xml:",chardata"`
+ AuthenticationMethod string `xml:"AuthenticationMethod,attr"`
+ AuthenticationInstant string `xml:"AuthenticationInstant,attr"`
+ Subject Subject `xml:"Subject"`
+}
+
+type Signature struct {
+ Text string `xml:",chardata"`
+ Ds string `xml:"ds,attr"`
+ SignedInfo SignedInfo `xml:"SignedInfo"`
+ SignatureValue Text `xml:"SignatureValue"`
+ KeyInfo KeyInfo `xml:"KeyInfo"`
+}
+
+type SignedInfo struct {
+ Text string `xml:",chardata"`
+ CanonicalizationMethod Method `xml:"CanonicalizationMethod"`
+ SignatureMethod Method `xml:"SignatureMethod"`
+ Reference Reference `xml:"Reference"`
+}
+
+type Method struct {
+ Text string `xml:",chardata"`
+ Algorithm string `xml:"Algorithm,attr"`
+}
+
+type Reference struct {
+ Text string `xml:",chardata"`
+ URI string `xml:"URI,attr"`
+ Transforms Transforms `xml:"Transforms"`
+ DigestMethod Method `xml:"DigestMethod"`
+ DigestValue Text `xml:"DigestValue"`
+}
+
+type Transforms struct {
+ Text string `xml:",chardata"`
+ Transform []Method `xml:"Transform"`
+}
+
+type KeyInfo struct {
+ Text string `xml:",chardata"`
+ Xmlns string `xml:"xmlns,attr"`
+ X509Data X509Data `xml:"X509Data"`
+}
+
+type X509Data struct {
+ Text string `xml:",chardata"`
+ X509Certificate Text `xml:"X509Certificate"`
+}
+
+type RequestedAttachedReference struct {
+ Text string `xml:",chardata"`
+ SecurityTokenReference SecurityTokenReference `xml:"SecurityTokenReference"`
+}
+
+type SecurityTokenReference struct {
+ Text string `xml:",chardata"`
+ TokenType string `xml:"TokenType,attr"`
+ O string `xml:"o,attr"`
+ K string `xml:"k,attr"`
+ KeyIdentifier KeyIdentifier `xml:"KeyIdentifier"`
+}
+
+type KeyIdentifier struct {
+ Text string `xml:",chardata"`
+ ValueType string `xml:"ValueType,attr"`
+}
+
+type RequestedUnattachedReference struct {
+ Text string `xml:",chardata"`
+ SecurityTokenReference SecurityTokenReference `xml:"SecurityTokenReference"`
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/version_string.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/version_string.go
new file mode 100644
index 000000000..6fe5efa8a
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/version_string.go
@@ -0,0 +1,25 @@
+// Code generated by "stringer -type=Version"; DO NOT EDIT.
+
+package defs
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[TrustUnknown-0]
+ _ = x[Trust2005-1]
+ _ = x[Trust13-2]
+}
+
+const _Version_name = "TrustUnknownTrust2005Trust13"
+
+var _Version_index = [...]uint8{0, 12, 21, 28}
+
+func (i Version) String() string {
+ if i < 0 || i >= Version(len(_Version_index)-1) {
+ return "Version(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _Version_name[_Version_index[i]:_Version_index[i+1]]
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/wstrust_endpoint.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/wstrust_endpoint.go
new file mode 100644
index 000000000..8fad5efb5
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/wstrust_endpoint.go
@@ -0,0 +1,199 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package defs
+
+import (
+ "encoding/xml"
+ "fmt"
+ "time"
+
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority"
+ uuid "github.com/google/uuid"
+)
+
+//go:generate stringer -type=Version
+
+type Version int
+
+const (
+ TrustUnknown Version = iota
+ Trust2005
+ Trust13
+)
+
+// Endpoint represents a WSTrust endpoint.
+type Endpoint struct {
+ // Version is the version of the endpoint.
+ Version Version
+ // URL is the URL of the endpoint.
+ URL string
+}
+
+type wsTrustTokenRequestEnvelope struct {
+ XMLName xml.Name `xml:"s:Envelope"`
+ Text string `xml:",chardata"`
+ S string `xml:"xmlns:s,attr"`
+ Wsa string `xml:"xmlns:wsa,attr"`
+ Wsu string `xml:"xmlns:wsu,attr"`
+ Header struct {
+ Text string `xml:",chardata"`
+ Action struct {
+ Text string `xml:",chardata"`
+ MustUnderstand string `xml:"s:mustUnderstand,attr"`
+ } `xml:"wsa:Action"`
+ MessageID struct {
+ Text string `xml:",chardata"`
+ } `xml:"wsa:messageID"`
+ ReplyTo struct {
+ Text string `xml:",chardata"`
+ Address struct {
+ Text string `xml:",chardata"`
+ } `xml:"wsa:Address"`
+ } `xml:"wsa:ReplyTo"`
+ To struct {
+ Text string `xml:",chardata"`
+ MustUnderstand string `xml:"s:mustUnderstand,attr"`
+ } `xml:"wsa:To"`
+ Security struct {
+ Text string `xml:",chardata"`
+ MustUnderstand string `xml:"s:mustUnderstand,attr"`
+ Wsse string `xml:"xmlns:wsse,attr"`
+ Timestamp struct {
+ Text string `xml:",chardata"`
+ ID string `xml:"wsu:Id,attr"`
+ Created struct {
+ Text string `xml:",chardata"`
+ } `xml:"wsu:Created"`
+ Expires struct {
+ Text string `xml:",chardata"`
+ } `xml:"wsu:Expires"`
+ } `xml:"wsu:Timestamp"`
+ UsernameToken struct {
+ Text string `xml:",chardata"`
+ ID string `xml:"wsu:Id,attr"`
+ Username struct {
+ Text string `xml:",chardata"`
+ } `xml:"wsse:Username"`
+ Password struct {
+ Text string `xml:",chardata"`
+ } `xml:"wsse:Password"`
+ } `xml:"wsse:UsernameToken"`
+ } `xml:"wsse:Security"`
+ } `xml:"s:Header"`
+ Body struct {
+ Text string `xml:",chardata"`
+ RequestSecurityToken struct {
+ Text string `xml:",chardata"`
+ Wst string `xml:"xmlns:wst,attr"`
+ AppliesTo struct {
+ Text string `xml:",chardata"`
+ Wsp string `xml:"xmlns:wsp,attr"`
+ EndpointReference struct {
+ Text string `xml:",chardata"`
+ Address struct {
+ Text string `xml:",chardata"`
+ } `xml:"wsa:Address"`
+ } `xml:"wsa:EndpointReference"`
+ } `xml:"wsp:AppliesTo"`
+ KeyType struct {
+ Text string `xml:",chardata"`
+ } `xml:"wst:KeyType"`
+ RequestType struct {
+ Text string `xml:",chardata"`
+ } `xml:"wst:RequestType"`
+ } `xml:"wst:RequestSecurityToken"`
+ } `xml:"s:Body"`
+}
+
+func buildTimeString(t time.Time) string {
+ // Golang time formats are weird: https://stackoverflow.com/questions/20234104/how-to-format-current-time-using-a-yyyymmddhhmmss-format
+ return t.Format("2006-01-02T15:04:05.000Z")
+}
+
+func (wte *Endpoint) buildTokenRequestMessage(authType authority.AuthorizeType, cloudAudienceURN string, username string, password string) (string, error) {
+ var soapAction string
+ var trustNamespace string
+ var keyType string
+ var requestType string
+
+ createdTime := time.Now().UTC()
+ expiresTime := createdTime.Add(10 * time.Minute)
+
+ switch wte.Version {
+ case Trust2005:
+ soapAction = trust2005Spec
+ trustNamespace = "http://schemas.xmlsoap.org/ws/2005/02/trust"
+ keyType = "http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey"
+ requestType = "http://schemas.xmlsoap.org/ws/2005/02/trust/Issue"
+ case Trust13:
+ soapAction = trust13Spec
+ trustNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512"
+ keyType = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer"
+ requestType = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/Issue"
+ default:
+ return "", fmt.Errorf("buildTokenRequestMessage had Version == %q, which is not recognized", wte.Version)
+ }
+
+ var envelope wsTrustTokenRequestEnvelope
+
+ messageUUID := uuid.New()
+
+ envelope.S = "http://www.w3.org/2003/05/soap-envelope"
+ envelope.Wsa = "http://www.w3.org/2005/08/addressing"
+ envelope.Wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+
+ envelope.Header.Action.MustUnderstand = "1"
+ envelope.Header.Action.Text = soapAction
+ envelope.Header.MessageID.Text = "urn:uuid:" + messageUUID.String()
+ envelope.Header.ReplyTo.Address.Text = "http://www.w3.org/2005/08/addressing/anonymous"
+ envelope.Header.To.MustUnderstand = "1"
+ envelope.Header.To.Text = wte.URL
+
+ switch authType {
+ case authority.ATUnknown:
+ return "", fmt.Errorf("buildTokenRequestMessage had no authority type(%v)", authType)
+ case authority.ATUsernamePassword:
+ endpointUUID := uuid.New()
+
+ var trustID string
+ if wte.Version == Trust2005 {
+ trustID = "UnPwSecTok2005-" + endpointUUID.String()
+ } else {
+ trustID = "UnPwSecTok13-" + endpointUUID.String()
+ }
+
+ envelope.Header.Security.MustUnderstand = "1"
+ envelope.Header.Security.Wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+ envelope.Header.Security.Timestamp.ID = "MSATimeStamp"
+ envelope.Header.Security.Timestamp.Created.Text = buildTimeString(createdTime)
+ envelope.Header.Security.Timestamp.Expires.Text = buildTimeString(expiresTime)
+ envelope.Header.Security.UsernameToken.ID = trustID
+ envelope.Header.Security.UsernameToken.Username.Text = username
+ envelope.Header.Security.UsernameToken.Password.Text = password
+ default:
+ // This is just to note that we don't do anything for other cases.
+ // We aren't missing anything I know of.
+ }
+
+ envelope.Body.RequestSecurityToken.Wst = trustNamespace
+ envelope.Body.RequestSecurityToken.AppliesTo.Wsp = "http://schemas.xmlsoap.org/ws/2004/09/policy"
+ envelope.Body.RequestSecurityToken.AppliesTo.EndpointReference.Address.Text = cloudAudienceURN
+ envelope.Body.RequestSecurityToken.KeyType.Text = keyType
+ envelope.Body.RequestSecurityToken.RequestType.Text = requestType
+
+ output, err := xml.Marshal(envelope)
+ if err != nil {
+ return "", err
+ }
+
+ return string(output), nil
+}
+
+func (wte *Endpoint) BuildTokenRequestMessageWIA(cloudAudienceURN string) (string, error) {
+ return wte.buildTokenRequestMessage(authority.ATWindowsIntegrated, cloudAudienceURN, "", "")
+}
+
+func (wte *Endpoint) BuildTokenRequestMessageUsernamePassword(cloudAudienceURN string, username string, password string) (string, error) {
+ return wte.buildTokenRequestMessage(authority.ATUsernamePassword, cloudAudienceURN, username, password)
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/wstrust_mex_document.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/wstrust_mex_document.go
new file mode 100644
index 000000000..e3d19886e
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs/wstrust_mex_document.go
@@ -0,0 +1,159 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package defs
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+)
+
+//go:generate stringer -type=endpointType
+
+type endpointType int
+
+const (
+ etUnknown endpointType = iota
+ etUsernamePassword
+ etWindowsTransport
+)
+
+type wsEndpointData struct {
+ Version Version
+ EndpointType endpointType
+}
+
+const trust13Spec string = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue"
+const trust2005Spec string = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue"
+
+type MexDocument struct {
+ UsernamePasswordEndpoint Endpoint
+ WindowsTransportEndpoint Endpoint
+ policies map[string]endpointType
+ bindings map[string]wsEndpointData
+}
+
+func updateEndpoint(cached *Endpoint, found Endpoint) {
+ if cached == nil || cached.Version == TrustUnknown {
+ *cached = found
+ return
+ }
+ if (*cached).Version == Trust2005 && found.Version == Trust13 {
+ *cached = found
+ return
+ }
+}
+
+// TODO(msal): Someone needs to write tests for everything below.
+
+// NewFromDef creates a new MexDocument.
+func NewFromDef(defs Definitions) (MexDocument, error) {
+ policies, err := policies(defs)
+ if err != nil {
+ return MexDocument{}, err
+ }
+
+ bindings, err := bindings(defs, policies)
+ if err != nil {
+ return MexDocument{}, err
+ }
+
+ userPass, windows, err := endpoints(defs, bindings)
+ if err != nil {
+ return MexDocument{}, err
+ }
+
+ return MexDocument{
+ UsernamePasswordEndpoint: userPass,
+ WindowsTransportEndpoint: windows,
+ policies: policies,
+ bindings: bindings,
+ }, nil
+}
+
+func policies(defs Definitions) (map[string]endpointType, error) {
+ policies := make(map[string]endpointType, len(defs.Policy))
+
+ for _, policy := range defs.Policy {
+ if policy.ExactlyOne.All.NegotiateAuthentication.XMLName.Local != "" {
+ if policy.ExactlyOne.All.TransportBinding.SP != "" && policy.ID != "" {
+ policies["#"+policy.ID] = etWindowsTransport
+ }
+ }
+
+ if policy.ExactlyOne.All.SignedEncryptedSupportingTokens.Policy.UsernameToken.Policy.WSSUsernameToken10.XMLName.Local != "" {
+ if policy.ExactlyOne.All.TransportBinding.SP != "" && policy.ID != "" {
+ policies["#"+policy.ID] = etUsernamePassword
+ }
+ }
+ if policy.ExactlyOne.All.SignedSupportingTokens.Policy.UsernameToken.Policy.WSSUsernameToken10.XMLName.Local != "" {
+ if policy.ExactlyOne.All.TransportBinding.SP != "" && policy.ID != "" {
+ policies["#"+policy.ID] = etUsernamePassword
+ }
+ }
+ }
+
+ if len(policies) == 0 {
+ return policies, errors.New("no policies for mex document")
+ }
+
+ return policies, nil
+}
+
+func bindings(defs Definitions, policies map[string]endpointType) (map[string]wsEndpointData, error) {
+ bindings := make(map[string]wsEndpointData, len(defs.Binding))
+
+ for _, binding := range defs.Binding {
+ policyName := binding.PolicyReference.URI
+ transport := binding.Binding.Transport
+
+ if transport == "http://schemas.xmlsoap.org/soap/http" {
+ if policy, ok := policies[policyName]; ok {
+ bindingName := binding.Name
+ specVersion := binding.Operation.Operation.SoapAction
+
+ if specVersion == trust13Spec {
+ bindings[bindingName] = wsEndpointData{Trust13, policy}
+ } else if specVersion == trust2005Spec {
+ bindings[bindingName] = wsEndpointData{Trust2005, policy}
+ } else {
+ return nil, errors.New("found unknown spec version in mex document")
+ }
+ }
+ }
+ }
+ return bindings, nil
+}
+
+func endpoints(defs Definitions, bindings map[string]wsEndpointData) (userPass, windows Endpoint, err error) {
+ for _, port := range defs.Service.Port {
+ bindingName := port.Binding
+
+ index := strings.Index(bindingName, ":")
+ if index != -1 {
+ bindingName = bindingName[index+1:]
+ }
+
+ if binding, ok := bindings[bindingName]; ok {
+ url := strings.TrimSpace(port.EndpointReference.Address.Text)
+ if url == "" {
+ return Endpoint{}, Endpoint{}, fmt.Errorf("MexDocument cannot have blank URL endpoint")
+ }
+ if binding.Version == TrustUnknown {
+ return Endpoint{}, Endpoint{}, fmt.Errorf("endpoint version unknown")
+ }
+ endpoint := Endpoint{Version: binding.Version, URL: url}
+
+ switch binding.EndpointType {
+ case etUsernamePassword:
+ updateEndpoint(&userPass, endpoint)
+ case etWindowsTransport:
+ updateEndpoint(&windows, endpoint)
+ default:
+ return Endpoint{}, Endpoint{}, errors.New("found unknown port type in MEX document")
+ }
+ }
+ }
+ return userPass, windows, nil
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/wstrust.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/wstrust.go
new file mode 100644
index 000000000..47cd4c692
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/wstrust.go
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+/*
+Package wstrust provides a client for communicating with a WSTrust (https://en.wikipedia.org/wiki/WS-Trust#:~:text=WS%2DTrust%20is%20a%20WS,in%20a%20secure%20message%20exchange.)
+for the purposes of extracting metadata from the service. This data can be used to acquire
+tokens using the accesstokens.Client.GetAccessTokenFromSamlGrant() call.
+*/
+package wstrust
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+ "net/url"
+
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/internal/grant"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/wstrust/defs"
+)
+
+type xmlCaller interface {
+ XMLCall(ctx context.Context, endpoint string, headers http.Header, qv url.Values, resp interface{}) error
+ SOAPCall(ctx context.Context, endpoint, action string, headers http.Header, qv url.Values, body string, resp interface{}) error
+}
+
+type SamlTokenInfo struct {
+ AssertionType string // Should be either constants SAMLV1Grant or SAMLV2Grant.
+ Assertion string
+}
+
+// Client represents the REST calls to get tokens from token generator backends.
+type Client struct {
+ // Comm provides the HTTP transport client.
+ Comm xmlCaller
+}
+
+// TODO(msal): This allows me to call Mex without having a real Def file on line 45.
+// This would fail because policies() would not find a policy. This is easy enough to
+// fix in test data, but.... Definitions is defined with built in structs. That needs
+// to be pulled apart and until then I have this hack in.
+var newFromDef = defs.NewFromDef
+
+// Mex provides metadata about a wstrust service.
+func (c Client) Mex(ctx context.Context, federationMetadataURL string) (defs.MexDocument, error) {
+ resp := defs.Definitions{}
+ err := c.Comm.XMLCall(
+ ctx,
+ federationMetadataURL,
+ http.Header{},
+ nil,
+ &resp,
+ )
+ if err != nil {
+ return defs.MexDocument{}, err
+ }
+
+ return newFromDef(resp)
+}
+
+const (
+ SoapActionDefault = "http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue"
+
+ // Note: Commented out because this action is not supported. It was in the original code
+ // but only used in a switch where it errored. Since there was only one value, a default
+ // worked better. However, buildTokenRequestMessage() had 2005 support. I'm not actually
+ // sure what's going on here. It like we have half support. For now this is here just
+ // for documentation purposes in case we are going to add support.
+ //
+ // SoapActionWSTrust2005 = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue"
+)
+
+// SAMLTokenInfo provides SAML information that is used to generate a SAML token.
+func (c Client) SAMLTokenInfo(ctx context.Context, authParameters authority.AuthParams, cloudAudienceURN string, endpoint defs.Endpoint) (SamlTokenInfo, error) {
+ var wsTrustRequestMessage string
+ var err error
+
+ switch authParameters.AuthorizationType {
+ case authority.ATWindowsIntegrated:
+ wsTrustRequestMessage, err = endpoint.BuildTokenRequestMessageWIA(cloudAudienceURN)
+ if err != nil {
+ return SamlTokenInfo{}, err
+ }
+ case authority.ATUsernamePassword:
+ wsTrustRequestMessage, err = endpoint.BuildTokenRequestMessageUsernamePassword(
+ cloudAudienceURN, authParameters.Username, authParameters.Password)
+ if err != nil {
+ return SamlTokenInfo{}, err
+ }
+ default:
+ return SamlTokenInfo{}, fmt.Errorf("unknown auth type %v", authParameters.AuthorizationType)
+ }
+
+ var soapAction string
+ switch endpoint.Version {
+ case defs.Trust13:
+ soapAction = SoapActionDefault
+ case defs.Trust2005:
+ return SamlTokenInfo{}, errors.New("WS Trust 2005 support is not implemented")
+ default:
+ return SamlTokenInfo{}, fmt.Errorf("the SOAP endpoint for a wstrust call had an invalid version: %v", endpoint.Version)
+ }
+
+ resp := defs.SAMLDefinitions{}
+ err = c.Comm.SOAPCall(ctx, endpoint.URL, soapAction, http.Header{}, nil, wsTrustRequestMessage, &resp)
+ if err != nil {
+ return SamlTokenInfo{}, err
+ }
+
+ return c.samlAssertion(resp)
+}
+
+const (
+ samlv1Assertion = "urn:oasis:names:tc:SAML:1.0:assertion"
+ samlv2Assertion = "urn:oasis:names:tc:SAML:2.0:assertion"
+)
+
+func (c Client) samlAssertion(def defs.SAMLDefinitions) (SamlTokenInfo, error) {
+ for _, tokenResponse := range def.Body.RequestSecurityTokenResponseCollection.RequestSecurityTokenResponse {
+ token := tokenResponse.RequestedSecurityToken
+ if token.Assertion.XMLName.Local != "" {
+ assertion := token.AssertionRawXML
+
+ samlVersion := token.Assertion.Saml
+ switch samlVersion {
+ case samlv1Assertion:
+ return SamlTokenInfo{AssertionType: grant.SAMLV1, Assertion: assertion}, nil
+ case samlv2Assertion:
+ return SamlTokenInfo{AssertionType: grant.SAMLV2, Assertion: assertion}, nil
+ }
+ return SamlTokenInfo{}, fmt.Errorf("couldn't parse SAML assertion, version unknown: %q", samlVersion)
+ }
+ }
+ return SamlTokenInfo{}, errors.New("unknown WS-Trust version")
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/resolvers.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/resolvers.go
new file mode 100644
index 000000000..4030ec8d8
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/resolvers.go
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+// TODO(msal): Write some tests. The original code this came from didn't have tests and I'm too
+// tired at this point to do it. It, like many other *Manager code I found was broken because
+// they didn't have mutex protection.
+
+package oauth
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "strings"
+ "sync"
+
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority"
+)
+
+type cacheEntry struct {
+ Endpoints authority.Endpoints
+ ValidForDomainsInList map[string]bool
+}
+
+func createcacheEntry(endpoints authority.Endpoints) cacheEntry {
+ return cacheEntry{endpoints, map[string]bool{}}
+}
+
+// AuthorityEndpoint retrieves endpoints from an authority for auth and token acquisition.
+type authorityEndpoint struct {
+ rest *ops.REST
+
+ mu sync.Mutex
+ cache map[string]cacheEntry
+}
+
+// newAuthorityEndpoint is the constructor for AuthorityEndpoint.
+func newAuthorityEndpoint(rest *ops.REST) *authorityEndpoint {
+ m := &authorityEndpoint{rest: rest, cache: map[string]cacheEntry{}}
+ return m
+}
+
+// ResolveEndpoints gets the authorization and token endpoints and creates an AuthorityEndpoints instance
+func (m *authorityEndpoint) ResolveEndpoints(ctx context.Context, authorityInfo authority.Info, userPrincipalName string) (authority.Endpoints, error) {
+
+ if endpoints, found := m.cachedEndpoints(authorityInfo, userPrincipalName); found {
+ return endpoints, nil
+ }
+
+ endpoint, err := m.openIDConfigurationEndpoint(ctx, authorityInfo)
+ if err != nil {
+ return authority.Endpoints{}, err
+ }
+
+ resp, err := m.rest.Authority().GetTenantDiscoveryResponse(ctx, endpoint)
+ if err != nil {
+ return authority.Endpoints{}, err
+ }
+ if err := resp.Validate(); err != nil {
+ return authority.Endpoints{}, fmt.Errorf("ResolveEndpoints(): %w", err)
+ }
+
+ tenant := authorityInfo.Tenant
+
+ endpoints := authority.NewEndpoints(
+ strings.Replace(resp.AuthorizationEndpoint, "{tenant}", tenant, -1),
+ strings.Replace(resp.TokenEndpoint, "{tenant}", tenant, -1),
+ strings.Replace(resp.Issuer, "{tenant}", tenant, -1),
+ authorityInfo.Host)
+
+ m.addCachedEndpoints(authorityInfo, userPrincipalName, endpoints)
+
+ return endpoints, nil
+}
+
+// cachedEndpoints returns a the cached endpoints if they exists. If not, we return false.
+func (m *authorityEndpoint) cachedEndpoints(authorityInfo authority.Info, userPrincipalName string) (authority.Endpoints, bool) {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+
+ if cacheEntry, ok := m.cache[authorityInfo.CanonicalAuthorityURI]; ok {
+ if authorityInfo.AuthorityType == authority.ADFS {
+ domain, err := adfsDomainFromUpn(userPrincipalName)
+ if err == nil {
+ if _, ok := cacheEntry.ValidForDomainsInList[domain]; ok {
+ return cacheEntry.Endpoints, true
+ }
+ }
+ }
+ return cacheEntry.Endpoints, true
+ }
+ return authority.Endpoints{}, false
+}
+
+func (m *authorityEndpoint) addCachedEndpoints(authorityInfo authority.Info, userPrincipalName string, endpoints authority.Endpoints) {
+ m.mu.Lock()
+ defer m.mu.Unlock()
+
+ updatedCacheEntry := createcacheEntry(endpoints)
+
+ if authorityInfo.AuthorityType == authority.ADFS {
+ // Since we're here, we've made a call to the backend. We want to ensure we're caching
+ // the latest values from the server.
+ if cacheEntry, ok := m.cache[authorityInfo.CanonicalAuthorityURI]; ok {
+ for k := range cacheEntry.ValidForDomainsInList {
+ updatedCacheEntry.ValidForDomainsInList[k] = true
+ }
+ }
+ domain, err := adfsDomainFromUpn(userPrincipalName)
+ if err == nil {
+ updatedCacheEntry.ValidForDomainsInList[domain] = true
+ }
+ }
+
+ m.cache[authorityInfo.CanonicalAuthorityURI] = updatedCacheEntry
+}
+
+func (m *authorityEndpoint) openIDConfigurationEndpoint(ctx context.Context, authorityInfo authority.Info) (string, error) {
+ if authorityInfo.AuthorityType == authority.ADFS {
+ return fmt.Sprintf("https://%s/adfs/.well-known/openid-configuration", authorityInfo.Host), nil
+ } else if authorityInfo.AuthorityType == authority.DSTS {
+ return fmt.Sprintf("https://%s/dstsv2/%s/v2.0/.well-known/openid-configuration", authorityInfo.Host, authority.DSTSTenant), nil
+
+ } else if authorityInfo.ValidateAuthority && !authority.TrustedHost(authorityInfo.Host) {
+ resp, err := m.rest.Authority().AADInstanceDiscovery(ctx, authorityInfo)
+ if err != nil {
+ return "", err
+ }
+ return resp.TenantDiscoveryEndpoint, nil
+ } else if authorityInfo.Region != "" {
+ resp, err := m.rest.Authority().AADInstanceDiscovery(ctx, authorityInfo)
+ if err != nil {
+ return "", err
+ }
+ return resp.TenantDiscoveryEndpoint, nil
+ }
+
+ return authorityInfo.CanonicalAuthorityURI + "v2.0/.well-known/openid-configuration", nil
+}
+
+func adfsDomainFromUpn(userPrincipalName string) (string, error) {
+ parts := strings.Split(userPrincipalName, "@")
+ if len(parts) < 2 {
+ return "", errors.New("no @ present in user principal name")
+ }
+ return parts[1], nil
+}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/options/options.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/options/options.go
new file mode 100644
index 000000000..4561d72db
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/options/options.go
@@ -0,0 +1,52 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package options
+
+import (
+ "errors"
+ "fmt"
+)
+
+// CallOption implements an optional argument to a method call. See
+// https://blog.devgenius.io/go-call-option-that-can-be-used-with-multiple-methods-6c81734f3dbe
+// for an explanation of the usage pattern.
+type CallOption interface {
+ Do(any) error
+ callOption()
+}
+
+// ApplyOptions applies all the callOptions to options. options must be a pointer to a struct and
+// callOptions must be a list of objects that implement CallOption.
+func ApplyOptions[O, C any](options O, callOptions []C) error {
+ for _, o := range callOptions {
+ if t, ok := any(o).(CallOption); !ok {
+ return fmt.Errorf("unexpected option type %T", o)
+ } else if err := t.Do(options); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// NewCallOption returns a new CallOption whose Do() method calls function "f".
+func NewCallOption(f func(any) error) CallOption {
+ if f == nil {
+ // This isn't a practical concern because only an MSAL maintainer can get
+ // us here, by implementing a do-nothing option. But if someone does that,
+ // the below ensures the method invoked with the option returns an error.
+ return callOption(func(any) error {
+ return errors.New("invalid option: missing implementation")
+ })
+ }
+ return callOption(f)
+}
+
+// callOption is an adapter for a function to a CallOption
+type callOption func(any) error
+
+func (c callOption) Do(a any) error {
+ return c(a)
+}
+
+func (callOption) callOption() {}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/shared/shared.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/shared/shared.go
new file mode 100644
index 000000000..d8ab71356
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/shared/shared.go
@@ -0,0 +1,72 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+package shared
+
+import (
+ "net/http"
+ "reflect"
+ "strings"
+)
+
+const (
+ // CacheKeySeparator is used in creating the keys of the cache.
+ CacheKeySeparator = "-"
+)
+
+type Account struct {
+ HomeAccountID string `json:"home_account_id,omitempty"`
+ Environment string `json:"environment,omitempty"`
+ Realm string `json:"realm,omitempty"`
+ LocalAccountID string `json:"local_account_id,omitempty"`
+ AuthorityType string `json:"authority_type,omitempty"`
+ PreferredUsername string `json:"username,omitempty"`
+ GivenName string `json:"given_name,omitempty"`
+ FamilyName string `json:"family_name,omitempty"`
+ MiddleName string `json:"middle_name,omitempty"`
+ Name string `json:"name,omitempty"`
+ AlternativeID string `json:"alternative_account_id,omitempty"`
+ RawClientInfo string `json:"client_info,omitempty"`
+ UserAssertionHash string `json:"user_assertion_hash,omitempty"`
+
+ AdditionalFields map[string]interface{}
+}
+
+// NewAccount creates an account.
+func NewAccount(homeAccountID, env, realm, localAccountID, authorityType, username string) Account {
+ return Account{
+ HomeAccountID: homeAccountID,
+ Environment: env,
+ Realm: realm,
+ LocalAccountID: localAccountID,
+ AuthorityType: authorityType,
+ PreferredUsername: username,
+ }
+}
+
+// Key creates the key for storing accounts in the cache.
+func (acc Account) Key() string {
+ key := strings.Join([]string{acc.HomeAccountID, acc.Environment, acc.Realm}, CacheKeySeparator)
+ return strings.ToLower(key)
+}
+
+// IsZero checks the zero value of account.
+func (acc Account) IsZero() bool {
+ v := reflect.ValueOf(acc)
+ for i := 0; i < v.NumField(); i++ {
+ field := v.Field(i)
+ if !field.IsZero() {
+ switch field.Kind() {
+ case reflect.Map, reflect.Slice:
+ if field.Len() == 0 {
+ continue
+ }
+ }
+ return false
+ }
+ }
+ return true
+}
+
+// DefaultClient is our default shared HTTP client.
+var DefaultClient = &http.Client{}
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/version/version.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/version/version.go
new file mode 100644
index 000000000..eb16b405c
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/version/version.go
@@ -0,0 +1,8 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+// Package version keeps the version number of the client package.
+package version
+
+// Version is the version of this client package that is communicated to the server.
+const Version = "1.2.0"
diff --git a/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/public/public.go b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/public/public.go
new file mode 100644
index 000000000..392e5e43f
--- /dev/null
+++ b/vendor/github.com/AzureAD/microsoft-authentication-library-for-go/apps/public/public.go
@@ -0,0 +1,756 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT license.
+
+/*
+Package public provides a client for authentication of "public" applications. A "public"
+application is defined as an app that runs on client devices (android, ios, windows, linux, ...).
+These devices are "untrusted" and access resources via web APIs that must authenticate.
+*/
+package public
+
+/*
+Design note:
+
+public.Client uses client.Base as an embedded type. client.Base statically assigns its attributes
+during creation. As it doesn't have any pointers in it, anything borrowed from it, such as
+Base.AuthParams is a copy that is free to be manipulated here.
+*/
+
+// TODO(msal): This should have example code for each method on client using Go's example doc framework.
+// base usage details should be includee in the package documentation.
+
+import (
+ "context"
+ "crypto/rand"
+ "crypto/sha256"
+ "encoding/base64"
+ "errors"
+ "fmt"
+ "net/url"
+ "reflect"
+ "strconv"
+
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/cache"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/base"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/local"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/accesstokens"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/oauth/ops/authority"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/options"
+ "github.com/AzureAD/microsoft-authentication-library-for-go/apps/internal/shared"
+ "github.com/google/uuid"
+ "github.com/pkg/browser"
+)
+
+// AuthResult contains the results of one token acquisition operation.
+// For details see https://aka.ms/msal-net-authenticationresult
+type AuthResult = base.AuthResult
+
+type AuthenticationScheme = authority.AuthenticationScheme
+
+type Account = shared.Account
+
+var errNoAccount = errors.New("no account was specified with public.WithSilentAccount(), or the specified account is invalid")
+
+// clientOptions configures the Client's behavior.
+type clientOptions struct {
+ accessor cache.ExportReplace
+ authority string
+ capabilities []string
+ disableInstanceDiscovery bool
+ httpClient ops.HTTPClient
+}
+
+func (p *clientOptions) validate() error {
+ u, err := url.Parse(p.authority)
+ if err != nil {
+ return fmt.Errorf("Authority options cannot be URL parsed: %w", err)
+ }
+ if u.Scheme != "https" {
+ return fmt.Errorf("Authority(%s) did not start with https://", u.String())
+ }
+ return nil
+}
+
+// Option is an optional argument to the New constructor.
+type Option func(o *clientOptions)
+
+// WithAuthority allows for a custom authority to be set. This must be a valid https url.
+func WithAuthority(authority string) Option {
+ return func(o *clientOptions) {
+ o.authority = authority
+ }
+}
+
+// WithCache provides an accessor that will read and write authentication data to an externally managed cache.
+func WithCache(accessor cache.ExportReplace) Option {
+ return func(o *clientOptions) {
+ o.accessor = accessor
+ }
+}
+
+// WithClientCapabilities allows configuring one or more client capabilities such as "CP1"
+func WithClientCapabilities(capabilities []string) Option {
+ return func(o *clientOptions) {
+ // there's no danger of sharing the slice's underlying memory with the application because
+ // this slice is simply passed to base.WithClientCapabilities, which copies its data
+ o.capabilities = capabilities
+ }
+}
+
+// WithHTTPClient allows for a custom HTTP client to be set.
+func WithHTTPClient(httpClient ops.HTTPClient) Option {
+ return func(o *clientOptions) {
+ o.httpClient = httpClient
+ }
+}
+
+// WithInstanceDiscovery set to false to disable authority validation (to support private cloud scenarios)
+func WithInstanceDiscovery(enabled bool) Option {
+ return func(o *clientOptions) {
+ o.disableInstanceDiscovery = !enabled
+ }
+}
+
+// Client is a representation of authentication client for public applications as defined in the
+// package doc. For more information, visit https://docs.microsoft.com/azure/active-directory/develop/msal-client-applications.
+type Client struct {
+ base base.Client
+}
+
+// New is the constructor for Client.
+func New(clientID string, options ...Option) (Client, error) {
+ opts := clientOptions{
+ authority: base.AuthorityPublicCloud,
+ httpClient: shared.DefaultClient,
+ }
+
+ for _, o := range options {
+ o(&opts)
+ }
+ if err := opts.validate(); err != nil {
+ return Client{}, err
+ }
+
+ base, err := base.New(clientID, opts.authority, oauth.New(opts.httpClient), base.WithCacheAccessor(opts.accessor), base.WithClientCapabilities(opts.capabilities), base.WithInstanceDiscovery(!opts.disableInstanceDiscovery))
+ if err != nil {
+ return Client{}, err
+ }
+ return Client{base}, nil
+}
+
+// authCodeURLOptions contains options for AuthCodeURL
+type authCodeURLOptions struct {
+ claims, loginHint, tenantID, domainHint string
+}
+
+// AuthCodeURLOption is implemented by options for AuthCodeURL
+type AuthCodeURLOption interface {
+ authCodeURLOption()
+}
+
+// AuthCodeURL creates a URL used to acquire an authorization code.
+//
+// Options: [WithClaims], [WithDomainHint], [WithLoginHint], [WithTenantID]
+func (pca Client) AuthCodeURL(ctx context.Context, clientID, redirectURI string, scopes []string, opts ...AuthCodeURLOption) (string, error) {
+ o := authCodeURLOptions{}
+ if err := options.ApplyOptions(&o, opts); err != nil {
+ return "", err
+ }
+ ap, err := pca.base.AuthParams.WithTenant(o.tenantID)
+ if err != nil {
+ return "", err
+ }
+ ap.Claims = o.claims
+ ap.LoginHint = o.loginHint
+ ap.DomainHint = o.domainHint
+ return pca.base.AuthCodeURL(ctx, clientID, redirectURI, scopes, ap)
+}
+
+// WithClaims sets additional claims to request for the token, such as those required by conditional access policies.
+// Use this option when Azure AD returned a claims challenge for a prior request. The argument must be decoded.
+// This option is valid for any token acquisition method.
+func WithClaims(claims string) interface {
+ AcquireByAuthCodeOption
+ AcquireByDeviceCodeOption
+ AcquireByUsernamePasswordOption
+ AcquireInteractiveOption
+ AcquireSilentOption
+ AuthCodeURLOption
+ options.CallOption
+} {
+ return struct {
+ AcquireByAuthCodeOption
+ AcquireByDeviceCodeOption
+ AcquireByUsernamePasswordOption
+ AcquireInteractiveOption
+ AcquireSilentOption
+ AuthCodeURLOption
+ options.CallOption
+ }{
+ CallOption: options.NewCallOption(
+ func(a any) error {
+ switch t := a.(type) {
+ case *acquireTokenByAuthCodeOptions:
+ t.claims = claims
+ case *acquireTokenByDeviceCodeOptions:
+ t.claims = claims
+ case *acquireTokenByUsernamePasswordOptions:
+ t.claims = claims
+ case *acquireTokenSilentOptions:
+ t.claims = claims
+ case *authCodeURLOptions:
+ t.claims = claims
+ case *interactiveAuthOptions:
+ t.claims = claims
+ default:
+ return fmt.Errorf("unexpected options type %T", a)
+ }
+ return nil
+ },
+ ),
+ }
+}
+
+// WithAuthenticationScheme is an extensibility mechanism designed to be used only by Azure Arc for proof of possession access tokens.
+func WithAuthenticationScheme(authnScheme AuthenticationScheme) interface {
+ AcquireSilentOption
+ AcquireInteractiveOption
+ AcquireByUsernamePasswordOption
+ options.CallOption
+} {
+ return struct {
+ AcquireSilentOption
+ AcquireInteractiveOption
+ AcquireByUsernamePasswordOption
+ options.CallOption
+ }{
+ CallOption: options.NewCallOption(
+ func(a any) error {
+ switch t := a.(type) {
+ case *acquireTokenSilentOptions:
+ t.authnScheme = authnScheme
+ case *interactiveAuthOptions:
+ t.authnScheme = authnScheme
+ case *acquireTokenByUsernamePasswordOptions:
+ t.authnScheme = authnScheme
+ default:
+ return fmt.Errorf("unexpected options type %T", a)
+ }
+ return nil
+ },
+ ),
+ }
+}
+
+// WithTenantID specifies a tenant for a single authentication. It may be different than the tenant set in [New] by [WithAuthority].
+// This option is valid for any token acquisition method.
+func WithTenantID(tenantID string) interface {
+ AcquireByAuthCodeOption
+ AcquireByDeviceCodeOption
+ AcquireByUsernamePasswordOption
+ AcquireInteractiveOption
+ AcquireSilentOption
+ AuthCodeURLOption
+ options.CallOption
+} {
+ return struct {
+ AcquireByAuthCodeOption
+ AcquireByDeviceCodeOption
+ AcquireByUsernamePasswordOption
+ AcquireInteractiveOption
+ AcquireSilentOption
+ AuthCodeURLOption
+ options.CallOption
+ }{
+ CallOption: options.NewCallOption(
+ func(a any) error {
+ switch t := a.(type) {
+ case *acquireTokenByAuthCodeOptions:
+ t.tenantID = tenantID
+ case *acquireTokenByDeviceCodeOptions:
+ t.tenantID = tenantID
+ case *acquireTokenByUsernamePasswordOptions:
+ t.tenantID = tenantID
+ case *acquireTokenSilentOptions:
+ t.tenantID = tenantID
+ case *authCodeURLOptions:
+ t.tenantID = tenantID
+ case *interactiveAuthOptions:
+ t.tenantID = tenantID
+ default:
+ return fmt.Errorf("unexpected options type %T", a)
+ }
+ return nil
+ },
+ ),
+ }
+}
+
+// acquireTokenSilentOptions are all the optional settings to an AcquireTokenSilent() call.
+// These are set by using various AcquireTokenSilentOption functions.
+type acquireTokenSilentOptions struct {
+ account Account
+ claims, tenantID string
+ authnScheme AuthenticationScheme
+}
+
+// AcquireSilentOption is implemented by options for AcquireTokenSilent
+type AcquireSilentOption interface {
+ acquireSilentOption()
+}
+
+// WithSilentAccount uses the passed account during an AcquireTokenSilent() call.
+func WithSilentAccount(account Account) interface {
+ AcquireSilentOption
+ options.CallOption
+} {
+ return struct {
+ AcquireSilentOption
+ options.CallOption
+ }{
+ CallOption: options.NewCallOption(
+ func(a any) error {
+ switch t := a.(type) {
+ case *acquireTokenSilentOptions:
+ t.account = account
+ default:
+ return fmt.Errorf("unexpected options type %T", a)
+ }
+ return nil
+ },
+ ),
+ }
+}
+
+// AcquireTokenSilent acquires a token from either the cache or using a refresh token.
+//
+// Options: [WithClaims], [WithSilentAccount], [WithTenantID]
+func (pca Client) AcquireTokenSilent(ctx context.Context, scopes []string, opts ...AcquireSilentOption) (AuthResult, error) {
+ o := acquireTokenSilentOptions{}
+ if err := options.ApplyOptions(&o, opts); err != nil {
+ return AuthResult{}, err
+ }
+ // an account is required to find user tokens in the cache
+ if reflect.ValueOf(o.account).IsZero() {
+ return AuthResult{}, errNoAccount
+ }
+
+ silentParameters := base.AcquireTokenSilentParameters{
+ Scopes: scopes,
+ Account: o.account,
+ Claims: o.claims,
+ RequestType: accesstokens.ATPublic,
+ IsAppCache: false,
+ TenantID: o.tenantID,
+ AuthnScheme: o.authnScheme,
+ }
+
+ return pca.base.AcquireTokenSilent(ctx, silentParameters)
+}
+
+// acquireTokenByUsernamePasswordOptions contains optional configuration for AcquireTokenByUsernamePassword
+type acquireTokenByUsernamePasswordOptions struct {
+ claims, tenantID string
+ authnScheme AuthenticationScheme
+}
+
+// AcquireByUsernamePasswordOption is implemented by options for AcquireTokenByUsernamePassword
+type AcquireByUsernamePasswordOption interface {
+ acquireByUsernamePasswordOption()
+}
+
+// AcquireTokenByUsernamePassword acquires a security token from the authority, via Username/Password Authentication.
+// NOTE: this flow is NOT recommended.
+//
+// Options: [WithClaims], [WithTenantID]
+func (pca Client) AcquireTokenByUsernamePassword(ctx context.Context, scopes []string, username, password string, opts ...AcquireByUsernamePasswordOption) (AuthResult, error) {
+ o := acquireTokenByUsernamePasswordOptions{}
+ if err := options.ApplyOptions(&o, opts); err != nil {
+ return AuthResult{}, err
+ }
+ authParams, err := pca.base.AuthParams.WithTenant(o.tenantID)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ authParams.Scopes = scopes
+ authParams.AuthorizationType = authority.ATUsernamePassword
+ authParams.Claims = o.claims
+ authParams.Username = username
+ authParams.Password = password
+ if o.authnScheme != nil {
+ authParams.AuthnScheme = o.authnScheme
+ }
+
+ token, err := pca.base.Token.UsernamePassword(ctx, authParams)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ return pca.base.AuthResultFromToken(ctx, authParams, token, true)
+}
+
+type DeviceCodeResult = accesstokens.DeviceCodeResult
+
+// DeviceCode provides the results of the device code flows first stage (containing the code)
+// that must be entered on the second device and provides a method to retrieve the AuthenticationResult
+// once that code has been entered and verified.
+type DeviceCode struct {
+ // Result holds the information about the device code (such as the code).
+ Result DeviceCodeResult
+
+ authParams authority.AuthParams
+ client Client
+ dc oauth.DeviceCode
+}
+
+// AuthenticationResult retreives the AuthenticationResult once the user enters the code
+// on the second device. Until then it blocks until the .AcquireTokenByDeviceCode() context
+// is cancelled or the token expires.
+func (d DeviceCode) AuthenticationResult(ctx context.Context) (AuthResult, error) {
+ token, err := d.dc.Token(ctx)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ return d.client.base.AuthResultFromToken(ctx, d.authParams, token, true)
+}
+
+// acquireTokenByDeviceCodeOptions contains optional configuration for AcquireTokenByDeviceCode
+type acquireTokenByDeviceCodeOptions struct {
+ claims, tenantID string
+}
+
+// AcquireByDeviceCodeOption is implemented by options for AcquireTokenByDeviceCode
+type AcquireByDeviceCodeOption interface {
+ acquireByDeviceCodeOptions()
+}
+
+// AcquireTokenByDeviceCode acquires a security token from the authority, by acquiring a device code and using that to acquire the token.
+// Users need to create an AcquireTokenDeviceCodeParameters instance and pass it in.
+//
+// Options: [WithClaims], [WithTenantID]
+func (pca Client) AcquireTokenByDeviceCode(ctx context.Context, scopes []string, opts ...AcquireByDeviceCodeOption) (DeviceCode, error) {
+ o := acquireTokenByDeviceCodeOptions{}
+ if err := options.ApplyOptions(&o, opts); err != nil {
+ return DeviceCode{}, err
+ }
+ authParams, err := pca.base.AuthParams.WithTenant(o.tenantID)
+ if err != nil {
+ return DeviceCode{}, err
+ }
+ authParams.Scopes = scopes
+ authParams.AuthorizationType = authority.ATDeviceCode
+ authParams.Claims = o.claims
+
+ dc, err := pca.base.Token.DeviceCode(ctx, authParams)
+ if err != nil {
+ return DeviceCode{}, err
+ }
+
+ return DeviceCode{Result: dc.Result, authParams: authParams, client: pca, dc: dc}, nil
+}
+
+// acquireTokenByAuthCodeOptions contains the optional parameters used to acquire an access token using the authorization code flow.
+type acquireTokenByAuthCodeOptions struct {
+ challenge, claims, tenantID string
+}
+
+// AcquireByAuthCodeOption is implemented by options for AcquireTokenByAuthCode
+type AcquireByAuthCodeOption interface {
+ acquireByAuthCodeOption()
+}
+
+// WithChallenge allows you to provide a code for the .AcquireTokenByAuthCode() call.
+func WithChallenge(challenge string) interface {
+ AcquireByAuthCodeOption
+ options.CallOption
+} {
+ return struct {
+ AcquireByAuthCodeOption
+ options.CallOption
+ }{
+ CallOption: options.NewCallOption(
+ func(a any) error {
+ switch t := a.(type) {
+ case *acquireTokenByAuthCodeOptions:
+ t.challenge = challenge
+ default:
+ return fmt.Errorf("unexpected options type %T", a)
+ }
+ return nil
+ },
+ ),
+ }
+}
+
+// AcquireTokenByAuthCode is a request to acquire a security token from the authority, using an authorization code.
+// The specified redirect URI must be the same URI that was used when the authorization code was requested.
+//
+// Options: [WithChallenge], [WithClaims], [WithTenantID]
+func (pca Client) AcquireTokenByAuthCode(ctx context.Context, code string, redirectURI string, scopes []string, opts ...AcquireByAuthCodeOption) (AuthResult, error) {
+ o := acquireTokenByAuthCodeOptions{}
+ if err := options.ApplyOptions(&o, opts); err != nil {
+ return AuthResult{}, err
+ }
+
+ params := base.AcquireTokenAuthCodeParameters{
+ Scopes: scopes,
+ Code: code,
+ Challenge: o.challenge,
+ Claims: o.claims,
+ AppType: accesstokens.ATPublic,
+ RedirectURI: redirectURI,
+ TenantID: o.tenantID,
+ }
+
+ return pca.base.AcquireTokenByAuthCode(ctx, params)
+}
+
+// Accounts gets all the accounts in the token cache.
+// If there are no accounts in the cache the returned slice is empty.
+func (pca Client) Accounts(ctx context.Context) ([]Account, error) {
+ return pca.base.AllAccounts(ctx)
+}
+
+// RemoveAccount signs the account out and forgets account from token cache.
+func (pca Client) RemoveAccount(ctx context.Context, account Account) error {
+ return pca.base.RemoveAccount(ctx, account)
+}
+
+// interactiveAuthOptions contains the optional parameters used to acquire an access token for interactive auth code flow.
+type interactiveAuthOptions struct {
+ claims, domainHint, loginHint, redirectURI, tenantID string
+ openURL func(url string) error
+ authnScheme AuthenticationScheme
+}
+
+// AcquireInteractiveOption is implemented by options for AcquireTokenInteractive
+type AcquireInteractiveOption interface {
+ acquireInteractiveOption()
+}
+
+// WithLoginHint pre-populates the login prompt with a username.
+func WithLoginHint(username string) interface {
+ AcquireInteractiveOption
+ AuthCodeURLOption
+ options.CallOption
+} {
+ return struct {
+ AcquireInteractiveOption
+ AuthCodeURLOption
+ options.CallOption
+ }{
+ CallOption: options.NewCallOption(
+ func(a any) error {
+ switch t := a.(type) {
+ case *authCodeURLOptions:
+ t.loginHint = username
+ case *interactiveAuthOptions:
+ t.loginHint = username
+ default:
+ return fmt.Errorf("unexpected options type %T", a)
+ }
+ return nil
+ },
+ ),
+ }
+}
+
+// WithDomainHint adds the IdP domain as domain_hint query parameter in the auth url.
+func WithDomainHint(domain string) interface {
+ AcquireInteractiveOption
+ AuthCodeURLOption
+ options.CallOption
+} {
+ return struct {
+ AcquireInteractiveOption
+ AuthCodeURLOption
+ options.CallOption
+ }{
+ CallOption: options.NewCallOption(
+ func(a any) error {
+ switch t := a.(type) {
+ case *authCodeURLOptions:
+ t.domainHint = domain
+ case *interactiveAuthOptions:
+ t.domainHint = domain
+ default:
+ return fmt.Errorf("unexpected options type %T", a)
+ }
+ return nil
+ },
+ ),
+ }
+}
+
+// WithRedirectURI sets a port for the local server used in interactive authentication, for
+// example http://localhost:port. All URI components other than the port are ignored.
+func WithRedirectURI(redirectURI string) interface {
+ AcquireInteractiveOption
+ options.CallOption
+} {
+ return struct {
+ AcquireInteractiveOption
+ options.CallOption
+ }{
+ CallOption: options.NewCallOption(
+ func(a any) error {
+ switch t := a.(type) {
+ case *interactiveAuthOptions:
+ t.redirectURI = redirectURI
+ default:
+ return fmt.Errorf("unexpected options type %T", a)
+ }
+ return nil
+ },
+ ),
+ }
+}
+
+// WithOpenURL allows you to provide a function to open the browser to complete the interactive login, instead of launching the system default browser.
+func WithOpenURL(openURL func(url string) error) interface {
+ AcquireInteractiveOption
+ options.CallOption
+} {
+ return struct {
+ AcquireInteractiveOption
+ options.CallOption
+ }{
+ CallOption: options.NewCallOption(
+ func(a any) error {
+ switch t := a.(type) {
+ case *interactiveAuthOptions:
+ t.openURL = openURL
+ default:
+ return fmt.Errorf("unexpected options type %T", a)
+ }
+ return nil
+ },
+ ),
+ }
+}
+
+// AcquireTokenInteractive acquires a security token from the authority using the default web browser to select the account.
+// https://docs.microsoft.com/en-us/azure/active-directory/develop/msal-authentication-flows#interactive-and-non-interactive-authentication
+//
+// Options: [WithDomainHint], [WithLoginHint], [WithOpenURL], [WithRedirectURI], [WithTenantID]
+func (pca Client) AcquireTokenInteractive(ctx context.Context, scopes []string, opts ...AcquireInteractiveOption) (AuthResult, error) {
+ o := interactiveAuthOptions{}
+ if err := options.ApplyOptions(&o, opts); err != nil {
+ return AuthResult{}, err
+ }
+ // the code verifier is a random 32-byte sequence that's been base-64 encoded without padding.
+ // it's used to prevent MitM attacks during auth code flow, see https://tools.ietf.org/html/rfc7636
+ cv, challenge, err := codeVerifier()
+ if err != nil {
+ return AuthResult{}, err
+ }
+ var redirectURL *url.URL
+ if o.redirectURI != "" {
+ redirectURL, err = url.Parse(o.redirectURI)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ }
+ if o.openURL == nil {
+ o.openURL = browser.OpenURL
+ }
+ authParams, err := pca.base.AuthParams.WithTenant(o.tenantID)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ authParams.Scopes = scopes
+ authParams.AuthorizationType = authority.ATInteractive
+ authParams.Claims = o.claims
+ authParams.CodeChallenge = challenge
+ authParams.CodeChallengeMethod = "S256"
+ authParams.LoginHint = o.loginHint
+ authParams.DomainHint = o.domainHint
+ authParams.State = uuid.New().String()
+ authParams.Prompt = "select_account"
+ if o.authnScheme != nil {
+ authParams.AuthnScheme = o.authnScheme
+ }
+ res, err := pca.browserLogin(ctx, redirectURL, authParams, o.openURL)
+ if err != nil {
+ return AuthResult{}, err
+ }
+ authParams.Redirecturi = res.redirectURI
+
+ req, err := accesstokens.NewCodeChallengeRequest(authParams, accesstokens.ATPublic, nil, res.authCode, cv)
+ if err != nil {
+ return AuthResult{}, err
+ }
+
+ token, err := pca.base.Token.AuthCode(ctx, req)
+ if err != nil {
+ return AuthResult{}, err
+ }
+
+ return pca.base.AuthResultFromToken(ctx, authParams, token, true)
+}
+
+type interactiveAuthResult struct {
+ authCode string
+ redirectURI string
+}
+
+// parses the port number from the provided URL.
+// returns 0 if nil or no port is specified.
+func parsePort(u *url.URL) (int, error) {
+ if u == nil {
+ return 0, nil
+ }
+ p := u.Port()
+ if p == "" {
+ return 0, nil
+ }
+ return strconv.Atoi(p)
+}
+
+// browserLogin calls openURL and waits for a user to log in
+func (pca Client) browserLogin(ctx context.Context, redirectURI *url.URL, params authority.AuthParams, openURL func(string) error) (interactiveAuthResult, error) {
+ // start local redirect server so login can call us back
+ port, err := parsePort(redirectURI)
+ if err != nil {
+ return interactiveAuthResult{}, err
+ }
+ srv, err := local.New(params.State, port)
+ if err != nil {
+ return interactiveAuthResult{}, err
+ }
+ defer srv.Shutdown()
+ params.Scopes = accesstokens.AppendDefaultScopes(params)
+ authURL, err := pca.base.AuthCodeURL(ctx, params.ClientID, srv.Addr, params.Scopes, params)
+ if err != nil {
+ return interactiveAuthResult{}, err
+ }
+ // open browser window so user can select credentials
+ if err := openURL(authURL); err != nil {
+ return interactiveAuthResult{}, err
+ }
+ // now wait until the logic calls us back
+ res := srv.Result(ctx)
+ if res.Err != nil {
+ return interactiveAuthResult{}, res.Err
+ }
+ return interactiveAuthResult{
+ authCode: res.Code,
+ redirectURI: srv.Addr,
+ }, nil
+}
+
+// creates a code verifier string along with its SHA256 hash which
+// is used as the challenge when requesting an auth code.
+// used in interactive auth flow for PKCE.
+func codeVerifier() (codeVerifier string, challenge string, err error) {
+ cvBytes := make([]byte, 32)
+ if _, err = rand.Read(cvBytes); err != nil {
+ return
+ }
+ codeVerifier = base64.RawURLEncoding.EncodeToString(cvBytes)
+ // for PKCE, create a hash of the code verifier
+ cvh := sha256.Sum256([]byte(codeVerifier))
+ challenge = base64.RawURLEncoding.EncodeToString(cvh[:])
+ return
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/LICENSE b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/LICENSE
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/LICENSE
@@ -0,0 +1,202 @@
+
+ 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/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/README.md b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/README.md
new file mode 100644
index 000000000..9515ee520
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/README.md
@@ -0,0 +1,3 @@
+# GCP Resource detection library
+
+This is a library intended to be used by Upstream OpenTelemetry resource detectors. It exists within this repository to allow for integration testing of the detection functions in real GCP environments.
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/app_engine.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/app_engine.go
new file mode 100644
index 000000000..9ce7d96fe
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/app_engine.go
@@ -0,0 +1,78 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.
+
+package gcp
+
+import "context"
+
+const (
+ // See https://cloud.google.com/appengine/docs/flexible/python/migrating#modules
+ // for the environment variables available in GAE environments.
+ gaeServiceEnv = "GAE_SERVICE"
+ gaeVersionEnv = "GAE_VERSION"
+ gaeInstanceEnv = "GAE_INSTANCE"
+ gaeEnv = "GAE_ENV"
+ gaeStandard = "standard"
+)
+
+func (d *Detector) onAppEngineStandard() bool {
+ // See https://cloud.google.com/appengine/docs/standard/go111/runtime#environment_variables.
+ env, found := d.os.LookupEnv(gaeEnv)
+ return found && env == gaeStandard
+}
+
+func (d *Detector) onAppEngine() bool {
+ _, found := d.os.LookupEnv(gaeServiceEnv)
+ return found
+}
+
+// AppEngineServiceName returns the service name of the app engine service.
+func (d *Detector) AppEngineServiceName() (string, error) {
+ if name, found := d.os.LookupEnv(gaeServiceEnv); found {
+ return name, nil
+ }
+ return "", errEnvVarNotFound
+}
+
+// AppEngineServiceVersion returns the service version of the app engine service.
+func (d *Detector) AppEngineServiceVersion() (string, error) {
+ if version, found := d.os.LookupEnv(gaeVersionEnv); found {
+ return version, nil
+ }
+ return "", errEnvVarNotFound
+}
+
+// AppEngineServiceInstance returns the service instance of the app engine service.
+func (d *Detector) AppEngineServiceInstance() (string, error) {
+ if instanceID, found := d.os.LookupEnv(gaeInstanceEnv); found {
+ return instanceID, nil
+ }
+ return "", errEnvVarNotFound
+}
+
+// AppEngineFlexAvailabilityZoneAndRegion returns the zone and region in which this program is running.
+func (d *Detector) AppEngineFlexAvailabilityZoneAndRegion() (string, string, error) {
+ // The GCE metadata server is available on App Engine Flex.
+ return d.GCEAvailabilityZoneAndRegion()
+}
+
+// AppEngineStandardAvailabilityZone returns the zone the app engine service is running in.
+func (d *Detector) AppEngineStandardAvailabilityZone() (string, error) {
+ return d.metadata.ZoneWithContext(context.TODO())
+}
+
+// AppEngineStandardCloudRegion returns the region the app engine service is running in.
+func (d *Detector) AppEngineStandardCloudRegion() (string, error) {
+ return d.FaaSCloudRegion()
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/bms.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/bms.go
new file mode 100644
index 000000000..d3992a4f7
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/bms.go
@@ -0,0 +1,55 @@
+// Copyright 2024 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.
+
+package gcp
+
+const (
+ bmsProjectIDEnv = "BMS_PROJECT_ID"
+ bmsRegionEnv = "BMS_REGION"
+ bmsInstanceIDEnv = "BMS_INSTANCE_ID"
+)
+
+// onBareMetalSolution checks if the code is running on a Google Cloud Bare Metal Solution (BMS) by verifying
+// the presence and non-empty values of BMS_PROJECT_ID, BMS_REGION, and BMS_INSTANCE_ID environment variables.
+// For more information on Google Cloud Bare Metal Solution, see: https://cloud.google.com/bare-metal/docs
+func (d *Detector) onBareMetalSolution() bool {
+ projectID, projectIDExists := d.os.LookupEnv(bmsProjectIDEnv)
+ region, regionExists := d.os.LookupEnv(bmsRegionEnv)
+ instanceID, instanceIDExists := d.os.LookupEnv(bmsInstanceIDEnv)
+ return projectIDExists && regionExists && instanceIDExists && projectID != "" && region != "" && instanceID != ""
+}
+
+// BareMetalSolutionInstanceID returns the instance ID from the BMS_INSTANCE_ID environment variable.
+func (d *Detector) BareMetalSolutionInstanceID() (string, error) {
+ if instanceID, found := d.os.LookupEnv(bmsInstanceIDEnv); found {
+ return instanceID, nil
+ }
+ return "", errEnvVarNotFound
+}
+
+// BareMetalSolutionCloudRegion returns the region from the BMS_REGION environment variable.
+func (d *Detector) BareMetalSolutionCloudRegion() (string, error) {
+ if region, found := d.os.LookupEnv(bmsRegionEnv); found {
+ return region, nil
+ }
+ return "", errEnvVarNotFound
+}
+
+// BareMetalSolutionProjectID returns the project ID from the BMS_PROJECT_ID environment variable.
+func (d *Detector) BareMetalSolutionProjectID() (string, error) {
+ if project, found := d.os.LookupEnv(bmsProjectIDEnv); found {
+ return project, nil
+ }
+ return "", errEnvVarNotFound
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/detector.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/detector.go
new file mode 100644
index 000000000..4eac3c74b
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/detector.go
@@ -0,0 +1,101 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.
+
+package gcp
+
+import (
+ "context"
+ "errors"
+ "os"
+ "strings"
+
+ "cloud.google.com/go/compute/metadata"
+)
+
+var errEnvVarNotFound = errors.New("environment variable not found")
+
+// NewDetector returns a *Detector which can get detect the platform,
+// and fetch attributes of the platform on which it is running.
+func NewDetector() *Detector {
+ return &Detector{metadata: metadata.NewClient(nil), os: realOSProvider{}}
+}
+
+type Platform int64
+
+const (
+ UnknownPlatform Platform = iota
+ GKE
+ GCE
+ CloudRun
+ CloudRunJob
+ CloudFunctions
+ AppEngineStandard
+ AppEngineFlex
+ BareMetalSolution
+)
+
+// CloudPlatform returns the platform on which this program is running.
+func (d *Detector) CloudPlatform() Platform {
+ switch {
+ case d.onBareMetalSolution():
+ return BareMetalSolution
+ case d.onGKE():
+ return GKE
+ case d.onCloudFunctions():
+ return CloudFunctions
+ case d.onCloudRun():
+ return CloudRun
+ case d.onCloudRunJob():
+ return CloudRunJob
+ case d.onAppEngineStandard():
+ return AppEngineStandard
+ case d.onAppEngine():
+ return AppEngineFlex
+ case d.onGCE():
+ return GCE
+ }
+ return UnknownPlatform
+}
+
+// ProjectID returns the ID of the project in which this program is running.
+func (d *Detector) ProjectID() (string, error) {
+ // N.B. d.metadata.ProjectIDWithContext(context.TODO()) is cached globally, so if we use it here it's untestable.
+ s, err := d.metadata.GetWithContext(context.TODO(), "project/project-id")
+ return strings.TrimSpace(s), err
+}
+
+// instanceID returns the ID of the project in which this program is running.
+func (d *Detector) instanceID() (string, error) {
+ // N.B. d.metadata.InstanceIDWithContext(context.TODO()) is cached globally, so if we use it here it's untestable.
+ s, err := d.metadata.GetWithContext(context.TODO(), "instance/id")
+ return strings.TrimSpace(s), err
+}
+
+// Detector collects resource information for all GCP platforms.
+type Detector struct {
+ metadata *metadata.Client
+ os osProvider
+}
+
+// osProvider contains the subset of the os package functions used by.
+type osProvider interface {
+ LookupEnv(string) (string, bool)
+}
+
+// realOSProvider uses the os package to lookup env vars.
+type realOSProvider struct{}
+
+func (realOSProvider) LookupEnv(env string) (string, bool) {
+ return os.LookupEnv(env)
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/faas.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/faas.go
new file mode 100644
index 000000000..f137b1fae
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/faas.go
@@ -0,0 +1,106 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.
+
+package gcp
+
+import (
+ "context"
+ "strings"
+)
+
+const (
+ // Cloud Functions env vars:
+ // https://cloud.google.com/functions/docs/configuring/env-var#newer_runtimes
+ //
+ // Cloud Run env vars:
+ // https://cloud.google.com/run/docs/container-contract#services-env-vars
+ //
+ // Cloud Run jobs env vars:
+ // https://cloud.google.com/run/docs/container-contract#jobs-env-vars
+ cloudFunctionsTargetEnv = "FUNCTION_TARGET"
+ cloudRunConfigurationEnv = "K_CONFIGURATION"
+ cloudRunJobsEnv = "CLOUD_RUN_JOB"
+ faasServiceEnv = "K_SERVICE"
+ faasRevisionEnv = "K_REVISION"
+ cloudRunJobExecutionEnv = "CLOUD_RUN_EXECUTION"
+ cloudRunJobTaskIndexEnv = "CLOUD_RUN_TASK_INDEX"
+ regionMetadataAttr = "instance/region"
+)
+
+func (d *Detector) onCloudFunctions() bool {
+ _, found := d.os.LookupEnv(cloudFunctionsTargetEnv)
+ return found
+}
+
+func (d *Detector) onCloudRun() bool {
+ _, found := d.os.LookupEnv(cloudRunConfigurationEnv)
+ return found
+}
+
+func (d *Detector) onCloudRunJob() bool {
+ _, found := d.os.LookupEnv(cloudRunJobsEnv)
+ return found
+}
+
+// FaaSName returns the name of the Cloud Run, Cloud Run jobs or Cloud Functions service.
+func (d *Detector) FaaSName() (string, error) {
+ if name, found := d.os.LookupEnv(faasServiceEnv); found {
+ return name, nil
+ }
+ if name, found := d.os.LookupEnv(cloudRunJobsEnv); found {
+ return name, nil
+ }
+ return "", errEnvVarNotFound
+}
+
+// FaaSVersion returns the revision of the Cloud Run or Cloud Functions service.
+func (d *Detector) FaaSVersion() (string, error) {
+ if version, found := d.os.LookupEnv(faasRevisionEnv); found {
+ return version, nil
+ }
+ return "", errEnvVarNotFound
+}
+
+// CloudRunJobExecution returns the execution id of the Cloud Run jobs.
+func (d *Detector) CloudRunJobExecution() (string, error) {
+ if eid, found := d.os.LookupEnv(cloudRunJobExecutionEnv); found {
+ return eid, nil
+ }
+ return "", errEnvVarNotFound
+}
+
+// CloudRunJobTaskIndex returns the task index for the execution of the Cloud Run jobs.
+func (d *Detector) CloudRunJobTaskIndex() (string, error) {
+ if tidx, found := d.os.LookupEnv(cloudRunJobTaskIndexEnv); found {
+ return tidx, nil
+ }
+ return "", errEnvVarNotFound
+}
+
+// FaaSID returns the instance id of the Cloud Run or Cloud Function.
+func (d *Detector) FaaSID() (string, error) {
+ return d.instanceID()
+}
+
+// FaaSCloudRegion detects region from the metadata server.
+// It is in the format /projects//regions/.
+//
+// https://cloud.google.com/run/docs/reference/container-contract#metadata-server
+func (d *Detector) FaaSCloudRegion() (string, error) {
+ region, err := d.metadata.GetWithContext(context.TODO(), regionMetadataAttr)
+ if err != nil {
+ return "", err
+ }
+ return region[strings.LastIndex(region, "/")+1:], nil
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gce.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gce.go
new file mode 100644
index 000000000..794cfdf03
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gce.go
@@ -0,0 +1,117 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.
+
+package gcp
+
+import (
+ "context"
+ "fmt"
+ "regexp"
+ "strings"
+
+ "cloud.google.com/go/compute/metadata"
+)
+
+// See the available GCE instance metadata:
+// https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys#instance-metadata
+const machineTypeMetadataAttr = "instance/machine-type"
+
+// https://cloud.google.com/compute/docs/instance-groups/getting-info-about-migs#checking_if_a_vm_instance_is_part_of_a_mig
+const createdByInstanceAttr = "created-by"
+
+func (d *Detector) onGCE() bool {
+ _, err := d.metadata.GetWithContext(context.TODO(), machineTypeMetadataAttr)
+ return err == nil
+}
+
+// GCEHostType returns the machine type of the instance on which this program is running.
+func (d *Detector) GCEHostType() (string, error) {
+ return d.metadata.GetWithContext(context.TODO(), machineTypeMetadataAttr)
+}
+
+// GCEHostID returns the instance ID of the instance on which this program is running.
+func (d *Detector) GCEHostID() (string, error) {
+ return d.instanceID()
+}
+
+// GCEHostName returns the instance name of the instance on which this program is running.
+// Recommended to use GCEInstanceName() or GCEInstanceHostname() to more accurately reflect which
+// value is returned.
+func (d *Detector) GCEHostName() (string, error) {
+ return d.metadata.InstanceNameWithContext(context.TODO())
+}
+
+// GCEInstanceName returns the instance name of the instance on which this program is running.
+// This is the value visible in the Cloud Console UI, and the prefix for the default hostname
+// of the instance as defined by the default internal DNS name (see https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names).
+func (d *Detector) GCEInstanceName() (string, error) {
+ return d.metadata.InstanceNameWithContext(context.TODO())
+}
+
+// GCEInstanceHostname returns the full value of the default or custom hostname of the instance
+// on which this program is running. See https://cloud.google.com/compute/docs/instances/custom-hostname-vm.
+func (d *Detector) GCEInstanceHostname() (string, error) {
+ return d.metadata.HostnameWithContext(context.TODO())
+}
+
+// GCEAvailabilityZoneAndRegion returns the zone and region in which this program is running.
+func (d *Detector) GCEAvailabilityZoneAndRegion() (string, string, error) {
+ zone, err := d.metadata.ZoneWithContext(context.TODO())
+ if err != nil {
+ return "", "", err
+ }
+ if zone == "" {
+ return "", "", fmt.Errorf("no zone detected from GCE metadata server")
+ }
+ splitZone := strings.SplitN(zone, "-", 3)
+ if len(splitZone) != 3 {
+ return "", "", fmt.Errorf("zone was not in the expected format: country-region-zone. Got %v", zone)
+ }
+ return zone, strings.Join(splitZone[0:2], "-"), nil
+}
+
+type ManagedInstanceGroup struct {
+ Name string
+ Location string
+ Type LocationType
+}
+
+var createdByMIGRE = regexp.MustCompile(`^projects/[^/]+/(zones|regions)/([^/]+)/instanceGroupManagers/([^/]+)$`)
+
+func (d *Detector) GCEManagedInstanceGroup() (ManagedInstanceGroup, error) {
+ createdBy, err := d.metadata.InstanceAttributeValueWithContext(context.TODO(), createdByInstanceAttr)
+ if _, ok := err.(metadata.NotDefinedError); ok {
+ return ManagedInstanceGroup{}, nil
+ } else if err != nil {
+ return ManagedInstanceGroup{}, err
+ }
+ matches := createdByMIGRE.FindStringSubmatch(createdBy)
+ if matches == nil {
+ // The "created-by" key exists, but it doesn't describe a MIG.
+ // Something else must have created this VM.
+ return ManagedInstanceGroup{}, nil
+ }
+
+ mig := ManagedInstanceGroup{
+ Name: matches[3],
+ Location: matches[2],
+ }
+ switch matches[1] {
+ case "zones":
+ mig.Type = Zone
+ case "regions":
+ mig.Type = Region
+ }
+ return mig, nil
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gke.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gke.go
new file mode 100644
index 000000000..734d44cc0
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp/gke.go
@@ -0,0 +1,78 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.
+
+package gcp
+
+import (
+ "context"
+ "fmt"
+ "strings"
+)
+
+const (
+ // If the kubernetes.default.svc service exists in the cluster,
+ // then the KUBERNETES_SERVICE_HOST env var will be populated.
+ // Use this as an indication that we are running on kubernetes.
+ k8sServiceHostEnv = "KUBERNETES_SERVICE_HOST"
+ // See the available GKE metadata:
+ // https://cloud.google.com/kubernetes-engine/docs/concepts/workload-identity#instance_metadata
+ clusterNameMetadataAttr = "cluster-name"
+ clusterLocationMetadataAttr = "cluster-location"
+)
+
+func (d *Detector) onGKE() bool {
+ // Check if we are on k8s first
+ _, found := d.os.LookupEnv(k8sServiceHostEnv)
+ if !found {
+ return false
+ }
+ // If we are on k8s, make sure that we are actually on GKE, and not a
+ // different managed k8s platform.
+ _, err := d.metadata.InstanceAttributeValueWithContext(context.TODO(), clusterLocationMetadataAttr)
+ return err == nil
+}
+
+// GKEHostID returns the instance ID of the instance on which this program is running.
+func (d *Detector) GKEHostID() (string, error) {
+ return d.GCEHostID()
+}
+
+// GKEClusterName returns the name if the GKE cluster in which this program is running.
+func (d *Detector) GKEClusterName() (string, error) {
+ return d.metadata.InstanceAttributeValueWithContext(context.TODO(), clusterNameMetadataAttr)
+}
+
+type LocationType int64
+
+const (
+ UndefinedLocation LocationType = iota
+ Zone
+ Region
+)
+
+// GKEAvailabilityZoneOrRegion returns the location of the cluster and whether the cluster is zonal or regional.
+func (d *Detector) GKEAvailabilityZoneOrRegion() (string, LocationType, error) {
+ clusterLocation, err := d.metadata.InstanceAttributeValueWithContext(context.TODO(), clusterLocationMetadataAttr)
+ if err != nil {
+ return "", UndefinedLocation, err
+ }
+ switch strings.Count(clusterLocation, "-") {
+ case 1:
+ return clusterLocation, Region, nil
+ case 2:
+ return clusterLocation, Zone, nil
+ default:
+ return "", UndefinedLocation, fmt.Errorf("unrecognized format for cluster location: %v", clusterLocation)
+ }
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/LICENSE b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/LICENSE
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/LICENSE
@@ -0,0 +1,202 @@
+
+ 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/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/README.md b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/README.md
new file mode 100644
index 000000000..ea391705f
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/README.md
@@ -0,0 +1,44 @@
+# OpenTelemetry Google Cloud Monitoring Exporter
+
+[![Docs](https://godoc.org/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric?status.svg)](https://pkg.go.dev/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric)
+[![Apache License][license-image]][license-url]
+
+OpenTelemetry Google Cloud Monitoring Exporter allows the user to send collected metrics to Google Cloud.
+
+To get started with instrumentation in Google Cloud, see [Generate traces and metrics with
+Go](https://cloud.google.com/stackdriver/docs/instrumentation/setup/go).
+
+To learn more about instrumentation and observability, including opinionated recommendations
+for Google Cloud Observability, visit [Instrumentation and
+observability](https://cloud.google.com/stackdriver/docs/instrumentation/overview).
+
+[Google Cloud Monitoring](https://cloud.google.com/monitoring) provides visibility into the performance, uptime, and overall health of cloud-powered applications. It collects metrics, events, and metadata from Google Cloud, Amazon Web Services, hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch, and many others. Operations ingests that data and generates insights via dashboards, charts, and alerts. Cloud Monitoring alerting helps you collaborate by integrating with Slack, PagerDuty, and more.
+
+## Setup
+
+Google Cloud Monitoring is a managed service provided by Google Cloud Platform. Google Cloud Monitoring requires to set up "Workspace" in advance. The guide to create a new Workspace is available on [the official document](https://cloud.google.com/monitoring/workspaces/create).
+
+## Authentication
+
+The Google Cloud Monitoring exporter depends upon [`google.FindDefaultCredentials`](https://pkg.go.dev/golang.org/x/oauth2/google?tab=doc#FindDefaultCredentials), so the service account is automatically detected by default, but also the custom credential file (so called `service_account_key.json`) can be detected with specific conditions. Quoting from the document of `google.FindDefaultCredentials`:
+
+* A JSON file whose path is specified by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable.
+* A JSON file in a location known to the gcloud command-line tool. On Windows, this is `%APPDATA%/gcloud/application_default_credentials.json`. On other systems, `$HOME/.config/gcloud/application_default_credentials.json`.
+
+When running code locally, you may need to specify a Google Project ID in addition to `GOOGLE_APPLICATION_CREDENTIALS`. This is best done using an environment variable (e.g. `GOOGLE_CLOUD_PROJECT`) and the `metric.WithProjectID` method, e.g.:
+
+```golang
+projectID := os.Getenv("GOOGLE_CLOUD_PROJECT")
+opts := []mexporter.Option{
+ mexporter.WithProjectID(projectID),
+}
+```
+
+## Useful links
+
+* For more information on OpenTelemetry, visit: https://opentelemetry.io/
+* For more about OpenTelemetry Go, visit: https://github.com/open-telemetry/opentelemetry-go
+* Learn more about Google Cloud Monitoring at https://cloud.google.com/monitoring
+
+[license-url]: https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blob/main/LICENSE
+[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/cloudmonitoring.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/cloudmonitoring.go
new file mode 100644
index 000000000..90dfcb344
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/cloudmonitoring.go
@@ -0,0 +1,49 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package metric
+
+import (
+ "context"
+ "errors"
+ "fmt"
+
+ sdkmetric "go.opentelemetry.io/otel/sdk/metric"
+
+ monitoring "cloud.google.com/go/monitoring/apiv3/v2"
+ "golang.org/x/oauth2/google"
+)
+
+// New creates a new Exporter thats implements metric.Exporter.
+func New(opts ...Option) (sdkmetric.Exporter, error) {
+ o := options{
+ context: context.Background(),
+ resourceAttributeFilter: DefaultResourceAttributesFilter,
+ }
+ for _, opt := range opts {
+ opt(&o)
+ }
+
+ if o.projectID == "" {
+ creds, err := google.FindDefaultCredentials(o.context, monitoring.DefaultAuthScopes()...)
+ if err != nil {
+ return nil, fmt.Errorf("failed to find Google Cloud credentials: %v", err)
+ }
+ if creds.ProjectID == "" {
+ return nil, errors.New("google cloud monitoring: no project found with application default credentials")
+ }
+ o.projectID = creds.ProjectID
+ }
+ return newMetricExporter(&o)
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/constants.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/constants.go
new file mode 100644
index 000000000..57329a4bd
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/constants.go
@@ -0,0 +1,97 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package metric
+
+// TODO: remove this file when the constants are ready in the Go SDK
+
+// Mappings for the well-known OpenTelemetry resource label keys
+// to applicable Monitored Resource label keys.
+// A uniquely identifying name for the Kubernetes cluster. Kubernetes
+// does not have cluster names as an internal concept so this may be
+// set to any meaningful value within the environment. For example,
+// GKE clusters have a name which can be used for this label.
+const (
+ // Deprecated: use semconv.CloudProviderKey instead.
+ CloudKeyProvider = "cloud.provider"
+ // Deprecated: use semconv.CloudAccountIDKey instead.
+ CloudKeyAccountID = "cloud.account.id"
+ // Deprecated: use semconv.CloudRegionKey instead.
+ CloudKeyRegion = "cloud.region"
+ // Deprecated: use semconv.CloudAvailabilityZoneKey instead.
+ CloudKeyZone = "cloud.availability_zone"
+
+ // Deprecated: use semconv.ServiceNamespaceKey instead.
+ ServiceKeyNamespace = "service.namespace"
+ // Deprecated: use semconv.ServiceInstanceIDKey instead.
+ ServiceKeyInstanceID = "service.instance.id"
+ // Deprecated: use semconv.ServiceNameKey instead.
+ ServiceKeyName = "service.name"
+
+ // Deprecated: HostType is not needed.
+ HostType = "host"
+ // A uniquely identifying name for the host.
+ // Deprecated: use semconv.HostNameKey instead.
+ HostKeyName = "host.name"
+ // A hostname as returned by the 'hostname' command on host machine.
+ // Deprecated: HostKeyHostName is not needed.
+ HostKeyHostName = "host.hostname"
+ // Deprecated: use semconv.HostIDKey instead.
+ HostKeyID = "host.id"
+ // Deprecated: use semconv.HostTypeKey instead.
+ HostKeyType = "host.type"
+
+ // A uniquely identifying name for the Container.
+ // Deprecated: use semconv.ContainerNameKey instead.
+ ContainerKeyName = "container.name"
+ // Deprecated: use semconv.ContainerImageNameKey instead.
+ ContainerKeyImageName = "container.image.name"
+ // Deprecated: use semconv.ContainerImageTagKey instead.
+ ContainerKeyImageTag = "container.image.tag"
+
+ // Cloud Providers
+ // Deprecated: use semconv.CloudProviderAWS instead.
+ CloudProviderAWS = "aws"
+ // Deprecated: use semconv.CloudProviderGCP instead.
+ CloudProviderGCP = "gcp"
+ // Deprecated: use semconv.CloudProviderAzure instead.
+ CloudProviderAZURE = "azure"
+
+ // Deprecated: Use "k8s" instead. This should not be needed.
+ K8S = "k8s"
+ // Deprecated: use semconv.K8SClusterNameKey instead.
+ K8SKeyClusterName = "k8s.cluster.name"
+ // Deprecated: use semconv.K8SNamespaceNameKey instead.
+ K8SKeyNamespaceName = "k8s.namespace.name"
+ // Deprecated: use semconv.K8SPodNameKey instead.
+ K8SKeyPodName = "k8s.pod.name"
+ // Deprecated: use semconv.K8SDeploymentNameKey instead.
+ K8SKeyDeploymentName = "k8s.deployment.name"
+
+ // Monitored Resources types
+ // Deprecated: Use "k8s_container" instead.
+ K8SContainer = "k8s_container"
+ // Deprecated: Use "k8s_node" instead.
+ K8SNode = "k8s_node"
+ // Deprecated: Use "k8s_pod" instead.
+ K8SPod = "k8s_pod"
+ // Deprecated: Use "k8s_cluster" instead.
+ K8SCluster = "k8s_cluster"
+ // Deprecated: Use "gce_instance" instead.
+ GCEInstance = "gce_instance"
+ // Deprecated: Use "aws_ec2_instance" instead.
+ AWSEC2Instance = "aws_ec2_instance"
+ // Deprecated: Use "generic_task" instead.
+ GenericTask = "generic_task"
+)
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/error.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/error.go
new file mode 100644
index 000000000..974c0af95
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/error.go
@@ -0,0 +1,32 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package metric
+
+import (
+ "errors"
+ "fmt"
+)
+
+var (
+ errBlankProjectID = errors.New("expecting a non-blank ProjectID")
+)
+
+type errUnexpectedAggregationKind struct {
+ kind string
+}
+
+func (e errUnexpectedAggregationKind) Error() string {
+ return fmt.Sprintf("the metric kind is unexpected: %v", e.kind)
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go
new file mode 100644
index 000000000..b0ab713c6
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/metric.go
@@ -0,0 +1,890 @@
+// Copyright 2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package metric
+
+import (
+ "bytes"
+ "context"
+ "encoding/hex"
+ "errors"
+ "fmt"
+ "math"
+ "net/url"
+ "reflect"
+ "sort"
+ "strings"
+ "sync"
+ "time"
+ "unicode"
+
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/sdk/instrumentation"
+ "go.opentelemetry.io/otel/sdk/metric"
+ "go.opentelemetry.io/otel/sdk/metric/metricdata"
+ "go.opentelemetry.io/otel/sdk/resource"
+ "go.opentelemetry.io/otel/trace"
+
+ monitoring "cloud.google.com/go/monitoring/apiv3/v2"
+ "cloud.google.com/go/monitoring/apiv3/v2/monitoringpb"
+ "github.com/googleapis/gax-go/v2"
+ "google.golang.org/api/option"
+ "google.golang.org/genproto/googleapis/api/distribution"
+ "google.golang.org/genproto/googleapis/api/label"
+ googlemetricpb "google.golang.org/genproto/googleapis/api/metric"
+ monitoredrespb "google.golang.org/genproto/googleapis/api/monitoredres"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/encoding/gzip"
+ "google.golang.org/grpc/metadata"
+ "google.golang.org/protobuf/types/known/anypb"
+ "google.golang.org/protobuf/types/known/timestamppb"
+
+ "github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping"
+)
+
+const (
+ // The number of timeserieses to send to GCM in a single request. This
+ // is a hard limit in the GCM API, so we never want to exceed 200.
+ sendBatchSize = 200
+
+ cloudMonitoringMetricDescriptorNameFormat = "workload.googleapis.com/%s"
+ platformMappingMonitoredResourceKey = "gcp.resource_type"
+)
+
+// key is used to judge the uniqueness of the record descriptor.
+type key struct {
+ name string
+ libraryname string
+}
+
+func keyOf(metrics metricdata.Metrics, library instrumentation.Scope) key {
+ return key{
+ name: metrics.Name,
+ libraryname: library.Name,
+ }
+}
+
+// metricExporter is the implementation of OpenTelemetry metric exporter for
+// Google Cloud Monitoring.
+type metricExporter struct {
+ o *options
+ shutdown chan struct{}
+ // mdCache is the cache to hold MetricDescriptor to avoid creating duplicate MD.
+ mdCache map[key]*googlemetricpb.MetricDescriptor
+ client *monitoring.MetricClient
+ mdLock sync.RWMutex
+ shutdownOnce sync.Once
+}
+
+// ForceFlush does nothing, the exporter holds no state.
+func (e *metricExporter) ForceFlush(ctx context.Context) error { return ctx.Err() }
+
+// Shutdown shuts down the client connections.
+func (e *metricExporter) Shutdown(ctx context.Context) error {
+ err := errShutdown
+ e.shutdownOnce.Do(func() {
+ close(e.shutdown)
+ err = errors.Join(ctx.Err(), e.client.Close())
+ })
+ return err
+}
+
+// newMetricExporter returns an exporter that uploads OTel metric data to Google Cloud Monitoring.
+func newMetricExporter(o *options) (*metricExporter, error) {
+ if strings.TrimSpace(o.projectID) == "" {
+ return nil, errBlankProjectID
+ }
+
+ clientOpts := append([]option.ClientOption{option.WithGRPCDialOption(grpc.WithUserAgent(userAgent))}, o.monitoringClientOptions...)
+ ctx := o.context
+ if ctx == nil {
+ ctx = context.Background()
+ }
+ client, err := monitoring.NewMetricClient(ctx, clientOpts...)
+ if err != nil {
+ return nil, err
+ }
+
+ if o.compression == "gzip" {
+ client.CallOptions.GetMetricDescriptor = append(client.CallOptions.GetMetricDescriptor,
+ gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name)))
+ client.CallOptions.CreateMetricDescriptor = append(client.CallOptions.CreateMetricDescriptor,
+ gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name)))
+ client.CallOptions.CreateTimeSeries = append(client.CallOptions.CreateTimeSeries,
+ gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name)))
+ client.CallOptions.CreateServiceTimeSeries = append(client.CallOptions.CreateServiceTimeSeries,
+ gax.WithGRPCOptions(grpc.UseCompressor(gzip.Name)))
+ }
+
+ cache := map[key]*googlemetricpb.MetricDescriptor{}
+ e := &metricExporter{
+ o: o,
+ mdCache: cache,
+ client: client,
+ shutdown: make(chan struct{}),
+ }
+ return e, nil
+}
+
+var errShutdown = fmt.Errorf("exporter is shutdown")
+
+// Export exports OpenTelemetry Metrics to Google Cloud Monitoring.
+func (me *metricExporter) Export(ctx context.Context, rm *metricdata.ResourceMetrics) error {
+ select {
+ case <-me.shutdown:
+ return errShutdown
+ default:
+ }
+
+ if me.o.destinationProjectQuota {
+ ctx = metadata.NewOutgoingContext(ctx, metadata.New(map[string]string{"x-goog-user-project": strings.TrimPrefix(me.o.projectID, "projects/")}))
+ }
+ return errors.Join(
+ me.exportMetricDescriptor(ctx, rm),
+ me.exportTimeSeries(ctx, rm),
+ )
+}
+
+// Temporality returns the Temporality to use for an instrument kind.
+func (me *metricExporter) Temporality(ik metric.InstrumentKind) metricdata.Temporality {
+ return metric.DefaultTemporalitySelector(ik)
+}
+
+// Aggregation returns the Aggregation to use for an instrument kind.
+func (me *metricExporter) Aggregation(ik metric.InstrumentKind) metric.Aggregation {
+ return metric.DefaultAggregationSelector(ik)
+}
+
+// exportMetricDescriptor create MetricDescriptor from the record
+// if the descriptor is not registered in Cloud Monitoring yet.
+func (me *metricExporter) exportMetricDescriptor(ctx context.Context, rm *metricdata.ResourceMetrics) error {
+ // We only send metric descriptors if we're configured *and* we're not sending service timeseries.
+ if me.o.disableCreateMetricDescriptors {
+ return nil
+ }
+
+ me.mdLock.Lock()
+ defer me.mdLock.Unlock()
+ mds := make(map[key]*googlemetricpb.MetricDescriptor)
+ extraLabels := me.extraLabelsFromResource(rm.Resource)
+ for _, scope := range rm.ScopeMetrics {
+ for _, metrics := range scope.Metrics {
+ k := keyOf(metrics, scope.Scope)
+
+ if _, ok := me.mdCache[k]; ok {
+ continue
+ }
+
+ if _, localok := mds[k]; !localok {
+ md := me.recordToMdpb(metrics, extraLabels)
+ mds[k] = md
+ }
+ }
+ }
+
+ // TODO: This process is synchronous and blocks longer time if records in cps
+ // have many different descriptors. In the cps.ForEach above, it should spawn
+ // goroutines to send CreateMetricDescriptorRequest asynchronously in the case
+ // the descriptor does not exist in global cache (me.mdCache).
+ // See details in #26.
+ var errs []error
+ for kmd, md := range mds {
+ err := me.createMetricDescriptorIfNeeded(ctx, md)
+ if err == nil {
+ me.mdCache[kmd] = md
+ }
+ errs = append(errs, err)
+ }
+ return errors.Join(errs...)
+}
+
+func (me *metricExporter) createMetricDescriptorIfNeeded(ctx context.Context, md *googlemetricpb.MetricDescriptor) error {
+ mdReq := &monitoringpb.GetMetricDescriptorRequest{
+ Name: fmt.Sprintf("projects/%s/metricDescriptors/%s", me.o.projectID, md.Type),
+ }
+ _, err := me.client.GetMetricDescriptor(ctx, mdReq)
+ if err == nil {
+ // If the metric descriptor already exists, skip the CreateMetricDescriptor call.
+ // Metric descriptors cannot be updated without deleting them first, so there
+ // isn't anything we can do here:
+ // https://cloud.google.com/monitoring/custom-metrics/creating-metrics#md-modify
+ return nil
+ }
+ req := &monitoringpb.CreateMetricDescriptorRequest{
+ Name: fmt.Sprintf("projects/%s", me.o.projectID),
+ MetricDescriptor: md,
+ }
+ _, err = me.client.CreateMetricDescriptor(ctx, req)
+ return err
+}
+
+// exportTimeSeries create TimeSeries from the records in cps.
+// res should be the common resource among all TimeSeries, such as instance id, application name and so on.
+func (me *metricExporter) exportTimeSeries(ctx context.Context, rm *metricdata.ResourceMetrics) error {
+ tss, err := me.recordsToTspbs(rm)
+ if len(tss) == 0 {
+ return err
+ }
+
+ name := fmt.Sprintf("projects/%s", me.o.projectID)
+
+ errs := []error{err}
+ for i := 0; i < len(tss); i += sendBatchSize {
+ j := i + sendBatchSize
+ if j >= len(tss) {
+ j = len(tss)
+ }
+
+ // TODO: When this exporter is rewritten, support writing to multiple
+ // projects based on the "gcp.project.id" resource.
+ req := &monitoringpb.CreateTimeSeriesRequest{
+ Name: name,
+ TimeSeries: tss[i:j],
+ }
+ if me.o.createServiceTimeSeries {
+ errs = append(errs, me.client.CreateServiceTimeSeries(ctx, req))
+ } else {
+ errs = append(errs, me.client.CreateTimeSeries(ctx, req))
+ }
+ }
+
+ return errors.Join(errs...)
+}
+
+func (me *metricExporter) extraLabelsFromResource(res *resource.Resource) *attribute.Set {
+ set, _ := attribute.NewSetWithFiltered(res.Attributes(), me.o.resourceAttributeFilter)
+ return &set
+}
+
+// descToMetricType converts descriptor to MetricType proto type.
+// Basically this returns default value ("workload.googleapis.com/[metric type]").
+func (me *metricExporter) descToMetricType(desc metricdata.Metrics) string {
+ if formatter := me.o.metricDescriptorTypeFormatter; formatter != nil {
+ return formatter(desc)
+ }
+ return fmt.Sprintf(cloudMonitoringMetricDescriptorNameFormat, desc.Name)
+}
+
+// metricTypeToDisplayName takes a GCM metric type, like (workload.googleapis.com/MyCoolMetric) and returns the display name.
+func metricTypeToDisplayName(mURL string) string {
+ // strip domain, keep path after domain.
+ u, err := url.Parse(fmt.Sprintf("metrics://%s", mURL))
+ if err != nil || u.Path == "" {
+ return mURL
+ }
+ return strings.TrimLeft(u.Path, "/")
+}
+
+// recordToMdpb extracts data and converts them to googlemetricpb.MetricDescriptor.
+func (me *metricExporter) recordToMdpb(metrics metricdata.Metrics, extraLabels *attribute.Set) *googlemetricpb.MetricDescriptor {
+ name := metrics.Name
+ typ := me.descToMetricType(metrics)
+ kind, valueType := recordToMdpbKindType(metrics.Data)
+
+ // Detailed explanations on MetricDescriptor proto is not documented on
+ // generated Go packages. Refer to the original proto file.
+ // https://github.com/googleapis/googleapis/blob/50af053/google/api/metric.proto#L33
+ return &googlemetricpb.MetricDescriptor{
+ Name: name,
+ DisplayName: metricTypeToDisplayName(typ),
+ Type: typ,
+ MetricKind: kind,
+ ValueType: valueType,
+ Unit: string(metrics.Unit),
+ Description: metrics.Description,
+ Labels: labelDescriptors(metrics, extraLabels),
+ }
+}
+
+func labelDescriptors(metrics metricdata.Metrics, extraLabels *attribute.Set) []*label.LabelDescriptor {
+ labels := []*label.LabelDescriptor{}
+ seenKeys := map[string]struct{}{}
+ addAttributes := func(attr *attribute.Set) {
+ iter := attr.Iter()
+ for iter.Next() {
+ kv := iter.Attribute()
+ // Skip keys that have already been set
+ if _, ok := seenKeys[normalizeLabelKey(string(kv.Key))]; ok {
+ continue
+ }
+ labels = append(labels, &label.LabelDescriptor{
+ Key: normalizeLabelKey(string(kv.Key)),
+ })
+ seenKeys[normalizeLabelKey(string(kv.Key))] = struct{}{}
+ }
+ }
+ addAttributes(extraLabels)
+ switch a := metrics.Data.(type) {
+ case metricdata.Gauge[int64]:
+ for _, pt := range a.DataPoints {
+ addAttributes(&pt.Attributes)
+ }
+ case metricdata.Gauge[float64]:
+ for _, pt := range a.DataPoints {
+ addAttributes(&pt.Attributes)
+ }
+ case metricdata.Sum[int64]:
+ for _, pt := range a.DataPoints {
+ addAttributes(&pt.Attributes)
+ }
+ case metricdata.Sum[float64]:
+ for _, pt := range a.DataPoints {
+ addAttributes(&pt.Attributes)
+ }
+ case metricdata.Histogram[float64]:
+ for _, pt := range a.DataPoints {
+ addAttributes(&pt.Attributes)
+ }
+ case metricdata.Histogram[int64]:
+ for _, pt := range a.DataPoints {
+ addAttributes(&pt.Attributes)
+ }
+ }
+ return labels
+}
+
+type attributes struct {
+ attrs attribute.Set
+}
+
+func (attrs *attributes) GetString(key string) (string, bool) {
+ value, ok := attrs.attrs.Value(attribute.Key(key))
+ return value.AsString(), ok
+}
+
+// resourceToMonitoredResourcepb converts resource in OTel to MonitoredResource
+// proto type for Cloud Monitoring.
+//
+// https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.monitoredResourceDescriptors
+func (me *metricExporter) resourceToMonitoredResourcepb(res *resource.Resource) *monitoredrespb.MonitoredResource {
+ platformMrType, platformMappingRequested := res.Set().Value(platformMappingMonitoredResourceKey)
+
+ // check if platform mapping is requested and possible
+ if platformMappingRequested && platformMrType.AsString() == me.o.monitoredResourceDescription.mrType {
+ // assemble attributes required to construct this MR
+ attributeMap := make(map[string]string)
+ for expectedLabel := range me.o.monitoredResourceDescription.mrLabels {
+ value, found := res.Set().Value(attribute.Key(expectedLabel))
+ if found {
+ attributeMap[expectedLabel] = value.AsString()
+ }
+ }
+ return &monitoredrespb.MonitoredResource{
+ Type: platformMrType.AsString(),
+ Labels: attributeMap,
+ }
+ }
+
+ gmr := resourcemapping.ResourceAttributesToMonitoringMonitoredResource(&attributes{
+ attrs: attribute.NewSet(res.Attributes()...),
+ })
+ newLabels := make(map[string]string, len(gmr.Labels))
+ for k, v := range gmr.Labels {
+ newLabels[k] = sanitizeUTF8(v)
+ }
+ mr := &monitoredrespb.MonitoredResource{
+ Type: gmr.Type,
+ Labels: newLabels,
+ }
+ return mr
+}
+
+// recordToMdpbKindType return the mapping from OTel's record descriptor to
+// Cloud Monitoring's MetricKind and ValueType.
+func recordToMdpbKindType(a metricdata.Aggregation) (googlemetricpb.MetricDescriptor_MetricKind, googlemetricpb.MetricDescriptor_ValueType) {
+ switch agg := a.(type) {
+ case metricdata.Gauge[int64]:
+ return googlemetricpb.MetricDescriptor_GAUGE, googlemetricpb.MetricDescriptor_INT64
+ case metricdata.Gauge[float64]:
+ return googlemetricpb.MetricDescriptor_GAUGE, googlemetricpb.MetricDescriptor_DOUBLE
+ case metricdata.Sum[int64]:
+ if agg.IsMonotonic {
+ return googlemetricpb.MetricDescriptor_CUMULATIVE, googlemetricpb.MetricDescriptor_INT64
+ }
+ return googlemetricpb.MetricDescriptor_GAUGE, googlemetricpb.MetricDescriptor_INT64
+ case metricdata.Sum[float64]:
+ if agg.IsMonotonic {
+ return googlemetricpb.MetricDescriptor_CUMULATIVE, googlemetricpb.MetricDescriptor_DOUBLE
+ }
+ return googlemetricpb.MetricDescriptor_GAUGE, googlemetricpb.MetricDescriptor_DOUBLE
+ case metricdata.Histogram[int64], metricdata.Histogram[float64]:
+ return googlemetricpb.MetricDescriptor_CUMULATIVE, googlemetricpb.MetricDescriptor_DISTRIBUTION
+ default:
+ return googlemetricpb.MetricDescriptor_METRIC_KIND_UNSPECIFIED, googlemetricpb.MetricDescriptor_VALUE_TYPE_UNSPECIFIED
+ }
+}
+
+// recordToMpb converts data from records to Metric proto type for Cloud Monitoring.
+func (me *metricExporter) recordToMpb(metrics metricdata.Metrics, attributes attribute.Set, library instrumentation.Scope, extraLabels *attribute.Set) *googlemetricpb.Metric {
+ me.mdLock.RLock()
+ defer me.mdLock.RUnlock()
+ k := keyOf(metrics, library)
+ md, ok := me.mdCache[k]
+ if !ok {
+ md = me.recordToMdpb(metrics, extraLabels)
+ }
+
+ labels := make(map[string]string)
+ addAttributes := func(attr *attribute.Set) {
+ iter := attr.Iter()
+ for iter.Next() {
+ kv := iter.Attribute()
+ labels[normalizeLabelKey(string(kv.Key))] = sanitizeUTF8(kv.Value.Emit())
+ }
+ }
+ addAttributes(extraLabels)
+ addAttributes(&attributes)
+
+ return &googlemetricpb.Metric{
+ Type: md.Type,
+ Labels: labels,
+ }
+}
+
+// recordToTspb converts record to TimeSeries proto type with common resource.
+// ref. https://cloud.google.com/monitoring/api/ref_v3/rest/v3/TimeSeries
+func (me *metricExporter) recordToTspb(m metricdata.Metrics, mr *monitoredrespb.MonitoredResource, library instrumentation.Scope, extraLabels *attribute.Set) ([]*monitoringpb.TimeSeries, error) {
+ var tss []*monitoringpb.TimeSeries
+ var errs []error
+ if m.Data == nil {
+ return nil, nil
+ }
+ switch a := m.Data.(type) {
+ case metricdata.Gauge[int64]:
+ for _, point := range a.DataPoints {
+ ts, err := gaugeToTimeSeries[int64](point, m, mr)
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ ts.Metric = me.recordToMpb(m, point.Attributes, library, extraLabels)
+ tss = append(tss, ts)
+ }
+ case metricdata.Gauge[float64]:
+ for _, point := range a.DataPoints {
+ ts, err := gaugeToTimeSeries[float64](point, m, mr)
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ ts.Metric = me.recordToMpb(m, point.Attributes, library, extraLabels)
+ tss = append(tss, ts)
+ }
+ case metricdata.Sum[int64]:
+ for _, point := range a.DataPoints {
+ var ts *monitoringpb.TimeSeries
+ var err error
+ if a.IsMonotonic {
+ ts, err = sumToTimeSeries[int64](point, m, mr)
+ } else {
+ // Send non-monotonic sums as gauges
+ ts, err = gaugeToTimeSeries[int64](point, m, mr)
+ }
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ ts.Metric = me.recordToMpb(m, point.Attributes, library, extraLabels)
+ tss = append(tss, ts)
+ }
+ case metricdata.Sum[float64]:
+ for _, point := range a.DataPoints {
+ var ts *monitoringpb.TimeSeries
+ var err error
+ if a.IsMonotonic {
+ ts, err = sumToTimeSeries[float64](point, m, mr)
+ } else {
+ // Send non-monotonic sums as gauges
+ ts, err = gaugeToTimeSeries[float64](point, m, mr)
+ }
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ ts.Metric = me.recordToMpb(m, point.Attributes, library, extraLabels)
+ tss = append(tss, ts)
+ }
+ case metricdata.Histogram[int64]:
+ for _, point := range a.DataPoints {
+ ts, err := histogramToTimeSeries(point, m, mr, me.o.enableSumOfSquaredDeviation, me.o.projectID)
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ ts.Metric = me.recordToMpb(m, point.Attributes, library, extraLabels)
+ tss = append(tss, ts)
+ }
+ case metricdata.Histogram[float64]:
+ for _, point := range a.DataPoints {
+ ts, err := histogramToTimeSeries(point, m, mr, me.o.enableSumOfSquaredDeviation, me.o.projectID)
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ ts.Metric = me.recordToMpb(m, point.Attributes, library, extraLabels)
+ tss = append(tss, ts)
+ }
+ case metricdata.ExponentialHistogram[int64]:
+ for _, point := range a.DataPoints {
+ ts, err := expHistogramToTimeSeries(point, m, mr, me.o.enableSumOfSquaredDeviation, me.o.projectID)
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ ts.Metric = me.recordToMpb(m, point.Attributes, library, extraLabels)
+ tss = append(tss, ts)
+ }
+ case metricdata.ExponentialHistogram[float64]:
+ for _, point := range a.DataPoints {
+ ts, err := expHistogramToTimeSeries(point, m, mr, me.o.enableSumOfSquaredDeviation, me.o.projectID)
+ if err != nil {
+ errs = append(errs, err)
+ continue
+ }
+ ts.Metric = me.recordToMpb(m, point.Attributes, library, extraLabels)
+ tss = append(tss, ts)
+ }
+ default:
+ errs = append(errs, errUnexpectedAggregationKind{kind: reflect.TypeOf(m.Data).String()})
+ }
+ return tss, errors.Join(errs...)
+}
+
+func (me *metricExporter) recordsToTspbs(rm *metricdata.ResourceMetrics) ([]*monitoringpb.TimeSeries, error) {
+ mr := me.resourceToMonitoredResourcepb(rm.Resource)
+ extraLabels := me.extraLabelsFromResource(rm.Resource)
+
+ var (
+ tss []*monitoringpb.TimeSeries
+ errs []error
+ )
+ for _, scope := range rm.ScopeMetrics {
+ for _, metrics := range scope.Metrics {
+ ts, err := me.recordToTspb(metrics, mr, scope.Scope, extraLabels)
+ errs = append(errs, err)
+ tss = append(tss, ts...)
+ }
+ }
+
+ return tss, errors.Join(errs...)
+}
+
+func sanitizeUTF8(s string) string {
+ return strings.ToValidUTF8(s, "�")
+}
+
+func gaugeToTimeSeries[N int64 | float64](point metricdata.DataPoint[N], metrics metricdata.Metrics, mr *monitoredrespb.MonitoredResource) (*monitoringpb.TimeSeries, error) {
+ value, valueType := numberDataPointToValue(point)
+ timestamp := timestamppb.New(point.Time)
+ if err := timestamp.CheckValid(); err != nil {
+ return nil, err
+ }
+ return &monitoringpb.TimeSeries{
+ Resource: mr,
+ Unit: string(metrics.Unit),
+ MetricKind: googlemetricpb.MetricDescriptor_GAUGE,
+ ValueType: valueType,
+ Points: []*monitoringpb.Point{{
+ Interval: &monitoringpb.TimeInterval{
+ EndTime: timestamp,
+ },
+ Value: value,
+ }},
+ }, nil
+}
+
+func sumToTimeSeries[N int64 | float64](point metricdata.DataPoint[N], metrics metricdata.Metrics, mr *monitoredrespb.MonitoredResource) (*monitoringpb.TimeSeries, error) {
+ interval, err := toNonemptyTimeIntervalpb(point.StartTime, point.Time)
+ if err != nil {
+ return nil, err
+ }
+ value, valueType := numberDataPointToValue[N](point)
+ return &monitoringpb.TimeSeries{
+ Resource: mr,
+ Unit: string(metrics.Unit),
+ MetricKind: googlemetricpb.MetricDescriptor_CUMULATIVE,
+ ValueType: valueType,
+ Points: []*monitoringpb.Point{{
+ Interval: interval,
+ Value: value,
+ }},
+ }, nil
+}
+
+// TODO(@dashpole): Refactor to pass control-coupling lint check.
+//
+//nolint:revive
+func histogramToTimeSeries[N int64 | float64](point metricdata.HistogramDataPoint[N], metrics metricdata.Metrics, mr *monitoredrespb.MonitoredResource, enableSOSD bool, projectID string) (*monitoringpb.TimeSeries, error) {
+ interval, err := toNonemptyTimeIntervalpb(point.StartTime, point.Time)
+ if err != nil {
+ return nil, err
+ }
+ distributionValue := histToDistribution(point, projectID)
+ if enableSOSD {
+ setSumOfSquaredDeviation(point, distributionValue)
+ }
+ return &monitoringpb.TimeSeries{
+ Resource: mr,
+ Unit: string(metrics.Unit),
+ MetricKind: googlemetricpb.MetricDescriptor_CUMULATIVE,
+ ValueType: googlemetricpb.MetricDescriptor_DISTRIBUTION,
+ Points: []*monitoringpb.Point{{
+ Interval: interval,
+ Value: &monitoringpb.TypedValue{
+ Value: &monitoringpb.TypedValue_DistributionValue{
+ DistributionValue: distributionValue,
+ },
+ },
+ }},
+ }, nil
+}
+
+func expHistogramToTimeSeries[N int64 | float64](point metricdata.ExponentialHistogramDataPoint[N], metrics metricdata.Metrics, mr *monitoredrespb.MonitoredResource, enableSOSD bool, projectID string) (*monitoringpb.TimeSeries, error) {
+ interval, err := toNonemptyTimeIntervalpb(point.StartTime, point.Time)
+ if err != nil {
+ return nil, err
+ }
+ distributionValue := expHistToDistribution(point, projectID)
+ // TODO: Implement "setSumOfSquaredDeviationExpHist" for parameter "enableSOSD" functionality.
+ return &monitoringpb.TimeSeries{
+ Resource: mr,
+ Unit: string(metrics.Unit),
+ MetricKind: googlemetricpb.MetricDescriptor_CUMULATIVE,
+ ValueType: googlemetricpb.MetricDescriptor_DISTRIBUTION,
+ Points: []*monitoringpb.Point{{
+ Interval: interval,
+ Value: &monitoringpb.TypedValue{
+ Value: &monitoringpb.TypedValue_DistributionValue{
+ DistributionValue: distributionValue,
+ },
+ },
+ }},
+ }, nil
+}
+
+func toNonemptyTimeIntervalpb(start, end time.Time) (*monitoringpb.TimeInterval, error) {
+ // The end time of a new interval must be at least a millisecond after the end time of the
+ // previous interval, for all non-gauge types.
+ // https://cloud.google.com/monitoring/api/ref_v3/rpc/google.monitoring.v3#timeinterval
+ if end.Sub(start).Milliseconds() <= 1 {
+ end = start.Add(time.Millisecond)
+ }
+ startpb := timestamppb.New(start)
+ endpb := timestamppb.New(end)
+ err := errors.Join(
+ startpb.CheckValid(),
+ endpb.CheckValid(),
+ )
+ if err != nil {
+ return nil, err
+ }
+
+ return &monitoringpb.TimeInterval{
+ StartTime: startpb,
+ EndTime: endpb,
+ }, nil
+}
+
+func histToDistribution[N int64 | float64](hist metricdata.HistogramDataPoint[N], projectID string) *distribution.Distribution {
+ counts := make([]int64, len(hist.BucketCounts))
+ for i, v := range hist.BucketCounts {
+ counts[i] = int64(v)
+ }
+ var mean float64
+ if !math.IsNaN(float64(hist.Sum)) && hist.Count > 0 { // Avoid divide-by-zero
+ mean = float64(hist.Sum) / float64(hist.Count)
+ }
+ return &distribution.Distribution{
+ Count: int64(hist.Count),
+ Mean: mean,
+ BucketCounts: counts,
+ BucketOptions: &distribution.Distribution_BucketOptions{
+ Options: &distribution.Distribution_BucketOptions_ExplicitBuckets{
+ ExplicitBuckets: &distribution.Distribution_BucketOptions_Explicit{
+ Bounds: hist.Bounds,
+ },
+ },
+ },
+ Exemplars: toDistributionExemplar[N](hist.Exemplars, projectID),
+ }
+}
+
+func expHistToDistribution[N int64 | float64](hist metricdata.ExponentialHistogramDataPoint[N], projectID string) *distribution.Distribution {
+ // First calculate underflow bucket with all negatives + zeros.
+ underflow := hist.ZeroCount
+ negativeBuckets := hist.NegativeBucket.Counts
+ for i := 0; i < len(negativeBuckets); i++ {
+ underflow += negativeBuckets[i]
+ }
+
+ // Next, pull in remaining buckets.
+ counts := make([]int64, len(hist.PositiveBucket.Counts)+2)
+ bucketOptions := &distribution.Distribution_BucketOptions{}
+ counts[0] = int64(underflow)
+ positiveBuckets := hist.PositiveBucket.Counts
+ for i := 0; i < len(positiveBuckets); i++ {
+ counts[i+1] = int64(positiveBuckets[i])
+ }
+ // Overflow bucket is always empty
+ counts[len(counts)-1] = 0
+
+ if len(hist.PositiveBucket.Counts) == 0 {
+ // We cannot send exponential distributions with no positive buckets,
+ // instead we send a simple overflow/underflow histogram.
+ bucketOptions.Options = &distribution.Distribution_BucketOptions_ExplicitBuckets{
+ ExplicitBuckets: &distribution.Distribution_BucketOptions_Explicit{
+ Bounds: []float64{0},
+ },
+ }
+ } else {
+ // Exponential histogram
+ growth := math.Exp2(math.Exp2(-float64(hist.Scale)))
+ scale := math.Pow(growth, float64(hist.PositiveBucket.Offset))
+ bucketOptions.Options = &distribution.Distribution_BucketOptions_ExponentialBuckets{
+ ExponentialBuckets: &distribution.Distribution_BucketOptions_Exponential{
+ GrowthFactor: growth,
+ Scale: scale,
+ NumFiniteBuckets: int32(len(counts) - 2),
+ },
+ }
+ }
+
+ var mean float64
+ if !math.IsNaN(float64(hist.Sum)) && hist.Count > 0 { // Avoid divide-by-zero
+ mean = float64(hist.Sum) / float64(hist.Count)
+ }
+
+ return &distribution.Distribution{
+ Count: int64(hist.Count),
+ Mean: mean,
+ BucketCounts: counts,
+ BucketOptions: bucketOptions,
+ Exemplars: toDistributionExemplar[N](hist.Exemplars, projectID),
+ }
+}
+
+func toDistributionExemplar[N int64 | float64](Exemplars []metricdata.Exemplar[N], projectID string) []*distribution.Distribution_Exemplar {
+ var exemplars []*distribution.Distribution_Exemplar
+ for _, e := range Exemplars {
+ attachments := []*anypb.Any{}
+ if hasValidSpanContext(e) {
+ sctx, err := anypb.New(&monitoringpb.SpanContext{
+ SpanName: fmt.Sprintf("projects/%s/traces/%s/spans/%s", projectID, hex.EncodeToString(e.TraceID[:]), hex.EncodeToString(e.SpanID[:])),
+ })
+ if err == nil {
+ attachments = append(attachments, sctx)
+ }
+ }
+ if len(e.FilteredAttributes) > 0 {
+ attr, err := anypb.New(&monitoringpb.DroppedLabels{
+ Label: attributesToLabels(e.FilteredAttributes),
+ })
+ if err == nil {
+ attachments = append(attachments, attr)
+ }
+ }
+ exemplars = append(exemplars, &distribution.Distribution_Exemplar{
+ Value: float64(e.Value),
+ Timestamp: timestamppb.New(e.Time),
+ Attachments: attachments,
+ })
+ }
+ sort.Slice(exemplars, func(i, j int) bool {
+ return exemplars[i].Value < exemplars[j].Value
+ })
+ return exemplars
+}
+
+func attributesToLabels(attrs []attribute.KeyValue) map[string]string {
+ labels := make(map[string]string, len(attrs))
+ for _, attr := range attrs {
+ labels[normalizeLabelKey(string(attr.Key))] = sanitizeUTF8(attr.Value.Emit())
+ }
+ return labels
+}
+
+var (
+ nilTraceID trace.TraceID
+ nilSpanID trace.SpanID
+)
+
+func hasValidSpanContext[N int64 | float64](e metricdata.Exemplar[N]) bool {
+ return !bytes.Equal(e.TraceID[:], nilTraceID[:]) && !bytes.Equal(e.SpanID[:], nilSpanID[:])
+}
+
+func setSumOfSquaredDeviation[N int64 | float64](hist metricdata.HistogramDataPoint[N], dist *distribution.Distribution) {
+ var prevBound float64
+ // Calculate the sum of squared deviation.
+ for i := 0; i < len(hist.Bounds); i++ {
+ // Assume all points in the bucket occur at the middle of the bucket range
+ middleOfBucket := (prevBound + hist.Bounds[i]) / 2
+ dist.SumOfSquaredDeviation += float64(dist.BucketCounts[i]) * (middleOfBucket - dist.Mean) * (middleOfBucket - dist.Mean)
+ prevBound = hist.Bounds[i]
+ }
+ // The infinity bucket is an implicit +Inf bound after the list of explicit bounds.
+ // Assume points in the infinity bucket are at the top of the previous bucket
+ middleOfInfBucket := prevBound
+ if len(dist.BucketCounts) > 0 {
+ dist.SumOfSquaredDeviation += float64(dist.BucketCounts[len(dist.BucketCounts)-1]) * (middleOfInfBucket - dist.Mean) * (middleOfInfBucket - dist.Mean)
+ }
+}
+
+func numberDataPointToValue[N int64 | float64](
+ point metricdata.DataPoint[N],
+) (*monitoringpb.TypedValue, googlemetricpb.MetricDescriptor_ValueType) {
+ switch v := any(point.Value).(type) {
+ case int64:
+ return &monitoringpb.TypedValue{Value: &monitoringpb.TypedValue_Int64Value{
+ Int64Value: v,
+ }},
+ googlemetricpb.MetricDescriptor_INT64
+ case float64:
+ return &monitoringpb.TypedValue{Value: &monitoringpb.TypedValue_DoubleValue{
+ DoubleValue: v,
+ }},
+ googlemetricpb.MetricDescriptor_DOUBLE
+ }
+ // It is impossible to reach this statement
+ return nil, googlemetricpb.MetricDescriptor_INT64
+}
+
+// https://github.com/googleapis/googleapis/blob/c4c562f89acce603fb189679836712d08c7f8584/google/api/metric.proto#L149
+//
+// > The label key name must follow:
+// >
+// > * Only upper and lower-case letters, digits and underscores (_) are
+// > allowed.
+// > * Label name must start with a letter or digit.
+// > * The maximum length of a label name is 100 characters.
+//
+// Note: this does not truncate if a label is too long.
+func normalizeLabelKey(s string) string {
+ if len(s) == 0 {
+ return s
+ }
+ s = strings.Map(sanitizeRune, s)
+ if unicode.IsDigit(rune(s[0])) {
+ s = "key_" + s
+ }
+ return s
+}
+
+// converts anything that is not a letter or digit to an underscore.
+func sanitizeRune(r rune) rune {
+ if unicode.IsLetter(r) || unicode.IsDigit(r) {
+ return r
+ }
+ // Everything else turns into an underscore
+ return '_'
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go
new file mode 100644
index 000000000..701b10b10
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/option.go
@@ -0,0 +1,201 @@
+// Copyright 2020-2021 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package metric
+
+import (
+ "context"
+ "fmt"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/sdk/metric/metricdata"
+ semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
+
+ apioption "google.golang.org/api/option"
+)
+
+var userAgent = fmt.Sprintf("opentelemetry-go %s; google-cloud-metric-exporter %s", otel.Version(), Version())
+
+// MonitoredResourceDescription is the struct which holds information required to map OTel resource to specific
+// Google Cloud MonitoredResource.
+type MonitoredResourceDescription struct {
+ mrLabels map[string]struct{}
+ mrType string
+}
+
+// Option is function type that is passed to the exporter initialization function.
+type Option func(*options)
+
+// options is the struct to hold options for metricExporter and its client instance.
+type options struct {
+ // context allows you to provide a custom context for API calls.
+ //
+ // This context will be used several times: first, to create Cloud Monitoring
+ // clients, and then every time a new batch of metrics needs to be uploaded.
+ //
+ // If unset, context.Background() will be used.
+ context context.Context
+ // metricDescriptorTypeFormatter is the custom formtter for the MetricDescriptor.Type.
+ // By default, the format string is "workload.googleapis.com/[metric name]".
+ metricDescriptorTypeFormatter func(metricdata.Metrics) string
+ // resourceAttributeFilter determinies which resource attributes to
+ // add to metrics as metric labels. By default, it adds service.name,
+ // service.namespace, and service.instance.id.
+ resourceAttributeFilter attribute.Filter
+ // monitoredResourceDescription sets whether to attempt mapping the OTel Resource to a specific
+ // Google Cloud Monitored Resource. When provided, the exporter attempts to map only to the provided
+ // monitored resource type.
+ monitoredResourceDescription MonitoredResourceDescription
+ // projectID is the identifier of the Cloud Monitoring
+ // project the user is uploading the stats data to.
+ // If not set, this will default to your "Application Default Credentials".
+ // For details see: https://developers.google.com/accounts/docs/application-default-credentials.
+ //
+ // It will be used in the project_id label of a Google Cloud Monitoring monitored
+ // resource if the resource does not inherently belong to a specific
+ // project, e.g. on-premise resource like k8s_container or generic_task.
+ projectID string
+ // compression enables gzip compression on gRPC calls.
+ compression string
+ // monitoringClientOptions are additional options to be passed
+ // to the underlying Stackdriver Monitoring API client.
+ // Optional.
+ monitoringClientOptions []apioption.ClientOption
+ // destinationProjectQuota sets whether the request should use quota from
+ // the destination project for the request.
+ destinationProjectQuota bool
+
+ // disableCreateMetricDescriptors disables automatic MetricDescriptor creation
+ disableCreateMetricDescriptors bool
+
+ // enableSumOfSquaredDeviation enables calculation of an estimated sum of squared
+ // deviation. It isn't correct, so we don't send it by default.
+ enableSumOfSquaredDeviation bool
+
+ // createServiceTimeSeries sets whether to create timeseries using `CreateServiceTimeSeries`.
+ // Implicitly, this sets `disableCreateMetricDescriptors` to true.
+ createServiceTimeSeries bool
+}
+
+// WithProjectID sets Google Cloud Platform project as projectID.
+// Without using this option, it automatically detects the project ID
+// from the default credential detection process.
+// Please find the detailed order of the default credential detection process on the doc:
+// https://godoc.org/golang.org/x/oauth2/google#FindDefaultCredentials
+func WithProjectID(id string) func(o *options) {
+ return func(o *options) {
+ o.projectID = id
+ }
+}
+
+// WithDestinationProjectQuota enables per-request usage of the destination
+// project's quota. For example, when setting gcp.project.id on a metric.
+func WithDestinationProjectQuota() func(o *options) {
+ return func(o *options) {
+ o.destinationProjectQuota = true
+ }
+}
+
+// WithMonitoringClientOptions add the options for Cloud Monitoring client instance.
+// Available options are defined in.
+func WithMonitoringClientOptions(opts ...apioption.ClientOption) func(o *options) {
+ return func(o *options) {
+ o.monitoringClientOptions = append(o.monitoringClientOptions, opts...)
+ }
+}
+
+// WithMetricDescriptorTypeFormatter sets the custom formatter for MetricDescriptor.
+// Note that the format has to follow the convention defined in the official document.
+// The default is "workload.googleapis.com/[metric name]".
+// ref. https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom_metric_names
+func WithMetricDescriptorTypeFormatter(f func(metricdata.Metrics) string) func(o *options) {
+ return func(o *options) {
+ o.metricDescriptorTypeFormatter = f
+ }
+}
+
+// WithFilteredResourceAttributes determinies which resource attributes to
+// add to metrics as metric labels. By default, it adds service.name,
+// service.namespace, and service.instance.id. This is recommended to avoid
+// writing duplicate timeseries against the same monitored resource. Use
+// WithFilteredResourceAttributes(NoAttributes()) to disable the addition of
+// resource attributes to metric labels.
+func WithFilteredResourceAttributes(filter attribute.Filter) func(o *options) {
+ return func(o *options) {
+ o.resourceAttributeFilter = filter
+ }
+}
+
+// DefaultResourceAttributesFilter is the default filter applied to resource
+// attributes.
+func DefaultResourceAttributesFilter(kv attribute.KeyValue) bool {
+ return (kv.Key == semconv.ServiceNameKey ||
+ kv.Key == semconv.ServiceNamespaceKey ||
+ kv.Key == semconv.ServiceInstanceIDKey) && len(kv.Value.AsString()) > 0
+}
+
+// NoAttributes can be passed to WithFilteredResourceAttributes to disable
+// adding resource attributes as metric labels.
+func NoAttributes(attribute.KeyValue) bool {
+ return false
+}
+
+// WithDisableCreateMetricDescriptors will disable the automatic creation of
+// MetricDescriptors when an unknown metric is set to be exported.
+func WithDisableCreateMetricDescriptors() func(o *options) {
+ return func(o *options) {
+ o.disableCreateMetricDescriptors = true
+ }
+}
+
+// WithCompression sets the compression to use for gRPC requests.
+func WithCompression(c string) func(o *options) {
+ return func(o *options) {
+ o.compression = c
+ }
+}
+
+// WithSumOfSquaredDeviation sets the SumOfSquaredDeviation field on histograms.
+// It is an estimate, and is not the actual sum of squared deviations.
+func WithSumOfSquaredDeviation() func(o *options) {
+ return func(o *options) {
+ o.enableSumOfSquaredDeviation = true
+ }
+}
+
+// WithCreateServiceTimeSeries configures the exporter to use `CreateServiceTimeSeries` for creating timeseries.
+// If this is used, metric descriptors are not exported.
+func WithCreateServiceTimeSeries() func(o *options) {
+ return func(o *options) {
+ o.createServiceTimeSeries = true
+ o.disableCreateMetricDescriptors = true
+ }
+}
+
+// WithMonitoredResourceDescription configures the exporter to attempt to map the OpenTelemetry Resource to the provided
+// Google MonitoredResource. The provided mrLabels would be searched for in the OpenTelemetry Resource Attributes and if
+// found, would be included in the MonitoredResource labels.
+func WithMonitoredResourceDescription(mrType string, mrLabels []string) func(o *options) {
+ return func(o *options) {
+ mrLabelSet := make(map[string]struct{})
+ for _, label := range mrLabels {
+ mrLabelSet[label] = struct{}{}
+ }
+ o.monitoredResourceDescription = MonitoredResourceDescription{
+ mrType: mrType,
+ mrLabels: mrLabelSet,
+ }
+ }
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go
new file mode 100644
index 000000000..a8054fec3
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric/version.go
@@ -0,0 +1,21 @@
+// Copyright 2020 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package metric
+
+// Version is the current release version of the OpenTelemetry
+// Operations Metric Exporter in use.
+func Version() string {
+ return "0.49.0"
+}
diff --git a/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/LICENSE b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/LICENSE
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/LICENSE
@@ -0,0 +1,202 @@
+
+ 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/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/resourcemapping.go b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/resourcemapping.go
new file mode 100644
index 000000000..510391b82
--- /dev/null
+++ b/vendor/github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping/resourcemapping.go
@@ -0,0 +1,285 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// 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.
+
+package resourcemapping
+
+import (
+ "strings"
+
+ semconv "go.opentelemetry.io/otel/semconv/v1.24.0"
+ monitoredrespb "google.golang.org/genproto/googleapis/api/monitoredres"
+)
+
+const (
+ ProjectIDAttributeKey = "gcp.project.id"
+
+ awsAccount = "aws_account"
+ awsEc2Instance = "aws_ec2_instance"
+ clusterName = "cluster_name"
+ containerName = "container_name"
+ gceInstance = "gce_instance"
+ genericNode = "generic_node"
+ genericTask = "generic_task"
+ instanceID = "instance_id"
+ job = "job"
+ k8sCluster = "k8s_cluster"
+ k8sContainer = "k8s_container"
+ k8sNode = "k8s_node"
+ k8sPod = "k8s_pod"
+ location = "location"
+ namespace = "namespace"
+ namespaceName = "namespace_name"
+ nodeID = "node_id"
+ nodeName = "node_name"
+ podName = "pod_name"
+ region = "region"
+ taskID = "task_id"
+ zone = "zone"
+ gaeInstance = "gae_instance"
+ gaeApp = "gae_app"
+ gaeModuleID = "module_id"
+ gaeVersionID = "version_id"
+ cloudRunRevision = "cloud_run_revision"
+ cloudFunction = "cloud_function"
+ cloudFunctionName = "function_name"
+ serviceName = "service_name"
+ configurationName = "configuration_name"
+ revisionName = "revision_name"
+ bmsInstance = "baremetalsolution.googleapis.com/Instance"
+ unknownServicePrefix = "unknown_service"
+)
+
+var (
+ // monitoredResourceMappings contains mappings of GCM resource label keys onto mapping config from OTel
+ // resource for a given monitored resource type.
+ monitoredResourceMappings = map[string]map[string]struct {
+ // If none of the otelKeys are present in the Resource, fallback to this literal value
+ fallbackLiteral string
+ // OTel resource keys to try and populate the resource label from. For entries with
+ // multiple OTel resource keys, the keys' values will be coalesced in order until there
+ // is a non-empty value.
+ otelKeys []string
+ }{
+ gceInstance: {
+ zone: {otelKeys: []string{string(semconv.CloudAvailabilityZoneKey)}},
+ instanceID: {otelKeys: []string{string(semconv.HostIDKey)}},
+ },
+ k8sContainer: {
+ location: {otelKeys: []string{
+ string(semconv.CloudAvailabilityZoneKey),
+ string(semconv.CloudRegionKey),
+ }},
+ clusterName: {otelKeys: []string{string(semconv.K8SClusterNameKey)}},
+ namespaceName: {otelKeys: []string{string(semconv.K8SNamespaceNameKey)}},
+ podName: {otelKeys: []string{string(semconv.K8SPodNameKey)}},
+ containerName: {otelKeys: []string{string(semconv.K8SContainerNameKey)}},
+ },
+ k8sPod: {
+ location: {otelKeys: []string{
+ string(semconv.CloudAvailabilityZoneKey),
+ string(semconv.CloudRegionKey),
+ }},
+ clusterName: {otelKeys: []string{string(semconv.K8SClusterNameKey)}},
+ namespaceName: {otelKeys: []string{string(semconv.K8SNamespaceNameKey)}},
+ podName: {otelKeys: []string{string(semconv.K8SPodNameKey)}},
+ },
+ k8sNode: {
+ location: {otelKeys: []string{
+ string(semconv.CloudAvailabilityZoneKey),
+ string(semconv.CloudRegionKey),
+ }},
+ clusterName: {otelKeys: []string{string(semconv.K8SClusterNameKey)}},
+ nodeName: {otelKeys: []string{string(semconv.K8SNodeNameKey)}},
+ },
+ k8sCluster: {
+ location: {otelKeys: []string{
+ string(semconv.CloudAvailabilityZoneKey),
+ string(semconv.CloudRegionKey),
+ }},
+ clusterName: {otelKeys: []string{string(semconv.K8SClusterNameKey)}},
+ },
+ gaeInstance: {
+ location: {otelKeys: []string{
+ string(semconv.CloudAvailabilityZoneKey),
+ string(semconv.CloudRegionKey),
+ }},
+ gaeModuleID: {otelKeys: []string{string(semconv.FaaSNameKey)}},
+ gaeVersionID: {otelKeys: []string{string(semconv.FaaSVersionKey)}},
+ instanceID: {otelKeys: []string{string(semconv.FaaSInstanceKey)}},
+ },
+ gaeApp: {
+ location: {otelKeys: []string{
+ string(semconv.CloudAvailabilityZoneKey),
+ string(semconv.CloudRegionKey),
+ }},
+ gaeModuleID: {otelKeys: []string{string(semconv.FaaSNameKey)}},
+ gaeVersionID: {otelKeys: []string{string(semconv.FaaSVersionKey)}},
+ },
+ awsEc2Instance: {
+ instanceID: {otelKeys: []string{string(semconv.HostIDKey)}},
+ region: {
+ otelKeys: []string{
+ string(semconv.CloudAvailabilityZoneKey),
+ string(semconv.CloudRegionKey),
+ },
+ },
+ awsAccount: {otelKeys: []string{string(semconv.CloudAccountIDKey)}},
+ },
+ bmsInstance: {
+ location: {otelKeys: []string{string(semconv.CloudRegionKey)}},
+ instanceID: {otelKeys: []string{string(semconv.HostIDKey)}},
+ },
+ genericTask: {
+ location: {
+ otelKeys: []string{
+ string(semconv.CloudAvailabilityZoneKey),
+ string(semconv.CloudRegionKey),
+ },
+ fallbackLiteral: "global",
+ },
+ namespace: {otelKeys: []string{string(semconv.ServiceNamespaceKey)}},
+ job: {otelKeys: []string{string(semconv.ServiceNameKey), string(semconv.FaaSNameKey)}},
+ taskID: {otelKeys: []string{string(semconv.ServiceInstanceIDKey), string(semconv.FaaSInstanceKey)}},
+ },
+ genericNode: {
+ location: {
+ otelKeys: []string{
+ string(semconv.CloudAvailabilityZoneKey),
+ string(semconv.CloudRegionKey),
+ },
+ fallbackLiteral: "global",
+ },
+ namespace: {otelKeys: []string{string(semconv.ServiceNamespaceKey)}},
+ nodeID: {otelKeys: []string{string(semconv.HostIDKey), string(semconv.HostNameKey)}},
+ },
+ }
+)
+
+// ReadOnlyAttributes is an interface to abstract between pulling attributes from PData library or OTEL SDK.
+type ReadOnlyAttributes interface {
+ GetString(string) (string, bool)
+}
+
+// ResourceAttributesToLoggingMonitoredResource converts from a set of OTEL resource attributes into a
+// GCP monitored resource type and label set for Cloud Logging.
+// E.g.
+// This may output `gce_instance` type with appropriate labels.
+func ResourceAttributesToLoggingMonitoredResource(attrs ReadOnlyAttributes) *monitoredrespb.MonitoredResource {
+ cloudPlatform, _ := attrs.GetString(string(semconv.CloudPlatformKey))
+ switch cloudPlatform {
+ case semconv.CloudPlatformGCPAppEngine.Value.AsString():
+ return createMonitoredResource(gaeApp, attrs)
+ default:
+ return commonResourceAttributesToMonitoredResource(cloudPlatform, attrs)
+ }
+}
+
+// ResourceAttributesToMonitoringMonitoredResource converts from a set of OTEL resource attributes into a
+// GCP monitored resource type and label set for Cloud Monitoring
+// E.g.
+// This may output `gce_instance` type with appropriate labels.
+func ResourceAttributesToMonitoringMonitoredResource(attrs ReadOnlyAttributes) *monitoredrespb.MonitoredResource {
+ cloudPlatform, _ := attrs.GetString(string(semconv.CloudPlatformKey))
+ switch cloudPlatform {
+ case semconv.CloudPlatformGCPAppEngine.Value.AsString():
+ return createMonitoredResource(gaeInstance, attrs)
+ default:
+ return commonResourceAttributesToMonitoredResource(cloudPlatform, attrs)
+ }
+}
+
+func commonResourceAttributesToMonitoredResource(cloudPlatform string, attrs ReadOnlyAttributes) *monitoredrespb.MonitoredResource {
+ switch cloudPlatform {
+ case semconv.CloudPlatformGCPComputeEngine.Value.AsString():
+ return createMonitoredResource(gceInstance, attrs)
+ case semconv.CloudPlatformAWSEC2.Value.AsString():
+ return createMonitoredResource(awsEc2Instance, attrs)
+ // TODO(alex-basinov): replace this string literal with semconv.CloudPlatformGCPBareMetalSolution
+ // once https://github.com/open-telemetry/semantic-conventions/pull/64 makes its way
+ // into the semconv module.
+ case "gcp_bare_metal_solution":
+ return createMonitoredResource(bmsInstance, attrs)
+ default:
+ // if k8s.cluster.name is set, pattern match for various k8s resources.
+ // this will also match non-cloud k8s platforms like minikube.
+ if _, ok := attrs.GetString(string(semconv.K8SClusterNameKey)); ok {
+ // Try for most to least specific k8s_container, k8s_pod, etc
+ if _, ok := attrs.GetString(string(semconv.K8SContainerNameKey)); ok {
+ return createMonitoredResource(k8sContainer, attrs)
+ } else if _, ok := attrs.GetString(string(semconv.K8SPodNameKey)); ok {
+ return createMonitoredResource(k8sPod, attrs)
+ } else if _, ok := attrs.GetString(string(semconv.K8SNodeNameKey)); ok {
+ return createMonitoredResource(k8sNode, attrs)
+ }
+ return createMonitoredResource(k8sCluster, attrs)
+ }
+
+ // Fallback to generic_task
+ _, hasServiceName := attrs.GetString(string(semconv.ServiceNameKey))
+ _, hasFaaSName := attrs.GetString(string(semconv.FaaSNameKey))
+ _, hasServiceInstanceID := attrs.GetString(string(semconv.ServiceInstanceIDKey))
+ _, hasFaaSInstance := attrs.GetString(string(semconv.FaaSInstanceKey))
+ if (hasServiceName && hasServiceInstanceID) || (hasFaaSInstance && hasFaaSName) {
+ return createMonitoredResource(genericTask, attrs)
+ }
+
+ // Everything else fallback to generic_node
+ return createMonitoredResource(genericNode, attrs)
+ }
+}
+
+func createMonitoredResource(
+ monitoredResourceType string,
+ resourceAttrs ReadOnlyAttributes,
+) *monitoredrespb.MonitoredResource {
+ mappings := monitoredResourceMappings[monitoredResourceType]
+ mrLabels := make(map[string]string, len(mappings))
+
+ for mrKey, mappingConfig := range mappings {
+ mrValue := ""
+ ok := false
+ // Coalesce the possible keys in order
+ for _, otelKey := range mappingConfig.otelKeys {
+ mrValue, ok = resourceAttrs.GetString(otelKey)
+ if mrValue != "" && !strings.HasPrefix(mrValue, unknownServicePrefix) {
+ break
+ }
+ }
+ if mrValue == "" && contains(mappingConfig.otelKeys, string(semconv.ServiceNameKey)) {
+ // the service name started with unknown_service, and was ignored above
+ mrValue, ok = resourceAttrs.GetString(string(semconv.ServiceNameKey))
+ }
+ if !ok || mrValue == "" {
+ mrValue = mappingConfig.fallbackLiteral
+ }
+ mrLabels[mrKey] = sanitizeUTF8(mrValue)
+ }
+ return &monitoredrespb.MonitoredResource{
+ Type: monitoredResourceType,
+ Labels: mrLabels,
+ }
+}
+
+func contains(list []string, element string) bool {
+ for _, item := range list {
+ if item == element {
+ return true
+ }
+ }
+ return false
+}
+
+func sanitizeUTF8(s string) string {
+ return strings.ToValidUTF8(s, "�")
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/AUTHORS b/vendor/github.com/ProtonMail/go-crypto/AUTHORS
new file mode 100644
index 000000000..2b00ddba0
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/AUTHORS
@@ -0,0 +1,3 @@
+# This source code refers to The Go Authors for copyright purposes.
+# The master list of authors is in the main Go distribution,
+# visible at https://tip.golang.org/AUTHORS.
diff --git a/vendor/github.com/ProtonMail/go-crypto/CONTRIBUTORS b/vendor/github.com/ProtonMail/go-crypto/CONTRIBUTORS
new file mode 100644
index 000000000..1fbd3e976
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/CONTRIBUTORS
@@ -0,0 +1,3 @@
+# This source code was written by the Go contributors.
+# The master list of contributors is in the main Go distribution,
+# visible at https://tip.golang.org/CONTRIBUTORS.
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/LICENSE b/vendor/github.com/ProtonMail/go-crypto/LICENSE
similarity index 100%
rename from vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/LICENSE
rename to vendor/github.com/ProtonMail/go-crypto/LICENSE
diff --git a/vendor/github.com/ProtonMail/go-crypto/PATENTS b/vendor/github.com/ProtonMail/go-crypto/PATENTS
new file mode 100644
index 000000000..733099041
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/PATENTS
@@ -0,0 +1,22 @@
+Additional IP Rights Grant (Patents)
+
+"This implementation" means the copyrightable works distributed by
+Google as part of the Go project.
+
+Google 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,
+transfer and otherwise run, modify and propagate the contents of this
+implementation of Go, where such license applies only to those patent
+claims, both currently owned or controlled by Google and acquired in
+the future, licensable by Google that are necessarily infringed by this
+implementation of Go. This grant does not include claims that would be
+infringed only as a consequence of further modification of this
+implementation. If you or your agent or exclusive licensee institute or
+order or agree to the institution of patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging
+that this implementation of Go or any code incorporated within this
+implementation of Go constitutes direct or contributory patent
+infringement, or inducement of patent infringement, then any patent
+rights granted to you under this License for this implementation of Go
+shall terminate as of the date such litigation is filed.
diff --git a/vendor/github.com/ProtonMail/go-crypto/bitcurves/bitcurve.go b/vendor/github.com/ProtonMail/go-crypto/bitcurves/bitcurve.go
new file mode 100644
index 000000000..c85e6befe
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/bitcurves/bitcurve.go
@@ -0,0 +1,381 @@
+package bitcurves
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Copyright 2011 ThePiachu. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package bitelliptic implements several Koblitz elliptic curves over prime
+// fields.
+
+// This package operates, internally, on Jacobian coordinates. For a given
+// (x, y) position on the curve, the Jacobian coordinates are (x1, y1, z1)
+// where x = x1/z1² and y = y1/z1³. The greatest speedups come when the whole
+// calculation can be performed within the transform (as in ScalarMult and
+// ScalarBaseMult). But even for Add and Double, it's faster to apply and
+// reverse the transform than to operate in affine coordinates.
+
+import (
+ "crypto/elliptic"
+ "io"
+ "math/big"
+ "sync"
+)
+
+// A BitCurve represents a Koblitz Curve with a=0.
+// See http://www.hyperelliptic.org/EFD/g1p/auto-shortw.html
+type BitCurve struct {
+ Name string
+ P *big.Int // the order of the underlying field
+ N *big.Int // the order of the base point
+ B *big.Int // the constant of the BitCurve equation
+ Gx, Gy *big.Int // (x,y) of the base point
+ BitSize int // the size of the underlying field
+}
+
+// Params returns the parameters of the given BitCurve (see BitCurve struct)
+func (bitCurve *BitCurve) Params() (cp *elliptic.CurveParams) {
+ cp = new(elliptic.CurveParams)
+ cp.Name = bitCurve.Name
+ cp.P = bitCurve.P
+ cp.N = bitCurve.N
+ cp.Gx = bitCurve.Gx
+ cp.Gy = bitCurve.Gy
+ cp.BitSize = bitCurve.BitSize
+ return cp
+}
+
+// IsOnCurve returns true if the given (x,y) lies on the BitCurve.
+func (bitCurve *BitCurve) IsOnCurve(x, y *big.Int) bool {
+ // y² = x³ + b
+ y2 := new(big.Int).Mul(y, y) //y²
+ y2.Mod(y2, bitCurve.P) //y²%P
+
+ x3 := new(big.Int).Mul(x, x) //x²
+ x3.Mul(x3, x) //x³
+
+ x3.Add(x3, bitCurve.B) //x³+B
+ x3.Mod(x3, bitCurve.P) //(x³+B)%P
+
+ return x3.Cmp(y2) == 0
+}
+
+// affineFromJacobian reverses the Jacobian transform. See the comment at the
+// top of the file.
+func (bitCurve *BitCurve) affineFromJacobian(x, y, z *big.Int) (xOut, yOut *big.Int) {
+ if z.Cmp(big.NewInt(0)) == 0 {
+ panic("bitcurve: Can't convert to affine with Jacobian Z = 0")
+ }
+ // x = YZ^2 mod P
+ zinv := new(big.Int).ModInverse(z, bitCurve.P)
+ zinvsq := new(big.Int).Mul(zinv, zinv)
+
+ xOut = new(big.Int).Mul(x, zinvsq)
+ xOut.Mod(xOut, bitCurve.P)
+ // y = YZ^3 mod P
+ zinvsq.Mul(zinvsq, zinv)
+ yOut = new(big.Int).Mul(y, zinvsq)
+ yOut.Mod(yOut, bitCurve.P)
+ return xOut, yOut
+}
+
+// Add returns the sum of (x1,y1) and (x2,y2)
+func (bitCurve *BitCurve) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) {
+ z := new(big.Int).SetInt64(1)
+ x, y, z := bitCurve.addJacobian(x1, y1, z, x2, y2, z)
+ return bitCurve.affineFromJacobian(x, y, z)
+}
+
+// addJacobian takes two points in Jacobian coordinates, (x1, y1, z1) and
+// (x2, y2, z2) and returns their sum, also in Jacobian form.
+func (bitCurve *BitCurve) addJacobian(x1, y1, z1, x2, y2, z2 *big.Int) (*big.Int, *big.Int, *big.Int) {
+ // See http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#addition-add-2007-bl
+ z1z1 := new(big.Int).Mul(z1, z1)
+ z1z1.Mod(z1z1, bitCurve.P)
+ z2z2 := new(big.Int).Mul(z2, z2)
+ z2z2.Mod(z2z2, bitCurve.P)
+
+ u1 := new(big.Int).Mul(x1, z2z2)
+ u1.Mod(u1, bitCurve.P)
+ u2 := new(big.Int).Mul(x2, z1z1)
+ u2.Mod(u2, bitCurve.P)
+ h := new(big.Int).Sub(u2, u1)
+ if h.Sign() == -1 {
+ h.Add(h, bitCurve.P)
+ }
+ i := new(big.Int).Lsh(h, 1)
+ i.Mul(i, i)
+ j := new(big.Int).Mul(h, i)
+
+ s1 := new(big.Int).Mul(y1, z2)
+ s1.Mul(s1, z2z2)
+ s1.Mod(s1, bitCurve.P)
+ s2 := new(big.Int).Mul(y2, z1)
+ s2.Mul(s2, z1z1)
+ s2.Mod(s2, bitCurve.P)
+ r := new(big.Int).Sub(s2, s1)
+ if r.Sign() == -1 {
+ r.Add(r, bitCurve.P)
+ }
+ r.Lsh(r, 1)
+ v := new(big.Int).Mul(u1, i)
+
+ x3 := new(big.Int).Set(r)
+ x3.Mul(x3, x3)
+ x3.Sub(x3, j)
+ x3.Sub(x3, v)
+ x3.Sub(x3, v)
+ x3.Mod(x3, bitCurve.P)
+
+ y3 := new(big.Int).Set(r)
+ v.Sub(v, x3)
+ y3.Mul(y3, v)
+ s1.Mul(s1, j)
+ s1.Lsh(s1, 1)
+ y3.Sub(y3, s1)
+ y3.Mod(y3, bitCurve.P)
+
+ z3 := new(big.Int).Add(z1, z2)
+ z3.Mul(z3, z3)
+ z3.Sub(z3, z1z1)
+ if z3.Sign() == -1 {
+ z3.Add(z3, bitCurve.P)
+ }
+ z3.Sub(z3, z2z2)
+ if z3.Sign() == -1 {
+ z3.Add(z3, bitCurve.P)
+ }
+ z3.Mul(z3, h)
+ z3.Mod(z3, bitCurve.P)
+
+ return x3, y3, z3
+}
+
+// Double returns 2*(x,y)
+func (bitCurve *BitCurve) Double(x1, y1 *big.Int) (*big.Int, *big.Int) {
+ z1 := new(big.Int).SetInt64(1)
+ return bitCurve.affineFromJacobian(bitCurve.doubleJacobian(x1, y1, z1))
+}
+
+// doubleJacobian takes a point in Jacobian coordinates, (x, y, z), and
+// returns its double, also in Jacobian form.
+func (bitCurve *BitCurve) doubleJacobian(x, y, z *big.Int) (*big.Int, *big.Int, *big.Int) {
+ // See http://hyperelliptic.org/EFD/g1p/auto-shortw-jacobian-0.html#doubling-dbl-2009-l
+
+ a := new(big.Int).Mul(x, x) //X1²
+ b := new(big.Int).Mul(y, y) //Y1²
+ c := new(big.Int).Mul(b, b) //B²
+
+ d := new(big.Int).Add(x, b) //X1+B
+ d.Mul(d, d) //(X1+B)²
+ d.Sub(d, a) //(X1+B)²-A
+ d.Sub(d, c) //(X1+B)²-A-C
+ d.Mul(d, big.NewInt(2)) //2*((X1+B)²-A-C)
+
+ e := new(big.Int).Mul(big.NewInt(3), a) //3*A
+ f := new(big.Int).Mul(e, e) //E²
+
+ x3 := new(big.Int).Mul(big.NewInt(2), d) //2*D
+ x3.Sub(f, x3) //F-2*D
+ x3.Mod(x3, bitCurve.P)
+
+ y3 := new(big.Int).Sub(d, x3) //D-X3
+ y3.Mul(e, y3) //E*(D-X3)
+ y3.Sub(y3, new(big.Int).Mul(big.NewInt(8), c)) //E*(D-X3)-8*C
+ y3.Mod(y3, bitCurve.P)
+
+ z3 := new(big.Int).Mul(y, z) //Y1*Z1
+ z3.Mul(big.NewInt(2), z3) //3*Y1*Z1
+ z3.Mod(z3, bitCurve.P)
+
+ return x3, y3, z3
+}
+
+// TODO: double check if it is okay
+// ScalarMult returns k*(Bx,By) where k is a number in big-endian form.
+func (bitCurve *BitCurve) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.Int) {
+ // We have a slight problem in that the identity of the group (the
+ // point at infinity) cannot be represented in (x, y) form on a finite
+ // machine. Thus the standard add/double algorithm has to be tweaked
+ // slightly: our initial state is not the identity, but x, and we
+ // ignore the first true bit in |k|. If we don't find any true bits in
+ // |k|, then we return nil, nil, because we cannot return the identity
+ // element.
+
+ Bz := new(big.Int).SetInt64(1)
+ x := Bx
+ y := By
+ z := Bz
+
+ seenFirstTrue := false
+ for _, byte := range k {
+ for bitNum := 0; bitNum < 8; bitNum++ {
+ if seenFirstTrue {
+ x, y, z = bitCurve.doubleJacobian(x, y, z)
+ }
+ if byte&0x80 == 0x80 {
+ if !seenFirstTrue {
+ seenFirstTrue = true
+ } else {
+ x, y, z = bitCurve.addJacobian(Bx, By, Bz, x, y, z)
+ }
+ }
+ byte <<= 1
+ }
+ }
+
+ if !seenFirstTrue {
+ return nil, nil
+ }
+
+ return bitCurve.affineFromJacobian(x, y, z)
+}
+
+// ScalarBaseMult returns k*G, where G is the base point of the group and k is
+// an integer in big-endian form.
+func (bitCurve *BitCurve) ScalarBaseMult(k []byte) (*big.Int, *big.Int) {
+ return bitCurve.ScalarMult(bitCurve.Gx, bitCurve.Gy, k)
+}
+
+var mask = []byte{0xff, 0x1, 0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f}
+
+// TODO: double check if it is okay
+// GenerateKey returns a public/private key pair. The private key is generated
+// using the given reader, which must return random data.
+func (bitCurve *BitCurve) GenerateKey(rand io.Reader) (priv []byte, x, y *big.Int, err error) {
+ byteLen := (bitCurve.BitSize + 7) >> 3
+ priv = make([]byte, byteLen)
+
+ for x == nil {
+ _, err = io.ReadFull(rand, priv)
+ if err != nil {
+ return
+ }
+ // We have to mask off any excess bits in the case that the size of the
+ // underlying field is not a whole number of bytes.
+ priv[0] &= mask[bitCurve.BitSize%8]
+ // This is because, in tests, rand will return all zeros and we don't
+ // want to get the point at infinity and loop forever.
+ priv[1] ^= 0x42
+ x, y = bitCurve.ScalarBaseMult(priv)
+ }
+ return
+}
+
+// Marshal converts a point into the form specified in section 4.3.6 of ANSI
+// X9.62.
+func (bitCurve *BitCurve) Marshal(x, y *big.Int) []byte {
+ byteLen := (bitCurve.BitSize + 7) >> 3
+
+ ret := make([]byte, 1+2*byteLen)
+ ret[0] = 4 // uncompressed point
+
+ xBytes := x.Bytes()
+ copy(ret[1+byteLen-len(xBytes):], xBytes)
+ yBytes := y.Bytes()
+ copy(ret[1+2*byteLen-len(yBytes):], yBytes)
+ return ret
+}
+
+// Unmarshal converts a point, serialised by Marshal, into an x, y pair. On
+// error, x = nil.
+func (bitCurve *BitCurve) Unmarshal(data []byte) (x, y *big.Int) {
+ byteLen := (bitCurve.BitSize + 7) >> 3
+ if len(data) != 1+2*byteLen {
+ return
+ }
+ if data[0] != 4 { // uncompressed form
+ return
+ }
+ x = new(big.Int).SetBytes(data[1 : 1+byteLen])
+ y = new(big.Int).SetBytes(data[1+byteLen:])
+ return
+}
+
+//curve parameters taken from:
+//http://www.secg.org/collateral/sec2_final.pdf
+
+var initonce sync.Once
+var secp160k1 *BitCurve
+var secp192k1 *BitCurve
+var secp224k1 *BitCurve
+var secp256k1 *BitCurve
+
+func initAll() {
+ initS160()
+ initS192()
+ initS224()
+ initS256()
+}
+
+func initS160() {
+ // See SEC 2 section 2.4.1
+ secp160k1 = new(BitCurve)
+ secp160k1.Name = "secp160k1"
+ secp160k1.P, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73", 16)
+ secp160k1.N, _ = new(big.Int).SetString("0100000000000000000001B8FA16DFAB9ACA16B6B3", 16)
+ secp160k1.B, _ = new(big.Int).SetString("0000000000000000000000000000000000000007", 16)
+ secp160k1.Gx, _ = new(big.Int).SetString("3B4C382CE37AA192A4019E763036F4F5DD4D7EBB", 16)
+ secp160k1.Gy, _ = new(big.Int).SetString("938CF935318FDCED6BC28286531733C3F03C4FEE", 16)
+ secp160k1.BitSize = 160
+}
+
+func initS192() {
+ // See SEC 2 section 2.5.1
+ secp192k1 = new(BitCurve)
+ secp192k1.Name = "secp192k1"
+ secp192k1.P, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37", 16)
+ secp192k1.N, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D", 16)
+ secp192k1.B, _ = new(big.Int).SetString("000000000000000000000000000000000000000000000003", 16)
+ secp192k1.Gx, _ = new(big.Int).SetString("DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D", 16)
+ secp192k1.Gy, _ = new(big.Int).SetString("9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D", 16)
+ secp192k1.BitSize = 192
+}
+
+func initS224() {
+ // See SEC 2 section 2.6.1
+ secp224k1 = new(BitCurve)
+ secp224k1.Name = "secp224k1"
+ secp224k1.P, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D", 16)
+ secp224k1.N, _ = new(big.Int).SetString("010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7", 16)
+ secp224k1.B, _ = new(big.Int).SetString("00000000000000000000000000000000000000000000000000000005", 16)
+ secp224k1.Gx, _ = new(big.Int).SetString("A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C", 16)
+ secp224k1.Gy, _ = new(big.Int).SetString("7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5", 16)
+ secp224k1.BitSize = 224
+}
+
+func initS256() {
+ // See SEC 2 section 2.7.1
+ secp256k1 = new(BitCurve)
+ secp256k1.Name = "secp256k1"
+ secp256k1.P, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F", 16)
+ secp256k1.N, _ = new(big.Int).SetString("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141", 16)
+ secp256k1.B, _ = new(big.Int).SetString("0000000000000000000000000000000000000000000000000000000000000007", 16)
+ secp256k1.Gx, _ = new(big.Int).SetString("79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798", 16)
+ secp256k1.Gy, _ = new(big.Int).SetString("483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8", 16)
+ secp256k1.BitSize = 256
+}
+
+// S160 returns a BitCurve which implements secp160k1 (see SEC 2 section 2.4.1)
+func S160() *BitCurve {
+ initonce.Do(initAll)
+ return secp160k1
+}
+
+// S192 returns a BitCurve which implements secp192k1 (see SEC 2 section 2.5.1)
+func S192() *BitCurve {
+ initonce.Do(initAll)
+ return secp192k1
+}
+
+// S224 returns a BitCurve which implements secp224k1 (see SEC 2 section 2.6.1)
+func S224() *BitCurve {
+ initonce.Do(initAll)
+ return secp224k1
+}
+
+// S256 returns a BitCurve which implements bitcurves (see SEC 2 section 2.7.1)
+func S256() *BitCurve {
+ initonce.Do(initAll)
+ return secp256k1
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/brainpool/brainpool.go b/vendor/github.com/ProtonMail/go-crypto/brainpool/brainpool.go
new file mode 100644
index 000000000..cb6676de2
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/brainpool/brainpool.go
@@ -0,0 +1,134 @@
+// Package brainpool implements Brainpool elliptic curves.
+// Implementation of rcurves is from github.com/ebfe/brainpool
+// Note that these curves are implemented with naive, non-constant time operations
+// and are likely not suitable for environments where timing attacks are a concern.
+package brainpool
+
+import (
+ "crypto/elliptic"
+ "math/big"
+ "sync"
+)
+
+var (
+ once sync.Once
+ p256t1, p384t1, p512t1 *elliptic.CurveParams
+ p256r1, p384r1, p512r1 *rcurve
+)
+
+func initAll() {
+ initP256t1()
+ initP384t1()
+ initP512t1()
+ initP256r1()
+ initP384r1()
+ initP512r1()
+}
+
+func initP256t1() {
+ p256t1 = &elliptic.CurveParams{Name: "brainpoolP256t1"}
+ p256t1.P, _ = new(big.Int).SetString("A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377", 16)
+ p256t1.N, _ = new(big.Int).SetString("A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7", 16)
+ p256t1.B, _ = new(big.Int).SetString("662C61C430D84EA4FE66A7733D0B76B7BF93EBC4AF2F49256AE58101FEE92B04", 16)
+ p256t1.Gx, _ = new(big.Int).SetString("A3E8EB3CC1CFE7B7732213B23A656149AFA142C47AAFBC2B79A191562E1305F4", 16)
+ p256t1.Gy, _ = new(big.Int).SetString("2D996C823439C56D7F7B22E14644417E69BCB6DE39D027001DABE8F35B25C9BE", 16)
+ p256t1.BitSize = 256
+}
+
+func initP256r1() {
+ twisted := p256t1
+ params := &elliptic.CurveParams{
+ Name: "brainpoolP256r1",
+ P: twisted.P,
+ N: twisted.N,
+ BitSize: twisted.BitSize,
+ }
+ params.Gx, _ = new(big.Int).SetString("8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262", 16)
+ params.Gy, _ = new(big.Int).SetString("547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997", 16)
+ z, _ := new(big.Int).SetString("3E2D4BD9597B58639AE7AA669CAB9837CF5CF20A2C852D10F655668DFC150EF0", 16)
+ p256r1 = newrcurve(twisted, params, z)
+}
+
+func initP384t1() {
+ p384t1 = &elliptic.CurveParams{Name: "brainpoolP384t1"}
+ p384t1.P, _ = new(big.Int).SetString("8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123ACD3A729901D1A71874700133107EC53", 16)
+ p384t1.N, _ = new(big.Int).SetString("8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7CF3AB6AF6B7FC3103B883202E9046565", 16)
+ p384t1.B, _ = new(big.Int).SetString("7F519EADA7BDA81BD826DBA647910F8C4B9346ED8CCDC64E4B1ABD11756DCE1D2074AA263B88805CED70355A33B471EE", 16)
+ p384t1.Gx, _ = new(big.Int).SetString("18DE98B02DB9A306F2AFCD7235F72A819B80AB12EBD653172476FECD462AABFFC4FF191B946A5F54D8D0AA2F418808CC", 16)
+ p384t1.Gy, _ = new(big.Int).SetString("25AB056962D30651A114AFD2755AD336747F93475B7A1FCA3B88F2B6A208CCFE469408584DC2B2912675BF5B9E582928", 16)
+ p384t1.BitSize = 384
+}
+
+func initP384r1() {
+ twisted := p384t1
+ params := &elliptic.CurveParams{
+ Name: "brainpoolP384r1",
+ P: twisted.P,
+ N: twisted.N,
+ BitSize: twisted.BitSize,
+ }
+ params.Gx, _ = new(big.Int).SetString("1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8E826E03436D646AAEF87B2E247D4AF1E", 16)
+ params.Gy, _ = new(big.Int).SetString("8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF99129280E4646217791811142820341263C5315", 16)
+ z, _ := new(big.Int).SetString("41DFE8DD399331F7166A66076734A89CD0D2BCDB7D068E44E1F378F41ECBAE97D2D63DBC87BCCDDCCC5DA39E8589291C", 16)
+ p384r1 = newrcurve(twisted, params, z)
+}
+
+func initP512t1() {
+ p512t1 = &elliptic.CurveParams{Name: "brainpoolP512t1"}
+ p512t1.P, _ = new(big.Int).SetString("AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA703308717D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3", 16)
+ p512t1.N, _ = new(big.Int).SetString("AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069", 16)
+ p512t1.B, _ = new(big.Int).SetString("7CBBBCF9441CFAB76E1890E46884EAE321F70C0BCB4981527897504BEC3E36A62BCDFA2304976540F6450085F2DAE145C22553B465763689180EA2571867423E", 16)
+ p512t1.Gx, _ = new(big.Int).SetString("640ECE5C12788717B9C1BA06CBC2A6FEBA85842458C56DDE9DB1758D39C0313D82BA51735CDB3EA499AA77A7D6943A64F7A3F25FE26F06B51BAA2696FA9035DA", 16)
+ p512t1.Gy, _ = new(big.Int).SetString("5B534BD595F5AF0FA2C892376C84ACE1BB4E3019B71634C01131159CAE03CEE9D9932184BEEF216BD71DF2DADF86A627306ECFF96DBB8BACE198B61E00F8B332", 16)
+ p512t1.BitSize = 512
+}
+
+func initP512r1() {
+ twisted := p512t1
+ params := &elliptic.CurveParams{
+ Name: "brainpoolP512r1",
+ P: twisted.P,
+ N: twisted.N,
+ BitSize: twisted.BitSize,
+ }
+ params.Gx, _ = new(big.Int).SetString("81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098EFF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822", 16)
+ params.Gy, _ = new(big.Int).SetString("7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892", 16)
+ z, _ := new(big.Int).SetString("12EE58E6764838B69782136F0F2D3BA06E27695716054092E60A80BEDB212B64E585D90BCE13761F85C3F1D2A64E3BE8FEA2220F01EBA5EEB0F35DBD29D922AB", 16)
+ p512r1 = newrcurve(twisted, params, z)
+}
+
+// P256t1 returns a Curve which implements Brainpool P256t1 (see RFC 5639, section 3.4)
+func P256t1() elliptic.Curve {
+ once.Do(initAll)
+ return p256t1
+}
+
+// P256r1 returns a Curve which implements Brainpool P256r1 (see RFC 5639, section 3.4)
+func P256r1() elliptic.Curve {
+ once.Do(initAll)
+ return p256r1
+}
+
+// P384t1 returns a Curve which implements Brainpool P384t1 (see RFC 5639, section 3.6)
+func P384t1() elliptic.Curve {
+ once.Do(initAll)
+ return p384t1
+}
+
+// P384r1 returns a Curve which implements Brainpool P384r1 (see RFC 5639, section 3.6)
+func P384r1() elliptic.Curve {
+ once.Do(initAll)
+ return p384r1
+}
+
+// P512t1 returns a Curve which implements Brainpool P512t1 (see RFC 5639, section 3.7)
+func P512t1() elliptic.Curve {
+ once.Do(initAll)
+ return p512t1
+}
+
+// P512r1 returns a Curve which implements Brainpool P512r1 (see RFC 5639, section 3.7)
+func P512r1() elliptic.Curve {
+ once.Do(initAll)
+ return p512r1
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/brainpool/rcurve.go b/vendor/github.com/ProtonMail/go-crypto/brainpool/rcurve.go
new file mode 100644
index 000000000..7e291d6aa
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/brainpool/rcurve.go
@@ -0,0 +1,83 @@
+package brainpool
+
+import (
+ "crypto/elliptic"
+ "math/big"
+)
+
+var _ elliptic.Curve = (*rcurve)(nil)
+
+type rcurve struct {
+ twisted elliptic.Curve
+ params *elliptic.CurveParams
+ z *big.Int
+ zinv *big.Int
+ z2 *big.Int
+ z3 *big.Int
+ zinv2 *big.Int
+ zinv3 *big.Int
+}
+
+var (
+ two = big.NewInt(2)
+ three = big.NewInt(3)
+)
+
+func newrcurve(twisted elliptic.Curve, params *elliptic.CurveParams, z *big.Int) *rcurve {
+ zinv := new(big.Int).ModInverse(z, params.P)
+ return &rcurve{
+ twisted: twisted,
+ params: params,
+ z: z,
+ zinv: zinv,
+ z2: new(big.Int).Exp(z, two, params.P),
+ z3: new(big.Int).Exp(z, three, params.P),
+ zinv2: new(big.Int).Exp(zinv, two, params.P),
+ zinv3: new(big.Int).Exp(zinv, three, params.P),
+ }
+}
+
+func (curve *rcurve) toTwisted(x, y *big.Int) (*big.Int, *big.Int) {
+ var tx, ty big.Int
+ tx.Mul(x, curve.z2)
+ tx.Mod(&tx, curve.params.P)
+ ty.Mul(y, curve.z3)
+ ty.Mod(&ty, curve.params.P)
+ return &tx, &ty
+}
+
+func (curve *rcurve) fromTwisted(tx, ty *big.Int) (*big.Int, *big.Int) {
+ var x, y big.Int
+ x.Mul(tx, curve.zinv2)
+ x.Mod(&x, curve.params.P)
+ y.Mul(ty, curve.zinv3)
+ y.Mod(&y, curve.params.P)
+ return &x, &y
+}
+
+func (curve *rcurve) Params() *elliptic.CurveParams {
+ return curve.params
+}
+
+func (curve *rcurve) IsOnCurve(x, y *big.Int) bool {
+ return curve.twisted.IsOnCurve(curve.toTwisted(x, y))
+}
+
+func (curve *rcurve) Add(x1, y1, x2, y2 *big.Int) (x, y *big.Int) {
+ tx1, ty1 := curve.toTwisted(x1, y1)
+ tx2, ty2 := curve.toTwisted(x2, y2)
+ return curve.fromTwisted(curve.twisted.Add(tx1, ty1, tx2, ty2))
+}
+
+func (curve *rcurve) Double(x1, y1 *big.Int) (x, y *big.Int) {
+ return curve.fromTwisted(curve.twisted.Double(curve.toTwisted(x1, y1)))
+}
+
+func (curve *rcurve) ScalarMult(x1, y1 *big.Int, scalar []byte) (x, y *big.Int) {
+ tx1, ty1 := curve.toTwisted(x1, y1)
+ return curve.fromTwisted(curve.twisted.ScalarMult(tx1, ty1, scalar))
+}
+
+func (curve *rcurve) ScalarBaseMult(scalar []byte) (x, y *big.Int) {
+ return curve.fromTwisted(curve.twisted.ScalarBaseMult(scalar))
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/eax/eax.go b/vendor/github.com/ProtonMail/go-crypto/eax/eax.go
new file mode 100644
index 000000000..3ae91d594
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/eax/eax.go
@@ -0,0 +1,162 @@
+// Copyright (C) 2019 ProtonTech AG
+
+// Package eax provides an implementation of the EAX
+// (encrypt-authenticate-translate) mode of operation, as described in
+// Bellare, Rogaway, and Wagner "THE EAX MODE OF OPERATION: A TWO-PASS
+// AUTHENTICATED-ENCRYPTION SCHEME OPTIMIZED FOR SIMPLICITY AND EFFICIENCY."
+// In FSE'04, volume 3017 of LNCS, 2004
+package eax
+
+import (
+ "crypto/cipher"
+ "crypto/subtle"
+ "errors"
+ "github.com/ProtonMail/go-crypto/internal/byteutil"
+)
+
+const (
+ defaultTagSize = 16
+ defaultNonceSize = 16
+)
+
+type eax struct {
+ block cipher.Block // Only AES-{128, 192, 256} supported
+ tagSize int // At least 12 bytes recommended
+ nonceSize int
+}
+
+func (e *eax) NonceSize() int {
+ return e.nonceSize
+}
+
+func (e *eax) Overhead() int {
+ return e.tagSize
+}
+
+// NewEAX returns an EAX instance with AES-{KEYLENGTH} and default nonce and
+// tag lengths. Supports {128, 192, 256}- bit key length.
+func NewEAX(block cipher.Block) (cipher.AEAD, error) {
+ return NewEAXWithNonceAndTagSize(block, defaultNonceSize, defaultTagSize)
+}
+
+// NewEAXWithNonceAndTagSize returns an EAX instance with AES-{keyLength} and
+// given nonce and tag lengths in bytes. Panics on zero nonceSize and
+// exceedingly long tags.
+//
+// It is recommended to use at least 12 bytes as tag length (see, for instance,
+// NIST SP 800-38D).
+//
+// Only to be used for compatibility with existing cryptosystems with
+// non-standard parameters. For all other cases, prefer NewEAX.
+func NewEAXWithNonceAndTagSize(
+ block cipher.Block, nonceSize, tagSize int) (cipher.AEAD, error) {
+ if nonceSize < 1 {
+ return nil, eaxError("Cannot initialize EAX with nonceSize = 0")
+ }
+ if tagSize > block.BlockSize() {
+ return nil, eaxError("Custom tag length exceeds blocksize")
+ }
+ return &eax{
+ block: block,
+ tagSize: tagSize,
+ nonceSize: nonceSize,
+ }, nil
+}
+
+func (e *eax) Seal(dst, nonce, plaintext, adata []byte) []byte {
+ if len(nonce) > e.nonceSize {
+ panic("crypto/eax: Nonce too long for this instance")
+ }
+ ret, out := byteutil.SliceForAppend(dst, len(plaintext)+e.tagSize)
+ omacNonce := e.omacT(0, nonce)
+ omacAdata := e.omacT(1, adata)
+
+ // Encrypt message using CTR mode and omacNonce as IV
+ ctr := cipher.NewCTR(e.block, omacNonce)
+ ciphertextData := out[:len(plaintext)]
+ ctr.XORKeyStream(ciphertextData, plaintext)
+
+ omacCiphertext := e.omacT(2, ciphertextData)
+
+ tag := out[len(plaintext):]
+ for i := 0; i < e.tagSize; i++ {
+ tag[i] = omacCiphertext[i] ^ omacNonce[i] ^ omacAdata[i]
+ }
+ return ret
+}
+
+func (e *eax) Open(dst, nonce, ciphertext, adata []byte) ([]byte, error) {
+ if len(nonce) > e.nonceSize {
+ panic("crypto/eax: Nonce too long for this instance")
+ }
+ if len(ciphertext) < e.tagSize {
+ return nil, eaxError("Ciphertext shorter than tag length")
+ }
+ sep := len(ciphertext) - e.tagSize
+
+ // Compute tag
+ omacNonce := e.omacT(0, nonce)
+ omacAdata := e.omacT(1, adata)
+ omacCiphertext := e.omacT(2, ciphertext[:sep])
+
+ tag := make([]byte, e.tagSize)
+ for i := 0; i < e.tagSize; i++ {
+ tag[i] = omacCiphertext[i] ^ omacNonce[i] ^ omacAdata[i]
+ }
+
+ // Compare tags
+ if subtle.ConstantTimeCompare(ciphertext[sep:], tag) != 1 {
+ return nil, eaxError("Tag authentication failed")
+ }
+
+ // Decrypt ciphertext
+ ret, out := byteutil.SliceForAppend(dst, len(ciphertext))
+ ctr := cipher.NewCTR(e.block, omacNonce)
+ ctr.XORKeyStream(out, ciphertext[:sep])
+
+ return ret[:sep], nil
+}
+
+// Tweakable OMAC - Calls OMAC_K([t]_n || plaintext)
+func (e *eax) omacT(t byte, plaintext []byte) []byte {
+ blockSize := e.block.BlockSize()
+ byteT := make([]byte, blockSize)
+ byteT[blockSize-1] = t
+ concat := append(byteT, plaintext...)
+ return e.omac(concat)
+}
+
+func (e *eax) omac(plaintext []byte) []byte {
+ blockSize := e.block.BlockSize()
+ // L ← E_K(0^n); B ← 2L; P ← 4L
+ L := make([]byte, blockSize)
+ e.block.Encrypt(L, L)
+ B := byteutil.GfnDouble(L)
+ P := byteutil.GfnDouble(B)
+
+ // CBC with IV = 0
+ cbc := cipher.NewCBCEncrypter(e.block, make([]byte, blockSize))
+ padded := e.pad(plaintext, B, P)
+ cbcCiphertext := make([]byte, len(padded))
+ cbc.CryptBlocks(cbcCiphertext, padded)
+
+ return cbcCiphertext[len(cbcCiphertext)-blockSize:]
+}
+
+func (e *eax) pad(plaintext, B, P []byte) []byte {
+ // if |M| in {n, 2n, 3n, ...}
+ blockSize := e.block.BlockSize()
+ if len(plaintext) != 0 && len(plaintext)%blockSize == 0 {
+ return byteutil.RightXor(plaintext, B)
+ }
+
+ // else return (M || 1 || 0^(n−1−(|M| % n))) xor→ P
+ ending := make([]byte, blockSize-len(plaintext)%blockSize)
+ ending[0] = 0x80
+ padded := append(plaintext, ending...)
+ return byteutil.RightXor(padded, P)
+}
+
+func eaxError(err string) error {
+ return errors.New("crypto/eax: " + err)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/eax/eax_test_vectors.go b/vendor/github.com/ProtonMail/go-crypto/eax/eax_test_vectors.go
new file mode 100644
index 000000000..ddb53d079
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/eax/eax_test_vectors.go
@@ -0,0 +1,58 @@
+package eax
+
+// Test vectors from
+// https://web.cs.ucdavis.edu/~rogaway/papers/eax.pdf
+var testVectors = []struct {
+ msg, key, nonce, header, ciphertext string
+}{
+ {"",
+ "233952DEE4D5ED5F9B9C6D6FF80FF478",
+ "62EC67F9C3A4A407FCB2A8C49031A8B3",
+ "6BFB914FD07EAE6B",
+ "E037830E8389F27B025A2D6527E79D01"},
+ {"F7FB",
+ "91945D3F4DCBEE0BF45EF52255F095A4",
+ "BECAF043B0A23D843194BA972C66DEBD",
+ "FA3BFD4806EB53FA",
+ "19DD5C4C9331049D0BDAB0277408F67967E5"},
+ {"1A47CB4933",
+ "01F74AD64077F2E704C0F60ADA3DD523",
+ "70C3DB4F0D26368400A10ED05D2BFF5E",
+ "234A3463C1264AC6",
+ "D851D5BAE03A59F238A23E39199DC9266626C40F80"},
+ {"481C9E39B1",
+ "D07CF6CBB7F313BDDE66B727AFD3C5E8",
+ "8408DFFF3C1A2B1292DC199E46B7D617",
+ "33CCE2EABFF5A79D",
+ "632A9D131AD4C168A4225D8E1FF755939974A7BEDE"},
+ {"40D0C07DA5E4",
+ "35B6D0580005BBC12B0587124557D2C2",
+ "FDB6B06676EEDC5C61D74276E1F8E816",
+ "AEB96EAEBE2970E9",
+ "071DFE16C675CB0677E536F73AFE6A14B74EE49844DD"},
+ {"4DE3B35C3FC039245BD1FB7D",
+ "BD8E6E11475E60B268784C38C62FEB22",
+ "6EAC5C93072D8E8513F750935E46DA1B",
+ "D4482D1CA78DCE0F",
+ "835BB4F15D743E350E728414ABB8644FD6CCB86947C5E10590210A4F"},
+ {"8B0A79306C9CE7ED99DAE4F87F8DD61636",
+ "7C77D6E813BED5AC98BAA417477A2E7D",
+ "1A8C98DCD73D38393B2BF1569DEEFC19",
+ "65D2017990D62528",
+ "02083E3979DA014812F59F11D52630DA30137327D10649B0AA6E1C181DB617D7F2"},
+ {"1BDA122BCE8A8DBAF1877D962B8592DD2D56",
+ "5FFF20CAFAB119CA2FC73549E20F5B0D",
+ "DDE59B97D722156D4D9AFF2BC7559826",
+ "54B9F04E6A09189A",
+ "2EC47B2C4954A489AFC7BA4897EDCDAE8CC33B60450599BD02C96382902AEF7F832A"},
+ {"6CF36720872B8513F6EAB1A8A44438D5EF11",
+ "A4A4782BCFFD3EC5E7EF6D8C34A56123",
+ "B781FCF2F75FA5A8DE97A9CA48E522EC",
+ "899A175897561D7E",
+ "0DE18FD0FDD91E7AF19F1D8EE8733938B1E8E7F6D2231618102FDB7FE55FF1991700"},
+ {"CA40D7446E545FFAED3BD12A740A659FFBBB3CEAB7",
+ "8395FCF1E95BEBD697BD010BC766AAC3",
+ "22E7ADD93CFC6393C57EC0B3C17D6B44",
+ "126735FCC320D25A",
+ "CB8920F87A6C75CFF39627B56E3ED197C552D295A7CFC46AFC253B4652B1AF3795B124AB6E"},
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/eax/random_vectors.go b/vendor/github.com/ProtonMail/go-crypto/eax/random_vectors.go
new file mode 100644
index 000000000..4eb19f28d
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/eax/random_vectors.go
@@ -0,0 +1,131 @@
+// These vectors include key length in {128, 192, 256}, tag size 128, and
+// random nonce, header, and plaintext lengths.
+
+// This file was automatically generated.
+
+package eax
+
+var randomVectors = []struct {
+ key, nonce, header, plaintext, ciphertext string
+}{
+ {"DFDE093F36B0356E5A81F609786982E3",
+ "1D8AC604419001816905BA72B14CED7E",
+ "152A1517A998D7A24163FCDD146DE81AC347C8B97088F502093C1ABB8F6E33D9A219C34D7603A18B1F5ABE02E56661B7D7F67E81EC08C1302EF38D80A859486D450E94A4F26AD9E68EEBBC0C857A0FC5CF9E641D63D565A7E361BC8908F5A8DC8FD6",
+ "1C8EAAB71077FE18B39730A3156ADE29C5EE824C7EE86ED2A253B775603FB237116E654F6FEC588DD27F523A0E01246FE73FE348491F2A8E9ABC6CA58D663F71CDBCF4AD798BE46C42AE6EE8B599DB44A1A48D7BBBBA0F7D2750181E1C5E66967F7D57CBD30AFBDA5727",
+ "79E7E150934BBEBF7013F61C60462A14D8B15AF7A248AFB8A344EF021C1500E16666891D6E973D8BB56B71A371F12CA34660C4410C016982B20F547E3762A58B7BF4F20236CADCF559E2BE7D783B13723B2741FC7CDC8997D839E39A3DDD2BADB96743DD7049F1BDB0516A262869915B3F70498AFB7B191BF960"},
+ {"F10619EF02E5D94D7550EB84ED364A21",
+ "8DC0D4F2F745BBAE835CC5574B942D20",
+ "FE561358F2E8DF7E1024FF1AE9A8D36EBD01352214505CB99D644777A8A1F6027FA2BDBFC529A9B91136D5F2416CFC5F0F4EC3A1AFD32BDDA23CA504C5A5CB451785FABF4DFE4CD50D817491991A60615B30286361C100A95D1712F2A45F8E374461F4CA2B",
+ "D7B5A971FC219631D30EFC3664AE3127D9CF3097DAD9C24AC7905D15E8D9B25B026B31D68CAE00975CDB81EB1FD96FD5E1A12E2BB83FA25F1B1D91363457657FC03875C27F2946C5",
+ "2F336ED42D3CC38FC61660C4CD60BA4BD438B05F5965D8B7B399D2E7167F5D34F792D318F94DB15D67463AC449E13D568CC09BFCE32A35EE3EE96A041927680AE329811811E27F2D1E8E657707AF99BA96D13A478D695D59"},
+ {"429F514EFC64D98A698A9247274CFF45",
+ "976AA5EB072F912D126ACEBC954FEC38",
+ "A71D89DC5B6CEDBB7451A27C3C2CAE09126DB4C421",
+ "5632FE62AB1DC549D54D3BC3FC868ACCEDEFD9ECF5E9F8",
+ "848AE4306CA8C7F416F8707625B7F55881C0AB430353A5C967CDA2DA787F581A70E34DBEBB2385"},
+ {"398138F309085F47F8457CDF53895A63",
+ "F8A8A7F2D28E5FFF7BBC2F24353F7A36",
+ "5D633C21BA7764B8855CAB586F3746E236AD486039C83C6B56EFA9C651D38A41D6B20DAEE3418BFEA44B8BD6",
+ "A3BBAA91920AF5E10659818B1B3B300AC79BFC129C8329E75251F73A66D3AE0128EB91D5031E0A65C329DB7D1E9C0493E268",
+ "D078097267606E5FB07CFB7E2B4B718172A82C6A4CEE65D549A4DFB9838003BD2FBF64A7A66988AC1A632FD88F9E9FBB57C5A78AD2E086EACBA3DB68511D81C2970A"},
+ {"7A4151EBD3901B42CBA45DAFB2E931BA",
+ "0FC88ACEE74DD538040321C330974EB8",
+ "250464FB04733BAB934C59E6AD2D6AE8D662CBCFEFBE61E5A308D4211E58C4C25935B72C69107722E946BFCBF416796600542D76AEB73F2B25BF53BAF97BDEB36ED3A7A51C31E7F170EB897457E7C17571D1BA0A908954E9",
+ "88C41F3EBEC23FAB8A362D969CAC810FAD4F7CA6A7F7D0D44F060F92E37E1183768DD4A8C733F71C96058D362A39876D183B86C103DE",
+ "74A25B2182C51096D48A870D80F18E1CE15867778E34FCBA6BD7BFB3739FDCD42AD0F2D9F4EBA29085285C6048C15BCE5E5166F1F962D3337AA88E6062F05523029D0A7F0BF9"},
+ {"BFB147E1CD5459424F8C0271FC0E0DC5",
+ "EABCC126442BF373969EA3015988CC45",
+ "4C0880E1D71AA2C7",
+ "BE1B5EC78FBF73E7A6682B21BA7E0E5D2D1C7ABE",
+ "5660D7C1380E2F306895B1402CB2D6C37876504276B414D120F4CF92FDDDBB293A238EA0"},
+ {"595DD6F52D18BC2CA8EB4EDAA18D9FA3",
+ "0F84B5D36CF4BC3B863313AF3B4D2E97",
+ "30AE6CC5F99580F12A779D98BD379A60948020C0B6FBD5746B30BA3A15C6CD33DAF376C70A9F15B6C0EB410A93161F7958AE23",
+ "8EF3687A1642B070970B0B91462229D1D76ABC154D18211F7152AA9FF368",
+ "317C1DDB11417E5A9CC4DDE7FDFF6659A5AC4B31DE025212580A05CDAC6024D3E4AE7C2966E52B9129E9ECDBED86"},
+ {"44E6F2DC8FDC778AD007137D11410F50",
+ "270A237AD977F7187AA6C158A0BAB24F",
+ "509B0F0EB12E2AA5C5BA2DE553C07FAF4CE0C9E926531AA709A3D6224FCB783ACCF1559E10B1123EBB7D52E8AB54E6B5352A9ED0D04124BF0E9D9BACFD7E32B817B2E625F5EE94A64EDE9E470DE7FE6886C19B294F9F828209FE257A78",
+ "8B3D7815DF25618A5D0C55A601711881483878F113A12EC36CF64900549A3199555528559DC118F789788A55FAFD944E6E99A9CA3F72F238CD3F4D88223F7A745992B3FAED1848",
+ "1CC00D79F7AD82FDA71B58D286E5F34D0CC4CEF30704E771CC1E50746BDF83E182B078DB27149A42BAE619DF0F85B0B1090AD55D3B4471B0D6F6ECCD09C8F876B30081F0E7537A9624F8AAF29DA85E324122EFB4D68A56"},
+ {"BB7BC352A03044B4428D8DBB4B0701FDEC4649FD17B81452",
+ "8B4BBE26CCD9859DCD84884159D6B0A4",
+ "2212BEB0E78E0F044A86944CF33C8D5C80D9DBE1034BF3BCF73611835C7D3A52F5BD2D81B68FD681B68540A496EE5DA16FD8AC8824E60E1EC2042BE28FB0BFAD4E4B03596446BDD8C37D936D9B3D5295BE19F19CF5ACE1D33A46C952CE4DE5C12F92C1DD051E04AEED",
+ "9037234CC44FFF828FABED3A7084AF40FA7ABFF8E0C0EFB57A1CC361E18FC4FAC1AB54F3ABFE9FF77263ACE16C3A",
+ "A9391B805CCD956081E0B63D282BEA46E7025126F1C1631239C33E92AA6F92CD56E5A4C56F00FF9658E93D48AF4EF0EF81628E34AD4DB0CDAEDCD2A17EE7"},
+ {"99C0AD703196D2F60A74E6B378B838B31F82EA861F06FC4E",
+ "92745C018AA708ECFEB1667E9F3F1B01",
+ "828C69F376C0C0EC651C67749C69577D589EE39E51404D80EBF70C8660A8F5FD375473F4A7C611D59CB546A605D67446CE2AA844135FCD78BB5FBC90222A00D42920BB1D7EEDFB0C4672554F583EF23184F89063CDECBE482367B5F9AF3ACBC3AF61392BD94CBCD9B64677",
+ "A879214658FD0A5B0E09836639BF82E05EC7A5EF71D4701934BDA228435C68AC3D5CEB54997878B06A655EEACEFB1345C15867E7FE6C6423660C8B88DF128EBD6BCD85118DBAE16E9252FFB204324E5C8F38CA97759BDBF3CB0083",
+ "51FE87996F194A2585E438B023B345439EA60D1AEBED4650CDAF48A4D4EEC4FC77DC71CC4B09D3BEEF8B7B7AF716CE2B4EFFB3AC9E6323C18AC35E0AA6E2BBBC8889490EB6226C896B0D105EAB42BFE7053CCF00ED66BA94C1BA09A792AA873F0C3B26C5C5F9A936E57B25"},
+ {"7086816D00D648FB8304AA8C9E552E1B69A9955FB59B25D1",
+ "0F45CF7F0BF31CCEB85D9DA10F4D749F",
+ "93F27C60A417D9F0669E86ACC784FC8917B502DAF30A6338F11B30B94D74FEFE2F8BE1BBE2EAD10FAB7EED3C6F72B7C3ECEE1937C32ED4970A6404E139209C05",
+ "877F046601F3CBE4FB1491943FA29487E738F94B99AF206262A1D6FF856C9AA0B8D4D08A54370C98F8E88FA3DCC2B14C1F76D71B2A4C7963AEE8AF960464C5BEC8357AD00DC8",
+ "FE96906B895CE6A8E72BC72344E2C8BB3C63113D70EAFA26C299BAFE77A8A6568172EB447FB3E86648A0AF3512DEB1AAC0819F3EC553903BF28A9FB0F43411237A774BF9EE03E445D280FBB9CD12B9BAAB6EF5E52691"},
+ {"062F65A896D5BF1401BADFF70E91B458E1F9BD4888CB2E4D",
+ "5B11EA1D6008EBB41CF892FCA5B943D1",
+ "BAF4FF5C8242",
+ "A8870E091238355984EB2F7D61A865B9170F440BFF999A5993DD41A10F4440D21FF948DDA2BF663B2E03AC3324492DC5E40262ECC6A65C07672353BE23E7FB3A9D79FF6AA38D97960905A38DECC312CB6A59E5467ECF06C311CD43ADC0B543EDF34FE8BE611F176460D5627CA51F8F8D9FED71F55C",
+ "B10E127A632172CF8AA7539B140D2C9C2590E6F28C3CB892FC498FCE56A34F732FBFF32E79C7B9747D9094E8635A0C084D6F0247F9768FB5FF83493799A9BEC6C39572120C40E9292C8C947AE8573462A9108C36D9D7112E6995AE5867E6C8BB387D1C5D4BEF524F391B9FD9F0A3B4BFA079E915BCD920185CFD38D114C558928BD7D47877"},
+ {"38A8E45D6D705A11AF58AED5A1344896998EACF359F2E26A",
+ "FD82B5B31804FF47D44199B533D0CF84",
+ "DE454D4E62FE879F2050EE3E25853623D3E9AC52EEC1A1779A48CFAF5ECA0BFDE44749391866D1",
+ "B804",
+ "164BB965C05EBE0931A1A63293EDF9C38C27"},
+ {"34C33C97C6D7A0850DA94D78A58DC61EC717CD7574833068",
+ "343BE00DA9483F05C14F2E9EB8EA6AE8",
+ "78312A43EFDE3CAE34A65796FF059A3FE15304EEA5CF1D9306949FE5BF3349D4977D4EBE76C040FE894C5949E4E4D6681153DA87FB9AC5062063CA2EA183566343362370944CE0362D25FC195E124FD60E8682E665D13F2229DDA3E4B2CB1DCA",
+ "CC11BB284B1153578E4A5ED9D937B869DAF00F5B1960C23455CA9CC43F486A3BE0B66254F1041F04FDF459C8640465B6E1D2CF899A381451E8E7FCB50CF87823BE77E24B132BBEEDC72E53369B275E1D8F49ECE59F4F215230AC4FE133FC80E4F634EE80BA4682B62C86",
+ "E7F703DC31A95E3A4919FF957836CB76C063D81702AEA4703E1C2BF30831E58C4609D626EC6810E12EAA5B930F049FF9EFC22C3E3F1EBD4A1FB285CB02A1AC5AD46B425199FC0A85670A5C4E3DAA9636C8F64C199F42F18AAC8EA7457FD377F322DD7752D7D01B946C8F0A97E6113F0D50106F319AFD291AAACE"},
+ {"C6ECF7F053573E403E61B83052A343D93CBCC179D1E835BE",
+ "E280E13D7367042E3AA09A80111B6184",
+ "21486C9D7A9647",
+ "5F2639AFA6F17931853791CD8C92382BBB677FD72D0AB1A080D0E49BFAA21810E963E4FACD422E92F65CBFAD5884A60CD94740DF31AF02F95AA57DA0C4401B0ED906",
+ "5C51DB20755302070C45F52E50128A67C8B2E4ED0EACB7E29998CCE2E8C289DD5655913EC1A51CC3AABE5CDC2402B2BE7D6D4BF6945F266FBD70BA9F37109067157AE7530678B45F64475D4EBFCB5FFF46A5"},
+ {"5EC6CF7401BC57B18EF154E8C38ACCA8959E57D2F3975FF5",
+ "656B41CB3F9CF8C08BAD7EBFC80BD225",
+ "6B817C2906E2AF425861A7EF59BA5801F143EE2A139EE72697CDE168B4",
+ "2C0E1DDC9B1E5389BA63845B18B1F8A1DB062037151BCC56EF7C21C0BB4DAE366636BBA975685D7CC5A94AFBE89C769016388C56FB7B57CE750A12B718A8BDCF70E80E8659A8330EFC8F86640F21735E8C80E23FE43ABF23507CE3F964AE4EC99D",
+ "ED780CF911E6D1AA8C979B889B0B9DC1ABE261832980BDBFB576901D9EF5AB8048998E31A15BE54B3E5845A4D136AD24D0BDA1C3006168DF2F8AC06729CB0818867398150020131D8F04EDF1923758C9EABB5F735DE5EA1758D4BC0ACFCA98AFD202E9839B8720253693B874C65586C6F0"},
+ {"C92F678EB2208662F5BCF3403EC05F5961E957908A3E79421E1D25FC19054153",
+ "DA0F3A40983D92F2D4C01FED33C7A192",
+ "2B6E9D26DB406A0FAB47608657AA10EFC2B4AA5F459B29FF85AC9A40BFFE7AEB04F77E9A11FAAA116D7F6D4DA417671A9AB02C588E0EF59CB1BFB4B1CC931B63A3B3A159FCEC97A04D1E6F0C7E6A9CEF6B0ABB04758A69F1FE754DF4C2610E8C46B6CF413BDB31351D55BEDCB7B4A13A1C98E10984475E0F2F957853",
+ "F37326A80E08",
+ "83519E53E321D334F7C10B568183775C0E9AAE55F806"},
+ {"6847E0491BE57E72995D186D50094B0B3593957A5146798FCE68B287B2FB37B5",
+ "3EE1182AEBB19A02B128F28E1D5F7F99",
+ "D9F35ABB16D776CE",
+ "DB7566ED8EA95BDF837F23DB277BAFBC5E70D1105ADFD0D9EF15475051B1EF94709C67DCA9F8D5",
+ "2CDCED0C9EBD6E2A508822A685F7DCD1CDD99E7A5FCA786C234E7F7F1D27EC49751AD5DCFA30C5EDA87C43CAE3B919B6BBCFE34C8EDA59"},
+ {"82B019673642C08388D3E42075A4D5D587558C229E4AB8F660E37650C4C41A0A",
+ "336F5D681E0410FAE7B607246092C6DC",
+ "D430CBD8FE435B64214E9E9CDC5DE99D31CFCFB8C10AA0587A49DF276611",
+ "998404153AD77003E1737EDE93ED79859EE6DCCA93CB40C4363AA817ABF2DBBD46E42A14A7183B6CC01E12A577888141363D0AE011EB6E8D28C0B235",
+ "9BEF69EEB60BD3D6065707B7557F25292A8872857CFBD24F2F3C088E4450995333088DA50FD9121221C504DF1D0CD5EFE6A12666C5D5BB12282CF4C19906E9CFAB97E9BDF7F49DC17CFC384B"},
+ {"747B2E269B1859F0622C15C8BAD6A725028B1F94B8DB7326948D1E6ED663A8BC",
+ "AB91F7245DDCE3F1C747872D47BE0A8A",
+ "3B03F786EF1DDD76E1D42646DA4CD2A5165DC5383CE86D1A0B5F13F910DC278A4E451EE0192CBA178E13B3BA27FDC7840DF73D2E104B",
+ "6B803F4701114F3E5FE21718845F8416F70F626303F545BE197189E0A2BA396F37CE06D389EB2658BC7D56D67868708F6D0D32",
+ "1570DDB0BCE75AA25D1957A287A2C36B1A5F2270186DA81BA6112B7F43B0F3D1D0ED072591DCF1F1C99BBB25621FC39B896FF9BD9413A2845363A9DCD310C32CF98E57"},
+ {"02E59853FB29AEDA0FE1C5F19180AD99A12FF2F144670BB2B8BADF09AD812E0A",
+ "C691294EF67CD04D1B9242AF83DD1421",
+ "879334DAE3",
+ "1E17F46A98FEF5CBB40759D95354",
+ "FED8C3FF27DDF6313AED444A2985B36CBA268AAD6AAC563C0BA28F6DB5DB"},
+ {"F6C1FB9B4188F2288FF03BD716023198C3582CF2A037FC2F29760916C2B7FCDB",
+ "4228DA0678CA3534588859E77DFF014C",
+ "D8153CAF35539A61DD8D05B3C9B44F01E564FB9348BCD09A1C23B84195171308861058F0A3CD2A55B912A3AAEE06FF4D356C77275828F2157C2FC7C115DA39E443210CCC56BEDB0CC99BBFB227ABD5CC454F4E7F547C7378A659EEB6A7E809101A84F866503CB18D4484E1FA09B3EC7FC75EB2E35270800AA7",
+ "23B660A779AD285704B12EC1C580387A47BEC7B00D452C6570",
+ "5AA642BBABA8E49849002A2FAF31DB8FC7773EFDD656E469CEC19B3206D4174C9A263D0A05484261F6"},
+ {"8FF6086F1FADB9A3FBE245EAC52640C43B39D43F89526BB5A6EBA47710931446",
+ "943188480C99437495958B0AE4831AA9",
+ "AD5CD0BDA426F6EBA23C8EB23DC73FF9FEC173355EDBD6C9344C4C4383F211888F7CE6B29899A6801DF6B38651A7C77150941A",
+ "80CD5EA8D7F81DDF5070B934937912E8F541A5301877528EB41AB60C020968D459960ED8FB73083329841A",
+ "ABAE8EB7F36FCA2362551E72DAC890BA1BB6794797E0FC3B67426EC9372726ED4725D379EA0AC9147E48DCD0005C502863C2C5358A38817C8264B5"},
+ {"A083B54E6B1FE01B65D42FCD248F97BB477A41462BBFE6FD591006C022C8FD84",
+ "B0490F5BD68A52459556B3749ACDF40E",
+ "8892E047DA5CFBBDF7F3CFCBD1BD21C6D4C80774B1826999234394BD3E513CC7C222BB40E1E3140A152F19B3802F0D036C24A590512AD0E8",
+ "D7B15752789DC94ED0F36778A5C7BBB207BEC32BAC66E702B39966F06E381E090C6757653C3D26A81EC6AD6C364D66867A334C91BB0B8A8A4B6EACDF0783D09010AEBA2DD2062308FE99CC1F",
+ "C071280A732ADC93DF272BF1E613B2BB7D46FC6665EF2DC1671F3E211D6BDE1D6ADDD28DF3AA2E47053FC8BB8AE9271EC8BC8B2CFFA320D225B451685B6D23ACEFDD241FE284F8ADC8DB07F456985B14330BBB66E0FB212213E05B3E"},
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go b/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go
new file mode 100644
index 000000000..affb74a76
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/internal/byteutil/byteutil.go
@@ -0,0 +1,90 @@
+// Copyright (C) 2019 ProtonTech AG
+// This file contains necessary tools for the aex and ocb packages.
+//
+// These functions SHOULD NOT be used elsewhere, since they are optimized for
+// specific input nature in the EAX and OCB modes of operation.
+
+package byteutil
+
+// GfnDouble computes 2 * input in the field of 2^n elements.
+// The irreducible polynomial in the finite field for n=128 is
+// x^128 + x^7 + x^2 + x + 1 (equals 0x87)
+// Constant-time execution in order to avoid side-channel attacks
+func GfnDouble(input []byte) []byte {
+ if len(input) != 16 {
+ panic("Doubling in GFn only implemented for n = 128")
+ }
+ // If the first bit is zero, return 2L = L << 1
+ // Else return (L << 1) xor 0^120 10000111
+ shifted := ShiftBytesLeft(input)
+ shifted[15] ^= ((input[0] >> 7) * 0x87)
+ return shifted
+}
+
+// ShiftBytesLeft outputs the byte array corresponding to x << 1 in binary.
+func ShiftBytesLeft(x []byte) []byte {
+ l := len(x)
+ dst := make([]byte, l)
+ for i := 0; i < l-1; i++ {
+ dst[i] = (x[i] << 1) | (x[i+1] >> 7)
+ }
+ dst[l-1] = x[l-1] << 1
+ return dst
+}
+
+// ShiftNBytesLeft puts in dst the byte array corresponding to x << n in binary.
+func ShiftNBytesLeft(dst, x []byte, n int) {
+ // Erase first n / 8 bytes
+ copy(dst, x[n/8:])
+
+ // Shift the remaining n % 8 bits
+ bits := uint(n % 8)
+ l := len(dst)
+ for i := 0; i < l-1; i++ {
+ dst[i] = (dst[i] << bits) | (dst[i+1] >> uint(8-bits))
+ }
+ dst[l-1] = dst[l-1] << bits
+
+ // Append trailing zeroes
+ dst = append(dst, make([]byte, n/8)...)
+}
+
+// XorBytesMut assumes equal input length, replaces X with X XOR Y
+func XorBytesMut(X, Y []byte) {
+ for i := 0; i < len(X); i++ {
+ X[i] ^= Y[i]
+ }
+}
+
+// XorBytes assumes equal input length, puts X XOR Y into Z
+func XorBytes(Z, X, Y []byte) {
+ for i := 0; i < len(X); i++ {
+ Z[i] = X[i] ^ Y[i]
+ }
+}
+
+// RightXor XORs smaller input (assumed Y) at the right of the larger input (assumed X)
+func RightXor(X, Y []byte) []byte {
+ offset := len(X) - len(Y)
+ xored := make([]byte, len(X))
+ copy(xored, X)
+ for i := 0; i < len(Y); i++ {
+ xored[offset+i] ^= Y[i]
+ }
+ return xored
+}
+
+// SliceForAppend takes a slice and a requested number of bytes. It returns a
+// slice with the contents of the given slice followed by that many bytes and a
+// second slice that aliases into it and contains only the extra bytes. If the
+// original slice has sufficient capacity then no allocation is performed.
+func SliceForAppend(in []byte, n int) (head, tail []byte) {
+ if total := len(in) + n; cap(in) >= total {
+ head = in[:total]
+ } else {
+ head = make([]byte, total)
+ copy(head, in)
+ }
+ tail = head[len(in):]
+ return
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go b/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go
new file mode 100644
index 000000000..5022285b4
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/ocb/ocb.go
@@ -0,0 +1,318 @@
+// Copyright (C) 2019 ProtonTech AG
+
+// Package ocb provides an implementation of the OCB (offset codebook) mode of
+// operation, as described in RFC-7253 of the IRTF and in Rogaway, Bellare,
+// Black and Krovetz - OCB: A BLOCK-CIPHER MODE OF OPERATION FOR EFFICIENT
+// AUTHENTICATED ENCRYPTION (2003).
+// Security considerations (from RFC-7253): A private key MUST NOT be used to
+// encrypt more than 2^48 blocks. Tag length should be at least 12 bytes (a
+// brute-force forging adversary succeeds after 2^{tag length} attempts). A
+// single key SHOULD NOT be used to decrypt ciphertext with different tag
+// lengths. Nonces need not be secret, but MUST NOT be reused.
+// This package only supports underlying block ciphers with 128-bit blocks,
+// such as AES-{128, 192, 256}, but may be extended to other sizes.
+package ocb
+
+import (
+ "bytes"
+ "crypto/cipher"
+ "crypto/subtle"
+ "errors"
+ "math/bits"
+
+ "github.com/ProtonMail/go-crypto/internal/byteutil"
+)
+
+type ocb struct {
+ block cipher.Block
+ tagSize int
+ nonceSize int
+ mask mask
+ // Optimized en/decrypt: For each nonce N used to en/decrypt, the 'Ktop'
+ // internal variable can be reused for en/decrypting with nonces sharing
+ // all but the last 6 bits with N. The prefix of the first nonce used to
+ // compute the new Ktop, and the Ktop value itself, are stored in
+ // reusableKtop. If using incremental nonces, this saves one block cipher
+ // call every 63 out of 64 OCB encryptions, and stores one nonce and one
+ // output of the block cipher in memory only.
+ reusableKtop reusableKtop
+}
+
+type mask struct {
+ // L_*, L_$, (L_i)_{i ∈ N}
+ lAst []byte
+ lDol []byte
+ L [][]byte
+}
+
+type reusableKtop struct {
+ noncePrefix []byte
+ Ktop []byte
+}
+
+const (
+ defaultTagSize = 16
+ defaultNonceSize = 15
+)
+
+const (
+ enc = iota
+ dec
+)
+
+func (o *ocb) NonceSize() int {
+ return o.nonceSize
+}
+
+func (o *ocb) Overhead() int {
+ return o.tagSize
+}
+
+// NewOCB returns an OCB instance with the given block cipher and default
+// tag and nonce sizes.
+func NewOCB(block cipher.Block) (cipher.AEAD, error) {
+ return NewOCBWithNonceAndTagSize(block, defaultNonceSize, defaultTagSize)
+}
+
+// NewOCBWithNonceAndTagSize returns an OCB instance with the given block
+// cipher, nonce length, and tag length. Panics on zero nonceSize and
+// exceedingly long tag size.
+//
+// It is recommended to use at least 12 bytes as tag length.
+func NewOCBWithNonceAndTagSize(
+ block cipher.Block, nonceSize, tagSize int) (cipher.AEAD, error) {
+ if block.BlockSize() != 16 {
+ return nil, ocbError("Block cipher must have 128-bit blocks")
+ }
+ if nonceSize < 1 {
+ return nil, ocbError("Incorrect nonce length")
+ }
+ if nonceSize >= block.BlockSize() {
+ return nil, ocbError("Nonce length exceeds blocksize - 1")
+ }
+ if tagSize > block.BlockSize() {
+ return nil, ocbError("Custom tag length exceeds blocksize")
+ }
+ return &ocb{
+ block: block,
+ tagSize: tagSize,
+ nonceSize: nonceSize,
+ mask: initializeMaskTable(block),
+ reusableKtop: reusableKtop{
+ noncePrefix: nil,
+ Ktop: nil,
+ },
+ }, nil
+}
+
+func (o *ocb) Seal(dst, nonce, plaintext, adata []byte) []byte {
+ if len(nonce) > o.nonceSize {
+ panic("crypto/ocb: Incorrect nonce length given to OCB")
+ }
+ ret, out := byteutil.SliceForAppend(dst, len(plaintext)+o.tagSize)
+ o.crypt(enc, out, nonce, adata, plaintext)
+ return ret
+}
+
+func (o *ocb) Open(dst, nonce, ciphertext, adata []byte) ([]byte, error) {
+ if len(nonce) > o.nonceSize {
+ panic("Nonce too long for this instance")
+ }
+ if len(ciphertext) < o.tagSize {
+ return nil, ocbError("Ciphertext shorter than tag length")
+ }
+ sep := len(ciphertext) - o.tagSize
+ ret, out := byteutil.SliceForAppend(dst, len(ciphertext))
+ ciphertextData := ciphertext[:sep]
+ tag := ciphertext[sep:]
+ o.crypt(dec, out, nonce, adata, ciphertextData)
+ if subtle.ConstantTimeCompare(ret[sep:], tag) == 1 {
+ ret = ret[:sep]
+ return ret, nil
+ }
+ for i := range out {
+ out[i] = 0
+ }
+ return nil, ocbError("Tag authentication failed")
+}
+
+// On instruction enc (resp. dec), crypt is the encrypt (resp. decrypt)
+// function. It returns the resulting plain/ciphertext with the tag appended.
+func (o *ocb) crypt(instruction int, Y, nonce, adata, X []byte) []byte {
+ //
+ // Consider X as a sequence of 128-bit blocks
+ //
+ // Note: For encryption (resp. decryption), X is the plaintext (resp., the
+ // ciphertext without the tag).
+ blockSize := o.block.BlockSize()
+
+ //
+ // Nonce-dependent and per-encryption variables
+ //
+ // Zero out the last 6 bits of the nonce into truncatedNonce to see if Ktop
+ // is already computed.
+ truncatedNonce := make([]byte, len(nonce))
+ copy(truncatedNonce, nonce)
+ truncatedNonce[len(truncatedNonce)-1] &= 192
+ var Ktop []byte
+ if bytes.Equal(truncatedNonce, o.reusableKtop.noncePrefix) {
+ Ktop = o.reusableKtop.Ktop
+ } else {
+ // Nonce = num2str(TAGLEN mod 128, 7) || zeros(120 - bitlen(N)) || 1 || N
+ paddedNonce := append(make([]byte, blockSize-1-len(nonce)), 1)
+ paddedNonce = append(paddedNonce, truncatedNonce...)
+ paddedNonce[0] |= byte(((8 * o.tagSize) % (8 * blockSize)) << 1)
+ // Last 6 bits of paddedNonce are already zero. Encrypt into Ktop
+ paddedNonce[blockSize-1] &= 192
+ Ktop = paddedNonce
+ o.block.Encrypt(Ktop, Ktop)
+ o.reusableKtop.noncePrefix = truncatedNonce
+ o.reusableKtop.Ktop = Ktop
+ }
+
+ // Stretch = Ktop || ((lower half of Ktop) XOR (lower half of Ktop << 8))
+ xorHalves := make([]byte, blockSize/2)
+ byteutil.XorBytes(xorHalves, Ktop[:blockSize/2], Ktop[1:1+blockSize/2])
+ stretch := append(Ktop, xorHalves...)
+ bottom := int(nonce[len(nonce)-1] & 63)
+ offset := make([]byte, len(stretch))
+ byteutil.ShiftNBytesLeft(offset, stretch, bottom)
+ offset = offset[:blockSize]
+
+ //
+ // Process any whole blocks
+ //
+ // Note: For encryption Y is ciphertext || tag, for decryption Y is
+ // plaintext || tag.
+ checksum := make([]byte, blockSize)
+ m := len(X) / blockSize
+ for i := 0; i < m; i++ {
+ index := bits.TrailingZeros(uint(i + 1))
+ if len(o.mask.L)-1 < index {
+ o.mask.extendTable(index)
+ }
+ byteutil.XorBytesMut(offset, o.mask.L[bits.TrailingZeros(uint(i+1))])
+ blockX := X[i*blockSize : (i+1)*blockSize]
+ blockY := Y[i*blockSize : (i+1)*blockSize]
+ byteutil.XorBytes(blockY, blockX, offset)
+ switch instruction {
+ case enc:
+ o.block.Encrypt(blockY, blockY)
+ byteutil.XorBytesMut(blockY, offset)
+ byteutil.XorBytesMut(checksum, blockX)
+ case dec:
+ o.block.Decrypt(blockY, blockY)
+ byteutil.XorBytesMut(blockY, offset)
+ byteutil.XorBytesMut(checksum, blockY)
+ }
+ }
+ //
+ // Process any final partial block and compute raw tag
+ //
+ tag := make([]byte, blockSize)
+ if len(X)%blockSize != 0 {
+ byteutil.XorBytesMut(offset, o.mask.lAst)
+ pad := make([]byte, blockSize)
+ o.block.Encrypt(pad, offset)
+ chunkX := X[blockSize*m:]
+ chunkY := Y[blockSize*m : len(X)]
+ byteutil.XorBytes(chunkY, chunkX, pad[:len(chunkX)])
+ // P_* || bit(1) || zeroes(127) - len(P_*)
+ switch instruction {
+ case enc:
+ paddedY := append(chunkX, byte(128))
+ paddedY = append(paddedY, make([]byte, blockSize-len(chunkX)-1)...)
+ byteutil.XorBytesMut(checksum, paddedY)
+ case dec:
+ paddedX := append(chunkY, byte(128))
+ paddedX = append(paddedX, make([]byte, blockSize-len(chunkY)-1)...)
+ byteutil.XorBytesMut(checksum, paddedX)
+ }
+ byteutil.XorBytes(tag, checksum, offset)
+ byteutil.XorBytesMut(tag, o.mask.lDol)
+ o.block.Encrypt(tag, tag)
+ byteutil.XorBytesMut(tag, o.hash(adata))
+ copy(Y[blockSize*m+len(chunkY):], tag[:o.tagSize])
+ } else {
+ byteutil.XorBytes(tag, checksum, offset)
+ byteutil.XorBytesMut(tag, o.mask.lDol)
+ o.block.Encrypt(tag, tag)
+ byteutil.XorBytesMut(tag, o.hash(adata))
+ copy(Y[blockSize*m:], tag[:o.tagSize])
+ }
+ return Y
+}
+
+// This hash function is used to compute the tag. Per design, on empty input it
+// returns a slice of zeros, of the same length as the underlying block cipher
+// block size.
+func (o *ocb) hash(adata []byte) []byte {
+ //
+ // Consider A as a sequence of 128-bit blocks
+ //
+ A := make([]byte, len(adata))
+ copy(A, adata)
+ blockSize := o.block.BlockSize()
+
+ //
+ // Process any whole blocks
+ //
+ sum := make([]byte, blockSize)
+ offset := make([]byte, blockSize)
+ m := len(A) / blockSize
+ for i := 0; i < m; i++ {
+ chunk := A[blockSize*i : blockSize*(i+1)]
+ index := bits.TrailingZeros(uint(i + 1))
+ // If the mask table is too short
+ if len(o.mask.L)-1 < index {
+ o.mask.extendTable(index)
+ }
+ byteutil.XorBytesMut(offset, o.mask.L[index])
+ byteutil.XorBytesMut(chunk, offset)
+ o.block.Encrypt(chunk, chunk)
+ byteutil.XorBytesMut(sum, chunk)
+ }
+
+ //
+ // Process any final partial block; compute final hash value
+ //
+ if len(A)%blockSize != 0 {
+ byteutil.XorBytesMut(offset, o.mask.lAst)
+ // Pad block with 1 || 0 ^ 127 - bitlength(a)
+ ending := make([]byte, blockSize-len(A)%blockSize)
+ ending[0] = 0x80
+ encrypted := append(A[blockSize*m:], ending...)
+ byteutil.XorBytesMut(encrypted, offset)
+ o.block.Encrypt(encrypted, encrypted)
+ byteutil.XorBytesMut(sum, encrypted)
+ }
+ return sum
+}
+
+func initializeMaskTable(block cipher.Block) mask {
+ //
+ // Key-dependent variables
+ //
+ lAst := make([]byte, block.BlockSize())
+ block.Encrypt(lAst, lAst)
+ lDol := byteutil.GfnDouble(lAst)
+ L := make([][]byte, 1)
+ L[0] = byteutil.GfnDouble(lDol)
+
+ return mask{
+ lAst: lAst,
+ lDol: lDol,
+ L: L,
+ }
+}
+
+// Extends the L array of mask m up to L[limit], with L[i] = GfnDouble(L[i-1])
+func (m *mask) extendTable(limit int) {
+ for i := len(m.L); i <= limit; i++ {
+ m.L = append(m.L, byteutil.GfnDouble(m.L[i-1]))
+ }
+}
+
+func ocbError(err string) error {
+ return errors.New("crypto/ocb: " + err)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/ocb/random_vectors.go b/vendor/github.com/ProtonMail/go-crypto/ocb/random_vectors.go
new file mode 100644
index 000000000..0efaf344f
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/ocb/random_vectors.go
@@ -0,0 +1,136 @@
+// In the test vectors provided by RFC 7253, the "bottom"
+// internal variable, which defines "offset" for the first time, does not
+// exceed 15. However, it can attain values up to 63.
+
+// These vectors include key length in {128, 192, 256}, tag size 128, and
+// random nonce, header, and plaintext lengths.
+
+// This file was automatically generated.
+
+package ocb
+
+var randomVectors = []struct {
+ key, nonce, header, plaintext, ciphertext string
+}{
+
+ {"9438C5D599308EAF13F800D2D31EA7F0",
+ "C38EE4801BEBFFA1CD8635BE",
+ "0E507B7DADD8A98CDFE272D3CB6B3E8332B56AE583FB049C0874D4200BED16BD1A044182434E9DA0E841F182DFD5B3016B34641CED0784F1745F63AB3D0DA22D3351C9EF9A658B8081E24498EBF61FCE40DA6D8E184536",
+ "962D227786FB8913A8BAD5DC3250",
+ "EEDEF5FFA5986D1E3BF86DDD33EF9ADC79DCA06E215FA772CCBA814F63AD"},
+ {"BA7DE631C7D6712167C6724F5B9A2B1D",
+ "35263EBDA05765DC0E71F1F5",
+ "0103257B4224507C0242FEFE821EA7FA42E0A82863E5F8B68F7D881B4B44FA428A2B6B21D2F591260802D8AB6D83",
+ "9D6D1FC93AE8A64E7889B7B2E3521EFA9B920A8DDB692E6F833DDC4A38AFA535E5E2A3ED82CB7E26404AB86C54D01C4668F28398C2DF33D5D561CBA1C8DCFA7A912F5048E545B59483C0E3221F54B14DAA2E4EB657B3BEF9554F34CAD69B2724AE962D3D8A",
+ "E93852D1985C5E775655E937FA79CE5BF28A585F2AF53A5018853B9634BE3C84499AC0081918FDCE0624494D60E25F76ACD6853AC7576E3C350F332249BFCABD4E73CEABC36BE4EDDA40914E598AE74174A0D7442149B26990899491BDDFE8FC54D6C18E83AE9E9A6FFBF5D376565633862EEAD88D"},
+ {"2E74B25289F6FD3E578C24866E9C72A5",
+ "FD912F15025AF8414642BA1D1D",
+ "FB5FB8C26F365EEDAB5FE260C6E3CCD27806729C8335F146063A7F9EA93290E56CF84576EB446350D22AD730547C267B1F0BBB97EB34E1E2C41A",
+ "6C092EBF78F76EE8C1C6E592277D9545BA16EDB67BC7D8480B9827702DC2F8A129E2B08A2CE710CA7E1DA45CE162BB6CD4B512E632116E2211D3C90871EFB06B8D4B902681C7FB",
+ "6AC0A77F26531BF4F354A1737F99E49BE32ECD909A7A71AD69352906F54B08A9CE9B8CA5D724CBFFC5673437F23F630697F3B84117A1431D6FA8CC13A974FB4AD360300522E09511B99E71065D5AC4BBCB1D791E864EF4"},
+ {"E7EC507C802528F790AFF5303A017B17",
+ "4B97A7A568940A9E3CE7A99E93031E",
+ "28349BDC5A09390C480F9B8AA3EDEA3DDB8B9D64BCA322C570B8225DF0E31190DAB25A4014BA39519E02ABFB12B89AA28BBFD29E486E7FB28734258C817B63CED9912DBAFEBB93E2798AB2890DE3B0ACFCFF906AB15563EF7823CE83D27CDB251195E22BD1337BCBDE65E7C2C427321C463C2777BFE5AEAA",
+ "9455B3EA706B74",
+ "7F33BA3EA848D48A96B9530E26888F43EBD4463C9399B6"},
+ {"6C928AA3224736F28EE7378DE0090191",
+ "8936138E2E4C6A13280017A1622D",
+ "6202717F2631565BDCDC57C6584543E72A7C8BD444D0D108ED35069819633C",
+ "DA0691439E5F035F3E455269D14FE5C201C8C9B0A3FE2D3F86BCC59387C868FE65733D388360B31E3CE28B4BF6A8BE636706B536D5720DB66B47CF1C7A5AFD6F61E0EF90F1726D6B0E169F9A768B2B7AE4EE00A17F630AC905FCAAA1B707FFF25B3A1AAE83B504837C64A5639B2A34002B300EC035C9B43654DA55",
+ "B8804D182AB0F0EEB464FA7BD1329AD6154F982013F3765FEDFE09E26DAC078C9C1439BFC1159D6C02A25E3FF83EF852570117B315852AD5EE20E0FA3AA0A626B0E43BC0CEA38B44579DD36803455FB46989B90E6D229F513FD727AF8372517E9488384C515D6067704119C931299A0982EDDFB9C2E86A90C450C077EB222511EC9CCABC9FCFDB19F70088"},
+ {"ECEA315CA4B3F425B0C9957A17805EA4",
+ "664CDAE18403F4F9BA13015A44FC",
+ "642AFB090D6C6DB46783F08B01A3EF2A8FEB5736B531EAC226E7888FCC8505F396818F83105065FACB3267485B9E5E4A0261F621041C08FCCB2A809A49AB5252A91D0971BCC620B9D614BD77E57A0EED2FA5",
+ "6852C31F8083E20E364CEA21BB7854D67CEE812FE1C9ED2425C0932A90D3780728D1BB",
+ "2ECEF962A9695A463ADABB275BDA9FF8B2BA57AEC2F52EFFB700CD9271A74D2A011C24AEA946051BD6291776429B7E681BA33E"},
+ {"4EE616C4A58AAA380878F71A373461F6",
+ "91B8C9C176D9C385E9C47E52",
+ "CDA440B7F9762C572A718AC754EDEECC119E5EE0CCB9FEA4FFB22EEE75087C032EBF3DA9CDD8A28CC010B99ED45143B41A4BA50EA2A005473F89639237838867A57F23B0F0ED3BF22490E4501DAC9C658A9B9F",
+ "D6E645FA9AE410D15B8123FD757FA356A8DBE9258DDB5BE88832E615910993F497EC",
+ "B70ED7BF959FB2AAED4F36174A2A99BFB16992C8CDF369C782C4DB9C73DE78C5DB8E0615F647243B97ACDB24503BC9CADC48"},
+ {"DCD475773136C830D5E3D0C5FE05B7FF",
+ "BB8E1FBB483BE7616A922C4A",
+ "36FEF2E1CB29E76A6EA663FC3AF66ECD7404F466382F7B040AABED62293302B56E8783EF7EBC21B4A16C3E78A7483A0A403F253A2CDC5BBF79DC3DAE6C73F39A961D8FBBE8D41B",
+ "441E886EA38322B2437ECA7DEB5282518865A66780A454E510878E61BFEC3106A3CD93D2A02052E6F9E1832F9791053E3B76BF4C07EFDD6D4106E3027FABB752E60C1AA425416A87D53938163817A1051EBA1D1DEEB4B9B25C7E97368B52E5911A31810B0EC5AF547559B6142D9F4C4A6EF24A4CF75271BF9D48F62B",
+ "1BE4DD2F4E25A6512C2CC71D24BBB07368589A94C2714962CD0ACE5605688F06342587521E75F0ACAFFD86212FB5C34327D238DB36CF2B787794B9A4412E7CD1410EA5DDD2450C265F29CF96013CD213FD2880657694D718558964BC189B4A84AFCF47EB012935483052399DBA5B088B0A0477F20DFE0E85DCB735E21F22A439FB837DD365A93116D063E607"},
+ {"3FBA2B3D30177FFE15C1C59ED2148BB2C091F5615FBA7C07",
+ "FACF804A4BEBF998505FF9DE",
+ "8213B9263B2971A5BDA18DBD02208EE1",
+ "15B323926993B326EA19F892D704439FC478828322AF72118748284A1FD8A6D814E641F70512FD706980337379F31DC63355974738D7FEA87AD2858C0C2EBBFBE74371C21450072373C7B651B334D7C4D43260B9D7CCD3AF9EDB",
+ "6D35DC1469B26E6AAB26272A41B46916397C24C485B61162E640A062D9275BC33DDCFD3D9E1A53B6C8F51AC89B66A41D59B3574197A40D9B6DCF8A4E2A001409C8112F16B9C389E0096179DB914E05D6D11ED0005AD17E1CE105A2F0BAB8F6B1540DEB968B7A5428FF44"},
+ {"53B52B8D4D748BCDF1DDE68857832FA46227FA6E2F32EFA1",
+ "0B0EF53D4606B28D1398355F",
+ "F23882436349094AF98BCACA8218E81581A043B19009E28EFBF2DE37883E04864148CC01D240552CA8844EC1456F42034653067DA67E80F87105FD06E14FF771246C9612867BE4D215F6D761",
+ "F15030679BD4088D42CAC9BF2E9606EAD4798782FA3ED8C57EBE7F84A53236F51B25967C6489D0CD20C9EEA752F9BC",
+ "67B96E2D67C3729C96DAEAEDF821D61C17E648643A2134C5621FEC621186915AD80864BFD1EB5B238BF526A679385E012A457F583AFA78134242E9D9C1B4E4"},
+ {"0272DD80F23399F49BFC320381A5CD8225867245A49A7D41",
+ "5C83F4896D0738E1366B1836",
+ "69B0337289B19F73A12BAEEA857CCAF396C11113715D9500CCCF48BA08CFF12BC8B4BADB3084E63B85719DB5058FA7C2C11DEB096D7943CFA7CAF5",
+ "C01AD10FC8B562CD17C7BC2FAB3E26CBDFF8D7F4DEA816794BBCC12336991712972F52816AABAB244EB43B0137E2BAC1DD413CE79531E78BEF782E6B439612BB3AEF154DE3502784F287958EBC159419F9EBA27916A28D6307324129F506B1DE80C1755A929F87",
+ "FEFE52DD7159C8DD6E8EC2D3D3C0F37AB6CB471A75A071D17EC4ACDD8F3AA4D7D4F7BB559F3C09099E3D9003E5E8AA1F556B79CECDE66F85B08FA5955E6976BF2695EA076388A62D2AD5BAB7CBF1A7F3F4C8D5CDF37CDE99BD3E30B685D9E5EEE48C7C89118EF4878EB89747F28271FA2CC45F8E9E7601"},
+ {"3EEAED04A455D6E5E5AB53CFD5AFD2F2BC625C7BF4BE49A5",
+ "36B88F63ADBB5668588181D774",
+ "D367E3CB3703E762D23C6533188EF7028EFF9D935A3977150361997EC9DEAF1E4794BDE26AA8B53C124980B1362EC86FCDDFC7A90073171C1BAEE351A53234B86C66E8AB92FAE99EC6967A6D3428892D80",
+ "573454C719A9A55E04437BF7CBAAF27563CCCD92ADD5E515CD63305DFF0687E5EEF790C5DCA5C0033E9AB129505E2775438D92B38F08F3B0356BA142C6F694",
+ "E9F79A5B432D9E682C9AAA5661CFC2E49A0FCB81A431E54B42EB73DD3BED3F377FEC556ABA81624BA64A5D739AD41467460088F8D4F442180A9382CA635745473794C382FCDDC49BA4EB6D8A44AE3C"},
+ {"B695C691538F8CBD60F039D0E28894E3693CC7C36D92D79D",
+ "BC099AEB637361BAC536B57618",
+ "BFFF1A65AE38D1DC142C71637319F5F6508E2CB33C9DCB94202B359ED5A5ED8042E7F4F09231D32A7242976677E6F4C549BF65FADC99E5AF43F7A46FD95E16C2",
+ "081DF3FD85B415D803F0BE5AC58CFF0023FDDED99788296C3731D8",
+ "E50C64E3614D94FE69C47092E46ACC9957C6FEA2CCBF96BC62FBABE7424753C75F9C147C42AE26FE171531"},
+ {"C9ACBD2718F0689A1BE9802A551B6B8D9CF5614DAF5E65ED",
+ "B1B0AAF373B8B026EB80422051D8",
+ "6648C0E61AC733C76119D23FB24548D637751387AA2EAE9D80E912B7BD486CAAD9EAF4D7A5FE2B54AAD481E8EC94BB4D558000896E2010462B70C9FED1E7273080D1",
+ "189F591F6CB6D59AFEDD14C341741A8F1037DC0DF00FC57CE65C30F49E860255CEA5DC6019380CC0FE8880BC1A9E685F41C239C38F36E3F2A1388865C5C311059C0A",
+ "922A5E949B61D03BE34AB5F4E58607D4504EA14017BB363DAE3C873059EA7A1C77A746FB78981671D26C2CF6D9F24952D510044CE02A10177E9DB42D0145211DFE6E84369C5E3BC2669EAB4147B2822895F9"},
+ {"7A832BD2CF5BF4919F353CE2A8C86A5E406DA2D52BE16A72",
+ "2F2F17CECF7E5A756D10785A3CB9DB",
+ "61DA05E3788CC2D8405DBA70C7A28E5AF699863C9F72E6C6770126929F5D6FA267F005EBCF49495CB46400958A3AE80D1289D1C671",
+ "44E91121195A41AF14E8CFDBD39A4B517BE0DF1A72977ED8A3EEF8EEDA1166B2EB6DB2C4AE2E74FA0F0C74537F659BFBD141E5DDEC67E64EDA85AABD3F52C85A785B9FB3CECD70E7DF",
+ "BEDF596EA21288D2B84901E188F6EE1468B14D5161D3802DBFE00D60203A24E2AB62714BF272A45551489838C3A7FEAADC177B591836E73684867CCF4E12901DCF2064058726BBA554E84ADC5136F507E961188D4AF06943D3"},
+ {"1508E8AE9079AA15F1CEC4F776B4D11BCCB061B58AA56C18",
+ "BCA625674F41D1E3AB47672DC0C3",
+ "8B12CF84F16360F0EAD2A41BC021530FFCEC7F3579CAE658E10E2D3D81870F65AFCED0C77C6C4C6E6BA424FF23088C796BA6195ABA35094BF1829E089662E7A95FC90750AE16D0C8AFA55DAC789D7735B970B58D4BE7CEC7341DA82A0179A01929C27A59C5063215B859EA43",
+ "E525422519ECE070E82C",
+ "B47BC07C3ED1C0A43BA52C43CBACBCDBB29CAF1001E09FDF7107"},
+ {"7550C2761644E911FE9ADD119BAC07376BEA442845FEAD876D7E7AC1B713E464",
+ "36D2EC25ADD33CDEDF495205BBC923",
+ "7FCFE81A3790DE97FFC3DE160C470847EA7E841177C2F759571CBD837EA004A6CA8C6F4AEBFF2E9FD552D73EB8A30705D58D70C0B67AEEA280CBBF0A477358ACEF1E7508F2735CD9A0E4F9AC92B8C008F575D3B6278F1C18BD01227E3502E5255F3AB1893632AD00C717C588EF652A51A43209E7EE90",
+ "2B1A62F8FDFAA3C16470A21AD307C9A7D03ADE8EF72C69B06F8D738CDE578D7AEFD0D40BD9C022FB9F580DF5394C998ACCCEFC5471A3996FB8F1045A81FDC6F32D13502EA65A211390C8D882B8E0BEFD8DD8CBEF51D1597B124E9F7F",
+ "C873E02A22DB89EB0787DB6A60B99F7E4A0A085D5C4232A81ADCE2D60AA36F92DDC33F93DD8640AC0E08416B187FB382B3EC3EE85A64B0E6EE41C1366A5AD2A282F66605E87031CCBA2FA7B2DA201D975994AADE3DD1EE122AE09604AD489B84BF0C1AB7129EE16C6934850E"},
+ {"A51300285E554FDBDE7F771A9A9A80955639DD87129FAEF74987C91FB9687C71",
+ "81691D5D20EC818FCFF24B33DECC",
+ "C948093218AA9EB2A8E44A87EEA73FC8B6B75A196819A14BD83709EA323E8DF8B491045220E1D88729A38DBCFFB60D3056DAD4564498FD6574F74512945DEB34B69329ACED9FFC05D5D59DFCD5B973E2ACAFE6AD1EF8BBBC49351A2DD12508ED89ED",
+ "EB861165DAF7625F827C6B574ED703F03215",
+ "C6CD1CE76D2B3679C1B5AA1CFD67CCB55444B6BFD3E22C81CBC9BB738796B83E54E3"},
+ {"8CE0156D26FAEB7E0B9B800BBB2E9D4075B5EAC5C62358B0E7F6FCE610223282",
+ "D2A7B94DD12CDACA909D3AD7",
+ "E021A78F374FC271389AB9A3E97077D755",
+ "7C26000B58929F5095E1CEE154F76C2A299248E299F9B5ADE6C403AA1FD4A67FD4E0232F214CE7B919EE7A1027D2B76C57475715CD078461",
+ "C556FB38DF069B56F337B5FF5775CE6EAA16824DFA754F20B78819028EA635C3BB7AA731DE8776B2DCB67DCA2D33EEDF3C7E52EA450013722A41755A0752433ED17BDD5991AAE77A"},
+ {"1E8000A2CE00A561C9920A30BF0D7B983FEF8A1014C8F04C35CA6970E6BA02BD",
+ "65ED3D63F79F90BBFD19775E",
+ "336A8C0B7243582A46B221AA677647FCAE91",
+ "134A8B34824A290E7B",
+ "914FBEF80D0E6E17F8BDBB6097EBF5FBB0554952DC2B9E5151"},
+ {"53D5607BBE690B6E8D8F6D97F3DF2BA853B682597A214B8AA0EA6E598650AF15",
+ "C391A856B9FE234E14BA1AC7BB40FF",
+ "479682BC21349C4BE1641D5E78FE2C79EC1B9CF5470936DCAD9967A4DCD7C4EFADA593BC9EDE71E6A08829B8580901B61E274227E9D918502DE3",
+ "EAD154DC09C5E26C5D26FF33ED148B27120C7F2C23225CC0D0631B03E1F6C6D96FEB88C1A4052ACB4CE746B884B6502931F407021126C6AAB8C514C077A5A38438AE88EE",
+ "938821286EBB671D999B87C032E1D6055392EB564E57970D55E545FC5E8BAB90E6E3E3C0913F6320995FC636D72CD9919657CC38BD51552F4A502D8D1FE56DB33EBAC5092630E69EBB986F0E15CEE9FC8C052501"},
+ {"294362FCC984F440CEA3E9F7D2C06AF20C53AAC1B3738CA2186C914A6E193ABB",
+ "B15B61C8BB39261A8F55AB178EC3",
+ "D0729B6B75BB",
+ "2BD089ADCE9F334BAE3B065996C7D616DD0C27DF4218DCEEA0FBCA0F968837CE26B0876083327E25681FDDD620A32EC0DA12F73FAE826CC94BFF2B90A54D2651",
+ "AC94B25E4E21DE2437B806966CCD5D9385EF0CD4A51AB9FA6DE675C7B8952D67802E9FEC1FDE9F5D1EAB06057498BC0EEA454804FC9D2068982A3E24182D9AC2E7AB9994DDC899A604264583F63D066B"},
+ {"959DBFEB039B1A5B8CE6A44649B602AAA5F98A906DB96143D202CD2024F749D9",
+ "01D7BDB1133E9C347486C1EFA6",
+ "F3843955BD741F379DD750585EDC55E2CDA05CCBA8C1F4622AC2FE35214BC3A019B8BD12C4CC42D9213D1E1556941E8D8450830287FFB3B763A13722DD4140ED9846FB5FFF745D7B0B967D810A068222E10B259AF1D392035B0D83DC1498A6830B11B2418A840212599171E0258A1C203B05362978",
+ "A21811232C950FA8B12237C2EBD6A7CD2C3A155905E9E0C7C120",
+ "63C1CE397B22F1A03F1FA549B43178BC405B152D3C95E977426D519B3DFCA28498823240592B6EEE7A14"},
+ {"096AE499F5294173F34FF2B375F0E5D5AB79D0D03B33B1A74D7D576826345DF4",
+ "0C52B3D11D636E5910A4DD76D32C",
+ "229E9ECA3053789E937447BC719467075B6138A142DA528DA8F0CF8DDF022FD9AF8E74779BA3AC306609",
+ "8B7A00038783E8BAF6EDEAE0C4EAB48FC8FD501A588C7E4A4DB71E3604F2155A97687D3D2FFF8569261375A513CF4398CE0F87CA1658A1050F6EF6C4EA3E25",
+ "C20B6CF8D3C8241825FD90B2EDAC7593600646E579A8D8DAAE9E2E40C3835FE801B2BE4379131452BC5182C90307B176DFBE2049544222FE7783147B690774F6D9D7CEF52A91E61E298E9AA15464AC"},
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_a.go b/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_a.go
new file mode 100644
index 000000000..330309ff5
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_a.go
@@ -0,0 +1,78 @@
+package ocb
+
+import (
+ "encoding/hex"
+)
+
+// Test vectors from https://tools.ietf.org/html/rfc7253. Note that key is
+// shared across tests.
+var testKey, _ = hex.DecodeString("000102030405060708090A0B0C0D0E0F")
+
+var rfc7253testVectors = []struct {
+ nonce, header, plaintext, ciphertext string
+}{
+ {"BBAA99887766554433221100",
+ "",
+ "",
+ "785407BFFFC8AD9EDCC5520AC9111EE6"},
+ {"BBAA99887766554433221101",
+ "0001020304050607",
+ "0001020304050607",
+ "6820B3657B6F615A5725BDA0D3B4EB3A257C9AF1F8F03009"},
+ {"BBAA99887766554433221102",
+ "0001020304050607",
+ "",
+ "81017F8203F081277152FADE694A0A00"},
+ {"BBAA99887766554433221103",
+ "",
+ "0001020304050607",
+ "45DD69F8F5AAE72414054CD1F35D82760B2CD00D2F99BFA9"},
+ {"BBAA99887766554433221104",
+ "000102030405060708090A0B0C0D0E0F",
+ "000102030405060708090A0B0C0D0E0F",
+ "571D535B60B277188BE5147170A9A22C3AD7A4FF3835B8C5701C1CCEC8FC3358"},
+ {"BBAA99887766554433221105",
+ "000102030405060708090A0B0C0D0E0F",
+ "",
+ "8CF761B6902EF764462AD86498CA6B97"},
+ {"BBAA99887766554433221106",
+ "",
+ "000102030405060708090A0B0C0D0E0F",
+ "5CE88EC2E0692706A915C00AEB8B2396F40E1C743F52436BDF06D8FA1ECA343D"},
+ {"BBAA99887766554433221107",
+ "000102030405060708090A0B0C0D0E0F1011121314151617",
+ "000102030405060708090A0B0C0D0E0F1011121314151617",
+ "1CA2207308C87C010756104D8840CE1952F09673A448A122C92C62241051F57356D7F3C90BB0E07F"},
+ {"BBAA99887766554433221108",
+ "000102030405060708090A0B0C0D0E0F1011121314151617",
+ "",
+ "6DC225A071FC1B9F7C69F93B0F1E10DE"},
+ {"BBAA99887766554433221109",
+ "",
+ "000102030405060708090A0B0C0D0E0F1011121314151617",
+ "221BD0DE7FA6FE993ECCD769460A0AF2D6CDED0C395B1C3CE725F32494B9F914D85C0B1EB38357FF"},
+ {"BBAA9988776655443322110A",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
+ "BD6F6C496201C69296C11EFD138A467ABD3C707924B964DEAFFC40319AF5A48540FBBA186C5553C68AD9F592A79A4240"},
+ {"BBAA9988776655443322110B",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
+ "",
+ "FE80690BEE8A485D11F32965BC9D2A32"},
+ {"BBAA9988776655443322110C",
+ "",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F",
+ "2942BFC773BDA23CABC6ACFD9BFD5835BD300F0973792EF46040C53F1432BCDFB5E1DDE3BC18A5F840B52E653444D5DF"},
+ {"BBAA9988776655443322110D",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
+ "D5CA91748410C1751FF8A2F618255B68A0A12E093FF454606E59F9C1D0DDC54B65E8628E568BAD7AED07BA06A4A69483A7035490C5769E60"},
+ {"BBAA9988776655443322110E",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
+ "",
+ "C5CD9D1850C141E358649994EE701B68"},
+ {"BBAA9988776655443322110F",
+ "",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
+ "4412923493C57D5DE0D700F753CCE0D1D2D95060122E9F15A5DDBFC5787E50B5CC55EE507BCB084E479AD363AC366B95A98CA5F3000B1479"},
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_b.go b/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_b.go
new file mode 100644
index 000000000..14a3c336f
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/ocb/rfc7253_test_vectors_suite_b.go
@@ -0,0 +1,25 @@
+package ocb
+
+// Second set of test vectors from https://tools.ietf.org/html/rfc7253
+var rfc7253TestVectorTaglen96 = struct {
+ key, nonce, header, plaintext, ciphertext string
+}{"0F0E0D0C0B0A09080706050403020100",
+ "BBAA9988776655443322110D",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
+ "000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F2021222324252627",
+ "1792A4E31E0755FB03E31B22116E6C2DDF9EFD6E33D536F1A0124B0A55BAE884ED93481529C76B6AD0C515F4D1CDD4FDAC4F02AA"}
+
+var rfc7253AlgorithmTest = []struct {
+ KEYLEN, TAGLEN int
+ OUTPUT string
+}{
+ {128, 128, "67E944D23256C5E0B6C61FA22FDF1EA2"},
+ {192, 128, "F673F2C3E7174AAE7BAE986CA9F29E17"},
+ {256, 128, "D90EB8E9C977C88B79DD793D7FFA161C"},
+ {128, 96, "77A3D8E73589158D25D01209"},
+ {192, 96, "05D56EAD2752C86BE6932C5E"},
+ {256, 96, "5458359AC23B0CBA9E6330DD"},
+ {128, 64, "192C9B7BD90BA06A"},
+ {192, 64, "0066BC6E0EF34E24"},
+ {256, 64, "7D4EA5D445501CBE"},
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap/keywrap.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap/keywrap.go
new file mode 100644
index 000000000..3c6251d1c
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/aes/keywrap/keywrap.go
@@ -0,0 +1,153 @@
+// Copyright 2014 Matthew Endsley
+// All rights reserved
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted providing 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 AUTHOR ``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 AUTHOR 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.
+
+// Package keywrap is an implementation of the RFC 3394 AES key wrapping
+// algorithm. This is used in OpenPGP with elliptic curve keys.
+package keywrap
+
+import (
+ "crypto/aes"
+ "encoding/binary"
+ "errors"
+)
+
+var (
+ // ErrWrapPlaintext is returned if the plaintext is not a multiple
+ // of 64 bits.
+ ErrWrapPlaintext = errors.New("keywrap: plainText must be a multiple of 64 bits")
+
+ // ErrUnwrapCiphertext is returned if the ciphertext is not a
+ // multiple of 64 bits.
+ ErrUnwrapCiphertext = errors.New("keywrap: cipherText must by a multiple of 64 bits")
+
+ // ErrUnwrapFailed is returned if unwrapping a key fails.
+ ErrUnwrapFailed = errors.New("keywrap: failed to unwrap key")
+
+ // NB: the AES NewCipher call only fails if the key is an invalid length.
+
+ // ErrInvalidKey is returned when the AES key is invalid.
+ ErrInvalidKey = errors.New("keywrap: invalid AES key")
+)
+
+// Wrap a key using the RFC 3394 AES Key Wrap Algorithm.
+func Wrap(key, plainText []byte) ([]byte, error) {
+ if len(plainText)%8 != 0 {
+ return nil, ErrWrapPlaintext
+ }
+
+ c, err := aes.NewCipher(key)
+ if err != nil {
+ return nil, ErrInvalidKey
+ }
+
+ nblocks := len(plainText) / 8
+
+ // 1) Initialize variables.
+ var block [aes.BlockSize]byte
+ // - Set A = IV, an initial value (see 2.2.3)
+ for ii := 0; ii < 8; ii++ {
+ block[ii] = 0xA6
+ }
+
+ // - For i = 1 to n
+ // - Set R[i] = P[i]
+ intermediate := make([]byte, len(plainText))
+ copy(intermediate, plainText)
+
+ // 2) Calculate intermediate values.
+ for ii := 0; ii < 6; ii++ {
+ for jj := 0; jj < nblocks; jj++ {
+ // - B = AES(K, A | R[i])
+ copy(block[8:], intermediate[jj*8:jj*8+8])
+ c.Encrypt(block[:], block[:])
+
+ // - A = MSB(64, B) ^ t where t = (n*j)+1
+ t := uint64(ii*nblocks + jj + 1)
+ val := binary.BigEndian.Uint64(block[:8]) ^ t
+ binary.BigEndian.PutUint64(block[:8], val)
+
+ // - R[i] = LSB(64, B)
+ copy(intermediate[jj*8:jj*8+8], block[8:])
+ }
+ }
+
+ // 3) Output results.
+ // - Set C[0] = A
+ // - For i = 1 to n
+ // - C[i] = R[i]
+ return append(block[:8], intermediate...), nil
+}
+
+// Unwrap a key using the RFC 3394 AES Key Wrap Algorithm.
+func Unwrap(key, cipherText []byte) ([]byte, error) {
+ if len(cipherText)%8 != 0 {
+ return nil, ErrUnwrapCiphertext
+ }
+
+ c, err := aes.NewCipher(key)
+ if err != nil {
+ return nil, ErrInvalidKey
+ }
+
+ nblocks := len(cipherText)/8 - 1
+
+ // 1) Initialize variables.
+ var block [aes.BlockSize]byte
+ // - Set A = C[0]
+ copy(block[:8], cipherText[:8])
+
+ // - For i = 1 to n
+ // - Set R[i] = C[i]
+ intermediate := make([]byte, len(cipherText)-8)
+ copy(intermediate, cipherText[8:])
+
+ // 2) Compute intermediate values.
+ for jj := 5; jj >= 0; jj-- {
+ for ii := nblocks - 1; ii >= 0; ii-- {
+ // - B = AES-1(K, (A ^ t) | R[i]) where t = n*j+1
+ // - A = MSB(64, B)
+ t := uint64(jj*nblocks + ii + 1)
+ val := binary.BigEndian.Uint64(block[:8]) ^ t
+ binary.BigEndian.PutUint64(block[:8], val)
+
+ copy(block[8:], intermediate[ii*8:ii*8+8])
+ c.Decrypt(block[:], block[:])
+
+ // - R[i] = LSB(B, 64)
+ copy(intermediate[ii*8:ii*8+8], block[8:])
+ }
+ }
+
+ // 3) Output results.
+ // - If A is an appropriate initial value (see 2.2.3),
+ for ii := 0; ii < 8; ii++ {
+ if block[ii] != 0xA6 {
+ return nil, ErrUnwrapFailed
+ }
+ }
+
+ // - For i = 1 to n
+ // - P[i] = R[i]
+ return intermediate, nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/armor.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/armor.go
new file mode 100644
index 000000000..e0a677f28
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/armor.go
@@ -0,0 +1,183 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package armor implements OpenPGP ASCII Armor, see RFC 4880. OpenPGP Armor is
+// very similar to PEM except that it has an additional CRC checksum.
+package armor // import "github.com/ProtonMail/go-crypto/openpgp/armor"
+
+import (
+ "bufio"
+ "bytes"
+ "encoding/base64"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+// A Block represents an OpenPGP armored structure.
+//
+// The encoded form is:
+//
+// -----BEGIN Type-----
+// Headers
+//
+// base64-encoded Bytes
+// '=' base64 encoded checksum (optional) not checked anymore
+// -----END Type-----
+//
+// where Headers is a possibly empty sequence of Key: Value lines.
+//
+// Since the armored data can be very large, this package presents a streaming
+// interface.
+type Block struct {
+ Type string // The type, taken from the preamble (i.e. "PGP SIGNATURE").
+ Header map[string]string // Optional headers.
+ Body io.Reader // A Reader from which the contents can be read
+ lReader lineReader
+ oReader openpgpReader
+}
+
+var ArmorCorrupt error = errors.StructuralError("armor invalid")
+
+var armorStart = []byte("-----BEGIN ")
+var armorEnd = []byte("-----END ")
+var armorEndOfLine = []byte("-----")
+
+// lineReader wraps a line based reader. It watches for the end of an armor block
+type lineReader struct {
+ in *bufio.Reader
+ buf []byte
+ eof bool
+}
+
+func (l *lineReader) Read(p []byte) (n int, err error) {
+ if l.eof {
+ return 0, io.EOF
+ }
+
+ if len(l.buf) > 0 {
+ n = copy(p, l.buf)
+ l.buf = l.buf[n:]
+ return
+ }
+
+ line, isPrefix, err := l.in.ReadLine()
+ if err != nil {
+ return
+ }
+ if isPrefix {
+ return 0, ArmorCorrupt
+ }
+
+ if bytes.HasPrefix(line, armorEnd) {
+ l.eof = true
+ return 0, io.EOF
+ }
+
+ if len(line) == 5 && line[0] == '=' {
+ // This is the checksum line
+ // Don't check the checksum
+
+ l.eof = true
+ return 0, io.EOF
+ }
+
+ if len(line) > 96 {
+ return 0, ArmorCorrupt
+ }
+
+ n = copy(p, line)
+ bytesToSave := len(line) - n
+ if bytesToSave > 0 {
+ if cap(l.buf) < bytesToSave {
+ l.buf = make([]byte, 0, bytesToSave)
+ }
+ l.buf = l.buf[0:bytesToSave]
+ copy(l.buf, line[n:])
+ }
+
+ return
+}
+
+// openpgpReader passes Read calls to the underlying base64 decoder.
+type openpgpReader struct {
+ lReader *lineReader
+ b64Reader io.Reader
+}
+
+func (r *openpgpReader) Read(p []byte) (n int, err error) {
+ n, err = r.b64Reader.Read(p)
+ return
+}
+
+// Decode reads a PGP armored block from the given Reader. It will ignore
+// leading garbage. If it doesn't find a block, it will return nil, io.EOF. The
+// given Reader is not usable after calling this function: an arbitrary amount
+// of data may have been read past the end of the block.
+func Decode(in io.Reader) (p *Block, err error) {
+ r := bufio.NewReaderSize(in, 100)
+ var line []byte
+ ignoreNext := false
+
+TryNextBlock:
+ p = nil
+
+ // Skip leading garbage
+ for {
+ ignoreThis := ignoreNext
+ line, ignoreNext, err = r.ReadLine()
+ if err != nil {
+ return
+ }
+ if ignoreNext || ignoreThis {
+ continue
+ }
+ line = bytes.TrimSpace(line)
+ if len(line) > len(armorStart)+len(armorEndOfLine) && bytes.HasPrefix(line, armorStart) {
+ break
+ }
+ }
+
+ p = new(Block)
+ p.Type = string(line[len(armorStart) : len(line)-len(armorEndOfLine)])
+ p.Header = make(map[string]string)
+ nextIsContinuation := false
+ var lastKey string
+
+ // Read headers
+ for {
+ isContinuation := nextIsContinuation
+ line, nextIsContinuation, err = r.ReadLine()
+ if err != nil {
+ p = nil
+ return
+ }
+ if isContinuation {
+ p.Header[lastKey] += string(line)
+ continue
+ }
+ line = bytes.TrimSpace(line)
+ if len(line) == 0 {
+ break
+ }
+
+ i := bytes.Index(line, []byte(":"))
+ if i == -1 {
+ goto TryNextBlock
+ }
+ lastKey = string(line[:i])
+ var value string
+ if len(line) > i+2 {
+ value = string(line[i+2:])
+ }
+ p.Header[lastKey] = value
+ }
+
+ p.lReader.in = r
+ p.oReader.lReader = &p.lReader
+ p.oReader.b64Reader = base64.NewDecoder(base64.StdEncoding, &p.lReader)
+ p.Body = &p.oReader
+
+ return
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go
new file mode 100644
index 000000000..112f98b83
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/armor/encode.go
@@ -0,0 +1,198 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package armor
+
+import (
+ "encoding/base64"
+ "io"
+)
+
+var armorHeaderSep = []byte(": ")
+var blockEnd = []byte("\n=")
+var newline = []byte("\n")
+var armorEndOfLineOut = []byte("-----\n")
+
+const crc24Init = 0xb704ce
+const crc24Poly = 0x1864cfb
+
+// crc24 calculates the OpenPGP checksum as specified in RFC 4880, section 6.1
+func crc24(crc uint32, d []byte) uint32 {
+ for _, b := range d {
+ crc ^= uint32(b) << 16
+ for i := 0; i < 8; i++ {
+ crc <<= 1
+ if crc&0x1000000 != 0 {
+ crc ^= crc24Poly
+ }
+ }
+ }
+ return crc
+}
+
+// writeSlices writes its arguments to the given Writer.
+func writeSlices(out io.Writer, slices ...[]byte) (err error) {
+ for _, s := range slices {
+ _, err = out.Write(s)
+ if err != nil {
+ return err
+ }
+ }
+ return
+}
+
+// lineBreaker breaks data across several lines, all of the same byte length
+// (except possibly the last). Lines are broken with a single '\n'.
+type lineBreaker struct {
+ lineLength int
+ line []byte
+ used int
+ out io.Writer
+ haveWritten bool
+}
+
+func newLineBreaker(out io.Writer, lineLength int) *lineBreaker {
+ return &lineBreaker{
+ lineLength: lineLength,
+ line: make([]byte, lineLength),
+ used: 0,
+ out: out,
+ }
+}
+
+func (l *lineBreaker) Write(b []byte) (n int, err error) {
+ n = len(b)
+
+ if n == 0 {
+ return
+ }
+
+ if l.used == 0 && l.haveWritten {
+ _, err = l.out.Write([]byte{'\n'})
+ if err != nil {
+ return
+ }
+ }
+
+ if l.used+len(b) < l.lineLength {
+ l.used += copy(l.line[l.used:], b)
+ return
+ }
+
+ l.haveWritten = true
+ _, err = l.out.Write(l.line[0:l.used])
+ if err != nil {
+ return
+ }
+ excess := l.lineLength - l.used
+ l.used = 0
+
+ _, err = l.out.Write(b[0:excess])
+ if err != nil {
+ return
+ }
+
+ _, err = l.Write(b[excess:])
+ return
+}
+
+func (l *lineBreaker) Close() (err error) {
+ if l.used > 0 {
+ _, err = l.out.Write(l.line[0:l.used])
+ if err != nil {
+ return
+ }
+ }
+
+ return
+}
+
+// encoding keeps track of a running CRC24 over the data which has been written
+// to it and outputs a OpenPGP checksum when closed, followed by an armor
+// trailer.
+//
+// It's built into a stack of io.Writers:
+//
+// encoding -> base64 encoder -> lineBreaker -> out
+type encoding struct {
+ out io.Writer
+ breaker *lineBreaker
+ b64 io.WriteCloser
+ crc uint32
+ crcEnabled bool
+ blockType []byte
+}
+
+func (e *encoding) Write(data []byte) (n int, err error) {
+ if e.crcEnabled {
+ e.crc = crc24(e.crc, data)
+ }
+ return e.b64.Write(data)
+}
+
+func (e *encoding) Close() (err error) {
+ err = e.b64.Close()
+ if err != nil {
+ return
+ }
+ e.breaker.Close()
+
+ if e.crcEnabled {
+ var checksumBytes [3]byte
+ checksumBytes[0] = byte(e.crc >> 16)
+ checksumBytes[1] = byte(e.crc >> 8)
+ checksumBytes[2] = byte(e.crc)
+
+ var b64ChecksumBytes [4]byte
+ base64.StdEncoding.Encode(b64ChecksumBytes[:], checksumBytes[:])
+
+ return writeSlices(e.out, blockEnd, b64ChecksumBytes[:], newline, armorEnd, e.blockType, armorEndOfLine)
+ }
+ return writeSlices(e.out, newline, armorEnd, e.blockType, armorEndOfLine)
+}
+
+func encode(out io.Writer, blockType string, headers map[string]string, checksum bool) (w io.WriteCloser, err error) {
+ bType := []byte(blockType)
+ err = writeSlices(out, armorStart, bType, armorEndOfLineOut)
+ if err != nil {
+ return
+ }
+
+ for k, v := range headers {
+ err = writeSlices(out, []byte(k), armorHeaderSep, []byte(v), newline)
+ if err != nil {
+ return
+ }
+ }
+
+ _, err = out.Write(newline)
+ if err != nil {
+ return
+ }
+
+ e := &encoding{
+ out: out,
+ breaker: newLineBreaker(out, 64),
+ blockType: bType,
+ crc: crc24Init,
+ crcEnabled: checksum,
+ }
+ e.b64 = base64.NewEncoder(base64.StdEncoding, e.breaker)
+ return e, nil
+}
+
+// Encode returns a WriteCloser which will encode the data written to it in
+// OpenPGP armor.
+func Encode(out io.Writer, blockType string, headers map[string]string) (w io.WriteCloser, err error) {
+ return encode(out, blockType, headers, true)
+}
+
+// EncodeWithChecksumOption returns a WriteCloser which will encode the data written to it in
+// OpenPGP armor and provides the option to include a checksum.
+// When forming ASCII Armor, the CRC24 footer SHOULD NOT be generated,
+// unless interoperability with implementations that require the CRC24 footer
+// to be present is a concern.
+func EncodeWithChecksumOption(out io.Writer, blockType string, headers map[string]string, doChecksum bool) (w io.WriteCloser, err error) {
+ return encode(out, blockType, headers, doChecksum)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/canonical_text.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/canonical_text.go
new file mode 100644
index 000000000..5b40e1375
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/canonical_text.go
@@ -0,0 +1,71 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package openpgp
+
+import (
+ "hash"
+ "io"
+)
+
+// NewCanonicalTextHash reformats text written to it into the canonical
+// form and then applies the hash h. See RFC 4880, section 5.2.1.
+func NewCanonicalTextHash(h hash.Hash) hash.Hash {
+ return &canonicalTextHash{h, 0}
+}
+
+type canonicalTextHash struct {
+ h hash.Hash
+ s int
+}
+
+var newline = []byte{'\r', '\n'}
+
+func writeCanonical(cw io.Writer, buf []byte, s *int) (int, error) {
+ start := 0
+ for i, c := range buf {
+ switch *s {
+ case 0:
+ if c == '\r' {
+ *s = 1
+ } else if c == '\n' {
+ if _, err := cw.Write(buf[start:i]); err != nil {
+ return 0, err
+ }
+ if _, err := cw.Write(newline); err != nil {
+ return 0, err
+ }
+ start = i + 1
+ }
+ case 1:
+ *s = 0
+ }
+ }
+
+ if _, err := cw.Write(buf[start:]); err != nil {
+ return 0, err
+ }
+ return len(buf), nil
+}
+
+func (cth *canonicalTextHash) Write(buf []byte) (int, error) {
+ return writeCanonical(cth.h, buf, &cth.s)
+}
+
+func (cth *canonicalTextHash) Sum(in []byte) []byte {
+ return cth.h.Sum(in)
+}
+
+func (cth *canonicalTextHash) Reset() {
+ cth.h.Reset()
+ cth.s = 0
+}
+
+func (cth *canonicalTextHash) Size() int {
+ return cth.h.Size()
+}
+
+func (cth *canonicalTextHash) BlockSize() int {
+ return cth.h.BlockSize()
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go
new file mode 100644
index 000000000..db8fb163b
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdh/ecdh.go
@@ -0,0 +1,206 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package ecdh implements ECDH encryption, suitable for OpenPGP,
+// as specified in RFC 6637, section 8.
+package ecdh
+
+import (
+ "bytes"
+ "errors"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/aes/keywrap"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
+)
+
+type KDF struct {
+ Hash algorithm.Hash
+ Cipher algorithm.Cipher
+}
+
+type PublicKey struct {
+ curve ecc.ECDHCurve
+ Point []byte
+ KDF
+}
+
+type PrivateKey struct {
+ PublicKey
+ D []byte
+}
+
+func NewPublicKey(curve ecc.ECDHCurve, kdfHash algorithm.Hash, kdfCipher algorithm.Cipher) *PublicKey {
+ return &PublicKey{
+ curve: curve,
+ KDF: KDF{
+ Hash: kdfHash,
+ Cipher: kdfCipher,
+ },
+ }
+}
+
+func NewPrivateKey(key PublicKey) *PrivateKey {
+ return &PrivateKey{
+ PublicKey: key,
+ }
+}
+
+func (pk *PublicKey) GetCurve() ecc.ECDHCurve {
+ return pk.curve
+}
+
+func (pk *PublicKey) MarshalPoint() []byte {
+ return pk.curve.MarshalBytePoint(pk.Point)
+}
+
+func (pk *PublicKey) UnmarshalPoint(p []byte) error {
+ pk.Point = pk.curve.UnmarshalBytePoint(p)
+ if pk.Point == nil {
+ return errors.New("ecdh: failed to parse EC point")
+ }
+ return nil
+}
+
+func (sk *PrivateKey) MarshalByteSecret() []byte {
+ return sk.curve.MarshalByteSecret(sk.D)
+}
+
+func (sk *PrivateKey) UnmarshalByteSecret(d []byte) error {
+ sk.D = sk.curve.UnmarshalByteSecret(d)
+
+ if sk.D == nil {
+ return errors.New("ecdh: failed to parse scalar")
+ }
+ return nil
+}
+
+func GenerateKey(rand io.Reader, c ecc.ECDHCurve, kdf KDF) (priv *PrivateKey, err error) {
+ priv = new(PrivateKey)
+ priv.PublicKey.curve = c
+ priv.PublicKey.KDF = kdf
+ priv.PublicKey.Point, priv.D, err = c.GenerateECDH(rand)
+ return
+}
+
+func Encrypt(random io.Reader, pub *PublicKey, msg, curveOID, fingerprint []byte) (vsG, c []byte, err error) {
+ if len(msg) > 40 {
+ return nil, nil, errors.New("ecdh: message too long")
+ }
+ // the sender MAY use 21, 13, and 5 bytes of padding for AES-128,
+ // AES-192, and AES-256, respectively, to provide the same number of
+ // octets, 40 total, as an input to the key wrapping method.
+ padding := make([]byte, 40-len(msg))
+ for i := range padding {
+ padding[i] = byte(40 - len(msg))
+ }
+ m := append(msg, padding...)
+
+ ephemeral, zb, err := pub.curve.Encaps(random, pub.Point)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ vsG = pub.curve.MarshalBytePoint(ephemeral)
+
+ z, err := buildKey(pub, zb, curveOID, fingerprint, false, false)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ if c, err = keywrap.Wrap(z, m); err != nil {
+ return nil, nil, err
+ }
+
+ return vsG, c, nil
+
+}
+
+func Decrypt(priv *PrivateKey, vsG, c, curveOID, fingerprint []byte) (msg []byte, err error) {
+ var m []byte
+ zb, err := priv.PublicKey.curve.Decaps(priv.curve.UnmarshalBytePoint(vsG), priv.D)
+
+ // Try buildKey three times to workaround an old bug, see comments in buildKey.
+ for i := 0; i < 3; i++ {
+ var z []byte
+ // RFC6637 §8: "Compute Z = KDF( S, Z_len, Param );"
+ z, err = buildKey(&priv.PublicKey, zb, curveOID, fingerprint, i == 1, i == 2)
+ if err != nil {
+ return nil, err
+ }
+
+ // RFC6637 §8: "Compute C = AESKeyWrap( Z, c ) as per [RFC3394]"
+ m, err = keywrap.Unwrap(z, c)
+ if err == nil {
+ break
+ }
+ }
+
+ // Only return an error after we've tried all (required) variants of buildKey.
+ if err != nil {
+ return nil, err
+ }
+
+ // RFC6637 §8: "m = symm_alg_ID || session key || checksum || pkcs5_padding"
+ // The last byte should be the length of the padding, as per PKCS5; strip it off.
+ return m[:len(m)-int(m[len(m)-1])], nil
+}
+
+func buildKey(pub *PublicKey, zb []byte, curveOID, fingerprint []byte, stripLeading, stripTrailing bool) ([]byte, error) {
+ // Param = curve_OID_len || curve_OID || public_key_alg_ID || 03
+ // || 01 || KDF_hash_ID || KEK_alg_ID for AESKeyWrap
+ // || "Anonymous Sender " || recipient_fingerprint;
+ param := new(bytes.Buffer)
+ if _, err := param.Write(curveOID); err != nil {
+ return nil, err
+ }
+ algKDF := []byte{18, 3, 1, pub.KDF.Hash.Id(), pub.KDF.Cipher.Id()}
+ if _, err := param.Write(algKDF); err != nil {
+ return nil, err
+ }
+ if _, err := param.Write([]byte("Anonymous Sender ")); err != nil {
+ return nil, err
+ }
+ if _, err := param.Write(fingerprint[:]); err != nil {
+ return nil, err
+ }
+
+ // MB = Hash ( 00 || 00 || 00 || 01 || ZB || Param );
+ h := pub.KDF.Hash.New()
+ if _, err := h.Write([]byte{0x0, 0x0, 0x0, 0x1}); err != nil {
+ return nil, err
+ }
+ zbLen := len(zb)
+ i := 0
+ j := zbLen - 1
+ if stripLeading {
+ // Work around old go crypto bug where the leading zeros are missing.
+ for i < zbLen && zb[i] == 0 {
+ i++
+ }
+ }
+ if stripTrailing {
+ // Work around old OpenPGP.js bug where insignificant trailing zeros in
+ // this little-endian number are missing.
+ // (See https://github.com/openpgpjs/openpgpjs/pull/853.)
+ for j >= 0 && zb[j] == 0 {
+ j--
+ }
+ }
+ if _, err := h.Write(zb[i : j+1]); err != nil {
+ return nil, err
+ }
+ if _, err := h.Write(param.Bytes()); err != nil {
+ return nil, err
+ }
+ mb := h.Sum(nil)
+
+ return mb[:pub.KDF.Cipher.KeySize()], nil // return oBits leftmost bits of MB.
+
+}
+
+func Validate(priv *PrivateKey) error {
+ return priv.curve.ValidateECDH(priv.Point, priv.D)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdsa/ecdsa.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdsa/ecdsa.go
new file mode 100644
index 000000000..f94ae1b2f
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/ecdsa/ecdsa.go
@@ -0,0 +1,80 @@
+// Package ecdsa implements ECDSA signature, suitable for OpenPGP,
+// as specified in RFC 6637, section 5.
+package ecdsa
+
+import (
+ "errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
+ "io"
+ "math/big"
+)
+
+type PublicKey struct {
+ X, Y *big.Int
+ curve ecc.ECDSACurve
+}
+
+type PrivateKey struct {
+ PublicKey
+ D *big.Int
+}
+
+func NewPublicKey(curve ecc.ECDSACurve) *PublicKey {
+ return &PublicKey{
+ curve: curve,
+ }
+}
+
+func NewPrivateKey(key PublicKey) *PrivateKey {
+ return &PrivateKey{
+ PublicKey: key,
+ }
+}
+
+func (pk *PublicKey) GetCurve() ecc.ECDSACurve {
+ return pk.curve
+}
+
+func (pk *PublicKey) MarshalPoint() []byte {
+ return pk.curve.MarshalIntegerPoint(pk.X, pk.Y)
+}
+
+func (pk *PublicKey) UnmarshalPoint(p []byte) error {
+ pk.X, pk.Y = pk.curve.UnmarshalIntegerPoint(p)
+ if pk.X == nil {
+ return errors.New("ecdsa: failed to parse EC point")
+ }
+ return nil
+}
+
+func (sk *PrivateKey) MarshalIntegerSecret() []byte {
+ return sk.curve.MarshalIntegerSecret(sk.D)
+}
+
+func (sk *PrivateKey) UnmarshalIntegerSecret(d []byte) error {
+ sk.D = sk.curve.UnmarshalIntegerSecret(d)
+
+ if sk.D == nil {
+ return errors.New("ecdsa: failed to parse scalar")
+ }
+ return nil
+}
+
+func GenerateKey(rand io.Reader, c ecc.ECDSACurve) (priv *PrivateKey, err error) {
+ priv = new(PrivateKey)
+ priv.PublicKey.curve = c
+ priv.PublicKey.X, priv.PublicKey.Y, priv.D, err = c.GenerateECDSA(rand)
+ return
+}
+
+func Sign(rand io.Reader, priv *PrivateKey, hash []byte) (r, s *big.Int, err error) {
+ return priv.PublicKey.curve.Sign(rand, priv.X, priv.Y, priv.D, hash)
+}
+
+func Verify(pub *PublicKey, hash []byte, r, s *big.Int) bool {
+ return pub.curve.Verify(pub.X, pub.Y, hash, r, s)
+}
+
+func Validate(priv *PrivateKey) error {
+ return priv.curve.ValidateECDSA(priv.X, priv.Y, priv.D.Bytes())
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/ed25519/ed25519.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/ed25519/ed25519.go
new file mode 100644
index 000000000..6abdf7c44
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/ed25519/ed25519.go
@@ -0,0 +1,115 @@
+// Package ed25519 implements the ed25519 signature algorithm for OpenPGP
+// as defined in the Open PGP crypto refresh.
+package ed25519
+
+import (
+ "crypto/subtle"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ ed25519lib "github.com/cloudflare/circl/sign/ed25519"
+)
+
+const (
+ // PublicKeySize is the size, in bytes, of public keys in this package.
+ PublicKeySize = ed25519lib.PublicKeySize
+ // SeedSize is the size, in bytes, of private key seeds.
+ // The private key representation used by RFC 8032.
+ SeedSize = ed25519lib.SeedSize
+ // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
+ SignatureSize = ed25519lib.SignatureSize
+)
+
+type PublicKey struct {
+ // Point represents the elliptic curve point of the public key.
+ Point []byte
+}
+
+type PrivateKey struct {
+ PublicKey
+ // Key the private key representation by RFC 8032,
+ // encoded as seed | pub key point.
+ Key []byte
+}
+
+// NewPublicKey creates a new empty ed25519 public key.
+func NewPublicKey() *PublicKey {
+ return &PublicKey{}
+}
+
+// NewPrivateKey creates a new empty private key referencing the public key.
+func NewPrivateKey(key PublicKey) *PrivateKey {
+ return &PrivateKey{
+ PublicKey: key,
+ }
+}
+
+// Seed returns the ed25519 private key secret seed.
+// The private key representation by RFC 8032.
+func (pk *PrivateKey) Seed() []byte {
+ return pk.Key[:SeedSize]
+}
+
+// MarshalByteSecret returns the underlying 32 byte seed of the private key.
+func (pk *PrivateKey) MarshalByteSecret() []byte {
+ return pk.Seed()
+}
+
+// UnmarshalByteSecret computes the private key from the secret seed
+// and stores it in the private key object.
+func (sk *PrivateKey) UnmarshalByteSecret(seed []byte) error {
+ sk.Key = ed25519lib.NewKeyFromSeed(seed)
+ return nil
+}
+
+// GenerateKey generates a fresh private key with the provided randomness source.
+func GenerateKey(rand io.Reader) (*PrivateKey, error) {
+ publicKey, privateKey, err := ed25519lib.GenerateKey(rand)
+ if err != nil {
+ return nil, err
+ }
+ privateKeyOut := new(PrivateKey)
+ privateKeyOut.PublicKey.Point = publicKey[:]
+ privateKeyOut.Key = privateKey[:]
+ return privateKeyOut, nil
+}
+
+// Sign signs a message with the ed25519 algorithm.
+// priv MUST be a valid key! Check this with Validate() before use.
+func Sign(priv *PrivateKey, message []byte) ([]byte, error) {
+ return ed25519lib.Sign(priv.Key, message), nil
+}
+
+// Verify verifies an ed25519 signature.
+func Verify(pub *PublicKey, message []byte, signature []byte) bool {
+ return ed25519lib.Verify(pub.Point, message, signature)
+}
+
+// Validate checks if the ed25519 private key is valid.
+func Validate(priv *PrivateKey) error {
+ expectedPrivateKey := ed25519lib.NewKeyFromSeed(priv.Seed())
+ if subtle.ConstantTimeCompare(priv.Key, expectedPrivateKey) == 0 {
+ return errors.KeyInvalidError("ed25519: invalid ed25519 secret")
+ }
+ if subtle.ConstantTimeCompare(priv.PublicKey.Point, expectedPrivateKey[SeedSize:]) == 0 {
+ return errors.KeyInvalidError("ed25519: invalid ed25519 public key")
+ }
+ return nil
+}
+
+// ENCODING/DECODING signature:
+
+// WriteSignature encodes and writes an ed25519 signature to writer.
+func WriteSignature(writer io.Writer, signature []byte) error {
+ _, err := writer.Write(signature)
+ return err
+}
+
+// ReadSignature decodes an ed25519 signature from a reader.
+func ReadSignature(reader io.Reader) ([]byte, error) {
+ signature := make([]byte, SignatureSize)
+ if _, err := io.ReadFull(reader, signature); err != nil {
+ return nil, err
+ }
+ return signature, nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/ed448/ed448.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/ed448/ed448.go
new file mode 100644
index 000000000..b11fb4fb1
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/ed448/ed448.go
@@ -0,0 +1,119 @@
+// Package ed448 implements the ed448 signature algorithm for OpenPGP
+// as defined in the Open PGP crypto refresh.
+package ed448
+
+import (
+ "crypto/subtle"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ ed448lib "github.com/cloudflare/circl/sign/ed448"
+)
+
+const (
+ // PublicKeySize is the size, in bytes, of public keys in this package.
+ PublicKeySize = ed448lib.PublicKeySize
+ // SeedSize is the size, in bytes, of private key seeds.
+ // The private key representation used by RFC 8032.
+ SeedSize = ed448lib.SeedSize
+ // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
+ SignatureSize = ed448lib.SignatureSize
+)
+
+type PublicKey struct {
+ // Point represents the elliptic curve point of the public key.
+ Point []byte
+}
+
+type PrivateKey struct {
+ PublicKey
+ // Key the private key representation by RFC 8032,
+ // encoded as seed | public key point.
+ Key []byte
+}
+
+// NewPublicKey creates a new empty ed448 public key.
+func NewPublicKey() *PublicKey {
+ return &PublicKey{}
+}
+
+// NewPrivateKey creates a new empty private key referencing the public key.
+func NewPrivateKey(key PublicKey) *PrivateKey {
+ return &PrivateKey{
+ PublicKey: key,
+ }
+}
+
+// Seed returns the ed448 private key secret seed.
+// The private key representation by RFC 8032.
+func (pk *PrivateKey) Seed() []byte {
+ return pk.Key[:SeedSize]
+}
+
+// MarshalByteSecret returns the underlying seed of the private key.
+func (pk *PrivateKey) MarshalByteSecret() []byte {
+ return pk.Seed()
+}
+
+// UnmarshalByteSecret computes the private key from the secret seed
+// and stores it in the private key object.
+func (sk *PrivateKey) UnmarshalByteSecret(seed []byte) error {
+ sk.Key = ed448lib.NewKeyFromSeed(seed)
+ return nil
+}
+
+// GenerateKey generates a fresh private key with the provided randomness source.
+func GenerateKey(rand io.Reader) (*PrivateKey, error) {
+ publicKey, privateKey, err := ed448lib.GenerateKey(rand)
+ if err != nil {
+ return nil, err
+ }
+ privateKeyOut := new(PrivateKey)
+ privateKeyOut.PublicKey.Point = publicKey[:]
+ privateKeyOut.Key = privateKey[:]
+ return privateKeyOut, nil
+}
+
+// Sign signs a message with the ed448 algorithm.
+// priv MUST be a valid key! Check this with Validate() before use.
+func Sign(priv *PrivateKey, message []byte) ([]byte, error) {
+ // Ed448 is used with the empty string as a context string.
+ // See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-08#section-13.7
+ return ed448lib.Sign(priv.Key, message, ""), nil
+}
+
+// Verify verifies a ed448 signature
+func Verify(pub *PublicKey, message []byte, signature []byte) bool {
+ // Ed448 is used with the empty string as a context string.
+ // See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-08#section-13.7
+ return ed448lib.Verify(pub.Point, message, signature, "")
+}
+
+// Validate checks if the ed448 private key is valid
+func Validate(priv *PrivateKey) error {
+ expectedPrivateKey := ed448lib.NewKeyFromSeed(priv.Seed())
+ if subtle.ConstantTimeCompare(priv.Key, expectedPrivateKey) == 0 {
+ return errors.KeyInvalidError("ed448: invalid ed448 secret")
+ }
+ if subtle.ConstantTimeCompare(priv.PublicKey.Point, expectedPrivateKey[SeedSize:]) == 0 {
+ return errors.KeyInvalidError("ed448: invalid ed448 public key")
+ }
+ return nil
+}
+
+// ENCODING/DECODING signature:
+
+// WriteSignature encodes and writes an ed448 signature to writer.
+func WriteSignature(writer io.Writer, signature []byte) error {
+ _, err := writer.Write(signature)
+ return err
+}
+
+// ReadSignature decodes an ed448 signature from a reader.
+func ReadSignature(reader io.Reader) ([]byte, error) {
+ signature := make([]byte, SignatureSize)
+ if _, err := io.ReadFull(reader, signature); err != nil {
+ return nil, err
+ }
+ return signature, nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/eddsa/eddsa.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/eddsa/eddsa.go
new file mode 100644
index 000000000..99ecfc7f1
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/eddsa/eddsa.go
@@ -0,0 +1,91 @@
+// Package eddsa implements EdDSA signature, suitable for OpenPGP, as specified in
+// https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-13.7
+package eddsa
+
+import (
+ "errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
+ "io"
+)
+
+type PublicKey struct {
+ X []byte
+ curve ecc.EdDSACurve
+}
+
+type PrivateKey struct {
+ PublicKey
+ D []byte
+}
+
+func NewPublicKey(curve ecc.EdDSACurve) *PublicKey {
+ return &PublicKey{
+ curve: curve,
+ }
+}
+
+func NewPrivateKey(key PublicKey) *PrivateKey {
+ return &PrivateKey{
+ PublicKey: key,
+ }
+}
+
+func (pk *PublicKey) GetCurve() ecc.EdDSACurve {
+ return pk.curve
+}
+
+func (pk *PublicKey) MarshalPoint() []byte {
+ return pk.curve.MarshalBytePoint(pk.X)
+}
+
+func (pk *PublicKey) UnmarshalPoint(x []byte) error {
+ pk.X = pk.curve.UnmarshalBytePoint(x)
+
+ if pk.X == nil {
+ return errors.New("eddsa: failed to parse EC point")
+ }
+ return nil
+}
+
+func (sk *PrivateKey) MarshalByteSecret() []byte {
+ return sk.curve.MarshalByteSecret(sk.D)
+}
+
+func (sk *PrivateKey) UnmarshalByteSecret(d []byte) error {
+ sk.D = sk.curve.UnmarshalByteSecret(d)
+
+ if sk.D == nil {
+ return errors.New("eddsa: failed to parse scalar")
+ }
+ return nil
+}
+
+func GenerateKey(rand io.Reader, c ecc.EdDSACurve) (priv *PrivateKey, err error) {
+ priv = new(PrivateKey)
+ priv.PublicKey.curve = c
+ priv.PublicKey.X, priv.D, err = c.GenerateEdDSA(rand)
+ return
+}
+
+func Sign(priv *PrivateKey, message []byte) (r, s []byte, err error) {
+ sig, err := priv.PublicKey.curve.Sign(priv.PublicKey.X, priv.D, message)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ r, s = priv.PublicKey.curve.MarshalSignature(sig)
+ return
+}
+
+func Verify(pub *PublicKey, message, r, s []byte) bool {
+ sig := pub.curve.UnmarshalSignature(r, s)
+ if sig == nil {
+ return false
+ }
+
+ return pub.curve.Verify(pub.X, message, sig)
+}
+
+func Validate(priv *PrivateKey) error {
+ return priv.curve.ValidateEdDSA(priv.PublicKey.X, priv.D)
+}
diff --git a/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/elgamal/elgamal.go
similarity index 89%
rename from vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go
rename to vendor/github.com/ProtonMail/go-crypto/openpgp/elgamal/elgamal.go
index f922bdbca..bad277434 100644
--- a/vendor/golang.org/x/crypto/openpgp/elgamal/elgamal.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/elgamal/elgamal.go
@@ -10,13 +10,7 @@
// This form of ElGamal embeds PKCS#1 v1.5 padding, which may make it
// unsuitable for other protocols. RSA should be used in preference in any
// case.
-//
-// Deprecated: this package was only provided to support ElGamal encryption in
-// OpenPGP. The golang.org/x/crypto/openpgp package is now deprecated (see
-// https://golang.org/issue/44226), and ElGamal in the OpenPGP ecosystem has
-// compatibility and security issues (see https://eprint.iacr.org/2021/923).
-// Moreover, this package doesn't protect against side-channel attacks.
-package elgamal
+package elgamal // import "github.com/ProtonMail/go-crypto/openpgp/elgamal"
import (
"crypto/rand"
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go
new file mode 100644
index 000000000..0eb3937b3
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/errors/errors.go
@@ -0,0 +1,180 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package errors contains common error types for the OpenPGP packages.
+package errors // import "github.com/ProtonMail/go-crypto/openpgp/errors"
+
+import (
+ "strconv"
+)
+
+var (
+ // ErrDecryptSessionKeyParsing is a generic error message for parsing errors in decrypted data
+ // to reduce the risk of oracle attacks.
+ ErrDecryptSessionKeyParsing = DecryptWithSessionKeyError("parsing error")
+ // ErrAEADTagVerification is returned if one of the tag verifications in SEIPDv2 fails
+ ErrAEADTagVerification error = DecryptWithSessionKeyError("AEAD tag verification failed")
+ // ErrMDCHashMismatch
+ ErrMDCHashMismatch error = SignatureError("MDC hash mismatch")
+ // ErrMDCMissing
+ ErrMDCMissing error = SignatureError("MDC packet not found")
+)
+
+// A StructuralError is returned when OpenPGP data is found to be syntactically
+// invalid.
+type StructuralError string
+
+func (s StructuralError) Error() string {
+ return "openpgp: invalid data: " + string(s)
+}
+
+// A DecryptWithSessionKeyError is returned when a failure occurs when reading from symmetrically decrypted data or
+// an authentication tag verification fails.
+// Such an error indicates that the supplied session key is likely wrong or the data got corrupted.
+type DecryptWithSessionKeyError string
+
+func (s DecryptWithSessionKeyError) Error() string {
+ return "openpgp: decryption with session key failed: " + string(s)
+}
+
+// HandleSensitiveParsingError handles parsing errors when reading data from potentially decrypted data.
+// The function makes parsing errors generic to reduce the risk of oracle attacks in SEIPDv1.
+func HandleSensitiveParsingError(err error, decrypted bool) error {
+ if !decrypted {
+ // Data was not encrypted so we return the inner error.
+ return err
+ }
+ // The data is read from a stream that decrypts using a session key;
+ // therefore, we need to handle parsing errors appropriately.
+ // This is essential to mitigate the risk of oracle attacks.
+ if decError, ok := err.(*DecryptWithSessionKeyError); ok {
+ return decError
+ }
+ if decError, ok := err.(DecryptWithSessionKeyError); ok {
+ return decError
+ }
+ return ErrDecryptSessionKeyParsing
+}
+
+// UnsupportedError indicates that, although the OpenPGP data is valid, it
+// makes use of currently unimplemented features.
+type UnsupportedError string
+
+func (s UnsupportedError) Error() string {
+ return "openpgp: unsupported feature: " + string(s)
+}
+
+// InvalidArgumentError indicates that the caller is in error and passed an
+// incorrect value.
+type InvalidArgumentError string
+
+func (i InvalidArgumentError) Error() string {
+ return "openpgp: invalid argument: " + string(i)
+}
+
+// SignatureError indicates that a syntactically valid signature failed to
+// validate.
+type SignatureError string
+
+func (b SignatureError) Error() string {
+ return "openpgp: invalid signature: " + string(b)
+}
+
+type signatureExpiredError int
+
+func (se signatureExpiredError) Error() string {
+ return "openpgp: signature expired"
+}
+
+var ErrSignatureExpired error = signatureExpiredError(0)
+
+type keyExpiredError int
+
+func (ke keyExpiredError) Error() string {
+ return "openpgp: key expired"
+}
+
+var ErrSignatureOlderThanKey error = signatureOlderThanKeyError(0)
+
+type signatureOlderThanKeyError int
+
+func (ske signatureOlderThanKeyError) Error() string {
+ return "openpgp: signature is older than the key"
+}
+
+var ErrKeyExpired error = keyExpiredError(0)
+
+type keyIncorrectError int
+
+func (ki keyIncorrectError) Error() string {
+ return "openpgp: incorrect key"
+}
+
+var ErrKeyIncorrect error = keyIncorrectError(0)
+
+// KeyInvalidError indicates that the public key parameters are invalid
+// as they do not match the private ones
+type KeyInvalidError string
+
+func (e KeyInvalidError) Error() string {
+ return "openpgp: invalid key: " + string(e)
+}
+
+type unknownIssuerError int
+
+func (unknownIssuerError) Error() string {
+ return "openpgp: signature made by unknown entity"
+}
+
+var ErrUnknownIssuer error = unknownIssuerError(0)
+
+type keyRevokedError int
+
+func (keyRevokedError) Error() string {
+ return "openpgp: signature made by revoked key"
+}
+
+var ErrKeyRevoked error = keyRevokedError(0)
+
+type WeakAlgorithmError string
+
+func (e WeakAlgorithmError) Error() string {
+ return "openpgp: weak algorithms are rejected: " + string(e)
+}
+
+type UnknownPacketTypeError uint8
+
+func (upte UnknownPacketTypeError) Error() string {
+ return "openpgp: unknown packet type: " + strconv.Itoa(int(upte))
+}
+
+type CriticalUnknownPacketTypeError uint8
+
+func (upte CriticalUnknownPacketTypeError) Error() string {
+ return "openpgp: unknown critical packet type: " + strconv.Itoa(int(upte))
+}
+
+// AEADError indicates that there is a problem when initializing or using a
+// AEAD instance, configuration struct, nonces or index values.
+type AEADError string
+
+func (ae AEADError) Error() string {
+ return "openpgp: aead error: " + string(ae)
+}
+
+// ErrDummyPrivateKey results when operations are attempted on a private key
+// that is just a dummy key. See
+// https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=doc/DETAILS;h=fe55ae16ab4e26d8356dc574c9e8bc935e71aef1;hb=23191d7851eae2217ecdac6484349849a24fd94a#l1109
+type ErrDummyPrivateKey string
+
+func (dke ErrDummyPrivateKey) Error() string {
+ return "openpgp: s2k GNU dummy key: " + string(dke)
+}
+
+// ErrMalformedMessage results when the packet sequence is incorrect
+type ErrMalformedMessage string
+
+func (dke ErrMalformedMessage) Error() string {
+ return "openpgp: malformed message " + string(dke)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/hash.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/hash.go
new file mode 100644
index 000000000..526bd7777
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/hash.go
@@ -0,0 +1,24 @@
+package openpgp
+
+import (
+ "crypto"
+
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+)
+
+// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP
+// hash id.
+func HashIdToHash(id byte) (h crypto.Hash, ok bool) {
+ return algorithm.HashIdToHash(id)
+}
+
+// HashIdToString returns the name of the hash function corresponding to the
+// given OpenPGP hash id.
+func HashIdToString(id byte) (name string, ok bool) {
+ return algorithm.HashIdToString(id)
+}
+
+// HashToHashId returns an OpenPGP hash id which corresponds the given Hash.
+func HashToHashId(h crypto.Hash) (id byte, ok bool) {
+ return algorithm.HashToHashId(h)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/aead.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/aead.go
new file mode 100644
index 000000000..d06706518
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/aead.go
@@ -0,0 +1,65 @@
+// Copyright (C) 2019 ProtonTech AG
+
+package algorithm
+
+import (
+ "crypto/cipher"
+ "github.com/ProtonMail/go-crypto/eax"
+ "github.com/ProtonMail/go-crypto/ocb"
+)
+
+// AEADMode defines the Authenticated Encryption with Associated Data mode of
+// operation.
+type AEADMode uint8
+
+// Supported modes of operation (see RFC4880bis [EAX] and RFC7253)
+const (
+ AEADModeEAX = AEADMode(1)
+ AEADModeOCB = AEADMode(2)
+ AEADModeGCM = AEADMode(3)
+)
+
+// TagLength returns the length in bytes of authentication tags.
+func (mode AEADMode) TagLength() int {
+ switch mode {
+ case AEADModeEAX:
+ return 16
+ case AEADModeOCB:
+ return 16
+ case AEADModeGCM:
+ return 16
+ default:
+ return 0
+ }
+}
+
+// NonceLength returns the length in bytes of nonces.
+func (mode AEADMode) NonceLength() int {
+ switch mode {
+ case AEADModeEAX:
+ return 16
+ case AEADModeOCB:
+ return 15
+ case AEADModeGCM:
+ return 12
+ default:
+ return 0
+ }
+}
+
+// New returns a fresh instance of the given mode
+func (mode AEADMode) New(block cipher.Block) (alg cipher.AEAD) {
+ var err error
+ switch mode {
+ case AEADModeEAX:
+ alg, err = eax.NewEAX(block)
+ case AEADModeOCB:
+ alg, err = ocb.NewOCB(block)
+ case AEADModeGCM:
+ alg, err = cipher.NewGCM(block)
+ }
+ if err != nil {
+ panic(err.Error())
+ }
+ return alg
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/cipher.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/cipher.go
new file mode 100644
index 000000000..c76a75bcd
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/cipher.go
@@ -0,0 +1,97 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package algorithm
+
+import (
+ "crypto/aes"
+ "crypto/cipher"
+ "crypto/des"
+
+ "golang.org/x/crypto/cast5"
+)
+
+// Cipher is an official symmetric key cipher algorithm. See RFC 4880,
+// section 9.2.
+type Cipher interface {
+ // Id returns the algorithm ID, as a byte, of the cipher.
+ Id() uint8
+ // KeySize returns the key size, in bytes, of the cipher.
+ KeySize() int
+ // BlockSize returns the block size, in bytes, of the cipher.
+ BlockSize() int
+ // New returns a fresh instance of the given cipher.
+ New(key []byte) cipher.Block
+}
+
+// The following constants mirror the OpenPGP standard (RFC 4880).
+const (
+ TripleDES = CipherFunction(2)
+ CAST5 = CipherFunction(3)
+ AES128 = CipherFunction(7)
+ AES192 = CipherFunction(8)
+ AES256 = CipherFunction(9)
+)
+
+// CipherById represents the different block ciphers specified for OpenPGP. See
+// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13
+var CipherById = map[uint8]Cipher{
+ TripleDES.Id(): TripleDES,
+ CAST5.Id(): CAST5,
+ AES128.Id(): AES128,
+ AES192.Id(): AES192,
+ AES256.Id(): AES256,
+}
+
+type CipherFunction uint8
+
+// ID returns the algorithm Id, as a byte, of cipher.
+func (sk CipherFunction) Id() uint8 {
+ return uint8(sk)
+}
+
+// KeySize returns the key size, in bytes, of cipher.
+func (cipher CipherFunction) KeySize() int {
+ switch cipher {
+ case CAST5:
+ return cast5.KeySize
+ case AES128:
+ return 16
+ case AES192, TripleDES:
+ return 24
+ case AES256:
+ return 32
+ }
+ return 0
+}
+
+// BlockSize returns the block size, in bytes, of cipher.
+func (cipher CipherFunction) BlockSize() int {
+ switch cipher {
+ case TripleDES:
+ return des.BlockSize
+ case CAST5:
+ return 8
+ case AES128, AES192, AES256:
+ return 16
+ }
+ return 0
+}
+
+// New returns a fresh instance of the given cipher.
+func (cipher CipherFunction) New(key []byte) (block cipher.Block) {
+ var err error
+ switch cipher {
+ case TripleDES:
+ block, err = des.NewTripleDESCipher(key)
+ case CAST5:
+ block, err = cast5.NewCipher(key)
+ case AES128, AES192, AES256:
+ block, err = aes.NewCipher(key)
+ }
+ if err != nil {
+ panic(err.Error())
+ }
+ return
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/hash.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/hash.go
new file mode 100644
index 000000000..d1a00fc74
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/algorithm/hash.go
@@ -0,0 +1,143 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package algorithm
+
+import (
+ "crypto"
+ "fmt"
+ "hash"
+)
+
+// Hash is an official hash function algorithm. See RFC 4880, section 9.4.
+type Hash interface {
+ // Id returns the algorithm ID, as a byte, of Hash.
+ Id() uint8
+ // Available reports whether the given hash function is linked into the binary.
+ Available() bool
+ // HashFunc simply returns the value of h so that Hash implements SignerOpts.
+ HashFunc() crypto.Hash
+ // New returns a new hash.Hash calculating the given hash function. New
+ // panics if the hash function is not linked into the binary.
+ New() hash.Hash
+ // Size returns the length, in bytes, of a digest resulting from the given
+ // hash function. It doesn't require that the hash function in question be
+ // linked into the program.
+ Size() int
+ // String is the name of the hash function corresponding to the given
+ // OpenPGP hash id.
+ String() string
+}
+
+// The following vars mirror the crypto/Hash supported hash functions.
+var (
+ SHA1 Hash = cryptoHash{2, crypto.SHA1}
+ SHA256 Hash = cryptoHash{8, crypto.SHA256}
+ SHA384 Hash = cryptoHash{9, crypto.SHA384}
+ SHA512 Hash = cryptoHash{10, crypto.SHA512}
+ SHA224 Hash = cryptoHash{11, crypto.SHA224}
+ SHA3_256 Hash = cryptoHash{12, crypto.SHA3_256}
+ SHA3_512 Hash = cryptoHash{14, crypto.SHA3_512}
+)
+
+// HashById represents the different hash functions specified for OpenPGP. See
+// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-14
+var (
+ HashById = map[uint8]Hash{
+ SHA256.Id(): SHA256,
+ SHA384.Id(): SHA384,
+ SHA512.Id(): SHA512,
+ SHA224.Id(): SHA224,
+ SHA3_256.Id(): SHA3_256,
+ SHA3_512.Id(): SHA3_512,
+ }
+)
+
+// cryptoHash contains pairs relating OpenPGP's hash identifier with
+// Go's crypto.Hash type. See RFC 4880, section 9.4.
+type cryptoHash struct {
+ id uint8
+ crypto.Hash
+}
+
+// Id returns the algorithm ID, as a byte, of cryptoHash.
+func (h cryptoHash) Id() uint8 {
+ return h.id
+}
+
+var hashNames = map[uint8]string{
+ SHA256.Id(): "SHA256",
+ SHA384.Id(): "SHA384",
+ SHA512.Id(): "SHA512",
+ SHA224.Id(): "SHA224",
+ SHA3_256.Id(): "SHA3-256",
+ SHA3_512.Id(): "SHA3-512",
+}
+
+func (h cryptoHash) String() string {
+ s, ok := hashNames[h.id]
+ if !ok {
+ panic(fmt.Sprintf("Unsupported hash function %d", h.id))
+ }
+ return s
+}
+
+// HashIdToHash returns a crypto.Hash which corresponds to the given OpenPGP
+// hash id.
+func HashIdToHash(id byte) (h crypto.Hash, ok bool) {
+ if hash, ok := HashById[id]; ok {
+ return hash.HashFunc(), true
+ }
+ return 0, false
+}
+
+// HashIdToHashWithSha1 returns a crypto.Hash which corresponds to the given OpenPGP
+// hash id, allowing sha1.
+func HashIdToHashWithSha1(id byte) (h crypto.Hash, ok bool) {
+ if hash, ok := HashById[id]; ok {
+ return hash.HashFunc(), true
+ }
+
+ if id == SHA1.Id() {
+ return SHA1.HashFunc(), true
+ }
+
+ return 0, false
+}
+
+// HashIdToString returns the name of the hash function corresponding to the
+// given OpenPGP hash id.
+func HashIdToString(id byte) (name string, ok bool) {
+ if hash, ok := HashById[id]; ok {
+ return hash.String(), true
+ }
+ return "", false
+}
+
+// HashToHashId returns an OpenPGP hash id which corresponds the given Hash.
+func HashToHashId(h crypto.Hash) (id byte, ok bool) {
+ for id, hash := range HashById {
+ if hash.HashFunc() == h {
+ return id, true
+ }
+ }
+
+ return 0, false
+}
+
+// HashToHashIdWithSha1 returns an OpenPGP hash id which corresponds the given Hash,
+// allowing instances of SHA1
+func HashToHashIdWithSha1(h crypto.Hash) (id byte, ok bool) {
+ for id, hash := range HashById {
+ if hash.HashFunc() == h {
+ return id, true
+ }
+ }
+
+ if h == SHA1.HashFunc() {
+ return SHA1.Id(), true
+ }
+
+ return 0, false
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.go
new file mode 100644
index 000000000..888767c4e
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve25519.go
@@ -0,0 +1,171 @@
+// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
+package ecc
+
+import (
+ "crypto/subtle"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ x25519lib "github.com/cloudflare/circl/dh/x25519"
+)
+
+type curve25519 struct{}
+
+func NewCurve25519() *curve25519 {
+ return &curve25519{}
+}
+
+func (c *curve25519) GetCurveName() string {
+ return "curve25519"
+}
+
+// MarshalBytePoint encodes the public point from native format, adding the prefix.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6
+func (c *curve25519) MarshalBytePoint(point []byte) []byte {
+ return append([]byte{0x40}, point...)
+}
+
+// UnmarshalBytePoint decodes the public point to native format, removing the prefix.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6
+func (c *curve25519) UnmarshalBytePoint(point []byte) []byte {
+ if len(point) != x25519lib.Size+1 {
+ return nil
+ }
+
+ // Remove prefix
+ return point[1:]
+}
+
+// MarshalByteSecret encodes the secret scalar from native format.
+// Note that the EC secret scalar differs from the definition of public keys in
+// [Curve25519] in two ways: (1) the byte-ordering is big-endian, which is
+// more uniform with how big integers are represented in OpenPGP, and (2) the
+// leading zeros are truncated.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6.1.1
+// Note that leading zero bytes are stripped later when encoding as an MPI.
+func (c *curve25519) MarshalByteSecret(secret []byte) []byte {
+ d := make([]byte, x25519lib.Size)
+ copyReversed(d, secret)
+
+ // The following ensures that the private key is a number of the form
+ // 2^{254} + 8 * [0, 2^{251}), in order to avoid the small subgroup of
+ // the curve.
+ //
+ // This masking is done internally in the underlying lib and so is unnecessary
+ // for security, but OpenPGP implementations require that private keys be
+ // pre-masked.
+ d[0] &= 127
+ d[0] |= 64
+ d[31] &= 248
+
+ return d
+}
+
+// UnmarshalByteSecret decodes the secret scalar from native format.
+// Note that the EC secret scalar differs from the definition of public keys in
+// [Curve25519] in two ways: (1) the byte-ordering is big-endian, which is
+// more uniform with how big integers are represented in OpenPGP, and (2) the
+// leading zeros are truncated.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6.1.1
+func (c *curve25519) UnmarshalByteSecret(d []byte) []byte {
+ if len(d) > x25519lib.Size {
+ return nil
+ }
+
+ // Ensure truncated leading bytes are re-added
+ secret := make([]byte, x25519lib.Size)
+ copyReversed(secret, d)
+
+ return secret
+}
+
+// generateKeyPairBytes Generates a private-public key-pair.
+// 'priv' is a private key; a little-endian scalar belonging to the set
+// 2^{254} + 8 * [0, 2^{251}), in order to avoid the small subgroup of the
+// curve. 'pub' is simply 'priv' * G where G is the base point.
+// See https://cr.yp.to/ecdh.html and RFC7748, sec 5.
+func (c *curve25519) generateKeyPairBytes(rand io.Reader) (priv, pub x25519lib.Key, err error) {
+ _, err = io.ReadFull(rand, priv[:])
+ if err != nil {
+ return
+ }
+
+ x25519lib.KeyGen(&pub, &priv)
+ return
+}
+
+func (c *curve25519) GenerateECDH(rand io.Reader) (point []byte, secret []byte, err error) {
+ priv, pub, err := c.generateKeyPairBytes(rand)
+ if err != nil {
+ return
+ }
+
+ return pub[:], priv[:], nil
+}
+
+func (c *genericCurve) MaskSecret(secret []byte) []byte {
+ return secret
+}
+
+func (c *curve25519) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error) {
+ // RFC6637 §8: "Generate an ephemeral key pair {v, V=vG}"
+ // ephemeralPrivate corresponds to `v`.
+ // ephemeralPublic corresponds to `V`.
+ ephemeralPrivate, ephemeralPublic, err := c.generateKeyPairBytes(rand)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ // RFC6637 §8: "Obtain the authenticated recipient public key R"
+ // pubKey corresponds to `R`.
+ var pubKey x25519lib.Key
+ copy(pubKey[:], point)
+
+ // RFC6637 §8: "Compute the shared point S = vR"
+ // "VB = convert point V to the octet string"
+ // sharedPoint corresponds to `VB`.
+ var sharedPoint x25519lib.Key
+ x25519lib.Shared(&sharedPoint, &ephemeralPrivate, &pubKey)
+
+ return ephemeralPublic[:], sharedPoint[:], nil
+}
+
+func (c *curve25519) Decaps(vsG, secret []byte) (sharedSecret []byte, err error) {
+ var ephemeralPublic, decodedPrivate, sharedPoint x25519lib.Key
+ // RFC6637 §8: "The decryption is the inverse of the method given."
+ // All quoted descriptions in comments below describe encryption, and
+ // the reverse is performed.
+ // vsG corresponds to `VB` in RFC6637 §8 .
+
+ // RFC6637 §8: "VB = convert point V to the octet string"
+ copy(ephemeralPublic[:], vsG)
+
+ // decodedPrivate corresponds to `r` in RFC6637 §8 .
+ copy(decodedPrivate[:], secret)
+
+ // RFC6637 §8: "Note that the recipient obtains the shared secret by calculating
+ // S = rV = rvG, where (r,R) is the recipient's key pair."
+ // sharedPoint corresponds to `S`.
+ x25519lib.Shared(&sharedPoint, &decodedPrivate, &ephemeralPublic)
+
+ return sharedPoint[:], nil
+}
+
+func (c *curve25519) ValidateECDH(point []byte, secret []byte) (err error) {
+ var pk, sk x25519lib.Key
+ copy(sk[:], secret)
+ x25519lib.KeyGen(&pk, &sk)
+
+ if subtle.ConstantTimeCompare(point, pk[:]) == 0 {
+ return errors.KeyInvalidError("ecc: invalid curve25519 public point")
+ }
+
+ return nil
+}
+
+func copyReversed(out []byte, in []byte) {
+ l := len(in)
+ for i := 0; i < l; i++ {
+ out[i] = in[l-i-1]
+ }
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go
new file mode 100644
index 000000000..0da2d0d85
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curve_info.go
@@ -0,0 +1,143 @@
+// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
+package ecc
+
+import (
+ "bytes"
+ "crypto/elliptic"
+
+ "github.com/ProtonMail/go-crypto/bitcurves"
+ "github.com/ProtonMail/go-crypto/brainpool"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
+)
+
+const Curve25519GenName = "Curve25519"
+
+type CurveInfo struct {
+ GenName string
+ Oid *encoding.OID
+ Curve Curve
+}
+
+var Curves = []CurveInfo{
+ {
+ // NIST P-256
+ GenName: "P256",
+ Oid: encoding.NewOID([]byte{0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07}),
+ Curve: NewGenericCurve(elliptic.P256()),
+ },
+ {
+ // NIST P-384
+ GenName: "P384",
+ Oid: encoding.NewOID([]byte{0x2B, 0x81, 0x04, 0x00, 0x22}),
+ Curve: NewGenericCurve(elliptic.P384()),
+ },
+ {
+ // NIST P-521
+ GenName: "P521",
+ Oid: encoding.NewOID([]byte{0x2B, 0x81, 0x04, 0x00, 0x23}),
+ Curve: NewGenericCurve(elliptic.P521()),
+ },
+ {
+ // SecP256k1
+ GenName: "SecP256k1",
+ Oid: encoding.NewOID([]byte{0x2B, 0x81, 0x04, 0x00, 0x0A}),
+ Curve: NewGenericCurve(bitcurves.S256()),
+ },
+ {
+ // Curve25519
+ GenName: Curve25519GenName,
+ Oid: encoding.NewOID([]byte{0x2B, 0x06, 0x01, 0x04, 0x01, 0x97, 0x55, 0x01, 0x05, 0x01}),
+ Curve: NewCurve25519(),
+ },
+ {
+ // x448
+ GenName: "Curve448",
+ Oid: encoding.NewOID([]byte{0x2B, 0x65, 0x6F}),
+ Curve: NewX448(),
+ },
+ {
+ // Ed25519
+ GenName: Curve25519GenName,
+ Oid: encoding.NewOID([]byte{0x2B, 0x06, 0x01, 0x04, 0x01, 0xDA, 0x47, 0x0F, 0x01}),
+ Curve: NewEd25519(),
+ },
+ {
+ // Ed448
+ GenName: "Curve448",
+ Oid: encoding.NewOID([]byte{0x2B, 0x65, 0x71}),
+ Curve: NewEd448(),
+ },
+ {
+ // BrainpoolP256r1
+ GenName: "BrainpoolP256",
+ Oid: encoding.NewOID([]byte{0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x07}),
+ Curve: NewGenericCurve(brainpool.P256r1()),
+ },
+ {
+ // BrainpoolP384r1
+ GenName: "BrainpoolP384",
+ Oid: encoding.NewOID([]byte{0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x0B}),
+ Curve: NewGenericCurve(brainpool.P384r1()),
+ },
+ {
+ // BrainpoolP512r1
+ GenName: "BrainpoolP512",
+ Oid: encoding.NewOID([]byte{0x2B, 0x24, 0x03, 0x03, 0x02, 0x08, 0x01, 0x01, 0x0D}),
+ Curve: NewGenericCurve(brainpool.P512r1()),
+ },
+}
+
+func FindByCurve(curve Curve) *CurveInfo {
+ for _, curveInfo := range Curves {
+ if curveInfo.Curve.GetCurveName() == curve.GetCurveName() {
+ return &curveInfo
+ }
+ }
+ return nil
+}
+
+func FindByOid(oid encoding.Field) *CurveInfo {
+ var rawBytes = oid.Bytes()
+ for _, curveInfo := range Curves {
+ if bytes.Equal(curveInfo.Oid.Bytes(), rawBytes) {
+ return &curveInfo
+ }
+ }
+ return nil
+}
+
+func FindEdDSAByGenName(curveGenName string) EdDSACurve {
+ for _, curveInfo := range Curves {
+ if curveInfo.GenName == curveGenName {
+ curve, ok := curveInfo.Curve.(EdDSACurve)
+ if ok {
+ return curve
+ }
+ }
+ }
+ return nil
+}
+
+func FindECDSAByGenName(curveGenName string) ECDSACurve {
+ for _, curveInfo := range Curves {
+ if curveInfo.GenName == curveGenName {
+ curve, ok := curveInfo.Curve.(ECDSACurve)
+ if ok {
+ return curve
+ }
+ }
+ }
+ return nil
+}
+
+func FindECDHByGenName(curveGenName string) ECDHCurve {
+ for _, curveInfo := range Curves {
+ if curveInfo.GenName == curveGenName {
+ curve, ok := curveInfo.Curve.(ECDHCurve)
+ if ok {
+ return curve
+ }
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curves.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curves.go
new file mode 100644
index 000000000..5ed9c93b3
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/curves.go
@@ -0,0 +1,48 @@
+// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
+package ecc
+
+import (
+ "io"
+ "math/big"
+)
+
+type Curve interface {
+ GetCurveName() string
+}
+
+type ECDSACurve interface {
+ Curve
+ MarshalIntegerPoint(x, y *big.Int) []byte
+ UnmarshalIntegerPoint([]byte) (x, y *big.Int)
+ MarshalIntegerSecret(d *big.Int) []byte
+ UnmarshalIntegerSecret(d []byte) *big.Int
+ GenerateECDSA(rand io.Reader) (x, y, secret *big.Int, err error)
+ Sign(rand io.Reader, x, y, d *big.Int, hash []byte) (r, s *big.Int, err error)
+ Verify(x, y *big.Int, hash []byte, r, s *big.Int) bool
+ ValidateECDSA(x, y *big.Int, secret []byte) error
+}
+
+type EdDSACurve interface {
+ Curve
+ MarshalBytePoint(x []byte) []byte
+ UnmarshalBytePoint([]byte) (x []byte)
+ MarshalByteSecret(d []byte) []byte
+ UnmarshalByteSecret(d []byte) []byte
+ MarshalSignature(sig []byte) (r, s []byte)
+ UnmarshalSignature(r, s []byte) (sig []byte)
+ GenerateEdDSA(rand io.Reader) (pub, priv []byte, err error)
+ Sign(publicKey, privateKey, message []byte) (sig []byte, err error)
+ Verify(publicKey, message, sig []byte) bool
+ ValidateEdDSA(publicKey, privateKey []byte) (err error)
+}
+type ECDHCurve interface {
+ Curve
+ MarshalBytePoint([]byte) (encoded []byte)
+ UnmarshalBytePoint(encoded []byte) []byte
+ MarshalByteSecret(d []byte) []byte
+ UnmarshalByteSecret(d []byte) []byte
+ GenerateECDH(rand io.Reader) (point []byte, secret []byte, err error)
+ Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error)
+ Decaps(ephemeral, secret []byte) (sharedSecret []byte, err error)
+ ValidateECDH(public []byte, secret []byte) error
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go
new file mode 100644
index 000000000..5a4c3a859
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed25519.go
@@ -0,0 +1,120 @@
+// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
+package ecc
+
+import (
+ "bytes"
+ "crypto/subtle"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ ed25519lib "github.com/cloudflare/circl/sign/ed25519"
+)
+
+const ed25519Size = 32
+
+type ed25519 struct{}
+
+func NewEd25519() *ed25519 {
+ return &ed25519{}
+}
+
+func (c *ed25519) GetCurveName() string {
+ return "ed25519"
+}
+
+// MarshalBytePoint encodes the public point from native format, adding the prefix.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
+func (c *ed25519) MarshalBytePoint(x []byte) []byte {
+ return append([]byte{0x40}, x...)
+}
+
+// UnmarshalBytePoint decodes a point from prefixed format to native.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
+func (c *ed25519) UnmarshalBytePoint(point []byte) (x []byte) {
+ if len(point) != ed25519lib.PublicKeySize+1 {
+ return nil
+ }
+
+ // Return unprefixed
+ return point[1:]
+}
+
+// MarshalByteSecret encodes a scalar in native format.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
+func (c *ed25519) MarshalByteSecret(d []byte) []byte {
+ return d
+}
+
+// UnmarshalByteSecret decodes a scalar in native format and re-adds the stripped leading zeroes
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
+func (c *ed25519) UnmarshalByteSecret(s []byte) (d []byte) {
+ if len(s) > ed25519lib.SeedSize {
+ return nil
+ }
+
+ // Handle stripped leading zeroes
+ d = make([]byte, ed25519lib.SeedSize)
+ copy(d[ed25519lib.SeedSize-len(s):], s)
+ return
+}
+
+// MarshalSignature splits a signature in R and S.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.2.3.3.1
+func (c *ed25519) MarshalSignature(sig []byte) (r, s []byte) {
+ return sig[:ed25519Size], sig[ed25519Size:]
+}
+
+// UnmarshalSignature decodes R and S in the native format, re-adding the stripped leading zeroes
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.2.3.3.1
+func (c *ed25519) UnmarshalSignature(r, s []byte) (sig []byte) {
+ // Check size
+ if len(r) > 32 || len(s) > 32 {
+ return nil
+ }
+
+ sig = make([]byte, ed25519lib.SignatureSize)
+
+ // Handle stripped leading zeroes
+ copy(sig[ed25519Size-len(r):ed25519Size], r)
+ copy(sig[ed25519lib.SignatureSize-len(s):], s)
+ return sig
+}
+
+func (c *ed25519) GenerateEdDSA(rand io.Reader) (pub, priv []byte, err error) {
+ pk, sk, err := ed25519lib.GenerateKey(rand)
+
+ if err != nil {
+ return nil, nil, err
+ }
+
+ return pk, sk[:ed25519lib.SeedSize], nil
+}
+
+func getEd25519Sk(publicKey, privateKey []byte) ed25519lib.PrivateKey {
+ privateKeyCap, privateKeyLen, publicKeyLen := cap(privateKey), len(privateKey), len(publicKey)
+
+ if privateKeyCap >= privateKeyLen+publicKeyLen &&
+ bytes.Equal(privateKey[privateKeyLen:privateKeyLen+publicKeyLen], publicKey) {
+ return privateKey[:privateKeyLen+publicKeyLen]
+ }
+
+ return append(privateKey[:privateKeyLen:privateKeyLen], publicKey...)
+}
+
+func (c *ed25519) Sign(publicKey, privateKey, message []byte) (sig []byte, err error) {
+ sig = ed25519lib.Sign(getEd25519Sk(publicKey, privateKey), message)
+ return sig, nil
+}
+
+func (c *ed25519) Verify(publicKey, message, sig []byte) bool {
+ return ed25519lib.Verify(publicKey, message, sig)
+}
+
+func (c *ed25519) ValidateEdDSA(publicKey, privateKey []byte) (err error) {
+ priv := getEd25519Sk(publicKey, privateKey)
+ expectedPriv := ed25519lib.NewKeyFromSeed(priv.Seed())
+ if subtle.ConstantTimeCompare(priv, expectedPriv) == 0 {
+ return errors.KeyInvalidError("ecc: invalid ed25519 secret")
+ }
+ return nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go
new file mode 100644
index 000000000..b6edda748
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/ed448.go
@@ -0,0 +1,119 @@
+// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
+package ecc
+
+import (
+ "bytes"
+ "crypto/subtle"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ ed448lib "github.com/cloudflare/circl/sign/ed448"
+)
+
+type ed448 struct{}
+
+func NewEd448() *ed448 {
+ return &ed448{}
+}
+
+func (c *ed448) GetCurveName() string {
+ return "ed448"
+}
+
+// MarshalBytePoint encodes the public point from native format, adding the prefix.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
+func (c *ed448) MarshalBytePoint(x []byte) []byte {
+ // Return prefixed
+ return append([]byte{0x40}, x...)
+}
+
+// UnmarshalBytePoint decodes a point from prefixed format to native.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
+func (c *ed448) UnmarshalBytePoint(point []byte) (x []byte) {
+ if len(point) != ed448lib.PublicKeySize+1 {
+ return nil
+ }
+
+ // Strip prefix
+ return point[1:]
+}
+
+// MarshalByteSecret encoded a scalar from native format to prefixed.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
+func (c *ed448) MarshalByteSecret(d []byte) []byte {
+ // Return prefixed
+ return append([]byte{0x40}, d...)
+}
+
+// UnmarshalByteSecret decodes a scalar from prefixed format to native.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.5
+func (c *ed448) UnmarshalByteSecret(s []byte) (d []byte) {
+ // Check prefixed size
+ if len(s) != ed448lib.SeedSize+1 {
+ return nil
+ }
+
+ // Strip prefix
+ return s[1:]
+}
+
+// MarshalSignature splits a signature in R and S, where R is in prefixed native format and
+// S is an MPI with value zero.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.2.3.3.2
+func (c *ed448) MarshalSignature(sig []byte) (r, s []byte) {
+ return append([]byte{0x40}, sig...), []byte{}
+}
+
+// UnmarshalSignature decodes R and S in the native format. Only R is used, in prefixed native format.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.2.3.3.2
+func (c *ed448) UnmarshalSignature(r, s []byte) (sig []byte) {
+ if len(r) != ed448lib.SignatureSize+1 {
+ return nil
+ }
+
+ return r[1:]
+}
+
+func (c *ed448) GenerateEdDSA(rand io.Reader) (pub, priv []byte, err error) {
+ pk, sk, err := ed448lib.GenerateKey(rand)
+
+ if err != nil {
+ return nil, nil, err
+ }
+
+ return pk, sk[:ed448lib.SeedSize], nil
+}
+
+func getEd448Sk(publicKey, privateKey []byte) ed448lib.PrivateKey {
+ privateKeyCap, privateKeyLen, publicKeyLen := cap(privateKey), len(privateKey), len(publicKey)
+
+ if privateKeyCap >= privateKeyLen+publicKeyLen &&
+ bytes.Equal(privateKey[privateKeyLen:privateKeyLen+publicKeyLen], publicKey) {
+ return privateKey[:privateKeyLen+publicKeyLen]
+ }
+
+ return append(privateKey[:privateKeyLen:privateKeyLen], publicKey...)
+}
+
+func (c *ed448) Sign(publicKey, privateKey, message []byte) (sig []byte, err error) {
+ // Ed448 is used with the empty string as a context string.
+ // See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-13.7
+ sig = ed448lib.Sign(getEd448Sk(publicKey, privateKey), message, "")
+
+ return sig, nil
+}
+
+func (c *ed448) Verify(publicKey, message, sig []byte) bool {
+ // Ed448 is used with the empty string as a context string.
+ // See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-13.7
+ return ed448lib.Verify(publicKey, message, sig, "")
+}
+
+func (c *ed448) ValidateEdDSA(publicKey, privateKey []byte) (err error) {
+ priv := getEd448Sk(publicKey, privateKey)
+ expectedPriv := ed448lib.NewKeyFromSeed(priv.Seed())
+ if subtle.ConstantTimeCompare(priv, expectedPriv) == 0 {
+ return errors.KeyInvalidError("ecc: invalid ed448 secret")
+ }
+ return nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/generic.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/generic.go
new file mode 100644
index 000000000..e28d7c710
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/generic.go
@@ -0,0 +1,149 @@
+// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
+package ecc
+
+import (
+ "crypto/ecdsa"
+ "crypto/elliptic"
+ "fmt"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "io"
+ "math/big"
+)
+
+type genericCurve struct {
+ Curve elliptic.Curve
+}
+
+func NewGenericCurve(c elliptic.Curve) *genericCurve {
+ return &genericCurve{
+ Curve: c,
+ }
+}
+
+func (c *genericCurve) GetCurveName() string {
+ return c.Curve.Params().Name
+}
+
+func (c *genericCurve) MarshalBytePoint(point []byte) []byte {
+ return point
+}
+
+func (c *genericCurve) UnmarshalBytePoint(point []byte) []byte {
+ return point
+}
+
+func (c *genericCurve) MarshalIntegerPoint(x, y *big.Int) []byte {
+ return elliptic.Marshal(c.Curve, x, y)
+}
+
+func (c *genericCurve) UnmarshalIntegerPoint(point []byte) (x, y *big.Int) {
+ return elliptic.Unmarshal(c.Curve, point)
+}
+
+func (c *genericCurve) MarshalByteSecret(d []byte) []byte {
+ return d
+}
+
+func (c *genericCurve) UnmarshalByteSecret(d []byte) []byte {
+ return d
+}
+
+func (c *genericCurve) MarshalIntegerSecret(d *big.Int) []byte {
+ return d.Bytes()
+}
+
+func (c *genericCurve) UnmarshalIntegerSecret(d []byte) *big.Int {
+ return new(big.Int).SetBytes(d)
+}
+
+func (c *genericCurve) GenerateECDH(rand io.Reader) (point, secret []byte, err error) {
+ secret, x, y, err := elliptic.GenerateKey(c.Curve, rand)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ point = elliptic.Marshal(c.Curve, x, y)
+ return point, secret, nil
+}
+
+func (c *genericCurve) GenerateECDSA(rand io.Reader) (x, y, secret *big.Int, err error) {
+ priv, err := ecdsa.GenerateKey(c.Curve, rand)
+ if err != nil {
+ return
+ }
+
+ return priv.X, priv.Y, priv.D, nil
+}
+
+func (c *genericCurve) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error) {
+ xP, yP := elliptic.Unmarshal(c.Curve, point)
+ if xP == nil {
+ panic("invalid point")
+ }
+
+ d, x, y, err := elliptic.GenerateKey(c.Curve, rand)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ vsG := elliptic.Marshal(c.Curve, x, y)
+ zbBig, _ := c.Curve.ScalarMult(xP, yP, d)
+
+ byteLen := (c.Curve.Params().BitSize + 7) >> 3
+ zb := make([]byte, byteLen)
+ zbBytes := zbBig.Bytes()
+ copy(zb[byteLen-len(zbBytes):], zbBytes)
+
+ return vsG, zb, nil
+}
+
+func (c *genericCurve) Decaps(ephemeral, secret []byte) (sharedSecret []byte, err error) {
+ x, y := elliptic.Unmarshal(c.Curve, ephemeral)
+ zbBig, _ := c.Curve.ScalarMult(x, y, secret)
+ byteLen := (c.Curve.Params().BitSize + 7) >> 3
+ zb := make([]byte, byteLen)
+ zbBytes := zbBig.Bytes()
+ copy(zb[byteLen-len(zbBytes):], zbBytes)
+
+ return zb, nil
+}
+
+func (c *genericCurve) Sign(rand io.Reader, x, y, d *big.Int, hash []byte) (r, s *big.Int, err error) {
+ priv := &ecdsa.PrivateKey{D: d, PublicKey: ecdsa.PublicKey{X: x, Y: y, Curve: c.Curve}}
+ return ecdsa.Sign(rand, priv, hash)
+}
+
+func (c *genericCurve) Verify(x, y *big.Int, hash []byte, r, s *big.Int) bool {
+ pub := &ecdsa.PublicKey{X: x, Y: y, Curve: c.Curve}
+ return ecdsa.Verify(pub, hash, r, s)
+}
+
+func (c *genericCurve) validate(xP, yP *big.Int, secret []byte) error {
+ // the public point should not be at infinity (0,0)
+ zero := new(big.Int)
+ if xP.Cmp(zero) == 0 && yP.Cmp(zero) == 0 {
+ return errors.KeyInvalidError(fmt.Sprintf("ecc (%s): infinity point", c.Curve.Params().Name))
+ }
+
+ // re-derive the public point Q' = (X,Y) = dG
+ // to compare to declared Q in public key
+ expectedX, expectedY := c.Curve.ScalarBaseMult(secret)
+ if xP.Cmp(expectedX) != 0 || yP.Cmp(expectedY) != 0 {
+ return errors.KeyInvalidError(fmt.Sprintf("ecc (%s): invalid point", c.Curve.Params().Name))
+ }
+
+ return nil
+}
+
+func (c *genericCurve) ValidateECDSA(xP, yP *big.Int, secret []byte) error {
+ return c.validate(xP, yP, secret)
+}
+
+func (c *genericCurve) ValidateECDH(point []byte, secret []byte) error {
+ xP, yP := elliptic.Unmarshal(c.Curve, point)
+ if xP == nil {
+ return errors.KeyInvalidError(fmt.Sprintf("ecc (%s): invalid point", c.Curve.Params().Name))
+ }
+
+ return c.validate(xP, yP, secret)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/x448.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/x448.go
new file mode 100644
index 000000000..df04262e9
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/ecc/x448.go
@@ -0,0 +1,107 @@
+// Package ecc implements a generic interface for ECDH, ECDSA, and EdDSA.
+package ecc
+
+import (
+ "crypto/subtle"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ x448lib "github.com/cloudflare/circl/dh/x448"
+)
+
+type x448 struct{}
+
+func NewX448() *x448 {
+ return &x448{}
+}
+
+func (c *x448) GetCurveName() string {
+ return "x448"
+}
+
+// MarshalBytePoint encodes the public point from native format, adding the prefix.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6
+func (c *x448) MarshalBytePoint(point []byte) []byte {
+ return append([]byte{0x40}, point...)
+}
+
+// UnmarshalBytePoint decodes a point from prefixed format to native.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6
+func (c *x448) UnmarshalBytePoint(point []byte) []byte {
+ if len(point) != x448lib.Size+1 {
+ return nil
+ }
+
+ return point[1:]
+}
+
+// MarshalByteSecret encoded a scalar from native format to prefixed.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6.1.2
+func (c *x448) MarshalByteSecret(d []byte) []byte {
+ return append([]byte{0x40}, d...)
+}
+
+// UnmarshalByteSecret decodes a scalar from prefixed format to native.
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh-06#section-5.5.5.6.1.2
+func (c *x448) UnmarshalByteSecret(d []byte) []byte {
+ if len(d) != x448lib.Size+1 {
+ return nil
+ }
+
+ // Store without prefix
+ return d[1:]
+}
+
+func (c *x448) generateKeyPairBytes(rand io.Reader) (sk, pk x448lib.Key, err error) {
+ if _, err = rand.Read(sk[:]); err != nil {
+ return
+ }
+
+ x448lib.KeyGen(&pk, &sk)
+ return
+}
+
+func (c *x448) GenerateECDH(rand io.Reader) (point []byte, secret []byte, err error) {
+ priv, pub, err := c.generateKeyPairBytes(rand)
+ if err != nil {
+ return
+ }
+
+ return pub[:], priv[:], nil
+}
+
+func (c *x448) Encaps(rand io.Reader, point []byte) (ephemeral, sharedSecret []byte, err error) {
+ var pk, ss x448lib.Key
+ seed, e, err := c.generateKeyPairBytes(rand)
+ if err != nil {
+ return nil, nil, err
+ }
+ copy(pk[:], point)
+ x448lib.Shared(&ss, &seed, &pk)
+
+ return e[:], ss[:], nil
+}
+
+func (c *x448) Decaps(ephemeral, secret []byte) (sharedSecret []byte, err error) {
+ var ss, sk, e x448lib.Key
+
+ copy(sk[:], secret)
+ copy(e[:], ephemeral)
+ x448lib.Shared(&ss, &sk, &e)
+
+ return ss[:], nil
+}
+
+func (c *x448) ValidateECDH(point []byte, secret []byte) error {
+ var sk, pk, expectedPk x448lib.Key
+
+ copy(pk[:], point)
+ copy(sk[:], secret)
+ x448lib.KeyGen(&expectedPk, &sk)
+
+ if subtle.ConstantTimeCompare(expectedPk[:], pk[:]) == 0 {
+ return errors.KeyInvalidError("ecc: invalid curve25519 public point")
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/encoding.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/encoding.go
new file mode 100644
index 000000000..6c921481b
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/encoding.go
@@ -0,0 +1,27 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package encoding implements openpgp packet field encodings as specified in
+// RFC 4880 and 6637.
+package encoding
+
+import "io"
+
+// Field is an encoded field of an openpgp packet.
+type Field interface {
+ // Bytes returns the decoded data.
+ Bytes() []byte
+
+ // BitLength is the size in bits of the decoded data.
+ BitLength() uint16
+
+ // EncodedBytes returns the encoded data.
+ EncodedBytes() []byte
+
+ // EncodedLength is the size in bytes of the encoded data.
+ EncodedLength() uint16
+
+ // ReadFrom reads the next Field from r.
+ ReadFrom(r io.Reader) (int64, error)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/mpi.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/mpi.go
new file mode 100644
index 000000000..02e5e695c
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/mpi.go
@@ -0,0 +1,91 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package encoding
+
+import (
+ "io"
+ "math/big"
+ "math/bits"
+)
+
+// An MPI is used to store the contents of a big integer, along with the bit
+// length that was specified in the original input. This allows the MPI to be
+// reserialized exactly.
+type MPI struct {
+ bytes []byte
+ bitLength uint16
+}
+
+// NewMPI returns a MPI initialized with bytes.
+func NewMPI(bytes []byte) *MPI {
+ for len(bytes) != 0 && bytes[0] == 0 {
+ bytes = bytes[1:]
+ }
+ if len(bytes) == 0 {
+ bitLength := uint16(0)
+ return &MPI{bytes, bitLength}
+ }
+ bitLength := 8*uint16(len(bytes)-1) + uint16(bits.Len8(bytes[0]))
+ return &MPI{bytes, bitLength}
+}
+
+// Bytes returns the decoded data.
+func (m *MPI) Bytes() []byte {
+ return m.bytes
+}
+
+// BitLength is the size in bits of the decoded data.
+func (m *MPI) BitLength() uint16 {
+ return m.bitLength
+}
+
+// EncodedBytes returns the encoded data.
+func (m *MPI) EncodedBytes() []byte {
+ return append([]byte{byte(m.bitLength >> 8), byte(m.bitLength)}, m.bytes...)
+}
+
+// EncodedLength is the size in bytes of the encoded data.
+func (m *MPI) EncodedLength() uint16 {
+ return uint16(2 + len(m.bytes))
+}
+
+// ReadFrom reads into m the next MPI from r.
+func (m *MPI) ReadFrom(r io.Reader) (int64, error) {
+ var buf [2]byte
+ n, err := io.ReadFull(r, buf[0:])
+ if err != nil {
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ return int64(n), err
+ }
+
+ m.bitLength = uint16(buf[0])<<8 | uint16(buf[1])
+ m.bytes = make([]byte, (int(m.bitLength)+7)/8)
+
+ nn, err := io.ReadFull(r, m.bytes)
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+
+ // remove leading zero bytes from malformed GnuPG encoded MPIs:
+ // https://bugs.gnupg.org/gnupg/issue1853
+ // for _, b := range m.bytes {
+ // if b != 0 {
+ // break
+ // }
+ // m.bytes = m.bytes[1:]
+ // m.bitLength -= 8
+ // }
+
+ return int64(n) + int64(nn), err
+}
+
+// SetBig initializes m with the bits from n.
+func (m *MPI) SetBig(n *big.Int) *MPI {
+ m.bytes = n.Bytes()
+ m.bitLength = uint16(n.BitLen())
+ return m
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/oid.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/oid.go
new file mode 100644
index 000000000..c9df9fe23
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/internal/encoding/oid.go
@@ -0,0 +1,88 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package encoding
+
+import (
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+// OID is used to store a variable-length field with a one-octet size
+// prefix. See https://tools.ietf.org/html/rfc6637#section-9.
+type OID struct {
+ bytes []byte
+}
+
+const (
+ // maxOID is the maximum number of bytes in a OID.
+ maxOID = 254
+ // reservedOIDLength1 and reservedOIDLength2 are OID lengths that the RFC
+ // specifies are reserved.
+ reservedOIDLength1 = 0
+ reservedOIDLength2 = 0xff
+)
+
+// NewOID returns a OID initialized with bytes.
+func NewOID(bytes []byte) *OID {
+ switch len(bytes) {
+ case reservedOIDLength1, reservedOIDLength2:
+ panic("encoding: NewOID argument length is reserved")
+ default:
+ if len(bytes) > maxOID {
+ panic("encoding: NewOID argument too large")
+ }
+ }
+
+ return &OID{
+ bytes: bytes,
+ }
+}
+
+// Bytes returns the decoded data.
+func (o *OID) Bytes() []byte {
+ return o.bytes
+}
+
+// BitLength is the size in bits of the decoded data.
+func (o *OID) BitLength() uint16 {
+ return uint16(len(o.bytes) * 8)
+}
+
+// EncodedBytes returns the encoded data.
+func (o *OID) EncodedBytes() []byte {
+ return append([]byte{byte(len(o.bytes))}, o.bytes...)
+}
+
+// EncodedLength is the size in bytes of the encoded data.
+func (o *OID) EncodedLength() uint16 {
+ return uint16(1 + len(o.bytes))
+}
+
+// ReadFrom reads into b the next OID from r.
+func (o *OID) ReadFrom(r io.Reader) (int64, error) {
+ var buf [1]byte
+ n, err := io.ReadFull(r, buf[:])
+ if err != nil {
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ return int64(n), err
+ }
+
+ switch buf[0] {
+ case reservedOIDLength1, reservedOIDLength2:
+ return int64(n), errors.UnsupportedError("reserved for future extensions")
+ }
+
+ o.bytes = make([]byte, buf[0])
+
+ nn, err := io.ReadFull(r, o.bytes)
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+
+ return int64(n) + int64(nn), err
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go
new file mode 100644
index 000000000..77213f66b
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/key_generation.go
@@ -0,0 +1,456 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package openpgp
+
+import (
+ "crypto"
+ "crypto/rand"
+ "crypto/rsa"
+ goerrors "errors"
+ "io"
+ "math/big"
+ "time"
+
+ "github.com/ProtonMail/go-crypto/openpgp/ecdh"
+ "github.com/ProtonMail/go-crypto/openpgp/ecdsa"
+ "github.com/ProtonMail/go-crypto/openpgp/ed25519"
+ "github.com/ProtonMail/go-crypto/openpgp/ed448"
+ "github.com/ProtonMail/go-crypto/openpgp/eddsa"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
+ "github.com/ProtonMail/go-crypto/openpgp/packet"
+ "github.com/ProtonMail/go-crypto/openpgp/x25519"
+ "github.com/ProtonMail/go-crypto/openpgp/x448"
+)
+
+// NewEntity returns an Entity that contains a fresh RSA/RSA keypair with a
+// single identity composed of the given full name, comment and email, any of
+// which may be empty but must not contain any of "()<>\x00".
+// If config is nil, sensible defaults will be used.
+func NewEntity(name, comment, email string, config *packet.Config) (*Entity, error) {
+ creationTime := config.Now()
+ keyLifetimeSecs := config.KeyLifetime()
+
+ // Generate a primary signing key
+ primaryPrivRaw, err := newSigner(config)
+ if err != nil {
+ return nil, err
+ }
+ primary := packet.NewSignerPrivateKey(creationTime, primaryPrivRaw)
+ if config.V6() {
+ if err := primary.UpgradeToV6(); err != nil {
+ return nil, err
+ }
+ }
+
+ e := &Entity{
+ PrimaryKey: &primary.PublicKey,
+ PrivateKey: primary,
+ Identities: make(map[string]*Identity),
+ Subkeys: []Subkey{},
+ Signatures: []*packet.Signature{},
+ }
+
+ if config.V6() {
+ // In v6 keys algorithm preferences should be stored in direct key signatures
+ selfSignature := createSignaturePacket(&primary.PublicKey, packet.SigTypeDirectSignature, config)
+ err = writeKeyProperties(selfSignature, creationTime, keyLifetimeSecs, config)
+ if err != nil {
+ return nil, err
+ }
+ err = selfSignature.SignDirectKeyBinding(&primary.PublicKey, primary, config)
+ if err != nil {
+ return nil, err
+ }
+ e.Signatures = append(e.Signatures, selfSignature)
+ e.SelfSignature = selfSignature
+ }
+
+ err = e.addUserId(name, comment, email, config, creationTime, keyLifetimeSecs, !config.V6())
+ if err != nil {
+ return nil, err
+ }
+
+ // NOTE: No key expiry here, but we will not return this subkey in EncryptionKey()
+ // if the primary/master key has expired.
+ err = e.addEncryptionSubkey(config, creationTime, 0)
+ if err != nil {
+ return nil, err
+ }
+
+ return e, nil
+}
+
+func (t *Entity) AddUserId(name, comment, email string, config *packet.Config) error {
+ creationTime := config.Now()
+ keyLifetimeSecs := config.KeyLifetime()
+ return t.addUserId(name, comment, email, config, creationTime, keyLifetimeSecs, !config.V6())
+}
+
+func writeKeyProperties(selfSignature *packet.Signature, creationTime time.Time, keyLifetimeSecs uint32, config *packet.Config) error {
+ advertiseAead := config.AEAD() != nil
+
+ selfSignature.CreationTime = creationTime
+ selfSignature.KeyLifetimeSecs = &keyLifetimeSecs
+ selfSignature.FlagsValid = true
+ selfSignature.FlagSign = true
+ selfSignature.FlagCertify = true
+ selfSignature.SEIPDv1 = true // true by default, see 5.8 vs. 5.14
+ selfSignature.SEIPDv2 = advertiseAead
+
+ // Set the PreferredHash for the SelfSignature from the packet.Config.
+ // If it is not the must-implement algorithm from rfc4880bis, append that.
+ hash, ok := algorithm.HashToHashId(config.Hash())
+ if !ok {
+ return errors.UnsupportedError("unsupported preferred hash function")
+ }
+
+ selfSignature.PreferredHash = []uint8{hash}
+ if config.Hash() != crypto.SHA256 {
+ selfSignature.PreferredHash = append(selfSignature.PreferredHash, hashToHashId(crypto.SHA256))
+ }
+
+ // Likewise for DefaultCipher.
+ selfSignature.PreferredSymmetric = []uint8{uint8(config.Cipher())}
+ if config.Cipher() != packet.CipherAES128 {
+ selfSignature.PreferredSymmetric = append(selfSignature.PreferredSymmetric, uint8(packet.CipherAES128))
+ }
+
+ // We set CompressionNone as the preferred compression algorithm because
+ // of compression side channel attacks, then append the configured
+ // DefaultCompressionAlgo if any is set (to signal support for cases
+ // where the application knows that using compression is safe).
+ selfSignature.PreferredCompression = []uint8{uint8(packet.CompressionNone)}
+ if config.Compression() != packet.CompressionNone {
+ selfSignature.PreferredCompression = append(selfSignature.PreferredCompression, uint8(config.Compression()))
+ }
+
+ if advertiseAead {
+ // Get the preferred AEAD mode from the packet.Config.
+ // If it is not the must-implement algorithm from rfc9580, append that.
+ modes := []uint8{uint8(config.AEAD().Mode())}
+ if config.AEAD().Mode() != packet.AEADModeOCB {
+ modes = append(modes, uint8(packet.AEADModeOCB))
+ }
+
+ // For preferred (AES256, GCM), we'll generate (AES256, GCM), (AES256, OCB), (AES128, GCM), (AES128, OCB)
+ for _, cipher := range selfSignature.PreferredSymmetric {
+ for _, mode := range modes {
+ selfSignature.PreferredCipherSuites = append(selfSignature.PreferredCipherSuites, [2]uint8{cipher, mode})
+ }
+ }
+ }
+ return nil
+}
+
+func (t *Entity) addUserId(name, comment, email string, config *packet.Config, creationTime time.Time, keyLifetimeSecs uint32, writeProperties bool) error {
+ uid := packet.NewUserId(name, comment, email)
+ if uid == nil {
+ return errors.InvalidArgumentError("user id field contained invalid characters")
+ }
+
+ if _, ok := t.Identities[uid.Id]; ok {
+ return errors.InvalidArgumentError("user id exist")
+ }
+
+ primary := t.PrivateKey
+ isPrimaryId := len(t.Identities) == 0
+ selfSignature := createSignaturePacket(&primary.PublicKey, packet.SigTypePositiveCert, config)
+ if writeProperties {
+ err := writeKeyProperties(selfSignature, creationTime, keyLifetimeSecs, config)
+ if err != nil {
+ return err
+ }
+ }
+ selfSignature.IsPrimaryId = &isPrimaryId
+
+ // User ID binding signature
+ err := selfSignature.SignUserId(uid.Id, &primary.PublicKey, primary, config)
+ if err != nil {
+ return err
+ }
+ t.Identities[uid.Id] = &Identity{
+ Name: uid.Id,
+ UserId: uid,
+ SelfSignature: selfSignature,
+ Signatures: []*packet.Signature{selfSignature},
+ }
+ return nil
+}
+
+// AddSigningSubkey adds a signing keypair as a subkey to the Entity.
+// If config is nil, sensible defaults will be used.
+func (e *Entity) AddSigningSubkey(config *packet.Config) error {
+ creationTime := config.Now()
+ keyLifetimeSecs := config.KeyLifetime()
+
+ subPrivRaw, err := newSigner(config)
+ if err != nil {
+ return err
+ }
+ sub := packet.NewSignerPrivateKey(creationTime, subPrivRaw)
+ sub.IsSubkey = true
+ if config.V6() {
+ if err := sub.UpgradeToV6(); err != nil {
+ return err
+ }
+ }
+
+ subkey := Subkey{
+ PublicKey: &sub.PublicKey,
+ PrivateKey: sub,
+ }
+ subkey.Sig = createSignaturePacket(e.PrimaryKey, packet.SigTypeSubkeyBinding, config)
+ subkey.Sig.CreationTime = creationTime
+ subkey.Sig.KeyLifetimeSecs = &keyLifetimeSecs
+ subkey.Sig.FlagsValid = true
+ subkey.Sig.FlagSign = true
+ subkey.Sig.EmbeddedSignature = createSignaturePacket(subkey.PublicKey, packet.SigTypePrimaryKeyBinding, config)
+ subkey.Sig.EmbeddedSignature.CreationTime = creationTime
+
+ err = subkey.Sig.EmbeddedSignature.CrossSignKey(subkey.PublicKey, e.PrimaryKey, subkey.PrivateKey, config)
+ if err != nil {
+ return err
+ }
+
+ err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config)
+ if err != nil {
+ return err
+ }
+
+ e.Subkeys = append(e.Subkeys, subkey)
+ return nil
+}
+
+// AddEncryptionSubkey adds an encryption keypair as a subkey to the Entity.
+// If config is nil, sensible defaults will be used.
+func (e *Entity) AddEncryptionSubkey(config *packet.Config) error {
+ creationTime := config.Now()
+ keyLifetimeSecs := config.KeyLifetime()
+ return e.addEncryptionSubkey(config, creationTime, keyLifetimeSecs)
+}
+
+func (e *Entity) addEncryptionSubkey(config *packet.Config, creationTime time.Time, keyLifetimeSecs uint32) error {
+ subPrivRaw, err := newDecrypter(config)
+ if err != nil {
+ return err
+ }
+ sub := packet.NewDecrypterPrivateKey(creationTime, subPrivRaw)
+ sub.IsSubkey = true
+ if config.V6() {
+ if err := sub.UpgradeToV6(); err != nil {
+ return err
+ }
+ }
+
+ subkey := Subkey{
+ PublicKey: &sub.PublicKey,
+ PrivateKey: sub,
+ }
+ subkey.Sig = createSignaturePacket(e.PrimaryKey, packet.SigTypeSubkeyBinding, config)
+ subkey.Sig.CreationTime = creationTime
+ subkey.Sig.KeyLifetimeSecs = &keyLifetimeSecs
+ subkey.Sig.FlagsValid = true
+ subkey.Sig.FlagEncryptStorage = true
+ subkey.Sig.FlagEncryptCommunications = true
+
+ err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config)
+ if err != nil {
+ return err
+ }
+
+ e.Subkeys = append(e.Subkeys, subkey)
+ return nil
+}
+
+// Generates a signing key
+func newSigner(config *packet.Config) (signer interface{}, err error) {
+ switch config.PublicKeyAlgorithm() {
+ case packet.PubKeyAlgoRSA:
+ bits := config.RSAModulusBits()
+ if bits < 1024 {
+ return nil, errors.InvalidArgumentError("bits must be >= 1024")
+ }
+ if config != nil && len(config.RSAPrimes) >= 2 {
+ primes := config.RSAPrimes[0:2]
+ config.RSAPrimes = config.RSAPrimes[2:]
+ return generateRSAKeyWithPrimes(config.Random(), 2, bits, primes)
+ }
+ return rsa.GenerateKey(config.Random(), bits)
+ case packet.PubKeyAlgoEdDSA:
+ if config.V6() {
+ // Implementations MUST NOT accept or generate v6 key material
+ // using the deprecated OIDs.
+ return nil, errors.InvalidArgumentError("EdDSALegacy cannot be used for v6 keys")
+ }
+ curve := ecc.FindEdDSAByGenName(string(config.CurveName()))
+ if curve == nil {
+ return nil, errors.InvalidArgumentError("unsupported curve")
+ }
+
+ priv, err := eddsa.GenerateKey(config.Random(), curve)
+ if err != nil {
+ return nil, err
+ }
+ return priv, nil
+ case packet.PubKeyAlgoECDSA:
+ curve := ecc.FindECDSAByGenName(string(config.CurveName()))
+ if curve == nil {
+ return nil, errors.InvalidArgumentError("unsupported curve")
+ }
+
+ priv, err := ecdsa.GenerateKey(config.Random(), curve)
+ if err != nil {
+ return nil, err
+ }
+ return priv, nil
+ case packet.PubKeyAlgoEd25519:
+ priv, err := ed25519.GenerateKey(config.Random())
+ if err != nil {
+ return nil, err
+ }
+ return priv, nil
+ case packet.PubKeyAlgoEd448:
+ priv, err := ed448.GenerateKey(config.Random())
+ if err != nil {
+ return nil, err
+ }
+ return priv, nil
+ default:
+ return nil, errors.InvalidArgumentError("unsupported public key algorithm")
+ }
+}
+
+// Generates an encryption/decryption key
+func newDecrypter(config *packet.Config) (decrypter interface{}, err error) {
+ switch config.PublicKeyAlgorithm() {
+ case packet.PubKeyAlgoRSA:
+ bits := config.RSAModulusBits()
+ if bits < 1024 {
+ return nil, errors.InvalidArgumentError("bits must be >= 1024")
+ }
+ if config != nil && len(config.RSAPrimes) >= 2 {
+ primes := config.RSAPrimes[0:2]
+ config.RSAPrimes = config.RSAPrimes[2:]
+ return generateRSAKeyWithPrimes(config.Random(), 2, bits, primes)
+ }
+ return rsa.GenerateKey(config.Random(), bits)
+ case packet.PubKeyAlgoEdDSA, packet.PubKeyAlgoECDSA:
+ fallthrough // When passing EdDSA or ECDSA, we generate an ECDH subkey
+ case packet.PubKeyAlgoECDH:
+ if config.V6() &&
+ (config.CurveName() == packet.Curve25519 ||
+ config.CurveName() == packet.Curve448) {
+ // Implementations MUST NOT accept or generate v6 key material
+ // using the deprecated OIDs.
+ return nil, errors.InvalidArgumentError("ECDH with Curve25519/448 legacy cannot be used for v6 keys")
+ }
+ var kdf = ecdh.KDF{
+ Hash: algorithm.SHA512,
+ Cipher: algorithm.AES256,
+ }
+ curve := ecc.FindECDHByGenName(string(config.CurveName()))
+ if curve == nil {
+ return nil, errors.InvalidArgumentError("unsupported curve")
+ }
+ return ecdh.GenerateKey(config.Random(), curve, kdf)
+ case packet.PubKeyAlgoEd25519, packet.PubKeyAlgoX25519: // When passing Ed25519, we generate an x25519 subkey
+ return x25519.GenerateKey(config.Random())
+ case packet.PubKeyAlgoEd448, packet.PubKeyAlgoX448: // When passing Ed448, we generate an x448 subkey
+ return x448.GenerateKey(config.Random())
+ default:
+ return nil, errors.InvalidArgumentError("unsupported public key algorithm")
+ }
+}
+
+var bigOne = big.NewInt(1)
+
+// generateRSAKeyWithPrimes generates a multi-prime RSA keypair of the
+// given bit size, using the given random source and pre-populated primes.
+func generateRSAKeyWithPrimes(random io.Reader, nprimes int, bits int, prepopulatedPrimes []*big.Int) (*rsa.PrivateKey, error) {
+ priv := new(rsa.PrivateKey)
+ priv.E = 65537
+
+ if nprimes < 2 {
+ return nil, goerrors.New("generateRSAKeyWithPrimes: nprimes must be >= 2")
+ }
+
+ if bits < 1024 {
+ return nil, goerrors.New("generateRSAKeyWithPrimes: bits must be >= 1024")
+ }
+
+ primes := make([]*big.Int, nprimes)
+
+NextSetOfPrimes:
+ for {
+ todo := bits
+ // crypto/rand should set the top two bits in each prime.
+ // Thus each prime has the form
+ // p_i = 2^bitlen(p_i) × 0.11... (in base 2).
+ // And the product is:
+ // P = 2^todo × α
+ // where α is the product of nprimes numbers of the form 0.11...
+ //
+ // If α < 1/2 (which can happen for nprimes > 2), we need to
+ // shift todo to compensate for lost bits: the mean value of 0.11...
+ // is 7/8, so todo + shift - nprimes * log2(7/8) ~= bits - 1/2
+ // will give good results.
+ if nprimes >= 7 {
+ todo += (nprimes - 2) / 5
+ }
+ for i := 0; i < nprimes; i++ {
+ var err error
+ if len(prepopulatedPrimes) == 0 {
+ primes[i], err = rand.Prime(random, todo/(nprimes-i))
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ primes[i] = prepopulatedPrimes[0]
+ prepopulatedPrimes = prepopulatedPrimes[1:]
+ }
+
+ todo -= primes[i].BitLen()
+ }
+
+ // Make sure that primes is pairwise unequal.
+ for i, prime := range primes {
+ for j := 0; j < i; j++ {
+ if prime.Cmp(primes[j]) == 0 {
+ continue NextSetOfPrimes
+ }
+ }
+ }
+
+ n := new(big.Int).Set(bigOne)
+ totient := new(big.Int).Set(bigOne)
+ pminus1 := new(big.Int)
+ for _, prime := range primes {
+ n.Mul(n, prime)
+ pminus1.Sub(prime, bigOne)
+ totient.Mul(totient, pminus1)
+ }
+ if n.BitLen() != bits {
+ // This should never happen for nprimes == 2 because
+ // crypto/rand should set the top two bits in each prime.
+ // For nprimes > 2 we hope it does not happen often.
+ continue NextSetOfPrimes
+ }
+
+ priv.D = new(big.Int)
+ e := big.NewInt(int64(priv.E))
+ ok := priv.D.ModInverse(e, totient)
+
+ if ok != nil {
+ priv.Primes = primes
+ priv.N = n
+ break
+ }
+ }
+
+ priv.Precompute()
+ return priv, nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/keys.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/keys.go
new file mode 100644
index 000000000..a071353e2
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/keys.go
@@ -0,0 +1,901 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package openpgp
+
+import (
+ goerrors "errors"
+ "fmt"
+ "io"
+ "time"
+
+ "github.com/ProtonMail/go-crypto/openpgp/armor"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/packet"
+)
+
+// PublicKeyType is the armor type for a PGP public key.
+var PublicKeyType = "PGP PUBLIC KEY BLOCK"
+
+// PrivateKeyType is the armor type for a PGP private key.
+var PrivateKeyType = "PGP PRIVATE KEY BLOCK"
+
+// An Entity represents the components of an OpenPGP key: a primary public key
+// (which must be a signing key), one or more identities claimed by that key,
+// and zero or more subkeys, which may be encryption keys.
+type Entity struct {
+ PrimaryKey *packet.PublicKey
+ PrivateKey *packet.PrivateKey
+ Identities map[string]*Identity // indexed by Identity.Name
+ Revocations []*packet.Signature
+ Subkeys []Subkey
+ SelfSignature *packet.Signature // Direct-key self signature of the PrimaryKey (contains primary key properties in v6)
+ Signatures []*packet.Signature // all (potentially unverified) self-signatures, revocations, and third-party signatures
+}
+
+// An Identity represents an identity claimed by an Entity and zero or more
+// assertions by other entities about that claim.
+type Identity struct {
+ Name string // by convention, has the form "Full Name (comment) "
+ UserId *packet.UserId
+ SelfSignature *packet.Signature
+ Revocations []*packet.Signature
+ Signatures []*packet.Signature // all (potentially unverified) self-signatures, revocations, and third-party signatures
+}
+
+// A Subkey is an additional public key in an Entity. Subkeys can be used for
+// encryption.
+type Subkey struct {
+ PublicKey *packet.PublicKey
+ PrivateKey *packet.PrivateKey
+ Sig *packet.Signature
+ Revocations []*packet.Signature
+}
+
+// A Key identifies a specific public key in an Entity. This is either the
+// Entity's primary key or a subkey.
+type Key struct {
+ Entity *Entity
+ PublicKey *packet.PublicKey
+ PrivateKey *packet.PrivateKey
+ SelfSignature *packet.Signature
+ Revocations []*packet.Signature
+}
+
+// A KeyRing provides access to public and private keys.
+type KeyRing interface {
+ // KeysById returns the set of keys that have the given key id.
+ KeysById(id uint64) []Key
+ // KeysByIdAndUsage returns the set of keys with the given id
+ // that also meet the key usage given by requiredUsage.
+ // The requiredUsage is expressed as the bitwise-OR of
+ // packet.KeyFlag* values.
+ KeysByIdUsage(id uint64, requiredUsage byte) []Key
+ // DecryptionKeys returns all private keys that are valid for
+ // decryption.
+ DecryptionKeys() []Key
+}
+
+// PrimaryIdentity returns an Identity, preferring non-revoked identities,
+// identities marked as primary, or the latest-created identity, in that order.
+func (e *Entity) PrimaryIdentity() *Identity {
+ var primaryIdentity *Identity
+ for _, ident := range e.Identities {
+ if shouldPreferIdentity(primaryIdentity, ident) {
+ primaryIdentity = ident
+ }
+ }
+ return primaryIdentity
+}
+
+func shouldPreferIdentity(existingId, potentialNewId *Identity) bool {
+ if existingId == nil {
+ return true
+ }
+
+ if len(existingId.Revocations) > len(potentialNewId.Revocations) {
+ return true
+ }
+
+ if len(existingId.Revocations) < len(potentialNewId.Revocations) {
+ return false
+ }
+
+ if existingId.SelfSignature == nil {
+ return true
+ }
+
+ if existingId.SelfSignature.IsPrimaryId != nil && *existingId.SelfSignature.IsPrimaryId &&
+ !(potentialNewId.SelfSignature.IsPrimaryId != nil && *potentialNewId.SelfSignature.IsPrimaryId) {
+ return false
+ }
+
+ if !(existingId.SelfSignature.IsPrimaryId != nil && *existingId.SelfSignature.IsPrimaryId) &&
+ potentialNewId.SelfSignature.IsPrimaryId != nil && *potentialNewId.SelfSignature.IsPrimaryId {
+ return true
+ }
+
+ return potentialNewId.SelfSignature.CreationTime.After(existingId.SelfSignature.CreationTime)
+}
+
+// EncryptionKey returns the best candidate Key for encrypting a message to the
+// given Entity.
+func (e *Entity) EncryptionKey(now time.Time) (Key, bool) {
+ // Fail to find any encryption key if the...
+ primarySelfSignature, primaryIdentity := e.PrimarySelfSignature()
+ if primarySelfSignature == nil || // no self-signature found
+ e.PrimaryKey.KeyExpired(primarySelfSignature, now) || // primary key has expired
+ e.Revoked(now) || // primary key has been revoked
+ primarySelfSignature.SigExpired(now) || // user ID or or direct self-signature has expired
+ (primaryIdentity != nil && primaryIdentity.Revoked(now)) { // user ID has been revoked (for v4 keys)
+ return Key{}, false
+ }
+
+ // Iterate the keys to find the newest, unexpired one
+ candidateSubkey := -1
+ var maxTime time.Time
+ for i, subkey := range e.Subkeys {
+ if subkey.Sig.FlagsValid &&
+ subkey.Sig.FlagEncryptCommunications &&
+ subkey.PublicKey.PubKeyAlgo.CanEncrypt() &&
+ !subkey.PublicKey.KeyExpired(subkey.Sig, now) &&
+ !subkey.Sig.SigExpired(now) &&
+ !subkey.Revoked(now) &&
+ (maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) {
+ candidateSubkey = i
+ maxTime = subkey.Sig.CreationTime
+ }
+ }
+
+ if candidateSubkey != -1 {
+ subkey := e.Subkeys[candidateSubkey]
+ return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig, subkey.Revocations}, true
+ }
+
+ // If we don't have any subkeys for encryption and the primary key
+ // is marked as OK to encrypt with, then we can use it.
+ if primarySelfSignature.FlagsValid && primarySelfSignature.FlagEncryptCommunications &&
+ e.PrimaryKey.PubKeyAlgo.CanEncrypt() {
+ return Key{e, e.PrimaryKey, e.PrivateKey, primarySelfSignature, e.Revocations}, true
+ }
+
+ return Key{}, false
+}
+
+// CertificationKey return the best candidate Key for certifying a key with this
+// Entity.
+func (e *Entity) CertificationKey(now time.Time) (Key, bool) {
+ return e.CertificationKeyById(now, 0)
+}
+
+// CertificationKeyById return the Key for key certification with this
+// Entity and keyID.
+func (e *Entity) CertificationKeyById(now time.Time, id uint64) (Key, bool) {
+ return e.signingKeyByIdUsage(now, id, packet.KeyFlagCertify)
+}
+
+// SigningKey return the best candidate Key for signing a message with this
+// Entity.
+func (e *Entity) SigningKey(now time.Time) (Key, bool) {
+ return e.SigningKeyById(now, 0)
+}
+
+// SigningKeyById return the Key for signing a message with this
+// Entity and keyID.
+func (e *Entity) SigningKeyById(now time.Time, id uint64) (Key, bool) {
+ return e.signingKeyByIdUsage(now, id, packet.KeyFlagSign)
+}
+
+func (e *Entity) signingKeyByIdUsage(now time.Time, id uint64, flags int) (Key, bool) {
+ // Fail to find any signing key if the...
+ primarySelfSignature, primaryIdentity := e.PrimarySelfSignature()
+ if primarySelfSignature == nil || // no self-signature found
+ e.PrimaryKey.KeyExpired(primarySelfSignature, now) || // primary key has expired
+ e.Revoked(now) || // primary key has been revoked
+ primarySelfSignature.SigExpired(now) || // user ID or direct self-signature has expired
+ (primaryIdentity != nil && primaryIdentity.Revoked(now)) { // user ID has been revoked (for v4 keys)
+ return Key{}, false
+ }
+
+ // Iterate the keys to find the newest, unexpired one
+ candidateSubkey := -1
+ var maxTime time.Time
+ for idx, subkey := range e.Subkeys {
+ if subkey.Sig.FlagsValid &&
+ (flags&packet.KeyFlagCertify == 0 || subkey.Sig.FlagCertify) &&
+ (flags&packet.KeyFlagSign == 0 || subkey.Sig.FlagSign) &&
+ subkey.PublicKey.PubKeyAlgo.CanSign() &&
+ !subkey.PublicKey.KeyExpired(subkey.Sig, now) &&
+ !subkey.Sig.SigExpired(now) &&
+ !subkey.Revoked(now) &&
+ (maxTime.IsZero() || subkey.Sig.CreationTime.After(maxTime)) &&
+ (id == 0 || subkey.PublicKey.KeyId == id) {
+ candidateSubkey = idx
+ maxTime = subkey.Sig.CreationTime
+ }
+ }
+
+ if candidateSubkey != -1 {
+ subkey := e.Subkeys[candidateSubkey]
+ return Key{e, subkey.PublicKey, subkey.PrivateKey, subkey.Sig, subkey.Revocations}, true
+ }
+
+ // If we don't have any subkeys for signing and the primary key
+ // is marked as OK to sign with, then we can use it.
+ if primarySelfSignature.FlagsValid &&
+ (flags&packet.KeyFlagCertify == 0 || primarySelfSignature.FlagCertify) &&
+ (flags&packet.KeyFlagSign == 0 || primarySelfSignature.FlagSign) &&
+ e.PrimaryKey.PubKeyAlgo.CanSign() &&
+ (id == 0 || e.PrimaryKey.KeyId == id) {
+ return Key{e, e.PrimaryKey, e.PrivateKey, primarySelfSignature, e.Revocations}, true
+ }
+
+ // No keys with a valid Signing Flag or no keys matched the id passed in
+ return Key{}, false
+}
+
+func revoked(revocations []*packet.Signature, now time.Time) bool {
+ for _, revocation := range revocations {
+ if revocation.RevocationReason != nil && *revocation.RevocationReason == packet.KeyCompromised {
+ // If the key is compromised, the key is considered revoked even before the revocation date.
+ return true
+ }
+ if !revocation.SigExpired(now) {
+ return true
+ }
+ }
+ return false
+}
+
+// Revoked returns whether the entity has any direct key revocation signatures.
+// Note that third-party revocation signatures are not supported.
+// Note also that Identity and Subkey revocation should be checked separately.
+func (e *Entity) Revoked(now time.Time) bool {
+ return revoked(e.Revocations, now)
+}
+
+// EncryptPrivateKeys encrypts all non-encrypted keys in the entity with the same key
+// derived from the provided passphrase. Public keys and dummy keys are ignored,
+// and don't cause an error to be returned.
+func (e *Entity) EncryptPrivateKeys(passphrase []byte, config *packet.Config) error {
+ var keysToEncrypt []*packet.PrivateKey
+ // Add entity private key to encrypt.
+ if e.PrivateKey != nil && !e.PrivateKey.Dummy() && !e.PrivateKey.Encrypted {
+ keysToEncrypt = append(keysToEncrypt, e.PrivateKey)
+ }
+
+ // Add subkeys to encrypt.
+ for _, sub := range e.Subkeys {
+ if sub.PrivateKey != nil && !sub.PrivateKey.Dummy() && !sub.PrivateKey.Encrypted {
+ keysToEncrypt = append(keysToEncrypt, sub.PrivateKey)
+ }
+ }
+ return packet.EncryptPrivateKeys(keysToEncrypt, passphrase, config)
+}
+
+// DecryptPrivateKeys decrypts all encrypted keys in the entity with the given passphrase.
+// Avoids recomputation of similar s2k key derivations. Public keys and dummy keys are ignored,
+// and don't cause an error to be returned.
+func (e *Entity) DecryptPrivateKeys(passphrase []byte) error {
+ var keysToDecrypt []*packet.PrivateKey
+ // Add entity private key to decrypt.
+ if e.PrivateKey != nil && !e.PrivateKey.Dummy() && e.PrivateKey.Encrypted {
+ keysToDecrypt = append(keysToDecrypt, e.PrivateKey)
+ }
+
+ // Add subkeys to decrypt.
+ for _, sub := range e.Subkeys {
+ if sub.PrivateKey != nil && !sub.PrivateKey.Dummy() && sub.PrivateKey.Encrypted {
+ keysToDecrypt = append(keysToDecrypt, sub.PrivateKey)
+ }
+ }
+ return packet.DecryptPrivateKeys(keysToDecrypt, passphrase)
+}
+
+// Revoked returns whether the identity has been revoked by a self-signature.
+// Note that third-party revocation signatures are not supported.
+func (i *Identity) Revoked(now time.Time) bool {
+ return revoked(i.Revocations, now)
+}
+
+// Revoked returns whether the subkey has been revoked by a self-signature.
+// Note that third-party revocation signatures are not supported.
+func (s *Subkey) Revoked(now time.Time) bool {
+ return revoked(s.Revocations, now)
+}
+
+// Revoked returns whether the key or subkey has been revoked by a self-signature.
+// Note that third-party revocation signatures are not supported.
+// Note also that Identity revocation should be checked separately.
+// Normally, it's not necessary to call this function, except on keys returned by
+// KeysById or KeysByIdUsage.
+func (key *Key) Revoked(now time.Time) bool {
+ return revoked(key.Revocations, now)
+}
+
+// An EntityList contains one or more Entities.
+type EntityList []*Entity
+
+// KeysById returns the set of keys that have the given key id.
+func (el EntityList) KeysById(id uint64) (keys []Key) {
+ for _, e := range el {
+ if e.PrimaryKey.KeyId == id {
+ selfSig, _ := e.PrimarySelfSignature()
+ keys = append(keys, Key{e, e.PrimaryKey, e.PrivateKey, selfSig, e.Revocations})
+ }
+
+ for _, subKey := range e.Subkeys {
+ if subKey.PublicKey.KeyId == id {
+ keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig, subKey.Revocations})
+ }
+ }
+ }
+ return
+}
+
+// KeysByIdAndUsage returns the set of keys with the given id that also meet
+// the key usage given by requiredUsage. The requiredUsage is expressed as
+// the bitwise-OR of packet.KeyFlag* values.
+func (el EntityList) KeysByIdUsage(id uint64, requiredUsage byte) (keys []Key) {
+ for _, key := range el.KeysById(id) {
+ if requiredUsage != 0 {
+ if key.SelfSignature == nil || !key.SelfSignature.FlagsValid {
+ continue
+ }
+
+ var usage byte
+ if key.SelfSignature.FlagCertify {
+ usage |= packet.KeyFlagCertify
+ }
+ if key.SelfSignature.FlagSign {
+ usage |= packet.KeyFlagSign
+ }
+ if key.SelfSignature.FlagEncryptCommunications {
+ usage |= packet.KeyFlagEncryptCommunications
+ }
+ if key.SelfSignature.FlagEncryptStorage {
+ usage |= packet.KeyFlagEncryptStorage
+ }
+ if usage&requiredUsage != requiredUsage {
+ continue
+ }
+ }
+
+ keys = append(keys, key)
+ }
+ return
+}
+
+// DecryptionKeys returns all private keys that are valid for decryption.
+func (el EntityList) DecryptionKeys() (keys []Key) {
+ for _, e := range el {
+ for _, subKey := range e.Subkeys {
+ if subKey.PrivateKey != nil && subKey.Sig.FlagsValid && (subKey.Sig.FlagEncryptStorage || subKey.Sig.FlagEncryptCommunications) {
+ keys = append(keys, Key{e, subKey.PublicKey, subKey.PrivateKey, subKey.Sig, subKey.Revocations})
+ }
+ }
+ }
+ return
+}
+
+// ReadArmoredKeyRing reads one or more public/private keys from an armor keyring file.
+func ReadArmoredKeyRing(r io.Reader) (EntityList, error) {
+ block, err := armor.Decode(r)
+ if err == io.EOF {
+ return nil, errors.InvalidArgumentError("no armored data found")
+ }
+ if err != nil {
+ return nil, err
+ }
+ if block.Type != PublicKeyType && block.Type != PrivateKeyType {
+ return nil, errors.InvalidArgumentError("expected public or private key block, got: " + block.Type)
+ }
+
+ return ReadKeyRing(block.Body)
+}
+
+// ReadKeyRing reads one or more public/private keys. Unsupported keys are
+// ignored as long as at least a single valid key is found.
+func ReadKeyRing(r io.Reader) (el EntityList, err error) {
+ packets := packet.NewReader(r)
+ var lastUnsupportedError error
+
+ for {
+ var e *Entity
+ e, err = ReadEntity(packets)
+ if err != nil {
+ // TODO: warn about skipped unsupported/unreadable keys
+ if _, ok := err.(errors.UnsupportedError); ok {
+ lastUnsupportedError = err
+ err = readToNextPublicKey(packets)
+ } else if _, ok := err.(errors.StructuralError); ok {
+ // Skip unreadable, badly-formatted keys
+ lastUnsupportedError = err
+ err = readToNextPublicKey(packets)
+ }
+ if err == io.EOF {
+ err = nil
+ break
+ }
+ if err != nil {
+ el = nil
+ break
+ }
+ } else {
+ el = append(el, e)
+ }
+ }
+
+ if len(el) == 0 && err == nil {
+ err = lastUnsupportedError
+ }
+ return
+}
+
+// readToNextPublicKey reads packets until the start of the entity and leaves
+// the first packet of the new entity in the Reader.
+func readToNextPublicKey(packets *packet.Reader) (err error) {
+ var p packet.Packet
+ for {
+ p, err = packets.Next()
+ if err == io.EOF {
+ return
+ } else if err != nil {
+ if _, ok := err.(errors.UnsupportedError); ok {
+ continue
+ }
+ return
+ }
+
+ if pk, ok := p.(*packet.PublicKey); ok && !pk.IsSubkey {
+ packets.Unread(p)
+ return
+ }
+ }
+}
+
+// ReadEntity reads an entity (public key, identities, subkeys etc) from the
+// given Reader.
+func ReadEntity(packets *packet.Reader) (*Entity, error) {
+ e := new(Entity)
+ e.Identities = make(map[string]*Identity)
+
+ p, err := packets.Next()
+ if err != nil {
+ return nil, err
+ }
+
+ var ok bool
+ if e.PrimaryKey, ok = p.(*packet.PublicKey); !ok {
+ if e.PrivateKey, ok = p.(*packet.PrivateKey); !ok {
+ packets.Unread(p)
+ return nil, errors.StructuralError("first packet was not a public/private key")
+ }
+ e.PrimaryKey = &e.PrivateKey.PublicKey
+ }
+
+ if !e.PrimaryKey.PubKeyAlgo.CanSign() {
+ return nil, errors.StructuralError("primary key cannot be used for signatures")
+ }
+
+ var revocations []*packet.Signature
+ var directSignatures []*packet.Signature
+EachPacket:
+ for {
+ p, err := packets.Next()
+ if err == io.EOF {
+ break
+ } else if err != nil {
+ return nil, err
+ }
+
+ switch pkt := p.(type) {
+ case *packet.UserId:
+ if err := addUserID(e, packets, pkt); err != nil {
+ return nil, err
+ }
+ case *packet.Signature:
+ if pkt.SigType == packet.SigTypeKeyRevocation {
+ revocations = append(revocations, pkt)
+ } else if pkt.SigType == packet.SigTypeDirectSignature {
+ directSignatures = append(directSignatures, pkt)
+ }
+ // Else, ignoring the signature as it does not follow anything
+ // we would know to attach it to.
+ case *packet.PrivateKey:
+ if !pkt.IsSubkey {
+ packets.Unread(p)
+ break EachPacket
+ }
+ err = addSubkey(e, packets, &pkt.PublicKey, pkt)
+ if err != nil {
+ return nil, err
+ }
+ case *packet.PublicKey:
+ if !pkt.IsSubkey {
+ packets.Unread(p)
+ break EachPacket
+ }
+ err = addSubkey(e, packets, pkt, nil)
+ if err != nil {
+ return nil, err
+ }
+ default:
+ // we ignore unknown packets.
+ }
+ }
+
+ if len(e.Identities) == 0 && e.PrimaryKey.Version < 6 {
+ return nil, errors.StructuralError(fmt.Sprintf("v%d entity without any identities", e.PrimaryKey.Version))
+ }
+
+ // An implementation MUST ensure that a valid direct-key signature is present before using a v6 key.
+ if e.PrimaryKey.Version == 6 {
+ if len(directSignatures) == 0 {
+ return nil, errors.StructuralError("v6 entity without a valid direct-key signature")
+ }
+ // Select main direct key signature.
+ var mainDirectKeySelfSignature *packet.Signature
+ for _, directSignature := range directSignatures {
+ if directSignature.SigType == packet.SigTypeDirectSignature &&
+ directSignature.CheckKeyIdOrFingerprint(e.PrimaryKey) &&
+ (mainDirectKeySelfSignature == nil ||
+ directSignature.CreationTime.After(mainDirectKeySelfSignature.CreationTime)) {
+ mainDirectKeySelfSignature = directSignature
+ }
+ }
+ if mainDirectKeySelfSignature == nil {
+ return nil, errors.StructuralError("no valid direct-key self-signature for v6 primary key found")
+ }
+ // Check that the main self-signature is valid.
+ err = e.PrimaryKey.VerifyDirectKeySignature(mainDirectKeySelfSignature)
+ if err != nil {
+ return nil, errors.StructuralError("invalid direct-key self-signature for v6 primary key")
+ }
+ e.SelfSignature = mainDirectKeySelfSignature
+ e.Signatures = directSignatures
+ }
+
+ for _, revocation := range revocations {
+ err = e.PrimaryKey.VerifyRevocationSignature(revocation)
+ if err == nil {
+ e.Revocations = append(e.Revocations, revocation)
+ } else {
+ // TODO: RFC 4880 5.2.3.15 defines revocation keys.
+ return nil, errors.StructuralError("revocation signature signed by alternate key")
+ }
+ }
+
+ return e, nil
+}
+
+func addUserID(e *Entity, packets *packet.Reader, pkt *packet.UserId) error {
+ // Make a new Identity object, that we might wind up throwing away.
+ // We'll only add it if we get a valid self-signature over this
+ // userID.
+ identity := new(Identity)
+ identity.Name = pkt.Id
+ identity.UserId = pkt
+
+ for {
+ p, err := packets.Next()
+ if err == io.EOF {
+ break
+ } else if err != nil {
+ return err
+ }
+
+ sig, ok := p.(*packet.Signature)
+ if !ok {
+ packets.Unread(p)
+ break
+ }
+
+ if sig.SigType != packet.SigTypeGenericCert &&
+ sig.SigType != packet.SigTypePersonaCert &&
+ sig.SigType != packet.SigTypeCasualCert &&
+ sig.SigType != packet.SigTypePositiveCert &&
+ sig.SigType != packet.SigTypeCertificationRevocation {
+ return errors.StructuralError("user ID signature with wrong type")
+ }
+
+ if sig.CheckKeyIdOrFingerprint(e.PrimaryKey) {
+ if err = e.PrimaryKey.VerifyUserIdSignature(pkt.Id, e.PrimaryKey, sig); err != nil {
+ return errors.StructuralError("user ID self-signature invalid: " + err.Error())
+ }
+ if sig.SigType == packet.SigTypeCertificationRevocation {
+ identity.Revocations = append(identity.Revocations, sig)
+ } else if identity.SelfSignature == nil || sig.CreationTime.After(identity.SelfSignature.CreationTime) {
+ identity.SelfSignature = sig
+ }
+ identity.Signatures = append(identity.Signatures, sig)
+ e.Identities[pkt.Id] = identity
+ } else {
+ identity.Signatures = append(identity.Signatures, sig)
+ }
+ }
+
+ return nil
+}
+
+func addSubkey(e *Entity, packets *packet.Reader, pub *packet.PublicKey, priv *packet.PrivateKey) error {
+ var subKey Subkey
+ subKey.PublicKey = pub
+ subKey.PrivateKey = priv
+
+ for {
+ p, err := packets.Next()
+ if err == io.EOF {
+ break
+ } else if err != nil {
+ return errors.StructuralError("subkey signature invalid: " + err.Error())
+ }
+
+ sig, ok := p.(*packet.Signature)
+ if !ok {
+ packets.Unread(p)
+ break
+ }
+
+ if sig.SigType != packet.SigTypeSubkeyBinding && sig.SigType != packet.SigTypeSubkeyRevocation {
+ return errors.StructuralError("subkey signature with wrong type")
+ }
+
+ if err := e.PrimaryKey.VerifyKeySignature(subKey.PublicKey, sig); err != nil {
+ return errors.StructuralError("subkey signature invalid: " + err.Error())
+ }
+
+ switch sig.SigType {
+ case packet.SigTypeSubkeyRevocation:
+ subKey.Revocations = append(subKey.Revocations, sig)
+ case packet.SigTypeSubkeyBinding:
+ if subKey.Sig == nil || sig.CreationTime.After(subKey.Sig.CreationTime) {
+ subKey.Sig = sig
+ }
+ }
+ }
+
+ if subKey.Sig == nil {
+ return errors.StructuralError("subkey packet not followed by signature")
+ }
+
+ e.Subkeys = append(e.Subkeys, subKey)
+
+ return nil
+}
+
+// SerializePrivate serializes an Entity, including private key material, but
+// excluding signatures from other entities, to the given Writer.
+// Identities and subkeys are re-signed in case they changed since NewEntry.
+// If config is nil, sensible defaults will be used.
+func (e *Entity) SerializePrivate(w io.Writer, config *packet.Config) (err error) {
+ if e.PrivateKey.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy private key cannot re-sign identities")
+ }
+ return e.serializePrivate(w, config, true)
+}
+
+// SerializePrivateWithoutSigning serializes an Entity, including private key
+// material, but excluding signatures from other entities, to the given Writer.
+// Self-signatures of identities and subkeys are not re-signed. This is useful
+// when serializing GNU dummy keys, among other things.
+// If config is nil, sensible defaults will be used.
+func (e *Entity) SerializePrivateWithoutSigning(w io.Writer, config *packet.Config) (err error) {
+ return e.serializePrivate(w, config, false)
+}
+
+func (e *Entity) serializePrivate(w io.Writer, config *packet.Config, reSign bool) (err error) {
+ if e.PrivateKey == nil {
+ return goerrors.New("openpgp: private key is missing")
+ }
+ err = e.PrivateKey.Serialize(w)
+ if err != nil {
+ return
+ }
+ for _, revocation := range e.Revocations {
+ err := revocation.Serialize(w)
+ if err != nil {
+ return err
+ }
+ }
+ for _, directSignature := range e.Signatures {
+ err := directSignature.Serialize(w)
+ if err != nil {
+ return err
+ }
+ }
+ for _, ident := range e.Identities {
+ err = ident.UserId.Serialize(w)
+ if err != nil {
+ return
+ }
+ if reSign {
+ if ident.SelfSignature == nil {
+ return goerrors.New("openpgp: can't re-sign identity without valid self-signature")
+ }
+ err = ident.SelfSignature.SignUserId(ident.UserId.Id, e.PrimaryKey, e.PrivateKey, config)
+ if err != nil {
+ return
+ }
+ }
+ for _, sig := range ident.Signatures {
+ err = sig.Serialize(w)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ for _, subkey := range e.Subkeys {
+ err = subkey.PrivateKey.Serialize(w)
+ if err != nil {
+ return
+ }
+ if reSign {
+ err = subkey.Sig.SignKey(subkey.PublicKey, e.PrivateKey, config)
+ if err != nil {
+ return
+ }
+ if subkey.Sig.EmbeddedSignature != nil {
+ err = subkey.Sig.EmbeddedSignature.CrossSignKey(subkey.PublicKey, e.PrimaryKey,
+ subkey.PrivateKey, config)
+ if err != nil {
+ return
+ }
+ }
+ }
+ for _, revocation := range subkey.Revocations {
+ err := revocation.Serialize(w)
+ if err != nil {
+ return err
+ }
+ }
+ err = subkey.Sig.Serialize(w)
+ if err != nil {
+ return
+ }
+ }
+ return nil
+}
+
+// Serialize writes the public part of the given Entity to w, including
+// signatures from other entities. No private key material will be output.
+func (e *Entity) Serialize(w io.Writer) error {
+ err := e.PrimaryKey.Serialize(w)
+ if err != nil {
+ return err
+ }
+ for _, revocation := range e.Revocations {
+ err := revocation.Serialize(w)
+ if err != nil {
+ return err
+ }
+ }
+ for _, directSignature := range e.Signatures {
+ err := directSignature.Serialize(w)
+ if err != nil {
+ return err
+ }
+ }
+ for _, ident := range e.Identities {
+ err = ident.UserId.Serialize(w)
+ if err != nil {
+ return err
+ }
+ for _, sig := range ident.Signatures {
+ err = sig.Serialize(w)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ for _, subkey := range e.Subkeys {
+ err = subkey.PublicKey.Serialize(w)
+ if err != nil {
+ return err
+ }
+ for _, revocation := range subkey.Revocations {
+ err := revocation.Serialize(w)
+ if err != nil {
+ return err
+ }
+ }
+ err = subkey.Sig.Serialize(w)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// SignIdentity adds a signature to e, from signer, attesting that identity is
+// associated with e. The provided identity must already be an element of
+// e.Identities and the private key of signer must have been decrypted if
+// necessary.
+// If config is nil, sensible defaults will be used.
+func (e *Entity) SignIdentity(identity string, signer *Entity, config *packet.Config) error {
+ certificationKey, ok := signer.CertificationKey(config.Now())
+ if !ok {
+ return errors.InvalidArgumentError("no valid certification key found")
+ }
+
+ if certificationKey.PrivateKey.Encrypted {
+ return errors.InvalidArgumentError("signing Entity's private key must be decrypted")
+ }
+
+ ident, ok := e.Identities[identity]
+ if !ok {
+ return errors.InvalidArgumentError("given identity string not found in Entity")
+ }
+
+ sig := createSignaturePacket(certificationKey.PublicKey, packet.SigTypeGenericCert, config)
+
+ signingUserID := config.SigningUserId()
+ if signingUserID != "" {
+ if _, ok := signer.Identities[signingUserID]; !ok {
+ return errors.InvalidArgumentError("signer identity string not found in signer Entity")
+ }
+ sig.SignerUserId = &signingUserID
+ }
+
+ if err := sig.SignUserId(identity, e.PrimaryKey, certificationKey.PrivateKey, config); err != nil {
+ return err
+ }
+ ident.Signatures = append(ident.Signatures, sig)
+ return nil
+}
+
+// RevokeKey generates a key revocation signature (packet.SigTypeKeyRevocation) with the
+// specified reason code and text (RFC4880 section-5.2.3.23).
+// If config is nil, sensible defaults will be used.
+func (e *Entity) RevokeKey(reason packet.ReasonForRevocation, reasonText string, config *packet.Config) error {
+ revSig := createSignaturePacket(e.PrimaryKey, packet.SigTypeKeyRevocation, config)
+ revSig.RevocationReason = &reason
+ revSig.RevocationReasonText = reasonText
+
+ if err := revSig.RevokeKey(e.PrimaryKey, e.PrivateKey, config); err != nil {
+ return err
+ }
+ e.Revocations = append(e.Revocations, revSig)
+ return nil
+}
+
+// RevokeSubkey generates a subkey revocation signature (packet.SigTypeSubkeyRevocation) for
+// a subkey with the specified reason code and text (RFC4880 section-5.2.3.23).
+// If config is nil, sensible defaults will be used.
+func (e *Entity) RevokeSubkey(sk *Subkey, reason packet.ReasonForRevocation, reasonText string, config *packet.Config) error {
+ if err := e.PrimaryKey.VerifyKeySignature(sk.PublicKey, sk.Sig); err != nil {
+ return errors.InvalidArgumentError("given subkey is not associated with this key")
+ }
+
+ revSig := createSignaturePacket(e.PrimaryKey, packet.SigTypeSubkeyRevocation, config)
+ revSig.RevocationReason = &reason
+ revSig.RevocationReasonText = reasonText
+
+ if err := revSig.RevokeSubkey(sk.PublicKey, e.PrivateKey, config); err != nil {
+ return err
+ }
+
+ sk.Revocations = append(sk.Revocations, revSig)
+ return nil
+}
+
+func (e *Entity) primaryDirectSignature() *packet.Signature {
+ return e.SelfSignature
+}
+
+// PrimarySelfSignature searches the entity for the self-signature that stores key preferences.
+// For V4 keys, returns the self-signature of the primary identity, and the identity.
+// For V6 keys, returns the latest valid direct-key self-signature, and no identity (nil).
+// This self-signature is to be used to check the key expiration,
+// algorithm preferences, and so on.
+func (e *Entity) PrimarySelfSignature() (*packet.Signature, *Identity) {
+ if e.PrimaryKey.Version == 6 {
+ return e.primaryDirectSignature(), nil
+ }
+ primaryIdentity := e.PrimaryIdentity()
+ if primaryIdentity == nil {
+ return nil, nil
+ }
+ return primaryIdentity.SelfSignature, primaryIdentity
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/keys_test_data.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/keys_test_data.go
new file mode 100644
index 000000000..108fd096f
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/keys_test_data.go
@@ -0,0 +1,538 @@
+package openpgp
+
+const expiringKeyHex = "c6c04d0451d0c680010800abbb021fd03ffc4e96618901180c3fdcb060ee69eeead97b91256d11420d80b5f1b51930248044130bd300605cf8a05b7a40d3d8cfb0a910be2e3db50dcd50a9c54064c2a5550801daa834ff4480b33d3d3ca495ff8a4e84a886977d17d998f881241a874083d8b995beab555b6d22b8a4817ab17ac3e7304f7d4d2c05c495fb2218348d3bc13651db1d92732e368a9dd7dcefa6eddff30b94706a9aaee47e9d39321460b740c59c6fc3c2fd8ab6c0fb868cb87c0051f0321301fe0f0e1820b15e7fb7063395769b525005c7e30a7ce85984f5cac00504e7b4fdc45d74958de8388436fd5c7ba9ea121f1c851b5911dd1b47a14d81a09e92ef37721e2325b6790011010001cd00c2c07b041001080025050251d0c680050900278d00060b09070803020415080a0203160201021901021b03021e01000a0910e7b484133a890a35ae4b0800a1beb82e7f28eaf5273d6af9d3391314f6280b2b624eaca2851f89a9ebcaf80ac589ebd509f168bc4322106ca2e2ce77a76e071a3c7444787d65216b5f05e82c77928860b92aace3b7d0327db59492f422eb9dfab7249266d37429870b091a98aba8724c2259ebf8f85093f21255eafa75aa841e31d94f2ac891b9755fed455e539044ee69fc47950b80e003fc9f298d695660f28329eaa38037c367efde1727458e514faf990d439a21461b719edaddf9296d3d0647b43ca56cb8dbf63b4fcf8b9968e7928c463470fab3b98e44d0d95645062f94b2d04fe56bd52822b71934db8ce845622c40b92fcbe765a142e7f38b61a6aa9606c8e8858dcd3b6eb1894acec04d0451d1f06b01080088bea67444e1789390e7c0335c86775502d58ec783d99c8ef4e06de235ed3dd4b0467f6f358d818c7d8989d43ec6d69fcbc8c32632d5a1b605e3fa8e41d695fcdcaa535936cd0157f9040dce362519803b908eafe838bb13216c885c6f93e9e8d5745607f0d062322085d6bdc760969149a8ff8dd9f5c18d9bfe2e6f63a06e17694cf1f67587c6fb70e9aebf90ffc528ca3b615ac7c9d4a21ea4f7c06f2e98fbbd90a859b8608bf9ea638e3a54289ce44c283110d0c45fa458de6251cd6e7baf71f80f12c8978340490fd90c92b81736ae902ed958e478dceae2835953d189c45d182aff02ea2be61b81d8e94430f041d638647b43e2fcb45fd512fbf5068b810011010001c2c06504180108000f050251d1f06b050900081095021b0c000a0910e7b484133a890a35e63407fe2ec88d6d1e6c9ce7553ece0cb2524747217bad29f251d33df84599ffcc900141a355abd62126800744068a5e05dc167056aa9205273dc7765a2ed49db15c2a83b8d6e6429c902136f1e12229086c1c10c0053242c2a4ae1930db58163387a48cad64607ff2153c320e42843dec28e3fce90e7399d63ac0affa2fee1f0adc0953c89eb3f46ef1d6c04328ed13b491669d5120a3782e3ffb7c69575fb77eebd108794f4dda9d34be2bae57e8e59ec8ebfda2f6f06104b2321be408ea146e2db482b00c5055c8618de36ac9716f80da2617e225556d0fce61b01c8cea2d1e0ea982c31711060ca370f2739366e1e708f38405d784b49d16a26cf62d152eae734327cec04d0451d1f07b010800d5af91c5e7c2fd8951c8d254eab0c97cdcb66822f868b79b78c366255059a68fd74ebca9adb9b970cd9e586690e6e0756705432306878c897b10a4b4ca0005966f99ac8fa4e6f9caf54bf8e53844544beee9872a7ac64c119cf1393d96e674254b661f61ee975633d0e8a8672531edb6bb8e211204e7754a9efa802342118eee850beea742bac95a3f706cc2024cf6037a308bb68162b2f53b9a6346a96e6d31871a2456186e24a1c7a82b82ac04afdfd57cd7fb9ba77a9c760d40b76a170f7be525e5fb6a9848cc726e806187710d9b190387df28700f321f988a392899f93815cc937f309129eb94d5299c5547cb2c085898e6639496e70d746c9d3fb9881d0011010001c2c06504180108000f050251d1f07b050900266305021b0c000a0910e7b484133a890a35bff207fd10dfe8c4a6ea1dd30568012b6fd6891a763c87ad0f7a1d112aad9e8e3239378a3b85588c235865bac2e614348cb4f216d7217f53b3ef48c192e0a4d31d64d7bfa5faccf21155965fa156e887056db644a05ad08a85cc6152d1377d9e37b46f4ff462bbe68ace2dc586ef90070314576c985d8037c2ba63f0a7dc17a62e15bd77e88bc61d9d00858979709f12304264a4cf4225c5cf86f12c8e19486cb9cdcc69f18f027e5f16f4ca8b50e28b3115eaff3a345acd21f624aef81f6ede515c1b55b26b84c1e32264754eab672d5489b287e7277ea855e0a5ff2aa9e8b8c76d579a964ec225255f4d57bf66639ccb34b64798846943e162a41096a7002ca21c7f56"
+const subkeyUsageHex = "988d04533a52bc010400d26af43085558f65b9e7dbc90cb9238015259aed5e954637adcfa2181548b2d0b60c65f1f42ec5081cbf1bc0a8aa4900acfb77070837c58f26012fbce297d70afe96e759ad63531f0037538e70dbf8e384569b9720d99d8eb39d8d0a2947233ed242436cb6ac7dfe74123354b3d0119b5c235d3dd9c9d6c004f8ffaf67ad8583001101000188b7041f010200210502533b8552170c8001ce094aa433f7040bb2ddf0be3893cb843d0fe70c020700000a0910a42704b92866382aa98404009d63d916a27543da4221c60087c33f1c44bec9998c5438018ed370cca4962876c748e94b73eb39c58eb698063f3fd6346d58dd2a11c0247934c4a9d71f24754f7468f96fb24c3e791dd2392b62f626148ad724189498cbf993db2df7c0cdc2d677c35da0f16cb16c9ce7c33b4de65a4a91b1d21a130ae9cc26067718910ef8e2b417556d627261203c756d627261407379642e65642e61753e88b80413010200220502533a52bc021b03060b090807030206150802090a0b0416020301021e01021780000a0910a42704b92866382a47840400c0c2bd04f5fca586de408b395b3c280a278259c93eaaa8b79a53b97003f8ed502a8a00446dd9947fb462677e4fcac0dac2f0701847d15130aadb6cd9e0705ea0cf5f92f129136c7be21a718d46c8e641eb7f044f2adae573e11ae423a0a9ca51324f03a8a2f34b91fa40c3cc764bee4dccadedb54c768ba0469b683ea53f1c29b88d04533a52bc01040099c92a5d6f8b744224da27bc2369127c35269b58bec179de6bbc038f749344222f85a31933224f26b70243c4e4b2d242f0c4777eaef7b5502f9dad6d8bf3aaeb471210674b74de2d7078af497d55f5cdad97c7bedfbc1b41e8065a97c9c3d344b21fc81d27723af8e374bc595da26ea242dccb6ae497be26eea57e563ed517e90011010001889f0418010200090502533a52bc021b0c000a0910a42704b92866382afa1403ff70284c2de8a043ff51d8d29772602fa98009b7861c540535f874f2c230af8caf5638151a636b21f8255003997ccd29747fdd06777bb24f9593bd7d98a3e887689bf902f999915fcc94625ae487e5d13e6616f89090ebc4fdc7eb5cad8943e4056995bb61c6af37f8043016876a958ec7ebf39c43d20d53b7f546cfa83e8d2604b88d04533b8283010400c0b529316dbdf58b4c54461e7e669dc11c09eb7f73819f178ccd4177b9182b91d138605fcf1e463262fabefa73f94a52b5e15d1904635541c7ea540f07050ce0fb51b73e6f88644cec86e91107c957a114f69554548a85295d2b70bd0b203992f76eb5d493d86d9eabcaa7ef3fc7db7e458438db3fcdb0ca1cc97c638439a9170011010001889f0418010200090502533b8283021b0c000a0910a42704b92866382adc6d0400cfff6258485a21675adb7a811c3e19ebca18851533f75a7ba317950b9997fda8d1a4c8c76505c08c04b6c2cc31dc704d33da36a21273f2b388a1a706f7c3378b66d887197a525936ed9a69acb57fe7f718133da85ec742001c5d1864e9c6c8ea1b94f1c3759cebfd93b18606066c063a63be86085b7e37bdbc65f9a915bf084bb901a204533b85cd110400aed3d2c52af2b38b5b67904b0ef73d6dd7aef86adb770e2b153cd22489654dcc91730892087bb9856ae2d9f7ed1eb48f214243fe86bfe87b349ebd7c30e630e49c07b21fdabf78b7a95c8b7f969e97e3d33f2e074c63552ba64a2ded7badc05ce0ea2be6d53485f6900c7860c7aa76560376ce963d7271b9b54638a4028b573f00a0d8854bfcdb04986141568046202192263b9b67350400aaa1049dbc7943141ef590a70dcb028d730371d92ea4863de715f7f0f16d168bd3dc266c2450457d46dcbbf0b071547e5fbee7700a820c3750b236335d8d5848adb3c0da010e998908dfd93d961480084f3aea20b247034f8988eccb5546efaa35a92d0451df3aaf1aee5aa36a4c4d462c760ecd9cebcabfbe1412b1f21450f203fd126687cd486496e971a87fd9e1a8a765fe654baa219a6871ab97768596ab05c26c1aeea8f1a2c72395a58dbc12ef9640d2b95784e974a4d2d5a9b17c25fedacfe551bda52602de8f6d2e48443f5dd1a2a2a8e6a5e70ecdb88cd6e766ad9745c7ee91d78cc55c3d06536b49c3fee6c3d0b6ff0fb2bf13a314f57c953b8f4d93bf88e70418010200090502533b85cd021b0200520910a42704b92866382a47200419110200060502533b85cd000a091042ce2c64bc0ba99214b2009e26b26852c8b13b10c35768e40e78fbbb48bd084100a0c79d9ea0844fa5853dd3c85ff3ecae6f2c9dd6c557aa04008bbbc964cd65b9b8299d4ebf31f41cc7264b8cf33a00e82c5af022331fac79efc9563a822497ba012953cefe2629f1242fcdcb911dbb2315985bab060bfd58261ace3c654bdbbe2e8ed27a46e836490145c86dc7bae15c011f7e1ffc33730109b9338cd9f483e7cef3d2f396aab5bd80efb6646d7e778270ee99d934d187dd98"
+const revokedKeyHex = "988d045331ce82010400c4fdf7b40a5477f206e6ee278eaef888ca73bf9128a9eef9f2f1ddb8b7b71a4c07cfa241f028a04edb405e4d916c61d6beabc333813dc7b484d2b3c52ee233c6a79b1eea4e9cc51596ba9cd5ac5aeb9df62d86ea051055b79d03f8a4fa9f38386f5bd17529138f3325d46801514ea9047977e0829ed728e68636802796801be10011010001889f04200102000905025331d0e3021d03000a0910a401d9f09a34f7c042aa040086631196405b7e6af71026b88e98012eab44aa9849f6ef3fa930c7c9f23deaedba9db1538830f8652fb7648ec3fcade8dbcbf9eaf428e83c6cbcc272201bfe2fbb90d41963397a7c0637a1a9d9448ce695d9790db2dc95433ad7be19eb3de72dacf1d6db82c3644c13eae2a3d072b99bb341debba012c5ce4006a7d34a1f4b94b444526567205265766f6b657220283c52656727732022424d204261726973746122204b657920262530305c303e5c29203c72656740626d626172697374612e636f2e61753e88b704130102002205025331ce82021b03060b090807030206150802090a0b0416020301021e01021780000a0910a401d9f09a34f7c0019c03f75edfbeb6a73e7225ad3cc52724e2872e04260d7daf0d693c170d8c4b243b8767bc7785763533febc62ec2600c30603c433c095453ede59ff2fcabeb84ce32e0ed9d5cf15ffcbc816202b64370d4d77c1e9077d74e94a16fb4fa2e5bec23a56d7a73cf275f91691ae1801a976fcde09e981a2f6327ac27ea1fecf3185df0d56889c04100102000605025331cfb5000a0910fe9645554e8266b64b4303fc084075396674fb6f778d302ac07cef6bc0b5d07b66b2004c44aef711cbac79617ef06d836b4957522d8772dd94bf41a2f4ac8b1ee6d70c57503f837445a74765a076d07b829b8111fc2a918423ddb817ead7ca2a613ef0bfb9c6b3562aec6c3cf3c75ef3031d81d95f6563e4cdcc9960bcb386c5d757b104fcca5fe11fc709df884604101102000605025331cfe7000a09107b15a67f0b3ddc0317f6009e360beea58f29c1d963a22b962b80788c3fa6c84e009d148cfde6b351469b8eae91187eff07ad9d08fcaab88d045331ce820104009f25e20a42b904f3fa555530fe5c46737cf7bd076c35a2a0d22b11f7e0b61a69320b768f4a80fe13980ce380d1cfc4a0cd8fbe2d2e2ef85416668b77208baa65bf973fe8e500e78cc310d7c8705cdb34328bf80e24f0385fce5845c33bc7943cf6b11b02348a23da0bf6428e57c05135f2dc6bd7c1ce325d666d5a5fd2fd5e410011010001889f04180102000905025331ce82021b0c000a0910a401d9f09a34f7c0418003fe34feafcbeaef348a800a0d908a7a6809cc7304017d820f70f0474d5e23cb17e38b67dc6dca282c6ca00961f4ec9edf2738d0f087b1d81e4871ef08e1798010863afb4eac4c44a376cb343be929c5be66a78cfd4456ae9ec6a99d97f4e1c3ff3583351db2147a65c0acef5c003fb544ab3a2e2dc4d43646f58b811a6c3a369d1f"
+const revokedSubkeyHex = "988d04533121f6010400aefc803a3e4bb1a61c86e8a86d2726c6a43e0079e9f2713f1fa017e9854c83877f4aced8e331d675c67ea83ddab80aacbfa0b9040bb12d96f5a3d6be09455e2a76546cbd21677537db941cab710216b6d24ec277ee0bd65b910f416737ed120f6b93a9d3b306245c8cfd8394606fdb462e5cf43c551438d2864506c63367fc890011010001b41d416c696365203c616c69636540626d626172697374612e636f2e61753e88bb041301020025021b03060b090807030206150802090a0b0416020301021e01021780050253312798021901000a09104ef7e4beccde97f015a803ff5448437780f63263b0df8442a995e7f76c221351a51edd06f2063d8166cf3157aada4923dfc44aa0f2a6a4da5cf83b7fe722ba8ab416c976e77c6b5682e7f1069026673bd0de56ba06fd5d7a9f177607f277d9b55ff940a638c3e68525c67517e2b3d976899b93ca267f705b3e5efad7d61220e96b618a4497eab8d04403d23f8846041011020006050253312910000a09107b15a67f0b3ddc03d96e009f50b6365d86c4be5d5e9d0ea42d5e56f5794c617700a0ab274e19c2827780016d23417ce89e0a2c0d987d889c04100102000605025331cf7a000a0910a401d9f09a34f7c0ee970400aca292f213041c9f3b3fc49148cbda9d84afee6183c8dd6c5ff2600b29482db5fecd4303797be1ee6d544a20a858080fec43412061c9a71fae4039fd58013b4ae341273e6c66ad4c7cdd9e68245bedb260562e7b166f2461a1032f2b38c0e0e5715fb3d1656979e052b55ca827a76f872b78a9fdae64bc298170bfcebedc1271b41a416c696365203c616c696365407379646973702e6f722e61753e88b804130102002205025331278b021b03060b090807030206150802090a0b0416020301021e01021780000a09104ef7e4beccde97f06a7003fa03c3af68d272ebc1fa08aa72a03b02189c26496a2833d90450801c4e42c5b5f51ad96ce2d2c9cef4b7c02a6a2fcf1412d6a2d486098eb762f5010a201819c17fd2888aec8eda20c65a3b75744de7ee5cc8ac7bfc470cbe3cb982720405a27a3c6a8c229cfe36905f881b02ed5680f6a8f05866efb9d6c5844897e631deb949ca8846041011020006050253312910000a09107b15a67f0b3ddc0347bc009f7fa35db59147469eb6f2c5aaf6428accb138b22800a0caa2f5f0874bacc5909c652a57a31beda65eddd5889c04100102000605025331cf7a000a0910a401d9f09a34f7c0316403ff46f2a5c101256627f16384d34a38fb47a6c88ba60506843e532d91614339fccae5f884a5741e7582ffaf292ba38ee10a270a05f139bde3814b6a077e8cd2db0f105ebea2a83af70d385f13b507fac2ad93ff79d84950328bb86f3074745a8b7f9b64990fb142e2a12976e27e8d09a28dc5621f957ac49091116da410ac3cbde1b88d04533121f6010400cbd785b56905e4192e2fb62a720727d43c4fa487821203cf72138b884b78b701093243e1d8c92a0248a6c0203a5a88693da34af357499abacaf4b3309c640797d03093870a323b4b6f37865f6eaa2838148a67df4735d43a90ca87942554cdf1c4a751b1e75f9fd4ce4e97e278d6c1c7ed59d33441df7d084f3f02beb68896c70011010001889f0418010200090502533121f6021b0c000a09104ef7e4beccde97f0b98b03fc0a5ccf6a372995835a2f5da33b282a7d612c0ab2a97f59cf9fff73e9110981aac2858c41399afa29624a7fd8a0add11654e3d882c0fd199e161bdad65e5e2548f7b68a437ea64293db1246e3011cbb94dc1bcdeaf0f2539bd88ff16d95547144d97cead6a8c5927660a91e6db0d16eb36b7b49a3525b54d1644e65599b032b7eb901a204533127a0110400bd3edaa09eff9809c4edc2c2a0ebe52e53c50a19c1e49ab78e6167bf61473bb08f2050d78a5cbbc6ed66aff7b42cd503f16b4a0b99fa1609681fca9b7ce2bbb1a5b3864d6cdda4d7ef7849d156d534dea30fb0efb9e4cf8959a2b2ce623905882d5430b995a15c3b9fe92906086788b891002924f94abe139b42cbbfaaabe42f00a0b65dc1a1ad27d798adbcb5b5ad02d2688c89477b03ff4eebb6f7b15a73b96a96bed201c0e5e4ea27e4c6e2dd1005b94d4b90137a5b1cf5e01c6226c070c4cc999938101578877ee76d296b9aab8246d57049caacf489e80a3f40589cade790a020b1ac146d6f7a6241184b8c7fcde680eae3188f5dcbe846d7f7bdad34f6fcfca08413e19c1d5df83fc7c7c627d493492e009c2f52a80400a2fe82de87136fd2e8845888c4431b032ba29d9a29a804277e31002a8201fb8591a3e55c7a0d0881496caf8b9fb07544a5a4879291d0dc026a0ea9e5bd88eb4aa4947bbd694b25012e208a250d65ddc6f1eea59d3aed3b4ec15fcab85e2afaa23a40ab1ef9ce3e11e1bc1c34a0e758e7aa64deb8739276df0af7d4121f834a9b88e70418010200090502533127a0021b02005209104ef7e4beccde97f047200419110200060502533127a0000a0910dbce4ee19529437fe045009c0b32f5ead48ee8a7e98fac0dea3d3e6c0e2c552500a0ad71fadc5007cfaf842d9b7db3335a8cdad15d3d1a6404009b08e2c68fe8f3b45c1bb72a4b3278cdf3012aa0f229883ad74aa1f6000bb90b18301b2f85372ca5d6b9bf478d235b733b1b197d19ccca48e9daf8e890cb64546b4ce1b178faccfff07003c172a2d4f5ebaba9f57153955f3f61a9b80a4f5cb959908f8b211b03b7026a8a82fc612bfedd3794969bcf458c4ce92be215a1176ab88d045331d144010400a5063000c5aaf34953c1aa3bfc95045b3aab9882b9a8027fecfe2142dc6b47ba8aca667399990244d513dd0504716908c17d92c65e74219e004f7b83fc125e575dd58efec3ab6dd22e3580106998523dea42ec75bf9aa111734c82df54630bebdff20fe981cfc36c76f865eb1c2fb62c9e85bc3a6e5015a361a2eb1c8431578d0011010001889f04280102000905025331d433021d03000a09104ef7e4beccde97f02e5503ff5e0630d1b65291f4882b6d40a29da4616bb5088717d469fbcc3648b8276de04a04988b1f1b9f3e18f52265c1f8b6c85861691c1a6b8a3a25a1809a0b32ad330aec5667cb4262f4450649184e8113849b05e5ad06a316ea80c001e8e71838190339a6e48bbde30647bcf245134b9a97fa875c1d83a9862cae87ffd7e2c4ce3a1b89013d04180102000905025331d144021b0200a809104ef7e4beccde97f09d2004190102000605025331d144000a0910677815e371c2fd23522203fe22ab62b8e7a151383cea3edd3a12995693911426f8ccf125e1f6426388c0010f88d9ca7da2224aee8d1c12135998640c5e1813d55a93df472faae75bef858457248db41b4505827590aeccf6f9eb646da7f980655dd3050c6897feddddaca90676dee856d66db8923477d251712bb9b3186b4d0114daf7d6b59272b53218dd1da94a03ff64006fcbe71211e5daecd9961fba66cdb6de3f914882c58ba5beddeba7dcb950c1156d7fba18c19ea880dccc800eae335deec34e3b84ac75ffa24864f782f87815cda1c0f634b3dd2fa67cea30811d21723d21d9551fa12ccbcfa62b6d3a15d01307b99925707992556d50065505b090aadb8579083a20fe65bd2a270da9b011"
+
+const missingCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+Charset: UTF-8
+
+mQENBFMYynYBCACVOZ3/e8Bm2b9KH9QyIlHGo/i1bnkpqsgXj8tpJ2MIUOnXMMAY
+ztW7kKFLCmgVdLIC0vSoLA4yhaLcMojznh/2CcUglZeb6Ao8Gtelr//Rd5DRfPpG
+zqcfUo+m+eO1co2Orabw0tZDfGpg5p3AYl0hmxhUyYSc/xUq93xL1UJzBFgYXY54
+QsM8dgeQgFseSk/YvdP5SMx1ev+eraUyiiUtWzWrWC1TdyRa5p4UZg6Rkoppf+WJ
+QrW6BWrhAtqATHc8ozV7uJjeONjUEq24roRc/OFZdmQQGK6yrzKnnbA6MdHhqpdo
+9kWDcXYb7pSE63Lc+OBa5X2GUVvXJLS/3nrtABEBAAG0F2ludmFsaWQtc2lnbmlu
+Zy1zdWJrZXlziQEoBBMBAgASBQJTnKB5AhsBAgsHAhUIAh4BAAoJEO3UDQUIHpI/
+dN4H/idX4FQ1LIZCnpHS/oxoWQWfpRgdKAEM0qCqjMgiipJeEwSQbqjTCynuh5/R
+JlODDz85ABR06aoF4l5ebGLQWFCYifPnJZ/Yf5OYcMGtb7dIbqxWVFL9iLMO/oDL
+ioI3dotjPui5e+2hI9pVH1UHB/bZ/GvMGo6Zg0XxLPolKQODMVjpjLAQ0YJ3spew
+RAmOGre6tIvbDsMBnm8qREt7a07cBJ6XK7xjxYaZHQBiHVxyEWDa6gyANONx8duW
+/fhQ/zDTnyVM/ik6VO0Ty9BhPpcEYLFwh5c1ilFari1ta3e6qKo6ZGa9YMk/REhu
+yBHd9nTkI+0CiQUmbckUiVjDKKe5AQ0EUxjKdgEIAJcXQeP+NmuciE99YcJoffxv
+2gVLU4ZXBNHEaP0mgaJ1+tmMD089vUQAcyGRvw8jfsNsVZQIOAuRxY94aHQhIRHR
+bUzBN28ofo/AJJtfx62C15xt6fDKRV6HXYqAiygrHIpEoRLyiN69iScUsjIJeyFL
+C8wa72e8pSL6dkHoaV1N9ZH/xmrJ+k0vsgkQaAh9CzYufncDxcwkoP+aOlGtX1gP
+WwWoIbz0JwLEMPHBWvDDXQcQPQTYQyj+LGC9U6f9VZHN25E94subM1MjuT9OhN9Y
+MLfWaaIc5WyhLFyQKW2Upofn9wSFi8ubyBnv640Dfd0rVmaWv7LNTZpoZ/GbJAMA
+EQEAAYkBHwQYAQIACQUCU5ygeQIbAgAKCRDt1A0FCB6SP0zCB/sEzaVR38vpx+OQ
+MMynCBJrakiqDmUZv9xtplY7zsHSQjpd6xGflbU2n+iX99Q+nav0ETQZifNUEd4N
+1ljDGQejcTyKD6Pkg6wBL3x9/RJye7Zszazm4+toJXZ8xJ3800+BtaPoI39akYJm
++ijzbskvN0v/j5GOFJwQO0pPRAFtdHqRs9Kf4YanxhedB4dIUblzlIJuKsxFit6N
+lgGRblagG3Vv2eBszbxzPbJjHCgVLR3RmrVezKOsZjr/2i7X+xLWIR0uD3IN1qOW
+CXQxLBizEEmSNVNxsp7KPGTLnqO3bPtqFirxS9PJLIMPTPLNBY7ZYuPNTMqVIUWF
+4artDmrG
+=7FfJ
+-----END PGP PUBLIC KEY BLOCK-----`
+
+const invalidCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQENBFMYynYBCACVOZ3/e8Bm2b9KH9QyIlHGo/i1bnkpqsgXj8tpJ2MIUOnXMMAY
+ztW7kKFLCmgVdLIC0vSoLA4yhaLcMojznh/2CcUglZeb6Ao8Gtelr//Rd5DRfPpG
+zqcfUo+m+eO1co2Orabw0tZDfGpg5p3AYl0hmxhUyYSc/xUq93xL1UJzBFgYXY54
+QsM8dgeQgFseSk/YvdP5SMx1ev+eraUyiiUtWzWrWC1TdyRa5p4UZg6Rkoppf+WJ
+QrW6BWrhAtqATHc8ozV7uJjeONjUEq24roRc/OFZdmQQGK6yrzKnnbA6MdHhqpdo
+9kWDcXYb7pSE63Lc+OBa5X2GUVvXJLS/3nrtABEBAAG0F2ludmFsaWQtc2lnbmlu
+Zy1zdWJrZXlziQEoBBMBAgASBQJTnKB5AhsBAgsHAhUIAh4BAAoJEO3UDQUIHpI/
+dN4H/idX4FQ1LIZCnpHS/oxoWQWfpRgdKAEM0qCqjMgiipJeEwSQbqjTCynuh5/R
+JlODDz85ABR06aoF4l5ebGLQWFCYifPnJZ/Yf5OYcMGtb7dIbqxWVFL9iLMO/oDL
+ioI3dotjPui5e+2hI9pVH1UHB/bZ/GvMGo6Zg0XxLPolKQODMVjpjLAQ0YJ3spew
+RAmOGre6tIvbDsMBnm8qREt7a07cBJ6XK7xjxYaZHQBiHVxyEWDa6gyANONx8duW
+/fhQ/zDTnyVM/ik6VO0Ty9BhPpcEYLFwh5c1ilFari1ta3e6qKo6ZGa9YMk/REhu
+yBHd9nTkI+0CiQUmbckUiVjDKKe5AQ0EUxjKdgEIAIINDqlj7X6jYKc6DjwrOkjQ
+UIRWbQQar0LwmNilehmt70g5DCL1SYm9q4LcgJJ2Nhxj0/5qqsYib50OSWMcKeEe
+iRXpXzv1ObpcQtI5ithp0gR53YPXBib80t3bUzomQ5UyZqAAHzMp3BKC54/vUrSK
+FeRaxDzNLrCeyI00+LHNUtwghAqHvdNcsIf8VRumK8oTm3RmDh0TyjASWYbrt9c8
+R1Um3zuoACOVy+mEIgIzsfHq0u7dwYwJB5+KeM7ZLx+HGIYdUYzHuUE1sLwVoELh
++SHIGHI1HDicOjzqgajShuIjj5hZTyQySVprrsLKiXS6NEwHAP20+XjayJ/R3tEA
+EQEAAYkCPgQYAQIBKAUCU5ygeQIbAsBdIAQZAQIABgUCU5ygeQAKCRCpVlnFZmhO
+52RJB/9uD1MSa0wjY6tHOIgquZcP3bHBvHmrHNMw9HR2wRCMO91ZkhrpdS3ZHtgb
+u3/55etj0FdvDo1tb8P8FGSVtO5Vcwf5APM8sbbqoi8L951Q3i7qt847lfhu6sMl
+w0LWFvPTOLHrliZHItPRjOltS1WAWfr2jUYhsU9ytaDAJmvf9DujxEOsN5G1YJep
+54JCKVCkM/y585Zcnn+yxk/XwqoNQ0/iJUT9qRrZWvoeasxhl1PQcwihCwss44A+
+YXaAt3hbk+6LEQuZoYS73yR3WHj+42tfm7YxRGeubXfgCEz/brETEWXMh4pe0vCL
+bfWrmfSPq2rDegYcAybxRQz0lF8PAAoJEO3UDQUIHpI/exkH/0vQfdHA8g/N4T6E
+i6b1CUVBAkvtdJpCATZjWPhXmShOw62gkDw306vHPilL4SCvEEi4KzG72zkp6VsB
+DSRcpxCwT4mHue+duiy53/aRMtSJ+vDfiV1Vhq+3sWAck/yUtfDU9/u4eFaiNok1
+8/Gd7reyuZt5CiJnpdPpjCwelK21l2w7sHAnJF55ITXdOxI8oG3BRKufz0z5lyDY
+s2tXYmhhQIggdgelN8LbcMhWs/PBbtUr6uZlNJG2lW1yscD4aI529VjwJlCeo745
+U7pO4eF05VViUJ2mmfoivL3tkhoTUWhx8xs8xCUcCg8DoEoSIhxtOmoTPR22Z9BL
+6LCg2mg=
+=Dhm4
+-----END PGP PUBLIC KEY BLOCK-----`
+
+const goodCrossSignatureKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mI0EVUqeVwEEAMufHRrMPWK3gyvi0O0tABCs/oON9zV9KDZlr1a1M91ShCSFwCPo
+7r80PxdWVWcj0V5h50/CJYtpN3eE/mUIgW2z1uDYQF1OzrQ8ubrksfsJvpAhENom
+lTQEppv9mV8qhcM278teb7TX0pgrUHLYF5CfPdp1L957JLLXoQR/lwLVABEBAAG0
+E2dvb2Qtc2lnbmluZy1zdWJrZXmIuAQTAQIAIgUCVUqeVwIbAwYLCQgHAwIGFQgC
+CQoLBBYCAwECHgECF4AACgkQNRjL95IRWP69XQQAlH6+eyXJN4DZTLX78KGjHrsw
+6FCvxxClEPtPUjcJy/1KCRQmtLAt9PbbA78dvgzjDeZMZqRAwdjyJhjyg/fkU2OH
+7wq4ktjUu+dLcOBb+BFMEY+YjKZhf6EJuVfxoTVr5f82XNPbYHfTho9/OABKH6kv
+X70PaKZhbwnwij8Nts65AaIEVUqftREEAJ3WxZfqAX0bTDbQPf2CMT2IVMGDfhK7
+GyubOZgDFFjwUJQvHNvsrbeGLZ0xOBumLINyPO1amIfTgJNm1iiWFWfmnHReGcDl
+y5mpYG60Mb79Whdcer7CMm3AqYh/dW4g6IB02NwZMKoUHo3PXmFLxMKXnWyJ0clw
+R0LI/Qn509yXAKDh1SO20rqrBM+EAP2c5bfI98kyNwQAi3buu94qo3RR1ZbvfxgW
+CKXDVm6N99jdZGNK7FbRifXqzJJDLcXZKLnstnC4Sd3uyfyf1uFhmDLIQRryn5m+
+LBYHfDBPN3kdm7bsZDDq9GbTHiFZUfm/tChVKXWxkhpAmHhU/tH6GGzNSMXuIWSO
+aOz3Rqq0ED4NXyNKjdF9MiwD/i83S0ZBc0LmJYt4Z10jtH2B6tYdqnAK29uQaadx
+yZCX2scE09UIm32/w7pV77CKr1Cp/4OzAXS1tmFzQ+bX7DR+Gl8t4wxr57VeEMvl
+BGw4Vjh3X8//m3xynxycQU18Q1zJ6PkiMyPw2owZ/nss3hpSRKFJsxMLhW3fKmKr
+Ey2KiOcEGAECAAkFAlVKn7UCGwIAUgkQNRjL95IRWP5HIAQZEQIABgUCVUqftQAK
+CRD98VjDN10SqkWrAKDTpEY8D8HC02E/KVC5YUI01B30wgCgurpILm20kXEDCeHp
+C5pygfXw1DJrhAP+NyPJ4um/bU1I+rXaHHJYroYJs8YSweiNcwiHDQn0Engh/mVZ
+SqLHvbKh2dL/RXymC3+rjPvQf5cup9bPxNMa6WagdYBNAfzWGtkVISeaQW+cTEp/
+MtgVijRGXR/lGLGETPg2X3Afwn9N9bLMBkBprKgbBqU7lpaoPupxT61bL70=
+=vtbN
+-----END PGP PUBLIC KEY BLOCK-----`
+
+const revokedUserIDKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQENBFsgO5EBCADhREPmcjsPkXe1z7ctvyWL0S7oa9JaoGZ9oPDHFDlQxd0qlX2e
+DZJZDg0qYvVixmaULIulApq1puEsaJCn3lHUbHlb4PYKwLEywYXM28JN91KtLsz/
+uaEX2KC5WqeP40utmzkNLq+oRX/xnRMgwbO7yUNVG2UlEa6eI+xOXO3YtLdmJMBW
+ClQ066ZnOIzEo1JxnIwha1CDBMWLLfOLrg6l8InUqaXbtEBbnaIYO6fXVXELUjkx
+nmk7t/QOk0tXCy8muH9UDqJkwDUESY2l79XwBAcx9riX8vY7vwC34pm22fAUVLCJ
+x1SJx0J8bkeNp38jKM2Zd9SUQqSbfBopQ4pPABEBAAG0I0dvbGFuZyBHb3BoZXIg
+PG5vLXJlcGx5QGdvbGFuZy5jb20+iQFUBBMBCgA+FiEE5Ik5JLcNx6l6rZfw1oFy
+9I6cUoMFAlsgO5ECGwMFCQPCZwAFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AACgkQ
+1oFy9I6cUoMIkwf8DNPeD23i4jRwd/pylbvxwZintZl1fSwTJW1xcOa1emXaEtX2
+depuqhP04fjlRQGfsYAQh7X9jOJxAHjTmhqFBi5sD7QvKU00cPFYbJ/JTx0B41bl
+aXnSbGhRPh63QtEZL7ACAs+shwvvojJqysx7kyVRu0EW2wqjXdHwR/SJO6nhNBa2
+DXzSiOU/SUA42mmG+5kjF8Aabq9wPwT9wjraHShEweNerNMmOqJExBOy3yFeyDpa
+XwEZFzBfOKoxFNkIaVf5GSdIUGhFECkGvBMB935khftmgR8APxdU4BE7XrXexFJU
+8RCuPXonm4WQOwTWR0vQg64pb2WKAzZ8HhwTGbQiR29sYW5nIEdvcGhlciA8cmV2
+b2tlZEBnb2xhbmcuY29tPokBNgQwAQoAIBYhBOSJOSS3Dcepeq2X8NaBcvSOnFKD
+BQJbIDv3Ah0AAAoJENaBcvSOnFKDfWMIAKhI/Tvu3h8fSUxp/gSAcduT6bC1JttG
+0lYQ5ilKB/58lBUA5CO3ZrKDKlzW3M8VEcvohVaqeTMKeoQd5rCZq8KxHn/KvN6N
+s85REfXfniCKfAbnGgVXX3kDmZ1g63pkxrFu0fDZjVDXC6vy+I0sGyI/Inro0Pzb
+tvn0QCsxjapKK15BtmSrpgHgzVqVg0cUp8vqZeKFxarYbYB2idtGRci4b9tObOK0
+BSTVFy26+I/mrFGaPrySYiy2Kz5NMEcRhjmTxJ8jSwEr2O2sUR0yjbgUAXbTxDVE
+/jg5fQZ1ACvBRQnB7LvMHcInbzjyeTM3FazkkSYQD6b97+dkWwb1iWG5AQ0EWyA7
+kQEIALkg04REDZo1JgdYV4x8HJKFS4xAYWbIva1ZPqvDNmZRUbQZR2+gpJGEwn7z
+VofGvnOYiGW56AS5j31SFf5kro1+1bZQ5iOONBng08OOo58/l1hRseIIVGB5TGSa
+PCdChKKHreJI6hS3mShxH6hdfFtiZuB45rwoaArMMsYcjaezLwKeLc396cpUwwcZ
+snLUNd1Xu5EWEF2OdFkZ2a1qYdxBvAYdQf4+1Nr+NRIx1u1NS9c8jp3PuMOkrQEi
+bNtc1v6v0Jy52mKLG4y7mC/erIkvkQBYJdxPaP7LZVaPYc3/xskcyijrJ/5ufoD8
+K71/ShtsZUXSQn9jlRaYR0EbojMAEQEAAYkBPAQYAQoAJhYhBOSJOSS3Dcepeq2X
+8NaBcvSOnFKDBQJbIDuRAhsMBQkDwmcAAAoJENaBcvSOnFKDkFMIAIt64bVZ8x7+
+TitH1bR4pgcNkaKmgKoZz6FXu80+SnbuEt2NnDyf1cLOSimSTILpwLIuv9Uft5Pb
+OraQbYt3xi9yrqdKqGLv80bxqK0NuryNkvh9yyx5WoG1iKqMj9/FjGghuPrRaT4l
+QinNAghGVkEy1+aXGFrG2DsOC1FFI51CC2WVTzZ5RwR2GpiNRfESsU1rZAUqf/2V
+yJl9bD5R4SUNy8oQmhOxi+gbhD4Ao34e4W0ilibslI/uawvCiOwlu5NGd8zv5n+U
+heiQvzkApQup5c+BhH5zFDFdKJ2CBByxw9+7QjMFI/wgLixKuE0Ob2kAokXf7RlB
+7qTZOahrETw=
+=IKnw
+-----END PGP PUBLIC KEY BLOCK-----`
+
+const keyWithFirstUserIDRevoked = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: OpenPGP.js v4.10.10
+Comment: https://openpgpjs.org
+
+xsBNBFsgO5EBCADhREPmcjsPkXe1z7ctvyWL0S7oa9JaoGZ9oPDHFDlQxd0q
+lX2eDZJZDg0qYvVixmaULIulApq1puEsaJCn3lHUbHlb4PYKwLEywYXM28JN
+91KtLsz/uaEX2KC5WqeP40utmzkNLq+oRX/xnRMgwbO7yUNVG2UlEa6eI+xO
+XO3YtLdmJMBWClQ066ZnOIzEo1JxnIwha1CDBMWLLfOLrg6l8InUqaXbtEBb
+naIYO6fXVXELUjkxnmk7t/QOk0tXCy8muH9UDqJkwDUESY2l79XwBAcx9riX
+8vY7vwC34pm22fAUVLCJx1SJx0J8bkeNp38jKM2Zd9SUQqSbfBopQ4pPABEB
+AAHNIkdvbGFuZyBHb3BoZXIgPHJldm9rZWRAZ29sYW5nLmNvbT7CwI0EMAEK
+ACAWIQTkiTkktw3HqXqtl/DWgXL0jpxSgwUCWyA79wIdAAAhCRDWgXL0jpxS
+gxYhBOSJOSS3Dcepeq2X8NaBcvSOnFKDfWMIAKhI/Tvu3h8fSUxp/gSAcduT
+6bC1JttG0lYQ5ilKB/58lBUA5CO3ZrKDKlzW3M8VEcvohVaqeTMKeoQd5rCZ
+q8KxHn/KvN6Ns85REfXfniCKfAbnGgVXX3kDmZ1g63pkxrFu0fDZjVDXC6vy
++I0sGyI/Inro0Pzbtvn0QCsxjapKK15BtmSrpgHgzVqVg0cUp8vqZeKFxarY
+bYB2idtGRci4b9tObOK0BSTVFy26+I/mrFGaPrySYiy2Kz5NMEcRhjmTxJ8j
+SwEr2O2sUR0yjbgUAXbTxDVE/jg5fQZ1ACvBRQnB7LvMHcInbzjyeTM3Fazk
+kSYQD6b97+dkWwb1iWHNI0dvbGFuZyBHb3BoZXIgPG5vLXJlcGx5QGdvbGFu
+Zy5jb20+wsCrBBMBCgA+FiEE5Ik5JLcNx6l6rZfw1oFy9I6cUoMFAlsgO5EC
+GwMFCQPCZwAFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AAIQkQ1oFy9I6cUoMW
+IQTkiTkktw3HqXqtl/DWgXL0jpxSgwiTB/wM094PbeLiNHB3+nKVu/HBmKe1
+mXV9LBMlbXFw5rV6ZdoS1fZ16m6qE/Th+OVFAZ+xgBCHtf2M4nEAeNOaGoUG
+LmwPtC8pTTRw8Vhsn8lPHQHjVuVpedJsaFE+HrdC0RkvsAICz6yHC++iMmrK
+zHuTJVG7QRbbCqNd0fBH9Ik7qeE0FrYNfNKI5T9JQDjaaYb7mSMXwBpur3A/
+BP3COtodKETB416s0yY6okTEE7LfIV7IOlpfARkXMF84qjEU2QhpV/kZJ0hQ
+aEUQKQa8EwH3fmSF+2aBHwA/F1TgETtetd7EUlTxEK49eiebhZA7BNZHS9CD
+rilvZYoDNnweHBMZzsBNBFsgO5EBCAC5INOERA2aNSYHWFeMfByShUuMQGFm
+yL2tWT6rwzZmUVG0GUdvoKSRhMJ+81aHxr5zmIhluegEuY99UhX+ZK6NftW2
+UOYjjjQZ4NPDjqOfP5dYUbHiCFRgeUxkmjwnQoSih63iSOoUt5kocR+oXXxb
+YmbgeOa8KGgKzDLGHI2nsy8Cni3N/enKVMMHGbJy1DXdV7uRFhBdjnRZGdmt
+amHcQbwGHUH+PtTa/jUSMdbtTUvXPI6dz7jDpK0BImzbXNb+r9CcudpiixuM
+u5gv3qyJL5EAWCXcT2j+y2VWj2HN/8bJHMoo6yf+bn6A/Cu9f0obbGVF0kJ/
+Y5UWmEdBG6IzABEBAAHCwJMEGAEKACYWIQTkiTkktw3HqXqtl/DWgXL0jpxS
+gwUCWyA7kQIbDAUJA8JnAAAhCRDWgXL0jpxSgxYhBOSJOSS3Dcepeq2X8NaB
+cvSOnFKDkFMIAIt64bVZ8x7+TitH1bR4pgcNkaKmgKoZz6FXu80+SnbuEt2N
+nDyf1cLOSimSTILpwLIuv9Uft5PbOraQbYt3xi9yrqdKqGLv80bxqK0NuryN
+kvh9yyx5WoG1iKqMj9/FjGghuPrRaT4lQinNAghGVkEy1+aXGFrG2DsOC1FF
+I51CC2WVTzZ5RwR2GpiNRfESsU1rZAUqf/2VyJl9bD5R4SUNy8oQmhOxi+gb
+hD4Ao34e4W0ilibslI/uawvCiOwlu5NGd8zv5n+UheiQvzkApQup5c+BhH5z
+FDFdKJ2CBByxw9+7QjMFI/wgLixKuE0Ob2kAokXf7RlB7qTZOahrETw=
+=+2T8
+-----END PGP PUBLIC KEY BLOCK-----
+`
+
+const keyWithOnlyUserIDRevoked = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mDMEYYwB7RYJKwYBBAHaRw8BAQdARimqhPPzyGAXmfQJjcqM1QVPzLtURJSzNVll
+JV4tEaW0KVJldm9rZWQgUHJpbWFyeSBVc2VyIElEIDxyZXZva2VkQGtleS5jb20+
+iHgEMBYIACAWIQSpyJZAXYqVEFkjyKutFcS0yeB0LQUCYYwCtgIdAAAKCRCtFcS0
+yeB0LbSsAQD8OYMaaBjrdzzpwIkP1stgmPd4/kzN/ZG28Ywl6a5F5QEA5Xg7aq4e
+/t6Fsb4F5iqB956kSPe6YJrikobD/tBbMwSIkAQTFggAOBYhBKnIlkBdipUQWSPI
+q60VxLTJ4HQtBQJhjAHtAhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEK0V
+xLTJ4HQtBaoBAPZL7luTCji+Tqhn7XNfFE/0QIahCt8k9wfO1cGlB3inAQDf8Tzw
+ZGR5fNluUcNoVxQT7bUSFStbaGo3k0BaOYPbCLg4BGGMAe0SCisGAQQBl1UBBQEB
+B0DLwSpveSrbIO/IVZD13yrs1XuB3FURZUnafGrRq7+jUAMBCAeIeAQYFggAIBYh
+BKnIlkBdipUQWSPIq60VxLTJ4HQtBQJhjAHtAhsMAAoJEK0VxLTJ4HQtZ1oA/j9u
+8+p3xTNzsmabTL6BkNbMeB/RUKCrlm6woM6AV+vxAQCcXTn3JC2sNoNrLoXuVzaA
+mcG3/TwG5GSQUUPkrDsGDA==
+=mFWy
+-----END PGP PUBLIC KEY BLOCK-----
+`
+
+const keyWithSubKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mI0EWyKwKQEEALwXhKBnyaaNFeK3ljfc/qn9X/QFw+28EUfgZPHjRmHubuXLE2uR
+s3ZoSXY2z7Dkv+NyHYMt8p+X8q5fR7JvUjK2XbPyKoiJVnHINll83yl67DaWfKNL
+EjNoO0kIfbXfCkZ7EG6DL+iKtuxniGTcnGT47e+HJSqb/STpLMnWwXjBABEBAAG0
+I0dvbGFuZyBHb3BoZXIgPG5vLXJlcGx5QGdvbGFuZy5jb20+iM4EEwEKADgWIQQ/
+lRafP/p9PytHbwxMvYJsOQdOOAUCWyKwKQIbAwULCQgHAwUVCgkICwUWAgMBAAIe
+AQIXgAAKCRBMvYJsOQdOOOsFBAC62mXww8XuqvYLcVOvHkWLT6mhxrQOJXnlfpn7
+2uBV9CMhoG/Ycd43NONsJrB95Apr9TDIqWnVszNbqPCuBhZQSGLdbiDKjxnCWBk0
+69qv4RNtkpOhYB7jK4s8F5oQZqId6JasT/PmJTH92mhBYhhTQr0GYFuPX2UJdkw9
+Sn9C67iNBFsisDUBBAC3A+Yo9lgCnxi/pfskyLrweYif6kIXWLAtLTsM6g/6jt7b
+wTrknuCPyTv0QKGXsAEe/cK/Xq3HvX9WfXPGIHc/X56ZIsHQ+RLowbZV/Lhok1IW
+FAuQm8axr/by80cRwFnzhfPc/ukkAq2Qyj4hLsGblu6mxeAhzcp8aqmWOO2H9QAR
+AQABiLYEKAEKACAWIQQ/lRafP/p9PytHbwxMvYJsOQdOOAUCWyK16gIdAAAKCRBM
+vYJsOQdOOB1vA/4u4uLONsE+2GVOyBsHyy7uTdkuxaR9b54A/cz6jT/tzUbeIzgx
+22neWhgvIEghnUZd0vEyK9k1wy5vbDlEo6nKzHso32N1QExGr5upRERAxweDxGOj
+7luDwNypI7QcifE64lS/JmlnunwRCdRWMKc0Fp+7jtRc5mpwyHN/Suf5RokBagQY
+AQoAIBYhBD+VFp8/+n0/K0dvDEy9gmw5B044BQJbIrA1AhsCAL8JEEy9gmw5B044
+tCAEGQEKAB0WIQSNdnkaWY6t62iX336UXbGvYdhXJwUCWyKwNQAKCRCUXbGvYdhX
+JxJSA/9fCPHP6sUtGF1o3G1a3yvOUDGr1JWcct9U+QpbCt1mZoNopCNDDQAJvDWl
+mvDgHfuogmgNJRjOMznvahbF+wpTXmB7LS0SK412gJzl1fFIpK4bgnhu0TwxNsO1
+8UkCZWqxRMgcNUn9z6XWONK8dgt5JNvHSHrwF4CxxwjL23AAtK+FA/UUoi3U4kbC
+0XnSr1Sl+mrzQi1+H7xyMe7zjqe+gGANtskqexHzwWPUJCPZ5qpIa2l8ghiUim6b
+4ymJ+N8/T8Yva1FaPEqfMzzqJr8McYFm0URioXJPvOAlRxdHPteZ0qUopt/Jawxl
+Xt6B9h1YpeLoJwjwsvbi98UTRs0jXwoY
+=3fWu
+-----END PGP PUBLIC KEY BLOCK-----`
+
+const keyWithSubKeyAndBadSelfSigOrder = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mI0EWyLLDQEEAOqIOpJ/ha1OYAGduu9tS3rBz5vyjbNgJO4sFveEM0mgsHQ0X9/L
+plonW+d0gRoO1dhJ8QICjDAc6+cna1DE3tEb5m6JtQ30teLZuqrR398Cf6w7NNVz
+r3lrlmnH9JaKRuXl7tZciwyovneBfZVCdtsRZjaLI1uMQCz/BToiYe3DABEBAAG0
+I0dvbGFuZyBHb3BoZXIgPG5vLXJlcGx5QGdvbGFuZy5jb20+iM4EEwEKADgWIQRZ
+sixZOfQcZdW0wUqmgmdsv1O9xgUCWyLLDQIbAwULCQgHAwUVCgkICwUWAgMBAAIe
+AQIXgAAKCRCmgmdsv1O9xql2A/4pix98NxjhdsXtazA9agpAKeADf9tG4Za27Gj+
+3DCww/E4iP2X35jZimSm/30QRB6j08uGCqd9vXkkJxtOt63y/IpVOtWX6vMWSTUm
+k8xKkaYMP0/IzKNJ1qC/qYEUYpwERBKg9Z+k99E2Ql4kRHdxXUHq6OzY79H18Y+s
+GdeM/riNBFsiyxsBBAC54Pxg/8ZWaZX1phGdwfe5mek27SOYpC0AxIDCSOdMeQ6G
+HPk38pywl1d+S+KmF/F4Tdi+kWro62O4eG2uc/T8JQuRDUhSjX0Qa51gPzJrUOVT
+CFyUkiZ/3ZDhtXkgfuso8ua2ChBgR9Ngr4v43tSqa9y6AK7v0qjxD1x+xMrjXQAR
+AQABiQFxBBgBCgAmAhsCFiEEWbIsWTn0HGXVtMFKpoJnbL9TvcYFAlsizTIFCQAN
+MRcAv7QgBBkBCgAdFiEEJcoVUVJIk5RWj1c/o62jUpRPICQFAlsiyxsACgkQo62j
+UpRPICQq5gQApoWIigZxXFoM0uw4uJBS5JFZtirTANvirZV5RhndwHeMN6JttaBS
+YnjyA4+n1D+zB2VqliD2QrsX12KJN6rGOehCtEIClQ1Hodo9nC6kMzzAwW1O8bZs
+nRJmXV+bsvD4sidLZLjdwOVa3Cxh6pvq4Uur6a7/UYx121hEY0Qx0s8JEKaCZ2y/
+U73GGi0D/i20VW8AWYAPACm2zMlzExKTOAV01YTQH/3vW0WLrOse53WcIVZga6es
+HuO4So0SOEAvxKMe5HpRIu2dJxTvd99Bo9xk9xJU0AoFrO0vNCRnL+5y68xMlODK
+lEw5/kl0jeaTBp6xX0HDQOEVOpPGUwWV4Ij2EnvfNDXaE1vK1kffiQFrBBgBCgAg
+AhsCFiEEWbIsWTn0HGXVtMFKpoJnbL9TvcYFAlsi0AYAv7QgBBkBCgAdFiEEJcoV
+UVJIk5RWj1c/o62jUpRPICQFAlsiyxsACgkQo62jUpRPICQq5gQApoWIigZxXFoM
+0uw4uJBS5JFZtirTANvirZV5RhndwHeMN6JttaBSYnjyA4+n1D+zB2VqliD2QrsX
+12KJN6rGOehCtEIClQ1Hodo9nC6kMzzAwW1O8bZsnRJmXV+bsvD4sidLZLjdwOVa
+3Cxh6pvq4Uur6a7/UYx121hEY0Qx0s8JEKaCZ2y/U73GRl0EAJokkXmy4zKDHWWi
+wvK9gi2gQgRkVnu2AiONxJb5vjeLhM/07BRmH6K1o+w3fOeEQp4FjXj1eQ5fPSM6
+Hhwx2CTl9SDnPSBMiKXsEFRkmwQ2AAsQZLmQZvKBkLZYeBiwf+IY621eYDhZfo+G
+1dh1WoUCyREZsJQg2YoIpWIcvw+a
+=bNRo
+-----END PGP PUBLIC KEY BLOCK-----
+`
+
+const onlySubkeyNoPrivateKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v1
+
+lQCVBFggvocBBAC7vBsHn7MKmS6IiiZNTXdciplVgS9cqVd+RTdIAoyNTcsiV1H0
+GQ3QtodOPeDlQDNoqinqaobd7R9g3m3hS53Nor7yBZkCWQ5x9v9JxRtoAq0sklh1
+I1X2zEqZk2l6YrfBF/64zWrhjnW3j23szkrAIVu0faQXbQ4z56tmZrw11wARAQAB
+/gdlAkdOVQG0CUdOVSBEdW1teYi4BBMBAgAiBQJYIL6HAhsDBgsJCAcDAgYVCAIJ
+CgsEFgIDAQIeAQIXgAAKCRCd1xxWp1CYAnjGA/9synn6ZXJUKAXQzySgmCZvCIbl
+rqBfEpxwLG4Q/lONhm5vthAE0z49I8hj5Gc5e2tLYUtq0o0OCRdCrYHa/efOYWpJ
+6RsK99bePOisVzmOABLIgZkcr022kHoMCmkPgv9CUGKP1yqbGl+zzAwQfUjRUmvD
+ZIcWLHi2ge4GzPMPi50B2ARYIL6cAQQAxWHnicKejAFcFcF1/3gUSgSH7eiwuBPX
+M7vDdgGzlve1o1jbV4tzrjN9jsCl6r0nJPDMfBSzgLr1auNTRG6HpJ4abcOx86ED
+Ad+avDcQPZb7z3dPhH/gb2lQejZsHh7bbeOS8WMSzHV3RqCLd8J/xwWPNR5zKn1f
+yp4IGfopidMAEQEAAQAD+wQOelnR82+dxyM2IFmZdOB9wSXQeCVOvxSaNMh6Y3lk
+UOOkO8Nlic4x0ungQRvjoRs4wBmCuwFK/MII6jKui0B7dn/NDf51i7rGdNGuJXDH
+e676By1sEY/NGkc74jr74T+5GWNU64W0vkpfgVmjSAzsUtpmhJMXsc7beBhJdnVl
+AgDKCb8hZqj1alcdmLoNvb7ibA3K/V8J462CPD7bMySPBa/uayoFhNxibpoXml2r
+oOtHa5izF3b0/9JY97F6rqkdAgD6GdTJ+xmlCoz1Sewoif1I6krq6xoa7gOYpIXo
+UL1Afr+LiJeyAnF/M34j/kjIVmPanZJjry0kkjHE5ILjH3uvAf4/6n9np+Th8ujS
+YDCIzKwR7639+H+qccOaddCep8Y6KGUMVdD/vTKEx1rMtK+hK/CDkkkxnFslifMJ
+kqoqv3WUqCWJAT0EGAECAAkFAlggvpwCGwIAqAkQndccVqdQmAKdIAQZAQIABgUC
+WCC+nAAKCRDmGUholQPwvQk+A/9latnSsR5s5/1A9TFki11GzSEnfLbx46FYOdkW
+n3YBxZoPQGxNA1vIn8GmouxZInw9CF4jdOJxEdzLlYQJ9YLTLtN5tQEMl/19/bR8
+/qLacAZ9IOezYRWxxZsyn6//jfl7A0Y+FV59d4YajKkEfItcIIlgVBSW6T+TNQT3
+R+EH5HJ/A/4/AN0CmBhhE2vGzTnVU0VPrE4V64pjn1rufFdclgpixNZCuuqpKpoE
+VVHn6mnBf4njKjZrAGPs5kfQ+H4NsM7v3Zz4yV6deu9FZc4O6E+V1WJ38rO8eBix
+7G2jko106CC6vtxsCPVIzY7aaG3H5pjRtomw+pX7SzrQ7FUg2PGumg==
+=F/T0
+-----END PGP PRIVATE KEY BLOCK-----`
+
+const ecdsaPrivateKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+
+xaUEX1KsSRMIKoZIzj0DAQcCAwTpYqJsnJiFhKKh+8TulWD+lVmerBFNS+Ii
+B+nlG3T0xQQ4Sy5eIjJ0CExIQQzi3EElF/Z2l4F3WC5taFA11NgA/gkDCHSS
+PThf1M2K4LN8F1MRcvR+sb7i0nH55ojkwuVB1DE6jqIT9m9i+mX1tzjSAS+6
+lPQiweCJvG7xTC7Hs3AzRapf/r1At4TB+v+5G2/CKynNFEJpbGwgPGJpbGxA
+aG9tZS5jb20+wncEEBMIAB8FAl9SrEkGCwkHCAMCBBUICgIDFgIBAhkBAhsD
+Ah4BAAoJEMpwT3+q3+xqw5UBAMebZN9isEZ1ML+R/jWAAWMwa/knMugrEZ1v
+Bl9+ZwM0AQCZdf80/wYY4Nve01qSRFv8OmKswLli3TvDv6FKc4cLz8epBF9S
+rEkSCCqGSM49AwEHAgMEAjKnT9b5wY2bf9TpAV3d7OUfPOxKj9c4VzeVzSrH
+AtQgo/MuI1cdYVURicV4i76DNjFhQHQFTk7BrC+C2u1yqQMBCAf+CQMIHImA
+iYfzQtjgQWSFZYUkCFpbbwhNF0ch+3HNaZkaHCnZRIsWsRnc6FCb6lRQyK9+
+Dq59kHlduE5QgY40894jfmP2JdJHU6nBdYrivbEdbMJhBBgTCAAJBQJfUqxJ
+AhsMAAoJEMpwT3+q3+xqUI0BAMykhV08kQ4Ip9Qlbss6Jdufv7YrU0Vd5hou
+b5TmiPd0APoDBh3qIic+aLLUcAuG3+Gt1P1AbUlmqV61ozn1WfHxfw==
+=KLN8
+-----END PGP PRIVATE KEY BLOCK-----`
+
+const dsaPrivateKeyWithElGamalSubkey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+
+lQOBBF9/MLsRCACeaF6BI0jTgDAs86t8/kXPfwlPvR2MCYzB0BCqAdcq1hV/GTYd
+oNmJRna/ZJfsI/vf+d8Nv+EYOQkPheFS1MJVBitkAXjQPgm8i1tQWen1FCWZxqGk
+/vwZYF4yo8GhZ+Wxi3w09W9Cp9QM/CTmyE1Xe7wpPBGe+oD+me8Zxjyt8JBS4Qx+
+gvWbfHxfHnggh4pz7U8QkItlLsBNQEdX4R5+zwRN66g2ZSX/shaa/EkVnihUhD7r
+njP9I51ORWucTQD6OvgooaNQZCkQ/Se9TzdakwWKS2XSIFXiY/e2E5ZgKI/pfKDU
+iA/KessxddPb7nP/05OIJqg9AoDrD4vmehLzAQD+zsUS3LDU1m9/cG4LMsQbT2VK
+Te4HqbGIAle+eu/asQf8DDJMrbZpiJZvADum9j0TJ0oep6VdMbzo9RSDKvlLKT9m
+kG63H8oDWnCZm1a+HmGq9YIX+JHWmsLXXsFLeEouLzHO+mZo0X28eji3V2T87hyR
+MmUM0wFo4k7jK8uVmkDXv3XwNp2uByWxUKZd7EnWmcEZWqIiexJ7XpCS0Pg3tRaI
+zxve0SRe/dxfUPnTk/9KQ9hS6DWroBKquL182zx1Fggh4LIWWE2zq+UYn8BI0E8A
+rmIDFJdF8ymFQGRrEy6g79NnkPmkrZWsgMRYY65P6v4zLVmqohJKkpm3/Uxa6QAP
+CCoPh/JTOvPeCP2bOJH8z4Z9Py3ouMIjofQW8sXqRgf/RIHbh0KsINHrwwZ4gVIr
+MK3RofpaYxw1ztPIWb4cMWoWZHH1Pxh7ggTGSBpAhKXkiWw2Rxat8QF5aA7e962c
+bLvVv8dqsPrD/RnVJHag89cbPTzjn7gY9elE8EM8ithV3oQkwHTr4avYlpDZsgNd
+hUW3YgRwGo31tdzxoG04AcpV2t+07P8XMPr9hsfWs4rHohXPi38Hseu1Ji+dBoWQ
+3+1w/HH3o55s+jy4Ruaz78AIrjbmAJq+6rA2mIcCgrhw3DnzuwQAKeBvSeqn9zfS
+ZC812osMBVmkycwelpaIh64WZ0vWL3GvdXDctV2kXM+qVpDTLEny0LuiXxrwCKQL
+Ev4HAwK9uQBcreDEEud7pfRb8EYP5lzO2ZA7RaIvje6EWAGBvJGMRT0QQE5SGqc7
+Fw5geigBdt+vVyRuNNhg3c2fdn/OBQaYu0J/8AiOogG8EaM8tCFlbGdhbWFsQGRz
+YS5jb20gPGVsZ2FtYWxAZHNhLmNvbT6IkAQTEQgAOBYhBI+gnfiHQxB35/Dp0XAQ
+aE/rsWC5BQJffzC7AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEHAQaE/r
+sWC5A4EA/0GcJmyPtN+Klc7b9sVT3JgKTRnB/URxOJfYJofP0hZLAQCkqyMO+adV
+JvbgDH0zaITQWZSSXPqpgMpCA6juTrDsd50CawRffzC7EAgAxFFFSAAEQzWTgKU5
+EBtpxxoPzHqcChawTHRxHxjcELXzmUBS5PzfA1HXSPnNqK/x3Ut5ycC3CsW41Fnt
+Gm3706Wu9VFbFZVn55F9lPiplUo61n5pqMvOr1gmuQsdXiTa0t5FRa4TZ2VSiHFw
+vdAVSPTUsT4ZxJ1rPyFYRtq1n3pQcvdZowd07r0JnzTMjLLMFYCKhwIowoOC4zqJ
+iB8enjwOlpaqBATRm9xpVF7SJkroPF6/B1vdhj7E3c1aJyHlo0PYBAg756sSHWHg
+UuLyUQ4TA0hcCVenn/L/aSY2LnbdZB1EBhlYjA7dTCgwIqsQhfQmPkjz6g64A7+Y
+HbbrLwADBQgAk14QIEQ+J/VHetpQV/jt2pNsFK1kVK7mXK0spTExaC2yj2sXlHjL
+Ie3bO5T/KqmIaBEB5db5fA5xK9cZt79qrQHDKsEqUetUeMUWLBx77zBsus3grIgy
+bwDZKseRzQ715pwxquxQlScGoDIBKEh08HpwHkq140eIj3w+MAIfndaZaSCNaxaP
+Snky7BQmJ7Wc7qrIwoQP6yrnUqyW2yNi81nJYUhxjChqaFSlwzLs/iNGryBKo0ic
+BqVIRjikKHBlwBng6WyrltQo/Vt9GG8w+lqaAVXbJRlaBZJUR+2NKi/YhP3qQse3
+v8fi4kns0gh5LK+2C01RvdX4T49QSExuIf4HAwLJqYIGwadA2uem5v7/765ZtFWV
+oL0iZ0ueTJDby4wTFDpLVzzDi/uVcB0ZRFrGOp7w6OYcNYTtV8n3xmli2Q5Trw0c
+wZVzvg+ABKWiv7faBjMczIFF8y6WZKOIeAQYEQgAIBYhBI+gnfiHQxB35/Dp0XAQ
+aE/rsWC5BQJffzC7AhsMAAoJEHAQaE/rsWC5ZmIA/jhS4r4lClbvjuPWt0Yqdn7R
+fss2SPMYvMrrDh42aE0OAQD8xn4G6CN8UtW9xihXOY6FpxiJ/sMc2VaneeUd34oa
+4g==
+=XZm8
+-----END PGP PRIVATE KEY BLOCK-----`
+
+// https://tests.sequoia-pgp.org/#Certificate_expiration
+// P _ U p
+const expiringPrimaryUIDKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+xsDNBF2lnPIBDAC5cL9PQoQLTMuhjbYvb4Ncuuo0bfmgPRFywX53jPhoFf4Zg6mv
+/seOXpgecTdOcVttfzC8ycIKrt3aQTiwOG/ctaR4Bk/t6ayNFfdUNxHWk4WCKzdz
+/56fW2O0F23qIRd8UUJp5IIlN4RDdRCtdhVQIAuzvp2oVy/LaS2kxQoKvph/5pQ/
+5whqsyroEWDJoSV0yOb25B/iwk/pLUFoyhDG9bj0kIzDxrEqW+7Ba8nocQlecMF3
+X5KMN5kp2zraLv9dlBBpWW43XktjcCZgMy20SouraVma8Je/ECwUWYUiAZxLIlMv
+9CurEOtxUw6N3RdOtLmYZS9uEnn5y1UkF88o8Nku890uk6BrewFzJyLAx5wRZ4F0
+qV/yq36UWQ0JB/AUGhHVPdFf6pl6eaxBwT5GXvbBUibtf8YI2og5RsgTWtXfU7eb
+SGXrl5ZMpbA6mbfhd0R8aPxWfmDWiIOhBufhMCvUHh1sApMKVZnvIff9/0Dca3wb
+vLIwa3T4CyshfT0AEQEAAc0hQm9iIEJhYmJhZ2UgPGJvYkBvcGVucGdwLmV4YW1w
+bGU+wsFcBBMBCgCQBYJhesp/BYkEWQPJBQsJCAcCCRD7/MgqAV5zMEcUAAAAAAAe
+ACBzYWx0QG5vdGF0aW9ucy5zZXF1b2lhLXBncC5vcmeEOQlNyTLFkc9I/elp+BpY
+495V7KatqtDmsyDr+zDAdwYVCgkICwIEFgIDAQIXgAIbAwIeARYhBNGmbhojsYLJ
+mA94jPv8yCoBXnMwAABSCQv/av8hKyynMtXVKFuWOGJw0mR8auDm84WdhMFRZg8t
+yTJ1L88+Ny4WUAFeqo2j7DU2yPGrm5rmuvzlEedFYFeOWt+A4adz+oumgRd0nsgG
+Lf3QYUWQhLWVlz+H7zubgKqSB2A2RqV65S7mTTVro42nb2Mng6rvGWiqeKG5nrXN
+/01p1mIBQGR/KnZSqYLzA2Pw2PiJoSkXT26PDz/kiEMXpjKMR6sicV4bKVlEdUvm
+pIImIPBHZq1EsKXEyWtWC41w/pc+FofGE+uSFs2aef1vvEHFkj3BHSK8gRcH3kfR
+eFroTET8C2q9V1AOELWm+Ys6PzGzF72URK1MKXlThuL4t4LjvXWGNA78IKW+/RQH
+DzK4U0jqSO0mL6qxqVS5Ij6jjL6OTrVEGdtDf5n0vI8tcUTBKtVqYAYk+t2YGT05
+ayxALtb7viVKo8f10WEcCuKshn0gdsEFMRZQzJ89uQIY3R3FbsdRCaE6OEaDgKMQ
+UTFROyfhthgzRKbRxfcplMUCzsDNBF2lnPIBDADWML9cbGMrp12CtF9b2P6z9TTT
+74S8iyBOzaSvdGDQY/sUtZXRg21HWamXnn9sSXvIDEINOQ6A9QxdxoqWdCHrOuW3
+ofneYXoG+zeKc4dC86wa1TR2q9vW+RMXSO4uImA+Uzula/6k1DogDf28qhCxMwG/
+i/m9g1c/0aApuDyKdQ1PXsHHNlgd/Dn6rrd5y2AObaifV7wIhEJnvqgFXDN2RXGj
+LeCOHV4Q2WTYPg/S4k1nMXVDwZXrvIsA0YwIMgIT86Rafp1qKlgPNbiIlC1g9RY/
+iFaGN2b4Ir6GDohBQSfZW2+LXoPZuVE/wGlQ01rh827KVZW4lXvqsge+wtnWlszc
+selGATyzqOK9LdHPdZGzROZYI2e8c+paLNDdVPL6vdRBUnkCaEkOtl1mr2JpQi5n
+TU+gTX4IeInC7E+1a9UDF/Y85ybUz8XV8rUnR76UqVC7KidNepdHbZjjXCt8/Zo+
+Tec9JNbYNQB/e9ExmDntmlHEsSEQzFwzj8sxH48AEQEAAcLA9gQYAQoAIBYhBNGm
+bhojsYLJmA94jPv8yCoBXnMwBQJdpZzyAhsMAAoJEPv8yCoBXnMw6f8L/26C34dk
+jBffTzMj5Bdzm8MtF67OYneJ4TQMw7+41IL4rVcSKhIhk/3Ud5knaRtP2ef1+5F6
+6h9/RPQOJ5+tvBwhBAcUWSupKnUrdVaZQanYmtSxcVV2PL9+QEiNN3tzluhaWO//
+rACxJ+K/ZXQlIzwQVTpNhfGzAaMVV9zpf3u0k14itcv6alKY8+rLZvO1wIIeRZLm
+U0tZDD5HtWDvUV7rIFI1WuoLb+KZgbYn3OWjCPHVdTrdZ2CqnZbG3SXw6awH9bzR
+LV9EXkbhIMez0deCVdeo+wFFklh8/5VK2b0vk/+wqMJxfpa1lHvJLobzOP9fvrsw
+sr92MA2+k901WeISR7qEzcI0Fdg8AyFAExaEK6VyjP7SXGLwvfisw34OxuZr3qmx
+1Sufu4toH3XrB7QJN8XyqqbsGxUCBqWif9RSK4xjzRTe56iPeiSJJOIciMP9i2ld
+I+KgLycyeDvGoBj0HCLO3gVaBe4ubVrj5KjhX2PVNEJd3XZRzaXZE2aAMQ==
+=AmgT
+-----END PGP PUBLIC KEY BLOCK-----`
+
+const rsa2048PrivateKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+Comment: gpg (GnuPG) 2.2.27 with libgcrypt 1.9.4
+
+lQPGBGL07P0BCADL0etN8efyAXA6sL2WfQvHe5wEKYXPWeN2+jiqSppfeRZAOlzP
+kZ3U+cloeJriplYvVJwI3ID2aw52Z/TRn8iKRP5eOUFrEgcgl06lazLtOndK7o7p
+oBV5mLtHEirFHm6W61fNt10jzM0jx0PV6nseLhFB2J42F1cmU/aBgFo41wjLSZYr
+owR+v+O9S5sUXblQF6sEDcY01sBEu09zrIgT49VFwQ1Cvdh9XZEOTQBfdiugoj5a
+DS3fAqAka3r1VoQK4eR7/upnYSgSACGeaQ4pUelKku5rpm50gdWTY8ppq0k9e1eT
+y2x0OQcW3hWE+j4os1ca0ZEADMdqr/99MOxrABEBAAH+BwMCJWxU4VOZOJ7/I6vX
+FxdfBhIBEXlJ52FM3S/oYtXqLhkGyrtmZOeEazVvUtuCe3M3ScHI8xCthcmE8E0j
+bi+ZEHPS2NiBZtgHFF27BLn7zZuTc+oD5WKduZdK3463egnyThTqIIMl25WZBuab
+k5ycwYrWwBH0jfA4gwJ13ai4pufKC2RM8qIu6YAVPglYBKFLKGvvJHa5vI+LuA0E
+K+k35hIic7yVUcQneNnAF2598X5yWiieYnOZpmHlRw1zfbMwOJr3ZNj2v94u7b+L
+sTa/1Uv9887Vb6sJp0c2Sh4cwEccoPYkvMqFn3ZrJUr3UdDu1K2vWohPtswzhrYV
++RdPZE5RLoCQufKvlPezk0Pzhzb3bBU7XjUbdGY1nH/EyQeBNp+Gw6qldKvzcBaB
+cyOK1c6hPSszpJX93m5UxCN55IeifmcNjmbDh8vGCCdajy6d56qV2n4F3k7vt1J1
+0UlxIGhqijJoaTCX66xjLMC6VXkSz6aHQ35rnXosm/cqPcQshsZTdlfSyWkorfdr
+4Hj8viBER26mjYurTMLBKDtUN724ZrR0Ev5jorX9uoKlgl87bDZHty2Ku2S+vR68
+VAvnj6Fi1BYNclnDoqxdRB2z5T9JbWE52HuG83/QsplhEqXxESDxriTyTHMbNxEe
+88soVCDh4tgflZFa2ucUr6gEKJKij7jgahARnyaXfPZlQBUAS1YUeILYmN+VR+M/
+sHENpwDWc7TInn8VN638nJV+ScZGMih3AwWZTIoiLju3MMt1K0YZ3NuiqwGH4Jwg
+/BbEdTWeCci9y3NEQHQ3uZZ5p6j2CwFVlK11idemCMvAiTVxF+gKdaLMkeCwKxru
+J3YzhKEo+iDVYbPYBYizx/EHBn2U5kITQ5SBXzjTaaFMNZJEf9JYsL1ybPB6HOFY
+VNVB2KT8CGVwtCJHb2xhbmcgR29waGVyIDxnb2xhbmdAZXhhbXBsZS5vcmc+iQFO
+BBMBCgA4FiEEC6K7U7f4qesybTnqSkra7gHusm0FAmL07P0CGwMFCwkIBwIGFQoJ
+CAsCBBYCAwECHgECF4AACgkQSkra7gHusm1MvwgAxpClWkeSqIhMQfbiuz0+lOkE
+89y1DCFw8bHjZoUf4/4K8hFA3dGkk+q72XFgiyaCpfXxMt6Gi+dN47t+tTv9NIqC
+sukbaoJBmJDhN6+djmJOgOYy+FWsW2LAk2LOwKYulpnBZdcA5rlMAhBg7gevQpF+
+ruSU69P7UUaFJl/DC7hDmaIcj+4cjBE/HO26SnVQjoTfjZT82rDh1Wsuf8LnkJUk
+b3wezBLpXKjDvdHikdv4gdlR4AputVM38aZntYYglh/EASo5TneyZ7ZscdLNRdcF
+r5O2fKqrOJLOdaoYRFZZWOvP5GtEVFDU7WGivOSVfiszBE0wZR3dgZRJipHCXJ0D
+xgRi9Oz9AQgAtMJcJqLLVANJHl90tWuoizDkm+Imcwq2ubQAjpclnNrODnDK+7o4
+pBsWmXbZSdkC4gY+LhOQA6bPDD0JEHM58DOnrm49BddxXAyK0HPsk4sGGt2SS86B
+OawWNdfJVyqw4bAiHWDmQg4PcjBbt3ocOIxAR6I5kBSiQVxuGQs9T+Zvg3G1r3Or
+fS6DzlgY3HFUML5YsGH4lOxNSOoKAP68GIH/WNdUZ+feiRg9knIib6I3Hgtf5eO8
+JRH7aWE/TD7eNu36bLLjT5TZPq5r6xaD2plbtPOyXbNPWs9qI1yG+VnErfaLY0w8
+Qo0aqzbgID+CTZVomXSOpOcQseaFKw8ZfQARAQAB/gcDArha6+/+d4OY/w9N32K9
+hFNYt4LufTETMQ+k/sBeaMuAVzmT47DlAXzkrZhGW4dZOtXMu1rXaUwHlqkhEyzL
+L4MYEWVXfD+LbZNEK3MEFss6RK+UAMeT/PTV9aA8cXQVPcSJYzfBXHQ1U1hnOgrO
+apn92MN8RmkhX8wJLyeWTMMuP4lXByJMmmGo8WvifeRD2kFY4y0WVBDAXJAV4Ljf
+Di/bBiwoc5a+gxHuZT2W9ZSxBQJNXdt4Un2IlyZuo58s5MLx2N0EaNJ8PwRUE6fM
+RZYO8aZCEPUtINE4njbvsWOMCtrblsMPwZ1B0SiIaWmLaNyGdCNKea+fCIW7kasC
+JYMhnLumpUTXg5HNexkCsl7ABWj0PYBflOE61h8EjWpnQ7JBBVKS2ua4lMjwHRX7
+5o5yxym9k5UZNFdGoXVL7xpizCcdGawxTJvwhs3vBqu1ZWYCegOAZWDrOkCyhUpq
+8uKMROZFbn+FwE+7tjt+v2ed62FVEvD6g4V3ThCA6mQqeOARfJWN8GZY8BDm8lht
+crOXriUkrx+FlrgGtm2CkwjW5/9Xd7AhFpHnQdFeozOHyq1asNSgJF9sNi9Lz94W
+skQSVRi0IExxSXYGI3Y0nnAZUe2BAQflYPJdEveSr3sKlUqXiETTA1VXsTPK3kOC
+92CbLzj/Hz199jZvywwyu53I+GKMpF42rMq7zxr2oa61YWY4YE/GDezwwys/wLx/
+QpCW4X3ppI7wJjCSSqEV0baYZSSli1ayheS6dxi8QnSpX1Bmpz6gU7m/M9Sns+hl
+J7ZvgpjCAiV7KJTjtclr5/S02zP78LTVkoTWoz/6MOTROwaP63VBUXX8pbJhf/vu
+DLmNnDk8joMJxoDXWeNU0EnNl4hP7Z/jExRBOEO4oAnUf/Sf6gCWQhL5qcajtg6w
+tGv7vx3f2IkBNgQYAQoAIBYhBAuiu1O3+KnrMm056kpK2u4B7rJtBQJi9Oz9AhsM
+AAoJEEpK2u4B7rJt6lgIAMBWqP4BCOGnQXBbgJ0+ACVghpkFUXZTb/tXJc8UUvTM
+8uov6k/RsqDGZrvhhufD7Wwt7j9v7dD7VPp7bPyjVWyimglQzWguTUUqLDGlstYH
+5uYv1pzma0ZsAGNqFeGlTLsKOSGKFMH4rB2KfN2n51L8POvtp1y7GKZQbWIWneaB
+cZr3BINU5GMvYYU7pAYcoR+mJPdJx5Up3Ocn+bn8Tu1sy9C/ArtCQucazGnoE9u1
+HhNLrh0CdzzX7TNH6TQ8LwPOvq0K5l/WqbN9lE0WBBhMv2HydxhluO8AhU+A5GqC
+C+wET7nVDnhoOm/fstIeb7/LN7OYejKPeHdFBJEL9GA=
+=u442
+-----END PGP PRIVATE KEY BLOCK-----`
+
+const curve25519PrivateKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+Comment: gpg (GnuPG) 2.2.27 with libgcrypt 1.9.4
+
+lFgEYvTtQBYJKwYBBAHaRw8BAQdAxsNXLbrk5xOjpO24VhOMvQ0/F+JcyIkckMDH
+X3FIGxcAAQDFOlunZWYuPsCx5JLp78vKqUTfgef9TGG4oD6I/Sa0zBMstCJHb2xh
+bmcgR29waGVyIDxnb2xhbmdAZXhhbXBsZS5vcmc+iJAEExYIADgWIQSFQHEOazmo
+h1ldII4MvfnLQ4JBNwUCYvTtQAIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAK
+CRAMvfnLQ4JBN5yeAQCKdry8B5ScCPrev2+UByMCss7Sdu5RhomCFsHdNPLcKAEA
+8ugei+1owHsV+3cGwWWzKk6sLa8ZN87i3SKuOGp9DQycXQRi9O1AEgorBgEEAZdV
+AQUBAQdA5CubPp8l7lrVQ25h7Hx5XN2C8xanRnnpcjzEooCaEA0DAQgHAAD/Rpc+
+sOZUXrFk9HOWB1XU41LoWbDBoG8sP8RWAVYwD5AQRYh4BBgWCAAgFiEEhUBxDms5
+qIdZXSCODL35y0OCQTcFAmL07UACGwwACgkQDL35y0OCQTcvdwEA7lb5g/YisrEf
+iq660uwMGoepLUfvtqKzuQ6heYe83y0BAN65Ffg5HYOJzUEi0kZQRf7OhdtuL2kJ
+SRXn8DmCTfEB
+=cELM
+-----END PGP PRIVATE KEY BLOCK-----`
+
+const curve448PrivateKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+Comment: C1DB 65D5 80D7 B922 7254 4B1E A699 9895 FABA CE52
+
+xYUEYV2UmRYDK2VxAc9AFyxgh5xnSbyt50TWl558mw9xdMN+/UBLr5+UMP8IsrvV
+MdXuTIE8CyaUQKSotHtH2RkYEXj5nsMAAAHPQIbTMSzjIWug8UFECzAex5FHgAgH
+gYF3RK+TS8D24wX8kOu2C/NoVxwGY+p+i0JHaB+7yljriSKAGxs6wsBEBB8WCgCD
+BYJhXZSZBYkFpI+9AwsJBwkQppmYlfq6zlJHFAAAAAAAHgAgc2FsdEBub3RhdGlv
+bnMuc2VxdW9pYS1wZ3Aub3Jn5wSpIutJ5HncJWk4ruUV8GzQF390rR5+qWEAnAoY
+akcDFQoIApsBAh4BFiEEwdtl1YDXuSJyVEseppmYlfq6zlIAALzdA5dA/fsgYg/J
+qaQriYKaPUkyHL7EB3BXhV2d1h/gk+qJLvXQuU2WEJ/XSs3GrsBRiiZwvPH4o+7b
+mleAxjy5wpS523vqrrBR2YZ5FwIku7WS4litSdn4AtVam/TlLdMNIf41CtFeZKBe
+c5R5VNdQy8y7qy8AAADNEUN1cnZlNDQ4IE9wdGlvbiA4wsBHBBMWCgCGBYJhXZSZ
+BYkFpI+9AwsJBwkQppmYlfq6zlJHFAAAAAAAHgAgc2FsdEBub3RhdGlvbnMuc2Vx
+dW9pYS1wZ3Aub3JnD55UsYMzE6OACP+mgw5zvT+BBgol8/uFQjHg4krjUCMDFQoI
+ApkBApsBAh4BFiEEwdtl1YDXuSJyVEseppmYlfq6zlIAAPQJA5dA0Xqwzn/0uwCq
+RlsOVCB3f5NOj1exKnlBvRw0xT1VBee1yxvlUt5eIAoCxWoRlWBJob3TTkhm9AEA
+8dyhwPmyGfWHzPw5NFG3xsXrZdNXNvit9WMVAPcmsyR7teXuDlJItxRAdJJc/qfJ
+YVbBFoaNrhYAAADHhQRhXZSZFgMrZXEBz0BL7THZ9MnCLfSPJ1FMLim9eGkQ3Bfn
+M3he5rOwO3t14QI1LjI96OjkeJipMgcFAmEP1Bq/ZHGO7oAAAc9AFnE8iNBaT3OU
+EFtxkmWHXtdaYMmGGRdopw9JPXr/UxuunDln5o9dxPxf7q7z26zXrZen+qed/Isa
+HsDCwSwEGBYKAWsFgmFdlJkFiQWkj70JEKaZmJX6us5SRxQAAAAAAB4AIHNhbHRA
+bm90YXRpb25zLnNlcXVvaWEtcGdwLm9yZxREUizdTcepBzgSMOv2VWQCWbl++3CZ
+EbgAWDryvSsyApsCwDGgBBkWCgBvBYJhXZSZCRBKo3SL4S5djkcUAAAAAAAeACBz
+YWx0QG5vdGF0aW9ucy5zZXF1b2lhLXBncC5vcmemoGTDjmNQiIzw6HOEddvS0OB7
+UZ/P07jM/EVmnYxTlBYhBAxsnkGpx1UCiH6gUUqjdIvhLl2OAAALYQOXQAMB1oKq
+OWxSFmvmgCKNcbAAyA3piF5ERIqs4z07oJvqDYrOWt75UsEIH/04gU/vHc4EmfG2
+JDLJgOLlyTUPkL/08f0ydGZPofFQBhn8HkuFFjnNtJ5oz3GIP4cdWMQFaUw0uvjb
+PM9Tm3ptENGd6Ts1AAAAFiEEwdtl1YDXuSJyVEseppmYlfq6zlIAAGpTA5dATR6i
+U2GrpUcQgpG+JqfAsGmF4yAOhgFxc1UfidFk3nTup3fLgjipkYY170WLRNbyKkVO
+Sodx93GAs58rizO1acDAWiLq3cyEPBFXbyFThbcNPcLl+/77Uk/mgkYrPQFAQWdK
+1kSRm4SizDBK37K8ChAAAADHhwRhXZSZEgMrZW8Bx0DMhzvhQo+OsXeqQ6QVw4sF
+CaexHh6rLohh7TzL3hQSjoJ27fV6JBkIWdn0LfrMlJIDbSv2SLdlgQMBCgkAAcdA
+MO7Dc1myF6Co1fAH+EuP+OxhxP/7V6ljuSCZENDfA49tQkzTta+PniG+pOVB2LHb
+huyaKBkqiaogo8LAOQQYFgoAeAWCYV2UmQWJBaSPvQkQppmYlfq6zlJHFAAAAAAA
+HgAgc2FsdEBub3RhdGlvbnMuc2VxdW9pYS1wZ3Aub3JnEjBMQAmc/2u45u5FQGmB
+QAytjSG2LM3JQN+PPVl5vEkCmwwWIQTB22XVgNe5InJUSx6mmZiV+rrOUgAASdYD
+l0DXEHQ9ykNP2rZP35ET1dmiFagFtTj/hLQcWlg16LqvJNGqOgYXuqTerbiOOt02
+XLCBln+wdewpU4ChEffMUDRBfqfQco/YsMqWV7bHJHAO0eC/DMKCjyU90xdH7R/d
+QgqsfguR1PqPuJxpXV4bSr6CGAAAAA==
+=MSvh
+-----END PGP PRIVATE KEY BLOCK-----`
+
+const keyWithNotation = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+
+xVgEY9gIshYJKwYBBAHaRw8BAQdAF25fSM8OpFlXZhop4Qpqo5ywGZ4jgWlR
+ppjhIKDthREAAQC+LFpzFcMJYcjxGKzBGHN0Px2jU4d04YSRnFAik+lVVQ6u
+zRdUZXN0IDx0ZXN0QGV4YW1wbGUuY29tPsLACgQQFgoAfAUCY9gIsgQLCQcI
+CRD/utJOCym8pR0UgAAAAAAQAAR0ZXh0QGV4YW1wbGUuY29tdGVzdB8UAAAA
+AAASAARiaW5hcnlAZXhhbXBsZS5jb20AAQIDAxUICgQWAAIBAhkBAhsDAh4B
+FiEEEMCQTUVGKgCX5rDQ/7rSTgspvKUAAPl5AP9Npz90LxzrB97Qr2DrGwfG
+wuYn4FSYwtuPfZHHeoIabwD/QEbvpQJ/NBb9EAZuow4Rirlt1yv19mmnF+j5
+8yUzhQjHXQRj2AiyEgorBgEEAZdVAQUBAQdARXAo30DmKcyUg6co7OUm0RNT
+z9iqFbDBzA8A47JEt1MDAQgHAAD/XKK3lBm0SqMR558HLWdBrNG6NqKuqb5X
+joCML987ZNgRD8J4BBgWCAAqBQJj2AiyCRD/utJOCym8pQIbDBYhBBDAkE1F
+RioAl+aw0P+60k4LKbylAADRxgEAg7UfBDiDPp5LHcW9D+SgFHk6+GyEU4ev
+VppQxdtxPvAA/34snHBX7Twnip1nMt7P4e2hDiw/hwQ7oqioOvc6jMkP
+=Z8YJ
+-----END PGP PRIVATE KEY BLOCK-----
+`
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_config.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_config.go
new file mode 100644
index 000000000..fec41a0e7
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_config.go
@@ -0,0 +1,67 @@
+// Copyright (C) 2019 ProtonTech AG
+
+package packet
+
+import "math/bits"
+
+// CipherSuite contains a combination of Cipher and Mode
+type CipherSuite struct {
+ // The cipher function
+ Cipher CipherFunction
+ // The AEAD mode of operation.
+ Mode AEADMode
+}
+
+// AEADConfig collects a number of AEAD parameters along with sensible defaults.
+// A nil AEADConfig is valid and results in all default values.
+type AEADConfig struct {
+ // The AEAD mode of operation.
+ DefaultMode AEADMode
+ // Amount of octets in each chunk of data
+ ChunkSize uint64
+}
+
+// Mode returns the AEAD mode of operation.
+func (conf *AEADConfig) Mode() AEADMode {
+ // If no preference is specified, OCB is used (which is mandatory to implement).
+ if conf == nil || conf.DefaultMode == 0 {
+ return AEADModeOCB
+ }
+
+ mode := conf.DefaultMode
+ if mode != AEADModeEAX && mode != AEADModeOCB && mode != AEADModeGCM {
+ panic("AEAD mode unsupported")
+ }
+ return mode
+}
+
+// ChunkSizeByte returns the byte indicating the chunk size. The effective
+// chunk size is computed with the formula uint64(1) << (chunkSizeByte + 6)
+// limit to 16 = 4 MiB
+// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
+func (conf *AEADConfig) ChunkSizeByte() byte {
+ if conf == nil || conf.ChunkSize == 0 {
+ return 12 // 1 << (12 + 6) == 262144 bytes
+ }
+
+ chunkSize := conf.ChunkSize
+ exponent := bits.Len64(chunkSize) - 1
+ switch {
+ case exponent < 6:
+ exponent = 6
+ case exponent > 16:
+ exponent = 16
+ }
+
+ return byte(exponent - 6)
+}
+
+// decodeAEADChunkSize returns the effective chunk size. In 32-bit systems, the
+// maximum returned value is 1 << 30.
+func decodeAEADChunkSize(c byte) int {
+ size := uint64(1 << (c + 6))
+ if size != uint64(int(size)) {
+ return 1 << 30
+ }
+ return int(size)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go
new file mode 100644
index 000000000..2eecd062f
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_crypter.go
@@ -0,0 +1,272 @@
+// Copyright (C) 2019 ProtonTech AG
+
+package packet
+
+import (
+ "bytes"
+ "crypto/cipher"
+ "encoding/binary"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+// aeadCrypter is an AEAD opener/sealer, its configuration, and data for en/decryption.
+type aeadCrypter struct {
+ aead cipher.AEAD
+ chunkSize int
+ initialNonce []byte
+ associatedData []byte // Chunk-independent associated data
+ chunkIndex []byte // Chunk counter
+ packetTag packetType // SEIP packet (v2) or AEAD Encrypted Data packet
+ bytesProcessed int // Amount of plaintext bytes encrypted/decrypted
+ buffer bytes.Buffer // Buffered bytes across chunks
+}
+
+// computeNonce takes the incremental index and computes an eXclusive OR with
+// the least significant 8 bytes of the receivers' initial nonce (see sec.
+// 5.16.1 and 5.16.2). It returns the resulting nonce.
+func (wo *aeadCrypter) computeNextNonce() (nonce []byte) {
+ if wo.packetTag == packetTypeSymmetricallyEncryptedIntegrityProtected {
+ return append(wo.initialNonce, wo.chunkIndex...)
+ }
+
+ nonce = make([]byte, len(wo.initialNonce))
+ copy(nonce, wo.initialNonce)
+ offset := len(wo.initialNonce) - 8
+ for i := 0; i < 8; i++ {
+ nonce[i+offset] ^= wo.chunkIndex[i]
+ }
+ return
+}
+
+// incrementIndex performs an integer increment by 1 of the integer represented by the
+// slice, modifying it accordingly.
+func (wo *aeadCrypter) incrementIndex() error {
+ index := wo.chunkIndex
+ if len(index) == 0 {
+ return errors.AEADError("Index has length 0")
+ }
+ for i := len(index) - 1; i >= 0; i-- {
+ if index[i] < 255 {
+ index[i]++
+ return nil
+ }
+ index[i] = 0
+ }
+ return errors.AEADError("cannot further increment index")
+}
+
+// aeadDecrypter reads and decrypts bytes. It buffers extra decrypted bytes when
+// necessary, similar to aeadEncrypter.
+type aeadDecrypter struct {
+ aeadCrypter // Embedded ciphertext opener
+ reader io.Reader // 'reader' is a partialLengthReader
+ peekedBytes []byte // Used to detect last chunk
+ eof bool
+}
+
+// Read decrypts bytes and reads them into dst. It decrypts when necessary and
+// buffers extra decrypted bytes. It returns the number of bytes copied into dst
+// and an error.
+func (ar *aeadDecrypter) Read(dst []byte) (n int, err error) {
+ // Return buffered plaintext bytes from previous calls
+ if ar.buffer.Len() > 0 {
+ return ar.buffer.Read(dst)
+ }
+
+ // Return EOF if we've previously validated the final tag
+ if ar.eof {
+ return 0, io.EOF
+ }
+
+ // Read a chunk
+ tagLen := ar.aead.Overhead()
+ cipherChunkBuf := new(bytes.Buffer)
+ _, errRead := io.CopyN(cipherChunkBuf, ar.reader, int64(ar.chunkSize+tagLen))
+ cipherChunk := cipherChunkBuf.Bytes()
+ if errRead != nil && errRead != io.EOF {
+ return 0, errRead
+ }
+
+ if len(cipherChunk) > 0 {
+ decrypted, errChunk := ar.openChunk(cipherChunk)
+ if errChunk != nil {
+ return 0, errChunk
+ }
+
+ // Return decrypted bytes, buffering if necessary
+ if len(dst) < len(decrypted) {
+ n = copy(dst, decrypted[:len(dst)])
+ ar.buffer.Write(decrypted[len(dst):])
+ } else {
+ n = copy(dst, decrypted)
+ }
+ }
+
+ // Check final authentication tag
+ if errRead == io.EOF {
+ errChunk := ar.validateFinalTag(ar.peekedBytes)
+ if errChunk != nil {
+ return n, errChunk
+ }
+ ar.eof = true // Mark EOF for when we've returned all buffered data
+ }
+ return
+}
+
+// Close is noOp. The final authentication tag of the stream was already
+// checked in the last Read call. In the future, this function could be used to
+// wipe the reader and peeked, decrypted bytes, if necessary.
+func (ar *aeadDecrypter) Close() (err error) {
+ if !ar.eof {
+ errChunk := ar.validateFinalTag(ar.peekedBytes)
+ if errChunk != nil {
+ return errChunk
+ }
+ }
+ return nil
+}
+
+// openChunk decrypts and checks integrity of an encrypted chunk, returning
+// the underlying plaintext and an error. It accesses peeked bytes from next
+// chunk, to identify the last chunk and decrypt/validate accordingly.
+func (ar *aeadDecrypter) openChunk(data []byte) ([]byte, error) {
+ tagLen := ar.aead.Overhead()
+ // Restore carried bytes from last call
+ chunkExtra := append(ar.peekedBytes, data...)
+ // 'chunk' contains encrypted bytes, followed by an authentication tag.
+ chunk := chunkExtra[:len(chunkExtra)-tagLen]
+ ar.peekedBytes = chunkExtra[len(chunkExtra)-tagLen:]
+
+ adata := ar.associatedData
+ if ar.aeadCrypter.packetTag == packetTypeAEADEncrypted {
+ adata = append(ar.associatedData, ar.chunkIndex...)
+ }
+
+ nonce := ar.computeNextNonce()
+ plainChunk, err := ar.aead.Open(nil, nonce, chunk, adata)
+ if err != nil {
+ return nil, errors.ErrAEADTagVerification
+ }
+ ar.bytesProcessed += len(plainChunk)
+ if err = ar.aeadCrypter.incrementIndex(); err != nil {
+ return nil, err
+ }
+ return plainChunk, nil
+}
+
+// Checks the summary tag. It takes into account the total decrypted bytes into
+// the associated data. It returns an error, or nil if the tag is valid.
+func (ar *aeadDecrypter) validateFinalTag(tag []byte) error {
+ // Associated: tag, version, cipher, aead, chunk size, ...
+ amountBytes := make([]byte, 8)
+ binary.BigEndian.PutUint64(amountBytes, uint64(ar.bytesProcessed))
+
+ adata := ar.associatedData
+ if ar.aeadCrypter.packetTag == packetTypeAEADEncrypted {
+ // ... index ...
+ adata = append(ar.associatedData, ar.chunkIndex...)
+ }
+
+ // ... and total number of encrypted octets
+ adata = append(adata, amountBytes...)
+ nonce := ar.computeNextNonce()
+ if _, err := ar.aead.Open(nil, nonce, tag, adata); err != nil {
+ return errors.ErrAEADTagVerification
+ }
+ return nil
+}
+
+// aeadEncrypter encrypts and writes bytes. It encrypts when necessary according
+// to the AEAD block size, and buffers the extra encrypted bytes for next write.
+type aeadEncrypter struct {
+ aeadCrypter // Embedded plaintext sealer
+ writer io.WriteCloser // 'writer' is a partialLengthWriter
+}
+
+// Write encrypts and writes bytes. It encrypts when necessary and buffers extra
+// plaintext bytes for next call. When the stream is finished, Close() MUST be
+// called to append the final tag.
+func (aw *aeadEncrypter) Write(plaintextBytes []byte) (n int, err error) {
+ // Append plaintextBytes to existing buffered bytes
+ n, err = aw.buffer.Write(plaintextBytes)
+ if err != nil {
+ return n, err
+ }
+ // Encrypt and write chunks
+ for aw.buffer.Len() >= aw.chunkSize {
+ plainChunk := aw.buffer.Next(aw.chunkSize)
+ encryptedChunk, err := aw.sealChunk(plainChunk)
+ if err != nil {
+ return n, err
+ }
+ _, err = aw.writer.Write(encryptedChunk)
+ if err != nil {
+ return n, err
+ }
+ }
+ return
+}
+
+// Close encrypts and writes the remaining buffered plaintext if any, appends
+// the final authentication tag, and closes the embedded writer. This function
+// MUST be called at the end of a stream.
+func (aw *aeadEncrypter) Close() (err error) {
+ // Encrypt and write a chunk if there's buffered data left, or if we haven't
+ // written any chunks yet.
+ if aw.buffer.Len() > 0 || aw.bytesProcessed == 0 {
+ plainChunk := aw.buffer.Bytes()
+ lastEncryptedChunk, err := aw.sealChunk(plainChunk)
+ if err != nil {
+ return err
+ }
+ _, err = aw.writer.Write(lastEncryptedChunk)
+ if err != nil {
+ return err
+ }
+ }
+ // Compute final tag (associated data: packet tag, version, cipher, aead,
+ // chunk size...
+ adata := aw.associatedData
+
+ if aw.aeadCrypter.packetTag == packetTypeAEADEncrypted {
+ // ... index ...
+ adata = append(aw.associatedData, aw.chunkIndex...)
+ }
+
+ // ... and total number of encrypted octets
+ amountBytes := make([]byte, 8)
+ binary.BigEndian.PutUint64(amountBytes, uint64(aw.bytesProcessed))
+ adata = append(adata, amountBytes...)
+
+ nonce := aw.computeNextNonce()
+ finalTag := aw.aead.Seal(nil, nonce, nil, adata)
+ _, err = aw.writer.Write(finalTag)
+ if err != nil {
+ return err
+ }
+ return aw.writer.Close()
+}
+
+// sealChunk Encrypts and authenticates the given chunk.
+func (aw *aeadEncrypter) sealChunk(data []byte) ([]byte, error) {
+ if len(data) > aw.chunkSize {
+ return nil, errors.AEADError("chunk exceeds maximum length")
+ }
+ if aw.associatedData == nil {
+ return nil, errors.AEADError("can't seal without headers")
+ }
+ adata := aw.associatedData
+ if aw.aeadCrypter.packetTag == packetTypeAEADEncrypted {
+ adata = append(aw.associatedData, aw.chunkIndex...)
+ }
+
+ nonce := aw.computeNextNonce()
+ encrypted := aw.aead.Seal(nil, nonce, data, adata)
+ aw.bytesProcessed += len(data)
+ if err := aw.aeadCrypter.incrementIndex(); err != nil {
+ return nil, err
+ }
+ return encrypted, nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go
new file mode 100644
index 000000000..98bd876bf
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/aead_encrypted.go
@@ -0,0 +1,96 @@
+// Copyright (C) 2019 ProtonTech AG
+
+package packet
+
+import (
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+)
+
+// AEADEncrypted represents an AEAD Encrypted Packet.
+// See https://www.ietf.org/archive/id/draft-koch-openpgp-2015-rfc4880bis-00.html#name-aead-encrypted-data-packet-t
+type AEADEncrypted struct {
+ cipher CipherFunction
+ mode AEADMode
+ chunkSizeByte byte
+ Contents io.Reader // Encrypted chunks and tags
+ initialNonce []byte // Referred to as IV in RFC4880-bis
+}
+
+// Only currently defined version
+const aeadEncryptedVersion = 1
+
+func (ae *AEADEncrypted) parse(buf io.Reader) error {
+ headerData := make([]byte, 4)
+ if n, err := io.ReadFull(buf, headerData); n < 4 {
+ return errors.AEADError("could not read aead header:" + err.Error())
+ }
+ // Read initial nonce
+ mode := AEADMode(headerData[2])
+ nonceLen := mode.IvLength()
+
+ // This packet supports only EAX and OCB
+ // https://www.ietf.org/archive/id/draft-koch-openpgp-2015-rfc4880bis-00.html#name-aead-encrypted-data-packet-t
+ if nonceLen == 0 || mode > AEADModeOCB {
+ return errors.AEADError("unknown mode")
+ }
+
+ initialNonce := make([]byte, nonceLen)
+ if n, err := io.ReadFull(buf, initialNonce); n < nonceLen {
+ return errors.AEADError("could not read aead nonce:" + err.Error())
+ }
+ ae.Contents = buf
+ ae.initialNonce = initialNonce
+ c := headerData[1]
+ if _, ok := algorithm.CipherById[c]; !ok {
+ return errors.UnsupportedError("unknown cipher: " + string(c))
+ }
+ ae.cipher = CipherFunction(c)
+ ae.mode = mode
+ ae.chunkSizeByte = headerData[3]
+ return nil
+}
+
+// Decrypt returns a io.ReadCloser from which decrypted bytes can be read, or
+// an error.
+func (ae *AEADEncrypted) Decrypt(ciph CipherFunction, key []byte) (io.ReadCloser, error) {
+ return ae.decrypt(key)
+}
+
+// decrypt prepares an aeadCrypter and returns a ReadCloser from which
+// decrypted bytes can be read (see aeadDecrypter.Read()).
+func (ae *AEADEncrypted) decrypt(key []byte) (io.ReadCloser, error) {
+ blockCipher := ae.cipher.new(key)
+ aead := ae.mode.new(blockCipher)
+ // Carry the first tagLen bytes
+ tagLen := ae.mode.TagLength()
+ peekedBytes := make([]byte, tagLen)
+ n, err := io.ReadFull(ae.Contents, peekedBytes)
+ if n < tagLen || (err != nil && err != io.EOF) {
+ return nil, errors.AEADError("Not enough data to decrypt:" + err.Error())
+ }
+ chunkSize := decodeAEADChunkSize(ae.chunkSizeByte)
+ return &aeadDecrypter{
+ aeadCrypter: aeadCrypter{
+ aead: aead,
+ chunkSize: chunkSize,
+ initialNonce: ae.initialNonce,
+ associatedData: ae.associatedData(),
+ chunkIndex: make([]byte, 8),
+ packetTag: packetTypeAEADEncrypted,
+ },
+ reader: ae.Contents,
+ peekedBytes: peekedBytes}, nil
+}
+
+// associatedData for chunks: tag, version, cipher, mode, chunk size byte
+func (ae *AEADEncrypted) associatedData() []byte {
+ return []byte{
+ 0xD4,
+ aeadEncryptedVersion,
+ byte(ae.cipher),
+ byte(ae.mode),
+ ae.chunkSizeByte}
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go
new file mode 100644
index 000000000..0bcb38cac
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/compressed.go
@@ -0,0 +1,161 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "compress/bzip2"
+ "compress/flate"
+ "compress/zlib"
+ "io"
+ "strconv"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+// Compressed represents a compressed OpenPGP packet. The decompressed contents
+// will contain more OpenPGP packets. See RFC 4880, section 5.6.
+type Compressed struct {
+ Body io.Reader
+}
+
+const (
+ NoCompression = flate.NoCompression
+ BestSpeed = flate.BestSpeed
+ BestCompression = flate.BestCompression
+ DefaultCompression = flate.DefaultCompression
+)
+
+// CompressionConfig contains compressor configuration settings.
+type CompressionConfig struct {
+ // Level is the compression level to use. It must be set to
+ // between -1 and 9, with -1 causing the compressor to use the
+ // default compression level, 0 causing the compressor to use
+ // no compression and 1 to 9 representing increasing (better,
+ // slower) compression levels. If Level is less than -1 or
+ // more then 9, a non-nil error will be returned during
+ // encryption. See the constants above for convenient common
+ // settings for Level.
+ Level int
+}
+
+// decompressionReader ensures that the whole compression packet is read.
+type decompressionReader struct {
+ compressed io.Reader
+ decompressed io.ReadCloser
+ readAll bool
+}
+
+func newDecompressionReader(r io.Reader, decompressor io.ReadCloser) *decompressionReader {
+ return &decompressionReader{
+ compressed: r,
+ decompressed: decompressor,
+ }
+}
+
+func (dr *decompressionReader) Read(data []byte) (n int, err error) {
+ if dr.readAll {
+ return 0, io.EOF
+ }
+ n, err = dr.decompressed.Read(data)
+ if err == io.EOF {
+ dr.readAll = true
+ // Close the decompressor.
+ if errDec := dr.decompressed.Close(); errDec != nil {
+ return n, errDec
+ }
+ // Consume all remaining data from the compressed packet.
+ consumeAll(dr.compressed)
+ }
+ return n, err
+}
+
+func (c *Compressed) parse(r io.Reader) error {
+ var buf [1]byte
+ _, err := readFull(r, buf[:])
+ if err != nil {
+ return err
+ }
+
+ switch buf[0] {
+ case 0:
+ c.Body = r
+ case 1:
+ c.Body = newDecompressionReader(r, flate.NewReader(r))
+ case 2:
+ decompressor, err := zlib.NewReader(r)
+ if err != nil {
+ return err
+ }
+ c.Body = newDecompressionReader(r, decompressor)
+ case 3:
+ c.Body = newDecompressionReader(r, io.NopCloser(bzip2.NewReader(r)))
+ default:
+ err = errors.UnsupportedError("unknown compression algorithm: " + strconv.Itoa(int(buf[0])))
+ }
+
+ return err
+}
+
+// compressedWriterCloser represents the serialized compression stream
+// header and the compressor. Its Close() method ensures that both the
+// compressor and serialized stream header are closed. Its Write()
+// method writes to the compressor.
+type compressedWriteCloser struct {
+ sh io.Closer // Stream Header
+ c io.WriteCloser // Compressor
+}
+
+func (cwc compressedWriteCloser) Write(p []byte) (int, error) {
+ return cwc.c.Write(p)
+}
+
+func (cwc compressedWriteCloser) Close() (err error) {
+ err = cwc.c.Close()
+ if err != nil {
+ return err
+ }
+
+ return cwc.sh.Close()
+}
+
+// SerializeCompressed serializes a compressed data packet to w and
+// returns a WriteCloser to which the literal data packets themselves
+// can be written and which MUST be closed on completion. If cc is
+// nil, sensible defaults will be used to configure the compression
+// algorithm.
+func SerializeCompressed(w io.WriteCloser, algo CompressionAlgo, cc *CompressionConfig) (literaldata io.WriteCloser, err error) {
+ compressed, err := serializeStreamHeader(w, packetTypeCompressed)
+ if err != nil {
+ return
+ }
+
+ _, err = compressed.Write([]byte{uint8(algo)})
+ if err != nil {
+ return
+ }
+
+ level := DefaultCompression
+ if cc != nil {
+ level = cc.Level
+ }
+
+ var compressor io.WriteCloser
+ switch algo {
+ case CompressionZIP:
+ compressor, err = flate.NewWriter(compressed, level)
+ case CompressionZLIB:
+ compressor, err = zlib.NewWriterLevel(compressed, level)
+ default:
+ s := strconv.Itoa(int(algo))
+ err = errors.UnsupportedError("Unsupported compression algorithm: " + s)
+ }
+ if err != nil {
+ return
+ }
+
+ literaldata = compressedWriteCloser{compressed, compressor}
+
+ return
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go
new file mode 100644
index 000000000..8bf8e6e51
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config.go
@@ -0,0 +1,410 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "crypto"
+ "crypto/rand"
+ "io"
+ "math/big"
+ "time"
+
+ "github.com/ProtonMail/go-crypto/openpgp/s2k"
+)
+
+var (
+ defaultRejectPublicKeyAlgorithms = map[PublicKeyAlgorithm]bool{
+ PubKeyAlgoElGamal: true,
+ PubKeyAlgoDSA: true,
+ }
+ defaultRejectHashAlgorithms = map[crypto.Hash]bool{
+ crypto.MD5: true,
+ crypto.RIPEMD160: true,
+ }
+ defaultRejectMessageHashAlgorithms = map[crypto.Hash]bool{
+ crypto.SHA1: true,
+ crypto.MD5: true,
+ crypto.RIPEMD160: true,
+ }
+ defaultRejectCurves = map[Curve]bool{
+ CurveSecP256k1: true,
+ }
+)
+
+// A global feature flag to indicate v5 support.
+// Can be set via a build tag, e.g.: `go build -tags v5 ./...`
+// If the build tag is missing config_v5.go will set it to true.
+//
+// Disables parsing of v5 keys and v5 signatures.
+// These are non-standard entities, which in the crypto-refresh have been superseded
+// by v6 keys, v6 signatures and SEIPDv2 encrypted data, respectively.
+var V5Disabled = false
+
+// Config collects a number of parameters along with sensible defaults.
+// A nil *Config is valid and results in all default values.
+type Config struct {
+ // Rand provides the source of entropy.
+ // If nil, the crypto/rand Reader is used.
+ Rand io.Reader
+ // DefaultHash is the default hash function to be used.
+ // If zero, SHA-256 is used.
+ DefaultHash crypto.Hash
+ // DefaultCipher is the cipher to be used.
+ // If zero, AES-128 is used.
+ DefaultCipher CipherFunction
+ // Time returns the current time as the number of seconds since the
+ // epoch. If Time is nil, time.Now is used.
+ Time func() time.Time
+ // DefaultCompressionAlgo is the compression algorithm to be
+ // applied to the plaintext before encryption. If zero, no
+ // compression is done.
+ DefaultCompressionAlgo CompressionAlgo
+ // CompressionConfig configures the compression settings.
+ CompressionConfig *CompressionConfig
+ // S2K (String to Key) config, used for key derivation in the context of secret key encryption
+ // and password-encrypted data.
+ // If nil, the default configuration is used
+ S2KConfig *s2k.Config
+ // Iteration count for Iterated S2K (String to Key).
+ // Only used if sk2.Mode is nil.
+ // This value is duplicated here from s2k.Config for backwards compatibility.
+ // It determines the strength of the passphrase stretching when
+ // the said passphrase is hashed to produce a key. S2KCount
+ // should be between 65536 and 65011712, inclusive. If Config
+ // is nil or S2KCount is 0, the value 16777216 used. Not all
+ // values in the above range can be represented. S2KCount will
+ // be rounded up to the next representable value if it cannot
+ // be encoded exactly. When set, it is strongly encrouraged to
+ // use a value that is at least 65536. See RFC 4880 Section
+ // 3.7.1.3.
+ //
+ // Deprecated: SK2Count should be configured in S2KConfig instead.
+ S2KCount int
+ // RSABits is the number of bits in new RSA keys made with NewEntity.
+ // If zero, then 2048 bit keys are created.
+ RSABits int
+ // The public key algorithm to use - will always create a signing primary
+ // key and encryption subkey.
+ Algorithm PublicKeyAlgorithm
+ // Some known primes that are optionally prepopulated by the caller
+ RSAPrimes []*big.Int
+ // Curve configures the desired packet.Curve if the Algorithm is PubKeyAlgoECDSA,
+ // PubKeyAlgoEdDSA, or PubKeyAlgoECDH. If empty Curve25519 is used.
+ Curve Curve
+ // AEADConfig configures the use of the new AEAD Encrypted Data Packet,
+ // defined in the draft of the next version of the OpenPGP specification.
+ // If a non-nil AEADConfig is passed, usage of this packet is enabled. By
+ // default, it is disabled. See the documentation of AEADConfig for more
+ // configuration options related to AEAD.
+ // **Note: using this option may break compatibility with other OpenPGP
+ // implementations, as well as future versions of this library.**
+ AEADConfig *AEADConfig
+ // V6Keys configures version 6 key generation. If false, this package still
+ // supports version 6 keys, but produces version 4 keys.
+ V6Keys bool
+ // Minimum RSA key size allowed for key generation and message signing, verification and encryption.
+ MinRSABits uint16
+ // Reject insecure algorithms, only works with v2 api
+ RejectPublicKeyAlgorithms map[PublicKeyAlgorithm]bool
+ RejectHashAlgorithms map[crypto.Hash]bool
+ RejectMessageHashAlgorithms map[crypto.Hash]bool
+ RejectCurves map[Curve]bool
+ // "The validity period of the key. This is the number of seconds after
+ // the key creation time that the key expires. If this is not present
+ // or has a value of zero, the key never expires. This is found only on
+ // a self-signature.""
+ // https://tools.ietf.org/html/rfc4880#section-5.2.3.6
+ KeyLifetimeSecs uint32
+ // "The validity period of the signature. This is the number of seconds
+ // after the signature creation time that the signature expires. If
+ // this is not present or has a value of zero, it never expires."
+ // https://tools.ietf.org/html/rfc4880#section-5.2.3.10
+ SigLifetimeSecs uint32
+ // SigningKeyId is used to specify the signing key to use (by Key ID).
+ // By default, the signing key is selected automatically, preferring
+ // signing subkeys if available.
+ SigningKeyId uint64
+ // SigningIdentity is used to specify a user ID (packet Signer's User ID, type 28)
+ // when producing a generic certification signature onto an existing user ID.
+ // The identity must be present in the signer Entity.
+ SigningIdentity string
+ // InsecureAllowUnauthenticatedMessages controls, whether it is tolerated to read
+ // encrypted messages without Modification Detection Code (MDC).
+ // MDC is mandated by the IETF OpenPGP Crypto Refresh draft and has long been implemented
+ // in most OpenPGP implementations. Messages without MDC are considered unnecessarily
+ // insecure and should be prevented whenever possible.
+ // In case one needs to deal with messages from very old OpenPGP implementations, there
+ // might be no other way than to tolerate the missing MDC. Setting this flag, allows this
+ // mode of operation. It should be considered a measure of last resort.
+ InsecureAllowUnauthenticatedMessages bool
+ // InsecureAllowDecryptionWithSigningKeys allows decryption with keys marked as signing keys in the v2 API.
+ // This setting is potentially insecure, but it is needed as some libraries
+ // ignored key flags when selecting a key for encryption.
+ // Not relevant for the v1 API, as all keys were allowed in decryption.
+ InsecureAllowDecryptionWithSigningKeys bool
+ // KnownNotations is a map of Notation Data names to bools, which controls
+ // the notation names that are allowed to be present in critical Notation Data
+ // signature subpackets.
+ KnownNotations map[string]bool
+ // SignatureNotations is a list of Notations to be added to any signatures.
+ SignatureNotations []*Notation
+ // CheckIntendedRecipients controls, whether the OpenPGP Intended Recipient Fingerprint feature
+ // should be enabled for encryption and decryption.
+ // (See https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-intended-recipient-fingerpr).
+ // When the flag is set, encryption produces Intended Recipient Fingerprint signature sub-packets and decryption
+ // checks whether the key it was encrypted to is one of the included fingerprints in the signature.
+ // If the flag is disabled, no Intended Recipient Fingerprint sub-packets are created or checked.
+ // The default behavior, when the config or flag is nil, is to enable the feature.
+ CheckIntendedRecipients *bool
+ // CacheSessionKey controls if decryption should return the session key used for decryption.
+ // If the flag is set, the session key is cached in the message details struct.
+ CacheSessionKey bool
+ // CheckPacketSequence is a flag that controls if the pgp message reader should strictly check
+ // that the packet sequence conforms with the grammar mandated by rfc4880.
+ // The default behavior, when the config or flag is nil, is to check the packet sequence.
+ CheckPacketSequence *bool
+ // NonDeterministicSignaturesViaNotation is a flag to enable randomization of signatures.
+ // If true, a salt notation is used to randomize signatures generated by v4 and v5 keys
+ // (v6 signatures are always non-deterministic, by design).
+ // This protects EdDSA signatures from potentially leaking the secret key in case of faults (i.e. bitflips) which, in principle, could occur
+ // during the signing computation. It is added to signatures of any algo for simplicity, and as it may also serve as protection in case of
+ // weaknesses in the hash algo, potentially hindering e.g. some chosen-prefix attacks.
+ // The default behavior, when the config or flag is nil, is to enable the feature.
+ NonDeterministicSignaturesViaNotation *bool
+}
+
+func (c *Config) Random() io.Reader {
+ if c == nil || c.Rand == nil {
+ return rand.Reader
+ }
+ return c.Rand
+}
+
+func (c *Config) Hash() crypto.Hash {
+ if c == nil || uint(c.DefaultHash) == 0 {
+ return crypto.SHA256
+ }
+ return c.DefaultHash
+}
+
+func (c *Config) Cipher() CipherFunction {
+ if c == nil || uint8(c.DefaultCipher) == 0 {
+ return CipherAES128
+ }
+ return c.DefaultCipher
+}
+
+func (c *Config) Now() time.Time {
+ if c == nil || c.Time == nil {
+ return time.Now().Truncate(time.Second)
+ }
+ return c.Time().Truncate(time.Second)
+}
+
+// KeyLifetime returns the validity period of the key.
+func (c *Config) KeyLifetime() uint32 {
+ if c == nil {
+ return 0
+ }
+ return c.KeyLifetimeSecs
+}
+
+// SigLifetime returns the validity period of the signature.
+func (c *Config) SigLifetime() uint32 {
+ if c == nil {
+ return 0
+ }
+ return c.SigLifetimeSecs
+}
+
+func (c *Config) Compression() CompressionAlgo {
+ if c == nil {
+ return CompressionNone
+ }
+ return c.DefaultCompressionAlgo
+}
+
+func (c *Config) RSAModulusBits() int {
+ if c == nil || c.RSABits == 0 {
+ return 2048
+ }
+ return c.RSABits
+}
+
+func (c *Config) PublicKeyAlgorithm() PublicKeyAlgorithm {
+ if c == nil || c.Algorithm == 0 {
+ return PubKeyAlgoRSA
+ }
+ return c.Algorithm
+}
+
+func (c *Config) CurveName() Curve {
+ if c == nil || c.Curve == "" {
+ return Curve25519
+ }
+ return c.Curve
+}
+
+// Deprecated: The hash iterations should now be queried via the S2K() method.
+func (c *Config) PasswordHashIterations() int {
+ if c == nil || c.S2KCount == 0 {
+ return 0
+ }
+ return c.S2KCount
+}
+
+func (c *Config) S2K() *s2k.Config {
+ if c == nil {
+ return nil
+ }
+ // for backwards compatibility
+ if c.S2KCount > 0 && c.S2KConfig == nil {
+ return &s2k.Config{
+ S2KCount: c.S2KCount,
+ }
+ }
+ return c.S2KConfig
+}
+
+func (c *Config) AEAD() *AEADConfig {
+ if c == nil {
+ return nil
+ }
+ return c.AEADConfig
+}
+
+func (c *Config) SigningKey() uint64 {
+ if c == nil {
+ return 0
+ }
+ return c.SigningKeyId
+}
+
+func (c *Config) SigningUserId() string {
+ if c == nil {
+ return ""
+ }
+ return c.SigningIdentity
+}
+
+func (c *Config) AllowUnauthenticatedMessages() bool {
+ if c == nil {
+ return false
+ }
+ return c.InsecureAllowUnauthenticatedMessages
+}
+
+func (c *Config) AllowDecryptionWithSigningKeys() bool {
+ if c == nil {
+ return false
+ }
+ return c.InsecureAllowDecryptionWithSigningKeys
+}
+
+func (c *Config) KnownNotation(notationName string) bool {
+ if c == nil {
+ return false
+ }
+ return c.KnownNotations[notationName]
+}
+
+func (c *Config) Notations() []*Notation {
+ if c == nil {
+ return nil
+ }
+ return c.SignatureNotations
+}
+
+func (c *Config) V6() bool {
+ if c == nil {
+ return false
+ }
+ return c.V6Keys
+}
+
+func (c *Config) IntendedRecipients() bool {
+ if c == nil || c.CheckIntendedRecipients == nil {
+ return true
+ }
+ return *c.CheckIntendedRecipients
+}
+
+func (c *Config) RetrieveSessionKey() bool {
+ if c == nil {
+ return false
+ }
+ return c.CacheSessionKey
+}
+
+func (c *Config) MinimumRSABits() uint16 {
+ if c == nil || c.MinRSABits == 0 {
+ return 2047
+ }
+ return c.MinRSABits
+}
+
+func (c *Config) RejectPublicKeyAlgorithm(alg PublicKeyAlgorithm) bool {
+ var rejectedAlgorithms map[PublicKeyAlgorithm]bool
+ if c == nil || c.RejectPublicKeyAlgorithms == nil {
+ // Default
+ rejectedAlgorithms = defaultRejectPublicKeyAlgorithms
+ } else {
+ rejectedAlgorithms = c.RejectPublicKeyAlgorithms
+ }
+ return rejectedAlgorithms[alg]
+}
+
+func (c *Config) RejectHashAlgorithm(hash crypto.Hash) bool {
+ var rejectedAlgorithms map[crypto.Hash]bool
+ if c == nil || c.RejectHashAlgorithms == nil {
+ // Default
+ rejectedAlgorithms = defaultRejectHashAlgorithms
+ } else {
+ rejectedAlgorithms = c.RejectHashAlgorithms
+ }
+ return rejectedAlgorithms[hash]
+}
+
+func (c *Config) RejectMessageHashAlgorithm(hash crypto.Hash) bool {
+ var rejectedAlgorithms map[crypto.Hash]bool
+ if c == nil || c.RejectMessageHashAlgorithms == nil {
+ // Default
+ rejectedAlgorithms = defaultRejectMessageHashAlgorithms
+ } else {
+ rejectedAlgorithms = c.RejectMessageHashAlgorithms
+ }
+ return rejectedAlgorithms[hash]
+}
+
+func (c *Config) RejectCurve(curve Curve) bool {
+ var rejectedCurve map[Curve]bool
+ if c == nil || c.RejectCurves == nil {
+ // Default
+ rejectedCurve = defaultRejectCurves
+ } else {
+ rejectedCurve = c.RejectCurves
+ }
+ return rejectedCurve[curve]
+}
+
+func (c *Config) StrictPacketSequence() bool {
+ if c == nil || c.CheckPacketSequence == nil {
+ return true
+ }
+ return *c.CheckPacketSequence
+}
+
+func (c *Config) RandomizeSignaturesViaNotation() bool {
+ if c == nil || c.NonDeterministicSignaturesViaNotation == nil {
+ return true
+ }
+ return *c.NonDeterministicSignaturesViaNotation
+}
+
+// BoolPointer is a helper function to set a boolean pointer in the Config.
+// e.g., config.CheckPacketSequence = BoolPointer(true)
+func BoolPointer(value bool) *bool {
+ return &value
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config_v5.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config_v5.go
new file mode 100644
index 000000000..f2415906b
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/config_v5.go
@@ -0,0 +1,7 @@
+//go:build !v5
+
+package packet
+
+func init() {
+ V5Disabled = true
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go
new file mode 100644
index 000000000..b90bb2891
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/encrypted_key.go
@@ -0,0 +1,584 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "bytes"
+ "crypto"
+ "crypto/rsa"
+ "encoding/binary"
+ "encoding/hex"
+ "io"
+ "math/big"
+ "strconv"
+
+ "github.com/ProtonMail/go-crypto/openpgp/ecdh"
+ "github.com/ProtonMail/go-crypto/openpgp/elgamal"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
+ "github.com/ProtonMail/go-crypto/openpgp/x25519"
+ "github.com/ProtonMail/go-crypto/openpgp/x448"
+)
+
+// EncryptedKey represents a public-key encrypted session key. See RFC 4880,
+// section 5.1.
+type EncryptedKey struct {
+ Version int
+ KeyId uint64
+ KeyVersion int // v6
+ KeyFingerprint []byte // v6
+ Algo PublicKeyAlgorithm
+ CipherFunc CipherFunction // only valid after a successful Decrypt for a v3 packet
+ Key []byte // only valid after a successful Decrypt
+
+ encryptedMPI1, encryptedMPI2 encoding.Field
+ ephemeralPublicX25519 *x25519.PublicKey // used for x25519
+ ephemeralPublicX448 *x448.PublicKey // used for x448
+ encryptedSession []byte // used for x25519 and x448
+}
+
+func (e *EncryptedKey) parse(r io.Reader) (err error) {
+ var buf [8]byte
+ _, err = readFull(r, buf[:versionSize])
+ if err != nil {
+ return
+ }
+ e.Version = int(buf[0])
+ if e.Version != 3 && e.Version != 6 {
+ return errors.UnsupportedError("unknown EncryptedKey version " + strconv.Itoa(int(buf[0])))
+ }
+ if e.Version == 6 {
+ //Read a one-octet size of the following two fields.
+ if _, err = readFull(r, buf[:1]); err != nil {
+ return
+ }
+ // The size may also be zero, and the key version and
+ // fingerprint omitted for an "anonymous recipient"
+ if buf[0] != 0 {
+ // non-anonymous case
+ _, err = readFull(r, buf[:versionSize])
+ if err != nil {
+ return
+ }
+ e.KeyVersion = int(buf[0])
+ if e.KeyVersion != 4 && e.KeyVersion != 6 {
+ return errors.UnsupportedError("unknown public key version " + strconv.Itoa(e.KeyVersion))
+ }
+ var fingerprint []byte
+ if e.KeyVersion == 6 {
+ fingerprint = make([]byte, fingerprintSizeV6)
+ } else if e.KeyVersion == 4 {
+ fingerprint = make([]byte, fingerprintSize)
+ }
+ _, err = readFull(r, fingerprint)
+ if err != nil {
+ return
+ }
+ e.KeyFingerprint = fingerprint
+ if e.KeyVersion == 6 {
+ e.KeyId = binary.BigEndian.Uint64(e.KeyFingerprint[:keyIdSize])
+ } else if e.KeyVersion == 4 {
+ e.KeyId = binary.BigEndian.Uint64(e.KeyFingerprint[fingerprintSize-keyIdSize : fingerprintSize])
+ }
+ }
+ } else {
+ _, err = readFull(r, buf[:8])
+ if err != nil {
+ return
+ }
+ e.KeyId = binary.BigEndian.Uint64(buf[:keyIdSize])
+ }
+
+ _, err = readFull(r, buf[:1])
+ if err != nil {
+ return
+ }
+ e.Algo = PublicKeyAlgorithm(buf[0])
+ var cipherFunction byte
+ switch e.Algo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
+ e.encryptedMPI1 = new(encoding.MPI)
+ if _, err = e.encryptedMPI1.ReadFrom(r); err != nil {
+ return
+ }
+ case PubKeyAlgoElGamal:
+ e.encryptedMPI1 = new(encoding.MPI)
+ if _, err = e.encryptedMPI1.ReadFrom(r); err != nil {
+ return
+ }
+
+ e.encryptedMPI2 = new(encoding.MPI)
+ if _, err = e.encryptedMPI2.ReadFrom(r); err != nil {
+ return
+ }
+ case PubKeyAlgoECDH:
+ e.encryptedMPI1 = new(encoding.MPI)
+ if _, err = e.encryptedMPI1.ReadFrom(r); err != nil {
+ return
+ }
+
+ e.encryptedMPI2 = new(encoding.OID)
+ if _, err = e.encryptedMPI2.ReadFrom(r); err != nil {
+ return
+ }
+ case PubKeyAlgoX25519:
+ e.ephemeralPublicX25519, e.encryptedSession, cipherFunction, err = x25519.DecodeFields(r, e.Version == 6)
+ if err != nil {
+ return
+ }
+ case PubKeyAlgoX448:
+ e.ephemeralPublicX448, e.encryptedSession, cipherFunction, err = x448.DecodeFields(r, e.Version == 6)
+ if err != nil {
+ return
+ }
+ }
+ if e.Version < 6 {
+ switch e.Algo {
+ case PubKeyAlgoX25519, PubKeyAlgoX448:
+ e.CipherFunc = CipherFunction(cipherFunction)
+ // Check for validiy is in the Decrypt method
+ }
+ }
+
+ _, err = consumeAll(r)
+ return
+}
+
+// Decrypt decrypts an encrypted session key with the given private key. The
+// private key must have been decrypted first.
+// If config is nil, sensible defaults will be used.
+func (e *EncryptedKey) Decrypt(priv *PrivateKey, config *Config) error {
+ if e.Version < 6 && e.KeyId != 0 && e.KeyId != priv.KeyId {
+ return errors.InvalidArgumentError("cannot decrypt encrypted session key for key id " + strconv.FormatUint(e.KeyId, 16) + " with private key id " + strconv.FormatUint(priv.KeyId, 16))
+ }
+ if e.Version == 6 && e.KeyVersion != 0 && !bytes.Equal(e.KeyFingerprint, priv.Fingerprint) {
+ return errors.InvalidArgumentError("cannot decrypt encrypted session key for key fingerprint " + hex.EncodeToString(e.KeyFingerprint) + " with private key fingerprint " + hex.EncodeToString(priv.Fingerprint))
+ }
+ if e.Algo != priv.PubKeyAlgo {
+ return errors.InvalidArgumentError("cannot decrypt encrypted session key of type " + strconv.Itoa(int(e.Algo)) + " with private key of type " + strconv.Itoa(int(priv.PubKeyAlgo)))
+ }
+ if priv.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy key found")
+ }
+
+ var err error
+ var b []byte
+
+ // TODO(agl): use session key decryption routines here to avoid
+ // padding oracle attacks.
+ switch priv.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
+ // Supports both *rsa.PrivateKey and crypto.Decrypter
+ k := priv.PrivateKey.(crypto.Decrypter)
+ b, err = k.Decrypt(config.Random(), padToKeySize(k.Public().(*rsa.PublicKey), e.encryptedMPI1.Bytes()), nil)
+ case PubKeyAlgoElGamal:
+ c1 := new(big.Int).SetBytes(e.encryptedMPI1.Bytes())
+ c2 := new(big.Int).SetBytes(e.encryptedMPI2.Bytes())
+ b, err = elgamal.Decrypt(priv.PrivateKey.(*elgamal.PrivateKey), c1, c2)
+ case PubKeyAlgoECDH:
+ vsG := e.encryptedMPI1.Bytes()
+ m := e.encryptedMPI2.Bytes()
+ oid := priv.PublicKey.oid.EncodedBytes()
+ fp := priv.PublicKey.Fingerprint[:]
+ if priv.PublicKey.Version == 5 {
+ // For v5 the, the fingerprint must be restricted to 20 bytes
+ fp = fp[:20]
+ }
+ b, err = ecdh.Decrypt(priv.PrivateKey.(*ecdh.PrivateKey), vsG, m, oid, fp)
+ case PubKeyAlgoX25519:
+ b, err = x25519.Decrypt(priv.PrivateKey.(*x25519.PrivateKey), e.ephemeralPublicX25519, e.encryptedSession)
+ case PubKeyAlgoX448:
+ b, err = x448.Decrypt(priv.PrivateKey.(*x448.PrivateKey), e.ephemeralPublicX448, e.encryptedSession)
+ default:
+ err = errors.InvalidArgumentError("cannot decrypt encrypted session key with private key of type " + strconv.Itoa(int(priv.PubKeyAlgo)))
+ }
+ if err != nil {
+ return err
+ }
+
+ var key []byte
+ switch priv.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal, PubKeyAlgoECDH:
+ keyOffset := 0
+ if e.Version < 6 {
+ e.CipherFunc = CipherFunction(b[0])
+ keyOffset = 1
+ if !e.CipherFunc.IsSupported() {
+ return errors.UnsupportedError("unsupported encryption function")
+ }
+ }
+ key, err = decodeChecksumKey(b[keyOffset:])
+ if err != nil {
+ return err
+ }
+ case PubKeyAlgoX25519, PubKeyAlgoX448:
+ if e.Version < 6 {
+ switch e.CipherFunc {
+ case CipherAES128, CipherAES192, CipherAES256:
+ break
+ default:
+ return errors.StructuralError("v3 PKESK mandates AES as cipher function for x25519 and x448")
+ }
+ }
+ key = b[:]
+ default:
+ return errors.UnsupportedError("unsupported algorithm for decryption")
+ }
+ e.Key = key
+ return nil
+}
+
+// Serialize writes the encrypted key packet, e, to w.
+func (e *EncryptedKey) Serialize(w io.Writer) error {
+ var encodedLength int
+ switch e.Algo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
+ encodedLength = int(e.encryptedMPI1.EncodedLength())
+ case PubKeyAlgoElGamal:
+ encodedLength = int(e.encryptedMPI1.EncodedLength()) + int(e.encryptedMPI2.EncodedLength())
+ case PubKeyAlgoECDH:
+ encodedLength = int(e.encryptedMPI1.EncodedLength()) + int(e.encryptedMPI2.EncodedLength())
+ case PubKeyAlgoX25519:
+ encodedLength = x25519.EncodedFieldsLength(e.encryptedSession, e.Version == 6)
+ case PubKeyAlgoX448:
+ encodedLength = x448.EncodedFieldsLength(e.encryptedSession, e.Version == 6)
+ default:
+ return errors.InvalidArgumentError("don't know how to serialize encrypted key type " + strconv.Itoa(int(e.Algo)))
+ }
+
+ packetLen := versionSize /* version */ + keyIdSize /* key id */ + algorithmSize /* algo */ + encodedLength
+ if e.Version == 6 {
+ packetLen = versionSize /* version */ + algorithmSize /* algo */ + encodedLength + keyVersionSize /* key version */
+ if e.KeyVersion == 6 {
+ packetLen += fingerprintSizeV6
+ } else if e.KeyVersion == 4 {
+ packetLen += fingerprintSize
+ }
+ }
+
+ err := serializeHeader(w, packetTypeEncryptedKey, packetLen)
+ if err != nil {
+ return err
+ }
+
+ _, err = w.Write([]byte{byte(e.Version)})
+ if err != nil {
+ return err
+ }
+ if e.Version == 6 {
+ _, err = w.Write([]byte{byte(e.KeyVersion)})
+ if err != nil {
+ return err
+ }
+ // The key version number may also be zero,
+ // and the fingerprint omitted
+ if e.KeyVersion != 0 {
+ _, err = w.Write(e.KeyFingerprint)
+ if err != nil {
+ return err
+ }
+ }
+ } else {
+ // Write KeyID
+ err = binary.Write(w, binary.BigEndian, e.KeyId)
+ if err != nil {
+ return err
+ }
+ }
+ _, err = w.Write([]byte{byte(e.Algo)})
+ if err != nil {
+ return err
+ }
+
+ switch e.Algo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
+ _, err := w.Write(e.encryptedMPI1.EncodedBytes())
+ return err
+ case PubKeyAlgoElGamal:
+ if _, err := w.Write(e.encryptedMPI1.EncodedBytes()); err != nil {
+ return err
+ }
+ _, err := w.Write(e.encryptedMPI2.EncodedBytes())
+ return err
+ case PubKeyAlgoECDH:
+ if _, err := w.Write(e.encryptedMPI1.EncodedBytes()); err != nil {
+ return err
+ }
+ _, err := w.Write(e.encryptedMPI2.EncodedBytes())
+ return err
+ case PubKeyAlgoX25519:
+ err := x25519.EncodeFields(w, e.ephemeralPublicX25519, e.encryptedSession, byte(e.CipherFunc), e.Version == 6)
+ return err
+ case PubKeyAlgoX448:
+ err := x448.EncodeFields(w, e.ephemeralPublicX448, e.encryptedSession, byte(e.CipherFunc), e.Version == 6)
+ return err
+ default:
+ panic("internal error")
+ }
+}
+
+// SerializeEncryptedKeyAEAD serializes an encrypted key packet to w that contains
+// key, encrypted to pub.
+// If aeadSupported is set, PKESK v6 is used, otherwise v3.
+// Note: aeadSupported MUST match the value passed to SerializeSymmetricallyEncrypted.
+// If config is nil, sensible defaults will be used.
+func SerializeEncryptedKeyAEAD(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, aeadSupported bool, key []byte, config *Config) error {
+ return SerializeEncryptedKeyAEADwithHiddenOption(w, pub, cipherFunc, aeadSupported, key, false, config)
+}
+
+// SerializeEncryptedKeyAEADwithHiddenOption serializes an encrypted key packet to w that contains
+// key, encrypted to pub.
+// Offers the hidden flag option to indicated if the PKESK packet should include a wildcard KeyID.
+// If aeadSupported is set, PKESK v6 is used, otherwise v3.
+// Note: aeadSupported MUST match the value passed to SerializeSymmetricallyEncrypted.
+// If config is nil, sensible defaults will be used.
+func SerializeEncryptedKeyAEADwithHiddenOption(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, aeadSupported bool, key []byte, hidden bool, config *Config) error {
+ var buf [36]byte // max possible header size is v6
+ lenHeaderWritten := versionSize
+ version := 3
+
+ if aeadSupported {
+ version = 6
+ }
+ // An implementation MUST NOT generate ElGamal v6 PKESKs.
+ if version == 6 && pub.PubKeyAlgo == PubKeyAlgoElGamal {
+ return errors.InvalidArgumentError("ElGamal v6 PKESK are not allowed")
+ }
+ // In v3 PKESKs, for x25519 and x448, mandate using AES
+ if version == 3 && (pub.PubKeyAlgo == PubKeyAlgoX25519 || pub.PubKeyAlgo == PubKeyAlgoX448) {
+ switch cipherFunc {
+ case CipherAES128, CipherAES192, CipherAES256:
+ break
+ default:
+ return errors.InvalidArgumentError("v3 PKESK mandates AES for x25519 and x448")
+ }
+ }
+
+ buf[0] = byte(version)
+
+ // If hidden is set, the key should be hidden
+ // An implementation MAY accept or use a Key ID of all zeros,
+ // or a key version of zero and no key fingerprint, to hide the intended decryption key.
+ // See Section 5.1.8. in the open pgp crypto refresh
+ if version == 6 {
+ if !hidden {
+ // A one-octet size of the following two fields.
+ buf[1] = byte(keyVersionSize + len(pub.Fingerprint))
+ // A one octet key version number.
+ buf[2] = byte(pub.Version)
+ lenHeaderWritten += keyVersionSize + 1
+ // The fingerprint of the public key
+ copy(buf[lenHeaderWritten:lenHeaderWritten+len(pub.Fingerprint)], pub.Fingerprint)
+ lenHeaderWritten += len(pub.Fingerprint)
+ } else {
+ // The size may also be zero, and the key version
+ // and fingerprint omitted for an "anonymous recipient"
+ buf[1] = 0
+ lenHeaderWritten += 1
+ }
+ } else {
+ if !hidden {
+ binary.BigEndian.PutUint64(buf[versionSize:(versionSize+keyIdSize)], pub.KeyId)
+ }
+ lenHeaderWritten += keyIdSize
+ }
+ buf[lenHeaderWritten] = byte(pub.PubKeyAlgo)
+ lenHeaderWritten += algorithmSize
+
+ var keyBlock []byte
+ switch pub.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal, PubKeyAlgoECDH:
+ lenKeyBlock := len(key) + 2
+ if version < 6 {
+ lenKeyBlock += 1 // cipher type included
+ }
+ keyBlock = make([]byte, lenKeyBlock)
+ keyOffset := 0
+ if version < 6 {
+ keyBlock[0] = byte(cipherFunc)
+ keyOffset = 1
+ }
+ encodeChecksumKey(keyBlock[keyOffset:], key)
+ case PubKeyAlgoX25519, PubKeyAlgoX448:
+ // algorithm is added in plaintext below
+ keyBlock = key
+ }
+
+ switch pub.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly:
+ return serializeEncryptedKeyRSA(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*rsa.PublicKey), keyBlock)
+ case PubKeyAlgoElGamal:
+ return serializeEncryptedKeyElGamal(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*elgamal.PublicKey), keyBlock)
+ case PubKeyAlgoECDH:
+ return serializeEncryptedKeyECDH(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*ecdh.PublicKey), keyBlock, pub.oid, pub.Fingerprint)
+ case PubKeyAlgoX25519:
+ return serializeEncryptedKeyX25519(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*x25519.PublicKey), keyBlock, byte(cipherFunc), version)
+ case PubKeyAlgoX448:
+ return serializeEncryptedKeyX448(w, config.Random(), buf[:lenHeaderWritten], pub.PublicKey.(*x448.PublicKey), keyBlock, byte(cipherFunc), version)
+ case PubKeyAlgoDSA, PubKeyAlgoRSASignOnly:
+ return errors.InvalidArgumentError("cannot encrypt to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo)))
+ }
+
+ return errors.UnsupportedError("encrypting a key to public key of type " + strconv.Itoa(int(pub.PubKeyAlgo)))
+}
+
+// SerializeEncryptedKey serializes an encrypted key packet to w that contains
+// key, encrypted to pub.
+// PKESKv6 is used if config.AEAD() is not nil.
+// If config is nil, sensible defaults will be used.
+// Deprecated: Use SerializeEncryptedKeyAEAD instead.
+func SerializeEncryptedKey(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, config *Config) error {
+ return SerializeEncryptedKeyAEAD(w, pub, cipherFunc, config.AEAD() != nil, key, config)
+}
+
+// SerializeEncryptedKeyWithHiddenOption serializes an encrypted key packet to w that contains
+// key, encrypted to pub. PKESKv6 is used if config.AEAD() is not nil.
+// The hidden option controls if the packet should be anonymous, i.e., omit key metadata.
+// If config is nil, sensible defaults will be used.
+// Deprecated: Use SerializeEncryptedKeyAEADwithHiddenOption instead.
+func SerializeEncryptedKeyWithHiddenOption(w io.Writer, pub *PublicKey, cipherFunc CipherFunction, key []byte, hidden bool, config *Config) error {
+ return SerializeEncryptedKeyAEADwithHiddenOption(w, pub, cipherFunc, config.AEAD() != nil, key, hidden, config)
+}
+
+func serializeEncryptedKeyRSA(w io.Writer, rand io.Reader, header []byte, pub *rsa.PublicKey, keyBlock []byte) error {
+ cipherText, err := rsa.EncryptPKCS1v15(rand, pub, keyBlock)
+ if err != nil {
+ return errors.InvalidArgumentError("RSA encryption failed: " + err.Error())
+ }
+
+ cipherMPI := encoding.NewMPI(cipherText)
+ packetLen := len(header) /* header length */ + int(cipherMPI.EncodedLength())
+
+ err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
+ if err != nil {
+ return err
+ }
+ _, err = w.Write(header[:])
+ if err != nil {
+ return err
+ }
+ _, err = w.Write(cipherMPI.EncodedBytes())
+ return err
+}
+
+func serializeEncryptedKeyElGamal(w io.Writer, rand io.Reader, header []byte, pub *elgamal.PublicKey, keyBlock []byte) error {
+ c1, c2, err := elgamal.Encrypt(rand, pub, keyBlock)
+ if err != nil {
+ return errors.InvalidArgumentError("ElGamal encryption failed: " + err.Error())
+ }
+
+ packetLen := len(header) /* header length */
+ packetLen += 2 /* mpi size */ + (c1.BitLen()+7)/8
+ packetLen += 2 /* mpi size */ + (c2.BitLen()+7)/8
+
+ err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
+ if err != nil {
+ return err
+ }
+ _, err = w.Write(header[:])
+ if err != nil {
+ return err
+ }
+ if _, err = w.Write(new(encoding.MPI).SetBig(c1).EncodedBytes()); err != nil {
+ return err
+ }
+ _, err = w.Write(new(encoding.MPI).SetBig(c2).EncodedBytes())
+ return err
+}
+
+func serializeEncryptedKeyECDH(w io.Writer, rand io.Reader, header []byte, pub *ecdh.PublicKey, keyBlock []byte, oid encoding.Field, fingerprint []byte) error {
+ vsG, c, err := ecdh.Encrypt(rand, pub, keyBlock, oid.EncodedBytes(), fingerprint)
+ if err != nil {
+ return errors.InvalidArgumentError("ECDH encryption failed: " + err.Error())
+ }
+
+ g := encoding.NewMPI(vsG)
+ m := encoding.NewOID(c)
+
+ packetLen := len(header) /* header length */
+ packetLen += int(g.EncodedLength()) + int(m.EncodedLength())
+
+ err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
+ if err != nil {
+ return err
+ }
+
+ _, err = w.Write(header[:])
+ if err != nil {
+ return err
+ }
+ if _, err = w.Write(g.EncodedBytes()); err != nil {
+ return err
+ }
+ _, err = w.Write(m.EncodedBytes())
+ return err
+}
+
+func serializeEncryptedKeyX25519(w io.Writer, rand io.Reader, header []byte, pub *x25519.PublicKey, keyBlock []byte, cipherFunc byte, version int) error {
+ ephemeralPublicX25519, ciphertext, err := x25519.Encrypt(rand, pub, keyBlock)
+ if err != nil {
+ return errors.InvalidArgumentError("x25519 encryption failed: " + err.Error())
+ }
+
+ packetLen := len(header) /* header length */
+ packetLen += x25519.EncodedFieldsLength(ciphertext, version == 6)
+
+ err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
+ if err != nil {
+ return err
+ }
+
+ _, err = w.Write(header[:])
+ if err != nil {
+ return err
+ }
+ return x25519.EncodeFields(w, ephemeralPublicX25519, ciphertext, cipherFunc, version == 6)
+}
+
+func serializeEncryptedKeyX448(w io.Writer, rand io.Reader, header []byte, pub *x448.PublicKey, keyBlock []byte, cipherFunc byte, version int) error {
+ ephemeralPublicX448, ciphertext, err := x448.Encrypt(rand, pub, keyBlock)
+ if err != nil {
+ return errors.InvalidArgumentError("x448 encryption failed: " + err.Error())
+ }
+
+ packetLen := len(header) /* header length */
+ packetLen += x448.EncodedFieldsLength(ciphertext, version == 6)
+
+ err = serializeHeader(w, packetTypeEncryptedKey, packetLen)
+ if err != nil {
+ return err
+ }
+
+ _, err = w.Write(header[:])
+ if err != nil {
+ return err
+ }
+ return x448.EncodeFields(w, ephemeralPublicX448, ciphertext, cipherFunc, version == 6)
+}
+
+func checksumKeyMaterial(key []byte) uint16 {
+ var checksum uint16
+ for _, v := range key {
+ checksum += uint16(v)
+ }
+ return checksum
+}
+
+func decodeChecksumKey(msg []byte) (key []byte, err error) {
+ key = msg[:len(msg)-2]
+ expectedChecksum := uint16(msg[len(msg)-2])<<8 | uint16(msg[len(msg)-1])
+ checksum := checksumKeyMaterial(key)
+ if checksum != expectedChecksum {
+ err = errors.StructuralError("session key checksum is incorrect")
+ }
+ return
+}
+
+func encodeChecksumKey(buffer []byte, key []byte) {
+ copy(buffer, key)
+ checksum := checksumKeyMaterial(key)
+ buffer[len(key)] = byte(checksum >> 8)
+ buffer[len(key)+1] = byte(checksum)
+}
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/literal.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/literal.go
similarity index 94%
rename from vendor/golang.org/x/crypto/openpgp/packet/literal.go
rename to vendor/github.com/ProtonMail/go-crypto/openpgp/packet/literal.go
index 1a9ec6e51..8a028c8a1 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/literal.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/literal.go
@@ -11,6 +11,7 @@ import (
// LiteralData represents an encrypted file. See RFC 4880, section 5.9.
type LiteralData struct {
+ Format uint8
IsBinary bool
FileName string
Time uint32 // Unix epoch time. Either creation time or modification time. 0 means undefined.
@@ -31,7 +32,8 @@ func (l *LiteralData) parse(r io.Reader) (err error) {
return
}
- l.IsBinary = buf[0] == 'b'
+ l.Format = buf[0]
+ l.IsBinary = l.Format == 'b'
fileNameLen := int(buf[1])
_, err = readFull(r, buf[:fileNameLen])
@@ -56,9 +58,9 @@ func (l *LiteralData) parse(r io.Reader) (err error) {
// on completion. The fileName is truncated to 255 bytes.
func SerializeLiteral(w io.WriteCloser, isBinary bool, fileName string, time uint32) (plaintext io.WriteCloser, err error) {
var buf [4]byte
- buf[0] = 't'
- if isBinary {
- buf[0] = 'b'
+ buf[0] = 'b'
+ if !isBinary {
+ buf[0] = 'u'
}
if len(fileName) > 255 {
fileName = fileName[:255]
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/marker.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/marker.go
new file mode 100644
index 000000000..1ee378ba3
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/marker.go
@@ -0,0 +1,33 @@
+package packet
+
+import (
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+type Marker struct{}
+
+const markerString = "PGP"
+
+// parse just checks if the packet contains "PGP".
+func (m *Marker) parse(reader io.Reader) error {
+ var buffer [3]byte
+ if _, err := io.ReadFull(reader, buffer[:]); err != nil {
+ return err
+ }
+ if string(buffer[:]) != markerString {
+ return errors.StructuralError("invalid marker packet")
+ }
+ return nil
+}
+
+// SerializeMarker writes a marker packet to writer.
+func SerializeMarker(writer io.Writer) error {
+ err := serializeHeader(writer, packetTypeMarker, len(markerString))
+ if err != nil {
+ return err
+ }
+ _, err = writer.Write([]byte(markerString))
+ return err
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/notation.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/notation.go
new file mode 100644
index 000000000..2c3e3f50b
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/notation.go
@@ -0,0 +1,29 @@
+package packet
+
+// Notation type represents a Notation Data subpacket
+// see https://tools.ietf.org/html/rfc4880#section-5.2.3.16
+type Notation struct {
+ Name string
+ Value []byte
+ IsCritical bool
+ IsHumanReadable bool
+}
+
+func (notation *Notation) getData() []byte {
+ nameData := []byte(notation.Name)
+ nameLen := len(nameData)
+ valueLen := len(notation.Value)
+
+ data := make([]byte, 8+nameLen+valueLen)
+ if notation.IsHumanReadable {
+ data[0] = 0x80
+ }
+
+ data[4] = byte(nameLen >> 8)
+ data[5] = byte(nameLen)
+ data[6] = byte(valueLen >> 8)
+ data[7] = byte(valueLen)
+ copy(data[8:8+nameLen], nameData)
+ copy(data[8+nameLen:], notation.Value)
+ return data
+}
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/ocfb.go
similarity index 92%
rename from vendor/golang.org/x/crypto/openpgp/packet/ocfb.go
rename to vendor/github.com/ProtonMail/go-crypto/openpgp/packet/ocfb.go
index ce2a33a54..4f26d0a00 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/ocfb.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/ocfb.go
@@ -85,8 +85,7 @@ type ocfbDecrypter struct {
// NewOCFBDecrypter returns a cipher.Stream which decrypts data with OpenPGP's
// cipher feedback mode using the given cipher.Block. Prefix must be the first
// blockSize + 2 bytes of the ciphertext, where blockSize is the cipher.Block's
-// block size. If an incorrect key is detected then nil is returned. On
-// successful exit, blockSize+2 bytes of decrypted data are written into
+// block size. On successful exit, blockSize+2 bytes of decrypted data are written into
// prefix. Resync determines if the "resynchronization step" from RFC 4880,
// 13.9 step 7 is performed. Different parts of OpenPGP vary on this point.
func NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption) cipher.Stream {
@@ -112,11 +111,6 @@ func NewOCFBDecrypter(block cipher.Block, prefix []byte, resync OCFBResyncOption
prefixCopy[blockSize] ^= x.fre[0]
prefixCopy[blockSize+1] ^= x.fre[1]
- if prefixCopy[blockSize-2] != prefixCopy[blockSize] ||
- prefixCopy[blockSize-1] != prefixCopy[blockSize+1] {
- return nil
- }
-
if resync {
block.Encrypt(x.fre, prefix[2:])
} else {
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/one_pass_signature.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/one_pass_signature.go
new file mode 100644
index 000000000..f393c4063
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/one_pass_signature.go
@@ -0,0 +1,157 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "crypto"
+ "encoding/binary"
+ "io"
+ "strconv"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+)
+
+// OnePassSignature represents a one-pass signature packet. See RFC 4880,
+// section 5.4.
+type OnePassSignature struct {
+ Version int
+ SigType SignatureType
+ Hash crypto.Hash
+ PubKeyAlgo PublicKeyAlgorithm
+ KeyId uint64
+ IsLast bool
+ Salt []byte // v6 only
+ KeyFingerprint []byte // v6 only
+}
+
+func (ops *OnePassSignature) parse(r io.Reader) (err error) {
+ var buf [8]byte
+ // Read: version | signature type | hash algorithm | public-key algorithm
+ _, err = readFull(r, buf[:4])
+ if err != nil {
+ return
+ }
+ if buf[0] != 3 && buf[0] != 6 {
+ return errors.UnsupportedError("one-pass-signature packet version " + strconv.Itoa(int(buf[0])))
+ }
+ ops.Version = int(buf[0])
+
+ var ok bool
+ ops.Hash, ok = algorithm.HashIdToHashWithSha1(buf[2])
+ if !ok {
+ return errors.UnsupportedError("hash function: " + strconv.Itoa(int(buf[2])))
+ }
+
+ ops.SigType = SignatureType(buf[1])
+ ops.PubKeyAlgo = PublicKeyAlgorithm(buf[3])
+
+ if ops.Version == 6 {
+ // Only for v6, a variable-length field containing the salt
+ _, err = readFull(r, buf[:1])
+ if err != nil {
+ return
+ }
+ saltLength := int(buf[0])
+ var expectedSaltLength int
+ expectedSaltLength, err = SaltLengthForHash(ops.Hash)
+ if err != nil {
+ return
+ }
+ if saltLength != expectedSaltLength {
+ err = errors.StructuralError("unexpected salt size for the given hash algorithm")
+ return
+ }
+ salt := make([]byte, expectedSaltLength)
+ _, err = readFull(r, salt)
+ if err != nil {
+ return
+ }
+ ops.Salt = salt
+
+ // Only for v6 packets, 32 octets of the fingerprint of the signing key.
+ fingerprint := make([]byte, 32)
+ _, err = readFull(r, fingerprint)
+ if err != nil {
+ return
+ }
+ ops.KeyFingerprint = fingerprint
+ ops.KeyId = binary.BigEndian.Uint64(ops.KeyFingerprint[:8])
+ } else {
+ _, err = readFull(r, buf[:8])
+ if err != nil {
+ return
+ }
+ ops.KeyId = binary.BigEndian.Uint64(buf[:8])
+ }
+
+ _, err = readFull(r, buf[:1])
+ if err != nil {
+ return
+ }
+ ops.IsLast = buf[0] != 0
+ return
+}
+
+// Serialize marshals the given OnePassSignature to w.
+func (ops *OnePassSignature) Serialize(w io.Writer) error {
+ //v3 length 1+1+1+1+8+1 =
+ packetLength := 13
+ if ops.Version == 6 {
+ // v6 length 1+1+1+1+1+len(salt)+32+1 =
+ packetLength = 38 + len(ops.Salt)
+ }
+
+ if err := serializeHeader(w, packetTypeOnePassSignature, packetLength); err != nil {
+ return err
+ }
+
+ var buf [8]byte
+ buf[0] = byte(ops.Version)
+ buf[1] = uint8(ops.SigType)
+ var ok bool
+ buf[2], ok = algorithm.HashToHashIdWithSha1(ops.Hash)
+ if !ok {
+ return errors.UnsupportedError("hash type: " + strconv.Itoa(int(ops.Hash)))
+ }
+ buf[3] = uint8(ops.PubKeyAlgo)
+
+ _, err := w.Write(buf[:4])
+ if err != nil {
+ return err
+ }
+
+ if ops.Version == 6 {
+ // write salt for v6 signatures
+ _, err := w.Write([]byte{uint8(len(ops.Salt))})
+ if err != nil {
+ return err
+ }
+ _, err = w.Write(ops.Salt)
+ if err != nil {
+ return err
+ }
+
+ // write fingerprint v6 signatures
+ _, err = w.Write(ops.KeyFingerprint)
+ if err != nil {
+ return err
+ }
+ } else {
+ binary.BigEndian.PutUint64(buf[:8], ops.KeyId)
+ _, err := w.Write(buf[:8])
+ if err != nil {
+ return err
+ }
+ }
+
+ isLast := []byte{byte(0)}
+ if ops.IsLast {
+ isLast[0] = 1
+ }
+
+ _, err = w.Write(isLast)
+ return err
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/opaque.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/opaque.go
new file mode 100644
index 000000000..cef7c661d
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/opaque.go
@@ -0,0 +1,170 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "bytes"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+// OpaquePacket represents an OpenPGP packet as raw, unparsed data. This is
+// useful for splitting and storing the original packet contents separately,
+// handling unsupported packet types or accessing parts of the packet not yet
+// implemented by this package.
+type OpaquePacket struct {
+ // Packet type
+ Tag uint8
+ // Reason why the packet was parsed opaquely
+ Reason error
+ // Binary contents of the packet data
+ Contents []byte
+}
+
+func (op *OpaquePacket) parse(r io.Reader) (err error) {
+ op.Contents, err = io.ReadAll(r)
+ return
+}
+
+// Serialize marshals the packet to a writer in its original form, including
+// the packet header.
+func (op *OpaquePacket) Serialize(w io.Writer) (err error) {
+ err = serializeHeader(w, packetType(op.Tag), len(op.Contents))
+ if err == nil {
+ _, err = w.Write(op.Contents)
+ }
+ return
+}
+
+// Parse attempts to parse the opaque contents into a structure supported by
+// this package. If the packet is not known then the result will be another
+// OpaquePacket.
+func (op *OpaquePacket) Parse() (p Packet, err error) {
+ hdr := bytes.NewBuffer(nil)
+ err = serializeHeader(hdr, packetType(op.Tag), len(op.Contents))
+ if err != nil {
+ op.Reason = err
+ return op, err
+ }
+ p, err = Read(io.MultiReader(hdr, bytes.NewBuffer(op.Contents)))
+ if err != nil {
+ op.Reason = err
+ p = op
+ }
+ return
+}
+
+// OpaqueReader reads OpaquePackets from an io.Reader.
+type OpaqueReader struct {
+ r io.Reader
+}
+
+func NewOpaqueReader(r io.Reader) *OpaqueReader {
+ return &OpaqueReader{r: r}
+}
+
+// Read the next OpaquePacket.
+func (or *OpaqueReader) Next() (op *OpaquePacket, err error) {
+ tag, _, contents, err := readHeader(or.r)
+ if err != nil {
+ return
+ }
+ op = &OpaquePacket{Tag: uint8(tag), Reason: err}
+ err = op.parse(contents)
+ if err != nil {
+ consumeAll(contents)
+ }
+ return
+}
+
+// OpaqueSubpacket represents an unparsed OpenPGP subpacket,
+// as found in signature and user attribute packets.
+type OpaqueSubpacket struct {
+ SubType uint8
+ EncodedLength []byte // Store the original encoded length for signature verifications.
+ Contents []byte
+}
+
+// OpaqueSubpackets extracts opaque, unparsed OpenPGP subpackets from
+// their byte representation.
+func OpaqueSubpackets(contents []byte) (result []*OpaqueSubpacket, err error) {
+ var (
+ subHeaderLen int
+ subPacket *OpaqueSubpacket
+ )
+ for len(contents) > 0 {
+ subHeaderLen, subPacket, err = nextSubpacket(contents)
+ if err != nil {
+ break
+ }
+ result = append(result, subPacket)
+ contents = contents[subHeaderLen+len(subPacket.Contents):]
+ }
+ return
+}
+
+func nextSubpacket(contents []byte) (subHeaderLen int, subPacket *OpaqueSubpacket, err error) {
+ // RFC 4880, section 5.2.3.1
+ var subLen uint32
+ var encodedLength []byte
+ if len(contents) < 1 {
+ goto Truncated
+ }
+ subPacket = &OpaqueSubpacket{}
+ switch {
+ case contents[0] < 192:
+ subHeaderLen = 2 // 1 length byte, 1 subtype byte
+ if len(contents) < subHeaderLen {
+ goto Truncated
+ }
+ encodedLength = contents[0:1]
+ subLen = uint32(contents[0])
+ contents = contents[1:]
+ case contents[0] < 255:
+ subHeaderLen = 3 // 2 length bytes, 1 subtype
+ if len(contents) < subHeaderLen {
+ goto Truncated
+ }
+ encodedLength = contents[0:2]
+ subLen = uint32(contents[0]-192)<<8 + uint32(contents[1]) + 192
+ contents = contents[2:]
+ default:
+ subHeaderLen = 6 // 5 length bytes, 1 subtype
+ if len(contents) < subHeaderLen {
+ goto Truncated
+ }
+ encodedLength = contents[0:5]
+ subLen = uint32(contents[1])<<24 |
+ uint32(contents[2])<<16 |
+ uint32(contents[3])<<8 |
+ uint32(contents[4])
+ contents = contents[5:]
+
+ }
+ if subLen > uint32(len(contents)) || subLen == 0 {
+ goto Truncated
+ }
+ subPacket.SubType = contents[0]
+ subPacket.EncodedLength = encodedLength
+ subPacket.Contents = contents[1:subLen]
+ return
+Truncated:
+ err = errors.StructuralError("subpacket truncated")
+ return
+}
+
+func (osp *OpaqueSubpacket) Serialize(w io.Writer) (err error) {
+ buf := make([]byte, 6)
+ copy(buf, osp.EncodedLength)
+ n := len(osp.EncodedLength)
+
+ buf[n] = osp.SubType
+ if _, err = w.Write(buf[:n+1]); err != nil {
+ return
+ }
+ _, err = w.Write(osp.Contents)
+ return
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go
new file mode 100644
index 000000000..1e92e22c9
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet.go
@@ -0,0 +1,675 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package packet implements parsing and serialization of OpenPGP packets, as
+// specified in RFC 4880.
+package packet // import "github.com/ProtonMail/go-crypto/openpgp/packet"
+
+import (
+ "bytes"
+ "crypto/cipher"
+ "crypto/rsa"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+)
+
+// readFull is the same as io.ReadFull except that reading zero bytes returns
+// ErrUnexpectedEOF rather than EOF.
+func readFull(r io.Reader, buf []byte) (n int, err error) {
+ n, err = io.ReadFull(r, buf)
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ return
+}
+
+// readLength reads an OpenPGP length from r. See RFC 4880, section 4.2.2.
+func readLength(r io.Reader) (length int64, isPartial bool, err error) {
+ var buf [4]byte
+ _, err = readFull(r, buf[:1])
+ if err != nil {
+ return
+ }
+ switch {
+ case buf[0] < 192:
+ length = int64(buf[0])
+ case buf[0] < 224:
+ length = int64(buf[0]-192) << 8
+ _, err = readFull(r, buf[0:1])
+ if err != nil {
+ return
+ }
+ length += int64(buf[0]) + 192
+ case buf[0] < 255:
+ length = int64(1) << (buf[0] & 0x1f)
+ isPartial = true
+ default:
+ _, err = readFull(r, buf[0:4])
+ if err != nil {
+ return
+ }
+ length = int64(buf[0])<<24 |
+ int64(buf[1])<<16 |
+ int64(buf[2])<<8 |
+ int64(buf[3])
+ }
+ return
+}
+
+// partialLengthReader wraps an io.Reader and handles OpenPGP partial lengths.
+// The continuation lengths are parsed and removed from the stream and EOF is
+// returned at the end of the packet. See RFC 4880, section 4.2.2.4.
+type partialLengthReader struct {
+ r io.Reader
+ remaining int64
+ isPartial bool
+}
+
+func (r *partialLengthReader) Read(p []byte) (n int, err error) {
+ for r.remaining == 0 {
+ if !r.isPartial {
+ return 0, io.EOF
+ }
+ r.remaining, r.isPartial, err = readLength(r.r)
+ if err != nil {
+ return 0, err
+ }
+ }
+
+ toRead := int64(len(p))
+ if toRead > r.remaining {
+ toRead = r.remaining
+ }
+
+ n, err = r.r.Read(p[:int(toRead)])
+ r.remaining -= int64(n)
+ if n < int(toRead) && err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ return
+}
+
+// partialLengthWriter writes a stream of data using OpenPGP partial lengths.
+// See RFC 4880, section 4.2.2.4.
+type partialLengthWriter struct {
+ w io.WriteCloser
+ buf bytes.Buffer
+ lengthByte [1]byte
+}
+
+func (w *partialLengthWriter) Write(p []byte) (n int, err error) {
+ bufLen := w.buf.Len()
+ if bufLen > 512 {
+ for power := uint(30); ; power-- {
+ l := 1 << power
+ if bufLen >= l {
+ w.lengthByte[0] = 224 + uint8(power)
+ _, err = w.w.Write(w.lengthByte[:])
+ if err != nil {
+ return
+ }
+ var m int
+ m, err = w.w.Write(w.buf.Next(l))
+ if err != nil {
+ return
+ }
+ if m != l {
+ return 0, io.ErrShortWrite
+ }
+ break
+ }
+ }
+ }
+ return w.buf.Write(p)
+}
+
+func (w *partialLengthWriter) Close() (err error) {
+ len := w.buf.Len()
+ err = serializeLength(w.w, len)
+ if err != nil {
+ return err
+ }
+ _, err = w.buf.WriteTo(w.w)
+ if err != nil {
+ return err
+ }
+ return w.w.Close()
+}
+
+// A spanReader is an io.LimitReader, but it returns ErrUnexpectedEOF if the
+// underlying Reader returns EOF before the limit has been reached.
+type spanReader struct {
+ r io.Reader
+ n int64
+}
+
+func (l *spanReader) Read(p []byte) (n int, err error) {
+ if l.n <= 0 {
+ return 0, io.EOF
+ }
+ if int64(len(p)) > l.n {
+ p = p[0:l.n]
+ }
+ n, err = l.r.Read(p)
+ l.n -= int64(n)
+ if l.n > 0 && err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ return
+}
+
+// readHeader parses a packet header and returns an io.Reader which will return
+// the contents of the packet. See RFC 4880, section 4.2.
+func readHeader(r io.Reader) (tag packetType, length int64, contents io.Reader, err error) {
+ var buf [4]byte
+ _, err = io.ReadFull(r, buf[:1])
+ if err != nil {
+ return
+ }
+ if buf[0]&0x80 == 0 {
+ err = errors.StructuralError("tag byte does not have MSB set")
+ return
+ }
+ if buf[0]&0x40 == 0 {
+ // Old format packet
+ tag = packetType((buf[0] & 0x3f) >> 2)
+ lengthType := buf[0] & 3
+ if lengthType == 3 {
+ length = -1
+ contents = r
+ return
+ }
+ lengthBytes := 1 << lengthType
+ _, err = readFull(r, buf[0:lengthBytes])
+ if err != nil {
+ return
+ }
+ for i := 0; i < lengthBytes; i++ {
+ length <<= 8
+ length |= int64(buf[i])
+ }
+ contents = &spanReader{r, length}
+ return
+ }
+
+ // New format packet
+ tag = packetType(buf[0] & 0x3f)
+ length, isPartial, err := readLength(r)
+ if err != nil {
+ return
+ }
+ if isPartial {
+ contents = &partialLengthReader{
+ remaining: length,
+ isPartial: true,
+ r: r,
+ }
+ length = -1
+ } else {
+ contents = &spanReader{r, length}
+ }
+ return
+}
+
+// serializeHeader writes an OpenPGP packet header to w. See RFC 4880, section
+// 4.2.
+func serializeHeader(w io.Writer, ptype packetType, length int) (err error) {
+ err = serializeType(w, ptype)
+ if err != nil {
+ return
+ }
+ return serializeLength(w, length)
+}
+
+// serializeType writes an OpenPGP packet type to w. See RFC 4880, section
+// 4.2.
+func serializeType(w io.Writer, ptype packetType) (err error) {
+ var buf [1]byte
+ buf[0] = 0x80 | 0x40 | byte(ptype)
+ _, err = w.Write(buf[:])
+ return
+}
+
+// serializeLength writes an OpenPGP packet length to w. See RFC 4880, section
+// 4.2.2.
+func serializeLength(w io.Writer, length int) (err error) {
+ var buf [5]byte
+ var n int
+
+ if length < 192 {
+ buf[0] = byte(length)
+ n = 1
+ } else if length < 8384 {
+ length -= 192
+ buf[0] = 192 + byte(length>>8)
+ buf[1] = byte(length)
+ n = 2
+ } else {
+ buf[0] = 255
+ buf[1] = byte(length >> 24)
+ buf[2] = byte(length >> 16)
+ buf[3] = byte(length >> 8)
+ buf[4] = byte(length)
+ n = 5
+ }
+
+ _, err = w.Write(buf[:n])
+ return
+}
+
+// serializeStreamHeader writes an OpenPGP packet header to w where the
+// length of the packet is unknown. It returns a io.WriteCloser which can be
+// used to write the contents of the packet. See RFC 4880, section 4.2.
+func serializeStreamHeader(w io.WriteCloser, ptype packetType) (out io.WriteCloser, err error) {
+ err = serializeType(w, ptype)
+ if err != nil {
+ return
+ }
+ out = &partialLengthWriter{w: w}
+ return
+}
+
+// Packet represents an OpenPGP packet. Users are expected to try casting
+// instances of this interface to specific packet types.
+type Packet interface {
+ parse(io.Reader) error
+}
+
+// consumeAll reads from the given Reader until error, returning the number of
+// bytes read.
+func consumeAll(r io.Reader) (n int64, err error) {
+ var m int
+ var buf [1024]byte
+
+ for {
+ m, err = r.Read(buf[:])
+ n += int64(m)
+ if err == io.EOF {
+ err = nil
+ return
+ }
+ if err != nil {
+ return
+ }
+ }
+}
+
+// packetType represents the numeric ids of the different OpenPGP packet types. See
+// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-2
+type packetType uint8
+
+const (
+ packetTypeEncryptedKey packetType = 1
+ packetTypeSignature packetType = 2
+ packetTypeSymmetricKeyEncrypted packetType = 3
+ packetTypeOnePassSignature packetType = 4
+ packetTypePrivateKey packetType = 5
+ packetTypePublicKey packetType = 6
+ packetTypePrivateSubkey packetType = 7
+ packetTypeCompressed packetType = 8
+ packetTypeSymmetricallyEncrypted packetType = 9
+ packetTypeMarker packetType = 10
+ packetTypeLiteralData packetType = 11
+ packetTypeTrust packetType = 12
+ packetTypeUserId packetType = 13
+ packetTypePublicSubkey packetType = 14
+ packetTypeUserAttribute packetType = 17
+ packetTypeSymmetricallyEncryptedIntegrityProtected packetType = 18
+ packetTypeAEADEncrypted packetType = 20
+ packetPadding packetType = 21
+)
+
+// EncryptedDataPacket holds encrypted data. It is currently implemented by
+// SymmetricallyEncrypted and AEADEncrypted.
+type EncryptedDataPacket interface {
+ Decrypt(CipherFunction, []byte) (io.ReadCloser, error)
+}
+
+// Read reads a single OpenPGP packet from the given io.Reader. If there is an
+// error parsing a packet, the whole packet is consumed from the input.
+func Read(r io.Reader) (p Packet, err error) {
+ tag, len, contents, err := readHeader(r)
+ if err != nil {
+ return
+ }
+
+ switch tag {
+ case packetTypeEncryptedKey:
+ p = new(EncryptedKey)
+ case packetTypeSignature:
+ p = new(Signature)
+ case packetTypeSymmetricKeyEncrypted:
+ p = new(SymmetricKeyEncrypted)
+ case packetTypeOnePassSignature:
+ p = new(OnePassSignature)
+ case packetTypePrivateKey, packetTypePrivateSubkey:
+ pk := new(PrivateKey)
+ if tag == packetTypePrivateSubkey {
+ pk.IsSubkey = true
+ }
+ p = pk
+ case packetTypePublicKey, packetTypePublicSubkey:
+ isSubkey := tag == packetTypePublicSubkey
+ p = &PublicKey{IsSubkey: isSubkey}
+ case packetTypeCompressed:
+ p = new(Compressed)
+ case packetTypeSymmetricallyEncrypted:
+ p = new(SymmetricallyEncrypted)
+ case packetTypeLiteralData:
+ p = new(LiteralData)
+ case packetTypeUserId:
+ p = new(UserId)
+ case packetTypeUserAttribute:
+ p = new(UserAttribute)
+ case packetTypeSymmetricallyEncryptedIntegrityProtected:
+ se := new(SymmetricallyEncrypted)
+ se.IntegrityProtected = true
+ p = se
+ case packetTypeAEADEncrypted:
+ p = new(AEADEncrypted)
+ case packetPadding:
+ p = Padding(len)
+ case packetTypeMarker:
+ p = new(Marker)
+ case packetTypeTrust:
+ // Not implemented, just consume
+ err = errors.UnknownPacketTypeError(tag)
+ default:
+ // Packet Tags from 0 to 39 are critical.
+ // Packet Tags from 40 to 63 are non-critical.
+ if tag < 40 {
+ err = errors.CriticalUnknownPacketTypeError(tag)
+ } else {
+ err = errors.UnknownPacketTypeError(tag)
+ }
+ }
+ if p != nil {
+ err = p.parse(contents)
+ }
+ if err != nil {
+ consumeAll(contents)
+ }
+ return
+}
+
+// ReadWithCheck reads a single OpenPGP message packet from the given io.Reader. If there is an
+// error parsing a packet, the whole packet is consumed from the input.
+// ReadWithCheck additionally checks if the OpenPGP message packet sequence adheres
+// to the packet composition rules in rfc4880, if not throws an error.
+func ReadWithCheck(r io.Reader, sequence *SequenceVerifier) (p Packet, msgErr error, err error) {
+ tag, len, contents, err := readHeader(r)
+ if err != nil {
+ return
+ }
+ switch tag {
+ case packetTypeEncryptedKey:
+ msgErr = sequence.Next(ESKSymbol)
+ p = new(EncryptedKey)
+ case packetTypeSignature:
+ msgErr = sequence.Next(SigSymbol)
+ p = new(Signature)
+ case packetTypeSymmetricKeyEncrypted:
+ msgErr = sequence.Next(ESKSymbol)
+ p = new(SymmetricKeyEncrypted)
+ case packetTypeOnePassSignature:
+ msgErr = sequence.Next(OPSSymbol)
+ p = new(OnePassSignature)
+ case packetTypeCompressed:
+ msgErr = sequence.Next(CompSymbol)
+ p = new(Compressed)
+ case packetTypeSymmetricallyEncrypted:
+ msgErr = sequence.Next(EncSymbol)
+ p = new(SymmetricallyEncrypted)
+ case packetTypeLiteralData:
+ msgErr = sequence.Next(LDSymbol)
+ p = new(LiteralData)
+ case packetTypeSymmetricallyEncryptedIntegrityProtected:
+ msgErr = sequence.Next(EncSymbol)
+ se := new(SymmetricallyEncrypted)
+ se.IntegrityProtected = true
+ p = se
+ case packetTypeAEADEncrypted:
+ msgErr = sequence.Next(EncSymbol)
+ p = new(AEADEncrypted)
+ case packetPadding:
+ p = Padding(len)
+ case packetTypeMarker:
+ p = new(Marker)
+ case packetTypeTrust:
+ // Not implemented, just consume
+ err = errors.UnknownPacketTypeError(tag)
+ case packetTypePrivateKey,
+ packetTypePrivateSubkey,
+ packetTypePublicKey,
+ packetTypePublicSubkey,
+ packetTypeUserId,
+ packetTypeUserAttribute:
+ msgErr = sequence.Next(UnknownSymbol)
+ consumeAll(contents)
+ default:
+ // Packet Tags from 0 to 39 are critical.
+ // Packet Tags from 40 to 63 are non-critical.
+ if tag < 40 {
+ err = errors.CriticalUnknownPacketTypeError(tag)
+ } else {
+ err = errors.UnknownPacketTypeError(tag)
+ }
+ }
+ if p != nil {
+ err = p.parse(contents)
+ }
+ if err != nil {
+ consumeAll(contents)
+ }
+ return
+}
+
+// SignatureType represents the different semantic meanings of an OpenPGP
+// signature. See RFC 4880, section 5.2.1.
+type SignatureType uint8
+
+const (
+ SigTypeBinary SignatureType = 0x00
+ SigTypeText SignatureType = 0x01
+ SigTypeGenericCert SignatureType = 0x10
+ SigTypePersonaCert SignatureType = 0x11
+ SigTypeCasualCert SignatureType = 0x12
+ SigTypePositiveCert SignatureType = 0x13
+ SigTypeSubkeyBinding SignatureType = 0x18
+ SigTypePrimaryKeyBinding SignatureType = 0x19
+ SigTypeDirectSignature SignatureType = 0x1F
+ SigTypeKeyRevocation SignatureType = 0x20
+ SigTypeSubkeyRevocation SignatureType = 0x28
+ SigTypeCertificationRevocation SignatureType = 0x30
+)
+
+// PublicKeyAlgorithm represents the different public key system specified for
+// OpenPGP. See
+// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-12
+type PublicKeyAlgorithm uint8
+
+const (
+ PubKeyAlgoRSA PublicKeyAlgorithm = 1
+ PubKeyAlgoElGamal PublicKeyAlgorithm = 16
+ PubKeyAlgoDSA PublicKeyAlgorithm = 17
+ // RFC 6637, Section 5.
+ PubKeyAlgoECDH PublicKeyAlgorithm = 18
+ PubKeyAlgoECDSA PublicKeyAlgorithm = 19
+ // https://www.ietf.org/archive/id/draft-koch-eddsa-for-openpgp-04.txt
+ PubKeyAlgoEdDSA PublicKeyAlgorithm = 22
+ // https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh
+ PubKeyAlgoX25519 PublicKeyAlgorithm = 25
+ PubKeyAlgoX448 PublicKeyAlgorithm = 26
+ PubKeyAlgoEd25519 PublicKeyAlgorithm = 27
+ PubKeyAlgoEd448 PublicKeyAlgorithm = 28
+
+ // Deprecated in RFC 4880, Section 13.5. Use key flags instead.
+ PubKeyAlgoRSAEncryptOnly PublicKeyAlgorithm = 2
+ PubKeyAlgoRSASignOnly PublicKeyAlgorithm = 3
+)
+
+// CanEncrypt returns true if it's possible to encrypt a message to a public
+// key of the given type.
+func (pka PublicKeyAlgorithm) CanEncrypt() bool {
+ switch pka {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoElGamal, PubKeyAlgoECDH, PubKeyAlgoX25519, PubKeyAlgoX448:
+ return true
+ }
+ return false
+}
+
+// CanSign returns true if it's possible for a public key of the given type to
+// sign a message.
+func (pka PublicKeyAlgorithm) CanSign() bool {
+ switch pka {
+ case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA, PubKeyAlgoEdDSA, PubKeyAlgoEd25519, PubKeyAlgoEd448:
+ return true
+ }
+ return false
+}
+
+// CipherFunction represents the different block ciphers specified for OpenPGP. See
+// http://www.iana.org/assignments/pgp-parameters/pgp-parameters.xhtml#pgp-parameters-13
+type CipherFunction algorithm.CipherFunction
+
+const (
+ Cipher3DES CipherFunction = 2
+ CipherCAST5 CipherFunction = 3
+ CipherAES128 CipherFunction = 7
+ CipherAES192 CipherFunction = 8
+ CipherAES256 CipherFunction = 9
+)
+
+// KeySize returns the key size, in bytes, of cipher.
+func (cipher CipherFunction) KeySize() int {
+ return algorithm.CipherFunction(cipher).KeySize()
+}
+
+// IsSupported returns true if the cipher is supported from the library
+func (cipher CipherFunction) IsSupported() bool {
+ return algorithm.CipherFunction(cipher).KeySize() > 0
+}
+
+// blockSize returns the block size, in bytes, of cipher.
+func (cipher CipherFunction) blockSize() int {
+ return algorithm.CipherFunction(cipher).BlockSize()
+}
+
+// new returns a fresh instance of the given cipher.
+func (cipher CipherFunction) new(key []byte) (block cipher.Block) {
+ return algorithm.CipherFunction(cipher).New(key)
+}
+
+// padToKeySize left-pads a MPI with zeroes to match the length of the
+// specified RSA public.
+func padToKeySize(pub *rsa.PublicKey, b []byte) []byte {
+ k := (pub.N.BitLen() + 7) / 8
+ if len(b) >= k {
+ return b
+ }
+ bb := make([]byte, k)
+ copy(bb[len(bb)-len(b):], b)
+ return bb
+}
+
+// CompressionAlgo Represents the different compression algorithms
+// supported by OpenPGP (except for BZIP2, which is not currently
+// supported). See Section 9.3 of RFC 4880.
+type CompressionAlgo uint8
+
+const (
+ CompressionNone CompressionAlgo = 0
+ CompressionZIP CompressionAlgo = 1
+ CompressionZLIB CompressionAlgo = 2
+)
+
+// AEADMode represents the different Authenticated Encryption with Associated
+// Data specified for OpenPGP.
+// See https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-9.6
+type AEADMode algorithm.AEADMode
+
+const (
+ AEADModeEAX AEADMode = 1
+ AEADModeOCB AEADMode = 2
+ AEADModeGCM AEADMode = 3
+)
+
+func (mode AEADMode) IvLength() int {
+ return algorithm.AEADMode(mode).NonceLength()
+}
+
+func (mode AEADMode) TagLength() int {
+ return algorithm.AEADMode(mode).TagLength()
+}
+
+// IsSupported returns true if the aead mode is supported from the library
+func (mode AEADMode) IsSupported() bool {
+ return algorithm.AEADMode(mode).TagLength() > 0
+}
+
+// new returns a fresh instance of the given mode.
+func (mode AEADMode) new(block cipher.Block) cipher.AEAD {
+ return algorithm.AEADMode(mode).New(block)
+}
+
+// ReasonForRevocation represents a revocation reason code as per RFC4880
+// section 5.2.3.23.
+type ReasonForRevocation uint8
+
+const (
+ NoReason ReasonForRevocation = 0
+ KeySuperseded ReasonForRevocation = 1
+ KeyCompromised ReasonForRevocation = 2
+ KeyRetired ReasonForRevocation = 3
+ UserIDNotValid ReasonForRevocation = 32
+ Unknown ReasonForRevocation = 200
+)
+
+func NewReasonForRevocation(value byte) ReasonForRevocation {
+ if value < 4 || value == 32 {
+ return ReasonForRevocation(value)
+ }
+ return Unknown
+}
+
+// Curve is a mapping to supported ECC curves for key generation.
+// See https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-06.html#name-curve-specific-wire-formats
+type Curve string
+
+const (
+ Curve25519 Curve = "Curve25519"
+ Curve448 Curve = "Curve448"
+ CurveNistP256 Curve = "P256"
+ CurveNistP384 Curve = "P384"
+ CurveNistP521 Curve = "P521"
+ CurveSecP256k1 Curve = "SecP256k1"
+ CurveBrainpoolP256 Curve = "BrainpoolP256"
+ CurveBrainpoolP384 Curve = "BrainpoolP384"
+ CurveBrainpoolP512 Curve = "BrainpoolP512"
+)
+
+// TrustLevel represents a trust level per RFC4880 5.2.3.13
+type TrustLevel uint8
+
+// TrustAmount represents a trust amount per RFC4880 5.2.3.13
+type TrustAmount uint8
+
+const (
+ // versionSize is the length in bytes of the version value.
+ versionSize = 1
+ // algorithmSize is the length in bytes of the key algorithm value.
+ algorithmSize = 1
+ // keyVersionSize is the length in bytes of the key version value
+ keyVersionSize = 1
+ // keyIdSize is the length in bytes of the key identifier value.
+ keyIdSize = 8
+ // timestampSize is the length in bytes of encoded timestamps.
+ timestampSize = 4
+ // fingerprintSizeV6 is the length in bytes of the key fingerprint in v6.
+ fingerprintSizeV6 = 32
+ // fingerprintSize is the length in bytes of the key fingerprint.
+ fingerprintSize = 20
+)
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_sequence.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_sequence.go
new file mode 100644
index 000000000..55a8a56c2
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_sequence.go
@@ -0,0 +1,222 @@
+package packet
+
+// This file implements the pushdown automata (PDA) from PGPainless (Paul Schaub)
+// to verify pgp packet sequences. See Paul's blogpost for more details:
+// https://blog.jabberhead.tk/2022/10/26/implementing-packet-sequence-validation-using-pushdown-automata/
+import (
+ "fmt"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+func NewErrMalformedMessage(from State, input InputSymbol, stackSymbol StackSymbol) errors.ErrMalformedMessage {
+ return errors.ErrMalformedMessage(fmt.Sprintf("state %d, input symbol %d, stack symbol %d ", from, input, stackSymbol))
+}
+
+// InputSymbol defines the input alphabet of the PDA
+type InputSymbol uint8
+
+const (
+ LDSymbol InputSymbol = iota
+ SigSymbol
+ OPSSymbol
+ CompSymbol
+ ESKSymbol
+ EncSymbol
+ EOSSymbol
+ UnknownSymbol
+)
+
+// StackSymbol defines the stack alphabet of the PDA
+type StackSymbol int8
+
+const (
+ MsgStackSymbol StackSymbol = iota
+ OpsStackSymbol
+ KeyStackSymbol
+ EndStackSymbol
+ EmptyStackSymbol
+)
+
+// State defines the states of the PDA
+type State int8
+
+const (
+ OpenPGPMessage State = iota
+ ESKMessage
+ LiteralMessage
+ CompressedMessage
+ EncryptedMessage
+ ValidMessage
+)
+
+// transition represents a state transition in the PDA
+type transition func(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error)
+
+// SequenceVerifier is a pushdown automata to verify
+// PGP messages packet sequences according to rfc4880.
+type SequenceVerifier struct {
+ stack []StackSymbol
+ state State
+}
+
+// Next performs a state transition with the given input symbol.
+// If the transition fails a ErrMalformedMessage is returned.
+func (sv *SequenceVerifier) Next(input InputSymbol) error {
+ for {
+ stackSymbol := sv.popStack()
+ transitionFunc := getTransition(sv.state)
+ nextState, newStackSymbols, redo, err := transitionFunc(input, stackSymbol)
+ if err != nil {
+ return err
+ }
+ if redo {
+ sv.pushStack(stackSymbol)
+ }
+ for _, newStackSymbol := range newStackSymbols {
+ sv.pushStack(newStackSymbol)
+ }
+ sv.state = nextState
+ if !redo {
+ break
+ }
+ }
+ return nil
+}
+
+// Valid returns true if RDA is in a valid state.
+func (sv *SequenceVerifier) Valid() bool {
+ return sv.state == ValidMessage && len(sv.stack) == 0
+}
+
+func (sv *SequenceVerifier) AssertValid() error {
+ if !sv.Valid() {
+ return errors.ErrMalformedMessage("invalid message")
+ }
+ return nil
+}
+
+func NewSequenceVerifier() *SequenceVerifier {
+ return &SequenceVerifier{
+ stack: []StackSymbol{EndStackSymbol, MsgStackSymbol},
+ state: OpenPGPMessage,
+ }
+}
+
+func (sv *SequenceVerifier) popStack() StackSymbol {
+ if len(sv.stack) == 0 {
+ return EmptyStackSymbol
+ }
+ elemIndex := len(sv.stack) - 1
+ stackSymbol := sv.stack[elemIndex]
+ sv.stack = sv.stack[:elemIndex]
+ return stackSymbol
+}
+
+func (sv *SequenceVerifier) pushStack(stackSymbol StackSymbol) {
+ sv.stack = append(sv.stack, stackSymbol)
+}
+
+func getTransition(from State) transition {
+ switch from {
+ case OpenPGPMessage:
+ return fromOpenPGPMessage
+ case LiteralMessage:
+ return fromLiteralMessage
+ case CompressedMessage:
+ return fromCompressedMessage
+ case EncryptedMessage:
+ return fromEncryptedMessage
+ case ESKMessage:
+ return fromESKMessage
+ case ValidMessage:
+ return fromValidMessage
+ }
+ return nil
+}
+
+// fromOpenPGPMessage is the transition for the state OpenPGPMessage.
+func fromOpenPGPMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
+ if stackSymbol != MsgStackSymbol {
+ return 0, nil, false, NewErrMalformedMessage(OpenPGPMessage, input, stackSymbol)
+ }
+ switch input {
+ case LDSymbol:
+ return LiteralMessage, nil, false, nil
+ case SigSymbol:
+ return OpenPGPMessage, []StackSymbol{MsgStackSymbol}, false, nil
+ case OPSSymbol:
+ return OpenPGPMessage, []StackSymbol{OpsStackSymbol, MsgStackSymbol}, false, nil
+ case CompSymbol:
+ return CompressedMessage, nil, false, nil
+ case ESKSymbol:
+ return ESKMessage, []StackSymbol{KeyStackSymbol}, false, nil
+ case EncSymbol:
+ return EncryptedMessage, nil, false, nil
+ }
+ return 0, nil, false, NewErrMalformedMessage(OpenPGPMessage, input, stackSymbol)
+}
+
+// fromESKMessage is the transition for the state ESKMessage.
+func fromESKMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
+ if stackSymbol != KeyStackSymbol {
+ return 0, nil, false, NewErrMalformedMessage(ESKMessage, input, stackSymbol)
+ }
+ switch input {
+ case ESKSymbol:
+ return ESKMessage, []StackSymbol{KeyStackSymbol}, false, nil
+ case EncSymbol:
+ return EncryptedMessage, nil, false, nil
+ }
+ return 0, nil, false, NewErrMalformedMessage(ESKMessage, input, stackSymbol)
+}
+
+// fromLiteralMessage is the transition for the state LiteralMessage.
+func fromLiteralMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
+ switch input {
+ case SigSymbol:
+ if stackSymbol == OpsStackSymbol {
+ return LiteralMessage, nil, false, nil
+ }
+ case EOSSymbol:
+ if stackSymbol == EndStackSymbol {
+ return ValidMessage, nil, false, nil
+ }
+ }
+ return 0, nil, false, NewErrMalformedMessage(LiteralMessage, input, stackSymbol)
+}
+
+// fromLiteralMessage is the transition for the state CompressedMessage.
+func fromCompressedMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
+ switch input {
+ case SigSymbol:
+ if stackSymbol == OpsStackSymbol {
+ return CompressedMessage, nil, false, nil
+ }
+ case EOSSymbol:
+ if stackSymbol == EndStackSymbol {
+ return ValidMessage, nil, false, nil
+ }
+ }
+ return OpenPGPMessage, []StackSymbol{MsgStackSymbol}, true, nil
+}
+
+// fromEncryptedMessage is the transition for the state EncryptedMessage.
+func fromEncryptedMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
+ switch input {
+ case SigSymbol:
+ if stackSymbol == OpsStackSymbol {
+ return EncryptedMessage, nil, false, nil
+ }
+ case EOSSymbol:
+ if stackSymbol == EndStackSymbol {
+ return ValidMessage, nil, false, nil
+ }
+ }
+ return OpenPGPMessage, []StackSymbol{MsgStackSymbol}, true, nil
+}
+
+// fromValidMessage is the transition for the state ValidMessage.
+func fromValidMessage(input InputSymbol, stackSymbol StackSymbol) (State, []StackSymbol, bool, error) {
+ return 0, nil, false, NewErrMalformedMessage(ValidMessage, input, stackSymbol)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_unsupported.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_unsupported.go
new file mode 100644
index 000000000..2d714723c
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/packet_unsupported.go
@@ -0,0 +1,24 @@
+package packet
+
+import (
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+// UnsupportedPackage represents a OpenPGP packet with a known packet type
+// but with unsupported content.
+type UnsupportedPacket struct {
+ IncompletePacket Packet
+ Error errors.UnsupportedError
+}
+
+// Implements the Packet interface
+func (up *UnsupportedPacket) parse(read io.Reader) error {
+ err := up.IncompletePacket.parse(read)
+ if castedErr, ok := err.(errors.UnsupportedError); ok {
+ up.Error = castedErr
+ return nil
+ }
+ return err
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go
new file mode 100644
index 000000000..3b6a7045d
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/padding.go
@@ -0,0 +1,26 @@
+package packet
+
+import (
+ "io"
+)
+
+// Padding type represents a Padding Packet (Tag 21).
+// The padding type is represented by the length of its padding.
+// see https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh#name-padding-packet-tag-21
+type Padding int
+
+// parse just ignores the padding content.
+func (pad Padding) parse(reader io.Reader) error {
+ _, err := io.CopyN(io.Discard, reader, int64(pad))
+ return err
+}
+
+// SerializePadding writes the padding to writer.
+func (pad Padding) SerializePadding(writer io.Writer, rand io.Reader) error {
+ err := serializeHeader(writer, packetPadding, int(pad))
+ if err != nil {
+ return err
+ }
+ _, err = io.CopyN(writer, rand, int64(pad))
+ return err
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go
new file mode 100644
index 000000000..f04e6c6b8
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key.go
@@ -0,0 +1,1191 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "bytes"
+ "crypto"
+ "crypto/cipher"
+ "crypto/dsa"
+ "crypto/rsa"
+ "crypto/sha1"
+ "crypto/sha256"
+ "crypto/subtle"
+ "fmt"
+ "io"
+ "math/big"
+ "strconv"
+ "time"
+
+ "github.com/ProtonMail/go-crypto/openpgp/ecdh"
+ "github.com/ProtonMail/go-crypto/openpgp/ecdsa"
+ "github.com/ProtonMail/go-crypto/openpgp/ed25519"
+ "github.com/ProtonMail/go-crypto/openpgp/ed448"
+ "github.com/ProtonMail/go-crypto/openpgp/eddsa"
+ "github.com/ProtonMail/go-crypto/openpgp/elgamal"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
+ "github.com/ProtonMail/go-crypto/openpgp/s2k"
+ "github.com/ProtonMail/go-crypto/openpgp/x25519"
+ "github.com/ProtonMail/go-crypto/openpgp/x448"
+ "golang.org/x/crypto/hkdf"
+)
+
+// PrivateKey represents a possibly encrypted private key. See RFC 4880,
+// section 5.5.3.
+type PrivateKey struct {
+ PublicKey
+ Encrypted bool // if true then the private key is unavailable until Decrypt has been called.
+ encryptedData []byte
+ cipher CipherFunction
+ s2k func(out, in []byte)
+ aead AEADMode // only relevant if S2KAEAD is enabled
+ // An *{rsa|dsa|elgamal|ecdh|ecdsa|ed25519|ed448}.PrivateKey or
+ // crypto.Signer/crypto.Decrypter (Decryptor RSA only).
+ PrivateKey interface{}
+ iv []byte
+
+ // Type of encryption of the S2K packet
+ // Allowed values are 0 (Not encrypted), 253 (AEAD), 254 (SHA1), or
+ // 255 (2-byte checksum)
+ s2kType S2KType
+ // Full parameters of the S2K packet
+ s2kParams *s2k.Params
+}
+
+// S2KType s2k packet type
+type S2KType uint8
+
+const (
+ // S2KNON unencrypt
+ S2KNON S2KType = 0
+ // S2KAEAD use authenticated encryption
+ S2KAEAD S2KType = 253
+ // S2KSHA1 sha1 sum check
+ S2KSHA1 S2KType = 254
+ // S2KCHECKSUM sum check
+ S2KCHECKSUM S2KType = 255
+)
+
+func NewRSAPrivateKey(creationTime time.Time, priv *rsa.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewRSAPublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+func NewDSAPrivateKey(creationTime time.Time, priv *dsa.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewDSAPublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+func NewElGamalPrivateKey(creationTime time.Time, priv *elgamal.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewElGamalPublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+func NewECDSAPrivateKey(creationTime time.Time, priv *ecdsa.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewECDSAPublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+func NewEdDSAPrivateKey(creationTime time.Time, priv *eddsa.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewEdDSAPublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+func NewECDHPrivateKey(creationTime time.Time, priv *ecdh.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewECDHPublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+func NewX25519PrivateKey(creationTime time.Time, priv *x25519.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewX25519PublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+func NewX448PrivateKey(creationTime time.Time, priv *x448.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewX448PublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+func NewEd25519PrivateKey(creationTime time.Time, priv *ed25519.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewEd25519PublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+func NewEd448PrivateKey(creationTime time.Time, priv *ed448.PrivateKey) *PrivateKey {
+ pk := new(PrivateKey)
+ pk.PublicKey = *NewEd448PublicKey(creationTime, &priv.PublicKey)
+ pk.PrivateKey = priv
+ return pk
+}
+
+// NewSignerPrivateKey creates a PrivateKey from a crypto.Signer that
+// implements RSA, ECDSA or EdDSA.
+func NewSignerPrivateKey(creationTime time.Time, signer interface{}) *PrivateKey {
+ pk := new(PrivateKey)
+ // In general, the public Keys should be used as pointers. We still
+ // type-switch on the values, for backwards-compatibility.
+ switch pubkey := signer.(type) {
+ case *rsa.PrivateKey:
+ pk.PublicKey = *NewRSAPublicKey(creationTime, &pubkey.PublicKey)
+ case rsa.PrivateKey:
+ pk.PublicKey = *NewRSAPublicKey(creationTime, &pubkey.PublicKey)
+ case *ecdsa.PrivateKey:
+ pk.PublicKey = *NewECDSAPublicKey(creationTime, &pubkey.PublicKey)
+ case ecdsa.PrivateKey:
+ pk.PublicKey = *NewECDSAPublicKey(creationTime, &pubkey.PublicKey)
+ case *eddsa.PrivateKey:
+ pk.PublicKey = *NewEdDSAPublicKey(creationTime, &pubkey.PublicKey)
+ case eddsa.PrivateKey:
+ pk.PublicKey = *NewEdDSAPublicKey(creationTime, &pubkey.PublicKey)
+ case *ed25519.PrivateKey:
+ pk.PublicKey = *NewEd25519PublicKey(creationTime, &pubkey.PublicKey)
+ case ed25519.PrivateKey:
+ pk.PublicKey = *NewEd25519PublicKey(creationTime, &pubkey.PublicKey)
+ case *ed448.PrivateKey:
+ pk.PublicKey = *NewEd448PublicKey(creationTime, &pubkey.PublicKey)
+ case ed448.PrivateKey:
+ pk.PublicKey = *NewEd448PublicKey(creationTime, &pubkey.PublicKey)
+ default:
+ panic("openpgp: unknown signer type in NewSignerPrivateKey")
+ }
+ pk.PrivateKey = signer
+ return pk
+}
+
+// NewDecrypterPrivateKey creates a PrivateKey from a *{rsa|elgamal|ecdh|x25519|x448}.PrivateKey.
+func NewDecrypterPrivateKey(creationTime time.Time, decrypter interface{}) *PrivateKey {
+ pk := new(PrivateKey)
+ switch priv := decrypter.(type) {
+ case *rsa.PrivateKey:
+ pk.PublicKey = *NewRSAPublicKey(creationTime, &priv.PublicKey)
+ case *elgamal.PrivateKey:
+ pk.PublicKey = *NewElGamalPublicKey(creationTime, &priv.PublicKey)
+ case *ecdh.PrivateKey:
+ pk.PublicKey = *NewECDHPublicKey(creationTime, &priv.PublicKey)
+ case *x25519.PrivateKey:
+ pk.PublicKey = *NewX25519PublicKey(creationTime, &priv.PublicKey)
+ case *x448.PrivateKey:
+ pk.PublicKey = *NewX448PublicKey(creationTime, &priv.PublicKey)
+ default:
+ panic("openpgp: unknown decrypter type in NewDecrypterPrivateKey")
+ }
+ pk.PrivateKey = decrypter
+ return pk
+}
+
+func (pk *PrivateKey) parse(r io.Reader) (err error) {
+ err = (&pk.PublicKey).parse(r)
+ if err != nil {
+ return
+ }
+ v5 := pk.PublicKey.Version == 5
+ v6 := pk.PublicKey.Version == 6
+
+ if V5Disabled && v5 {
+ return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
+ }
+
+ var buf [1]byte
+ _, err = readFull(r, buf[:])
+ if err != nil {
+ return
+ }
+ pk.s2kType = S2KType(buf[0])
+ var optCount [1]byte
+ if v5 || (v6 && pk.s2kType != S2KNON) {
+ if _, err = readFull(r, optCount[:]); err != nil {
+ return
+ }
+ }
+
+ switch pk.s2kType {
+ case S2KNON:
+ pk.s2k = nil
+ pk.Encrypted = false
+ case S2KSHA1, S2KCHECKSUM, S2KAEAD:
+ if (v5 || v6) && pk.s2kType == S2KCHECKSUM {
+ return errors.StructuralError(fmt.Sprintf("wrong s2k identifier for version %d", pk.Version))
+ }
+ _, err = readFull(r, buf[:])
+ if err != nil {
+ return
+ }
+ pk.cipher = CipherFunction(buf[0])
+ if pk.cipher != 0 && !pk.cipher.IsSupported() {
+ return errors.UnsupportedError("unsupported cipher function in private key")
+ }
+ // [Optional] If string-to-key usage octet was 253,
+ // a one-octet AEAD algorithm.
+ if pk.s2kType == S2KAEAD {
+ _, err = readFull(r, buf[:])
+ if err != nil {
+ return
+ }
+ pk.aead = AEADMode(buf[0])
+ if !pk.aead.IsSupported() {
+ return errors.UnsupportedError("unsupported aead mode in private key")
+ }
+ }
+
+ // [Optional] Only for a version 6 packet,
+ // and if string-to-key usage octet was 255, 254, or 253,
+ // an one-octet count of the following field.
+ if v6 {
+ _, err = readFull(r, buf[:])
+ if err != nil {
+ return
+ }
+ }
+
+ pk.s2kParams, err = s2k.ParseIntoParams(r)
+ if err != nil {
+ return
+ }
+ if pk.s2kParams.Dummy() {
+ return
+ }
+ if pk.s2kParams.Mode() == s2k.Argon2S2K && pk.s2kType != S2KAEAD {
+ return errors.StructuralError("using Argon2 S2K without AEAD is not allowed")
+ }
+ if pk.s2kParams.Mode() == s2k.SimpleS2K && pk.Version == 6 {
+ return errors.StructuralError("using Simple S2K with version 6 keys is not allowed")
+ }
+ pk.s2k, err = pk.s2kParams.Function()
+ if err != nil {
+ return
+ }
+ pk.Encrypted = true
+ default:
+ return errors.UnsupportedError("deprecated s2k function in private key")
+ }
+
+ if pk.Encrypted {
+ var ivSize int
+ // If the S2K usage octet was 253, the IV is of the size expected by the AEAD mode,
+ // unless it's a version 5 key, in which case it's the size of the symmetric cipher's block size.
+ // For all other S2K modes, it's always the block size.
+ if !v5 && pk.s2kType == S2KAEAD {
+ ivSize = pk.aead.IvLength()
+ } else {
+ ivSize = pk.cipher.blockSize()
+ }
+
+ if ivSize == 0 {
+ return errors.UnsupportedError("unsupported cipher in private key: " + strconv.Itoa(int(pk.cipher)))
+ }
+ pk.iv = make([]byte, ivSize)
+ _, err = readFull(r, pk.iv)
+ if err != nil {
+ return
+ }
+ if v5 && pk.s2kType == S2KAEAD {
+ pk.iv = pk.iv[:pk.aead.IvLength()]
+ }
+ }
+
+ var privateKeyData []byte
+ if v5 {
+ var n [4]byte /* secret material four octet count */
+ _, err = readFull(r, n[:])
+ if err != nil {
+ return
+ }
+ count := uint32(uint32(n[0])<<24 | uint32(n[1])<<16 | uint32(n[2])<<8 | uint32(n[3]))
+ if !pk.Encrypted {
+ count = count + 2 /* two octet checksum */
+ }
+ privateKeyData = make([]byte, count)
+ _, err = readFull(r, privateKeyData)
+ if err != nil {
+ return
+ }
+ } else {
+ privateKeyData, err = io.ReadAll(r)
+ if err != nil {
+ return
+ }
+ }
+ if !pk.Encrypted {
+ if len(privateKeyData) < 2 {
+ return errors.StructuralError("truncated private key data")
+ }
+ if pk.Version != 6 {
+ // checksum
+ var sum uint16
+ for i := 0; i < len(privateKeyData)-2; i++ {
+ sum += uint16(privateKeyData[i])
+ }
+ if privateKeyData[len(privateKeyData)-2] != uint8(sum>>8) ||
+ privateKeyData[len(privateKeyData)-1] != uint8(sum) {
+ return errors.StructuralError("private key checksum failure")
+ }
+ privateKeyData = privateKeyData[:len(privateKeyData)-2]
+ return pk.parsePrivateKey(privateKeyData)
+ } else {
+ // No checksum
+ return pk.parsePrivateKey(privateKeyData)
+ }
+ }
+
+ pk.encryptedData = privateKeyData
+ return
+}
+
+// Dummy returns true if the private key is a dummy key. This is a GNU extension.
+func (pk *PrivateKey) Dummy() bool {
+ return pk.s2kParams.Dummy()
+}
+
+func mod64kHash(d []byte) uint16 {
+ var h uint16
+ for _, b := range d {
+ h += uint16(b)
+ }
+ return h
+}
+
+func (pk *PrivateKey) Serialize(w io.Writer) (err error) {
+ contents := bytes.NewBuffer(nil)
+ err = pk.PublicKey.serializeWithoutHeaders(contents)
+ if err != nil {
+ return
+ }
+ if _, err = contents.Write([]byte{uint8(pk.s2kType)}); err != nil {
+ return
+ }
+
+ optional := bytes.NewBuffer(nil)
+ if pk.Encrypted || pk.Dummy() {
+ // [Optional] If string-to-key usage octet was 255, 254, or 253,
+ // a one-octet symmetric encryption algorithm.
+ if _, err = optional.Write([]byte{uint8(pk.cipher)}); err != nil {
+ return
+ }
+ // [Optional] If string-to-key usage octet was 253,
+ // a one-octet AEAD algorithm.
+ if pk.s2kType == S2KAEAD {
+ if _, err = optional.Write([]byte{uint8(pk.aead)}); err != nil {
+ return
+ }
+ }
+
+ s2kBuffer := bytes.NewBuffer(nil)
+ if err := pk.s2kParams.Serialize(s2kBuffer); err != nil {
+ return err
+ }
+ // [Optional] Only for a version 6 packet, and if string-to-key
+ // usage octet was 255, 254, or 253, an one-octet
+ // count of the following field.
+ if pk.Version == 6 {
+ if _, err = optional.Write([]byte{uint8(s2kBuffer.Len())}); err != nil {
+ return
+ }
+ }
+ // [Optional] If string-to-key usage octet was 255, 254, or 253,
+ // a string-to-key (S2K) specifier. The length of the string-to-key specifier
+ // depends on its type
+ if _, err = io.Copy(optional, s2kBuffer); err != nil {
+ return
+ }
+
+ // IV
+ if pk.Encrypted {
+ if _, err = optional.Write(pk.iv); err != nil {
+ return
+ }
+ if pk.Version == 5 && pk.s2kType == S2KAEAD {
+ // Add padding for version 5
+ padding := make([]byte, pk.cipher.blockSize()-len(pk.iv))
+ if _, err = optional.Write(padding); err != nil {
+ return
+ }
+ }
+ }
+ }
+ if pk.Version == 5 || (pk.Version == 6 && pk.s2kType != S2KNON) {
+ contents.Write([]byte{uint8(optional.Len())})
+ }
+
+ if _, err := io.Copy(contents, optional); err != nil {
+ return err
+ }
+
+ if !pk.Dummy() {
+ l := 0
+ var priv []byte
+ if !pk.Encrypted {
+ buf := bytes.NewBuffer(nil)
+ err = pk.serializePrivateKey(buf)
+ if err != nil {
+ return err
+ }
+ l = buf.Len()
+ if pk.Version != 6 {
+ checksum := mod64kHash(buf.Bytes())
+ buf.Write([]byte{byte(checksum >> 8), byte(checksum)})
+ }
+ priv = buf.Bytes()
+ } else {
+ priv, l = pk.encryptedData, len(pk.encryptedData)
+ }
+
+ if pk.Version == 5 {
+ contents.Write([]byte{byte(l >> 24), byte(l >> 16), byte(l >> 8), byte(l)})
+ }
+ contents.Write(priv)
+ }
+
+ ptype := packetTypePrivateKey
+ if pk.IsSubkey {
+ ptype = packetTypePrivateSubkey
+ }
+ err = serializeHeader(w, ptype, contents.Len())
+ if err != nil {
+ return
+ }
+ _, err = io.Copy(w, contents)
+ if err != nil {
+ return
+ }
+ return
+}
+
+func serializeRSAPrivateKey(w io.Writer, priv *rsa.PrivateKey) error {
+ if _, err := w.Write(new(encoding.MPI).SetBig(priv.D).EncodedBytes()); err != nil {
+ return err
+ }
+ if _, err := w.Write(new(encoding.MPI).SetBig(priv.Primes[1]).EncodedBytes()); err != nil {
+ return err
+ }
+ if _, err := w.Write(new(encoding.MPI).SetBig(priv.Primes[0]).EncodedBytes()); err != nil {
+ return err
+ }
+ _, err := w.Write(new(encoding.MPI).SetBig(priv.Precomputed.Qinv).EncodedBytes())
+ return err
+}
+
+func serializeDSAPrivateKey(w io.Writer, priv *dsa.PrivateKey) error {
+ _, err := w.Write(new(encoding.MPI).SetBig(priv.X).EncodedBytes())
+ return err
+}
+
+func serializeElGamalPrivateKey(w io.Writer, priv *elgamal.PrivateKey) error {
+ _, err := w.Write(new(encoding.MPI).SetBig(priv.X).EncodedBytes())
+ return err
+}
+
+func serializeECDSAPrivateKey(w io.Writer, priv *ecdsa.PrivateKey) error {
+ _, err := w.Write(encoding.NewMPI(priv.MarshalIntegerSecret()).EncodedBytes())
+ return err
+}
+
+func serializeEdDSAPrivateKey(w io.Writer, priv *eddsa.PrivateKey) error {
+ _, err := w.Write(encoding.NewMPI(priv.MarshalByteSecret()).EncodedBytes())
+ return err
+}
+
+func serializeECDHPrivateKey(w io.Writer, priv *ecdh.PrivateKey) error {
+ _, err := w.Write(encoding.NewMPI(priv.MarshalByteSecret()).EncodedBytes())
+ return err
+}
+
+func serializeX25519PrivateKey(w io.Writer, priv *x25519.PrivateKey) error {
+ _, err := w.Write(priv.Secret)
+ return err
+}
+
+func serializeX448PrivateKey(w io.Writer, priv *x448.PrivateKey) error {
+ _, err := w.Write(priv.Secret)
+ return err
+}
+
+func serializeEd25519PrivateKey(w io.Writer, priv *ed25519.PrivateKey) error {
+ _, err := w.Write(priv.MarshalByteSecret())
+ return err
+}
+
+func serializeEd448PrivateKey(w io.Writer, priv *ed448.PrivateKey) error {
+ _, err := w.Write(priv.MarshalByteSecret())
+ return err
+}
+
+// decrypt decrypts an encrypted private key using a decryption key.
+func (pk *PrivateKey) decrypt(decryptionKey []byte) error {
+ if pk.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy key found")
+ }
+ if !pk.Encrypted {
+ return nil
+ }
+ block := pk.cipher.new(decryptionKey)
+ var data []byte
+ switch pk.s2kType {
+ case S2KAEAD:
+ aead := pk.aead.new(block)
+ additionalData, err := pk.additionalData()
+ if err != nil {
+ return err
+ }
+ // Decrypt the encrypted key material with aead
+ data, err = aead.Open(nil, pk.iv, pk.encryptedData, additionalData)
+ if err != nil {
+ return err
+ }
+ case S2KSHA1, S2KCHECKSUM:
+ cfb := cipher.NewCFBDecrypter(block, pk.iv)
+ data = make([]byte, len(pk.encryptedData))
+ cfb.XORKeyStream(data, pk.encryptedData)
+ if pk.s2kType == S2KSHA1 {
+ if len(data) < sha1.Size {
+ return errors.StructuralError("truncated private key data")
+ }
+ h := sha1.New()
+ h.Write(data[:len(data)-sha1.Size])
+ sum := h.Sum(nil)
+ if !bytes.Equal(sum, data[len(data)-sha1.Size:]) {
+ return errors.StructuralError("private key checksum failure")
+ }
+ data = data[:len(data)-sha1.Size]
+ } else {
+ if len(data) < 2 {
+ return errors.StructuralError("truncated private key data")
+ }
+ var sum uint16
+ for i := 0; i < len(data)-2; i++ {
+ sum += uint16(data[i])
+ }
+ if data[len(data)-2] != uint8(sum>>8) ||
+ data[len(data)-1] != uint8(sum) {
+ return errors.StructuralError("private key checksum failure")
+ }
+ data = data[:len(data)-2]
+ }
+ default:
+ return errors.InvalidArgumentError("invalid s2k type")
+ }
+
+ err := pk.parsePrivateKey(data)
+ if _, ok := err.(errors.KeyInvalidError); ok {
+ return errors.KeyInvalidError("invalid key parameters")
+ }
+ if err != nil {
+ return err
+ }
+
+ // Mark key as unencrypted
+ pk.s2kType = S2KNON
+ pk.s2k = nil
+ pk.Encrypted = false
+ pk.encryptedData = nil
+ return nil
+}
+
+func (pk *PrivateKey) decryptWithCache(passphrase []byte, keyCache *s2k.Cache) error {
+ if pk.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy key found")
+ }
+ if !pk.Encrypted {
+ return nil
+ }
+
+ key, err := keyCache.GetOrComputeDerivedKey(passphrase, pk.s2kParams, pk.cipher.KeySize())
+ if err != nil {
+ return err
+ }
+ if pk.s2kType == S2KAEAD {
+ key = pk.applyHKDF(key)
+ }
+ return pk.decrypt(key)
+}
+
+// Decrypt decrypts an encrypted private key using a passphrase.
+func (pk *PrivateKey) Decrypt(passphrase []byte) error {
+ if pk.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy key found")
+ }
+ if !pk.Encrypted {
+ return nil
+ }
+
+ key := make([]byte, pk.cipher.KeySize())
+ pk.s2k(key, passphrase)
+ if pk.s2kType == S2KAEAD {
+ key = pk.applyHKDF(key)
+ }
+ return pk.decrypt(key)
+}
+
+// DecryptPrivateKeys decrypts all encrypted keys with the given config and passphrase.
+// Avoids recomputation of similar s2k key derivations.
+func DecryptPrivateKeys(keys []*PrivateKey, passphrase []byte) error {
+ // Create a cache to avoid recomputation of key derviations for the same passphrase.
+ s2kCache := &s2k.Cache{}
+ for _, key := range keys {
+ if key != nil && !key.Dummy() && key.Encrypted {
+ err := key.decryptWithCache(passphrase, s2kCache)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// encrypt encrypts an unencrypted private key.
+func (pk *PrivateKey) encrypt(key []byte, params *s2k.Params, s2kType S2KType, cipherFunction CipherFunction, rand io.Reader) error {
+ if pk.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy key found")
+ }
+ if pk.Encrypted {
+ return nil
+ }
+ // check if encryptionKey has the correct size
+ if len(key) != cipherFunction.KeySize() {
+ return errors.InvalidArgumentError("supplied encryption key has the wrong size")
+ }
+
+ if params.Mode() == s2k.Argon2S2K && s2kType != S2KAEAD {
+ return errors.InvalidArgumentError("using Argon2 S2K without AEAD is not allowed")
+ }
+ if params.Mode() != s2k.Argon2S2K && params.Mode() != s2k.IteratedSaltedS2K &&
+ params.Mode() != s2k.SaltedS2K { // only allowed for high-entropy passphrases
+ return errors.InvalidArgumentError("insecure S2K mode")
+ }
+
+ priv := bytes.NewBuffer(nil)
+ err := pk.serializePrivateKey(priv)
+ if err != nil {
+ return err
+ }
+
+ pk.cipher = cipherFunction
+ pk.s2kParams = params
+ pk.s2k, err = pk.s2kParams.Function()
+ if err != nil {
+ return err
+ }
+
+ privateKeyBytes := priv.Bytes()
+ pk.s2kType = s2kType
+ block := pk.cipher.new(key)
+ switch s2kType {
+ case S2KAEAD:
+ if pk.aead == 0 {
+ return errors.StructuralError("aead mode is not set on key")
+ }
+ aead := pk.aead.new(block)
+ additionalData, err := pk.additionalData()
+ if err != nil {
+ return err
+ }
+ pk.iv = make([]byte, aead.NonceSize())
+ _, err = io.ReadFull(rand, pk.iv)
+ if err != nil {
+ return err
+ }
+ // Decrypt the encrypted key material with aead
+ pk.encryptedData = aead.Seal(nil, pk.iv, privateKeyBytes, additionalData)
+ case S2KSHA1, S2KCHECKSUM:
+ pk.iv = make([]byte, pk.cipher.blockSize())
+ _, err = io.ReadFull(rand, pk.iv)
+ if err != nil {
+ return err
+ }
+ cfb := cipher.NewCFBEncrypter(block, pk.iv)
+ if s2kType == S2KSHA1 {
+ h := sha1.New()
+ h.Write(privateKeyBytes)
+ sum := h.Sum(nil)
+ privateKeyBytes = append(privateKeyBytes, sum...)
+ } else {
+ var sum uint16
+ for _, b := range privateKeyBytes {
+ sum += uint16(b)
+ }
+ privateKeyBytes = append(privateKeyBytes, []byte{uint8(sum >> 8), uint8(sum)}...)
+ }
+ pk.encryptedData = make([]byte, len(privateKeyBytes))
+ cfb.XORKeyStream(pk.encryptedData, privateKeyBytes)
+ default:
+ return errors.InvalidArgumentError("invalid s2k type for encryption")
+ }
+
+ pk.Encrypted = true
+ pk.PrivateKey = nil
+ return err
+}
+
+// EncryptWithConfig encrypts an unencrypted private key using the passphrase and the config.
+func (pk *PrivateKey) EncryptWithConfig(passphrase []byte, config *Config) error {
+ params, err := s2k.Generate(config.Random(), config.S2K())
+ if err != nil {
+ return err
+ }
+ // Derive an encryption key with the configured s2k function.
+ key := make([]byte, config.Cipher().KeySize())
+ s2k, err := params.Function()
+ if err != nil {
+ return err
+ }
+ s2k(key, passphrase)
+ s2kType := S2KSHA1
+ if config.AEAD() != nil {
+ s2kType = S2KAEAD
+ pk.aead = config.AEAD().Mode()
+ pk.cipher = config.Cipher()
+ key = pk.applyHKDF(key)
+ }
+ // Encrypt the private key with the derived encryption key.
+ return pk.encrypt(key, params, s2kType, config.Cipher(), config.Random())
+}
+
+// EncryptPrivateKeys encrypts all unencrypted keys with the given config and passphrase.
+// Only derives one key from the passphrase, which is then used to encrypt each key.
+func EncryptPrivateKeys(keys []*PrivateKey, passphrase []byte, config *Config) error {
+ params, err := s2k.Generate(config.Random(), config.S2K())
+ if err != nil {
+ return err
+ }
+ // Derive an encryption key with the configured s2k function.
+ encryptionKey := make([]byte, config.Cipher().KeySize())
+ s2k, err := params.Function()
+ if err != nil {
+ return err
+ }
+ s2k(encryptionKey, passphrase)
+ for _, key := range keys {
+ if key != nil && !key.Dummy() && !key.Encrypted {
+ s2kType := S2KSHA1
+ if config.AEAD() != nil {
+ s2kType = S2KAEAD
+ key.aead = config.AEAD().Mode()
+ key.cipher = config.Cipher()
+ derivedKey := key.applyHKDF(encryptionKey)
+ err = key.encrypt(derivedKey, params, s2kType, config.Cipher(), config.Random())
+ } else {
+ err = key.encrypt(encryptionKey, params, s2kType, config.Cipher(), config.Random())
+ }
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// Encrypt encrypts an unencrypted private key using a passphrase.
+func (pk *PrivateKey) Encrypt(passphrase []byte) error {
+ // Default config of private key encryption
+ config := &Config{
+ S2KConfig: &s2k.Config{
+ S2KMode: s2k.IteratedSaltedS2K,
+ S2KCount: 65536,
+ Hash: crypto.SHA256,
+ },
+ DefaultCipher: CipherAES256,
+ }
+ return pk.EncryptWithConfig(passphrase, config)
+}
+
+func (pk *PrivateKey) serializePrivateKey(w io.Writer) (err error) {
+ switch priv := pk.PrivateKey.(type) {
+ case *rsa.PrivateKey:
+ err = serializeRSAPrivateKey(w, priv)
+ case *dsa.PrivateKey:
+ err = serializeDSAPrivateKey(w, priv)
+ case *elgamal.PrivateKey:
+ err = serializeElGamalPrivateKey(w, priv)
+ case *ecdsa.PrivateKey:
+ err = serializeECDSAPrivateKey(w, priv)
+ case *eddsa.PrivateKey:
+ err = serializeEdDSAPrivateKey(w, priv)
+ case *ecdh.PrivateKey:
+ err = serializeECDHPrivateKey(w, priv)
+ case *x25519.PrivateKey:
+ err = serializeX25519PrivateKey(w, priv)
+ case *x448.PrivateKey:
+ err = serializeX448PrivateKey(w, priv)
+ case *ed25519.PrivateKey:
+ err = serializeEd25519PrivateKey(w, priv)
+ case *ed448.PrivateKey:
+ err = serializeEd448PrivateKey(w, priv)
+ default:
+ err = errors.InvalidArgumentError("unknown private key type")
+ }
+ return
+}
+
+func (pk *PrivateKey) parsePrivateKey(data []byte) (err error) {
+ switch pk.PublicKey.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoRSAEncryptOnly:
+ return pk.parseRSAPrivateKey(data)
+ case PubKeyAlgoDSA:
+ return pk.parseDSAPrivateKey(data)
+ case PubKeyAlgoElGamal:
+ return pk.parseElGamalPrivateKey(data)
+ case PubKeyAlgoECDSA:
+ return pk.parseECDSAPrivateKey(data)
+ case PubKeyAlgoECDH:
+ return pk.parseECDHPrivateKey(data)
+ case PubKeyAlgoEdDSA:
+ return pk.parseEdDSAPrivateKey(data)
+ case PubKeyAlgoX25519:
+ return pk.parseX25519PrivateKey(data)
+ case PubKeyAlgoX448:
+ return pk.parseX448PrivateKey(data)
+ case PubKeyAlgoEd25519:
+ return pk.parseEd25519PrivateKey(data)
+ case PubKeyAlgoEd448:
+ return pk.parseEd448PrivateKey(data)
+ default:
+ err = errors.StructuralError("unknown private key type")
+ return
+ }
+}
+
+func (pk *PrivateKey) parseRSAPrivateKey(data []byte) (err error) {
+ rsaPub := pk.PublicKey.PublicKey.(*rsa.PublicKey)
+ rsaPriv := new(rsa.PrivateKey)
+ rsaPriv.PublicKey = *rsaPub
+
+ buf := bytes.NewBuffer(data)
+ d := new(encoding.MPI)
+ if _, err := d.ReadFrom(buf); err != nil {
+ return err
+ }
+
+ p := new(encoding.MPI)
+ if _, err := p.ReadFrom(buf); err != nil {
+ return err
+ }
+
+ q := new(encoding.MPI)
+ if _, err := q.ReadFrom(buf); err != nil {
+ return err
+ }
+
+ rsaPriv.D = new(big.Int).SetBytes(d.Bytes())
+ rsaPriv.Primes = make([]*big.Int, 2)
+ rsaPriv.Primes[0] = new(big.Int).SetBytes(p.Bytes())
+ rsaPriv.Primes[1] = new(big.Int).SetBytes(q.Bytes())
+ if err := rsaPriv.Validate(); err != nil {
+ return errors.KeyInvalidError(err.Error())
+ }
+ rsaPriv.Precompute()
+ pk.PrivateKey = rsaPriv
+
+ return nil
+}
+
+func (pk *PrivateKey) parseDSAPrivateKey(data []byte) (err error) {
+ dsaPub := pk.PublicKey.PublicKey.(*dsa.PublicKey)
+ dsaPriv := new(dsa.PrivateKey)
+ dsaPriv.PublicKey = *dsaPub
+
+ buf := bytes.NewBuffer(data)
+ x := new(encoding.MPI)
+ if _, err := x.ReadFrom(buf); err != nil {
+ return err
+ }
+
+ dsaPriv.X = new(big.Int).SetBytes(x.Bytes())
+ if err := validateDSAParameters(dsaPriv); err != nil {
+ return err
+ }
+ pk.PrivateKey = dsaPriv
+
+ return nil
+}
+
+func (pk *PrivateKey) parseElGamalPrivateKey(data []byte) (err error) {
+ pub := pk.PublicKey.PublicKey.(*elgamal.PublicKey)
+ priv := new(elgamal.PrivateKey)
+ priv.PublicKey = *pub
+
+ buf := bytes.NewBuffer(data)
+ x := new(encoding.MPI)
+ if _, err := x.ReadFrom(buf); err != nil {
+ return err
+ }
+
+ priv.X = new(big.Int).SetBytes(x.Bytes())
+ if err := validateElGamalParameters(priv); err != nil {
+ return err
+ }
+ pk.PrivateKey = priv
+
+ return nil
+}
+
+func (pk *PrivateKey) parseECDSAPrivateKey(data []byte) (err error) {
+ ecdsaPub := pk.PublicKey.PublicKey.(*ecdsa.PublicKey)
+ ecdsaPriv := ecdsa.NewPrivateKey(*ecdsaPub)
+
+ buf := bytes.NewBuffer(data)
+ d := new(encoding.MPI)
+ if _, err := d.ReadFrom(buf); err != nil {
+ return err
+ }
+
+ if err := ecdsaPriv.UnmarshalIntegerSecret(d.Bytes()); err != nil {
+ return err
+ }
+ if err := ecdsa.Validate(ecdsaPriv); err != nil {
+ return err
+ }
+ pk.PrivateKey = ecdsaPriv
+
+ return nil
+}
+
+func (pk *PrivateKey) parseECDHPrivateKey(data []byte) (err error) {
+ ecdhPub := pk.PublicKey.PublicKey.(*ecdh.PublicKey)
+ ecdhPriv := ecdh.NewPrivateKey(*ecdhPub)
+
+ buf := bytes.NewBuffer(data)
+ d := new(encoding.MPI)
+ if _, err := d.ReadFrom(buf); err != nil {
+ return err
+ }
+
+ if err := ecdhPriv.UnmarshalByteSecret(d.Bytes()); err != nil {
+ return err
+ }
+
+ if err := ecdh.Validate(ecdhPriv); err != nil {
+ return err
+ }
+
+ pk.PrivateKey = ecdhPriv
+
+ return nil
+}
+
+func (pk *PrivateKey) parseX25519PrivateKey(data []byte) (err error) {
+ publicKey := pk.PublicKey.PublicKey.(*x25519.PublicKey)
+ privateKey := x25519.NewPrivateKey(*publicKey)
+ privateKey.PublicKey = *publicKey
+
+ privateKey.Secret = make([]byte, x25519.KeySize)
+
+ if len(data) != x25519.KeySize {
+ err = errors.StructuralError("wrong x25519 key size")
+ return err
+ }
+ subtle.ConstantTimeCopy(1, privateKey.Secret, data)
+ if err = x25519.Validate(privateKey); err != nil {
+ return err
+ }
+ pk.PrivateKey = privateKey
+ return nil
+}
+
+func (pk *PrivateKey) parseX448PrivateKey(data []byte) (err error) {
+ publicKey := pk.PublicKey.PublicKey.(*x448.PublicKey)
+ privateKey := x448.NewPrivateKey(*publicKey)
+ privateKey.PublicKey = *publicKey
+
+ privateKey.Secret = make([]byte, x448.KeySize)
+
+ if len(data) != x448.KeySize {
+ err = errors.StructuralError("wrong x448 key size")
+ return err
+ }
+ subtle.ConstantTimeCopy(1, privateKey.Secret, data)
+ if err = x448.Validate(privateKey); err != nil {
+ return err
+ }
+ pk.PrivateKey = privateKey
+ return nil
+}
+
+func (pk *PrivateKey) parseEd25519PrivateKey(data []byte) (err error) {
+ publicKey := pk.PublicKey.PublicKey.(*ed25519.PublicKey)
+ privateKey := ed25519.NewPrivateKey(*publicKey)
+ privateKey.PublicKey = *publicKey
+
+ if len(data) != ed25519.SeedSize {
+ err = errors.StructuralError("wrong ed25519 key size")
+ return err
+ }
+ err = privateKey.UnmarshalByteSecret(data)
+ if err != nil {
+ return err
+ }
+ err = ed25519.Validate(privateKey)
+ if err != nil {
+ return err
+ }
+ pk.PrivateKey = privateKey
+ return nil
+}
+
+func (pk *PrivateKey) parseEd448PrivateKey(data []byte) (err error) {
+ publicKey := pk.PublicKey.PublicKey.(*ed448.PublicKey)
+ privateKey := ed448.NewPrivateKey(*publicKey)
+ privateKey.PublicKey = *publicKey
+
+ if len(data) != ed448.SeedSize {
+ err = errors.StructuralError("wrong ed448 key size")
+ return err
+ }
+ err = privateKey.UnmarshalByteSecret(data)
+ if err != nil {
+ return err
+ }
+ err = ed448.Validate(privateKey)
+ if err != nil {
+ return err
+ }
+ pk.PrivateKey = privateKey
+ return nil
+}
+
+func (pk *PrivateKey) parseEdDSAPrivateKey(data []byte) (err error) {
+ eddsaPub := pk.PublicKey.PublicKey.(*eddsa.PublicKey)
+ eddsaPriv := eddsa.NewPrivateKey(*eddsaPub)
+ eddsaPriv.PublicKey = *eddsaPub
+
+ buf := bytes.NewBuffer(data)
+ d := new(encoding.MPI)
+ if _, err := d.ReadFrom(buf); err != nil {
+ return err
+ }
+
+ if err = eddsaPriv.UnmarshalByteSecret(d.Bytes()); err != nil {
+ return err
+ }
+
+ if err := eddsa.Validate(eddsaPriv); err != nil {
+ return err
+ }
+
+ pk.PrivateKey = eddsaPriv
+
+ return nil
+}
+
+func (pk *PrivateKey) additionalData() ([]byte, error) {
+ additionalData := bytes.NewBuffer(nil)
+ // Write additional data prefix based on packet type
+ var packetByte byte
+ if pk.PublicKey.IsSubkey {
+ packetByte = 0xc7
+ } else {
+ packetByte = 0xc5
+ }
+ // Write public key to additional data
+ _, err := additionalData.Write([]byte{packetByte})
+ if err != nil {
+ return nil, err
+ }
+ err = pk.PublicKey.serializeWithoutHeaders(additionalData)
+ if err != nil {
+ return nil, err
+ }
+ return additionalData.Bytes(), nil
+}
+
+func (pk *PrivateKey) applyHKDF(inputKey []byte) []byte {
+ var packetByte byte
+ if pk.PublicKey.IsSubkey {
+ packetByte = 0xc7
+ } else {
+ packetByte = 0xc5
+ }
+ associatedData := []byte{packetByte, byte(pk.Version), byte(pk.cipher), byte(pk.aead)}
+ hkdfReader := hkdf.New(sha256.New, inputKey, []byte{}, associatedData)
+ encryptionKey := make([]byte, pk.cipher.KeySize())
+ _, _ = readFull(hkdfReader, encryptionKey)
+ return encryptionKey
+}
+
+func validateDSAParameters(priv *dsa.PrivateKey) error {
+ p := priv.P // group prime
+ q := priv.Q // subgroup order
+ g := priv.G // g has order q mod p
+ x := priv.X // secret
+ y := priv.Y // y == g**x mod p
+ one := big.NewInt(1)
+ // expect g, y >= 2 and g < p
+ if g.Cmp(one) <= 0 || y.Cmp(one) <= 0 || g.Cmp(p) > 0 {
+ return errors.KeyInvalidError("dsa: invalid group")
+ }
+ // expect p > q
+ if p.Cmp(q) <= 0 {
+ return errors.KeyInvalidError("dsa: invalid group prime")
+ }
+ // q should be large enough and divide p-1
+ pSub1 := new(big.Int).Sub(p, one)
+ if q.BitLen() < 150 || new(big.Int).Mod(pSub1, q).Cmp(big.NewInt(0)) != 0 {
+ return errors.KeyInvalidError("dsa: invalid order")
+ }
+ // confirm that g has order q mod p
+ if !q.ProbablyPrime(32) || new(big.Int).Exp(g, q, p).Cmp(one) != 0 {
+ return errors.KeyInvalidError("dsa: invalid order")
+ }
+ // check y
+ if new(big.Int).Exp(g, x, p).Cmp(y) != 0 {
+ return errors.KeyInvalidError("dsa: mismatching values")
+ }
+
+ return nil
+}
+
+func validateElGamalParameters(priv *elgamal.PrivateKey) error {
+ p := priv.P // group prime
+ g := priv.G // g has order p-1 mod p
+ x := priv.X // secret
+ y := priv.Y // y == g**x mod p
+ one := big.NewInt(1)
+ // Expect g, y >= 2 and g < p
+ if g.Cmp(one) <= 0 || y.Cmp(one) <= 0 || g.Cmp(p) > 0 {
+ return errors.KeyInvalidError("elgamal: invalid group")
+ }
+ if p.BitLen() < 1024 {
+ return errors.KeyInvalidError("elgamal: group order too small")
+ }
+ pSub1 := new(big.Int).Sub(p, one)
+ if new(big.Int).Exp(g, pSub1, p).Cmp(one) != 0 {
+ return errors.KeyInvalidError("elgamal: invalid group")
+ }
+ // Since p-1 is not prime, g might have a smaller order that divides p-1.
+ // We cannot confirm the exact order of g, but we make sure it is not too small.
+ gExpI := new(big.Int).Set(g)
+ i := 1
+ threshold := 2 << 17 // we want order > threshold
+ for i < threshold {
+ i++ // we check every order to make sure key validation is not easily bypassed by guessing y'
+ gExpI.Mod(new(big.Int).Mul(gExpI, g), p)
+ if gExpI.Cmp(one) == 0 {
+ return errors.KeyInvalidError("elgamal: order too small")
+ }
+ }
+ // Check y
+ if new(big.Int).Exp(g, x, p).Cmp(y) != 0 {
+ return errors.KeyInvalidError("elgamal: mismatching values")
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key_test_data.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key_test_data.go
new file mode 100644
index 000000000..029b8f1aa
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/private_key_test_data.go
@@ -0,0 +1,12 @@
+package packet
+
+// Generated with `gpg --export-secret-keys "Test Key 2"`
+const privKeyRSAHex = "9501fe044cc349a8010400b70ca0010e98c090008d45d1ee8f9113bd5861fd57b88bacb7c68658747663f1e1a3b5a98f32fda6472373c024b97359cd2efc88ff60f77751adfbf6af5e615e6a1408cfad8bf0cea30b0d5f53aa27ad59089ba9b15b7ebc2777a25d7b436144027e3bcd203909f147d0e332b240cf63d3395f5dfe0df0a6c04e8655af7eacdf0011010001fe0303024a252e7d475fd445607de39a265472aa74a9320ba2dac395faa687e9e0336aeb7e9a7397e511b5afd9dc84557c80ac0f3d4d7bfec5ae16f20d41c8c84a04552a33870b930420e230e179564f6d19bb153145e76c33ae993886c388832b0fa042ddda7f133924f3854481533e0ede31d51278c0519b29abc3bf53da673e13e3e1214b52413d179d7f66deee35cac8eacb060f78379d70ef4af8607e68131ff529439668fc39c9ce6dfef8a5ac234d234802cbfb749a26107db26406213ae5c06d4673253a3cbee1fcbae58d6ab77e38d6e2c0e7c6317c48e054edadb5a40d0d48acb44643d998139a8a66bb820be1f3f80185bc777d14b5954b60effe2448a036d565c6bc0b915fcea518acdd20ab07bc1529f561c58cd044f723109b93f6fd99f876ff891d64306b5d08f48bab59f38695e9109c4dec34013ba3153488ce070268381ba923ee1eb77125b36afcb4347ec3478c8f2735b06ef17351d872e577fa95d0c397c88c71b59629a36aec"
+
+// Generated by `gpg --export-secret-keys` followed by a manual extraction of
+// the ElGamal subkey from the packets.
+const privKeyElGamalHex = "9d0157044df9ee1a100400eb8e136a58ec39b582629cdadf830bc64e0a94ed8103ca8bb247b27b11b46d1d25297ef4bcc3071785ba0c0bedfe89eabc5287fcc0edf81ab5896c1c8e4b20d27d79813c7aede75320b33eaeeaa586edc00fd1036c10133e6ba0ff277245d0d59d04b2b3421b7244aca5f4a8d870c6f1c1fbff9e1c26699a860b9504f35ca1d700030503fd1ededd3b840795be6d9ccbe3c51ee42e2f39233c432b831ddd9c4e72b7025a819317e47bf94f9ee316d7273b05d5fcf2999c3a681f519b1234bbfa6d359b4752bd9c3f77d6b6456cde152464763414ca130f4e91d91041432f90620fec0e6d6b5116076c2985d5aeaae13be492b9b329efcaf7ee25120159a0a30cd976b42d7afe030302dae7eb80db744d4960c4df930d57e87fe81412eaace9f900e6c839817a614ddb75ba6603b9417c33ea7b6c93967dfa2bcff3fa3c74a5ce2c962db65b03aece14c96cbd0038fc"
+
+// pkcs1PrivKeyHex is a PKCS#1, RSA private key.
+// Generated by `openssl genrsa 1024 | openssl rsa -outform DER | xxd -p`
+const pkcs1PrivKeyHex = "3082025d02010002818100e98edfa1c3b35884a54d0b36a6a603b0290fa85e49e30fa23fc94fef9c6790bc4849928607aa48d809da326fb42a969d06ad756b98b9c1a90f5d4a2b6d0ac05953c97f4da3120164a21a679793ce181c906dc01d235cc085ddcdf6ea06c389b6ab8885dfd685959e693138856a68a7e5db263337ff82a088d583a897cf2d59e9020301000102818100b6d5c9eb70b02d5369b3ee5b520a14490b5bde8a317d36f7e4c74b7460141311d1e5067735f8f01d6f5908b2b96fbd881f7a1ab9a84d82753e39e19e2d36856be960d05ac9ef8e8782ea1b6d65aee28fdfe1d61451e8cff0adfe84322f12cf455028b581cf60eb9e0e140ba5d21aeba6c2634d7c65318b9a665fc01c3191ca21024100fa5e818da3705b0fa33278bb28d4b6f6050388af2d4b75ec9375dd91ccf2e7d7068086a8b82a8f6282e4fbbdb8a7f2622eb97295249d87acea7f5f816f54d347024100eecf9406d7dc49cdfb95ab1eff4064de84c7a30f64b2798936a0d2018ba9eb52e4b636f82e96c49cc63b80b675e91e40d1b2e4017d4b9adaf33ab3d9cf1c214f024100c173704ace742c082323066226a4655226819a85304c542b9dacbeacbf5d1881ee863485fcf6f59f3a604f9b42289282067447f2b13dfeed3eab7851fc81e0550240741fc41f3fc002b382eed8730e33c5d8de40256e4accee846667f536832f711ab1d4590e7db91a8a116ac5bff3be13d3f9243ff2e976662aa9b395d907f8e9c9024046a5696c9ef882363e06c9fa4e2f5b580906452befba03f4a99d0f873697ef1f851d2226ca7934b30b7c3e80cb634a67172bbbf4781735fe3e09263e2dd723e7"
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go
new file mode 100644
index 000000000..f8da781bb
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key.go
@@ -0,0 +1,1120 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "crypto/dsa"
+ "crypto/rsa"
+ "crypto/sha1"
+ "crypto/sha256"
+ _ "crypto/sha512"
+ "encoding/binary"
+ "fmt"
+ "hash"
+ "io"
+ "math/big"
+ "strconv"
+ "time"
+
+ "github.com/ProtonMail/go-crypto/openpgp/ecdh"
+ "github.com/ProtonMail/go-crypto/openpgp/ecdsa"
+ "github.com/ProtonMail/go-crypto/openpgp/ed25519"
+ "github.com/ProtonMail/go-crypto/openpgp/ed448"
+ "github.com/ProtonMail/go-crypto/openpgp/eddsa"
+ "github.com/ProtonMail/go-crypto/openpgp/elgamal"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/ecc"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
+ "github.com/ProtonMail/go-crypto/openpgp/x25519"
+ "github.com/ProtonMail/go-crypto/openpgp/x448"
+)
+
+// PublicKey represents an OpenPGP public key. See RFC 4880, section 5.5.2.
+type PublicKey struct {
+ Version int
+ CreationTime time.Time
+ PubKeyAlgo PublicKeyAlgorithm
+ PublicKey interface{} // *rsa.PublicKey, *dsa.PublicKey, *ecdsa.PublicKey or *eddsa.PublicKey, *x25519.PublicKey, *x448.PublicKey, *ed25519.PublicKey, *ed448.PublicKey
+ Fingerprint []byte
+ KeyId uint64
+ IsSubkey bool
+
+ // RFC 4880 fields
+ n, e, p, q, g, y encoding.Field
+
+ // RFC 6637 fields
+ // oid contains the OID byte sequence identifying the elliptic curve used
+ oid encoding.Field
+
+ // kdf stores key derivation function parameters
+ // used for ECDH encryption. See RFC 6637, Section 9.
+ kdf encoding.Field
+}
+
+// UpgradeToV5 updates the version of the key to v5, and updates all necessary
+// fields.
+func (pk *PublicKey) UpgradeToV5() {
+ pk.Version = 5
+ pk.setFingerprintAndKeyId()
+}
+
+// UpgradeToV6 updates the version of the key to v6, and updates all necessary
+// fields.
+func (pk *PublicKey) UpgradeToV6() error {
+ pk.Version = 6
+ pk.setFingerprintAndKeyId()
+ return pk.checkV6Compatibility()
+}
+
+// signingKey provides a convenient abstraction over signature verification
+// for v3 and v4 public keys.
+type signingKey interface {
+ SerializeForHash(io.Writer) error
+ SerializeSignaturePrefix(io.Writer) error
+ serializeWithoutHeaders(io.Writer) error
+}
+
+// NewRSAPublicKey returns a PublicKey that wraps the given rsa.PublicKey.
+func NewRSAPublicKey(creationTime time.Time, pub *rsa.PublicKey) *PublicKey {
+ pk := &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoRSA,
+ PublicKey: pub,
+ n: new(encoding.MPI).SetBig(pub.N),
+ e: new(encoding.MPI).SetBig(big.NewInt(int64(pub.E))),
+ }
+
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+// NewDSAPublicKey returns a PublicKey that wraps the given dsa.PublicKey.
+func NewDSAPublicKey(creationTime time.Time, pub *dsa.PublicKey) *PublicKey {
+ pk := &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoDSA,
+ PublicKey: pub,
+ p: new(encoding.MPI).SetBig(pub.P),
+ q: new(encoding.MPI).SetBig(pub.Q),
+ g: new(encoding.MPI).SetBig(pub.G),
+ y: new(encoding.MPI).SetBig(pub.Y),
+ }
+
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+// NewElGamalPublicKey returns a PublicKey that wraps the given elgamal.PublicKey.
+func NewElGamalPublicKey(creationTime time.Time, pub *elgamal.PublicKey) *PublicKey {
+ pk := &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoElGamal,
+ PublicKey: pub,
+ p: new(encoding.MPI).SetBig(pub.P),
+ g: new(encoding.MPI).SetBig(pub.G),
+ y: new(encoding.MPI).SetBig(pub.Y),
+ }
+
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+func NewECDSAPublicKey(creationTime time.Time, pub *ecdsa.PublicKey) *PublicKey {
+ pk := &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoECDSA,
+ PublicKey: pub,
+ p: encoding.NewMPI(pub.MarshalPoint()),
+ }
+
+ curveInfo := ecc.FindByCurve(pub.GetCurve())
+ if curveInfo == nil {
+ panic("unknown elliptic curve")
+ }
+ pk.oid = curveInfo.Oid
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+func NewECDHPublicKey(creationTime time.Time, pub *ecdh.PublicKey) *PublicKey {
+ var pk *PublicKey
+ var kdf = encoding.NewOID([]byte{0x1, pub.Hash.Id(), pub.Cipher.Id()})
+ pk = &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoECDH,
+ PublicKey: pub,
+ p: encoding.NewMPI(pub.MarshalPoint()),
+ kdf: kdf,
+ }
+
+ curveInfo := ecc.FindByCurve(pub.GetCurve())
+
+ if curveInfo == nil {
+ panic("unknown elliptic curve")
+ }
+
+ pk.oid = curveInfo.Oid
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+func NewEdDSAPublicKey(creationTime time.Time, pub *eddsa.PublicKey) *PublicKey {
+ curveInfo := ecc.FindByCurve(pub.GetCurve())
+ pk := &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoEdDSA,
+ PublicKey: pub,
+ oid: curveInfo.Oid,
+ // Native point format, see draft-koch-eddsa-for-openpgp-04, Appendix B
+ p: encoding.NewMPI(pub.MarshalPoint()),
+ }
+
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+func NewX25519PublicKey(creationTime time.Time, pub *x25519.PublicKey) *PublicKey {
+ pk := &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoX25519,
+ PublicKey: pub,
+ }
+
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+func NewX448PublicKey(creationTime time.Time, pub *x448.PublicKey) *PublicKey {
+ pk := &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoX448,
+ PublicKey: pub,
+ }
+
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+func NewEd25519PublicKey(creationTime time.Time, pub *ed25519.PublicKey) *PublicKey {
+ pk := &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoEd25519,
+ PublicKey: pub,
+ }
+
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+func NewEd448PublicKey(creationTime time.Time, pub *ed448.PublicKey) *PublicKey {
+ pk := &PublicKey{
+ Version: 4,
+ CreationTime: creationTime,
+ PubKeyAlgo: PubKeyAlgoEd448,
+ PublicKey: pub,
+ }
+
+ pk.setFingerprintAndKeyId()
+ return pk
+}
+
+func (pk *PublicKey) parse(r io.Reader) (err error) {
+ // RFC 4880, section 5.5.2
+ var buf [6]byte
+ _, err = readFull(r, buf[:])
+ if err != nil {
+ return
+ }
+
+ pk.Version = int(buf[0])
+ if pk.Version != 4 && pk.Version != 5 && pk.Version != 6 {
+ return errors.UnsupportedError("public key version " + strconv.Itoa(int(buf[0])))
+ }
+
+ if V5Disabled && pk.Version == 5 {
+ return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
+ }
+
+ if pk.Version >= 5 {
+ // Read the four-octet scalar octet count
+ // The count is not used in this implementation
+ var n [4]byte
+ _, err = readFull(r, n[:])
+ if err != nil {
+ return
+ }
+ }
+ pk.CreationTime = time.Unix(int64(uint32(buf[1])<<24|uint32(buf[2])<<16|uint32(buf[3])<<8|uint32(buf[4])), 0)
+ pk.PubKeyAlgo = PublicKeyAlgorithm(buf[5])
+ // Ignore four-ocet length
+ switch pk.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
+ err = pk.parseRSA(r)
+ case PubKeyAlgoDSA:
+ err = pk.parseDSA(r)
+ case PubKeyAlgoElGamal:
+ err = pk.parseElGamal(r)
+ case PubKeyAlgoECDSA:
+ err = pk.parseECDSA(r)
+ case PubKeyAlgoECDH:
+ err = pk.parseECDH(r)
+ case PubKeyAlgoEdDSA:
+ err = pk.parseEdDSA(r)
+ case PubKeyAlgoX25519:
+ err = pk.parseX25519(r)
+ case PubKeyAlgoX448:
+ err = pk.parseX448(r)
+ case PubKeyAlgoEd25519:
+ err = pk.parseEd25519(r)
+ case PubKeyAlgoEd448:
+ err = pk.parseEd448(r)
+ default:
+ err = errors.UnsupportedError("public key type: " + strconv.Itoa(int(pk.PubKeyAlgo)))
+ }
+ if err != nil {
+ return
+ }
+
+ pk.setFingerprintAndKeyId()
+ return
+}
+
+func (pk *PublicKey) setFingerprintAndKeyId() {
+ // RFC 4880, section 12.2
+ if pk.Version >= 5 {
+ fingerprint := sha256.New()
+ if err := pk.SerializeForHash(fingerprint); err != nil {
+ // Should not happen for a hash.
+ panic(err)
+ }
+ pk.Fingerprint = make([]byte, 32)
+ copy(pk.Fingerprint, fingerprint.Sum(nil))
+ pk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[:8])
+ } else {
+ fingerprint := sha1.New()
+ if err := pk.SerializeForHash(fingerprint); err != nil {
+ // Should not happen for a hash.
+ panic(err)
+ }
+ pk.Fingerprint = make([]byte, 20)
+ copy(pk.Fingerprint, fingerprint.Sum(nil))
+ pk.KeyId = binary.BigEndian.Uint64(pk.Fingerprint[12:20])
+ }
+}
+
+func (pk *PublicKey) checkV6Compatibility() error {
+ // Implementations MUST NOT accept or generate version 6 key material using the deprecated OIDs.
+ switch pk.PubKeyAlgo {
+ case PubKeyAlgoECDH:
+ curveInfo := ecc.FindByOid(pk.oid)
+ if curveInfo == nil {
+ return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
+ }
+ if curveInfo.GenName == ecc.Curve25519GenName {
+ return errors.StructuralError("cannot generate v6 key with deprecated OID: Curve25519Legacy")
+ }
+ case PubKeyAlgoEdDSA:
+ return errors.StructuralError("cannot generate v6 key with deprecated algorithm: EdDSALegacy")
+ }
+ return nil
+}
+
+// parseRSA parses RSA public key material from the given Reader. See RFC 4880,
+// section 5.5.2.
+func (pk *PublicKey) parseRSA(r io.Reader) (err error) {
+ pk.n = new(encoding.MPI)
+ if _, err = pk.n.ReadFrom(r); err != nil {
+ return
+ }
+ pk.e = new(encoding.MPI)
+ if _, err = pk.e.ReadFrom(r); err != nil {
+ return
+ }
+
+ if len(pk.e.Bytes()) > 3 {
+ err = errors.UnsupportedError("large public exponent")
+ return
+ }
+ rsa := &rsa.PublicKey{
+ N: new(big.Int).SetBytes(pk.n.Bytes()),
+ E: 0,
+ }
+ for i := 0; i < len(pk.e.Bytes()); i++ {
+ rsa.E <<= 8
+ rsa.E |= int(pk.e.Bytes()[i])
+ }
+ pk.PublicKey = rsa
+ return
+}
+
+// parseDSA parses DSA public key material from the given Reader. See RFC 4880,
+// section 5.5.2.
+func (pk *PublicKey) parseDSA(r io.Reader) (err error) {
+ pk.p = new(encoding.MPI)
+ if _, err = pk.p.ReadFrom(r); err != nil {
+ return
+ }
+ pk.q = new(encoding.MPI)
+ if _, err = pk.q.ReadFrom(r); err != nil {
+ return
+ }
+ pk.g = new(encoding.MPI)
+ if _, err = pk.g.ReadFrom(r); err != nil {
+ return
+ }
+ pk.y = new(encoding.MPI)
+ if _, err = pk.y.ReadFrom(r); err != nil {
+ return
+ }
+
+ dsa := new(dsa.PublicKey)
+ dsa.P = new(big.Int).SetBytes(pk.p.Bytes())
+ dsa.Q = new(big.Int).SetBytes(pk.q.Bytes())
+ dsa.G = new(big.Int).SetBytes(pk.g.Bytes())
+ dsa.Y = new(big.Int).SetBytes(pk.y.Bytes())
+ pk.PublicKey = dsa
+ return
+}
+
+// parseElGamal parses ElGamal public key material from the given Reader. See
+// RFC 4880, section 5.5.2.
+func (pk *PublicKey) parseElGamal(r io.Reader) (err error) {
+ pk.p = new(encoding.MPI)
+ if _, err = pk.p.ReadFrom(r); err != nil {
+ return
+ }
+ pk.g = new(encoding.MPI)
+ if _, err = pk.g.ReadFrom(r); err != nil {
+ return
+ }
+ pk.y = new(encoding.MPI)
+ if _, err = pk.y.ReadFrom(r); err != nil {
+ return
+ }
+
+ elgamal := new(elgamal.PublicKey)
+ elgamal.P = new(big.Int).SetBytes(pk.p.Bytes())
+ elgamal.G = new(big.Int).SetBytes(pk.g.Bytes())
+ elgamal.Y = new(big.Int).SetBytes(pk.y.Bytes())
+ pk.PublicKey = elgamal
+ return
+}
+
+// parseECDSA parses ECDSA public key material from the given Reader. See
+// RFC 6637, Section 9.
+func (pk *PublicKey) parseECDSA(r io.Reader) (err error) {
+ pk.oid = new(encoding.OID)
+ if _, err = pk.oid.ReadFrom(r); err != nil {
+ return
+ }
+
+ curveInfo := ecc.FindByOid(pk.oid)
+ if curveInfo == nil {
+ return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
+ }
+
+ pk.p = new(encoding.MPI)
+ if _, err = pk.p.ReadFrom(r); err != nil {
+ return
+ }
+
+ c, ok := curveInfo.Curve.(ecc.ECDSACurve)
+ if !ok {
+ return errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", pk.oid))
+ }
+
+ ecdsaKey := ecdsa.NewPublicKey(c)
+ err = ecdsaKey.UnmarshalPoint(pk.p.Bytes())
+ pk.PublicKey = ecdsaKey
+
+ return
+}
+
+// parseECDH parses ECDH public key material from the given Reader. See
+// RFC 6637, Section 9.
+func (pk *PublicKey) parseECDH(r io.Reader) (err error) {
+ pk.oid = new(encoding.OID)
+ if _, err = pk.oid.ReadFrom(r); err != nil {
+ return
+ }
+
+ curveInfo := ecc.FindByOid(pk.oid)
+ if curveInfo == nil {
+ return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
+ }
+
+ if pk.Version == 6 && curveInfo.GenName == ecc.Curve25519GenName {
+ // Implementations MUST NOT accept or generate version 6 key material using the deprecated OIDs.
+ return errors.StructuralError("cannot read v6 key with deprecated OID: Curve25519Legacy")
+ }
+
+ pk.p = new(encoding.MPI)
+ if _, err = pk.p.ReadFrom(r); err != nil {
+ return
+ }
+ pk.kdf = new(encoding.OID)
+ if _, err = pk.kdf.ReadFrom(r); err != nil {
+ return
+ }
+
+ c, ok := curveInfo.Curve.(ecc.ECDHCurve)
+ if !ok {
+ return errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", pk.oid))
+ }
+
+ if kdfLen := len(pk.kdf.Bytes()); kdfLen < 3 {
+ return errors.UnsupportedError("unsupported ECDH KDF length: " + strconv.Itoa(kdfLen))
+ }
+ if reserved := pk.kdf.Bytes()[0]; reserved != 0x01 {
+ return errors.UnsupportedError("unsupported KDF reserved field: " + strconv.Itoa(int(reserved)))
+ }
+ kdfHash, ok := algorithm.HashById[pk.kdf.Bytes()[1]]
+ if !ok {
+ return errors.UnsupportedError("unsupported ECDH KDF hash: " + strconv.Itoa(int(pk.kdf.Bytes()[1])))
+ }
+ kdfCipher, ok := algorithm.CipherById[pk.kdf.Bytes()[2]]
+ if !ok {
+ return errors.UnsupportedError("unsupported ECDH KDF cipher: " + strconv.Itoa(int(pk.kdf.Bytes()[2])))
+ }
+
+ ecdhKey := ecdh.NewPublicKey(c, kdfHash, kdfCipher)
+ err = ecdhKey.UnmarshalPoint(pk.p.Bytes())
+ pk.PublicKey = ecdhKey
+
+ return
+}
+
+func (pk *PublicKey) parseEdDSA(r io.Reader) (err error) {
+ if pk.Version == 6 {
+ // Implementations MUST NOT accept or generate version 6 key material using the deprecated OIDs.
+ return errors.StructuralError("cannot generate v6 key with deprecated algorithm: EdDSALegacy")
+ }
+
+ pk.oid = new(encoding.OID)
+ if _, err = pk.oid.ReadFrom(r); err != nil {
+ return
+ }
+
+ curveInfo := ecc.FindByOid(pk.oid)
+ if curveInfo == nil {
+ return errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
+ }
+
+ c, ok := curveInfo.Curve.(ecc.EdDSACurve)
+ if !ok {
+ return errors.UnsupportedError(fmt.Sprintf("unsupported oid: %x", pk.oid))
+ }
+
+ pk.p = new(encoding.MPI)
+ if _, err = pk.p.ReadFrom(r); err != nil {
+ return
+ }
+
+ if len(pk.p.Bytes()) == 0 {
+ return errors.StructuralError("empty EdDSA public key")
+ }
+
+ pub := eddsa.NewPublicKey(c)
+
+ switch flag := pk.p.Bytes()[0]; flag {
+ case 0x04:
+ // TODO: see _grcy_ecc_eddsa_ensure_compact in grcypt
+ return errors.UnsupportedError("unsupported EdDSA compression: " + strconv.Itoa(int(flag)))
+ case 0x40:
+ err = pub.UnmarshalPoint(pk.p.Bytes())
+ default:
+ return errors.UnsupportedError("unsupported EdDSA compression: " + strconv.Itoa(int(flag)))
+ }
+
+ pk.PublicKey = pub
+ return
+}
+
+func (pk *PublicKey) parseX25519(r io.Reader) (err error) {
+ point := make([]byte, x25519.KeySize)
+ _, err = io.ReadFull(r, point)
+ if err != nil {
+ return
+ }
+ pub := &x25519.PublicKey{
+ Point: point,
+ }
+ pk.PublicKey = pub
+ return
+}
+
+func (pk *PublicKey) parseX448(r io.Reader) (err error) {
+ point := make([]byte, x448.KeySize)
+ _, err = io.ReadFull(r, point)
+ if err != nil {
+ return
+ }
+ pub := &x448.PublicKey{
+ Point: point,
+ }
+ pk.PublicKey = pub
+ return
+}
+
+func (pk *PublicKey) parseEd25519(r io.Reader) (err error) {
+ point := make([]byte, ed25519.PublicKeySize)
+ _, err = io.ReadFull(r, point)
+ if err != nil {
+ return
+ }
+ pub := &ed25519.PublicKey{
+ Point: point,
+ }
+ pk.PublicKey = pub
+ return
+}
+
+func (pk *PublicKey) parseEd448(r io.Reader) (err error) {
+ point := make([]byte, ed448.PublicKeySize)
+ _, err = io.ReadFull(r, point)
+ if err != nil {
+ return
+ }
+ pub := &ed448.PublicKey{
+ Point: point,
+ }
+ pk.PublicKey = pub
+ return
+}
+
+// SerializeForHash serializes the PublicKey to w with the special packet
+// header format needed for hashing.
+func (pk *PublicKey) SerializeForHash(w io.Writer) error {
+ if err := pk.SerializeSignaturePrefix(w); err != nil {
+ return err
+ }
+ return pk.serializeWithoutHeaders(w)
+}
+
+// SerializeSignaturePrefix writes the prefix for this public key to the given Writer.
+// The prefix is used when calculating a signature over this public key. See
+// RFC 4880, section 5.2.4.
+func (pk *PublicKey) SerializeSignaturePrefix(w io.Writer) error {
+ var pLength = pk.algorithmSpecificByteCount()
+ // version, timestamp, algorithm
+ pLength += versionSize + timestampSize + algorithmSize
+ if pk.Version >= 5 {
+ // key octet count (4).
+ pLength += 4
+ _, err := w.Write([]byte{
+ // When a v4 signature is made over a key, the hash data starts with the octet 0x99, followed by a two-octet length
+ // of the key, and then the body of the key packet. When a v6 signature is made over a key, the hash data starts
+ // with the salt, then octet 0x9B, followed by a four-octet length of the key, and then the body of the key packet.
+ 0x95 + byte(pk.Version),
+ byte(pLength >> 24),
+ byte(pLength >> 16),
+ byte(pLength >> 8),
+ byte(pLength),
+ })
+ return err
+ }
+ if _, err := w.Write([]byte{0x99, byte(pLength >> 8), byte(pLength)}); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (pk *PublicKey) Serialize(w io.Writer) (err error) {
+ length := uint32(versionSize + timestampSize + algorithmSize) // 6 byte header
+ length += pk.algorithmSpecificByteCount()
+ if pk.Version >= 5 {
+ length += 4 // octet key count
+ }
+ packetType := packetTypePublicKey
+ if pk.IsSubkey {
+ packetType = packetTypePublicSubkey
+ }
+ err = serializeHeader(w, packetType, int(length))
+ if err != nil {
+ return
+ }
+ return pk.serializeWithoutHeaders(w)
+}
+
+func (pk *PublicKey) algorithmSpecificByteCount() uint32 {
+ length := uint32(0)
+ switch pk.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
+ length += uint32(pk.n.EncodedLength())
+ length += uint32(pk.e.EncodedLength())
+ case PubKeyAlgoDSA:
+ length += uint32(pk.p.EncodedLength())
+ length += uint32(pk.q.EncodedLength())
+ length += uint32(pk.g.EncodedLength())
+ length += uint32(pk.y.EncodedLength())
+ case PubKeyAlgoElGamal:
+ length += uint32(pk.p.EncodedLength())
+ length += uint32(pk.g.EncodedLength())
+ length += uint32(pk.y.EncodedLength())
+ case PubKeyAlgoECDSA:
+ length += uint32(pk.oid.EncodedLength())
+ length += uint32(pk.p.EncodedLength())
+ case PubKeyAlgoECDH:
+ length += uint32(pk.oid.EncodedLength())
+ length += uint32(pk.p.EncodedLength())
+ length += uint32(pk.kdf.EncodedLength())
+ case PubKeyAlgoEdDSA:
+ length += uint32(pk.oid.EncodedLength())
+ length += uint32(pk.p.EncodedLength())
+ case PubKeyAlgoX25519:
+ length += x25519.KeySize
+ case PubKeyAlgoX448:
+ length += x448.KeySize
+ case PubKeyAlgoEd25519:
+ length += ed25519.PublicKeySize
+ case PubKeyAlgoEd448:
+ length += ed448.PublicKeySize
+ default:
+ panic("unknown public key algorithm")
+ }
+ return length
+}
+
+// serializeWithoutHeaders marshals the PublicKey to w in the form of an
+// OpenPGP public key packet, not including the packet header.
+func (pk *PublicKey) serializeWithoutHeaders(w io.Writer) (err error) {
+ t := uint32(pk.CreationTime.Unix())
+ if _, err = w.Write([]byte{
+ byte(pk.Version),
+ byte(t >> 24), byte(t >> 16), byte(t >> 8), byte(t),
+ byte(pk.PubKeyAlgo),
+ }); err != nil {
+ return
+ }
+
+ if pk.Version >= 5 {
+ n := pk.algorithmSpecificByteCount()
+ if _, err = w.Write([]byte{
+ byte(n >> 24), byte(n >> 16), byte(n >> 8), byte(n),
+ }); err != nil {
+ return
+ }
+ }
+
+ switch pk.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
+ if _, err = w.Write(pk.n.EncodedBytes()); err != nil {
+ return
+ }
+ _, err = w.Write(pk.e.EncodedBytes())
+ return
+ case PubKeyAlgoDSA:
+ if _, err = w.Write(pk.p.EncodedBytes()); err != nil {
+ return
+ }
+ if _, err = w.Write(pk.q.EncodedBytes()); err != nil {
+ return
+ }
+ if _, err = w.Write(pk.g.EncodedBytes()); err != nil {
+ return
+ }
+ _, err = w.Write(pk.y.EncodedBytes())
+ return
+ case PubKeyAlgoElGamal:
+ if _, err = w.Write(pk.p.EncodedBytes()); err != nil {
+ return
+ }
+ if _, err = w.Write(pk.g.EncodedBytes()); err != nil {
+ return
+ }
+ _, err = w.Write(pk.y.EncodedBytes())
+ return
+ case PubKeyAlgoECDSA:
+ if _, err = w.Write(pk.oid.EncodedBytes()); err != nil {
+ return
+ }
+ _, err = w.Write(pk.p.EncodedBytes())
+ return
+ case PubKeyAlgoECDH:
+ if _, err = w.Write(pk.oid.EncodedBytes()); err != nil {
+ return
+ }
+ if _, err = w.Write(pk.p.EncodedBytes()); err != nil {
+ return
+ }
+ _, err = w.Write(pk.kdf.EncodedBytes())
+ return
+ case PubKeyAlgoEdDSA:
+ if _, err = w.Write(pk.oid.EncodedBytes()); err != nil {
+ return
+ }
+ _, err = w.Write(pk.p.EncodedBytes())
+ return
+ case PubKeyAlgoX25519:
+ publicKey := pk.PublicKey.(*x25519.PublicKey)
+ _, err = w.Write(publicKey.Point)
+ return
+ case PubKeyAlgoX448:
+ publicKey := pk.PublicKey.(*x448.PublicKey)
+ _, err = w.Write(publicKey.Point)
+ return
+ case PubKeyAlgoEd25519:
+ publicKey := pk.PublicKey.(*ed25519.PublicKey)
+ _, err = w.Write(publicKey.Point)
+ return
+ case PubKeyAlgoEd448:
+ publicKey := pk.PublicKey.(*ed448.PublicKey)
+ _, err = w.Write(publicKey.Point)
+ return
+ }
+ return errors.InvalidArgumentError("bad public-key algorithm")
+}
+
+// CanSign returns true iff this public key can generate signatures
+func (pk *PublicKey) CanSign() bool {
+ return pk.PubKeyAlgo != PubKeyAlgoRSAEncryptOnly && pk.PubKeyAlgo != PubKeyAlgoElGamal && pk.PubKeyAlgo != PubKeyAlgoECDH
+}
+
+// VerifyHashTag returns nil iff sig appears to be a plausible signature of the data
+// hashed into signed, based solely on its HashTag. signed is mutated by this call.
+func VerifyHashTag(signed hash.Hash, sig *Signature) (err error) {
+ if sig.Version == 5 && (sig.SigType == 0x00 || sig.SigType == 0x01) {
+ sig.AddMetadataToHashSuffix()
+ }
+ signed.Write(sig.HashSuffix)
+ hashBytes := signed.Sum(nil)
+ if hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1] {
+ return errors.SignatureError("hash tag doesn't match")
+ }
+ return nil
+}
+
+// VerifySignature returns nil iff sig is a valid signature, made by this
+// public key, of the data hashed into signed. signed is mutated by this call.
+func (pk *PublicKey) VerifySignature(signed hash.Hash, sig *Signature) (err error) {
+ if !pk.CanSign() {
+ return errors.InvalidArgumentError("public key cannot generate signatures")
+ }
+ if sig.Version == 5 && (sig.SigType == 0x00 || sig.SigType == 0x01) {
+ sig.AddMetadataToHashSuffix()
+ }
+ signed.Write(sig.HashSuffix)
+ hashBytes := signed.Sum(nil)
+ // see discussion https://github.com/ProtonMail/go-crypto/issues/107
+ if sig.Version >= 5 && (hashBytes[0] != sig.HashTag[0] || hashBytes[1] != sig.HashTag[1]) {
+ return errors.SignatureError("hash tag doesn't match")
+ }
+
+ if pk.PubKeyAlgo != sig.PubKeyAlgo {
+ return errors.InvalidArgumentError("public key and signature use different algorithms")
+ }
+
+ switch pk.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
+ rsaPublicKey, _ := pk.PublicKey.(*rsa.PublicKey)
+ err = rsa.VerifyPKCS1v15(rsaPublicKey, sig.Hash, hashBytes, padToKeySize(rsaPublicKey, sig.RSASignature.Bytes()))
+ if err != nil {
+ return errors.SignatureError("RSA verification failure")
+ }
+ return nil
+ case PubKeyAlgoDSA:
+ dsaPublicKey, _ := pk.PublicKey.(*dsa.PublicKey)
+ // Need to truncate hashBytes to match FIPS 186-3 section 4.6.
+ subgroupSize := (dsaPublicKey.Q.BitLen() + 7) / 8
+ if len(hashBytes) > subgroupSize {
+ hashBytes = hashBytes[:subgroupSize]
+ }
+ if !dsa.Verify(dsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.DSASigR.Bytes()), new(big.Int).SetBytes(sig.DSASigS.Bytes())) {
+ return errors.SignatureError("DSA verification failure")
+ }
+ return nil
+ case PubKeyAlgoECDSA:
+ ecdsaPublicKey := pk.PublicKey.(*ecdsa.PublicKey)
+ if !ecdsa.Verify(ecdsaPublicKey, hashBytes, new(big.Int).SetBytes(sig.ECDSASigR.Bytes()), new(big.Int).SetBytes(sig.ECDSASigS.Bytes())) {
+ return errors.SignatureError("ECDSA verification failure")
+ }
+ return nil
+ case PubKeyAlgoEdDSA:
+ eddsaPublicKey := pk.PublicKey.(*eddsa.PublicKey)
+ if !eddsa.Verify(eddsaPublicKey, hashBytes, sig.EdDSASigR.Bytes(), sig.EdDSASigS.Bytes()) {
+ return errors.SignatureError("EdDSA verification failure")
+ }
+ return nil
+ case PubKeyAlgoEd25519:
+ ed25519PublicKey := pk.PublicKey.(*ed25519.PublicKey)
+ if !ed25519.Verify(ed25519PublicKey, hashBytes, sig.EdSig) {
+ return errors.SignatureError("Ed25519 verification failure")
+ }
+ return nil
+ case PubKeyAlgoEd448:
+ ed448PublicKey := pk.PublicKey.(*ed448.PublicKey)
+ if !ed448.Verify(ed448PublicKey, hashBytes, sig.EdSig) {
+ return errors.SignatureError("ed448 verification failure")
+ }
+ return nil
+ default:
+ return errors.SignatureError("Unsupported public key algorithm used in signature")
+ }
+}
+
+// keySignatureHash returns a Hash of the message that needs to be signed for
+// pk to assert a subkey relationship to signed.
+func keySignatureHash(pk, signed signingKey, hashFunc hash.Hash) (h hash.Hash, err error) {
+ h = hashFunc
+
+ // RFC 4880, section 5.2.4
+ err = pk.SerializeForHash(h)
+ if err != nil {
+ return nil, err
+ }
+
+ err = signed.SerializeForHash(h)
+ return
+}
+
+// VerifyKeyHashTag returns nil iff sig appears to be a plausible signature over this
+// primary key and subkey, based solely on its HashTag.
+func (pk *PublicKey) VerifyKeyHashTag(signed *PublicKey, sig *Signature) error {
+ preparedHash, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ h, err := keySignatureHash(pk, signed, preparedHash)
+ if err != nil {
+ return err
+ }
+ return VerifyHashTag(h, sig)
+}
+
+// VerifyKeySignature returns nil iff sig is a valid signature, made by this
+// public key, of signed.
+func (pk *PublicKey) VerifyKeySignature(signed *PublicKey, sig *Signature) error {
+ preparedHash, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ h, err := keySignatureHash(pk, signed, preparedHash)
+ if err != nil {
+ return err
+ }
+ if err = pk.VerifySignature(h, sig); err != nil {
+ return err
+ }
+
+ if sig.FlagSign {
+ // Signing subkeys must be cross-signed. See
+ // https://www.gnupg.org/faq/subkey-cross-certify.html.
+ if sig.EmbeddedSignature == nil {
+ return errors.StructuralError("signing subkey is missing cross-signature")
+ }
+ preparedHashEmbedded, err := sig.EmbeddedSignature.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ // Verify the cross-signature. This is calculated over the same
+ // data as the main signature, so we cannot just recursively
+ // call signed.VerifyKeySignature(...)
+ if h, err = keySignatureHash(pk, signed, preparedHashEmbedded); err != nil {
+ return errors.StructuralError("error while hashing for cross-signature: " + err.Error())
+ }
+ if err := signed.VerifySignature(h, sig.EmbeddedSignature); err != nil {
+ return errors.StructuralError("error while verifying cross-signature: " + err.Error())
+ }
+ }
+
+ return nil
+}
+
+func keyRevocationHash(pk signingKey, hashFunc hash.Hash) (err error) {
+ return pk.SerializeForHash(hashFunc)
+}
+
+// VerifyRevocationHashTag returns nil iff sig appears to be a plausible signature
+// over this public key, based solely on its HashTag.
+func (pk *PublicKey) VerifyRevocationHashTag(sig *Signature) (err error) {
+ preparedHash, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ if err = keyRevocationHash(pk, preparedHash); err != nil {
+ return err
+ }
+ return VerifyHashTag(preparedHash, sig)
+}
+
+// VerifyRevocationSignature returns nil iff sig is a valid signature, made by this
+// public key.
+func (pk *PublicKey) VerifyRevocationSignature(sig *Signature) (err error) {
+ preparedHash, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ if err = keyRevocationHash(pk, preparedHash); err != nil {
+ return err
+ }
+ return pk.VerifySignature(preparedHash, sig)
+}
+
+// VerifySubkeyRevocationSignature returns nil iff sig is a valid subkey revocation signature,
+// made by this public key, of signed.
+func (pk *PublicKey) VerifySubkeyRevocationSignature(sig *Signature, signed *PublicKey) (err error) {
+ preparedHash, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ h, err := keySignatureHash(pk, signed, preparedHash)
+ if err != nil {
+ return err
+ }
+ return pk.VerifySignature(h, sig)
+}
+
+// userIdSignatureHash returns a Hash of the message that needs to be signed
+// to assert that pk is a valid key for id.
+func userIdSignatureHash(id string, pk *PublicKey, h hash.Hash) (err error) {
+
+ // RFC 4880, section 5.2.4
+ if err := pk.SerializeSignaturePrefix(h); err != nil {
+ return err
+ }
+ if err := pk.serializeWithoutHeaders(h); err != nil {
+ return err
+ }
+
+ var buf [5]byte
+ buf[0] = 0xb4
+ buf[1] = byte(len(id) >> 24)
+ buf[2] = byte(len(id) >> 16)
+ buf[3] = byte(len(id) >> 8)
+ buf[4] = byte(len(id))
+ h.Write(buf[:])
+ h.Write([]byte(id))
+
+ return nil
+}
+
+// directKeySignatureHash returns a Hash of the message that needs to be signed.
+func directKeySignatureHash(pk *PublicKey, h hash.Hash) (err error) {
+ return pk.SerializeForHash(h)
+}
+
+// VerifyUserIdHashTag returns nil iff sig appears to be a plausible signature over this
+// public key and UserId, based solely on its HashTag
+func (pk *PublicKey) VerifyUserIdHashTag(id string, sig *Signature) (err error) {
+ preparedHash, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ err = userIdSignatureHash(id, pk, preparedHash)
+ if err != nil {
+ return err
+ }
+ return VerifyHashTag(preparedHash, sig)
+}
+
+// VerifyUserIdSignature returns nil iff sig is a valid signature, made by this
+// public key, that id is the identity of pub.
+func (pk *PublicKey) VerifyUserIdSignature(id string, pub *PublicKey, sig *Signature) (err error) {
+ h, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ if err := userIdSignatureHash(id, pub, h); err != nil {
+ return err
+ }
+ return pk.VerifySignature(h, sig)
+}
+
+// VerifyDirectKeySignature returns nil iff sig is a valid signature, made by this
+// public key.
+func (pk *PublicKey) VerifyDirectKeySignature(sig *Signature) (err error) {
+ h, err := sig.PrepareVerify()
+ if err != nil {
+ return err
+ }
+ if err := directKeySignatureHash(pk, h); err != nil {
+ return err
+ }
+ return pk.VerifySignature(h, sig)
+}
+
+// KeyIdString returns the public key's fingerprint in capital hex
+// (e.g. "6C7EE1B8621CC013").
+func (pk *PublicKey) KeyIdString() string {
+ return fmt.Sprintf("%X", pk.Fingerprint[12:20])
+}
+
+// KeyIdShortString returns the short form of public key's fingerprint
+// in capital hex, as shown by gpg --list-keys (e.g. "621CC013").
+func (pk *PublicKey) KeyIdShortString() string {
+ return fmt.Sprintf("%X", pk.Fingerprint[16:20])
+}
+
+// BitLength returns the bit length for the given public key.
+func (pk *PublicKey) BitLength() (bitLength uint16, err error) {
+ switch pk.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSAEncryptOnly, PubKeyAlgoRSASignOnly:
+ bitLength = pk.n.BitLength()
+ case PubKeyAlgoDSA:
+ bitLength = pk.p.BitLength()
+ case PubKeyAlgoElGamal:
+ bitLength = pk.p.BitLength()
+ case PubKeyAlgoECDSA:
+ bitLength = pk.p.BitLength()
+ case PubKeyAlgoECDH:
+ bitLength = pk.p.BitLength()
+ case PubKeyAlgoEdDSA:
+ bitLength = pk.p.BitLength()
+ case PubKeyAlgoX25519:
+ bitLength = x25519.KeySize * 8
+ case PubKeyAlgoX448:
+ bitLength = x448.KeySize * 8
+ case PubKeyAlgoEd25519:
+ bitLength = ed25519.PublicKeySize * 8
+ case PubKeyAlgoEd448:
+ bitLength = ed448.PublicKeySize * 8
+ default:
+ err = errors.InvalidArgumentError("bad public-key algorithm")
+ }
+ return
+}
+
+// Curve returns the used elliptic curve of this public key.
+// Returns an error if no elliptic curve is used.
+func (pk *PublicKey) Curve() (curve Curve, err error) {
+ switch pk.PubKeyAlgo {
+ case PubKeyAlgoECDSA, PubKeyAlgoECDH, PubKeyAlgoEdDSA:
+ curveInfo := ecc.FindByOid(pk.oid)
+ if curveInfo == nil {
+ return "", errors.UnsupportedError(fmt.Sprintf("unknown oid: %x", pk.oid))
+ }
+ curve = Curve(curveInfo.GenName)
+ case PubKeyAlgoEd25519, PubKeyAlgoX25519:
+ curve = Curve25519
+ case PubKeyAlgoEd448, PubKeyAlgoX448:
+ curve = Curve448
+ default:
+ err = errors.InvalidArgumentError("public key does not operate with an elliptic curve")
+ }
+ return
+}
+
+// KeyExpired returns whether sig is a self-signature of a key that has
+// expired or is created in the future.
+func (pk *PublicKey) KeyExpired(sig *Signature, currentTime time.Time) bool {
+ if pk.CreationTime.Unix() > currentTime.Unix() {
+ return true
+ }
+ if sig.KeyLifetimeSecs == nil || *sig.KeyLifetimeSecs == 0 {
+ return false
+ }
+ expiry := pk.CreationTime.Add(time.Duration(*sig.KeyLifetimeSecs) * time.Second)
+ return currentTime.Unix() > expiry.Unix()
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key_test_data.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key_test_data.go
new file mode 100644
index 000000000..b255f1f6f
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/public_key_test_data.go
@@ -0,0 +1,24 @@
+package packet
+
+const rsaFingerprintHex = "5fb74b1d03b1e3cb31bc2f8aa34d7e18c20c31bb"
+
+const rsaPkDataHex = "988d044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd0011010001"
+
+const dsaFingerprintHex = "eece4c094db002103714c63c8e8fbe54062f19ed"
+
+const dsaPkDataHex = "9901a2044d432f89110400cd581334f0d7a1e1bdc8b9d6d8c0baf68793632735d2bb0903224cbaa1dfbf35a60ee7a13b92643421e1eb41aa8d79bea19a115a677f6b8ba3c7818ce53a6c2a24a1608bd8b8d6e55c5090cbde09dd26e356267465ae25e69ec8bdd57c7bbb2623e4d73336f73a0a9098f7f16da2e25252130fd694c0e8070c55a812a423ae7f00a0ebf50e70c2f19c3520a551bd4b08d30f23530d3d03ff7d0bf4a53a64a09dc5e6e6e35854b7d70c882b0c60293401958b1bd9e40abec3ea05ba87cf64899299d4bd6aa7f459c201d3fbbd6c82004bdc5e8a9eb8082d12054cc90fa9d4ec251a843236a588bf49552441817436c4f43326966fe85447d4e6d0acf8fa1ef0f014730770603ad7634c3088dc52501c237328417c31c89ed70400b2f1a98b0bf42f11fefc430704bebbaa41d9f355600c3facee1e490f64208e0e094ea55e3a598a219a58500bf78ac677b670a14f4e47e9cf8eab4f368cc1ddcaa18cc59309d4cc62dd4f680e73e6cc3e1ce87a84d0925efbcb26c575c093fc42eecf45135fabf6403a25c2016e1774c0484e440a18319072c617cc97ac0a3bb0"
+
+const ecdsaFingerprintHex = "9892270b38b8980b05c8d56d43fe956c542ca00b"
+
+const ecdsaPkDataHex = "9893045071c29413052b8104002304230401f4867769cedfa52c325018896245443968e52e51d0c2df8d939949cb5b330f2921711fbee1c9b9dddb95d15cb0255e99badeddda7cc23d9ddcaacbc290969b9f24019375d61c2e4e3b36953a28d8b2bc95f78c3f1d592fb24499be348656a7b17e3963187b4361afe497bc5f9f81213f04069f8e1fb9e6a6290ae295ca1a92b894396cb4"
+
+const ecdhFingerprintHex = "722354df2475a42164d1d49faa8b938f9a201946"
+
+const ecdhPkDataHex = "b90073044d53059212052b810400220303042faa84024a20b6735c4897efa5bfb41bf85b7eefeab5ca0cb9ffc8ea04a46acb25534a577694f9e25340a4ab5223a9dd1eda530c8aa2e6718db10d7e672558c7736fe09369ea5739a2a3554bf16d41faa50562f11c6d39bbd5dffb6b9a9ec91803010909"
+
+const eddsaFingerprintHex = "b2d5e5ec0e6deca6bc8eeeb00907e75e1dd99ad8"
+
+const eddsaPkDataHex = "98330456e2132b16092b06010401da470f01010740bbda39266affa511a8c2d02edf690fb784b0499c4406185811a163539ef11dc1b41d74657374696e67203c74657374696e674074657374696e672e636f6d3e8879041316080021050256e2132b021b03050b09080702061508090a0b020416020301021e01021780000a09100907e75e1dd99ad86d0c00fe39d2008359352782bc9b61ac382584cd8eff3f57a18c2287e3afeeb05d1f04ba00fe2d0bc1ddf3ff8adb9afa3e7d9287244b4ec567f3db4d60b74a9b5465ed528203"
+
+// Source: https://sites.google.com/site/brainhub/pgpecckeys#TOC-ECC-NIST-P-384-key
+const ecc384PubHex = `99006f044d53059213052b81040022030304f6b8c5aced5b84ef9f4a209db2e4a9dfb70d28cb8c10ecd57674a9fa5a67389942b62d5e51367df4c7bfd3f8e500feecf07ed265a621a8ebbbe53e947ec78c677eba143bd1533c2b350e1c29f82313e1e1108eba063be1e64b10e6950e799c2db42465635f6473615f64685f333834203c6f70656e70677040627261696e6875622e6f72673e8900cb04101309005305024d530592301480000000002000077072656665727265642d656d61696c2d656e636f64696e67407067702e636f6d7067706d696d65040b090807021901051b03000000021602051e010000000415090a08000a0910098033880f54719fca2b0180aa37350968bd5f115afd8ce7bc7b103822152dbff06d0afcda835329510905b98cb469ba208faab87c7412b799e7b633017f58364ea480e8a1a3f253a0c5f22c446e8be9a9fce6210136ee30811abbd49139de28b5bdf8dc36d06ae748579e9ff503b90073044d53059212052b810400220303042faa84024a20b6735c4897efa5bfb41bf85b7eefeab5ca0cb9ffc8ea04a46acb25534a577694f9e25340a4ab5223a9dd1eda530c8aa2e6718db10d7e672558c7736fe09369ea5739a2a3554bf16d41faa50562f11c6d39bbd5dffb6b9a9ec9180301090989008404181309000c05024d530592051b0c000000000a0910098033880f54719f80970180eee7a6d8fcee41ee4f9289df17f9bcf9d955dca25c583b94336f3a2b2d4986dc5cf417b8d2dc86f741a9e1a6d236c0e3017d1c76575458a0cfb93ae8a2b274fcc65ceecd7a91eec83656ba13219969f06945b48c56bd04152c3a0553c5f2f4bd1267`
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/reader.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/reader.go
new file mode 100644
index 000000000..dd8409239
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/reader.go
@@ -0,0 +1,209 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+type PacketReader interface {
+ Next() (p Packet, err error)
+ Push(reader io.Reader) (err error)
+ Unread(p Packet)
+}
+
+// Reader reads packets from an io.Reader and allows packets to be 'unread' so
+// that they result from the next call to Next.
+type Reader struct {
+ q []Packet
+ readers []io.Reader
+}
+
+// New io.Readers are pushed when a compressed or encrypted packet is processed
+// and recursively treated as a new source of packets. However, a carefully
+// crafted packet can trigger an infinite recursive sequence of packets. See
+// http://mumble.net/~campbell/misc/pgp-quine
+// https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4402
+// This constant limits the number of recursive packets that may be pushed.
+const maxReaders = 32
+
+// Next returns the most recently unread Packet, or reads another packet from
+// the top-most io.Reader. Unknown/unsupported/Marker packet types are skipped.
+func (r *Reader) Next() (p Packet, err error) {
+ for {
+ p, err := r.read()
+ if err == io.EOF {
+ break
+ } else if err != nil {
+ if _, ok := err.(errors.UnknownPacketTypeError); ok {
+ continue
+ }
+ if _, ok := err.(errors.UnsupportedError); ok {
+ switch p.(type) {
+ case *SymmetricallyEncrypted, *AEADEncrypted, *Compressed, *LiteralData:
+ return nil, err
+ }
+ continue
+ }
+ return nil, err
+ } else {
+ //A marker packet MUST be ignored when received
+ switch p.(type) {
+ case *Marker:
+ continue
+ }
+ return p, nil
+ }
+ }
+ return nil, io.EOF
+}
+
+// Next returns the most recently unread Packet, or reads another packet from
+// the top-most io.Reader. Unknown/Marker packet types are skipped while unsupported
+// packets are returned as UnsupportedPacket type.
+func (r *Reader) NextWithUnsupported() (p Packet, err error) {
+ for {
+ p, err = r.read()
+ if err == io.EOF {
+ break
+ } else if err != nil {
+ if _, ok := err.(errors.UnknownPacketTypeError); ok {
+ continue
+ }
+ if casteErr, ok := err.(errors.UnsupportedError); ok {
+ return &UnsupportedPacket{
+ IncompletePacket: p,
+ Error: casteErr,
+ }, nil
+ }
+ return
+ } else {
+ //A marker packet MUST be ignored when received
+ switch p.(type) {
+ case *Marker:
+ continue
+ }
+ return
+ }
+ }
+ return nil, io.EOF
+}
+
+func (r *Reader) read() (p Packet, err error) {
+ if len(r.q) > 0 {
+ p = r.q[len(r.q)-1]
+ r.q = r.q[:len(r.q)-1]
+ return
+ }
+ for len(r.readers) > 0 {
+ p, err = Read(r.readers[len(r.readers)-1])
+ if err == io.EOF {
+ r.readers = r.readers[:len(r.readers)-1]
+ continue
+ }
+ return p, err
+ }
+ return nil, io.EOF
+}
+
+// Push causes the Reader to start reading from a new io.Reader. When an EOF
+// error is seen from the new io.Reader, it is popped and the Reader continues
+// to read from the next most recent io.Reader. Push returns a StructuralError
+// if pushing the reader would exceed the maximum recursion level, otherwise it
+// returns nil.
+func (r *Reader) Push(reader io.Reader) (err error) {
+ if len(r.readers) >= maxReaders {
+ return errors.StructuralError("too many layers of packets")
+ }
+ r.readers = append(r.readers, reader)
+ return nil
+}
+
+// Unread causes the given Packet to be returned from the next call to Next.
+func (r *Reader) Unread(p Packet) {
+ r.q = append(r.q, p)
+}
+
+func NewReader(r io.Reader) *Reader {
+ return &Reader{
+ q: nil,
+ readers: []io.Reader{r},
+ }
+}
+
+// CheckReader is similar to Reader but additionally
+// uses the pushdown automata to verify the read packet sequence.
+type CheckReader struct {
+ Reader
+ verifier *SequenceVerifier
+ fullyRead bool
+}
+
+// Next returns the most recently unread Packet, or reads another packet from
+// the top-most io.Reader. Unknown packet types are skipped.
+// If the read packet sequence does not conform to the packet composition
+// rules in rfc4880, it returns an error.
+func (r *CheckReader) Next() (p Packet, err error) {
+ if r.fullyRead {
+ return nil, io.EOF
+ }
+ if len(r.q) > 0 {
+ p = r.q[len(r.q)-1]
+ r.q = r.q[:len(r.q)-1]
+ return
+ }
+ var errMsg error
+ for len(r.readers) > 0 {
+ p, errMsg, err = ReadWithCheck(r.readers[len(r.readers)-1], r.verifier)
+ if errMsg != nil {
+ err = errMsg
+ return
+ }
+ if err == nil {
+ return
+ }
+ if err == io.EOF {
+ r.readers = r.readers[:len(r.readers)-1]
+ continue
+ }
+ //A marker packet MUST be ignored when received
+ switch p.(type) {
+ case *Marker:
+ continue
+ }
+ if _, ok := err.(errors.UnknownPacketTypeError); ok {
+ continue
+ }
+ if _, ok := err.(errors.UnsupportedError); ok {
+ switch p.(type) {
+ case *SymmetricallyEncrypted, *AEADEncrypted, *Compressed, *LiteralData:
+ return nil, err
+ }
+ continue
+ }
+ return nil, err
+ }
+ if errMsg = r.verifier.Next(EOSSymbol); errMsg != nil {
+ return nil, errMsg
+ }
+ if errMsg = r.verifier.AssertValid(); errMsg != nil {
+ return nil, errMsg
+ }
+ r.fullyRead = true
+ return nil, io.EOF
+}
+
+func NewCheckReader(r io.Reader) *CheckReader {
+ return &CheckReader{
+ Reader: Reader{
+ q: nil,
+ readers: []io.Reader{r},
+ },
+ verifier: NewSequenceVerifier(),
+ fullyRead: false,
+ }
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/recipient.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/recipient.go
new file mode 100644
index 000000000..fb2e362e4
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/recipient.go
@@ -0,0 +1,15 @@
+package packet
+
+// Recipient type represents a Intended Recipient Fingerprint subpacket
+// See https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh#name-intended-recipient-fingerpr
+type Recipient struct {
+ KeyVersion int
+ Fingerprint []byte
+}
+
+func (r *Recipient) Serialize() []byte {
+ packet := make([]byte, len(r.Fingerprint)+1)
+ packet[0] = byte(r.KeyVersion)
+ copy(packet[1:], r.Fingerprint)
+ return packet
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go
new file mode 100644
index 000000000..3a4b366d8
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/signature.go
@@ -0,0 +1,1509 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "bytes"
+ "crypto"
+ "crypto/dsa"
+ "encoding/asn1"
+ "encoding/binary"
+ "hash"
+ "io"
+ "math/big"
+ "strconv"
+ "time"
+
+ "github.com/ProtonMail/go-crypto/openpgp/ecdsa"
+ "github.com/ProtonMail/go-crypto/openpgp/ed25519"
+ "github.com/ProtonMail/go-crypto/openpgp/ed448"
+ "github.com/ProtonMail/go-crypto/openpgp/eddsa"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/encoding"
+)
+
+const (
+ // First octet of key flags.
+ // See RFC 9580, section 5.2.3.29 for details.
+ KeyFlagCertify = 1 << iota
+ KeyFlagSign
+ KeyFlagEncryptCommunications
+ KeyFlagEncryptStorage
+ KeyFlagSplitKey
+ KeyFlagAuthenticate
+ _
+ KeyFlagGroupKey
+)
+
+const (
+ // First octet of keyserver preference flags.
+ // See RFC 9580, section 5.2.3.25 for details.
+ _ = 1 << iota
+ _
+ _
+ _
+ _
+ _
+ _
+ KeyserverPrefNoModify
+)
+
+const SaltNotationName = "salt@notations.openpgpjs.org"
+
+// Signature represents a signature. See RFC 9580, section 5.2.
+type Signature struct {
+ Version int
+ SigType SignatureType
+ PubKeyAlgo PublicKeyAlgorithm
+ Hash crypto.Hash
+ // salt contains a random salt value for v6 signatures
+ // See RFC 9580 Section 5.2.4.
+ salt []byte
+
+ // HashSuffix is extra data that is hashed in after the signed data.
+ HashSuffix []byte
+ // HashTag contains the first two bytes of the hash for fast rejection
+ // of bad signed data.
+ HashTag [2]byte
+
+ // Metadata includes format, filename and time, and is protected by v5
+ // signatures of type 0x00 or 0x01. This metadata is included into the hash
+ // computation; if nil, six 0x00 bytes are used instead. See section 5.2.4.
+ Metadata *LiteralData
+
+ CreationTime time.Time
+
+ RSASignature encoding.Field
+ DSASigR, DSASigS encoding.Field
+ ECDSASigR, ECDSASigS encoding.Field
+ EdDSASigR, EdDSASigS encoding.Field
+ EdSig []byte
+
+ // rawSubpackets contains the unparsed subpackets, in order.
+ rawSubpackets []outputSubpacket
+
+ // The following are optional so are nil when not included in the
+ // signature.
+
+ SigLifetimeSecs, KeyLifetimeSecs *uint32
+ PreferredSymmetric, PreferredHash, PreferredCompression []uint8
+ PreferredCipherSuites [][2]uint8
+ IssuerKeyId *uint64
+ IssuerFingerprint []byte
+ SignerUserId *string
+ IsPrimaryId *bool
+ Notations []*Notation
+ IntendedRecipients []*Recipient
+
+ // TrustLevel and TrustAmount can be set by the signer to assert that
+ // the key is not only valid but also trustworthy at the specified
+ // level.
+ // See RFC 9580, section 5.2.3.21 for details.
+ TrustLevel TrustLevel
+ TrustAmount TrustAmount
+
+ // TrustRegularExpression can be used in conjunction with trust Signature
+ // packets to limit the scope of the trust that is extended.
+ // See RFC 9580, section 5.2.3.22 for details.
+ TrustRegularExpression *string
+
+ // KeyserverPrefsValid is set if any keyserver preferences were given. See RFC 9580, section
+ // 5.2.3.25 for details.
+ KeyserverPrefsValid bool
+ KeyserverPrefNoModify bool
+
+ // PreferredKeyserver can be set to a URI where the latest version of the
+ // key that this signature is made over can be found. See RFC 9580, section
+ // 5.2.3.26 for details.
+ PreferredKeyserver string
+
+ // PolicyURI can be set to the URI of a document that describes the
+ // policy under which the signature was issued. See RFC 9580, section
+ // 5.2.3.28 for details.
+ PolicyURI string
+
+ // FlagsValid is set if any flags were given. See RFC 9580, section
+ // 5.2.3.29 for details.
+ FlagsValid bool
+ FlagCertify, FlagSign, FlagEncryptCommunications, FlagEncryptStorage, FlagSplitKey, FlagAuthenticate, FlagGroupKey bool
+
+ // RevocationReason is set if this signature has been revoked.
+ // See RFC 9580, section 5.2.3.31 for details.
+ RevocationReason *ReasonForRevocation
+ RevocationReasonText string
+
+ // In a self-signature, these flags are set there is a features subpacket
+ // indicating that the issuer implementation supports these features
+ // see https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-crypto-refresh#features-subpacket
+ SEIPDv1, SEIPDv2 bool
+
+ // EmbeddedSignature, if non-nil, is a signature of the parent key, by
+ // this key. This prevents an attacker from claiming another's signing
+ // subkey as their own.
+ EmbeddedSignature *Signature
+
+ outSubpackets []outputSubpacket
+}
+
+// VerifiableSignature internally keeps state if the
+// the signature has been verified before.
+type VerifiableSignature struct {
+ Valid *bool // nil if it has not been verified yet
+ Packet *Signature
+}
+
+// NewVerifiableSig returns a struct of type VerifiableSignature referencing the input signature.
+func NewVerifiableSig(signature *Signature) *VerifiableSignature {
+ return &VerifiableSignature{
+ Packet: signature,
+ }
+}
+
+// Salt returns the signature salt for v6 signatures.
+func (sig *Signature) Salt() []byte {
+ if sig == nil {
+ return nil
+ }
+ return sig.salt
+}
+
+func (sig *Signature) parse(r io.Reader) (err error) {
+ // RFC 9580, section 5.2.3
+ var buf [7]byte
+ _, err = readFull(r, buf[:1])
+ if err != nil {
+ return
+ }
+ sig.Version = int(buf[0])
+ if sig.Version != 4 && sig.Version != 5 && sig.Version != 6 {
+ err = errors.UnsupportedError("signature packet version " + strconv.Itoa(int(buf[0])))
+ return
+ }
+
+ if V5Disabled && sig.Version == 5 {
+ return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
+ }
+
+ if sig.Version == 6 {
+ _, err = readFull(r, buf[:7])
+ } else {
+ _, err = readFull(r, buf[:5])
+ }
+ if err != nil {
+ return
+ }
+ sig.SigType = SignatureType(buf[0])
+ sig.PubKeyAlgo = PublicKeyAlgorithm(buf[1])
+ switch sig.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly, PubKeyAlgoDSA, PubKeyAlgoECDSA, PubKeyAlgoEdDSA, PubKeyAlgoEd25519, PubKeyAlgoEd448:
+ default:
+ err = errors.UnsupportedError("public key algorithm " + strconv.Itoa(int(sig.PubKeyAlgo)))
+ return
+ }
+
+ var ok bool
+
+ if sig.Version < 5 {
+ sig.Hash, ok = algorithm.HashIdToHashWithSha1(buf[2])
+ } else {
+ sig.Hash, ok = algorithm.HashIdToHash(buf[2])
+ }
+
+ if !ok {
+ return errors.UnsupportedError("hash function " + strconv.Itoa(int(buf[2])))
+ }
+
+ var hashedSubpacketsLength int
+ if sig.Version == 6 {
+ // For a v6 signature, a four-octet length is used.
+ hashedSubpacketsLength =
+ int(buf[3])<<24 |
+ int(buf[4])<<16 |
+ int(buf[5])<<8 |
+ int(buf[6])
+ } else {
+ hashedSubpacketsLength = int(buf[3])<<8 | int(buf[4])
+ }
+ hashedSubpackets := make([]byte, hashedSubpacketsLength)
+ _, err = readFull(r, hashedSubpackets)
+ if err != nil {
+ return
+ }
+ err = sig.buildHashSuffix(hashedSubpackets)
+ if err != nil {
+ return
+ }
+
+ err = parseSignatureSubpackets(sig, hashedSubpackets, true)
+ if err != nil {
+ return
+ }
+
+ if sig.Version == 6 {
+ _, err = readFull(r, buf[:4])
+ } else {
+ _, err = readFull(r, buf[:2])
+ }
+
+ if err != nil {
+ return
+ }
+ var unhashedSubpacketsLength uint32
+ if sig.Version == 6 {
+ unhashedSubpacketsLength = uint32(buf[0])<<24 | uint32(buf[1])<<16 | uint32(buf[2])<<8 | uint32(buf[3])
+ } else {
+ unhashedSubpacketsLength = uint32(buf[0])<<8 | uint32(buf[1])
+ }
+ unhashedSubpackets := make([]byte, unhashedSubpacketsLength)
+ _, err = readFull(r, unhashedSubpackets)
+ if err != nil {
+ return
+ }
+ err = parseSignatureSubpackets(sig, unhashedSubpackets, false)
+ if err != nil {
+ return
+ }
+
+ _, err = readFull(r, sig.HashTag[:2])
+ if err != nil {
+ return
+ }
+
+ if sig.Version == 6 {
+ // Only for v6 signatures, a variable-length field containing the salt
+ _, err = readFull(r, buf[:1])
+ if err != nil {
+ return
+ }
+ saltLength := int(buf[0])
+ var expectedSaltLength int
+ expectedSaltLength, err = SaltLengthForHash(sig.Hash)
+ if err != nil {
+ return
+ }
+ if saltLength != expectedSaltLength {
+ err = errors.StructuralError("unexpected salt size for the given hash algorithm")
+ return
+ }
+ salt := make([]byte, expectedSaltLength)
+ _, err = readFull(r, salt)
+ if err != nil {
+ return
+ }
+ sig.salt = salt
+ }
+
+ switch sig.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
+ sig.RSASignature = new(encoding.MPI)
+ _, err = sig.RSASignature.ReadFrom(r)
+ case PubKeyAlgoDSA:
+ sig.DSASigR = new(encoding.MPI)
+ if _, err = sig.DSASigR.ReadFrom(r); err != nil {
+ return
+ }
+
+ sig.DSASigS = new(encoding.MPI)
+ _, err = sig.DSASigS.ReadFrom(r)
+ case PubKeyAlgoECDSA:
+ sig.ECDSASigR = new(encoding.MPI)
+ if _, err = sig.ECDSASigR.ReadFrom(r); err != nil {
+ return
+ }
+
+ sig.ECDSASigS = new(encoding.MPI)
+ _, err = sig.ECDSASigS.ReadFrom(r)
+ case PubKeyAlgoEdDSA:
+ sig.EdDSASigR = new(encoding.MPI)
+ if _, err = sig.EdDSASigR.ReadFrom(r); err != nil {
+ return
+ }
+
+ sig.EdDSASigS = new(encoding.MPI)
+ if _, err = sig.EdDSASigS.ReadFrom(r); err != nil {
+ return
+ }
+ case PubKeyAlgoEd25519:
+ sig.EdSig, err = ed25519.ReadSignature(r)
+ if err != nil {
+ return
+ }
+ case PubKeyAlgoEd448:
+ sig.EdSig, err = ed448.ReadSignature(r)
+ if err != nil {
+ return
+ }
+ default:
+ panic("unreachable")
+ }
+ return
+}
+
+// parseSignatureSubpackets parses subpackets of the main signature packet. See
+// RFC 9580, section 5.2.3.1.
+func parseSignatureSubpackets(sig *Signature, subpackets []byte, isHashed bool) (err error) {
+ for len(subpackets) > 0 {
+ subpackets, err = parseSignatureSubpacket(sig, subpackets, isHashed)
+ if err != nil {
+ return
+ }
+ }
+
+ if sig.CreationTime.IsZero() {
+ err = errors.StructuralError("no creation time in signature")
+ }
+
+ return
+}
+
+type signatureSubpacketType uint8
+
+const (
+ creationTimeSubpacket signatureSubpacketType = 2
+ signatureExpirationSubpacket signatureSubpacketType = 3
+ exportableCertSubpacket signatureSubpacketType = 4
+ trustSubpacket signatureSubpacketType = 5
+ regularExpressionSubpacket signatureSubpacketType = 6
+ keyExpirationSubpacket signatureSubpacketType = 9
+ prefSymmetricAlgosSubpacket signatureSubpacketType = 11
+ issuerSubpacket signatureSubpacketType = 16
+ notationDataSubpacket signatureSubpacketType = 20
+ prefHashAlgosSubpacket signatureSubpacketType = 21
+ prefCompressionSubpacket signatureSubpacketType = 22
+ keyserverPrefsSubpacket signatureSubpacketType = 23
+ prefKeyserverSubpacket signatureSubpacketType = 24
+ primaryUserIdSubpacket signatureSubpacketType = 25
+ policyUriSubpacket signatureSubpacketType = 26
+ keyFlagsSubpacket signatureSubpacketType = 27
+ signerUserIdSubpacket signatureSubpacketType = 28
+ reasonForRevocationSubpacket signatureSubpacketType = 29
+ featuresSubpacket signatureSubpacketType = 30
+ embeddedSignatureSubpacket signatureSubpacketType = 32
+ issuerFingerprintSubpacket signatureSubpacketType = 33
+ intendedRecipientSubpacket signatureSubpacketType = 35
+ prefCipherSuitesSubpacket signatureSubpacketType = 39
+)
+
+// parseSignatureSubpacket parses a single subpacket. len(subpacket) is >= 1.
+func parseSignatureSubpacket(sig *Signature, subpacket []byte, isHashed bool) (rest []byte, err error) {
+ // RFC 9580, section 5.2.3.7
+ var (
+ length uint32
+ packetType signatureSubpacketType
+ isCritical bool
+ )
+ if len(subpacket) == 0 {
+ err = errors.StructuralError("zero length signature subpacket")
+ return
+ }
+ switch {
+ case subpacket[0] < 192:
+ length = uint32(subpacket[0])
+ subpacket = subpacket[1:]
+ case subpacket[0] < 255:
+ if len(subpacket) < 2 {
+ goto Truncated
+ }
+ length = uint32(subpacket[0]-192)<<8 + uint32(subpacket[1]) + 192
+ subpacket = subpacket[2:]
+ default:
+ if len(subpacket) < 5 {
+ goto Truncated
+ }
+ length = uint32(subpacket[1])<<24 |
+ uint32(subpacket[2])<<16 |
+ uint32(subpacket[3])<<8 |
+ uint32(subpacket[4])
+ subpacket = subpacket[5:]
+ }
+ if length > uint32(len(subpacket)) {
+ goto Truncated
+ }
+ rest = subpacket[length:]
+ subpacket = subpacket[:length]
+ if len(subpacket) == 0 {
+ err = errors.StructuralError("zero length signature subpacket")
+ return
+ }
+ packetType = signatureSubpacketType(subpacket[0] & 0x7f)
+ isCritical = subpacket[0]&0x80 == 0x80
+ subpacket = subpacket[1:]
+ sig.rawSubpackets = append(sig.rawSubpackets, outputSubpacket{isHashed, packetType, isCritical, subpacket})
+ if !isHashed &&
+ packetType != issuerSubpacket &&
+ packetType != issuerFingerprintSubpacket &&
+ packetType != embeddedSignatureSubpacket {
+ return
+ }
+ switch packetType {
+ case creationTimeSubpacket:
+ if len(subpacket) != 4 {
+ err = errors.StructuralError("signature creation time not four bytes")
+ return
+ }
+ t := binary.BigEndian.Uint32(subpacket)
+ sig.CreationTime = time.Unix(int64(t), 0)
+ case signatureExpirationSubpacket:
+ // Signature expiration time, section 5.2.3.18
+ if len(subpacket) != 4 {
+ err = errors.StructuralError("expiration subpacket with bad length")
+ return
+ }
+ sig.SigLifetimeSecs = new(uint32)
+ *sig.SigLifetimeSecs = binary.BigEndian.Uint32(subpacket)
+ case exportableCertSubpacket:
+ if subpacket[0] == 0 {
+ err = errors.UnsupportedError("signature with non-exportable certification")
+ return
+ }
+ case trustSubpacket:
+ if len(subpacket) != 2 {
+ err = errors.StructuralError("trust subpacket with bad length")
+ return
+ }
+ // Trust level and amount, section 5.2.3.21
+ sig.TrustLevel = TrustLevel(subpacket[0])
+ sig.TrustAmount = TrustAmount(subpacket[1])
+ case regularExpressionSubpacket:
+ if len(subpacket) == 0 {
+ err = errors.StructuralError("regexp subpacket with bad length")
+ return
+ }
+ // Trust regular expression, section 5.2.3.22
+ // RFC specifies the string should be null-terminated; remove a null byte from the end
+ if subpacket[len(subpacket)-1] != 0x00 {
+ err = errors.StructuralError("expected regular expression to be null-terminated")
+ return
+ }
+ trustRegularExpression := string(subpacket[:len(subpacket)-1])
+ sig.TrustRegularExpression = &trustRegularExpression
+ case keyExpirationSubpacket:
+ // Key expiration time, section 5.2.3.13
+ if len(subpacket) != 4 {
+ err = errors.StructuralError("key expiration subpacket with bad length")
+ return
+ }
+ sig.KeyLifetimeSecs = new(uint32)
+ *sig.KeyLifetimeSecs = binary.BigEndian.Uint32(subpacket)
+ case prefSymmetricAlgosSubpacket:
+ // Preferred symmetric algorithms, section 5.2.3.14
+ sig.PreferredSymmetric = make([]byte, len(subpacket))
+ copy(sig.PreferredSymmetric, subpacket)
+ case issuerSubpacket:
+ // Issuer, section 5.2.3.12
+ if sig.Version > 4 && isHashed {
+ err = errors.StructuralError("issuer subpacket found in v6 key")
+ return
+ }
+ if len(subpacket) != 8 {
+ err = errors.StructuralError("issuer subpacket with bad length")
+ return
+ }
+ if sig.Version <= 4 {
+ sig.IssuerKeyId = new(uint64)
+ *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket)
+ }
+ case notationDataSubpacket:
+ // Notation data, section 5.2.3.24
+ if len(subpacket) < 8 {
+ err = errors.StructuralError("notation data subpacket with bad length")
+ return
+ }
+
+ nameLength := uint32(subpacket[4])<<8 | uint32(subpacket[5])
+ valueLength := uint32(subpacket[6])<<8 | uint32(subpacket[7])
+ if len(subpacket) != int(nameLength)+int(valueLength)+8 {
+ err = errors.StructuralError("notation data subpacket with bad length")
+ return
+ }
+
+ notation := Notation{
+ IsHumanReadable: (subpacket[0] & 0x80) == 0x80,
+ Name: string(subpacket[8:(nameLength + 8)]),
+ Value: subpacket[(nameLength + 8):(valueLength + nameLength + 8)],
+ IsCritical: isCritical,
+ }
+
+ sig.Notations = append(sig.Notations, ¬ation)
+ case prefHashAlgosSubpacket:
+ // Preferred hash algorithms, section 5.2.3.16
+ sig.PreferredHash = make([]byte, len(subpacket))
+ copy(sig.PreferredHash, subpacket)
+ case prefCompressionSubpacket:
+ // Preferred compression algorithms, section 5.2.3.17
+ sig.PreferredCompression = make([]byte, len(subpacket))
+ copy(sig.PreferredCompression, subpacket)
+ case keyserverPrefsSubpacket:
+ // Keyserver preferences, section 5.2.3.25
+ sig.KeyserverPrefsValid = true
+ if len(subpacket) == 0 {
+ return
+ }
+ if subpacket[0]&KeyserverPrefNoModify != 0 {
+ sig.KeyserverPrefNoModify = true
+ }
+ case prefKeyserverSubpacket:
+ // Preferred keyserver, section 5.2.3.26
+ sig.PreferredKeyserver = string(subpacket)
+ case primaryUserIdSubpacket:
+ // Primary User ID, section 5.2.3.27
+ if len(subpacket) != 1 {
+ err = errors.StructuralError("primary user id subpacket with bad length")
+ return
+ }
+ sig.IsPrimaryId = new(bool)
+ if subpacket[0] > 0 {
+ *sig.IsPrimaryId = true
+ }
+ case keyFlagsSubpacket:
+ // Key flags, section 5.2.3.29
+ sig.FlagsValid = true
+ if len(subpacket) == 0 {
+ return
+ }
+ if subpacket[0]&KeyFlagCertify != 0 {
+ sig.FlagCertify = true
+ }
+ if subpacket[0]&KeyFlagSign != 0 {
+ sig.FlagSign = true
+ }
+ if subpacket[0]&KeyFlagEncryptCommunications != 0 {
+ sig.FlagEncryptCommunications = true
+ }
+ if subpacket[0]&KeyFlagEncryptStorage != 0 {
+ sig.FlagEncryptStorage = true
+ }
+ if subpacket[0]&KeyFlagSplitKey != 0 {
+ sig.FlagSplitKey = true
+ }
+ if subpacket[0]&KeyFlagAuthenticate != 0 {
+ sig.FlagAuthenticate = true
+ }
+ if subpacket[0]&KeyFlagGroupKey != 0 {
+ sig.FlagGroupKey = true
+ }
+ case signerUserIdSubpacket:
+ userId := string(subpacket)
+ sig.SignerUserId = &userId
+ case reasonForRevocationSubpacket:
+ // Reason For Revocation, section 5.2.3.31
+ if len(subpacket) == 0 {
+ err = errors.StructuralError("empty revocation reason subpacket")
+ return
+ }
+ sig.RevocationReason = new(ReasonForRevocation)
+ *sig.RevocationReason = NewReasonForRevocation(subpacket[0])
+ sig.RevocationReasonText = string(subpacket[1:])
+ case featuresSubpacket:
+ // Features subpacket, section 5.2.3.32 specifies a very general
+ // mechanism for OpenPGP implementations to signal support for new
+ // features.
+ if len(subpacket) > 0 {
+ if subpacket[0]&0x01 != 0 {
+ sig.SEIPDv1 = true
+ }
+ // 0x02 and 0x04 are reserved
+ if subpacket[0]&0x08 != 0 {
+ sig.SEIPDv2 = true
+ }
+ }
+ case embeddedSignatureSubpacket:
+ // Only usage is in signatures that cross-certify
+ // signing subkeys. section 5.2.3.34 describes the
+ // format, with its usage described in section 11.1
+ if sig.EmbeddedSignature != nil {
+ err = errors.StructuralError("Cannot have multiple embedded signatures")
+ return
+ }
+ sig.EmbeddedSignature = new(Signature)
+ if err := sig.EmbeddedSignature.parse(bytes.NewBuffer(subpacket)); err != nil {
+ return nil, err
+ }
+ if sigType := sig.EmbeddedSignature.SigType; sigType != SigTypePrimaryKeyBinding {
+ return nil, errors.StructuralError("cross-signature has unexpected type " + strconv.Itoa(int(sigType)))
+ }
+ case policyUriSubpacket:
+ // Policy URI, section 5.2.3.28
+ sig.PolicyURI = string(subpacket)
+ case issuerFingerprintSubpacket:
+ if len(subpacket) == 0 {
+ err = errors.StructuralError("empty issuer fingerprint subpacket")
+ return
+ }
+ v, l := subpacket[0], len(subpacket[1:])
+ if v >= 5 && l != 32 || v < 5 && l != 20 {
+ return nil, errors.StructuralError("bad fingerprint length")
+ }
+ sig.IssuerFingerprint = make([]byte, l)
+ copy(sig.IssuerFingerprint, subpacket[1:])
+ sig.IssuerKeyId = new(uint64)
+ if v >= 5 {
+ *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket[1:9])
+ } else {
+ *sig.IssuerKeyId = binary.BigEndian.Uint64(subpacket[13:21])
+ }
+ case intendedRecipientSubpacket:
+ // Intended Recipient Fingerprint, section 5.2.3.36
+ if len(subpacket) < 1 {
+ return nil, errors.StructuralError("invalid intended recipient fingerpring length")
+ }
+ version, length := subpacket[0], len(subpacket[1:])
+ if version >= 5 && length != 32 || version < 5 && length != 20 {
+ return nil, errors.StructuralError("invalid fingerprint length")
+ }
+ fingerprint := make([]byte, length)
+ copy(fingerprint, subpacket[1:])
+ sig.IntendedRecipients = append(sig.IntendedRecipients, &Recipient{int(version), fingerprint})
+ case prefCipherSuitesSubpacket:
+ // Preferred AEAD cipher suites, section 5.2.3.15
+ if len(subpacket)%2 != 0 {
+ err = errors.StructuralError("invalid aead cipher suite length")
+ return
+ }
+
+ sig.PreferredCipherSuites = make([][2]byte, len(subpacket)/2)
+
+ for i := 0; i < len(subpacket)/2; i++ {
+ sig.PreferredCipherSuites[i] = [2]uint8{subpacket[2*i], subpacket[2*i+1]}
+ }
+ default:
+ if isCritical {
+ err = errors.UnsupportedError("unknown critical signature subpacket type " + strconv.Itoa(int(packetType)))
+ return
+ }
+ }
+ return
+
+Truncated:
+ err = errors.StructuralError("signature subpacket truncated")
+ return
+}
+
+// subpacketLengthLength returns the length, in bytes, of an encoded length value.
+func subpacketLengthLength(length int) int {
+ if length < 192 {
+ return 1
+ }
+ if length < 16320 {
+ return 2
+ }
+ return 5
+}
+
+func (sig *Signature) CheckKeyIdOrFingerprint(pk *PublicKey) bool {
+ if sig.IssuerFingerprint != nil && len(sig.IssuerFingerprint) >= 20 {
+ return bytes.Equal(sig.IssuerFingerprint, pk.Fingerprint)
+ }
+ return sig.IssuerKeyId != nil && *sig.IssuerKeyId == pk.KeyId
+}
+
+func (sig *Signature) CheckKeyIdOrFingerprintExplicit(fingerprint []byte, keyId uint64) bool {
+ if sig.IssuerFingerprint != nil && len(sig.IssuerFingerprint) >= 20 && fingerprint != nil {
+ return bytes.Equal(sig.IssuerFingerprint, fingerprint)
+ }
+ return sig.IssuerKeyId != nil && *sig.IssuerKeyId == keyId
+}
+
+// serializeSubpacketLength marshals the given length into to.
+func serializeSubpacketLength(to []byte, length int) int {
+ // RFC 9580, Section 4.2.1.
+ if length < 192 {
+ to[0] = byte(length)
+ return 1
+ }
+ if length < 16320 {
+ length -= 192
+ to[0] = byte((length >> 8) + 192)
+ to[1] = byte(length)
+ return 2
+ }
+ to[0] = 255
+ to[1] = byte(length >> 24)
+ to[2] = byte(length >> 16)
+ to[3] = byte(length >> 8)
+ to[4] = byte(length)
+ return 5
+}
+
+// subpacketsLength returns the serialized length, in bytes, of the given
+// subpackets.
+func subpacketsLength(subpackets []outputSubpacket, hashed bool) (length int) {
+ for _, subpacket := range subpackets {
+ if subpacket.hashed == hashed {
+ length += subpacketLengthLength(len(subpacket.contents) + 1)
+ length += 1 // type byte
+ length += len(subpacket.contents)
+ }
+ }
+ return
+}
+
+// serializeSubpackets marshals the given subpackets into to.
+func serializeSubpackets(to []byte, subpackets []outputSubpacket, hashed bool) {
+ for _, subpacket := range subpackets {
+ if subpacket.hashed == hashed {
+ n := serializeSubpacketLength(to, len(subpacket.contents)+1)
+ to[n] = byte(subpacket.subpacketType)
+ if subpacket.isCritical {
+ to[n] |= 0x80
+ }
+ to = to[1+n:]
+ n = copy(to, subpacket.contents)
+ to = to[n:]
+ }
+ }
+}
+
+// SigExpired returns whether sig is a signature that has expired or is created
+// in the future.
+func (sig *Signature) SigExpired(currentTime time.Time) bool {
+ if sig.CreationTime.Unix() > currentTime.Unix() {
+ return true
+ }
+ if sig.SigLifetimeSecs == nil || *sig.SigLifetimeSecs == 0 {
+ return false
+ }
+ expiry := sig.CreationTime.Add(time.Duration(*sig.SigLifetimeSecs) * time.Second)
+ return currentTime.Unix() > expiry.Unix()
+}
+
+// buildHashSuffix constructs the HashSuffix member of sig in preparation for signing.
+func (sig *Signature) buildHashSuffix(hashedSubpackets []byte) (err error) {
+ var hashId byte
+ var ok bool
+
+ if sig.Version < 5 {
+ hashId, ok = algorithm.HashToHashIdWithSha1(sig.Hash)
+ } else {
+ hashId, ok = algorithm.HashToHashId(sig.Hash)
+ }
+
+ if !ok {
+ sig.HashSuffix = nil
+ return errors.InvalidArgumentError("hash cannot be represented in OpenPGP: " + strconv.Itoa(int(sig.Hash)))
+ }
+
+ hashedFields := bytes.NewBuffer([]byte{
+ uint8(sig.Version),
+ uint8(sig.SigType),
+ uint8(sig.PubKeyAlgo),
+ uint8(hashId),
+ })
+ hashedSubpacketsLength := len(hashedSubpackets)
+ if sig.Version == 6 {
+ // v6 signatures store the length in 4 octets
+ hashedFields.Write([]byte{
+ uint8(hashedSubpacketsLength >> 24),
+ uint8(hashedSubpacketsLength >> 16),
+ uint8(hashedSubpacketsLength >> 8),
+ uint8(hashedSubpacketsLength),
+ })
+ } else {
+ hashedFields.Write([]byte{
+ uint8(hashedSubpacketsLength >> 8),
+ uint8(hashedSubpacketsLength),
+ })
+ }
+ lenPrefix := hashedFields.Len()
+ hashedFields.Write(hashedSubpackets)
+
+ var l uint64 = uint64(lenPrefix + len(hashedSubpackets))
+ if sig.Version == 5 {
+ // v5 case
+ hashedFields.Write([]byte{0x05, 0xff})
+ hashedFields.Write([]byte{
+ uint8(l >> 56), uint8(l >> 48), uint8(l >> 40), uint8(l >> 32),
+ uint8(l >> 24), uint8(l >> 16), uint8(l >> 8), uint8(l),
+ })
+ } else {
+ // v4 and v6 case
+ hashedFields.Write([]byte{byte(sig.Version), 0xff})
+ hashedFields.Write([]byte{
+ uint8(l >> 24), uint8(l >> 16), uint8(l >> 8), uint8(l),
+ })
+ }
+ sig.HashSuffix = make([]byte, hashedFields.Len())
+ copy(sig.HashSuffix, hashedFields.Bytes())
+ return
+}
+
+func (sig *Signature) signPrepareHash(h hash.Hash) (digest []byte, err error) {
+ hashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true)
+ hashedSubpackets := make([]byte, hashedSubpacketsLen)
+ serializeSubpackets(hashedSubpackets, sig.outSubpackets, true)
+ err = sig.buildHashSuffix(hashedSubpackets)
+ if err != nil {
+ return
+ }
+ if sig.Version == 5 && (sig.SigType == 0x00 || sig.SigType == 0x01) {
+ sig.AddMetadataToHashSuffix()
+ }
+
+ h.Write(sig.HashSuffix)
+ digest = h.Sum(nil)
+ copy(sig.HashTag[:], digest)
+ return
+}
+
+// PrepareSign must be called to create a hash object before Sign for v6 signatures.
+// The created hash object initially hashes a randomly generated salt
+// as required by v6 signatures. The generated salt is stored in sig. If the signature is not v6,
+// the method returns an empty hash object.
+// See RFC 9580 Section 5.2.4.
+func (sig *Signature) PrepareSign(config *Config) (hash.Hash, error) {
+ if !sig.Hash.Available() {
+ return nil, errors.UnsupportedError("hash function")
+ }
+ hasher := sig.Hash.New()
+ if sig.Version == 6 {
+ if sig.salt == nil {
+ var err error
+ sig.salt, err = SignatureSaltForHash(sig.Hash, config.Random())
+ if err != nil {
+ return nil, err
+ }
+ }
+ hasher.Write(sig.salt)
+ }
+ return hasher, nil
+}
+
+// SetSalt sets the signature salt for v6 signatures.
+// Assumes salt is generated correctly and checks if length matches.
+// If the signature is not v6, the method ignores the salt.
+// Use PrepareSign whenever possible instead of generating and
+// hashing the salt externally.
+// See RFC 9580 Section 5.2.4.
+func (sig *Signature) SetSalt(salt []byte) error {
+ if sig.Version == 6 {
+ expectedSaltLength, err := SaltLengthForHash(sig.Hash)
+ if err != nil {
+ return err
+ }
+ if salt == nil || len(salt) != expectedSaltLength {
+ return errors.InvalidArgumentError("unexpected salt size for the given hash algorithm")
+ }
+ sig.salt = salt
+ }
+ return nil
+}
+
+// PrepareVerify must be called to create a hash object before verifying v6 signatures.
+// The created hash object initially hashes the internally stored salt.
+// If the signature is not v6, the method returns an empty hash object.
+// See RFC 9580 Section 5.2.4.
+func (sig *Signature) PrepareVerify() (hash.Hash, error) {
+ if !sig.Hash.Available() {
+ return nil, errors.UnsupportedError("hash function")
+ }
+ hasher := sig.Hash.New()
+ if sig.Version == 6 {
+ if sig.salt == nil {
+ return nil, errors.StructuralError("v6 requires a salt for the hash to be signed")
+ }
+ hasher.Write(sig.salt)
+ }
+ return hasher, nil
+}
+
+// Sign signs a message with a private key. The hash, h, must contain
+// the hash of the message to be signed and will be mutated by this function.
+// On success, the signature is stored in sig. Call Serialize to write it out.
+// If config is nil, sensible defaults will be used.
+func (sig *Signature) Sign(h hash.Hash, priv *PrivateKey, config *Config) (err error) {
+ if priv.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy key found")
+ }
+ sig.Version = priv.PublicKey.Version
+ sig.IssuerFingerprint = priv.PublicKey.Fingerprint
+ if sig.Version < 6 && config.RandomizeSignaturesViaNotation() {
+ sig.removeNotationsWithName(SaltNotationName)
+ salt, err := SignatureSaltForHash(sig.Hash, config.Random())
+ if err != nil {
+ return err
+ }
+ notation := Notation{
+ Name: SaltNotationName,
+ Value: salt,
+ IsCritical: false,
+ IsHumanReadable: false,
+ }
+ sig.Notations = append(sig.Notations, ¬ation)
+ }
+ sig.outSubpackets, err = sig.buildSubpackets(priv.PublicKey)
+ if err != nil {
+ return err
+ }
+ digest, err := sig.signPrepareHash(h)
+ if err != nil {
+ return
+ }
+ switch priv.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
+ // supports both *rsa.PrivateKey and crypto.Signer
+ sigdata, err := priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash)
+ if err == nil {
+ sig.RSASignature = encoding.NewMPI(sigdata)
+ }
+ case PubKeyAlgoDSA:
+ dsaPriv := priv.PrivateKey.(*dsa.PrivateKey)
+
+ // Need to truncate hashBytes to match FIPS 186-3 section 4.6.
+ subgroupSize := (dsaPriv.Q.BitLen() + 7) / 8
+ if len(digest) > subgroupSize {
+ digest = digest[:subgroupSize]
+ }
+ r, s, err := dsa.Sign(config.Random(), dsaPriv, digest)
+ if err == nil {
+ sig.DSASigR = new(encoding.MPI).SetBig(r)
+ sig.DSASigS = new(encoding.MPI).SetBig(s)
+ }
+ case PubKeyAlgoECDSA:
+ var r, s *big.Int
+ if sk, ok := priv.PrivateKey.(*ecdsa.PrivateKey); ok {
+ r, s, err = ecdsa.Sign(config.Random(), sk, digest)
+ } else {
+ var b []byte
+ b, err = priv.PrivateKey.(crypto.Signer).Sign(config.Random(), digest, sig.Hash)
+ if err == nil {
+ r, s, err = unwrapECDSASig(b)
+ }
+ }
+
+ if err == nil {
+ sig.ECDSASigR = new(encoding.MPI).SetBig(r)
+ sig.ECDSASigS = new(encoding.MPI).SetBig(s)
+ }
+ case PubKeyAlgoEdDSA:
+ sk := priv.PrivateKey.(*eddsa.PrivateKey)
+ r, s, err := eddsa.Sign(sk, digest)
+ if err == nil {
+ sig.EdDSASigR = encoding.NewMPI(r)
+ sig.EdDSASigS = encoding.NewMPI(s)
+ }
+ case PubKeyAlgoEd25519:
+ sk := priv.PrivateKey.(*ed25519.PrivateKey)
+ signature, err := ed25519.Sign(sk, digest)
+ if err == nil {
+ sig.EdSig = signature
+ }
+ case PubKeyAlgoEd448:
+ sk := priv.PrivateKey.(*ed448.PrivateKey)
+ signature, err := ed448.Sign(sk, digest)
+ if err == nil {
+ sig.EdSig = signature
+ }
+ default:
+ err = errors.UnsupportedError("public key algorithm: " + strconv.Itoa(int(sig.PubKeyAlgo)))
+ }
+
+ return
+}
+
+// unwrapECDSASig parses the two integer components of an ASN.1-encoded ECDSA signature.
+func unwrapECDSASig(b []byte) (r, s *big.Int, err error) {
+ var ecsdaSig struct {
+ R, S *big.Int
+ }
+ _, err = asn1.Unmarshal(b, &ecsdaSig)
+ if err != nil {
+ return
+ }
+ return ecsdaSig.R, ecsdaSig.S, nil
+}
+
+// SignUserId computes a signature from priv, asserting that pub is a valid
+// key for the identity id. On success, the signature is stored in sig. Call
+// Serialize to write it out.
+// If config is nil, sensible defaults will be used.
+func (sig *Signature) SignUserId(id string, pub *PublicKey, priv *PrivateKey, config *Config) error {
+ if priv.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy key found")
+ }
+ prepareHash, err := sig.PrepareSign(config)
+ if err != nil {
+ return err
+ }
+ if err := userIdSignatureHash(id, pub, prepareHash); err != nil {
+ return err
+ }
+ return sig.Sign(prepareHash, priv, config)
+}
+
+// SignDirectKeyBinding computes a signature from priv
+// On success, the signature is stored in sig.
+// Call Serialize to write it out.
+// If config is nil, sensible defaults will be used.
+func (sig *Signature) SignDirectKeyBinding(pub *PublicKey, priv *PrivateKey, config *Config) error {
+ if priv.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy key found")
+ }
+ prepareHash, err := sig.PrepareSign(config)
+ if err != nil {
+ return err
+ }
+ if err := directKeySignatureHash(pub, prepareHash); err != nil {
+ return err
+ }
+ return sig.Sign(prepareHash, priv, config)
+}
+
+// CrossSignKey computes a signature from signingKey on pub hashed using hashKey. On success,
+// the signature is stored in sig. Call Serialize to write it out.
+// If config is nil, sensible defaults will be used.
+func (sig *Signature) CrossSignKey(pub *PublicKey, hashKey *PublicKey, signingKey *PrivateKey,
+ config *Config) error {
+ prepareHash, err := sig.PrepareSign(config)
+ if err != nil {
+ return err
+ }
+ h, err := keySignatureHash(hashKey, pub, prepareHash)
+ if err != nil {
+ return err
+ }
+ return sig.Sign(h, signingKey, config)
+}
+
+// SignKey computes a signature from priv, asserting that pub is a subkey. On
+// success, the signature is stored in sig. Call Serialize to write it out.
+// If config is nil, sensible defaults will be used.
+func (sig *Signature) SignKey(pub *PublicKey, priv *PrivateKey, config *Config) error {
+ if priv.Dummy() {
+ return errors.ErrDummyPrivateKey("dummy key found")
+ }
+ prepareHash, err := sig.PrepareSign(config)
+ if err != nil {
+ return err
+ }
+ h, err := keySignatureHash(&priv.PublicKey, pub, prepareHash)
+ if err != nil {
+ return err
+ }
+ return sig.Sign(h, priv, config)
+}
+
+// RevokeKey computes a revocation signature of pub using priv. On success, the signature is
+// stored in sig. Call Serialize to write it out.
+// If config is nil, sensible defaults will be used.
+func (sig *Signature) RevokeKey(pub *PublicKey, priv *PrivateKey, config *Config) error {
+ prepareHash, err := sig.PrepareSign(config)
+ if err != nil {
+ return err
+ }
+ if err := keyRevocationHash(pub, prepareHash); err != nil {
+ return err
+ }
+ return sig.Sign(prepareHash, priv, config)
+}
+
+// RevokeSubkey computes a subkey revocation signature of pub using priv.
+// On success, the signature is stored in sig. Call Serialize to write it out.
+// If config is nil, sensible defaults will be used.
+func (sig *Signature) RevokeSubkey(pub *PublicKey, priv *PrivateKey, config *Config) error {
+ // Identical to a subkey binding signature
+ return sig.SignKey(pub, priv, config)
+}
+
+// Serialize marshals sig to w. Sign, SignUserId or SignKey must have been
+// called first.
+func (sig *Signature) Serialize(w io.Writer) (err error) {
+ if len(sig.outSubpackets) == 0 {
+ sig.outSubpackets = sig.rawSubpackets
+ }
+ if sig.RSASignature == nil && sig.DSASigR == nil && sig.ECDSASigR == nil && sig.EdDSASigR == nil && sig.EdSig == nil {
+ return errors.InvalidArgumentError("Signature: need to call Sign, SignUserId or SignKey before Serialize")
+ }
+
+ sigLength := 0
+ switch sig.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
+ sigLength = int(sig.RSASignature.EncodedLength())
+ case PubKeyAlgoDSA:
+ sigLength = int(sig.DSASigR.EncodedLength())
+ sigLength += int(sig.DSASigS.EncodedLength())
+ case PubKeyAlgoECDSA:
+ sigLength = int(sig.ECDSASigR.EncodedLength())
+ sigLength += int(sig.ECDSASigS.EncodedLength())
+ case PubKeyAlgoEdDSA:
+ sigLength = int(sig.EdDSASigR.EncodedLength())
+ sigLength += int(sig.EdDSASigS.EncodedLength())
+ case PubKeyAlgoEd25519:
+ sigLength = ed25519.SignatureSize
+ case PubKeyAlgoEd448:
+ sigLength = ed448.SignatureSize
+ default:
+ panic("impossible")
+ }
+
+ hashedSubpacketsLen := subpacketsLength(sig.outSubpackets, true)
+ unhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false)
+ length := 4 + /* length of version|signature type|public-key algorithm|hash algorithm */
+ 2 /* length of hashed subpackets */ + hashedSubpacketsLen +
+ 2 /* length of unhashed subpackets */ + unhashedSubpacketsLen +
+ 2 /* hash tag */ + sigLength
+ if sig.Version == 6 {
+ length += 4 + /* the two length fields are four-octet instead of two */
+ 1 + /* salt length */
+ len(sig.salt) /* length salt */
+ }
+ err = serializeHeader(w, packetTypeSignature, length)
+ if err != nil {
+ return
+ }
+ err = sig.serializeBody(w)
+ if err != nil {
+ return err
+ }
+ return
+}
+
+func (sig *Signature) serializeBody(w io.Writer) (err error) {
+ var fields []byte
+ if sig.Version == 6 {
+ // v6 signatures use 4 octets for length
+ hashedSubpacketsLen :=
+ uint32(uint32(sig.HashSuffix[4])<<24) |
+ uint32(uint32(sig.HashSuffix[5])<<16) |
+ uint32(uint32(sig.HashSuffix[6])<<8) |
+ uint32(sig.HashSuffix[7])
+ fields = sig.HashSuffix[:8+hashedSubpacketsLen]
+ } else {
+ hashedSubpacketsLen := uint16(uint16(sig.HashSuffix[4])<<8) |
+ uint16(sig.HashSuffix[5])
+ fields = sig.HashSuffix[:6+hashedSubpacketsLen]
+
+ }
+ _, err = w.Write(fields)
+ if err != nil {
+ return
+ }
+
+ unhashedSubpacketsLen := subpacketsLength(sig.outSubpackets, false)
+ var unhashedSubpackets []byte
+ if sig.Version == 6 {
+ unhashedSubpackets = make([]byte, 4+unhashedSubpacketsLen)
+ unhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 24)
+ unhashedSubpackets[1] = byte(unhashedSubpacketsLen >> 16)
+ unhashedSubpackets[2] = byte(unhashedSubpacketsLen >> 8)
+ unhashedSubpackets[3] = byte(unhashedSubpacketsLen)
+ serializeSubpackets(unhashedSubpackets[4:], sig.outSubpackets, false)
+ } else {
+ unhashedSubpackets = make([]byte, 2+unhashedSubpacketsLen)
+ unhashedSubpackets[0] = byte(unhashedSubpacketsLen >> 8)
+ unhashedSubpackets[1] = byte(unhashedSubpacketsLen)
+ serializeSubpackets(unhashedSubpackets[2:], sig.outSubpackets, false)
+ }
+
+ _, err = w.Write(unhashedSubpackets)
+ if err != nil {
+ return
+ }
+ _, err = w.Write(sig.HashTag[:])
+ if err != nil {
+ return
+ }
+
+ if sig.Version == 6 {
+ // write salt for v6 signatures
+ _, err = w.Write([]byte{uint8(len(sig.salt))})
+ if err != nil {
+ return
+ }
+ _, err = w.Write(sig.salt)
+ if err != nil {
+ return
+ }
+ }
+
+ switch sig.PubKeyAlgo {
+ case PubKeyAlgoRSA, PubKeyAlgoRSASignOnly:
+ _, err = w.Write(sig.RSASignature.EncodedBytes())
+ case PubKeyAlgoDSA:
+ if _, err = w.Write(sig.DSASigR.EncodedBytes()); err != nil {
+ return
+ }
+ _, err = w.Write(sig.DSASigS.EncodedBytes())
+ case PubKeyAlgoECDSA:
+ if _, err = w.Write(sig.ECDSASigR.EncodedBytes()); err != nil {
+ return
+ }
+ _, err = w.Write(sig.ECDSASigS.EncodedBytes())
+ case PubKeyAlgoEdDSA:
+ if _, err = w.Write(sig.EdDSASigR.EncodedBytes()); err != nil {
+ return
+ }
+ _, err = w.Write(sig.EdDSASigS.EncodedBytes())
+ case PubKeyAlgoEd25519:
+ err = ed25519.WriteSignature(w, sig.EdSig)
+ case PubKeyAlgoEd448:
+ err = ed448.WriteSignature(w, sig.EdSig)
+ default:
+ panic("impossible")
+ }
+ return
+}
+
+// outputSubpacket represents a subpacket to be marshaled.
+type outputSubpacket struct {
+ hashed bool // true if this subpacket is in the hashed area.
+ subpacketType signatureSubpacketType
+ isCritical bool
+ contents []byte
+}
+
+func (sig *Signature) buildSubpackets(issuer PublicKey) (subpackets []outputSubpacket, err error) {
+ creationTime := make([]byte, 4)
+ binary.BigEndian.PutUint32(creationTime, uint32(sig.CreationTime.Unix()))
+ // Signature Creation Time
+ subpackets = append(subpackets, outputSubpacket{true, creationTimeSubpacket, true, creationTime})
+ // Signature Expiration Time
+ if sig.SigLifetimeSecs != nil && *sig.SigLifetimeSecs != 0 {
+ sigLifetime := make([]byte, 4)
+ binary.BigEndian.PutUint32(sigLifetime, *sig.SigLifetimeSecs)
+ subpackets = append(subpackets, outputSubpacket{true, signatureExpirationSubpacket, true, sigLifetime})
+ }
+ // Trust Signature
+ if sig.TrustLevel != 0 {
+ subpackets = append(subpackets, outputSubpacket{true, trustSubpacket, true, []byte{byte(sig.TrustLevel), byte(sig.TrustAmount)}})
+ }
+ // Regular Expression
+ if sig.TrustRegularExpression != nil {
+ // RFC specifies the string should be null-terminated; add a null byte to the end
+ subpackets = append(subpackets, outputSubpacket{true, regularExpressionSubpacket, true, []byte(*sig.TrustRegularExpression + "\000")})
+ }
+ // Key Expiration Time
+ if sig.KeyLifetimeSecs != nil && *sig.KeyLifetimeSecs != 0 {
+ keyLifetime := make([]byte, 4)
+ binary.BigEndian.PutUint32(keyLifetime, *sig.KeyLifetimeSecs)
+ subpackets = append(subpackets, outputSubpacket{true, keyExpirationSubpacket, true, keyLifetime})
+ }
+ // Preferred Symmetric Ciphers for v1 SEIPD
+ if len(sig.PreferredSymmetric) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, prefSymmetricAlgosSubpacket, false, sig.PreferredSymmetric})
+ }
+ // Issuer Key ID
+ if sig.IssuerKeyId != nil && sig.Version == 4 {
+ keyId := make([]byte, 8)
+ binary.BigEndian.PutUint64(keyId, *sig.IssuerKeyId)
+ subpackets = append(subpackets, outputSubpacket{true, issuerSubpacket, true, keyId})
+ }
+ // Notation Data
+ for _, notation := range sig.Notations {
+ subpackets = append(
+ subpackets,
+ outputSubpacket{
+ true,
+ notationDataSubpacket,
+ notation.IsCritical,
+ notation.getData(),
+ })
+ }
+ // Preferred Hash Algorithms
+ if len(sig.PreferredHash) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, prefHashAlgosSubpacket, false, sig.PreferredHash})
+ }
+ // Preferred Compression Algorithms
+ if len(sig.PreferredCompression) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, prefCompressionSubpacket, false, sig.PreferredCompression})
+ }
+ // Keyserver Preferences
+ // Keyserver preferences may only appear in self-signatures or certification signatures.
+ if sig.KeyserverPrefsValid {
+ var prefs byte
+ if sig.KeyserverPrefNoModify {
+ prefs |= KeyserverPrefNoModify
+ }
+ subpackets = append(subpackets, outputSubpacket{true, keyserverPrefsSubpacket, false, []byte{prefs}})
+ }
+ // Preferred Keyserver
+ if len(sig.PreferredKeyserver) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, prefKeyserverSubpacket, false, []uint8(sig.PreferredKeyserver)})
+ }
+ // Primary User ID
+ if sig.IsPrimaryId != nil && *sig.IsPrimaryId {
+ subpackets = append(subpackets, outputSubpacket{true, primaryUserIdSubpacket, false, []byte{1}})
+ }
+ // Policy URI
+ if len(sig.PolicyURI) > 0 {
+ subpackets = append(subpackets, outputSubpacket{true, policyUriSubpacket, false, []uint8(sig.PolicyURI)})
+ }
+ // Key Flags
+ // Key flags may only appear in self-signatures or certification signatures.
+ if sig.FlagsValid {
+ var flags byte
+ if sig.FlagCertify {
+ flags |= KeyFlagCertify
+ }
+ if sig.FlagSign {
+ flags |= KeyFlagSign
+ }
+ if sig.FlagEncryptCommunications {
+ flags |= KeyFlagEncryptCommunications
+ }
+ if sig.FlagEncryptStorage {
+ flags |= KeyFlagEncryptStorage
+ }
+ if sig.FlagSplitKey {
+ flags |= KeyFlagSplitKey
+ }
+ if sig.FlagAuthenticate {
+ flags |= KeyFlagAuthenticate
+ }
+ if sig.FlagGroupKey {
+ flags |= KeyFlagGroupKey
+ }
+ subpackets = append(subpackets, outputSubpacket{true, keyFlagsSubpacket, true, []byte{flags}})
+ }
+ // Signer's User ID
+ if sig.SignerUserId != nil {
+ subpackets = append(subpackets, outputSubpacket{true, signerUserIdSubpacket, false, []byte(*sig.SignerUserId)})
+ }
+ // Reason for Revocation
+ // Revocation reason appears only in revocation signatures and is serialized as per section 5.2.3.31.
+ if sig.RevocationReason != nil {
+ subpackets = append(subpackets, outputSubpacket{true, reasonForRevocationSubpacket, true,
+ append([]uint8{uint8(*sig.RevocationReason)}, []uint8(sig.RevocationReasonText)...)})
+ }
+ // Features
+ var features = byte(0x00)
+ if sig.SEIPDv1 {
+ features |= 0x01
+ }
+ if sig.SEIPDv2 {
+ features |= 0x08
+ }
+ if features != 0x00 {
+ subpackets = append(subpackets, outputSubpacket{true, featuresSubpacket, false, []byte{features}})
+ }
+ // Embedded Signature
+ // EmbeddedSignature appears only in subkeys capable of signing and is serialized as per section 5.2.3.34.
+ if sig.EmbeddedSignature != nil {
+ var buf bytes.Buffer
+ err = sig.EmbeddedSignature.serializeBody(&buf)
+ if err != nil {
+ return
+ }
+ subpackets = append(subpackets, outputSubpacket{true, embeddedSignatureSubpacket, true, buf.Bytes()})
+ }
+ // Issuer Fingerprint
+ if sig.IssuerFingerprint != nil {
+ contents := append([]uint8{uint8(issuer.Version)}, sig.IssuerFingerprint...)
+ subpackets = append(subpackets, outputSubpacket{true, issuerFingerprintSubpacket, sig.Version >= 5, contents})
+ }
+ // Intended Recipient Fingerprint
+ for _, recipient := range sig.IntendedRecipients {
+ subpackets = append(
+ subpackets,
+ outputSubpacket{
+ true,
+ intendedRecipientSubpacket,
+ false,
+ recipient.Serialize(),
+ })
+ }
+ // Preferred AEAD Ciphersuites
+ if len(sig.PreferredCipherSuites) > 0 {
+ serialized := make([]byte, len(sig.PreferredCipherSuites)*2)
+ for i, cipherSuite := range sig.PreferredCipherSuites {
+ serialized[2*i] = cipherSuite[0]
+ serialized[2*i+1] = cipherSuite[1]
+ }
+ subpackets = append(subpackets, outputSubpacket{true, prefCipherSuitesSubpacket, false, serialized})
+ }
+ return
+}
+
+// AddMetadataToHashSuffix modifies the current hash suffix to include metadata
+// (format, filename, and time). Version 5 keys protect this data including it
+// in the hash computation. See section 5.2.4.
+func (sig *Signature) AddMetadataToHashSuffix() {
+ if sig == nil || sig.Version != 5 {
+ return
+ }
+ if sig.SigType != 0x00 && sig.SigType != 0x01 {
+ return
+ }
+ lit := sig.Metadata
+ if lit == nil {
+ // This will translate into six 0x00 bytes.
+ lit = &LiteralData{}
+ }
+
+ // Extract the current byte count
+ n := sig.HashSuffix[len(sig.HashSuffix)-8:]
+ l := uint64(
+ uint64(n[0])<<56 | uint64(n[1])<<48 | uint64(n[2])<<40 | uint64(n[3])<<32 |
+ uint64(n[4])<<24 | uint64(n[5])<<16 | uint64(n[6])<<8 | uint64(n[7]))
+
+ suffix := bytes.NewBuffer(nil)
+ suffix.Write(sig.HashSuffix[:l])
+
+ // Add the metadata
+ var buf [4]byte
+ buf[0] = lit.Format
+ fileName := lit.FileName
+ if len(lit.FileName) > 255 {
+ fileName = fileName[:255]
+ }
+ buf[1] = byte(len(fileName))
+ suffix.Write(buf[:2])
+ suffix.Write([]byte(lit.FileName))
+ binary.BigEndian.PutUint32(buf[:], lit.Time)
+ suffix.Write(buf[:])
+
+ suffix.Write([]byte{0x05, 0xff})
+ suffix.Write([]byte{
+ uint8(l >> 56), uint8(l >> 48), uint8(l >> 40), uint8(l >> 32),
+ uint8(l >> 24), uint8(l >> 16), uint8(l >> 8), uint8(l),
+ })
+ sig.HashSuffix = suffix.Bytes()
+}
+
+// SaltLengthForHash selects the required salt length for the given hash algorithm,
+// as per Table 23 (Hash algorithm registry) of the crypto refresh.
+// See RFC 9580 Section 9.5.
+func SaltLengthForHash(hash crypto.Hash) (int, error) {
+ switch hash {
+ case crypto.SHA256, crypto.SHA224, crypto.SHA3_256:
+ return 16, nil
+ case crypto.SHA384:
+ return 24, nil
+ case crypto.SHA512, crypto.SHA3_512:
+ return 32, nil
+ default:
+ return 0, errors.UnsupportedError("hash function not supported for V6 signatures")
+ }
+}
+
+// SignatureSaltForHash generates a random signature salt
+// with the length for the given hash algorithm.
+// See RFC 9580 Section 9.5.
+func SignatureSaltForHash(hash crypto.Hash, randReader io.Reader) ([]byte, error) {
+ saltLength, err := SaltLengthForHash(hash)
+ if err != nil {
+ return nil, err
+ }
+ salt := make([]byte, saltLength)
+ _, err = io.ReadFull(randReader, salt)
+ if err != nil {
+ return nil, err
+ }
+ return salt, nil
+}
+
+// removeNotationsWithName removes all notations in this signature with the given name.
+func (sig *Signature) removeNotationsWithName(name string) {
+ if sig == nil || sig.Notations == nil {
+ return
+ }
+ updatedNotations := make([]*Notation, 0, len(sig.Notations))
+ for _, notation := range sig.Notations {
+ if notation.Name != name {
+ updatedNotations = append(updatedNotations, notation)
+ }
+ }
+ sig.Notations = updatedNotations
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go
new file mode 100644
index 000000000..2812a1db8
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetric_key_encrypted.go
@@ -0,0 +1,331 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "bytes"
+ "crypto/cipher"
+ "crypto/sha256"
+ "io"
+ "strconv"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/s2k"
+ "golang.org/x/crypto/hkdf"
+)
+
+// This is the largest session key that we'll support. Since at most 256-bit cipher
+// is supported in OpenPGP, this is large enough to contain also the auth tag.
+const maxSessionKeySizeInBytes = 64
+
+// SymmetricKeyEncrypted represents a passphrase protected session key. See RFC
+// 4880, section 5.3.
+type SymmetricKeyEncrypted struct {
+ Version int
+ CipherFunc CipherFunction
+ Mode AEADMode
+ s2k func(out, in []byte)
+ iv []byte
+ encryptedKey []byte // Contains also the authentication tag for AEAD
+}
+
+// parse parses an SymmetricKeyEncrypted packet as specified in
+// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#name-symmetric-key-encrypted-ses
+func (ske *SymmetricKeyEncrypted) parse(r io.Reader) error {
+ var buf [1]byte
+
+ // Version
+ if _, err := readFull(r, buf[:]); err != nil {
+ return err
+ }
+ ske.Version = int(buf[0])
+ if ske.Version != 4 && ske.Version != 5 && ske.Version != 6 {
+ return errors.UnsupportedError("unknown SymmetricKeyEncrypted version")
+ }
+
+ if V5Disabled && ske.Version == 5 {
+ return errors.UnsupportedError("support for parsing v5 entities is disabled; build with `-tags v5` if needed")
+ }
+
+ if ske.Version > 5 {
+ // Scalar octet count
+ if _, err := readFull(r, buf[:]); err != nil {
+ return err
+ }
+ }
+
+ // Cipher function
+ if _, err := readFull(r, buf[:]); err != nil {
+ return err
+ }
+ ske.CipherFunc = CipherFunction(buf[0])
+ if !ske.CipherFunc.IsSupported() {
+ return errors.UnsupportedError("unknown cipher: " + strconv.Itoa(int(buf[0])))
+ }
+
+ if ske.Version >= 5 {
+ // AEAD mode
+ if _, err := readFull(r, buf[:]); err != nil {
+ return errors.StructuralError("cannot read AEAD octet from packet")
+ }
+ ske.Mode = AEADMode(buf[0])
+ }
+
+ if ske.Version > 5 {
+ // Scalar octet count
+ if _, err := readFull(r, buf[:]); err != nil {
+ return err
+ }
+ }
+
+ var err error
+ if ske.s2k, err = s2k.Parse(r); err != nil {
+ if _, ok := err.(errors.ErrDummyPrivateKey); ok {
+ return errors.UnsupportedError("missing key GNU extension in session key")
+ }
+ return err
+ }
+
+ if ske.Version >= 5 {
+ // AEAD IV
+ iv := make([]byte, ske.Mode.IvLength())
+ _, err := readFull(r, iv)
+ if err != nil {
+ return errors.StructuralError("cannot read AEAD IV")
+ }
+
+ ske.iv = iv
+ }
+
+ encryptedKey := make([]byte, maxSessionKeySizeInBytes)
+ // The session key may follow. We just have to try and read to find
+ // out. If it exists then we limit it to maxSessionKeySizeInBytes.
+ n, err := readFull(r, encryptedKey)
+ if err != nil && err != io.ErrUnexpectedEOF {
+ return err
+ }
+
+ if n != 0 {
+ if n == maxSessionKeySizeInBytes {
+ return errors.UnsupportedError("oversized encrypted session key")
+ }
+ ske.encryptedKey = encryptedKey[:n]
+ }
+ return nil
+}
+
+// Decrypt attempts to decrypt an encrypted session key and returns the key and
+// the cipher to use when decrypting a subsequent Symmetrically Encrypted Data
+// packet.
+func (ske *SymmetricKeyEncrypted) Decrypt(passphrase []byte) ([]byte, CipherFunction, error) {
+ key := make([]byte, ske.CipherFunc.KeySize())
+ ske.s2k(key, passphrase)
+ if len(ske.encryptedKey) == 0 {
+ return key, ske.CipherFunc, nil
+ }
+ switch ske.Version {
+ case 4:
+ plaintextKey, cipherFunc, err := ske.decryptV4(key)
+ return plaintextKey, cipherFunc, err
+ case 5, 6:
+ plaintextKey, err := ske.aeadDecrypt(ske.Version, key)
+ return plaintextKey, CipherFunction(0), err
+ }
+ err := errors.UnsupportedError("unknown SymmetricKeyEncrypted version")
+ return nil, CipherFunction(0), err
+}
+
+func (ske *SymmetricKeyEncrypted) decryptV4(key []byte) ([]byte, CipherFunction, error) {
+ // the IV is all zeros
+ iv := make([]byte, ske.CipherFunc.blockSize())
+ c := cipher.NewCFBDecrypter(ske.CipherFunc.new(key), iv)
+ plaintextKey := make([]byte, len(ske.encryptedKey))
+ c.XORKeyStream(plaintextKey, ske.encryptedKey)
+ cipherFunc := CipherFunction(plaintextKey[0])
+ if cipherFunc.blockSize() == 0 {
+ return nil, ske.CipherFunc, errors.UnsupportedError(
+ "unknown cipher: " + strconv.Itoa(int(cipherFunc)))
+ }
+ plaintextKey = plaintextKey[1:]
+ if len(plaintextKey) != cipherFunc.KeySize() {
+ return nil, cipherFunc, errors.StructuralError(
+ "length of decrypted key not equal to cipher keysize")
+ }
+ return plaintextKey, cipherFunc, nil
+}
+
+func (ske *SymmetricKeyEncrypted) aeadDecrypt(version int, key []byte) ([]byte, error) {
+ adata := []byte{0xc3, byte(version), byte(ske.CipherFunc), byte(ske.Mode)}
+ aead := getEncryptedKeyAeadInstance(ske.CipherFunc, ske.Mode, key, adata, version)
+
+ plaintextKey, err := aead.Open(nil, ske.iv, ske.encryptedKey, adata)
+ if err != nil {
+ return nil, err
+ }
+ return plaintextKey, nil
+}
+
+// SerializeSymmetricKeyEncrypted serializes a symmetric key packet to w.
+// The packet contains a random session key, encrypted by a key derived from
+// the given passphrase. The session key is returned and must be passed to
+// SerializeSymmetricallyEncrypted.
+// If config is nil, sensible defaults will be used.
+func SerializeSymmetricKeyEncrypted(w io.Writer, passphrase []byte, config *Config) (key []byte, err error) {
+ cipherFunc := config.Cipher()
+
+ sessionKey := make([]byte, cipherFunc.KeySize())
+ _, err = io.ReadFull(config.Random(), sessionKey)
+ if err != nil {
+ return
+ }
+
+ err = SerializeSymmetricKeyEncryptedReuseKey(w, sessionKey, passphrase, config)
+ if err != nil {
+ return
+ }
+
+ key = sessionKey
+ return
+}
+
+// SerializeSymmetricKeyEncryptedReuseKey serializes a symmetric key packet to w.
+// The packet contains the given session key, encrypted by a key derived from
+// the given passphrase. The returned session key must be passed to
+// SerializeSymmetricallyEncrypted.
+// If config is nil, sensible defaults will be used.
+// Deprecated: Use SerializeSymmetricKeyEncryptedAEADReuseKey instead.
+func SerializeSymmetricKeyEncryptedReuseKey(w io.Writer, sessionKey []byte, passphrase []byte, config *Config) (err error) {
+ return SerializeSymmetricKeyEncryptedAEADReuseKey(w, sessionKey, passphrase, config.AEAD() != nil, config)
+}
+
+// SerializeSymmetricKeyEncryptedAEADReuseKey serializes a symmetric key packet to w.
+// The packet contains the given session key, encrypted by a key derived from
+// the given passphrase. The returned session key must be passed to
+// SerializeSymmetricallyEncrypted.
+// If aeadSupported is set, SKESK v6 is used, otherwise v4.
+// Note: aeadSupported MUST match the value passed to SerializeSymmetricallyEncrypted.
+// If config is nil, sensible defaults will be used.
+func SerializeSymmetricKeyEncryptedAEADReuseKey(w io.Writer, sessionKey []byte, passphrase []byte, aeadSupported bool, config *Config) (err error) {
+ var version int
+ if aeadSupported {
+ version = 6
+ } else {
+ version = 4
+ }
+ cipherFunc := config.Cipher()
+ // cipherFunc must be AES
+ if !cipherFunc.IsSupported() || cipherFunc < CipherAES128 || cipherFunc > CipherAES256 {
+ return errors.UnsupportedError("unsupported cipher: " + strconv.Itoa(int(cipherFunc)))
+ }
+
+ keySize := cipherFunc.KeySize()
+ s2kBuf := new(bytes.Buffer)
+ keyEncryptingKey := make([]byte, keySize)
+ // s2k.Serialize salts and stretches the passphrase, and writes the
+ // resulting key to keyEncryptingKey and the s2k descriptor to s2kBuf.
+ err = s2k.Serialize(s2kBuf, keyEncryptingKey, config.Random(), passphrase, config.S2K())
+ if err != nil {
+ return
+ }
+ s2kBytes := s2kBuf.Bytes()
+
+ var packetLength int
+ switch version {
+ case 4:
+ packetLength = 2 /* header */ + len(s2kBytes) + 1 /* cipher type */ + keySize
+ case 5, 6:
+ ivLen := config.AEAD().Mode().IvLength()
+ tagLen := config.AEAD().Mode().TagLength()
+ packetLength = 3 + len(s2kBytes) + ivLen + keySize + tagLen
+ }
+ if version > 5 {
+ packetLength += 2 // additional octet count fields
+ }
+
+ err = serializeHeader(w, packetTypeSymmetricKeyEncrypted, packetLength)
+ if err != nil {
+ return
+ }
+
+ // Symmetric Key Encrypted Version
+ buf := []byte{byte(version)}
+
+ if version > 5 {
+ // Scalar octet count
+ buf = append(buf, byte(3+len(s2kBytes)+config.AEAD().Mode().IvLength()))
+ }
+
+ // Cipher function
+ buf = append(buf, byte(cipherFunc))
+
+ if version >= 5 {
+ // AEAD mode
+ buf = append(buf, byte(config.AEAD().Mode()))
+ }
+ if version > 5 {
+ // Scalar octet count
+ buf = append(buf, byte(len(s2kBytes)))
+ }
+ _, err = w.Write(buf)
+ if err != nil {
+ return
+ }
+ _, err = w.Write(s2kBytes)
+ if err != nil {
+ return
+ }
+
+ switch version {
+ case 4:
+ iv := make([]byte, cipherFunc.blockSize())
+ c := cipher.NewCFBEncrypter(cipherFunc.new(keyEncryptingKey), iv)
+ encryptedCipherAndKey := make([]byte, keySize+1)
+ c.XORKeyStream(encryptedCipherAndKey, buf[1:])
+ c.XORKeyStream(encryptedCipherAndKey[1:], sessionKey)
+ _, err = w.Write(encryptedCipherAndKey)
+ if err != nil {
+ return
+ }
+ case 5, 6:
+ mode := config.AEAD().Mode()
+ adata := []byte{0xc3, byte(version), byte(cipherFunc), byte(mode)}
+ aead := getEncryptedKeyAeadInstance(cipherFunc, mode, keyEncryptingKey, adata, version)
+
+ // Sample iv using random reader
+ iv := make([]byte, config.AEAD().Mode().IvLength())
+ _, err = io.ReadFull(config.Random(), iv)
+ if err != nil {
+ return
+ }
+ // Seal and write (encryptedData includes auth. tag)
+
+ encryptedData := aead.Seal(nil, iv, sessionKey, adata)
+ _, err = w.Write(iv)
+ if err != nil {
+ return
+ }
+ _, err = w.Write(encryptedData)
+ if err != nil {
+ return
+ }
+ }
+
+ return
+}
+
+func getEncryptedKeyAeadInstance(c CipherFunction, mode AEADMode, inputKey, associatedData []byte, version int) (aead cipher.AEAD) {
+ var blockCipher cipher.Block
+ if version > 5 {
+ hkdfReader := hkdf.New(sha256.New, inputKey, []byte{}, associatedData)
+
+ encryptionKey := make([]byte, c.KeySize())
+ _, _ = readFull(hkdfReader, encryptionKey)
+
+ blockCipher = c.new(encryptionKey)
+ } else {
+ blockCipher = c.new(inputKey)
+ }
+ return mode.new(blockCipher)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go
new file mode 100644
index 000000000..0e898742c
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted.go
@@ -0,0 +1,94 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+const aeadSaltSize = 32
+
+// SymmetricallyEncrypted represents a symmetrically encrypted byte string. The
+// encrypted Contents will consist of more OpenPGP packets. See RFC 4880,
+// sections 5.7 and 5.13.
+type SymmetricallyEncrypted struct {
+ Version int
+ Contents io.Reader // contains tag for version 2
+ IntegrityProtected bool // If true it is type 18 (with MDC or AEAD). False is packet type 9
+
+ // Specific to version 1
+ prefix []byte
+
+ // Specific to version 2
+ Cipher CipherFunction
+ Mode AEADMode
+ ChunkSizeByte byte
+ Salt [aeadSaltSize]byte
+}
+
+const (
+ symmetricallyEncryptedVersionMdc = 1
+ symmetricallyEncryptedVersionAead = 2
+)
+
+func (se *SymmetricallyEncrypted) parse(r io.Reader) error {
+ if se.IntegrityProtected {
+ // See RFC 4880, section 5.13.
+ var buf [1]byte
+ _, err := readFull(r, buf[:])
+ if err != nil {
+ return err
+ }
+
+ switch buf[0] {
+ case symmetricallyEncryptedVersionMdc:
+ se.Version = symmetricallyEncryptedVersionMdc
+ case symmetricallyEncryptedVersionAead:
+ se.Version = symmetricallyEncryptedVersionAead
+ if err := se.parseAead(r); err != nil {
+ return err
+ }
+ default:
+ return errors.UnsupportedError("unknown SymmetricallyEncrypted version")
+ }
+ }
+ se.Contents = r
+ return nil
+}
+
+// Decrypt returns a ReadCloser, from which the decrypted Contents of the
+// packet can be read. An incorrect key will only be detected after trying
+// to decrypt the entire data.
+func (se *SymmetricallyEncrypted) Decrypt(c CipherFunction, key []byte) (io.ReadCloser, error) {
+ if se.Version == symmetricallyEncryptedVersionAead {
+ return se.decryptAead(key)
+ }
+
+ return se.decryptMdc(c, key)
+}
+
+// SerializeSymmetricallyEncrypted serializes a symmetrically encrypted packet
+// to w and returns a WriteCloser to which the to-be-encrypted packets can be
+// written.
+// If aeadSupported is set to true, SEIPDv2 is used with the indicated CipherSuite.
+// Otherwise, SEIPDv1 is used with the indicated CipherFunction.
+// Note: aeadSupported MUST match the value passed to SerializeEncryptedKeyAEAD
+// and/or SerializeSymmetricKeyEncryptedAEADReuseKey.
+// If config is nil, sensible defaults will be used.
+func SerializeSymmetricallyEncrypted(w io.Writer, c CipherFunction, aeadSupported bool, cipherSuite CipherSuite, key []byte, config *Config) (Contents io.WriteCloser, err error) {
+ writeCloser := noOpCloser{w}
+ ciphertext, err := serializeStreamHeader(writeCloser, packetTypeSymmetricallyEncryptedIntegrityProtected)
+ if err != nil {
+ return
+ }
+
+ if aeadSupported {
+ return serializeSymmetricallyEncryptedAead(ciphertext, cipherSuite, config.AEADConfig.ChunkSizeByte(), config.Random(), key)
+ }
+
+ return serializeSymmetricallyEncryptedMdc(ciphertext, c, key, config)
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go
new file mode 100644
index 000000000..3957b2d53
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_aead.go
@@ -0,0 +1,161 @@
+// Copyright 2023 Proton AG. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "crypto/cipher"
+ "crypto/sha256"
+ "fmt"
+ "io"
+ "strconv"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "golang.org/x/crypto/hkdf"
+)
+
+// parseAead parses a V2 SEIPD packet (AEAD) as specified in
+// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
+func (se *SymmetricallyEncrypted) parseAead(r io.Reader) error {
+ headerData := make([]byte, 3)
+ if n, err := io.ReadFull(r, headerData); n < 3 {
+ return errors.StructuralError("could not read aead header: " + err.Error())
+ }
+
+ // Cipher
+ se.Cipher = CipherFunction(headerData[0])
+ // cipherFunc must have block size 16 to use AEAD
+ if se.Cipher.blockSize() != 16 {
+ return errors.UnsupportedError("invalid aead cipher: " + strconv.Itoa(int(se.Cipher)))
+ }
+
+ // Mode
+ se.Mode = AEADMode(headerData[1])
+ if se.Mode.TagLength() == 0 {
+ return errors.UnsupportedError("unknown aead mode: " + strconv.Itoa(int(se.Mode)))
+ }
+
+ // Chunk size
+ se.ChunkSizeByte = headerData[2]
+ if se.ChunkSizeByte > 16 {
+ return errors.UnsupportedError("invalid aead chunk size byte: " + strconv.Itoa(int(se.ChunkSizeByte)))
+ }
+
+ // Salt
+ if n, err := io.ReadFull(r, se.Salt[:]); n < aeadSaltSize {
+ return errors.StructuralError("could not read aead salt: " + err.Error())
+ }
+
+ return nil
+}
+
+// associatedData for chunks: tag, version, cipher, mode, chunk size byte
+func (se *SymmetricallyEncrypted) associatedData() []byte {
+ return []byte{
+ 0xD2,
+ symmetricallyEncryptedVersionAead,
+ byte(se.Cipher),
+ byte(se.Mode),
+ se.ChunkSizeByte,
+ }
+}
+
+// decryptAead decrypts a V2 SEIPD packet (AEAD) as specified in
+// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
+func (se *SymmetricallyEncrypted) decryptAead(inputKey []byte) (io.ReadCloser, error) {
+ if se.Cipher.KeySize() != len(inputKey) {
+ return nil, errors.StructuralError(fmt.Sprintf("invalid session key length for cipher: got %d bytes, but expected %d bytes", len(inputKey), se.Cipher.KeySize()))
+ }
+
+ aead, nonce := getSymmetricallyEncryptedAeadInstance(se.Cipher, se.Mode, inputKey, se.Salt[:], se.associatedData())
+ // Carry the first tagLen bytes
+ tagLen := se.Mode.TagLength()
+ peekedBytes := make([]byte, tagLen)
+ n, err := io.ReadFull(se.Contents, peekedBytes)
+ if n < tagLen || (err != nil && err != io.EOF) {
+ return nil, errors.StructuralError("not enough data to decrypt:" + err.Error())
+ }
+
+ return &aeadDecrypter{
+ aeadCrypter: aeadCrypter{
+ aead: aead,
+ chunkSize: decodeAEADChunkSize(se.ChunkSizeByte),
+ initialNonce: nonce,
+ associatedData: se.associatedData(),
+ chunkIndex: make([]byte, 8),
+ packetTag: packetTypeSymmetricallyEncryptedIntegrityProtected,
+ },
+ reader: se.Contents,
+ peekedBytes: peekedBytes,
+ }, nil
+}
+
+// serializeSymmetricallyEncryptedAead encrypts to a writer a V2 SEIPD packet (AEAD) as specified in
+// https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-5.13.2
+func serializeSymmetricallyEncryptedAead(ciphertext io.WriteCloser, cipherSuite CipherSuite, chunkSizeByte byte, rand io.Reader, inputKey []byte) (Contents io.WriteCloser, err error) {
+ // cipherFunc must have block size 16 to use AEAD
+ if cipherSuite.Cipher.blockSize() != 16 {
+ return nil, errors.InvalidArgumentError("invalid aead cipher function")
+ }
+
+ if cipherSuite.Cipher.KeySize() != len(inputKey) {
+ return nil, errors.InvalidArgumentError("error in aead serialization: bad key length")
+ }
+
+ // Data for en/decryption: tag, version, cipher, aead mode, chunk size
+ prefix := []byte{
+ 0xD2,
+ symmetricallyEncryptedVersionAead,
+ byte(cipherSuite.Cipher),
+ byte(cipherSuite.Mode),
+ chunkSizeByte,
+ }
+
+ // Write header (that correspond to prefix except first byte)
+ n, err := ciphertext.Write(prefix[1:])
+ if err != nil || n < 4 {
+ return nil, err
+ }
+
+ // Random salt
+ salt := make([]byte, aeadSaltSize)
+ if _, err := io.ReadFull(rand, salt); err != nil {
+ return nil, err
+ }
+
+ if _, err := ciphertext.Write(salt); err != nil {
+ return nil, err
+ }
+
+ aead, nonce := getSymmetricallyEncryptedAeadInstance(cipherSuite.Cipher, cipherSuite.Mode, inputKey, salt, prefix)
+
+ return &aeadEncrypter{
+ aeadCrypter: aeadCrypter{
+ aead: aead,
+ chunkSize: decodeAEADChunkSize(chunkSizeByte),
+ associatedData: prefix,
+ chunkIndex: make([]byte, 8),
+ initialNonce: nonce,
+ packetTag: packetTypeSymmetricallyEncryptedIntegrityProtected,
+ },
+ writer: ciphertext,
+ }, nil
+}
+
+func getSymmetricallyEncryptedAeadInstance(c CipherFunction, mode AEADMode, inputKey, salt, associatedData []byte) (aead cipher.AEAD, nonce []byte) {
+ hkdfReader := hkdf.New(sha256.New, inputKey, salt, associatedData)
+
+ encryptionKey := make([]byte, c.KeySize())
+ _, _ = readFull(hkdfReader, encryptionKey)
+
+ // Last 64 bits of nonce are the counter
+ nonce = make([]byte, mode.IvLength()-8)
+
+ _, _ = readFull(hkdfReader, nonce)
+
+ blockCipher := c.new(encryptionKey)
+ aead = mode.new(blockCipher)
+
+ return
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go
new file mode 100644
index 000000000..8b1862368
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/symmetrically_encrypted_mdc.go
@@ -0,0 +1,256 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package packet
+
+import (
+ "crypto/cipher"
+ "crypto/sha1"
+ "crypto/subtle"
+ "hash"
+ "io"
+ "strconv"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+)
+
+// seMdcReader wraps an io.Reader with a no-op Close method.
+type seMdcReader struct {
+ in io.Reader
+}
+
+func (ser seMdcReader) Read(buf []byte) (int, error) {
+ return ser.in.Read(buf)
+}
+
+func (ser seMdcReader) Close() error {
+ return nil
+}
+
+func (se *SymmetricallyEncrypted) decryptMdc(c CipherFunction, key []byte) (io.ReadCloser, error) {
+ if !c.IsSupported() {
+ return nil, errors.UnsupportedError("unsupported cipher: " + strconv.Itoa(int(c)))
+ }
+
+ if len(key) != c.KeySize() {
+ return nil, errors.InvalidArgumentError("SymmetricallyEncrypted: incorrect key length")
+ }
+
+ if se.prefix == nil {
+ se.prefix = make([]byte, c.blockSize()+2)
+ _, err := readFull(se.Contents, se.prefix)
+ if err != nil {
+ return nil, err
+ }
+ } else if len(se.prefix) != c.blockSize()+2 {
+ return nil, errors.InvalidArgumentError("can't try ciphers with different block lengths")
+ }
+
+ ocfbResync := OCFBResync
+ if se.IntegrityProtected {
+ // MDC packets use a different form of OCFB mode.
+ ocfbResync = OCFBNoResync
+ }
+
+ s := NewOCFBDecrypter(c.new(key), se.prefix, ocfbResync)
+
+ plaintext := cipher.StreamReader{S: s, R: se.Contents}
+
+ if se.IntegrityProtected {
+ // IntegrityProtected packets have an embedded hash that we need to check.
+ h := sha1.New()
+ h.Write(se.prefix)
+ return &seMDCReader{in: plaintext, h: h}, nil
+ }
+
+ // Otherwise, we just need to wrap plaintext so that it's a valid ReadCloser.
+ return seMdcReader{plaintext}, nil
+}
+
+const mdcTrailerSize = 1 /* tag byte */ + 1 /* length byte */ + sha1.Size
+
+// An seMDCReader wraps an io.Reader, maintains a running hash and keeps hold
+// of the most recent 22 bytes (mdcTrailerSize). Upon EOF, those bytes form an
+// MDC packet containing a hash of the previous Contents which is checked
+// against the running hash. See RFC 4880, section 5.13.
+type seMDCReader struct {
+ in io.Reader
+ h hash.Hash
+ trailer [mdcTrailerSize]byte
+ scratch [mdcTrailerSize]byte
+ trailerUsed int
+ error bool
+ eof bool
+}
+
+func (ser *seMDCReader) Read(buf []byte) (n int, err error) {
+ if ser.error {
+ err = io.ErrUnexpectedEOF
+ return
+ }
+ if ser.eof {
+ err = io.EOF
+ return
+ }
+
+ // If we haven't yet filled the trailer buffer then we must do that
+ // first.
+ for ser.trailerUsed < mdcTrailerSize {
+ n, err = ser.in.Read(ser.trailer[ser.trailerUsed:])
+ ser.trailerUsed += n
+ if err == io.EOF {
+ if ser.trailerUsed != mdcTrailerSize {
+ n = 0
+ err = io.ErrUnexpectedEOF
+ ser.error = true
+ return
+ }
+ ser.eof = true
+ n = 0
+ return
+ }
+
+ if err != nil {
+ n = 0
+ return
+ }
+ }
+
+ // If it's a short read then we read into a temporary buffer and shift
+ // the data into the caller's buffer.
+ if len(buf) <= mdcTrailerSize {
+ n, err = readFull(ser.in, ser.scratch[:len(buf)])
+ copy(buf, ser.trailer[:n])
+ ser.h.Write(buf[:n])
+ copy(ser.trailer[:], ser.trailer[n:])
+ copy(ser.trailer[mdcTrailerSize-n:], ser.scratch[:])
+ if n < len(buf) {
+ ser.eof = true
+ err = io.EOF
+ }
+ return
+ }
+
+ n, err = ser.in.Read(buf[mdcTrailerSize:])
+ copy(buf, ser.trailer[:])
+ ser.h.Write(buf[:n])
+ copy(ser.trailer[:], buf[n:])
+
+ if err == io.EOF {
+ ser.eof = true
+ }
+ return
+}
+
+// This is a new-format packet tag byte for a type 19 (Integrity Protected) packet.
+const mdcPacketTagByte = byte(0x80) | 0x40 | 19
+
+func (ser *seMDCReader) Close() error {
+ if ser.error {
+ return errors.ErrMDCHashMismatch
+ }
+
+ for !ser.eof {
+ // We haven't seen EOF so we need to read to the end
+ var buf [1024]byte
+ _, err := ser.Read(buf[:])
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ return errors.ErrMDCHashMismatch
+ }
+ }
+
+ ser.h.Write(ser.trailer[:2])
+
+ final := ser.h.Sum(nil)
+ if subtle.ConstantTimeCompare(final, ser.trailer[2:]) != 1 {
+ return errors.ErrMDCHashMismatch
+ }
+ // The hash already includes the MDC header, but we still check its value
+ // to confirm encryption correctness
+ if ser.trailer[0] != mdcPacketTagByte || ser.trailer[1] != sha1.Size {
+ return errors.ErrMDCHashMismatch
+ }
+ return nil
+}
+
+// An seMDCWriter writes through to an io.WriteCloser while maintains a running
+// hash of the data written. On close, it emits an MDC packet containing the
+// running hash.
+type seMDCWriter struct {
+ w io.WriteCloser
+ h hash.Hash
+}
+
+func (w *seMDCWriter) Write(buf []byte) (n int, err error) {
+ w.h.Write(buf)
+ return w.w.Write(buf)
+}
+
+func (w *seMDCWriter) Close() (err error) {
+ var buf [mdcTrailerSize]byte
+
+ buf[0] = mdcPacketTagByte
+ buf[1] = sha1.Size
+ w.h.Write(buf[:2])
+ digest := w.h.Sum(nil)
+ copy(buf[2:], digest)
+
+ _, err = w.w.Write(buf[:])
+ if err != nil {
+ return
+ }
+ return w.w.Close()
+}
+
+// noOpCloser is like an ioutil.NopCloser, but for an io.Writer.
+type noOpCloser struct {
+ w io.Writer
+}
+
+func (c noOpCloser) Write(data []byte) (n int, err error) {
+ return c.w.Write(data)
+}
+
+func (c noOpCloser) Close() error {
+ return nil
+}
+
+func serializeSymmetricallyEncryptedMdc(ciphertext io.WriteCloser, c CipherFunction, key []byte, config *Config) (Contents io.WriteCloser, err error) {
+ // Disallow old cipher suites
+ if !c.IsSupported() || c < CipherAES128 {
+ return nil, errors.InvalidArgumentError("invalid mdc cipher function")
+ }
+
+ if c.KeySize() != len(key) {
+ return nil, errors.InvalidArgumentError("error in mdc serialization: bad key length")
+ }
+
+ _, err = ciphertext.Write([]byte{symmetricallyEncryptedVersionMdc})
+ if err != nil {
+ return
+ }
+
+ block := c.new(key)
+ blockSize := block.BlockSize()
+ iv := make([]byte, blockSize)
+ _, err = io.ReadFull(config.Random(), iv)
+ if err != nil {
+ return nil, err
+ }
+ s, prefix := NewOCFBEncrypter(block, iv, OCFBNoResync)
+ _, err = ciphertext.Write(prefix)
+ if err != nil {
+ return
+ }
+ plaintext := cipher.StreamWriter{S: s, W: ciphertext}
+
+ h := sha1.New()
+ h.Write(iv)
+ h.Write(iv[blockSize-2:])
+ Contents = &seMDCWriter{w: plaintext, h: h}
+ return
+}
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userattribute.go
similarity index 89%
rename from vendor/golang.org/x/crypto/openpgp/packet/userattribute.go
rename to vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userattribute.go
index ff7ef5307..63814ed13 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/userattribute.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userattribute.go
@@ -41,9 +41,16 @@ func NewUserAttributePhoto(photos ...image.Image) (uat *UserAttribute, err error
if err = jpeg.Encode(&buf, photo, nil); err != nil {
return
}
+
+ lengthBuf := make([]byte, 5)
+ n := serializeSubpacketLength(lengthBuf, len(buf.Bytes())+1)
+ lengthBuf = lengthBuf[:n]
+
uat.Contents = append(uat.Contents, &OpaqueSubpacket{
- SubType: UserAttrImageSubpacket,
- Contents: buf.Bytes()})
+ SubType: UserAttrImageSubpacket,
+ EncodedLength: lengthBuf,
+ Contents: buf.Bytes(),
+ })
}
return
}
@@ -68,7 +75,10 @@ func (uat *UserAttribute) parse(r io.Reader) (err error) {
func (uat *UserAttribute) Serialize(w io.Writer) (err error) {
var buf bytes.Buffer
for _, sp := range uat.Contents {
- sp.Serialize(&buf)
+ err = sp.Serialize(&buf)
+ if err != nil {
+ return err
+ }
}
if err = serializeHeader(w, packetTypeUserAttribute, buf.Len()); err != nil {
return err
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/userid.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userid.go
similarity index 96%
rename from vendor/golang.org/x/crypto/openpgp/packet/userid.go
rename to vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userid.go
index 359a462eb..3c7451a3c 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/userid.go
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/packet/userid.go
@@ -155,5 +155,12 @@ func parseUserId(id string) (name, comment, email string) {
name = strings.TrimSpace(id[n.start:n.end])
comment = strings.TrimSpace(id[c.start:c.end])
email = strings.TrimSpace(id[e.start:e.end])
+
+ // RFC 2822 3.4: alternate simple form of a mailbox
+ if email == "" && strings.ContainsRune(name, '@') {
+ email = name
+ name = ""
+ }
+
return
}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go
new file mode 100644
index 000000000..e6dd9b5fd
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/read.go
@@ -0,0 +1,619 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package openpgp implements high level operations on OpenPGP messages.
+package openpgp // import "github.com/ProtonMail/go-crypto/openpgp"
+
+import (
+ "crypto"
+ _ "crypto/sha256"
+ _ "crypto/sha512"
+ "hash"
+ "io"
+ "strconv"
+
+ "github.com/ProtonMail/go-crypto/openpgp/armor"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+ "github.com/ProtonMail/go-crypto/openpgp/packet"
+ _ "golang.org/x/crypto/sha3"
+)
+
+// SignatureType is the armor type for a PGP signature.
+var SignatureType = "PGP SIGNATURE"
+
+// readArmored reads an armored block with the given type.
+func readArmored(r io.Reader, expectedType string) (body io.Reader, err error) {
+ block, err := armor.Decode(r)
+ if err != nil {
+ return
+ }
+
+ if block.Type != expectedType {
+ return nil, errors.InvalidArgumentError("expected '" + expectedType + "', got: " + block.Type)
+ }
+
+ return block.Body, nil
+}
+
+// MessageDetails contains the result of parsing an OpenPGP encrypted and/or
+// signed message.
+type MessageDetails struct {
+ IsEncrypted bool // true if the message was encrypted.
+ EncryptedToKeyIds []uint64 // the list of recipient key ids.
+ IsSymmetricallyEncrypted bool // true if a passphrase could have decrypted the message.
+ DecryptedWith Key // the private key used to decrypt the message, if any.
+ IsSigned bool // true if the message is signed.
+ SignedByKeyId uint64 // the key id of the signer, if any.
+ SignedByFingerprint []byte // the key fingerprint of the signer, if any.
+ SignedBy *Key // the key of the signer, if available.
+ LiteralData *packet.LiteralData // the metadata of the contents
+ UnverifiedBody io.Reader // the contents of the message.
+
+ // If IsSigned is true and SignedBy is non-zero then the signature will
+ // be verified as UnverifiedBody is read. The signature cannot be
+ // checked until the whole of UnverifiedBody is read so UnverifiedBody
+ // must be consumed until EOF before the data can be trusted. Even if a
+ // message isn't signed (or the signer is unknown) the data may contain
+ // an authentication code that is only checked once UnverifiedBody has
+ // been consumed. Once EOF has been seen, the following fields are
+ // valid. (An authentication code failure is reported as a
+ // SignatureError error when reading from UnverifiedBody.)
+ Signature *packet.Signature // the signature packet itself.
+ SignatureError error // nil if the signature is good.
+ UnverifiedSignatures []*packet.Signature // all other unverified signature packets.
+
+ decrypted io.ReadCloser
+}
+
+// A PromptFunction is used as a callback by functions that may need to decrypt
+// a private key, or prompt for a passphrase. It is called with a list of
+// acceptable, encrypted private keys and a boolean that indicates whether a
+// passphrase is usable. It should either decrypt a private key or return a
+// passphrase to try. If the decrypted private key or given passphrase isn't
+// correct, the function will be called again, forever. Any error returned will
+// be passed up.
+type PromptFunction func(keys []Key, symmetric bool) ([]byte, error)
+
+// A keyEnvelopePair is used to store a private key with the envelope that
+// contains a symmetric key, encrypted with that key.
+type keyEnvelopePair struct {
+ key Key
+ encryptedKey *packet.EncryptedKey
+}
+
+// ReadMessage parses an OpenPGP message that may be signed and/or encrypted.
+// The given KeyRing should contain both public keys (for signature
+// verification) and, possibly encrypted, private keys for decrypting.
+// If config is nil, sensible defaults will be used.
+func ReadMessage(r io.Reader, keyring KeyRing, prompt PromptFunction, config *packet.Config) (md *MessageDetails, err error) {
+ var p packet.Packet
+
+ var symKeys []*packet.SymmetricKeyEncrypted
+ var pubKeys []keyEnvelopePair
+ // Integrity protected encrypted packet: SymmetricallyEncrypted or AEADEncrypted
+ var edp packet.EncryptedDataPacket
+
+ packets := packet.NewReader(r)
+ md = new(MessageDetails)
+ md.IsEncrypted = true
+
+ // The message, if encrypted, starts with a number of packets
+ // containing an encrypted decryption key. The decryption key is either
+ // encrypted to a public key, or with a passphrase. This loop
+ // collects these packets.
+ParsePackets:
+ for {
+ p, err = packets.Next()
+ if err != nil {
+ return nil, err
+ }
+ switch p := p.(type) {
+ case *packet.SymmetricKeyEncrypted:
+ // This packet contains the decryption key encrypted with a passphrase.
+ md.IsSymmetricallyEncrypted = true
+ symKeys = append(symKeys, p)
+ case *packet.EncryptedKey:
+ // This packet contains the decryption key encrypted to a public key.
+ md.EncryptedToKeyIds = append(md.EncryptedToKeyIds, p.KeyId)
+ switch p.Algo {
+ case packet.PubKeyAlgoRSA, packet.PubKeyAlgoRSAEncryptOnly, packet.PubKeyAlgoElGamal, packet.PubKeyAlgoECDH, packet.PubKeyAlgoX25519, packet.PubKeyAlgoX448:
+ break
+ default:
+ continue
+ }
+ if keyring != nil {
+ var keys []Key
+ if p.KeyId == 0 {
+ keys = keyring.DecryptionKeys()
+ } else {
+ keys = keyring.KeysById(p.KeyId)
+ }
+ for _, k := range keys {
+ pubKeys = append(pubKeys, keyEnvelopePair{k, p})
+ }
+ }
+ case *packet.SymmetricallyEncrypted:
+ if !p.IntegrityProtected && !config.AllowUnauthenticatedMessages() {
+ return nil, errors.UnsupportedError("message is not integrity protected")
+ }
+ edp = p
+ break ParsePackets
+ case *packet.AEADEncrypted:
+ edp = p
+ break ParsePackets
+ case *packet.Compressed, *packet.LiteralData, *packet.OnePassSignature:
+ // This message isn't encrypted.
+ if len(symKeys) != 0 || len(pubKeys) != 0 {
+ return nil, errors.StructuralError("key material not followed by encrypted message")
+ }
+ packets.Unread(p)
+ return readSignedMessage(packets, nil, keyring, config)
+ }
+ }
+
+ var candidates []Key
+ var decrypted io.ReadCloser
+
+ // Now that we have the list of encrypted keys we need to decrypt at
+ // least one of them or, if we cannot, we need to call the prompt
+ // function so that it can decrypt a key or give us a passphrase.
+FindKey:
+ for {
+ // See if any of the keys already have a private key available
+ candidates = candidates[:0]
+ candidateFingerprints := make(map[string]bool)
+
+ for _, pk := range pubKeys {
+ if pk.key.PrivateKey == nil {
+ continue
+ }
+ if !pk.key.PrivateKey.Encrypted {
+ if len(pk.encryptedKey.Key) == 0 {
+ errDec := pk.encryptedKey.Decrypt(pk.key.PrivateKey, config)
+ if errDec != nil {
+ continue
+ }
+ }
+ // Try to decrypt symmetrically encrypted
+ decrypted, err = edp.Decrypt(pk.encryptedKey.CipherFunc, pk.encryptedKey.Key)
+ if err != nil && err != errors.ErrKeyIncorrect {
+ return nil, err
+ }
+ if decrypted != nil {
+ md.DecryptedWith = pk.key
+ break FindKey
+ }
+ } else {
+ fpr := string(pk.key.PublicKey.Fingerprint[:])
+ if v := candidateFingerprints[fpr]; v {
+ continue
+ }
+ candidates = append(candidates, pk.key)
+ candidateFingerprints[fpr] = true
+ }
+ }
+
+ if len(candidates) == 0 && len(symKeys) == 0 {
+ return nil, errors.ErrKeyIncorrect
+ }
+
+ if prompt == nil {
+ return nil, errors.ErrKeyIncorrect
+ }
+
+ passphrase, err := prompt(candidates, len(symKeys) != 0)
+ if err != nil {
+ return nil, err
+ }
+
+ // Try the symmetric passphrase first
+ if len(symKeys) != 0 && passphrase != nil {
+ for _, s := range symKeys {
+ key, cipherFunc, err := s.Decrypt(passphrase)
+ // In v4, on wrong passphrase, session key decryption is very likely to result in an invalid cipherFunc:
+ // only for < 5% of cases we will proceed to decrypt the data
+ if err == nil {
+ decrypted, err = edp.Decrypt(cipherFunc, key)
+ if err != nil {
+ return nil, err
+ }
+ if decrypted != nil {
+ break FindKey
+ }
+ }
+ }
+ }
+ }
+
+ md.decrypted = decrypted
+ if err := packets.Push(decrypted); err != nil {
+ return nil, err
+ }
+ mdFinal, sensitiveParsingErr := readSignedMessage(packets, md, keyring, config)
+ if sensitiveParsingErr != nil {
+ return nil, errors.HandleSensitiveParsingError(sensitiveParsingErr, md.decrypted != nil)
+ }
+ return mdFinal, nil
+}
+
+// readSignedMessage reads a possibly signed message if mdin is non-zero then
+// that structure is updated and returned. Otherwise a fresh MessageDetails is
+// used.
+func readSignedMessage(packets *packet.Reader, mdin *MessageDetails, keyring KeyRing, config *packet.Config) (md *MessageDetails, err error) {
+ if mdin == nil {
+ mdin = new(MessageDetails)
+ }
+ md = mdin
+
+ var p packet.Packet
+ var h hash.Hash
+ var wrappedHash hash.Hash
+ var prevLast bool
+FindLiteralData:
+ for {
+ p, err = packets.Next()
+ if err != nil {
+ return nil, err
+ }
+ switch p := p.(type) {
+ case *packet.Compressed:
+ if err := packets.Push(p.Body); err != nil {
+ return nil, err
+ }
+ case *packet.OnePassSignature:
+ if prevLast {
+ return nil, errors.UnsupportedError("nested signature packets")
+ }
+
+ if p.IsLast {
+ prevLast = true
+ }
+
+ h, wrappedHash, err = hashForSignature(p.Hash, p.SigType, p.Salt)
+ if err != nil {
+ md.SignatureError = err
+ }
+
+ md.IsSigned = true
+ if p.Version == 6 {
+ md.SignedByFingerprint = p.KeyFingerprint
+ }
+ md.SignedByKeyId = p.KeyId
+
+ if keyring != nil {
+ keys := keyring.KeysByIdUsage(p.KeyId, packet.KeyFlagSign)
+ if len(keys) > 0 {
+ md.SignedBy = &keys[0]
+ }
+ }
+ case *packet.LiteralData:
+ md.LiteralData = p
+ break FindLiteralData
+ }
+ }
+
+ if md.IsSigned && md.SignatureError == nil {
+ md.UnverifiedBody = &signatureCheckReader{packets, h, wrappedHash, md, config}
+ } else if md.decrypted != nil {
+ md.UnverifiedBody = &checkReader{md, false}
+ } else {
+ md.UnverifiedBody = md.LiteralData.Body
+ }
+
+ return md, nil
+}
+
+func wrapHashForSignature(hashFunc hash.Hash, sigType packet.SignatureType) (hash.Hash, error) {
+ switch sigType {
+ case packet.SigTypeBinary:
+ return hashFunc, nil
+ case packet.SigTypeText:
+ return NewCanonicalTextHash(hashFunc), nil
+ }
+ return nil, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(sigType)))
+}
+
+// hashForSignature returns a pair of hashes that can be used to verify a
+// signature. The signature may specify that the contents of the signed message
+// should be preprocessed (i.e. to normalize line endings). Thus this function
+// returns two hashes. The second should be used to hash the message itself and
+// performs any needed preprocessing.
+func hashForSignature(hashFunc crypto.Hash, sigType packet.SignatureType, sigSalt []byte) (hash.Hash, hash.Hash, error) {
+ if _, ok := algorithm.HashToHashIdWithSha1(hashFunc); !ok {
+ return nil, nil, errors.UnsupportedError("unsupported hash function")
+ }
+ if !hashFunc.Available() {
+ return nil, nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hashFunc)))
+ }
+ h := hashFunc.New()
+ if sigSalt != nil {
+ h.Write(sigSalt)
+ }
+ wrappedHash, err := wrapHashForSignature(h, sigType)
+ if err != nil {
+ return nil, nil, err
+ }
+ switch sigType {
+ case packet.SigTypeBinary:
+ return h, wrappedHash, nil
+ case packet.SigTypeText:
+ return h, wrappedHash, nil
+ }
+ return nil, nil, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(sigType)))
+}
+
+// checkReader wraps an io.Reader from a LiteralData packet. When it sees EOF
+// it closes the ReadCloser from any SymmetricallyEncrypted packet to trigger
+// MDC checks.
+type checkReader struct {
+ md *MessageDetails
+ checked bool
+}
+
+func (cr *checkReader) Read(buf []byte) (int, error) {
+ n, sensitiveParsingError := cr.md.LiteralData.Body.Read(buf)
+ if sensitiveParsingError == io.EOF {
+ if cr.checked {
+ // Only check once
+ return n, io.EOF
+ }
+ mdcErr := cr.md.decrypted.Close()
+ if mdcErr != nil {
+ return n, mdcErr
+ }
+ cr.checked = true
+ return n, io.EOF
+ }
+
+ if sensitiveParsingError != nil {
+ return n, errors.HandleSensitiveParsingError(sensitiveParsingError, true)
+ }
+
+ return n, nil
+}
+
+// signatureCheckReader wraps an io.Reader from a LiteralData packet and hashes
+// the data as it is read. When it sees an EOF from the underlying io.Reader
+// it parses and checks a trailing Signature packet and triggers any MDC checks.
+type signatureCheckReader struct {
+ packets *packet.Reader
+ h, wrappedHash hash.Hash
+ md *MessageDetails
+ config *packet.Config
+}
+
+func (scr *signatureCheckReader) Read(buf []byte) (int, error) {
+ n, sensitiveParsingError := scr.md.LiteralData.Body.Read(buf)
+
+ // Hash only if required
+ if scr.md.SignedBy != nil {
+ scr.wrappedHash.Write(buf[:n])
+ }
+
+ readsDecryptedData := scr.md.decrypted != nil
+ if sensitiveParsingError == io.EOF {
+ var p packet.Packet
+ var readError error
+ var sig *packet.Signature
+
+ p, readError = scr.packets.Next()
+ for readError == nil {
+ var ok bool
+ if sig, ok = p.(*packet.Signature); ok {
+ if sig.Version == 5 && (sig.SigType == 0x00 || sig.SigType == 0x01) {
+ sig.Metadata = scr.md.LiteralData
+ }
+
+ // If signature KeyID matches
+ if scr.md.SignedBy != nil && *sig.IssuerKeyId == scr.md.SignedByKeyId {
+ key := scr.md.SignedBy
+ signatureError := key.PublicKey.VerifySignature(scr.h, sig)
+ if signatureError == nil {
+ signatureError = checkMessageSignatureDetails(key, sig, scr.config)
+ }
+ scr.md.Signature = sig
+ scr.md.SignatureError = signatureError
+ } else {
+ scr.md.UnverifiedSignatures = append(scr.md.UnverifiedSignatures, sig)
+ }
+ }
+
+ p, readError = scr.packets.Next()
+ }
+
+ if scr.md.SignedBy != nil && scr.md.Signature == nil {
+ if scr.md.UnverifiedSignatures == nil {
+ scr.md.SignatureError = errors.StructuralError("LiteralData not followed by signature")
+ } else {
+ scr.md.SignatureError = errors.StructuralError("No matching signature found")
+ }
+ }
+
+ // The SymmetricallyEncrypted packet, if any, might have an
+ // unsigned hash of its own. In order to check this we need to
+ // close that Reader.
+ if scr.md.decrypted != nil {
+ if sensitiveParsingError := scr.md.decrypted.Close(); sensitiveParsingError != nil {
+ return n, errors.HandleSensitiveParsingError(sensitiveParsingError, true)
+ }
+ }
+ return n, io.EOF
+ }
+
+ if sensitiveParsingError != nil {
+ return n, errors.HandleSensitiveParsingError(sensitiveParsingError, readsDecryptedData)
+ }
+
+ return n, nil
+}
+
+// VerifyDetachedSignature takes a signed file and a detached signature and
+// returns the signature packet and the entity the signature was signed by,
+// if any, and a possible signature verification error.
+// If the signer isn't known, ErrUnknownIssuer is returned.
+func VerifyDetachedSignature(keyring KeyRing, signed, signature io.Reader, config *packet.Config) (sig *packet.Signature, signer *Entity, err error) {
+ return verifyDetachedSignature(keyring, signed, signature, nil, false, config)
+}
+
+// VerifyDetachedSignatureAndHash performs the same actions as
+// VerifyDetachedSignature and checks that the expected hash functions were used.
+func VerifyDetachedSignatureAndHash(keyring KeyRing, signed, signature io.Reader, expectedHashes []crypto.Hash, config *packet.Config) (sig *packet.Signature, signer *Entity, err error) {
+ return verifyDetachedSignature(keyring, signed, signature, expectedHashes, true, config)
+}
+
+// CheckDetachedSignature takes a signed file and a detached signature and
+// returns the entity the signature was signed by, if any, and a possible
+// signature verification error. If the signer isn't known,
+// ErrUnknownIssuer is returned.
+func CheckDetachedSignature(keyring KeyRing, signed, signature io.Reader, config *packet.Config) (signer *Entity, err error) {
+ _, signer, err = verifyDetachedSignature(keyring, signed, signature, nil, false, config)
+ return
+}
+
+// CheckDetachedSignatureAndHash performs the same actions as
+// CheckDetachedSignature and checks that the expected hash functions were used.
+func CheckDetachedSignatureAndHash(keyring KeyRing, signed, signature io.Reader, expectedHashes []crypto.Hash, config *packet.Config) (signer *Entity, err error) {
+ _, signer, err = verifyDetachedSignature(keyring, signed, signature, expectedHashes, true, config)
+ return
+}
+
+func verifyDetachedSignature(keyring KeyRing, signed, signature io.Reader, expectedHashes []crypto.Hash, checkHashes bool, config *packet.Config) (sig *packet.Signature, signer *Entity, err error) {
+ var issuerKeyId uint64
+ var hashFunc crypto.Hash
+ var sigType packet.SignatureType
+ var keys []Key
+ var p packet.Packet
+
+ packets := packet.NewReader(signature)
+ for {
+ p, err = packets.Next()
+ if err == io.EOF {
+ return nil, nil, errors.ErrUnknownIssuer
+ }
+ if err != nil {
+ return nil, nil, err
+ }
+
+ var ok bool
+ sig, ok = p.(*packet.Signature)
+ if !ok {
+ return nil, nil, errors.StructuralError("non signature packet found")
+ }
+ if sig.IssuerKeyId == nil {
+ return nil, nil, errors.StructuralError("signature doesn't have an issuer")
+ }
+ issuerKeyId = *sig.IssuerKeyId
+ hashFunc = sig.Hash
+ sigType = sig.SigType
+ if checkHashes {
+ matchFound := false
+ // check for hashes
+ for _, expectedHash := range expectedHashes {
+ if hashFunc == expectedHash {
+ matchFound = true
+ break
+ }
+ }
+ if !matchFound {
+ return nil, nil, errors.StructuralError("hash algorithm or salt mismatch with cleartext message headers")
+ }
+ }
+ keys = keyring.KeysByIdUsage(issuerKeyId, packet.KeyFlagSign)
+ if len(keys) > 0 {
+ break
+ }
+ }
+
+ if len(keys) == 0 {
+ panic("unreachable")
+ }
+
+ h, err := sig.PrepareVerify()
+ if err != nil {
+ return nil, nil, err
+ }
+ wrappedHash, err := wrapHashForSignature(h, sigType)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ if _, err := io.Copy(wrappedHash, signed); err != nil && err != io.EOF {
+ return nil, nil, err
+ }
+
+ for _, key := range keys {
+ err = key.PublicKey.VerifySignature(h, sig)
+ if err == nil {
+ return sig, key.Entity, checkMessageSignatureDetails(&key, sig, config)
+ }
+ }
+
+ return nil, nil, err
+}
+
+// CheckArmoredDetachedSignature performs the same actions as
+// CheckDetachedSignature but expects the signature to be armored.
+func CheckArmoredDetachedSignature(keyring KeyRing, signed, signature io.Reader, config *packet.Config) (signer *Entity, err error) {
+ body, err := readArmored(signature, SignatureType)
+ if err != nil {
+ return
+ }
+
+ return CheckDetachedSignature(keyring, signed, body, config)
+}
+
+// checkMessageSignatureDetails returns an error if:
+// - The signature (or one of the binding signatures mentioned below)
+// has a unknown critical notation data subpacket
+// - The primary key of the signing entity is revoked
+// - The primary identity is revoked
+// - The signature is expired
+// - The primary key of the signing entity is expired according to the
+// primary identity binding signature
+//
+// ... or, if the signature was signed by a subkey and:
+// - The signing subkey is revoked
+// - The signing subkey is expired according to the subkey binding signature
+// - The signing subkey binding signature is expired
+// - The signing subkey cross-signature is expired
+//
+// NOTE: The order of these checks is important, as the caller may choose to
+// ignore ErrSignatureExpired or ErrKeyExpired errors, but should never
+// ignore any other errors.
+func checkMessageSignatureDetails(key *Key, signature *packet.Signature, config *packet.Config) error {
+ now := config.Now()
+ primarySelfSignature, primaryIdentity := key.Entity.PrimarySelfSignature()
+ signedBySubKey := key.PublicKey != key.Entity.PrimaryKey
+ sigsToCheck := []*packet.Signature{signature, primarySelfSignature}
+ if signedBySubKey {
+ sigsToCheck = append(sigsToCheck, key.SelfSignature, key.SelfSignature.EmbeddedSignature)
+ }
+ for _, sig := range sigsToCheck {
+ for _, notation := range sig.Notations {
+ if notation.IsCritical && !config.KnownNotation(notation.Name) {
+ return errors.SignatureError("unknown critical notation: " + notation.Name)
+ }
+ }
+ }
+ if key.Entity.Revoked(now) || // primary key is revoked
+ (signedBySubKey && key.Revoked(now)) || // subkey is revoked
+ (primaryIdentity != nil && primaryIdentity.Revoked(now)) { // primary identity is revoked for v4
+ return errors.ErrKeyRevoked
+ }
+ if key.Entity.PrimaryKey.KeyExpired(primarySelfSignature, now) { // primary key is expired
+ return errors.ErrKeyExpired
+ }
+ if signedBySubKey {
+ if key.PublicKey.KeyExpired(key.SelfSignature, now) { // subkey is expired
+ return errors.ErrKeyExpired
+ }
+ }
+ for _, sig := range sigsToCheck {
+ if sig.SigExpired(now) { // any of the relevant signatures are expired
+ return errors.ErrSignatureExpired
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go
new file mode 100644
index 000000000..670d60226
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/read_write_test_data.go
@@ -0,0 +1,457 @@
+package openpgp
+
+const testKey1KeyId uint64 = 0xA34D7E18C20C31BB
+const testKey3KeyId uint64 = 0x338934250CCC0360
+const testKeyP256KeyId uint64 = 0xd44a2c495918513e
+
+const signedInput = "Signed message\nline 2\nline 3\n"
+const signedTextInput = "Signed message\r\nline 2\r\nline 3\r\n"
+
+const recipientUnspecifiedHex = "848c0300000000000000000103ff62d4d578d03cf40c3da998dfe216c074fa6ddec5e31c197c9666ba292830d91d18716a80f699f9d897389a90e6d62d0238f5f07a5248073c0f24920e4bc4a30c2d17ee4e0cae7c3d4aaa4e8dced50e3010a80ee692175fa0385f62ecca4b56ee6e9980aa3ec51b61b077096ac9e800edaf161268593eedb6cc7027ff5cb32745d250010d407a6221ae22ef18469b444f2822478c4d190b24d36371a95cb40087cdd42d9399c3d06a53c0673349bfb607927f20d1e122bde1e2bf3aa6cae6edf489629bcaa0689539ae3b718914d88ededc3b"
+
+const detachedSignatureHex = "889c04000102000605024d449cd1000a0910a34d7e18c20c31bb167603ff57718d09f28a519fdc7b5a68b6a3336da04df85e38c5cd5d5bd2092fa4629848a33d85b1729402a2aab39c3ac19f9d573f773cc62c264dc924c067a79dfd8a863ae06c7c8686120760749f5fd9b1e03a64d20a7df3446ddc8f0aeadeaeba7cbaee5c1e366d65b6a0c6cc749bcb912d2f15013f812795c2e29eb7f7b77f39ce77"
+
+const detachedSignatureTextHex = "889c04010102000605024d449d21000a0910a34d7e18c20c31bbc8c60400a24fbef7342603a41cb1165767bd18985d015fb72fe05db42db36cfb2f1d455967f1e491194fbf6cf88146222b23bf6ffbd50d17598d976a0417d3192ff9cc0034fd00f287b02e90418bbefe609484b09231e4e7a5f3562e199bf39909ab5276c4d37382fe088f6b5c3426fc1052865da8b3ab158672d58b6264b10823dc4b39"
+
+const detachedSignatureDSAHex = "884604001102000605024d6c4eac000a0910338934250ccc0360f18d00a087d743d6405ed7b87755476629600b8b694a39e900a0abff8126f46faf1547c1743c37b21b4ea15b8f83"
+
+const detachedSignatureP256Hex = "885e0400130a0006050256e5bb00000a0910d44a2c495918513edef001009841a4f792beb0befccb35c8838a6a87d9b936beaa86db6745ddc7b045eee0cf00fd1ac1f78306b17e965935dd3f8bae4587a76587e4af231efe19cc4011a8434817"
+
+// The plaintext is https://www.gutenberg.org/cache/epub/1080/pg1080.txt
+const modestProposalSha512 = "lbbrB1+WP3T9AaC9OQqBdOcCjgeEQadlulXsNPgVx0tyqPzDHwUugZ2gE7V0ESKAw6kAVfgkcuvfgxAAGaeHtw=="
+
+const testKeys1And2Hex = "988d044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd0011010001b41054657374204b6579203120285253412988b804130102002205024d3c5c10021b03060b090807030206150802090a0b0416020301021e01021780000a0910a34d7e18c20c31bbb5b304009cc45fe610b641a2c146331be94dade0a396e73ca725e1b25c21708d9cab46ecca5ccebc23055879df8f99eea39b377962a400f2ebdc36a7c99c333d74aeba346315137c3ff9d0a09b0273299090343048afb8107cf94cbd1400e3026f0ccac7ecebbc4d78588eb3e478fe2754d3ca664bcf3eac96ca4a6b0c8d7df5102f60f6b0020003b88d044d3c5c10010400b201df61d67487301f11879d514f4248ade90c8f68c7af1284c161098de4c28c2850f1ec7b8e30f959793e571542ffc6532189409cb51c3d30dad78c4ad5165eda18b20d9826d8707d0f742e2ab492103a85bbd9ddf4f5720f6de7064feb0d39ee002219765bb07bcfb8b877f47abe270ddeda4f676108cecb6b9bb2ad484a4f0011010001889f04180102000905024d3c5c10021b0c000a0910a34d7e18c20c31bb1a03040085c8d62e16d05dc4e9dad64953c8a2eed8b6c12f92b1575eeaa6dcf7be9473dd5b24b37b6dffbb4e7c99ed1bd3cb11634be19b3e6e207bed7505c7ca111ccf47cb323bf1f8851eb6360e8034cbff8dd149993c959de89f8f77f38e7e98b8e3076323aa719328e2b408db5ec0d03936efd57422ba04f925cdc7b4c1af7590e40ab0020003988d044d3c5c33010400b488c3e5f83f4d561f317817538d9d0397981e9aef1321ca68ebfae1cf8b7d388e19f4b5a24a82e2fbbf1c6c26557a6c5845307a03d815756f564ac7325b02bc83e87d5480a8fae848f07cb891f2d51ce7df83dcafdc12324517c86d472cc0ee10d47a68fd1d9ae49a6c19bbd36d82af597a0d88cc9c49de9df4e696fc1f0b5d0011010001b42754657374204b6579203220285253412c20656e637279707465642070726976617465206b65792988b804130102002205024d3c5c33021b03060b090807030206150802090a0b0416020301021e01021780000a0910d4984f961e35246b98940400908a73b6a6169f700434f076c6c79015a49bee37130eaf23aaa3cfa9ce60bfe4acaa7bc95f1146ada5867e0079babb38804891f4f0b8ebca57a86b249dee786161a755b7a342e68ccf3f78ed6440a93a6626beb9a37aa66afcd4f888790cb4bb46d94a4ae3eb3d7d3e6b00f6bfec940303e89ec5b32a1eaaacce66497d539328b0020003b88d044d3c5c33010400a4e913f9442abcc7f1804ccab27d2f787ffa592077ca935a8bb23165bd8d57576acac647cc596b2c3f814518cc8c82953c7a4478f32e0cf645630a5ba38d9618ef2bc3add69d459ae3dece5cab778938d988239f8c5ae437807075e06c828019959c644ff05ef6a5a1dab72227c98e3a040b0cf219026640698d7a13d8538a570011010001889f04180102000905024d3c5c33021b0c000a0910d4984f961e35246b26c703ff7ee29ef53bc1ae1ead533c408fa136db508434e233d6e62be621e031e5940bbd4c08142aed0f82217e7c3e1ec8de574bc06ccf3c36633be41ad78a9eacd209f861cae7b064100758545cc9dd83db71806dc1cfd5fb9ae5c7474bba0c19c44034ae61bae5eca379383339dece94ff56ff7aa44a582f3e5c38f45763af577c0934b0020003"
+
+const testKeys1And2PrivateHex = "9501d8044d3c5c10010400b1d13382944bd5aba23a4312968b5095d14f947f600eb478e14a6fcb16b0e0cac764884909c020bc495cfcc39a935387c661507bdb236a0612fb582cac3af9b29cc2c8c70090616c41b662f4da4c1201e195472eb7f4ae1ccbcbf9940fe21d985e379a5563dde5b9a23d35f1cfaa5790da3b79db26f23695107bfaca8e7b5bcd00110100010003ff4d91393b9a8e3430b14d6209df42f98dc927425b881f1209f319220841273a802a97c7bdb8b3a7740b3ab5866c4d1d308ad0d3a79bd1e883aacf1ac92dfe720285d10d08752a7efe3c609b1d00f17f2805b217be53999a7da7e493bfc3e9618fd17018991b8128aea70a05dbce30e4fbe626aa45775fa255dd9177aabf4df7cf0200c1ded12566e4bc2bb590455e5becfb2e2c9796482270a943343a7835de41080582c2be3caf5981aa838140e97afa40ad652a0b544f83eb1833b0957dce26e47b0200eacd6046741e9ce2ec5beb6fb5e6335457844fb09477f83b050a96be7da043e17f3a9523567ed40e7a521f818813a8b8a72209f1442844843ccc7eb9805442570200bdafe0438d97ac36e773c7162028d65844c4d463e2420aa2228c6e50dc2743c3d6c72d0d782a5173fe7be2169c8a9f4ef8a7cf3e37165e8c61b89c346cdc6c1799d2b41054657374204b6579203120285253412988b804130102002205024d3c5c10021b03060b090807030206150802090a0b0416020301021e01021780000a0910a34d7e18c20c31bbb5b304009cc45fe610b641a2c146331be94dade0a396e73ca725e1b25c21708d9cab46ecca5ccebc23055879df8f99eea39b377962a400f2ebdc36a7c99c333d74aeba346315137c3ff9d0a09b0273299090343048afb8107cf94cbd1400e3026f0ccac7ecebbc4d78588eb3e478fe2754d3ca664bcf3eac96ca4a6b0c8d7df5102f60f6b00200009d01d8044d3c5c10010400b201df61d67487301f11879d514f4248ade90c8f68c7af1284c161098de4c28c2850f1ec7b8e30f959793e571542ffc6532189409cb51c3d30dad78c4ad5165eda18b20d9826d8707d0f742e2ab492103a85bbd9ddf4f5720f6de7064feb0d39ee002219765bb07bcfb8b877f47abe270ddeda4f676108cecb6b9bb2ad484a4f00110100010003fd17a7490c22a79c59281fb7b20f5e6553ec0c1637ae382e8adaea295f50241037f8997cf42c1ce26417e015091451b15424b2c59eb8d4161b0975630408e394d3b00f88d4b4e18e2cc85e8251d4753a27c639c83f5ad4a571c4f19d7cd460b9b73c25ade730c99df09637bd173d8e3e981ac64432078263bb6dc30d3e974150dd0200d0ee05be3d4604d2146fb0457f31ba17c057560785aa804e8ca5530a7cd81d3440d0f4ba6851efcfd3954b7e68908fc0ba47f7ac37bf559c6c168b70d3a7c8cd0200da1c677c4bce06a068070f2b3733b0a714e88d62aa3f9a26c6f5216d48d5c2b5624144f3807c0df30be66b3268eeeca4df1fbded58faf49fc95dc3c35f134f8b01fd1396b6c0fc1b6c4f0eb8f5e44b8eace1e6073e20d0b8bc5385f86f1cf3f050f66af789f3ef1fc107b7f4421e19e0349c730c68f0a226981f4e889054fdb4dc149e8e889f04180102000905024d3c5c10021b0c000a0910a34d7e18c20c31bb1a03040085c8d62e16d05dc4e9dad64953c8a2eed8b6c12f92b1575eeaa6dcf7be9473dd5b24b37b6dffbb4e7c99ed1bd3cb11634be19b3e6e207bed7505c7ca111ccf47cb323bf1f8851eb6360e8034cbff8dd149993c959de89f8f77f38e7e98b8e3076323aa719328e2b408db5ec0d03936efd57422ba04f925cdc7b4c1af7590e40ab00200009501fe044d3c5c33010400b488c3e5f83f4d561f317817538d9d0397981e9aef1321ca68ebfae1cf8b7d388e19f4b5a24a82e2fbbf1c6c26557a6c5845307a03d815756f564ac7325b02bc83e87d5480a8fae848f07cb891f2d51ce7df83dcafdc12324517c86d472cc0ee10d47a68fd1d9ae49a6c19bbd36d82af597a0d88cc9c49de9df4e696fc1f0b5d0011010001fe030302e9030f3c783e14856063f16938530e148bc57a7aa3f3e4f90df9dceccdc779bc0835e1ad3d006e4a8d7b36d08b8e0de5a0d947254ecfbd22037e6572b426bcfdc517796b224b0036ff90bc574b5509bede85512f2eefb520fb4b02aa523ba739bff424a6fe81c5041f253f8d757e69a503d3563a104d0d49e9e890b9d0c26f96b55b743883b472caa7050c4acfd4a21f875bdf1258d88bd61224d303dc9df77f743137d51e6d5246b88c406780528fd9a3e15bab5452e5b93970d9dcc79f48b38651b9f15bfbcf6da452837e9cc70683d1bdca94507870f743e4ad902005812488dd342f836e72869afd00ce1850eea4cfa53ce10e3608e13d3c149394ee3cbd0e23d018fcbcb6e2ec5a1a22972d1d462ca05355d0d290dd2751e550d5efb38c6c89686344df64852bf4ff86638708f644e8ec6bd4af9b50d8541cb91891a431326ab2e332faa7ae86cfb6e0540aa63160c1e5cdd5a4add518b303fff0a20117c6bc77f7cfbaf36b04c865c6c2b42754657374204b6579203220285253412c20656e637279707465642070726976617465206b65792988b804130102002205024d3c5c33021b03060b090807030206150802090a0b0416020301021e01021780000a0910d4984f961e35246b98940400908a73b6a6169f700434f076c6c79015a49bee37130eaf23aaa3cfa9ce60bfe4acaa7bc95f1146ada5867e0079babb38804891f4f0b8ebca57a86b249dee786161a755b7a342e68ccf3f78ed6440a93a6626beb9a37aa66afcd4f888790cb4bb46d94a4ae3eb3d7d3e6b00f6bfec940303e89ec5b32a1eaaacce66497d539328b00200009d01fe044d3c5c33010400a4e913f9442abcc7f1804ccab27d2f787ffa592077ca935a8bb23165bd8d57576acac647cc596b2c3f814518cc8c82953c7a4478f32e0cf645630a5ba38d9618ef2bc3add69d459ae3dece5cab778938d988239f8c5ae437807075e06c828019959c644ff05ef6a5a1dab72227c98e3a040b0cf219026640698d7a13d8538a570011010001fe030302e9030f3c783e148560f936097339ae381d63116efcf802ff8b1c9360767db5219cc987375702a4123fd8657d3e22700f23f95020d1b261eda5257e9a72f9a918e8ef22dd5b3323ae03bbc1923dd224db988cadc16acc04b120a9f8b7e84da9716c53e0334d7b66586ddb9014df604b41be1e960dcfcbc96f4ed150a1a0dd070b9eb14276b9b6be413a769a75b519a53d3ecc0c220e85cd91ca354d57e7344517e64b43b6e29823cbd87eae26e2b2e78e6dedfbb76e3e9f77bcb844f9a8932eb3db2c3f9e44316e6f5d60e9e2a56e46b72abe6b06dc9a31cc63f10023d1f5e12d2a3ee93b675c96f504af0001220991c88db759e231b3320dcedf814dcf723fd9857e3d72d66a0f2af26950b915abdf56c1596f46a325bf17ad4810d3535fb02a259b247ac3dbd4cc3ecf9c51b6c07cebb009c1506fba0a89321ec8683e3fd009a6e551d50243e2d5092fefb3321083a4bad91320dc624bd6b5dddf93553e3d53924c05bfebec1fb4bd47e89a1a889f04180102000905024d3c5c33021b0c000a0910d4984f961e35246b26c703ff7ee29ef53bc1ae1ead533c408fa136db508434e233d6e62be621e031e5940bbd4c08142aed0f82217e7c3e1ec8de574bc06ccf3c36633be41ad78a9eacd209f861cae7b064100758545cc9dd83db71806dc1cfd5fb9ae5c7474bba0c19c44034ae61bae5eca379383339dece94ff56ff7aa44a582f3e5c38f45763af577c0934b0020000"
+
+const dsaElGamalTestKeysHex = "9501e1044dfcb16a110400aa3e5c1a1f43dd28c2ffae8abf5cfce555ee874134d8ba0a0f7b868ce2214beddc74e5e1e21ded354a95d18acdaf69e5e342371a71fbb9093162e0c5f3427de413a7f2c157d83f5cd2f9d791256dc4f6f0e13f13c3302af27f2384075ab3021dff7a050e14854bbde0a1094174855fc02f0bae8e00a340d94a1f22b32e48485700a0cec672ac21258fb95f61de2ce1af74b2c4fa3e6703ff698edc9be22c02ae4d916e4fa223f819d46582c0516235848a77b577ea49018dcd5e9e15cff9dbb4663a1ae6dd7580fa40946d40c05f72814b0f88481207e6c0832c3bded4853ebba0a7e3bd8e8c66df33d5a537cd4acf946d1080e7a3dcea679cb2b11a72a33a2b6a9dc85f466ad2ddf4c3db6283fa645343286971e3dd700703fc0c4e290d45767f370831a90187e74e9972aae5bff488eeff7d620af0362bfb95c1a6c3413ab5d15a2e4139e5d07a54d72583914661ed6a87cce810be28a0aa8879a2dd39e52fb6fe800f4f181ac7e328f740cde3d09a05cecf9483e4cca4253e60d4429ffd679d9996a520012aad119878c941e3cf151459873bdfc2a9563472fe0303027a728f9feb3b864260a1babe83925ce794710cfd642ee4ae0e5b9d74cee49e9c67b6cd0ea5dfbb582132195a121356a1513e1bca73e5b80c58c7ccb4164453412f456c47616d616c2054657374204b65792031886204131102002205024dfcb16a021b03060b090807030206150802090a0b0416020301021e01021780000a091033af447ccd759b09fadd00a0b8fd6f5a790bad7e9f2dbb7632046dc4493588db009c087c6a9ba9f7f49fab221587a74788c00db4889ab00200009d0157044dfcb16a1004008dec3f9291205255ccff8c532318133a6840739dd68b03ba942676f9038612071447bf07d00d559c5c0875724ea16a4c774f80d8338b55fca691a0522e530e604215b467bbc9ccfd483a1da99d7bc2648b4318fdbd27766fc8bfad3fddb37c62b8ae7ccfe9577e9b8d1e77c1d417ed2c2ef02d52f4da11600d85d3229607943700030503ff506c94c87c8cab778e963b76cf63770f0a79bf48fb49d3b4e52234620fc9f7657f9f8d56c96a2b7c7826ae6b57ebb2221a3fe154b03b6637cea7e6d98e3e45d87cf8dc432f723d3d71f89c5192ac8d7290684d2c25ce55846a80c9a7823f6acd9bb29fa6cd71f20bc90eccfca20451d0c976e460e672b000df49466408d527affe0303027a728f9feb3b864260abd761730327bca2aaa4ea0525c175e92bf240682a0e83b226f97ecb2e935b62c9a133858ce31b271fa8eb41f6a1b3cd72a63025ce1a75ee4180dcc284884904181102000905024dfcb16a021b0c000a091033af447ccd759b09dd0b009e3c3e7296092c81bee5a19929462caaf2fff3ae26009e218c437a2340e7ea628149af1ec98ec091a43992b00200009501e1044dfcb1be1104009f61faa61aa43df75d128cbe53de528c4aec49ce9360c992e70c77072ad5623de0a3a6212771b66b39a30dad6781799e92608316900518ec01184a85d872365b7d2ba4bacfb5882ea3c2473d3750dc6178cc1cf82147fb58caa28b28e9f12f6d1efcb0534abed644156c91cca4ab78834268495160b2400bc422beb37d237c2300a0cac94911b6d493bda1e1fbc6feeca7cb7421d34b03fe22cec6ccb39675bb7b94a335c2b7be888fd3906a1125f33301d8aa6ec6ee6878f46f73961c8d57a3e9544d8ef2a2cbfd4d52da665b1266928cfe4cb347a58c412815f3b2d2369dec04b41ac9a71cc9547426d5ab941cccf3b18575637ccfb42df1a802df3cfe0a999f9e7109331170e3a221991bf868543960f8c816c28097e503fe319db10fb98049f3a57d7c80c420da66d56f3644371631fad3f0ff4040a19a4fedc2d07727a1b27576f75a4d28c47d8246f27071e12d7a8de62aad216ddbae6aa02efd6b8a3e2818cda48526549791ab277e447b3a36c57cefe9b592f5eab73959743fcc8e83cbefec03a329b55018b53eec196765ae40ef9e20521a603c551efe0303020950d53a146bf9c66034d00c23130cce95576a2ff78016ca471276e8227fb30b1ffbd92e61804fb0c3eff9e30b1a826ee8f3e4730b4d86273ca977b4164453412f456c47616d616c2054657374204b65792032886204131102002205024dfcb1be021b03060b090807030206150802090a0b0416020301021e01021780000a0910a86bf526325b21b22bd9009e34511620415c974750a20df5cb56b182f3b48e6600a0a9466cb1a1305a84953445f77d461593f1d42bc1b00200009d0157044dfcb1be1004009565a951da1ee87119d600c077198f1c1bceb0f7aa54552489298e41ff788fa8f0d43a69871f0f6f77ebdfb14a4260cf9fbeb65d5844b4272a1904dd95136d06c3da745dc46327dd44a0f16f60135914368c8039a34033862261806bb2c5ce1152e2840254697872c85441ccb7321431d75a747a4bfb1d2c66362b51ce76311700030503fc0ea76601c196768070b7365a200e6ddb09307f262d5f39eec467b5f5784e22abdf1aa49226f59ab37cb49969d8f5230ea65caf56015abda62604544ed526c5c522bf92bed178a078789f6c807b6d34885688024a5bed9e9f8c58d11d4b82487b44c5f470c5606806a0443b79cadb45e0f897a561a53f724e5349b9267c75ca17fe0303020950d53a146bf9c660bc5f4ce8f072465e2d2466434320c1e712272fafc20e342fe7608101580fa1a1a367e60486a7cd1246b7ef5586cf5e10b32762b710a30144f12dd17dd4884904181102000905024dfcb1be021b0c000a0910a86bf526325b21b2904c00a0b2b66b4b39ccffda1d10f3ea8d58f827e30a8b8e009f4255b2d8112a184e40cde43a34e8655ca7809370b0020000"
+
+const ed25519wX25519Key = "c54b0663877fe31b00000020f94da7bb48d60a61e567706a6587d0331999bb9d891a08242ead84543df895a3001972817b12be707e8d5f586ce61361201d344eb266a2c82fde6835762b65b0b7c2b1061f1b0a00000042058263877fe3030b090705150a0e080c021600029b03021e09222106cb186c4f0609a697e4d52dfa6c722b0c1f1e27c18a56708f6525ec27bad9acc905270902070200000000ad2820103e2d7d227ec0e6d7ce4471db36bfc97083253690271498a7ef0576c07faae14585b3b903b0127ec4fda2f023045a2ec76bcb4f9571a9651e14aee1137a1d668442c88f951e33c4ffd33fb9a17d511eed758fc6d9cc50cb5fd793b2039d5804c74b0663877fe319000000208693248367f9e5015db922f8f48095dda784987f2d5985b12fbad16caf5e4435004d600a4f794d44775c57a26e0feefed558e9afffd6ad0d582d57fb2ba2dcedb8c29b06181b0a0000002c050263877fe322a106cb186c4f0609a697e4d52dfa6c722b0c1f1e27c18a56708f6525ec27bad9acc9021b0c00000000defa20a6e9186d9d5935fc8fe56314cdb527486a5a5120f9b762a235a729f039010a56b89c658568341fbef3b894e9834ad9bc72afae2f4c9c47a43855e65f1cb0a3f77bbc5f61085c1f8249fe4e7ca59af5f0bcee9398e0fa8d76e522e1d8ab42bb0d"
+
+const signedMessageHex = "a3019bc0cbccc0c4b8d8b74ee2108fe16ec6d3ca490cbe362d3f8333d3f352531472538b8b13d353b97232f352158c20943157c71c16064626063656269052062e4e01987e9b6fccff4b7df3a34c534b23e679cbec3bc0f8f6e64dfb4b55fe3f8efa9ce110ddb5cd79faf1d753c51aecfa669f7e7aa043436596cccc3359cb7dd6bbe9ecaa69e5989d9e57209571edc0b2fa7f57b9b79a64ee6e99ce1371395fee92fec2796f7b15a77c386ff668ee27f6d38f0baa6c438b561657377bf6acff3c5947befd7bf4c196252f1d6e5c524d0300"
+
+const signedTextMessageHex = "a3019bc0cbccc8c4b8d8b74ee2108fe16ec6d36a250cbece0c178233d3f352531472538b8b13d35379b97232f352158ca0b4312f57c71c1646462606365626906a062e4e019811591798ff99bf8afee860b0d8a8c2a85c3387e3bcf0bb3b17987f2bbcfab2aa526d930cbfd3d98757184df3995c9f3e7790e36e3e9779f06089d4c64e9e47dd6202cb6e9bc73c5d11bb59fbaf89d22d8dc7cf199ddf17af96e77c5f65f9bbed56f427bd8db7af37f6c9984bf9385efaf5f184f986fb3e6adb0ecfe35bbf92d16a7aa2a344fb0bc52fb7624f0200"
+
+const signedEncryptedMessageHex = "c18c032a67d68660df41c70103ff5a84c9a72f80e74ef0384c2d6a9ebfe2b09e06a8f298394f6d2abf174e40934ab0ec01fb2d0ddf21211c6fe13eb238563663b017a6b44edca552eb4736c4b7dc6ed907dd9e12a21b51b64b46f902f76fb7aaf805c1db8070574d8d0431a23e324a750f77fb72340a17a42300ee4ca8207301e95a731da229a63ab9c6b44541fbd2c11d016d810b3b3b2b38f15b5b40f0a4910332829c2062f1f7cc61f5b03677d73c54cafa1004ced41f315d46444946faae571d6f426e6dbd45d9780eb466df042005298adabf7ce0ef766dfeb94cd449c7ed0046c880339599c4711af073ce649b1e237c40b50a5536283e03bdbb7afad78bd08707715c67fb43295f905b4c479178809d429a8e167a9a8c6dfd8ab20b4edebdc38d6dec879a3202e1b752690d9bb5b0c07c5a227c79cc200e713a99251a4219d62ad5556900cf69bd384b6c8e726c7be267471d0d23af956da165af4af757246c2ebcc302b39e8ef2fccb4971b234fcda22d759ddb20e27269ee7f7fe67898a9de721bfa02ab0becaa046d00ea16cb1afc4e2eab40d0ac17121c565686e5cbd0cbdfbd9d6db5c70278b9c9db5a83176d04f61fbfbc4471d721340ede2746e5c312ded4f26787985af92b64fae3f253dbdde97f6a5e1996fd4d865599e32ff76325d3e9abe93184c02988ee89a4504356a4ef3b9b7a57cbb9637ca90af34a7676b9ef559325c3cca4e29d69fec1887f5440bb101361d744ad292a8547f22b4f22b419a42aa836169b89190f46d9560824cb2ac6e8771de8223216a5e647e132ab9eebcba89569ab339cb1c3d70fe806b31f4f4c600b4103b8d7583ebff16e43dcda551e6530f975122eb8b29"
+
+const verifiedSignatureEncryptedMessageHex = "c2b304000108000605026048f6d600210910a34d7e18c20c31bb1621045fb74b1d03b1e3cb31bc2f8aa34d7e18c20c31bb9a3b0400a32ddac1af259c1b0abab0041327ea04970944401978fb647dd1cf9aba4f164e43f0d8a9389501886474bdd4a6e77f6aea945c07dfbf87743835b44cc2c39a1f9aeecfa83135abc92e18e50396f2e6a06c44e0188b0081effbfb4160d28f118d4ff73dd199a102e47cffd8c7ff2bacd83ae72b5820c021a486766dd587b5da61"
+
+const unverifiedSignatureEncryptedMessageHex = "c2b304000108000605026048f6d600210910a34d7e18c20c31bb1621045fb74b1d03b1e3cb31bc2f8aa34d7e18c20c31bb9a3b0400a32ddac1af259c1b0abab0041327ea04970944401978fb647dd1cf9aba4f164e43f0d8a9389501886474bdd4a6e77f6aea945c07dfbf87743835b44cc2c39a1f9aeecfa83135abc92e18e50396f2e6a06c44e0188b0081effbfb4160d28f118d4ff73dd199a102e47cffd8c7ff2bacd83ae72b5820c021a486766dd587b5da61"
+
+const signedEncryptedMessage2Hex = "85010e03cf6a7abcd43e36731003fb057f5495b79db367e277cdbe4ab90d924ddee0c0381494112ff8c1238fb0184af35d1731573b01bc4c55ecacd2aafbe2003d36310487d1ecc9ac994f3fada7f9f7f5c3a64248ab7782906c82c6ff1303b69a84d9a9529c31ecafbcdb9ba87e05439897d87e8a2a3dec55e14df19bba7f7bd316291c002ae2efd24f83f9e3441203fc081c0c23dc3092a454ca8a082b27f631abf73aca341686982e8fbda7e0e7d863941d68f3de4a755c2964407f4b5e0477b3196b8c93d551dd23c8beef7d0f03fbb1b6066f78907faf4bf1677d8fcec72651124080e0b7feae6b476e72ab207d38d90b958759fdedfc3c6c35717c9dbfc979b3cfbbff0a76d24a5e57056bb88acbd2a901ef64bc6e4db02adc05b6250ff378de81dca18c1910ab257dff1b9771b85bb9bbe0a69f5989e6d1710a35e6dfcceb7d8fb5ccea8db3932b3d9ff3fe0d327597c68b3622aec8e3716c83a6c93f497543b459b58ba504ed6bcaa747d37d2ca746fe49ae0a6ce4a8b694234e941b5159ff8bd34b9023da2814076163b86f40eed7c9472f81b551452d5ab87004a373c0172ec87ea6ce42ccfa7dbdad66b745496c4873d8019e8c28d6b3"
+
+const signatureEncryptedMessage2Hex = "c24604001102000605024dfd0166000a091033af447ccd759b09bae600a096ec5e63ecf0a403085e10f75cc3bab327663282009f51fad9df457ed8d2b70d8a73c76e0443eac0f377"
+
+const symmetricallyEncryptedCompressedHex = "c32e040903085a357c1a7b5614ed00cc0d1d92f428162058b3f558a0fb0980d221ebac6c97d5eda4e0fe32f6e706e94dd263012d6ca1ef8c4bbd324098225e603a10c85ebf09cbf7b5aeeb5ce46381a52edc51038b76a8454483be74e6dcd1e50d5689a8ae7eceaeefed98a0023d49b22eb1f65c2aa1ef1783bb5e1995713b0457102ec3c3075fe871267ffa4b686ad5d52000d857"
+
+const dsaTestKeyHex = "9901a2044d6c49de110400cb5ce438cf9250907ac2ba5bf6547931270b89f7c4b53d9d09f4d0213a5ef2ec1f26806d3d259960f872a4a102ef1581ea3f6d6882d15134f21ef6a84de933cc34c47cc9106efe3bd84c6aec12e78523661e29bc1a61f0aab17fa58a627fd5fd33f5149153fbe8cd70edf3d963bc287ef875270ff14b5bfdd1bca4483793923b00a0fe46d76cb6e4cbdc568435cd5480af3266d610d303fe33ae8273f30a96d4d34f42fa28ce1112d425b2e3bf7ea553d526e2db6b9255e9dc7419045ce817214d1a0056dbc8d5289956a4b1b69f20f1105124096e6a438f41f2e2495923b0f34b70642607d45559595c7fe94d7fa85fc41bf7d68c1fd509ebeaa5f315f6059a446b9369c277597e4f474a9591535354c7e7f4fd98a08aa60400b130c24ff20bdfbf683313f5daebf1c9b34b3bdadfc77f2ddd72ee1fb17e56c473664bc21d66467655dd74b9005e3a2bacce446f1920cd7017231ae447b67036c9b431b8179deacd5120262d894c26bc015bffe3d827ba7087ad9b700d2ca1f6d16cc1786581e5dd065f293c31209300f9b0afcc3f7c08dd26d0a22d87580b4db41054657374204b65792033202844534129886204131102002205024d6c49de021b03060b090807030206150802090a0b0416020301021e01021780000a0910338934250ccc03607e0400a0bdb9193e8a6b96fc2dfc108ae848914b504481f100a09c4dc148cb693293a67af24dd40d2b13a9e36794"
+
+const dsaTestKeyPrivateHex = "9501bb044d6c49de110400cb5ce438cf9250907ac2ba5bf6547931270b89f7c4b53d9d09f4d0213a5ef2ec1f26806d3d259960f872a4a102ef1581ea3f6d6882d15134f21ef6a84de933cc34c47cc9106efe3bd84c6aec12e78523661e29bc1a61f0aab17fa58a627fd5fd33f5149153fbe8cd70edf3d963bc287ef875270ff14b5bfdd1bca4483793923b00a0fe46d76cb6e4cbdc568435cd5480af3266d610d303fe33ae8273f30a96d4d34f42fa28ce1112d425b2e3bf7ea553d526e2db6b9255e9dc7419045ce817214d1a0056dbc8d5289956a4b1b69f20f1105124096e6a438f41f2e2495923b0f34b70642607d45559595c7fe94d7fa85fc41bf7d68c1fd509ebeaa5f315f6059a446b9369c277597e4f474a9591535354c7e7f4fd98a08aa60400b130c24ff20bdfbf683313f5daebf1c9b34b3bdadfc77f2ddd72ee1fb17e56c473664bc21d66467655dd74b9005e3a2bacce446f1920cd7017231ae447b67036c9b431b8179deacd5120262d894c26bc015bffe3d827ba7087ad9b700d2ca1f6d16cc1786581e5dd065f293c31209300f9b0afcc3f7c08dd26d0a22d87580b4d00009f592e0619d823953577d4503061706843317e4fee083db41054657374204b65792033202844534129886204131102002205024d6c49de021b03060b090807030206150802090a0b0416020301021e01021780000a0910338934250ccc03607e0400a0bdb9193e8a6b96fc2dfc108ae848914b504481f100a09c4dc148cb693293a67af24dd40d2b13a9e36794"
+
+const p256TestKeyHex = "98520456e5b83813082a8648ce3d030107020304a2072cd6d21321266c758cc5b83fab0510f751cb8d91897cddb7047d8d6f185546e2107111b0a95cb8ef063c33245502af7a65f004d5919d93ee74eb71a66253b424502d3235362054657374204b6579203c696e76616c6964406578616d706c652e636f6d3e8879041313080021050256e5b838021b03050b09080702061508090a0b020416020301021e01021780000a0910d44a2c495918513e54e50100dfa64f97d9b47766fc1943c6314ba3f2b2a103d71ad286dc5b1efb96a345b0c80100dbc8150b54241f559da6ef4baacea6d31902b4f4b1bdc09b34bf0502334b7754b8560456e5b83812082a8648ce3d030107020304bfe3cea9cee13486f8d518aa487fecab451f25467d2bf08e58f63e5fa525d5482133e6a79299c274b068ef0be448152ad65cf11cf764348588ca4f6a0bcf22b6030108078861041813080009050256e5b838021b0c000a0910d44a2c495918513e4a4800ff49d589fa64024ad30be363a032e3a0e0e6f5db56ba4c73db850518bf0121b8f20100fd78e065f4c70ea5be9df319ea67e493b936fc78da834a71828043d3154af56e"
+
+const p256TestKeyPrivateHex = "94a50456e5b83813082a8648ce3d030107020304a2072cd6d21321266c758cc5b83fab0510f751cb8d91897cddb7047d8d6f185546e2107111b0a95cb8ef063c33245502af7a65f004d5919d93ee74eb71a66253fe070302f0c2bfb0b6c30f87ee1599472b8636477eab23ced13b271886a4b50ed34c9d8436af5af5b8f88921f0efba6ef8c37c459bbb88bc1c6a13bbd25c4ce9b1e97679569ee77645d469bf4b43de637f5561b424502d3235362054657374204b6579203c696e76616c6964406578616d706c652e636f6d3e8879041313080021050256e5b838021b03050b09080702061508090a0b020416020301021e01021780000a0910d44a2c495918513e54e50100dfa64f97d9b47766fc1943c6314ba3f2b2a103d71ad286dc5b1efb96a345b0c80100dbc8150b54241f559da6ef4baacea6d31902b4f4b1bdc09b34bf0502334b77549ca90456e5b83812082a8648ce3d030107020304bfe3cea9cee13486f8d518aa487fecab451f25467d2bf08e58f63e5fa525d5482133e6a79299c274b068ef0be448152ad65cf11cf764348588ca4f6a0bcf22b603010807fe0703027510012471a603cfee2968dce19f732721ddf03e966fd133b4e3c7a685b788705cbc46fb026dc94724b830c9edbaecd2fb2c662f23169516cacd1fe423f0475c364ecc10abcabcfd4bbbda1a36a1bd8861041813080009050256e5b838021b0c000a0910d44a2c495918513e4a4800ff49d589fa64024ad30be363a032e3a0e0e6f5db56ba4c73db850518bf0121b8f20100fd78e065f4c70ea5be9df319ea67e493b936fc78da834a71828043d3154af56e"
+
+const armoredPrivateKeyBlock = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+lQHYBE2rFNoBBADFwqWQIW/DSqcB4yCQqnAFTJ27qS5AnB46ccAdw3u4Greeu3Bp
+idpoHdjULy7zSKlwR1EA873dO/k/e11Ml3dlAFUinWeejWaK2ugFP6JjiieSsrKn
+vWNicdCS4HTWn0X4sjl0ZiAygw6GNhqEQ3cpLeL0g8E9hnYzJKQ0LWJa0QARAQAB
+AAP/TB81EIo2VYNmTq0pK1ZXwUpxCrvAAIG3hwKjEzHcbQznsjNvPUihZ+NZQ6+X
+0HCfPAdPkGDCLCb6NavcSW+iNnLTrdDnSI6+3BbIONqWWdRDYJhqZCkqmG6zqSfL
+IdkJgCw94taUg5BWP/AAeQrhzjChvpMQTVKQL5mnuZbUCeMCAN5qrYMP2S9iKdnk
+VANIFj7656ARKt/nf4CBzxcpHTyB8+d2CtPDKCmlJP6vL8t58Jmih+kHJMvC0dzn
+gr5f5+sCAOOe5gt9e0am7AvQWhdbHVfJU0TQJx+m2OiCJAqGTB1nvtBLHdJnfdC9
+TnXXQ6ZXibqLyBies/xeY2sCKL5qtTMCAKnX9+9d/5yQxRyrQUHt1NYhaXZnJbHx
+q4ytu0eWz+5i68IYUSK69jJ1NWPM0T6SkqpB3KCAIv68VFm9PxqG1KmhSrQIVGVz
+dCBLZXmIuAQTAQIAIgUCTasU2gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AA
+CgkQO9o98PRieSoLhgQAkLEZex02Qt7vGhZzMwuN0R22w3VwyYyjBx+fM3JFETy1
+ut4xcLJoJfIaF5ZS38UplgakHG0FQ+b49i8dMij0aZmDqGxrew1m4kBfjXw9B/v+
+eIqpODryb6cOSwyQFH0lQkXC040pjq9YqDsO5w0WYNXYKDnzRV0p4H1pweo2VDid
+AdgETasU2gEEAN46UPeWRqKHvA99arOxee38fBt2CI08iiWyI8T3J6ivtFGixSqV
+bRcPxYO/qLpVe5l84Nb3X71GfVXlc9hyv7CD6tcowL59hg1E/DC5ydI8K8iEpUmK
+/UnHdIY5h8/kqgGxkY/T/hgp5fRQgW1ZoZxLajVlMRZ8W4tFtT0DeA+JABEBAAEA
+A/0bE1jaaZKj6ndqcw86jd+QtD1SF+Cf21CWRNeLKnUds4FRRvclzTyUMuWPkUeX
+TaNNsUOFqBsf6QQ2oHUBBK4VCHffHCW4ZEX2cd6umz7mpHW6XzN4DECEzOVksXtc
+lUC1j4UB91DC/RNQqwX1IV2QLSwssVotPMPqhOi0ZLNY7wIA3n7DWKInxYZZ4K+6
+rQ+POsz6brEoRHwr8x6XlHenq1Oki855pSa1yXIARoTrSJkBtn5oI+f8AzrnN0BN
+oyeQAwIA/7E++3HDi5aweWrViiul9cd3rcsS0dEnksPhvS0ozCJiHsq/6GFmy7J8
+QSHZPteedBnZyNp5jR+H7cIfVN3KgwH/Skq4PsuPhDq5TKK6i8Pc1WW8MA6DXTdU
+nLkX7RGmMwjC0DBf7KWAlPjFaONAX3a8ndnz//fy1q7u2l9AZwrj1qa1iJ8EGAEC
+AAkFAk2rFNoCGwwACgkQO9o98PRieSo2/QP/WTzr4ioINVsvN1akKuekmEMI3LAp
+BfHwatufxxP1U+3Si/6YIk7kuPB9Hs+pRqCXzbvPRrI8NHZBmc8qIGthishdCYad
+AHcVnXjtxrULkQFGbGvhKURLvS9WnzD/m1K2zzwxzkPTzT9/Yf06O6Mal5AdugPL
+VrM0m72/jnpKo04=
+=zNCn
+-----END PGP PRIVATE KEY BLOCK-----`
+
+const e2ePublicKey = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+Charset: UTF-8
+
+xv8AAABSBAAAAAATCCqGSM49AwEHAgME1LRoXSpOxtHXDUdmuvzchyg6005qIBJ4
+sfaSxX7QgH9RV2ONUhC+WiayCNADq+UMzuR/vunSr4aQffXvuGnR383/AAAAFDxk
+Z2lsQHlhaG9vLWluYy5jb20+wv8AAACGBBATCAA4/wAAAAWCVGvAG/8AAAACiwn/
+AAAACZC2VkQCOjdvYf8AAAAFlQgJCgv/AAAAA5YBAv8AAAACngEAAE1BAP0X8veD
+24IjmI5/C6ZAfVNXxgZZFhTAACFX75jUA3oD6AEAzoSwKf1aqH6oq62qhCN/pekX
++WAsVMBhNwzLpqtCRjLO/wAAAFYEAAAAABIIKoZIzj0DAQcCAwT50ain7vXiIRv8
+B1DO3x3cE/aattZ5sHNixJzRCXi2vQIA5QmOxZ6b5jjUekNbdHG3SZi1a2Ak5mfX
+fRxC/5VGAwEIB8L/AAAAZQQYEwgAGP8AAAAFglRrwBz/AAAACZC2VkQCOjdvYQAA
+FJAA9isX3xtGyMLYwp2F3nXm7QEdY5bq5VUcD/RJlj792VwA/1wH0pCzVLl4Q9F9
+ex7En5r7rHR5xwX82Msc+Rq9dSyO
+=7MrZ
+-----END PGP PUBLIC KEY BLOCK-----`
+
+const dsaKeyWithSHA512 = `9901a2044f04b07f110400db244efecc7316553ee08d179972aab87bb1214de7692593fcf5b6feb1c80fba268722dd464748539b85b81d574cd2d7ad0ca2444de4d849b8756bad7768c486c83a824f9bba4af773d11742bdfb4ac3b89ef8cc9452d4aad31a37e4b630d33927bff68e879284a1672659b8b298222fc68f370f3e24dccacc4a862442b9438b00a0ea444a24088dc23e26df7daf8f43cba3bffc4fe703fe3d6cd7fdca199d54ed8ae501c30e3ec7871ea9cdd4cf63cfe6fc82281d70a5b8bb493f922cd99fba5f088935596af087c8d818d5ec4d0b9afa7f070b3d7c1dd32a84fca08d8280b4890c8da1dde334de8e3cad8450eed2a4a4fcc2db7b8e5528b869a74a7f0189e11ef097ef1253582348de072bb07a9fa8ab838e993cef0ee203ff49298723e2d1f549b00559f886cd417a41692ce58d0ac1307dc71d85a8af21b0cf6eaa14baf2922d3a70389bedf17cc514ba0febbd107675a372fe84b90162a9e88b14d4b1c6be855b96b33fb198c46f058568817780435b6936167ebb3724b680f32bf27382ada2e37a879b3d9de2abe0c3f399350afd1ad438883f4791e2e3b4184453412068617368207472756e636174696f6e207465737488620413110a002205024f04b07f021b03060b090807030206150802090a0b0416020301021e01021780000a0910ef20e0cefca131581318009e2bf3bf047a44d75a9bacd00161ee04d435522397009a03a60d51bd8a568c6c021c8d7cf1be8d990d6417b0020003`
+
+const unknownHashFunctionHex = `8a00000040040001990006050253863c24000a09103b4fe6acc0b21f32ffff0101010101010101010101010101010101010101010101010101010101010101010101010101`
+
+const rsaSignatureBadMPIlength = `8a00000040040001030006050253863c24000a09103b4fe6acc0b21f32ffff0101010101010101010101010101010101010101010101010101010101010101010101010101`
+
+const missingHashFunctionHex = `8a00000040040001030006050253863c24000a09103b4fe6acc0b21f32ffff0101010101010101010101010101010101010101010101010101010101010101010101010101`
+
+const campbellQuine = `a0b001000300fcffa0b001000d00f2ff000300fcffa0b001000d00f2ff8270a01c00000500faff8270a01c00000500faff000500faff001400ebff8270a01c00000500faff000500faff001400ebff428821c400001400ebff428821c400001400ebff428821c400001400ebff428821c400001400ebff428821c400000000ffff000000ffff000b00f4ff428821c400000000ffff000000ffff000b00f4ff0233214c40000100feff000233214c40000100feff0000`
+
+const keyV4forVerifyingSignedMessageV3 = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+Comment: GPGTools - https://gpgtools.org
+
+mI0EVfxoFQEEAMBIqmbDfYygcvP6Phr1wr1XI41IF7Qixqybs/foBF8qqblD9gIY
+BKpXjnBOtbkcVOJ0nljd3/sQIfH4E0vQwK5/4YRQSI59eKOqd6Fx+fWQOLG+uu6z
+tewpeCj9LLHvibx/Sc7VWRnrznia6ftrXxJ/wHMezSab3tnGC0YPVdGNABEBAAG0
+JEdvY3J5cHRvIFRlc3QgS2V5IDx0aGVtYXhAZ21haWwuY29tPoi5BBMBCgAjBQJV
+/GgVAhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQeXnQmhdGW9PFVAP+
+K7TU0qX5ArvIONIxh/WAweyOk884c5cE8f+3NOPOOCRGyVy0FId5A7MmD5GOQh4H
+JseOZVEVCqlmngEvtHZb3U1VYtVGE5WZ+6rQhGsMcWP5qaT4soYwMBlSYxgYwQcx
+YhN9qOr292f9j2Y//TTIJmZT4Oa+lMxhWdqTfX+qMgG4jQRV/GgVAQQArhFSiij1
+b+hT3dnapbEU+23Z1yTu1DfF6zsxQ4XQWEV3eR8v+8mEDDNcz8oyyF56k6UQ3rXi
+UMTIwRDg4V6SbZmaFbZYCOwp/EmXJ3rfhm7z7yzXj2OFN22luuqbyVhuL7LRdB0M
+pxgmjXb4tTvfgKd26x34S+QqUJ7W6uprY4sAEQEAAYifBBgBCgAJBQJV/GgVAhsM
+AAoJEHl50JoXRlvT7y8D/02ckx4OMkKBZo7viyrBw0MLG92i+DC2bs35PooHR6zz
+786mitjOp5z2QWNLBvxC70S0qVfCIz8jKupO1J6rq6Z8CcbLF3qjm6h1omUBf8Nd
+EfXKD2/2HV6zMKVknnKzIEzauh+eCKS2CeJUSSSryap/QLVAjRnckaES/OsEWhNB
+=RZia
+-----END PGP PUBLIC KEY BLOCK-----
+`
+
+const signedMessageV3 = `-----BEGIN PGP MESSAGE-----
+Comment: GPGTools - https://gpgtools.org
+
+owGbwMvMwMVYWXlhlrhb9GXG03JJDKF/MtxDMjKLFYAoUaEktbhEITe1uDgxPVWP
+q5NhKjMrWAVcC9evD8z/bF/uWNjqtk/X3y5/38XGRQHm/57rrDRYuGnTw597Xqka
+uM3137/hH3Os+Jf2dc0fXOITKwJvXJvecPVs0ta+Vg7ZO1MLn8w58Xx+6L58mbka
+DGHyU9yTueZE8D+QF/Tz28Y78dqtF56R1VPn9Xw4uJqrWYdd7b3vIZ1V6R4Nh05d
+iT57d/OhWwA=
+=hG7R
+-----END PGP MESSAGE-----
+`
+
+// https://mailarchive.ietf.org/arch/msg/openpgp/9SheW_LENE0Kxf7haNllovPyAdY/
+const v5PrivKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+
+lGEFXJH05BYAAAAtCSsGAQQB2kcPAQEHQFhZlVcVVtwf+21xNQPX+ecMJJBL0MPd
+fj75iux+my8QAAAAAAAiAQCHZ1SnSUmWqxEsoI6facIVZQu6mph3cBFzzTvcm5lA
+Ng5ctBhlbW1hLmdvbGRtYW5AZXhhbXBsZS5uZXSIlgUTFggASCIhBRk0e8mHJGQC
+X5nfPsLgAA7ZiEiS4fez6kyUAJFZVptUBQJckfTkAhsDBQsJCAcCAyICAQYVCgkI
+CwIEFgIDAQIeBwIXgAAA9cAA/jiR3yMsZMeEQ40u6uzEoXa6UXeV/S3wwJAXRJy9
+M8s0AP9vuL/7AyTfFXwwzSjDnYmzS0qAhbLDQ643N+MXGBJ2BZxmBVyR9OQSAAAA
+MgorBgEEAZdVAQUBAQdA+nysrzml2UCweAqtpDuncSPlvrcBWKU0yfU0YvYWWAoD
+AQgHAAAAAAAiAP9OdAPppjU1WwpqjIItkxr+VPQRT8Zm/Riw7U3F6v3OiBFHiHoF
+GBYIACwiIQUZNHvJhyRkAl+Z3z7C4AAO2YhIkuH3s+pMlACRWVabVAUCXJH05AIb
+DAAAOSQBAP4BOOIR/sGLNMOfeb5fPs/02QMieoiSjIBnijhob2U5AQC+RtOHCHx7
+TcIYl5/Uyoi+FOvPLcNw4hOv2nwUzSSVAw==
+=IiS2
+-----END PGP PRIVATE KEY BLOCK-----`
+
+// See OpenPGP crypto refresh Section A.3.
+const v6PrivKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+
+xUsGY4d/4xsAAAAg+U2nu0jWCmHlZ3BqZYfQMxmZu52JGggkLq2EVD34laMAGXKB
+exK+cH6NX1hs5hNhIB00TrJmosgv3mg1ditlsLfCsQYfGwoAAABCBYJjh3/jAwsJ
+BwUVCg4IDAIWAAKbAwIeCSIhBssYbE8GCaaX5NUt+mxyKwwfHifBilZwj2Ul7Ce6
+2azJBScJAgcCAAAAAK0oIBA+LX0ifsDm185Ecds2v8lwgyU2kCcUmKfvBXbAf6rh
+RYWzuQOwEn7E/aLwIwRaLsdry0+VcallHhSu4RN6HWaEQsiPlR4zxP/TP7mhfVEe
+7XWPxtnMUMtf15OyA51YBMdLBmOHf+MZAAAAIIaTJINn+eUBXbki+PSAld2nhJh/
+LVmFsS+60WyvXkQ1AE1gCk95TUR3XFeibg/u/tVY6a//1q0NWC1X+yui3O24wpsG
+GBsKAAAALAWCY4d/4wKbDCIhBssYbE8GCaaX5NUt+mxyKwwfHifBilZwj2Ul7Ce6
+2azJAAAAAAQBIKbpGG2dWTX8j+VjFM21J0hqWlEg+bdiojWnKfA5AQpWUWtnNwDE
+M0g12vYxoWM8Y81W+bHBw805I8kWVkXU6vFOi+HWvv/ira7ofJu16NnoUkhclkUr
+k0mXubZvyl4GBg==
+-----END PGP PRIVATE KEY BLOCK-----`
+
+// See OpenPGP crypto refresh merge request:
+// https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/304
+const v6PrivKeyMsg = `-----BEGIN PGP MESSAGE-----
+
+wV0GIQYSyD8ecG9jCP4VGkF3Q6HwM3kOk+mXhIjR2zeNqZMIhRmHzxjV8bU/gXzO
+WgBM85PMiVi93AZfJfhK9QmxfdNnZBjeo1VDeVZheQHgaVf7yopqR6W1FT6NOrfS
+aQIHAgZhZBZTW+CwcW1g4FKlbExAf56zaw76/prQoN+bAzxpohup69LA7JW/Vp0l
+yZnuSj3hcFj0DfqLTGgr4/u717J+sPWbtQBfgMfG9AOIwwrUBqsFE9zW+f1zdlYo
+bhF30A+IitsxxA==
+-----END PGP MESSAGE-----`
+
+// See OpenPGP crypto refresh merge request:
+// https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/305
+const v6PrivKeyInlineSignMsg = `-----BEGIN PGP MESSAGE-----
+
+wV0GIQYSyD8ecG9jCP4VGkF3Q6HwM3kOk+mXhIjR2zeNqZMIhRmHzxjV8bU/gXzO
+WgBM85PMiVi93AZfJfhK9QmxfdNnZBjeo1VDeVZheQHgaVf7yopqR6W1FT6NOrfS
+aQIHAgZhZBZTW+CwcW1g4FKlbExAf56zaw76/prQoN+bAzxpohup69LA7JW/Vp0l
+yZnuSj3hcFj0DfqLTGgr4/u717J+sPWbtQBfgMfG9AOIwwrUBqsFE9zW+f1zdlYo
+bhF30A+IitsxxA==
+-----END PGP MESSAGE-----`
+
+// See https://gitlab.com/openpgp-wg/rfc4880bis/-/merge_requests/274
+// decryption password: "correct horse battery staple"
+const v6ArgonSealedPrivKey = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+
+xYIGY4d/4xsAAAAg+U2nu0jWCmHlZ3BqZYfQMxmZu52JGggkLq2EVD34laP9JgkC
+FARdb9ccngltHraRe25uHuyuAQQVtKipJ0+r5jL4dacGWSAheCWPpITYiyfyIOPS
+3gIDyg8f7strd1OB4+LZsUhcIjOMpVHgmiY/IutJkulneoBYwrEGHxsKAAAAQgWC
+Y4d/4wMLCQcFFQoOCAwCFgACmwMCHgkiIQbLGGxPBgmml+TVLfpscisMHx4nwYpW
+cI9lJewnutmsyQUnCQIHAgAAAACtKCAQPi19In7A5tfORHHbNr/JcIMlNpAnFJin
+7wV2wH+q4UWFs7kDsBJ+xP2i8CMEWi7Ha8tPlXGpZR4UruETeh1mhELIj5UeM8T/
+0z+5oX1RHu11j8bZzFDLX9eTsgOdWATHggZjh3/jGQAAACCGkySDZ/nlAV25Ivj0
+gJXdp4SYfy1ZhbEvutFsr15ENf0mCQIUBA5hhGgp2oaavg6mFUXcFMwBBBUuE8qf
+9Ock+xwusd+GAglBr5LVyr/lup3xxQvHXFSjjA2haXfoN6xUGRdDEHI6+uevKjVR
+v5oAxgu7eJpaXNjCmwYYGwoAAAAsBYJjh3/jApsMIiEGyxhsTwYJppfk1S36bHIr
+DB8eJ8GKVnCPZSXsJ7rZrMkAAAAABAEgpukYbZ1ZNfyP5WMUzbUnSGpaUSD5t2Ki
+Nacp8DkBClZRa2c3AMQzSDXa9jGhYzxjzVb5scHDzTkjyRZWRdTq8U6L4da+/+Kt
+ruh8m7Xo2ehSSFyWRSuTSZe5tm/KXgYG
+-----END PGP PRIVATE KEY BLOCK-----`
+
+const v4Key25519 = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+
+xUkEZB3qzRto01j2k2pwN5ux9w70stPinAdXULLr20CRW7U7h2GSeACch0M+
+qzQg8yjFQ8VBvu3uwgKH9senoHmj72lLSCLTmhFKzQR0ZXN0wogEEBsIAD4F
+gmQd6s0ECwkHCAmQIf45+TuC+xMDFQgKBBYAAgECGQECmwMCHgEWIQSWEzMi
+jJUHvyIbVKIh/jn5O4L7EwAAUhaHNlgudvxARdPPETUzVgjuWi+YIz8w1xIb
+lHQMvIrbe2sGCQIethpWofd0x7DHuv/ciHg+EoxJ/Td6h4pWtIoKx0kEZB3q
+zRm4CyA7quliq7yx08AoOqHTuuCgvpkSdEhpp3pEyejQOgBo0p6ywIiLPllY
+0t+jpNspHpAGfXID6oqjpYuJw3AfVRBlwnQEGBsIACoFgmQd6s0JkCH+Ofk7
+gvsTApsMFiEElhMzIoyVB78iG1SiIf45+TuC+xMAAGgQuN9G73446ykvJ/mL
+sCZ7zGFId2gBd1EnG0FTC4npfOKpck0X8dngByrCxU8LDSfvjsEp/xDAiKsQ
+aU71tdtNBQ==
+=e7jT
+-----END PGP PRIVATE KEY BLOCK-----`
+
+const keyWithExpiredCrossSig = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+xsDNBF2lnPIBDAC5cL9PQoQLTMuhjbYvb4Ncuuo0bfmgPRFywX53jPhoFf4Zg6mv
+/seOXpgecTdOcVttfzC8ycIKrt3aQTiwOG/ctaR4Bk/t6ayNFfdUNxHWk4WCKzdz
+/56fW2O0F23qIRd8UUJp5IIlN4RDdRCtdhVQIAuzvp2oVy/LaS2kxQoKvph/5pQ/
+5whqsyroEWDJoSV0yOb25B/iwk/pLUFoyhDG9bj0kIzDxrEqW+7Ba8nocQlecMF3
+X5KMN5kp2zraLv9dlBBpWW43XktjcCZgMy20SouraVma8Je/ECwUWYUiAZxLIlMv
+9CurEOtxUw6N3RdOtLmYZS9uEnn5y1UkF88o8Nku890uk6BrewFzJyLAx5wRZ4F0
+qV/yq36UWQ0JB/AUGhHVPdFf6pl6eaxBwT5GXvbBUibtf8YI2og5RsgTWtXfU7eb
+SGXrl5ZMpbA6mbfhd0R8aPxWfmDWiIOhBufhMCvUHh1sApMKVZnvIff9/0Dca3wb
+vLIwa3T4CyshfT0AEQEAAc0hQm9iIEJhYmJhZ2UgPGJvYkBvcGVucGdwLmV4YW1w
+bGU+wsEABBMBCgATBYJeO2eVAgsJAxUICgKbAQIeAQAhCRD7/MgqAV5zMBYhBNGm
+bhojsYLJmA94jPv8yCoBXnMwKWUMAJ3FKZfJ2mXvh+GFqgymvK4NoKkDRPB0CbUN
+aDdG7ZOizQrWXo7Da2MYIZ6eZUDqBKLdhZ5gZfVnisDfu/yeCgpENaKib1MPHpA8
+nZQjnPejbBDomNqY8HRzr5jvXNlwywBpjWGtegCKUY9xbSynjbfzIlMrWL4S+Rfl
++bOOQKRyYJWXmECmVyqY8cz2VUYmETjNcwC8VCDUxQnhtcCJ7Aej22hfYwVEPb/J
+BsJBPq8WECCiGfJ9Y2y6TF+62KzG9Kfs5hqUeHhQy8V4TSi479ewwL7DH86XmIIK
+chSANBS+7iyMtctjNZfmF9zYdGJFvjI/mbBR/lK66E515Inuf75XnL8hqlXuwqvG
+ni+i03Aet1DzULZEIio4uIU6ioc1lGO9h7K2Xn4S7QQH1QoISNMWqXibUR0RCGjw
+FsEDTt2QwJl8XXxoJCooM7BCcCQo+rMNVUHDjIwrdoQjPld3YZsUQQRcqH6bLuln
+cfn5ufl8zTGWKydoj/iTz8KcjZ7w187AzQRdpZzyAQwA1jC/XGxjK6ddgrRfW9j+
+s/U00++EvIsgTs2kr3Rg0GP7FLWV0YNtR1mpl55/bEl7yAxCDTkOgPUMXcaKlnQh
+6zrlt6H53mF6Bvs3inOHQvOsGtU0dqvb1vkTF0juLiJgPlM7pWv+pNQ6IA39vKoQ
+sTMBv4v5vYNXP9GgKbg8inUNT17BxzZYHfw5+q63ectgDm2on1e8CIRCZ76oBVwz
+dkVxoy3gjh1eENlk2D4P0uJNZzF1Q8GV67yLANGMCDICE/OkWn6daipYDzW4iJQt
+YPUWP4hWhjdm+CK+hg6IQUEn2Vtvi16D2blRP8BpUNNa4fNuylWVuJV76rIHvsLZ
+1pbM3LHpRgE8s6jivS3Rz3WRs0TmWCNnvHPqWizQ3VTy+r3UQVJ5AmhJDrZdZq9i
+aUIuZ01PoE1+CHiJwuxPtWvVAxf2POcm1M/F1fK1J0e+lKlQuyonTXqXR22Y41wr
+fP2aPk3nPSTW2DUAf3vRMZg57ZpRxLEhEMxcM4/LMR+PABEBAAHCwrIEGAEKAAkF
+gl8sAVYCmwIB3QkQ+/zIKgFeczDA+qAEGQEKAAwFgl47Z5UFgwB4TOAAIQkQfC+q
+Tfk8N7IWIQQd3OFfCSF87i87N2B8L6pN+Tw3st58C/0exp0X2U4LqicSHEOSqHZj
+jiysdqIELHGyo5DSPv92UFPp36aqjF9OFgtNNwSa56fmAVCD4+hor/fKARRIeIjF
+qdIC5Y/9a4B10NQFJa5lsvB38x/d39LI2kEoglZnqWgdJskROo3vNQF4KlIcm6FH
+dn4WI8UkC5oUUcrpZVMSKoacIaxLwqnXT42nIVgYYuqrd/ZagZZjG5WlrTOd5+NI
+zi/l0fWProcPHGLjmAh4Thu8i7omtVw1nQaMnq9I77ffg3cPDgXknYrLL+q8xXh/
+0mEJyIhnmPwllWCSZuLv9DrD5pOexFfdlwXhf6cLzNpW6QhXD/Tf5KrqIPr9aOv8
+9xaEEXWh0vEby2kIsI2++ft+vfdIyxYw/wKqx0awTSnuBV1rG3z1dswX4BfoY66x
+Bz3KOVqlz9+mG/FTRQwrgPvR+qgLCHbuotxoGN7fzW+PI75hQG5JQAqhsC9sHjQH
+UrI21/VUNwzfw3v5pYsWuFb5bdQ3ASJetICQiMy7IW8WIQTRpm4aI7GCyZgPeIz7
+/MgqAV5zMG6/C/wLpPl/9e6Hf5wmXIUwpZNQbNZvpiCcyx9sXsHXaycOQVxn3McZ
+nYOUP9/mobl1tIeDQyTNbkxWjU0zzJl8XQsDZerb5098pg+x7oGIL7M1vn5s5JMl
+owROourqF88JEtOBxLMxlAM7X4hB48xKQ3Hu9hS1GdnqLKki4MqRGl4l5FUwyGOM
+GjyS3TzkfiDJNwQxybQiC9n57ij20ieNyLfuWCMLcNNnZUgZtnF6wCctoq/0ZIWu
+a7nvuA/XC2WW9YjEJJiWdy5109pqac+qWiY11HWy/nms4gpMdxVpT0RhrKGWq4o0
+M5q3ZElOoeN70UO3OSbU5EVrG7gB1GuwF9mTHUVlV0veSTw0axkta3FGT//XfSpD
+lRrCkyLzwq0M+UUHQAuYpAfobDlDdnxxOD2jm5GyTzak3GSVFfjW09QFVO6HlGp5
+01/jtzkUiS6nwoHHkfnyn0beZuR8X6KlcrzLB0VFgQFLmkSM9cSOgYhD0PTu9aHb
+hW1Hj9AO8lzggBQ=
+=Nt+N
+-----END PGP PUBLIC KEY BLOCK-----
+`
+
+const sigFromKeyWithExpiredCrossSig = `-----BEGIN PGP SIGNATURE-----
+
+wsDzBAABCgAGBYJfLAFsACEJEHwvqk35PDeyFiEEHdzhXwkhfO4vOzdgfC+qTfk8
+N7KiqwwAts4QGB7v9bABCC2qkTxJhmStC0wQMcHRcjL/qAiVnmasQWmvE9KVsdm3
+AaXd8mIx4a37/RRvr9dYrY2eE4uw72cMqPxNja2tvVXkHQvk1oEUqfkvbXs4ypKI
+NyeTWjXNOTZEbg0hbm3nMy+Wv7zgB1CEvAsEboLDJlhGqPcD+X8a6CJGrBGUBUrv
+KVmZr3U6vEzClz3DBLpoddCQseJRhT4YM1nKmBlZ5quh2LFgTSpajv5OsZheqt9y
+EZAPbqmLhDmWRQwGzkWHKceKS7nZ/ox2WK6OS7Ob8ZGZkM64iPo6/EGj5Yc19vQN
+AGiIaPEGszBBWlOpHTPhNm0LB0nMWqqaT87oNYwP8CQuuxDb6rKJ2lffCmZH27Lb
+UbQZcH8J+0UhpeaiadPZxH5ATJAcenmVtVVMLVOFnm+eIlxzov9ntpgGYt8hLdXB
+ITEG9mMgp3TGS9ZzSifMZ8UGtHdp9QdBg8NEVPFzDOMGxpc/Bftav7RRRuPiAER+
+7A5CBid5
+=aQkm
+-----END PGP SIGNATURE-----
+`
+
+const signedMessageWithCriticalNotation = `-----BEGIN PGP MESSAGE-----
+
+owGbwMvMwMH4oOW7S46CznTG09xJDDE3Wl1KUotLuDousDAwcjBYiSmyXL+48d6x
+U1PSGUxcj8IUszKBVMpMaWAAAgEGZpAeh9SKxNyCnFS95PzcytRiBi5OAZjyXXzM
+f8WYLqv7TXP61Sa4rqT12CI3xaN73YS2pt089f96odCKaEPnWJ3iSGmzJaW/ug10
+2Zo8Wj2k4s7t8wt4H3HtTu+y5UZfV3VOO+l//sdE/o+Lsub8FZH7/eOq7OnbNp4n
+vwjE8mqJXetNMfj8r2SCyvkEnlVRYR+/mnge+ib56FdJ8uKtqSxyvgA=
+=fRXs
+-----END PGP MESSAGE-----`
+
+const criticalNotationSigner = `-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mI0EUmEvTgEEANyWtQQMOybQ9JltDqmaX0WnNPJeLILIM36sw6zL0nfTQ5zXSS3+
+fIF6P29lJFxpblWk02PSID5zX/DYU9/zjM2xPO8Oa4xo0cVTOTLj++Ri5mtr//f5
+GLsIXxFrBJhD/ghFsL3Op0GXOeLJ9A5bsOn8th7x6JucNKuaRB6bQbSPABEBAAG0
+JFRlc3QgTWNUZXN0aW5ndG9uIDx0ZXN0QGV4YW1wbGUuY29tPoi5BBMBAgAjBQJS
+YS9OAhsvBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQSmNhOk1uQJQwDAP6
+AgrTyqkRlJVqz2pb46TfbDM2TDF7o9CBnBzIGoxBhlRwpqALz7z2kxBDmwpQa+ki
+Bq3jZN/UosY9y8bhwMAlnrDY9jP1gdCo+H0sD48CdXybblNwaYpwqC8VSpDdTndf
+9j2wE/weihGp/DAdy/2kyBCaiOY1sjhUfJ1GogF49rC4jQRSYS9OAQQA6R/PtBFa
+JaT4jq10yqASk4sqwVMsc6HcifM5lSdxzExFP74naUMMyEsKHP53QxTF0Grqusag
+Qg/ZtgT0CN1HUM152y7ACOdp1giKjpMzOTQClqCoclyvWOFB+L/SwGEIJf7LSCEr
+woBuJifJc8xAVr0XX0JthoW+uP91eTQ3XpsAEQEAAYkBPQQYAQIACQUCUmEvTgIb
+LgCoCRBKY2E6TW5AlJ0gBBkBAgAGBQJSYS9OAAoJEOCE90RsICyXuqIEANmmiRCA
+SF7YK7PvFkieJNwzeK0V3F2lGX+uu6Y3Q/Zxdtwc4xR+me/CSBmsURyXTO29OWhP
+GLszPH9zSJU9BdDi6v0yNprmFPX/1Ng0Abn/sCkwetvjxC1YIvTLFwtUL/7v6NS2
+bZpsUxRTg9+cSrMWWSNjiY9qUKajm1tuzPDZXAUEAMNmAN3xXN/Kjyvj2OK2ck0X
+W748sl/tc3qiKPMJ+0AkMF7Pjhmh9nxqE9+QCEl7qinFqqBLjuzgUhBU4QlwX1GD
+AtNTq6ihLMD5v1d82ZC7tNatdlDMGWnIdvEMCv2GZcuIqDQ9rXWs49e7tq1NncLY
+hz3tYjKhoFTKEIq3y3Pp
+=h/aX
+-----END PGP PUBLIC KEY BLOCK-----`
+
+const keyv5Test = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+Comment: Bob's OpenPGP Transferable Secret Key
+
+lQVYBF2lnPIBDAC5cL9PQoQLTMuhjbYvb4Ncuuo0bfmgPRFywX53jPhoFf4Zg6mv
+/seOXpgecTdOcVttfzC8ycIKrt3aQTiwOG/ctaR4Bk/t6ayNFfdUNxHWk4WCKzdz
+/56fW2O0F23qIRd8UUJp5IIlN4RDdRCtdhVQIAuzvp2oVy/LaS2kxQoKvph/5pQ/
+5whqsyroEWDJoSV0yOb25B/iwk/pLUFoyhDG9bj0kIzDxrEqW+7Ba8nocQlecMF3
+X5KMN5kp2zraLv9dlBBpWW43XktjcCZgMy20SouraVma8Je/ECwUWYUiAZxLIlMv
+9CurEOtxUw6N3RdOtLmYZS9uEnn5y1UkF88o8Nku890uk6BrewFzJyLAx5wRZ4F0
+qV/yq36UWQ0JB/AUGhHVPdFf6pl6eaxBwT5GXvbBUibtf8YI2og5RsgTWtXfU7eb
+SGXrl5ZMpbA6mbfhd0R8aPxWfmDWiIOhBufhMCvUHh1sApMKVZnvIff9/0Dca3wb
+vLIwa3T4CyshfT0AEQEAAQAL/RZqbJW2IqQDCnJi4Ozm++gPqBPiX1RhTWSjwxfM
+cJKUZfzLj414rMKm6Jh1cwwGY9jekROhB9WmwaaKT8HtcIgrZNAlYzANGRCM4TLK
+3VskxfSwKKna8l+s+mZglqbAjUg3wmFuf9Tj2xcUZYmyRm1DEmcN2ZzpvRtHgX7z
+Wn1mAKUlSDJZSQks0zjuMNbupcpyJokdlkUg2+wBznBOTKzgMxVNC9b2g5/tMPUs
+hGGWmF1UH+7AHMTaS6dlmr2ZBIyogdnfUqdNg5sZwsxSNrbglKP4sqe7X61uEAIQ
+bD7rT3LonLbhkrj3I8wilUD8usIwt5IecoHhd9HziqZjRCc1BUBkboUEoyedbDV4
+i4qfsFZ6CEWoLuD5pW7dEp0M+WeuHXO164Rc+LnH6i1VQrpb1Okl4qO6ejIpIjBI
+1t3GshtUu/mwGBBxs60KBX5g77mFQ9lLCRj8lSYqOsHRKBhUp4qM869VA+fD0BRP
+fqPT0I9IH4Oa/A3jYJcg622GwQYA1LhnP208Waf6PkQSJ6kyr8ymY1yVh9VBE/g6
+fRDYA+pkqKnw9wfH2Qho3ysAA+OmVOX8Hldg+Pc0Zs0e5pCavb0En8iFLvTA0Q2E
+LR5rLue9uD7aFuKFU/VdcddY9Ww/vo4k5p/tVGp7F8RYCFn9rSjIWbfvvZi1q5Tx
++akoZbga+4qQ4WYzB/obdX6SCmi6BndcQ1QdjCCQU6gpYx0MddVERbIp9+2SXDyL
+hpxjSyz+RGsZi/9UAshT4txP4+MZBgDfK3ZqtW+h2/eMRxkANqOJpxSjMyLO/FXN
+WxzTDYeWtHNYiAlOwlQZEPOydZFty9IVzzNFQCIUCGjQ/nNyhw7adSgUk3+BXEx/
+MyJPYY0BYuhLxLYcrfQ9nrhaVKxRJj25SVHj2ASsiwGJRZW4CC3uw40OYxfKEvNC
+mer/VxM3kg8qqGf9KUzJ1dVdAvjyx2Hz6jY2qWCyRQ6IMjWHyd43C4r3jxooYKUC
+YnstRQyb/gCSKahveSEjo07CiXMr88UGALwzEr3npFAsPW3osGaFLj49y1oRe11E
+he9gCHFm+fuzbXrWmdPjYU5/ZdqdojzDqfu4ThfnipknpVUM1o6MQqkjM896FHm8
+zbKVFSMhEP6DPHSCexMFrrSgN03PdwHTO6iBaIBBFqmGY01tmJ03SxvSpiBPON9P
+NVvy/6UZFedTq8A07OUAxO62YUSNtT5pmK2vzs3SAZJmbFbMh+NN204TRI72GlqT
+t5hcfkuv8hrmwPS/ZR6q312mKQ6w/1pqO9qitCFCb2IgQmFiYmFnZSA8Ym9iQG9w
+ZW5wZ3AuZXhhbXBsZT6JAc4EEwEKADgCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgEC
+F4AWIQTRpm4aI7GCyZgPeIz7/MgqAV5zMAUCXaWe+gAKCRD7/MgqAV5zMG9sC/9U
+2T3RrqEbw533FPNfEflhEVRIZ8gDXKM8hU6cqqEzCmzZT6xYTe6sv4y+PJBGXJFX
+yhj0g6FDkSyboM5litOcTupURObVqMgA/Y4UKERznm4fzzH9qek85c4ljtLyNufe
+doL2pp3vkGtn7eD0QFRaLLmnxPKQ/TlZKdLE1G3u8Uot8QHicaR6GnAdc5UXQJE3
+BiV7jZuDyWmZ1cUNwJkKL6oRtp+ZNDOQCrLNLecKHcgCqrpjSQG5oouba1I1Q6Vl
+sP44dhA1nkmLHtxlTOzpeHj4jnk1FaXmyasurrrI5CgU/L2Oi39DGKTH/A/cywDN
+4ZplIQ9zR8enkbXquUZvFDe+Xz+6xRXtb5MwQyWODB3nHw85HocLwRoIN9WdQEI+
+L8a/56AuOwhs8llkSuiITjR7r9SgKJC2WlAHl7E8lhJ3VDW3ELC56KH308d6mwOG
+ZRAqIAKzM1T5FGjMBhq7ZV0eqdEntBh3EcOIfj2M8rg1MzJv+0mHZOIjByawikad
+BVgEXaWc8gEMANYwv1xsYyunXYK0X1vY/rP1NNPvhLyLIE7NpK90YNBj+xS1ldGD
+bUdZqZeef2xJe8gMQg05DoD1DF3GipZ0Ies65beh+d5hegb7N4pzh0LzrBrVNHar
+29b5ExdI7i4iYD5TO6Vr/qTUOiAN/byqELEzAb+L+b2DVz/RoCm4PIp1DU9ewcc2
+WB38Ofqut3nLYA5tqJ9XvAiEQme+qAVcM3ZFcaMt4I4dXhDZZNg+D9LiTWcxdUPB
+leu8iwDRjAgyAhPzpFp+nWoqWA81uIiULWD1Fj+IVoY3ZvgivoYOiEFBJ9lbb4te
+g9m5UT/AaVDTWuHzbspVlbiVe+qyB77C2daWzNyx6UYBPLOo4r0t0c91kbNE5lgj
+Z7xz6los0N1U8vq91EFSeQJoSQ62XWavYmlCLmdNT6BNfgh4icLsT7Vr1QMX9jzn
+JtTPxdXytSdHvpSpULsqJ016l0dtmONcK3z9mj5N5z0k1tg1AH970TGYOe2aUcSx
+IRDMXDOPyzEfjwARAQABAAv9F2CwsjS+Sjh1M1vegJbZjei4gF1HHpEM0K0PSXsp
+SfVvpR4AoSJ4He6CXSMWg0ot8XKtDuZoV9jnJaES5UL9pMAD7JwIOqZm/DYVJM5h
+OASCh1c356/wSbFbzRHPtUdZO9Q30WFNJM5pHbCJPjtNoRmRGkf71RxtvHBzy7np
+Ga+W6U/NVKHw0i0CYwMI0YlKDakYW3Pm+QL+gHZFvngGweTod0f9l2VLLAmeQR/c
++EZs7lNumhuZ8mXcwhUc9JQIhOkpO+wreDysEFkAcsKbkQP3UDUsA1gFx9pbMzT0
+tr1oZq2a4QBtxShHzP/ph7KLpN+6qtjks3xB/yjTgaGmtrwM8tSe0wD1RwXS+/1o
+BHpXTnQ7TfeOGUAu4KCoOQLv6ELpKWbRBLWuiPwMdbGpvVFALO8+kvKAg9/r+/ny
+zM2GQHY+J3Jh5JxPiJnHfXNZjIKLbFbIPdSKNyJBuazXW8xIa//mEHMI5OcvsZBK
+clAIp7LXzjEjKXIwHwDcTn9pBgDpdOKTHOtJ3JUKx0rWVsDH6wq6iKV/FTVSY5jl
+zN+puOEsskF1Lfxn9JsJihAVO3yNsp6RvkKtyNlFazaCVKtDAmkjoh60XNxcNRqr
+gCnwdpbgdHP6v/hvZY54ZaJjz6L2e8unNEkYLxDt8cmAyGPgH2XgL7giHIp9jrsQ
+aS381gnYwNX6wE1aEikgtY91nqJjwPlibF9avSyYQoMtEqM/1UjTjB2KdD/MitK5
+fP0VpvuXpNYZedmyq4UOMwdkiNMGAOrfmOeT0olgLrTMT5H97Cn3Yxbk13uXHNu/
+ZUZZNe8s+QtuLfUlKAJtLEUutN33TlWQY522FV0m17S+b80xJib3yZVJteVurrh5
+HSWHAM+zghQAvCesg5CLXa2dNMkTCmZKgCBvfDLZuZbjFwnwCI6u/NhOY9egKuUf
+SA/je/RXaT8m5VxLYMxwqQXKApzD87fv0tLPlVIEvjEsaf992tFEFSNPcG1l/jpd
+5AVXw6kKuf85UkJtYR1x2MkQDrqY1QX/XMw00kt8y9kMZUre19aCArcmor+hDhRJ
+E3Gt4QJrD9z/bICESw4b4z2DbgD/Xz9IXsA/r9cKiM1h5QMtXvuhyfVeM01enhxM
+GbOH3gjqqGNKysx0UODGEwr6AV9hAd8RWXMchJLaExK9J5SRawSg671ObAU24SdY
+vMQ9Z4kAQ2+1ReUZzf3ogSMRZtMT+d18gT6L90/y+APZIaoArLPhebIAGq39HLmJ
+26x3z0WAgrpA1kNsjXEXkoiZGPLKIGoe3hqJAbYEGAEKACAWIQTRpm4aI7GCyZgP
+eIz7/MgqAV5zMAUCXaWc8gIbDAAKCRD7/MgqAV5zMOn/C/9ugt+HZIwX308zI+QX
+c5vDLReuzmJ3ieE0DMO/uNSC+K1XEioSIZP91HeZJ2kbT9nn9fuReuoff0T0Dief
+rbwcIQQHFFkrqSp1K3VWmUGp2JrUsXFVdjy/fkBIjTd7c5boWljv/6wAsSfiv2V0
+JSM8EFU6TYXxswGjFVfc6X97tJNeIrXL+mpSmPPqy2bztcCCHkWS5lNLWQw+R7Vg
+71Fe6yBSNVrqC2/imYG2J9zlowjx1XU63Wdgqp2Wxt0l8OmsB/W80S1fRF5G4SDH
+s9HXglXXqPsBRZJYfP+VStm9L5P/sKjCcX6WtZR7yS6G8zj/X767MLK/djANvpPd
+NVniEke6hM3CNBXYPAMhQBMWhCulcoz+0lxi8L34rMN+Dsbma96psdUrn7uLaB91
+6we0CTfF8qqm7BsVAgalon/UUiuMY80U3ueoj3okiSTiHIjD/YtpXSPioC8nMng7
+xqAY9Bwizt4FWgXuLm1a4+So4V9j1TRCXd12Uc2l2RNmgDE=
+=miES
+-----END PGP PRIVATE KEY BLOCK-----
+`
+
+const certv5Test = `-----BEGIN PGP PRIVATE KEY BLOCK-----
+
+lGEFXJH05BYAAAAtCSsGAQQB2kcPAQEHQFhZlVcVVtwf+21xNQPX+ecMJJBL0MPd
+fj75iux+my8QAAAAAAAiAQCHZ1SnSUmWqxEsoI6facIVZQu6mph3cBFzzTvcm5lA
+Ng5ctBhlbW1hLmdvbGRtYW5AZXhhbXBsZS5uZXSIlgUTFggASCIhBRk0e8mHJGQC
+X5nfPsLgAA7ZiEiS4fez6kyUAJFZVptUBQJckfTkAhsDBQsJCAcCAyICAQYVCgkI
+CwIEFgIDAQIeBwIXgAAA9cAA/jiR3yMsZMeEQ40u6uzEoXa6UXeV/S3wwJAXRJy9
+M8s0AP9vuL/7AyTfFXwwzSjDnYmzS0qAhbLDQ643N+MXGBJ2BZxmBVyR9OQSAAAA
+MgorBgEEAZdVAQUBAQdA+nysrzml2UCweAqtpDuncSPlvrcBWKU0yfU0YvYWWAoD
+AQgHAAAAAAAiAP9OdAPppjU1WwpqjIItkxr+VPQRT8Zm/Riw7U3F6v3OiBFHiHoF
+GBYIACwiIQUZNHvJhyRkAl+Z3z7C4AAO2YhIkuH3s+pMlACRWVabVAUCXJH05AIb
+DAAAOSQBAP4BOOIR/sGLNMOfeb5fPs/02QMieoiSjIBnijhob2U5AQC+RtOHCHx7
+TcIYl5/Uyoi+FOvPLcNw4hOv2nwUzSSVAw==
+=IiS2
+-----END PGP PRIVATE KEY BLOCK-----
+`
+
+const msgv5Test = `-----BEGIN PGP MESSAGE-----
+
+wcDMA3wvqk35PDeyAQv+PcQiLsoYTH30nJYQh3j3cJaO2+jErtVCrIQRIU0+
+rmgMddERYST4A9mA0DQIiTI4FQ0Lp440D3BWCgpq3LlNWewGzduaWwym5rN6
+cwHz5ccDqOcqbd9X0GXXGy/ZH/ljSgzuVMIytMAXKdF/vrRrVgH/+I7cxvm9
+HwnhjMN5dF0j4aEt996H2T7cbtzSr2GN9SWGW8Gyu7I8Zx73hgrGUI7gDiJB
+Afaff+P6hfkkHSGOItr94dde8J/7AUF4VEwwxdVVPvsNEFyvv6gRIbYtOCa2
+6RE6h1V/QTxW2O7zZgzWALrE2ui0oaYr9QuqQSssd9CdgExLfdPbI+3/ZAnE
+v31Idzpk3/6ILiakYHtXkElPXvf46mCNpobty8ysT34irF+fy3C1p3oGwAsx
+5VDV9OSFU6z5U+UPbSPYAy9rkc5ZssuIKxCER2oTvZ2L8Q5cfUvEUiJtRGGn
+CJlHrVDdp3FssKv2tlKgLkvxJLyoOjuEkj44H1qRk+D02FzmmUT/0sAHAYYx
+lTir6mjHeLpcGjn4waUuWIAJyph8SxUexP60bic0L0NBa6Qp5SxxijKsPIDb
+FPHxWwfJSDZRrgUyYT7089YFB/ZM4FHyH9TZcnxn0f0xIB7NS6YNDsxzN2zT
+EVEYf+De4qT/dQTsdww78Chtcv9JY9r2kDm77dk2MUGHL2j7n8jasbLtgA7h
+pn2DMIWLrGamMLWRmlwslolKr1sMV5x8w+5Ias6C33iBMl9phkg42an0gYmc
+byVJHvLO/XErtC+GNIJeMg==
+=liRq
+-----END PGP MESSAGE-----
+`
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go
new file mode 100644
index 000000000..6871b84fc
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k.go
@@ -0,0 +1,436 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package s2k implements the various OpenPGP string-to-key transforms as
+// specified in RFC 4800 section 3.7.1, and Argon2 specified in
+// draft-ietf-openpgp-crypto-refresh-08 section 3.7.1.4.
+package s2k // import "github.com/ProtonMail/go-crypto/openpgp/s2k"
+
+import (
+ "crypto"
+ "hash"
+ "io"
+ "strconv"
+
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+ "golang.org/x/crypto/argon2"
+)
+
+type Mode uint8
+
+// Defines the default S2KMode constants
+//
+// 0 (simple), 1(salted), 3(iterated), 4(argon2)
+const (
+ SimpleS2K Mode = 0
+ SaltedS2K Mode = 1
+ IteratedSaltedS2K Mode = 3
+ Argon2S2K Mode = 4
+ GnuS2K Mode = 101
+)
+
+const Argon2SaltSize int = 16
+
+// Params contains all the parameters of the s2k packet
+type Params struct {
+ // mode is the mode of s2k function.
+ // It can be 0 (simple), 1(salted), 3(iterated)
+ // 2(reserved) 100-110(private/experimental).
+ mode Mode
+ // hashId is the ID of the hash function used in any of the modes
+ hashId byte
+ // salt is a byte array to use as a salt in hashing process or argon2
+ saltBytes [Argon2SaltSize]byte
+ // countByte is used to determine how many rounds of hashing are to
+ // be performed in s2k mode 3. See RFC 4880 Section 3.7.1.3.
+ countByte byte
+ // passes is a parameter in Argon2 to determine the number of iterations
+ // See RFC the crypto refresh Section 3.7.1.4.
+ passes byte
+ // parallelism is a parameter in Argon2 to determine the degree of paralellism
+ // See RFC the crypto refresh Section 3.7.1.4.
+ parallelism byte
+ // memoryExp is a parameter in Argon2 to determine the memory usage
+ // i.e., 2 ** memoryExp kibibytes
+ // See RFC the crypto refresh Section 3.7.1.4.
+ memoryExp byte
+}
+
+// encodeCount converts an iterative "count" in the range 1024 to
+// 65011712, inclusive, to an encoded count. The return value is the
+// octet that is actually stored in the GPG file. encodeCount panics
+// if i is not in the above range (encodedCount above takes care to
+// pass i in the correct range). See RFC 4880 Section 3.7.7.1.
+func encodeCount(i int) uint8 {
+ if i < 65536 || i > 65011712 {
+ panic("count arg i outside the required range")
+ }
+
+ for encoded := 96; encoded < 256; encoded++ {
+ count := decodeCount(uint8(encoded))
+ if count >= i {
+ return uint8(encoded)
+ }
+ }
+
+ return 255
+}
+
+// decodeCount returns the s2k mode 3 iterative "count" corresponding to
+// the encoded octet c.
+func decodeCount(c uint8) int {
+ return (16 + int(c&15)) << (uint32(c>>4) + 6)
+}
+
+// encodeMemory converts the Argon2 "memory" in the range parallelism*8 to
+// 2**31, inclusive, to an encoded memory. The return value is the
+// octet that is actually stored in the GPG file. encodeMemory panics
+// if is not in the above range
+// See OpenPGP crypto refresh Section 3.7.1.4.
+func encodeMemory(memory uint32, parallelism uint8) uint8 {
+ if memory < (8*uint32(parallelism)) || memory > uint32(2147483648) {
+ panic("Memory argument memory is outside the required range")
+ }
+
+ for exp := 3; exp < 31; exp++ {
+ compare := decodeMemory(uint8(exp))
+ if compare >= memory {
+ return uint8(exp)
+ }
+ }
+
+ return 31
+}
+
+// decodeMemory computes the decoded memory in kibibytes as 2**memoryExponent
+func decodeMemory(memoryExponent uint8) uint32 {
+ return uint32(1) << memoryExponent
+}
+
+// Simple writes to out the result of computing the Simple S2K function (RFC
+// 4880, section 3.7.1.1) using the given hash and input passphrase.
+func Simple(out []byte, h hash.Hash, in []byte) {
+ Salted(out, h, in, nil)
+}
+
+var zero [1]byte
+
+// Salted writes to out the result of computing the Salted S2K function (RFC
+// 4880, section 3.7.1.2) using the given hash, input passphrase and salt.
+func Salted(out []byte, h hash.Hash, in []byte, salt []byte) {
+ done := 0
+ var digest []byte
+
+ for i := 0; done < len(out); i++ {
+ h.Reset()
+ for j := 0; j < i; j++ {
+ h.Write(zero[:])
+ }
+ h.Write(salt)
+ h.Write(in)
+ digest = h.Sum(digest[:0])
+ n := copy(out[done:], digest)
+ done += n
+ }
+}
+
+// Iterated writes to out the result of computing the Iterated and Salted S2K
+// function (RFC 4880, section 3.7.1.3) using the given hash, input passphrase,
+// salt and iteration count.
+func Iterated(out []byte, h hash.Hash, in []byte, salt []byte, count int) {
+ combined := make([]byte, len(in)+len(salt))
+ copy(combined, salt)
+ copy(combined[len(salt):], in)
+
+ if count < len(combined) {
+ count = len(combined)
+ }
+
+ done := 0
+ var digest []byte
+ for i := 0; done < len(out); i++ {
+ h.Reset()
+ for j := 0; j < i; j++ {
+ h.Write(zero[:])
+ }
+ written := 0
+ for written < count {
+ if written+len(combined) > count {
+ todo := count - written
+ h.Write(combined[:todo])
+ written = count
+ } else {
+ h.Write(combined)
+ written += len(combined)
+ }
+ }
+ digest = h.Sum(digest[:0])
+ n := copy(out[done:], digest)
+ done += n
+ }
+}
+
+// Argon2 writes to out the key derived from the password (in) with the Argon2
+// function (the crypto refresh, section 3.7.1.4)
+func Argon2(out []byte, in []byte, salt []byte, passes uint8, paralellism uint8, memoryExp uint8) {
+ key := argon2.IDKey(in, salt, uint32(passes), decodeMemory(memoryExp), paralellism, uint32(len(out)))
+ copy(out[:], key)
+}
+
+// Generate generates valid parameters from given configuration.
+// It will enforce the Iterated and Salted or Argon2 S2K method.
+func Generate(rand io.Reader, c *Config) (*Params, error) {
+ var params *Params
+ if c != nil && c.Mode() == Argon2S2K {
+ // handle Argon2 case
+ argonConfig := c.Argon2()
+ params = &Params{
+ mode: Argon2S2K,
+ passes: argonConfig.Passes(),
+ parallelism: argonConfig.Parallelism(),
+ memoryExp: argonConfig.EncodedMemory(),
+ }
+ } else if c != nil && c.PassphraseIsHighEntropy && c.Mode() == SaltedS2K { // Allow SaltedS2K if PassphraseIsHighEntropy
+ hashId, ok := algorithm.HashToHashId(c.hash())
+ if !ok {
+ return nil, errors.UnsupportedError("no such hash")
+ }
+
+ params = &Params{
+ mode: SaltedS2K,
+ hashId: hashId,
+ }
+ } else { // Enforce IteratedSaltedS2K method otherwise
+ hashId, ok := algorithm.HashToHashId(c.hash())
+ if !ok {
+ return nil, errors.UnsupportedError("no such hash")
+ }
+ if c != nil {
+ c.S2KMode = IteratedSaltedS2K
+ }
+ params = &Params{
+ mode: IteratedSaltedS2K,
+ hashId: hashId,
+ countByte: c.EncodedCount(),
+ }
+ }
+ if _, err := io.ReadFull(rand, params.salt()); err != nil {
+ return nil, err
+ }
+ return params, nil
+}
+
+// Parse reads a binary specification for a string-to-key transformation from r
+// and returns a function which performs that transform. If the S2K is a special
+// GNU extension that indicates that the private key is missing, then the error
+// returned is errors.ErrDummyPrivateKey.
+func Parse(r io.Reader) (f func(out, in []byte), err error) {
+ params, err := ParseIntoParams(r)
+ if err != nil {
+ return nil, err
+ }
+
+ return params.Function()
+}
+
+// ParseIntoParams reads a binary specification for a string-to-key
+// transformation from r and returns a struct describing the s2k parameters.
+func ParseIntoParams(r io.Reader) (params *Params, err error) {
+ var buf [Argon2SaltSize + 3]byte
+
+ _, err = io.ReadFull(r, buf[:1])
+ if err != nil {
+ return
+ }
+
+ params = &Params{
+ mode: Mode(buf[0]),
+ }
+
+ switch params.mode {
+ case SimpleS2K:
+ _, err = io.ReadFull(r, buf[:1])
+ if err != nil {
+ return nil, err
+ }
+ params.hashId = buf[0]
+ return params, nil
+ case SaltedS2K:
+ _, err = io.ReadFull(r, buf[:9])
+ if err != nil {
+ return nil, err
+ }
+ params.hashId = buf[0]
+ copy(params.salt(), buf[1:9])
+ return params, nil
+ case IteratedSaltedS2K:
+ _, err = io.ReadFull(r, buf[:10])
+ if err != nil {
+ return nil, err
+ }
+ params.hashId = buf[0]
+ copy(params.salt(), buf[1:9])
+ params.countByte = buf[9]
+ return params, nil
+ case Argon2S2K:
+ _, err = io.ReadFull(r, buf[:Argon2SaltSize+3])
+ if err != nil {
+ return nil, err
+ }
+ copy(params.salt(), buf[:Argon2SaltSize])
+ params.passes = buf[Argon2SaltSize]
+ params.parallelism = buf[Argon2SaltSize+1]
+ params.memoryExp = buf[Argon2SaltSize+2]
+ if err := validateArgon2Params(params); err != nil {
+ return nil, err
+ }
+ return params, nil
+ case GnuS2K:
+ // This is a GNU extension. See
+ // https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=doc/DETAILS;h=fe55ae16ab4e26d8356dc574c9e8bc935e71aef1;hb=23191d7851eae2217ecdac6484349849a24fd94a#l1109
+ if _, err = io.ReadFull(r, buf[:5]); err != nil {
+ return nil, err
+ }
+ params.hashId = buf[0]
+ if buf[1] == 'G' && buf[2] == 'N' && buf[3] == 'U' && buf[4] == 1 {
+ return params, nil
+ }
+ return nil, errors.UnsupportedError("GNU S2K extension")
+ }
+
+ return nil, errors.UnsupportedError("S2K function")
+}
+
+func (params *Params) Mode() Mode {
+ return params.mode
+}
+
+func (params *Params) Dummy() bool {
+ return params != nil && params.mode == GnuS2K
+}
+
+func (params *Params) salt() []byte {
+ switch params.mode {
+ case SaltedS2K, IteratedSaltedS2K:
+ return params.saltBytes[:8]
+ case Argon2S2K:
+ return params.saltBytes[:Argon2SaltSize]
+ default:
+ return nil
+ }
+}
+
+func (params *Params) Function() (f func(out, in []byte), err error) {
+ if params.Dummy() {
+ return nil, errors.ErrDummyPrivateKey("dummy key found")
+ }
+ var hashObj crypto.Hash
+ if params.mode != Argon2S2K {
+ var ok bool
+ hashObj, ok = algorithm.HashIdToHashWithSha1(params.hashId)
+ if !ok {
+ return nil, errors.UnsupportedError("hash for S2K function: " + strconv.Itoa(int(params.hashId)))
+ }
+ if !hashObj.Available() {
+ return nil, errors.UnsupportedError("hash not available: " + strconv.Itoa(int(hashObj)))
+ }
+ }
+
+ switch params.mode {
+ case SimpleS2K:
+ f := func(out, in []byte) {
+ Simple(out, hashObj.New(), in)
+ }
+
+ return f, nil
+ case SaltedS2K:
+ f := func(out, in []byte) {
+ Salted(out, hashObj.New(), in, params.salt())
+ }
+
+ return f, nil
+ case IteratedSaltedS2K:
+ f := func(out, in []byte) {
+ Iterated(out, hashObj.New(), in, params.salt(), decodeCount(params.countByte))
+ }
+
+ return f, nil
+ case Argon2S2K:
+ f := func(out, in []byte) {
+ Argon2(out, in, params.salt(), params.passes, params.parallelism, params.memoryExp)
+ }
+ return f, nil
+ }
+
+ return nil, errors.UnsupportedError("S2K function")
+}
+
+func (params *Params) Serialize(w io.Writer) (err error) {
+ if _, err = w.Write([]byte{uint8(params.mode)}); err != nil {
+ return
+ }
+ if params.mode != Argon2S2K {
+ if _, err = w.Write([]byte{params.hashId}); err != nil {
+ return
+ }
+ }
+ if params.Dummy() {
+ _, err = w.Write(append([]byte("GNU"), 1))
+ return
+ }
+ if params.mode > 0 {
+ if _, err = w.Write(params.salt()); err != nil {
+ return
+ }
+ if params.mode == IteratedSaltedS2K {
+ _, err = w.Write([]byte{params.countByte})
+ }
+ if params.mode == Argon2S2K {
+ _, err = w.Write([]byte{params.passes, params.parallelism, params.memoryExp})
+ }
+ }
+ return
+}
+
+// Serialize salts and stretches the given passphrase and writes the
+// resulting key into key. It also serializes an S2K descriptor to
+// w. The key stretching can be configured with c, which may be
+// nil. In that case, sensible defaults will be used.
+func Serialize(w io.Writer, key []byte, rand io.Reader, passphrase []byte, c *Config) error {
+ params, err := Generate(rand, c)
+ if err != nil {
+ return err
+ }
+ err = params.Serialize(w)
+ if err != nil {
+ return err
+ }
+
+ f, err := params.Function()
+ if err != nil {
+ return err
+ }
+ f(key, passphrase)
+ return nil
+}
+
+// validateArgon2Params checks that the argon2 parameters are valid according to RFC9580.
+func validateArgon2Params(params *Params) error {
+ // The number of passes t and the degree of parallelism p MUST be non-zero.
+ if params.parallelism == 0 {
+ return errors.StructuralError("invalid argon2 params: parallelism is 0")
+ }
+ if params.passes == 0 {
+ return errors.StructuralError("invalid argon2 params: iterations is 0")
+ }
+
+ // The encoded memory size MUST be a value from 3+ceil(log2(p)) to 31,
+ // such that the decoded memory size m is a value from 8*p to 2^31.
+ if params.memoryExp > 31 || decodeMemory(params.memoryExp) < 8*uint32(params.parallelism) {
+ return errors.StructuralError("invalid argon2 params: memory is out of bounds")
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_cache.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_cache.go
new file mode 100644
index 000000000..616e0d12c
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_cache.go
@@ -0,0 +1,26 @@
+package s2k
+
+// Cache stores keys derived with s2k functions from one passphrase
+// to avoid recomputation if multiple items are encrypted with
+// the same parameters.
+type Cache map[Params][]byte
+
+// GetOrComputeDerivedKey tries to retrieve the key
+// for the given s2k parameters from the cache.
+// If there is no hit, it derives the key with the s2k function from the passphrase,
+// updates the cache, and returns the key.
+func (c *Cache) GetOrComputeDerivedKey(passphrase []byte, params *Params, expectedKeySize int) ([]byte, error) {
+ key, found := (*c)[*params]
+ if !found || len(key) != expectedKeySize {
+ var err error
+ derivedKey := make([]byte, expectedKeySize)
+ s2k, err := params.Function()
+ if err != nil {
+ return nil, err
+ }
+ s2k(derivedKey, passphrase)
+ (*c)[*params] = key
+ return derivedKey, nil
+ }
+ return key, nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_config.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_config.go
new file mode 100644
index 000000000..b93db1ab8
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/s2k/s2k_config.go
@@ -0,0 +1,129 @@
+package s2k
+
+import "crypto"
+
+// Config collects configuration parameters for s2k key-stretching
+// transformations. A nil *Config is valid and results in all default
+// values.
+type Config struct {
+ // S2K (String to Key) mode, used for key derivation in the context of secret key encryption
+ // and passphrase-encrypted data. Either s2k.Argon2S2K or s2k.IteratedSaltedS2K may be used.
+ // If the passphrase is a high-entropy key, indicated by setting PassphraseIsHighEntropy to true,
+ // s2k.SaltedS2K can also be used.
+ // Note: Argon2 is the strongest option but not all OpenPGP implementations are compatible with it
+ //(pending standardisation).
+ // 0 (simple), 1(salted), 3(iterated), 4(argon2)
+ // 2(reserved) 100-110(private/experimental).
+ S2KMode Mode
+ // Only relevant if S2KMode is not set to s2k.Argon2S2K.
+ // Hash is the default hash function to be used. If
+ // nil, SHA256 is used.
+ Hash crypto.Hash
+ // Argon2 parameters for S2K (String to Key).
+ // Only relevant if S2KMode is set to s2k.Argon2S2K.
+ // If nil, default parameters are used.
+ // For more details on the choice of parameters, see https://tools.ietf.org/html/rfc9106#section-4.
+ Argon2Config *Argon2Config
+ // Only relevant if S2KMode is set to s2k.IteratedSaltedS2K.
+ // Iteration count for Iterated S2K (String to Key). It
+ // determines the strength of the passphrase stretching when
+ // the said passphrase is hashed to produce a key. S2KCount
+ // should be between 65536 and 65011712, inclusive. If Config
+ // is nil or S2KCount is 0, the value 16777216 used. Not all
+ // values in the above range can be represented. S2KCount will
+ // be rounded up to the next representable value if it cannot
+ // be encoded exactly. When set, it is strongly encrouraged to
+ // use a value that is at least 65536. See RFC 4880 Section
+ // 3.7.1.3.
+ S2KCount int
+ // Indicates whether the passphrase passed by the application is a
+ // high-entropy key (e.g. it's randomly generated or derived from
+ // another passphrase using a strong key derivation function).
+ // When true, allows the S2KMode to be s2k.SaltedS2K.
+ // When the passphrase is not a high-entropy key, using SaltedS2K is
+ // insecure, and not allowed by draft-ietf-openpgp-crypto-refresh-08.
+ PassphraseIsHighEntropy bool
+}
+
+// Argon2Config stores the Argon2 parameters
+// A nil *Argon2Config is valid and results in all default
+type Argon2Config struct {
+ NumberOfPasses uint8
+ DegreeOfParallelism uint8
+ // Memory specifies the desired Argon2 memory usage in kibibytes.
+ // For example memory=64*1024 sets the memory cost to ~64 MB.
+ Memory uint32
+}
+
+func (c *Config) Mode() Mode {
+ if c == nil {
+ return IteratedSaltedS2K
+ }
+ return c.S2KMode
+}
+
+func (c *Config) hash() crypto.Hash {
+ if c == nil || uint(c.Hash) == 0 {
+ return crypto.SHA256
+ }
+
+ return c.Hash
+}
+
+func (c *Config) Argon2() *Argon2Config {
+ if c == nil || c.Argon2Config == nil {
+ return nil
+ }
+ return c.Argon2Config
+}
+
+// EncodedCount get encoded count
+func (c *Config) EncodedCount() uint8 {
+ if c == nil || c.S2KCount == 0 {
+ return 224 // The common case. Corresponding to 16777216
+ }
+
+ i := c.S2KCount
+
+ switch {
+ case i < 65536:
+ i = 65536
+ case i > 65011712:
+ i = 65011712
+ }
+
+ return encodeCount(i)
+}
+
+func (c *Argon2Config) Passes() uint8 {
+ if c == nil || c.NumberOfPasses == 0 {
+ return 3
+ }
+ return c.NumberOfPasses
+}
+
+func (c *Argon2Config) Parallelism() uint8 {
+ if c == nil || c.DegreeOfParallelism == 0 {
+ return 4
+ }
+ return c.DegreeOfParallelism
+}
+
+func (c *Argon2Config) EncodedMemory() uint8 {
+ if c == nil || c.Memory == 0 {
+ return 16 // 64 MiB of RAM
+ }
+
+ memory := c.Memory
+ lowerBound := uint32(c.Parallelism()) * 8
+ upperBound := uint32(2147483648)
+
+ switch {
+ case memory < lowerBound:
+ memory = lowerBound
+ case memory > upperBound:
+ memory = upperBound
+ }
+
+ return encodeMemory(memory, c.Parallelism())
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go
new file mode 100644
index 000000000..b0f6ef7b0
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/write.go
@@ -0,0 +1,620 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package openpgp
+
+import (
+ "crypto"
+ "hash"
+ "io"
+ "strconv"
+ "time"
+
+ "github.com/ProtonMail/go-crypto/openpgp/armor"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ "github.com/ProtonMail/go-crypto/openpgp/internal/algorithm"
+ "github.com/ProtonMail/go-crypto/openpgp/packet"
+)
+
+// DetachSign signs message with the private key from signer (which must
+// already have been decrypted) and writes the signature to w.
+// If config is nil, sensible defaults will be used.
+func DetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {
+ return detachSign(w, signer, message, packet.SigTypeBinary, config)
+}
+
+// ArmoredDetachSign signs message with the private key from signer (which
+// must already have been decrypted) and writes an armored signature to w.
+// If config is nil, sensible defaults will be used.
+func ArmoredDetachSign(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) (err error) {
+ return armoredDetachSign(w, signer, message, packet.SigTypeBinary, config)
+}
+
+// DetachSignText signs message (after canonicalising the line endings) with
+// the private key from signer (which must already have been decrypted) and
+// writes the signature to w.
+// If config is nil, sensible defaults will be used.
+func DetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {
+ return detachSign(w, signer, message, packet.SigTypeText, config)
+}
+
+// ArmoredDetachSignText signs message (after canonicalising the line endings)
+// with the private key from signer (which must already have been decrypted)
+// and writes an armored signature to w.
+// If config is nil, sensible defaults will be used.
+func ArmoredDetachSignText(w io.Writer, signer *Entity, message io.Reader, config *packet.Config) error {
+ return armoredDetachSign(w, signer, message, packet.SigTypeText, config)
+}
+
+func armoredDetachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) {
+ out, err := armor.Encode(w, SignatureType, nil)
+ if err != nil {
+ return
+ }
+ err = detachSign(out, signer, message, sigType, config)
+ if err != nil {
+ return
+ }
+ return out.Close()
+}
+
+func detachSign(w io.Writer, signer *Entity, message io.Reader, sigType packet.SignatureType, config *packet.Config) (err error) {
+ signingKey, ok := signer.SigningKeyById(config.Now(), config.SigningKey())
+ if !ok {
+ return errors.InvalidArgumentError("no valid signing keys")
+ }
+ if signingKey.PrivateKey == nil {
+ return errors.InvalidArgumentError("signing key doesn't have a private key")
+ }
+ if signingKey.PrivateKey.Encrypted {
+ return errors.InvalidArgumentError("signing key is encrypted")
+ }
+ if _, ok := algorithm.HashToHashId(config.Hash()); !ok {
+ return errors.InvalidArgumentError("invalid hash function")
+ }
+
+ sig := createSignaturePacket(signingKey.PublicKey, sigType, config)
+
+ h, err := sig.PrepareSign(config)
+ if err != nil {
+ return
+ }
+ wrappedHash, err := wrapHashForSignature(h, sig.SigType)
+ if err != nil {
+ return
+ }
+ if _, err = io.Copy(wrappedHash, message); err != nil {
+ return err
+ }
+
+ err = sig.Sign(h, signingKey.PrivateKey, config)
+ if err != nil {
+ return
+ }
+
+ return sig.Serialize(w)
+}
+
+// FileHints contains metadata about encrypted files. This metadata is, itself,
+// encrypted.
+type FileHints struct {
+ // IsBinary can be set to hint that the contents are binary data.
+ IsBinary bool
+ // FileName hints at the name of the file that should be written. It's
+ // truncated to 255 bytes if longer. It may be empty to suggest that the
+ // file should not be written to disk. It may be equal to "_CONSOLE" to
+ // suggest the data should not be written to disk.
+ FileName string
+ // ModTime contains the modification time of the file, or the zero time if not applicable.
+ ModTime time.Time
+}
+
+// SymmetricallyEncrypt acts like gpg -c: it encrypts a file with a passphrase.
+// The resulting WriteCloser must be closed after the contents of the file have
+// been written.
+// If config is nil, sensible defaults will be used.
+func SymmetricallyEncrypt(ciphertext io.Writer, passphrase []byte, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
+ if hints == nil {
+ hints = &FileHints{}
+ }
+
+ key, err := packet.SerializeSymmetricKeyEncrypted(ciphertext, passphrase, config)
+ if err != nil {
+ return
+ }
+
+ var w io.WriteCloser
+ cipherSuite := packet.CipherSuite{
+ Cipher: config.Cipher(),
+ Mode: config.AEAD().Mode(),
+ }
+ w, err = packet.SerializeSymmetricallyEncrypted(ciphertext, config.Cipher(), config.AEAD() != nil, cipherSuite, key, config)
+ if err != nil {
+ return
+ }
+
+ literalData := w
+ if algo := config.Compression(); algo != packet.CompressionNone {
+ var compConfig *packet.CompressionConfig
+ if config != nil {
+ compConfig = config.CompressionConfig
+ }
+ literalData, err = packet.SerializeCompressed(w, algo, compConfig)
+ if err != nil {
+ return
+ }
+ }
+
+ var epochSeconds uint32
+ if !hints.ModTime.IsZero() {
+ epochSeconds = uint32(hints.ModTime.Unix())
+ }
+ return packet.SerializeLiteral(literalData, hints.IsBinary, hints.FileName, epochSeconds)
+}
+
+// intersectPreferences mutates and returns a prefix of a that contains only
+// the values in the intersection of a and b. The order of a is preserved.
+func intersectPreferences(a []uint8, b []uint8) (intersection []uint8) {
+ var j int
+ for _, v := range a {
+ for _, v2 := range b {
+ if v == v2 {
+ a[j] = v
+ j++
+ break
+ }
+ }
+ }
+
+ return a[:j]
+}
+
+// intersectPreferences mutates and returns a prefix of a that contains only
+// the values in the intersection of a and b. The order of a is preserved.
+func intersectCipherSuites(a [][2]uint8, b [][2]uint8) (intersection [][2]uint8) {
+ var j int
+ for _, v := range a {
+ for _, v2 := range b {
+ if v[0] == v2[0] && v[1] == v2[1] {
+ a[j] = v
+ j++
+ break
+ }
+ }
+ }
+
+ return a[:j]
+}
+
+func hashToHashId(h crypto.Hash) uint8 {
+ v, ok := algorithm.HashToHashId(h)
+ if !ok {
+ panic("tried to convert unknown hash")
+ }
+ return v
+}
+
+// EncryptText encrypts a message to a number of recipients and, optionally,
+// signs it. Optional information is contained in 'hints', also encrypted, that
+// aids the recipients in processing the message. The resulting WriteCloser
+// must be closed after the contents of the file have been written. If config
+// is nil, sensible defaults will be used. The signing is done in text mode.
+func EncryptText(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
+ return encrypt(ciphertext, ciphertext, to, signed, hints, packet.SigTypeText, config)
+}
+
+// Encrypt encrypts a message to a number of recipients and, optionally, signs
+// it. hints contains optional information, that is also encrypted, that aids
+// the recipients in processing the message. The resulting WriteCloser must
+// be closed after the contents of the file have been written.
+// If config is nil, sensible defaults will be used.
+func Encrypt(ciphertext io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
+ return encrypt(ciphertext, ciphertext, to, signed, hints, packet.SigTypeBinary, config)
+}
+
+// EncryptSplit encrypts a message to a number of recipients and, optionally, signs
+// it. hints contains optional information, that is also encrypted, that aids
+// the recipients in processing the message. The resulting WriteCloser must
+// be closed after the contents of the file have been written.
+// If config is nil, sensible defaults will be used.
+func EncryptSplit(keyWriter io.Writer, dataWriter io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
+ return encrypt(keyWriter, dataWriter, to, signed, hints, packet.SigTypeBinary, config)
+}
+
+// EncryptTextSplit encrypts a message to a number of recipients and, optionally, signs
+// it. hints contains optional information, that is also encrypted, that aids
+// the recipients in processing the message. The resulting WriteCloser must
+// be closed after the contents of the file have been written.
+// If config is nil, sensible defaults will be used.
+func EncryptTextSplit(keyWriter io.Writer, dataWriter io.Writer, to []*Entity, signed *Entity, hints *FileHints, config *packet.Config) (plaintext io.WriteCloser, err error) {
+ return encrypt(keyWriter, dataWriter, to, signed, hints, packet.SigTypeText, config)
+}
+
+// writeAndSign writes the data as a payload package and, optionally, signs
+// it. hints contains optional information, that is also encrypted,
+// that aids the recipients in processing the message. The resulting
+// WriteCloser must be closed after the contents of the file have been
+// written. If config is nil, sensible defaults will be used.
+func writeAndSign(payload io.WriteCloser, candidateHashes []uint8, signed *Entity, hints *FileHints, sigType packet.SignatureType, config *packet.Config) (plaintext io.WriteCloser, err error) {
+ var signer *packet.PrivateKey
+ if signed != nil {
+ signKey, ok := signed.SigningKeyById(config.Now(), config.SigningKey())
+ if !ok {
+ return nil, errors.InvalidArgumentError("no valid signing keys")
+ }
+ signer = signKey.PrivateKey
+ if signer == nil {
+ return nil, errors.InvalidArgumentError("no private key in signing key")
+ }
+ if signer.Encrypted {
+ return nil, errors.InvalidArgumentError("signing key must be decrypted")
+ }
+ }
+
+ var hash crypto.Hash
+ for _, hashId := range candidateHashes {
+ if h, ok := algorithm.HashIdToHash(hashId); ok && h.Available() {
+ hash = h
+ break
+ }
+ }
+
+ // If the hash specified by config is a candidate, we'll use that.
+ if configuredHash := config.Hash(); configuredHash.Available() {
+ for _, hashId := range candidateHashes {
+ if h, ok := algorithm.HashIdToHash(hashId); ok && h == configuredHash {
+ hash = h
+ break
+ }
+ }
+ }
+
+ if hash == 0 {
+ hashId := candidateHashes[0]
+ name, ok := algorithm.HashIdToString(hashId)
+ if !ok {
+ name = "#" + strconv.Itoa(int(hashId))
+ }
+ return nil, errors.InvalidArgumentError("cannot encrypt because no candidate hash functions are compiled in. (Wanted " + name + " in this case.)")
+ }
+
+ var salt []byte
+ if signer != nil {
+ var opsVersion = 3
+ if signer.Version == 6 {
+ opsVersion = signer.Version
+ }
+ ops := &packet.OnePassSignature{
+ Version: opsVersion,
+ SigType: sigType,
+ Hash: hash,
+ PubKeyAlgo: signer.PubKeyAlgo,
+ KeyId: signer.KeyId,
+ IsLast: true,
+ }
+ if opsVersion == 6 {
+ ops.KeyFingerprint = signer.Fingerprint
+ salt, err = packet.SignatureSaltForHash(hash, config.Random())
+ if err != nil {
+ return nil, err
+ }
+ ops.Salt = salt
+ }
+ if err := ops.Serialize(payload); err != nil {
+ return nil, err
+ }
+ }
+
+ if hints == nil {
+ hints = &FileHints{}
+ }
+
+ w := payload
+ if signer != nil {
+ // If we need to write a signature packet after the literal
+ // data then we need to stop literalData from closing
+ // encryptedData.
+ w = noOpCloser{w}
+
+ }
+ var epochSeconds uint32
+ if !hints.ModTime.IsZero() {
+ epochSeconds = uint32(hints.ModTime.Unix())
+ }
+ literalData, err := packet.SerializeLiteral(w, hints.IsBinary, hints.FileName, epochSeconds)
+ if err != nil {
+ return nil, err
+ }
+
+ if signer != nil {
+ h, wrappedHash, err := hashForSignature(hash, sigType, salt)
+ if err != nil {
+ return nil, err
+ }
+ metadata := &packet.LiteralData{
+ Format: 'u',
+ FileName: hints.FileName,
+ Time: epochSeconds,
+ }
+ if hints.IsBinary {
+ metadata.Format = 'b'
+ }
+ return signatureWriter{payload, literalData, hash, wrappedHash, h, salt, signer, sigType, config, metadata}, nil
+ }
+ return literalData, nil
+}
+
+// encrypt encrypts a message to a number of recipients and, optionally, signs
+// it. hints contains optional information, that is also encrypted, that aids
+// the recipients in processing the message. The resulting WriteCloser must
+// be closed after the contents of the file have been written.
+// If config is nil, sensible defaults will be used.
+func encrypt(keyWriter io.Writer, dataWriter io.Writer, to []*Entity, signed *Entity, hints *FileHints, sigType packet.SignatureType, config *packet.Config) (plaintext io.WriteCloser, err error) {
+ if len(to) == 0 {
+ return nil, errors.InvalidArgumentError("no encryption recipient provided")
+ }
+
+ // These are the possible ciphers that we'll use for the message.
+ candidateCiphers := []uint8{
+ uint8(packet.CipherAES256),
+ uint8(packet.CipherAES128),
+ }
+
+ // These are the possible hash functions that we'll use for the signature.
+ candidateHashes := []uint8{
+ hashToHashId(crypto.SHA256),
+ hashToHashId(crypto.SHA384),
+ hashToHashId(crypto.SHA512),
+ hashToHashId(crypto.SHA3_256),
+ hashToHashId(crypto.SHA3_512),
+ }
+
+ // Prefer GCM if everyone supports it
+ candidateCipherSuites := [][2]uint8{
+ {uint8(packet.CipherAES256), uint8(packet.AEADModeGCM)},
+ {uint8(packet.CipherAES256), uint8(packet.AEADModeEAX)},
+ {uint8(packet.CipherAES256), uint8(packet.AEADModeOCB)},
+ {uint8(packet.CipherAES128), uint8(packet.AEADModeGCM)},
+ {uint8(packet.CipherAES128), uint8(packet.AEADModeEAX)},
+ {uint8(packet.CipherAES128), uint8(packet.AEADModeOCB)},
+ }
+
+ candidateCompression := []uint8{
+ uint8(packet.CompressionNone),
+ uint8(packet.CompressionZIP),
+ uint8(packet.CompressionZLIB),
+ }
+
+ encryptKeys := make([]Key, len(to))
+
+ // AEAD is used only if config enables it and every key supports it
+ aeadSupported := config.AEAD() != nil
+
+ for i := range to {
+ var ok bool
+ encryptKeys[i], ok = to[i].EncryptionKey(config.Now())
+ if !ok {
+ return nil, errors.InvalidArgumentError("cannot encrypt a message to key id " + strconv.FormatUint(to[i].PrimaryKey.KeyId, 16) + " because it has no valid encryption keys")
+ }
+
+ primarySelfSignature, _ := to[i].PrimarySelfSignature()
+ if primarySelfSignature == nil {
+ return nil, errors.InvalidArgumentError("entity without a self-signature")
+ }
+
+ if !primarySelfSignature.SEIPDv2 {
+ aeadSupported = false
+ }
+
+ candidateCiphers = intersectPreferences(candidateCiphers, primarySelfSignature.PreferredSymmetric)
+ candidateHashes = intersectPreferences(candidateHashes, primarySelfSignature.PreferredHash)
+ candidateCipherSuites = intersectCipherSuites(candidateCipherSuites, primarySelfSignature.PreferredCipherSuites)
+ candidateCompression = intersectPreferences(candidateCompression, primarySelfSignature.PreferredCompression)
+ }
+
+ // In the event that the intersection of supported algorithms is empty we use the ones
+ // labelled as MUST that every implementation supports.
+ if len(candidateCiphers) == 0 {
+ // https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-9.3
+ candidateCiphers = []uint8{uint8(packet.CipherAES128)}
+ }
+ if len(candidateHashes) == 0 {
+ // https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#hash-algos
+ candidateHashes = []uint8{hashToHashId(crypto.SHA256)}
+ }
+ if len(candidateCipherSuites) == 0 {
+ // https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-9.6
+ candidateCipherSuites = [][2]uint8{{uint8(packet.CipherAES128), uint8(packet.AEADModeOCB)}}
+ }
+
+ cipher := packet.CipherFunction(candidateCiphers[0])
+ aeadCipherSuite := packet.CipherSuite{
+ Cipher: packet.CipherFunction(candidateCipherSuites[0][0]),
+ Mode: packet.AEADMode(candidateCipherSuites[0][1]),
+ }
+
+ // If the cipher specified by config is a candidate, we'll use that.
+ configuredCipher := config.Cipher()
+ for _, c := range candidateCiphers {
+ cipherFunc := packet.CipherFunction(c)
+ if cipherFunc == configuredCipher {
+ cipher = cipherFunc
+ break
+ }
+ }
+
+ var symKey []byte
+ if aeadSupported {
+ symKey = make([]byte, aeadCipherSuite.Cipher.KeySize())
+ } else {
+ symKey = make([]byte, cipher.KeySize())
+ }
+
+ if _, err := io.ReadFull(config.Random(), symKey); err != nil {
+ return nil, err
+ }
+
+ for _, key := range encryptKeys {
+ if err := packet.SerializeEncryptedKeyAEAD(keyWriter, key.PublicKey, cipher, aeadSupported, symKey, config); err != nil {
+ return nil, err
+ }
+ }
+
+ var payload io.WriteCloser
+ payload, err = packet.SerializeSymmetricallyEncrypted(dataWriter, cipher, aeadSupported, aeadCipherSuite, symKey, config)
+ if err != nil {
+ return
+ }
+
+ payload, err = handleCompression(payload, candidateCompression, config)
+ if err != nil {
+ return nil, err
+ }
+
+ return writeAndSign(payload, candidateHashes, signed, hints, sigType, config)
+}
+
+// Sign signs a message. The resulting WriteCloser must be closed after the
+// contents of the file have been written. hints contains optional information
+// that aids the recipients in processing the message.
+// If config is nil, sensible defaults will be used.
+func Sign(output io.Writer, signed *Entity, hints *FileHints, config *packet.Config) (input io.WriteCloser, err error) {
+ if signed == nil {
+ return nil, errors.InvalidArgumentError("no signer provided")
+ }
+
+ // These are the possible hash functions that we'll use for the signature.
+ candidateHashes := []uint8{
+ hashToHashId(crypto.SHA256),
+ hashToHashId(crypto.SHA384),
+ hashToHashId(crypto.SHA512),
+ hashToHashId(crypto.SHA3_256),
+ hashToHashId(crypto.SHA3_512),
+ }
+ defaultHashes := candidateHashes[0:1]
+ primarySelfSignature, _ := signed.PrimarySelfSignature()
+ if primarySelfSignature == nil {
+ return nil, errors.StructuralError("signed entity has no self-signature")
+ }
+ preferredHashes := primarySelfSignature.PreferredHash
+ if len(preferredHashes) == 0 {
+ preferredHashes = defaultHashes
+ }
+ candidateHashes = intersectPreferences(candidateHashes, preferredHashes)
+ if len(candidateHashes) == 0 {
+ return nil, errors.StructuralError("cannot sign because signing key shares no common algorithms with candidate hashes")
+ }
+
+ return writeAndSign(noOpCloser{output}, candidateHashes, signed, hints, packet.SigTypeBinary, config)
+}
+
+// signatureWriter hashes the contents of a message while passing it along to
+// literalData. When closed, it closes literalData, writes a signature packet
+// to encryptedData and then also closes encryptedData.
+type signatureWriter struct {
+ encryptedData io.WriteCloser
+ literalData io.WriteCloser
+ hashType crypto.Hash
+ wrappedHash hash.Hash
+ h hash.Hash
+ salt []byte // v6 only
+ signer *packet.PrivateKey
+ sigType packet.SignatureType
+ config *packet.Config
+ metadata *packet.LiteralData // V5 signatures protect document metadata
+}
+
+func (s signatureWriter) Write(data []byte) (int, error) {
+ s.wrappedHash.Write(data)
+ switch s.sigType {
+ case packet.SigTypeBinary:
+ return s.literalData.Write(data)
+ case packet.SigTypeText:
+ flag := 0
+ return writeCanonical(s.literalData, data, &flag)
+ }
+ return 0, errors.UnsupportedError("unsupported signature type: " + strconv.Itoa(int(s.sigType)))
+}
+
+func (s signatureWriter) Close() error {
+ sig := createSignaturePacket(&s.signer.PublicKey, s.sigType, s.config)
+ sig.Hash = s.hashType
+ sig.Metadata = s.metadata
+
+ if err := sig.SetSalt(s.salt); err != nil {
+ return err
+ }
+
+ if err := sig.Sign(s.h, s.signer, s.config); err != nil {
+ return err
+ }
+ if err := s.literalData.Close(); err != nil {
+ return err
+ }
+ if err := sig.Serialize(s.encryptedData); err != nil {
+ return err
+ }
+ return s.encryptedData.Close()
+}
+
+func createSignaturePacket(signer *packet.PublicKey, sigType packet.SignatureType, config *packet.Config) *packet.Signature {
+ sigLifetimeSecs := config.SigLifetime()
+ return &packet.Signature{
+ Version: signer.Version,
+ SigType: sigType,
+ PubKeyAlgo: signer.PubKeyAlgo,
+ Hash: config.Hash(),
+ CreationTime: config.Now(),
+ IssuerKeyId: &signer.KeyId,
+ IssuerFingerprint: signer.Fingerprint,
+ Notations: config.Notations(),
+ SigLifetimeSecs: &sigLifetimeSecs,
+ }
+}
+
+// noOpCloser is like an ioutil.NopCloser, but for an io.Writer.
+// TODO: we have two of these in OpenPGP packages alone. This probably needs
+// to be promoted somewhere more common.
+type noOpCloser struct {
+ w io.Writer
+}
+
+func (c noOpCloser) Write(data []byte) (n int, err error) {
+ return c.w.Write(data)
+}
+
+func (c noOpCloser) Close() error {
+ return nil
+}
+
+func handleCompression(compressed io.WriteCloser, candidateCompression []uint8, config *packet.Config) (data io.WriteCloser, err error) {
+ data = compressed
+ confAlgo := config.Compression()
+ if confAlgo == packet.CompressionNone {
+ return
+ }
+
+ // Set algorithm labelled as MUST as fallback
+ // https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-07.html#section-9.4
+ finalAlgo := packet.CompressionNone
+ // if compression specified by config available we will use it
+ for _, c := range candidateCompression {
+ if uint8(confAlgo) == c {
+ finalAlgo = confAlgo
+ break
+ }
+ }
+
+ if finalAlgo != packet.CompressionNone {
+ var compConfig *packet.CompressionConfig
+ if config != nil {
+ compConfig = config.CompressionConfig
+ }
+ data, err = packet.SerializeCompressed(compressed, finalAlgo, compConfig)
+ if err != nil {
+ return
+ }
+ }
+ return data, nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/x25519/x25519.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/x25519/x25519.go
new file mode 100644
index 000000000..38afcc74f
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/x25519/x25519.go
@@ -0,0 +1,221 @@
+package x25519
+
+import (
+ "crypto/sha256"
+ "crypto/subtle"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/aes/keywrap"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ x25519lib "github.com/cloudflare/circl/dh/x25519"
+ "golang.org/x/crypto/hkdf"
+)
+
+const (
+ hkdfInfo = "OpenPGP X25519"
+ aes128KeySize = 16
+ // The size of a public or private key in bytes.
+ KeySize = x25519lib.Size
+)
+
+type PublicKey struct {
+ // Point represents the encoded elliptic curve point of the public key.
+ Point []byte
+}
+
+type PrivateKey struct {
+ PublicKey
+ // Secret represents the secret of the private key.
+ Secret []byte
+}
+
+// NewPrivateKey creates a new empty private key including the public key.
+func NewPrivateKey(key PublicKey) *PrivateKey {
+ return &PrivateKey{
+ PublicKey: key,
+ }
+}
+
+// Validate validates that the provided public key matches the private key.
+func Validate(pk *PrivateKey) (err error) {
+ var expectedPublicKey, privateKey x25519lib.Key
+ subtle.ConstantTimeCopy(1, privateKey[:], pk.Secret)
+ x25519lib.KeyGen(&expectedPublicKey, &privateKey)
+ if subtle.ConstantTimeCompare(expectedPublicKey[:], pk.PublicKey.Point) == 0 {
+ return errors.KeyInvalidError("x25519: invalid key")
+ }
+ return nil
+}
+
+// GenerateKey generates a new x25519 key pair.
+func GenerateKey(rand io.Reader) (*PrivateKey, error) {
+ var privateKey, publicKey x25519lib.Key
+ privateKeyOut := new(PrivateKey)
+ err := generateKey(rand, &privateKey, &publicKey)
+ if err != nil {
+ return nil, err
+ }
+ privateKeyOut.PublicKey.Point = publicKey[:]
+ privateKeyOut.Secret = privateKey[:]
+ return privateKeyOut, nil
+}
+
+func generateKey(rand io.Reader, privateKey *x25519lib.Key, publicKey *x25519lib.Key) error {
+ maxRounds := 10
+ isZero := true
+ for round := 0; isZero; round++ {
+ if round == maxRounds {
+ return errors.InvalidArgumentError("x25519: zero keys only, randomness source might be corrupt")
+ }
+ _, err := io.ReadFull(rand, privateKey[:])
+ if err != nil {
+ return err
+ }
+ isZero = constantTimeIsZero(privateKey[:])
+ }
+ x25519lib.KeyGen(publicKey, privateKey)
+ return nil
+}
+
+// Encrypt encrypts a sessionKey with x25519 according to
+// the OpenPGP crypto refresh specification section 5.1.6. The function assumes that the
+// sessionKey has the correct format and padding according to the specification.
+func Encrypt(rand io.Reader, publicKey *PublicKey, sessionKey []byte) (ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, err error) {
+ var ephemeralPrivate, ephemeralPublic, staticPublic, shared x25519lib.Key
+ // Check that the input static public key has 32 bytes
+ if len(publicKey.Point) != KeySize {
+ err = errors.KeyInvalidError("x25519: the public key has the wrong size")
+ return
+ }
+ copy(staticPublic[:], publicKey.Point)
+ // Generate ephemeral keyPair
+ err = generateKey(rand, &ephemeralPrivate, &ephemeralPublic)
+ if err != nil {
+ return
+ }
+ // Compute shared key
+ ok := x25519lib.Shared(&shared, &ephemeralPrivate, &staticPublic)
+ if !ok {
+ err = errors.KeyInvalidError("x25519: the public key is a low order point")
+ return
+ }
+ // Derive the encryption key from the shared secret
+ encryptionKey := applyHKDF(ephemeralPublic[:], publicKey.Point[:], shared[:])
+ ephemeralPublicKey = &PublicKey{
+ Point: ephemeralPublic[:],
+ }
+ // Encrypt the sessionKey with aes key wrapping
+ encryptedSessionKey, err = keywrap.Wrap(encryptionKey, sessionKey)
+ return
+}
+
+// Decrypt decrypts a session key stored in ciphertext with the provided x25519
+// private key and ephemeral public key.
+func Decrypt(privateKey *PrivateKey, ephemeralPublicKey *PublicKey, ciphertext []byte) (encodedSessionKey []byte, err error) {
+ var ephemeralPublic, staticPrivate, shared x25519lib.Key
+ // Check that the input ephemeral public key has 32 bytes
+ if len(ephemeralPublicKey.Point) != KeySize {
+ err = errors.KeyInvalidError("x25519: the public key has the wrong size")
+ return
+ }
+ copy(ephemeralPublic[:], ephemeralPublicKey.Point)
+ subtle.ConstantTimeCopy(1, staticPrivate[:], privateKey.Secret)
+ // Compute shared key
+ ok := x25519lib.Shared(&shared, &staticPrivate, &ephemeralPublic)
+ if !ok {
+ err = errors.KeyInvalidError("x25519: the ephemeral public key is a low order point")
+ return
+ }
+ // Derive the encryption key from the shared secret
+ encryptionKey := applyHKDF(ephemeralPublicKey.Point[:], privateKey.PublicKey.Point[:], shared[:])
+ // Decrypt the session key with aes key wrapping
+ encodedSessionKey, err = keywrap.Unwrap(encryptionKey, ciphertext)
+ return
+}
+
+func applyHKDF(ephemeralPublicKey []byte, publicKey []byte, sharedSecret []byte) []byte {
+ inputKey := make([]byte, 3*KeySize)
+ // ephemeral public key | recipient public key | shared secret
+ subtle.ConstantTimeCopy(1, inputKey[:KeySize], ephemeralPublicKey)
+ subtle.ConstantTimeCopy(1, inputKey[KeySize:2*KeySize], publicKey)
+ subtle.ConstantTimeCopy(1, inputKey[2*KeySize:], sharedSecret)
+ hkdfReader := hkdf.New(sha256.New, inputKey, []byte{}, []byte(hkdfInfo))
+ encryptionKey := make([]byte, aes128KeySize)
+ _, _ = io.ReadFull(hkdfReader, encryptionKey)
+ return encryptionKey
+}
+
+func constantTimeIsZero(bytes []byte) bool {
+ isZero := byte(0)
+ for _, b := range bytes {
+ isZero |= b
+ }
+ return isZero == 0
+}
+
+// ENCODING/DECODING ciphertexts:
+
+// EncodeFieldsLength returns the length of the ciphertext encoding
+// given the encrypted session key.
+func EncodedFieldsLength(encryptedSessionKey []byte, v6 bool) int {
+ lenCipherFunction := 0
+ if !v6 {
+ lenCipherFunction = 1
+ }
+ return KeySize + 1 + len(encryptedSessionKey) + lenCipherFunction
+}
+
+// EncodeField encodes x25519 session key encryption fields as
+// ephemeral x25519 public key | follow byte length | cipherFunction (v3 only) | encryptedSessionKey
+// and writes it to writer.
+func EncodeFields(writer io.Writer, ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, cipherFunction byte, v6 bool) (err error) {
+ lenAlgorithm := 0
+ if !v6 {
+ lenAlgorithm = 1
+ }
+ if _, err = writer.Write(ephemeralPublicKey.Point); err != nil {
+ return err
+ }
+ if _, err = writer.Write([]byte{byte(len(encryptedSessionKey) + lenAlgorithm)}); err != nil {
+ return err
+ }
+ if !v6 {
+ if _, err = writer.Write([]byte{cipherFunction}); err != nil {
+ return err
+ }
+ }
+ _, err = writer.Write(encryptedSessionKey)
+ return err
+}
+
+// DecodeField decodes a x25519 session key encryption as
+// ephemeral x25519 public key | follow byte length | cipherFunction (v3 only) | encryptedSessionKey.
+func DecodeFields(reader io.Reader, v6 bool) (ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, cipherFunction byte, err error) {
+ var buf [1]byte
+ ephemeralPublicKey = &PublicKey{
+ Point: make([]byte, KeySize),
+ }
+ // 32 octets representing an ephemeral x25519 public key.
+ if _, err = io.ReadFull(reader, ephemeralPublicKey.Point); err != nil {
+ return nil, nil, 0, err
+ }
+ // A one-octet size of the following fields.
+ if _, err = io.ReadFull(reader, buf[:]); err != nil {
+ return nil, nil, 0, err
+ }
+ followingLen := buf[0]
+ // The one-octet algorithm identifier, if it was passed (in the case of a v3 PKESK packet).
+ if !v6 {
+ if _, err = io.ReadFull(reader, buf[:]); err != nil {
+ return nil, nil, 0, err
+ }
+ cipherFunction = buf[0]
+ followingLen -= 1
+ }
+ // The encrypted session key.
+ encryptedSessionKey = make([]byte, followingLen)
+ if _, err = io.ReadFull(reader, encryptedSessionKey); err != nil {
+ return nil, nil, 0, err
+ }
+ return ephemeralPublicKey, encryptedSessionKey, cipherFunction, nil
+}
diff --git a/vendor/github.com/ProtonMail/go-crypto/openpgp/x448/x448.go b/vendor/github.com/ProtonMail/go-crypto/openpgp/x448/x448.go
new file mode 100644
index 000000000..65a082dab
--- /dev/null
+++ b/vendor/github.com/ProtonMail/go-crypto/openpgp/x448/x448.go
@@ -0,0 +1,229 @@
+package x448
+
+import (
+ "crypto/sha512"
+ "crypto/subtle"
+ "io"
+
+ "github.com/ProtonMail/go-crypto/openpgp/aes/keywrap"
+ "github.com/ProtonMail/go-crypto/openpgp/errors"
+ x448lib "github.com/cloudflare/circl/dh/x448"
+ "golang.org/x/crypto/hkdf"
+)
+
+const (
+ hkdfInfo = "OpenPGP X448"
+ aes256KeySize = 32
+ // The size of a public or private key in bytes.
+ KeySize = x448lib.Size
+)
+
+type PublicKey struct {
+ // Point represents the encoded elliptic curve point of the public key.
+ Point []byte
+}
+
+type PrivateKey struct {
+ PublicKey
+ // Secret represents the secret of the private key.
+ Secret []byte
+}
+
+// NewPrivateKey creates a new empty private key including the public key.
+func NewPrivateKey(key PublicKey) *PrivateKey {
+ return &PrivateKey{
+ PublicKey: key,
+ }
+}
+
+// Validate validates that the provided public key matches
+// the private key.
+func Validate(pk *PrivateKey) (err error) {
+ var expectedPublicKey, privateKey x448lib.Key
+ subtle.ConstantTimeCopy(1, privateKey[:], pk.Secret)
+ x448lib.KeyGen(&expectedPublicKey, &privateKey)
+ if subtle.ConstantTimeCompare(expectedPublicKey[:], pk.PublicKey.Point) == 0 {
+ return errors.KeyInvalidError("x448: invalid key")
+ }
+ return nil
+}
+
+// GenerateKey generates a new x448 key pair.
+func GenerateKey(rand io.Reader) (*PrivateKey, error) {
+ var privateKey, publicKey x448lib.Key
+ privateKeyOut := new(PrivateKey)
+ err := generateKey(rand, &privateKey, &publicKey)
+ if err != nil {
+ return nil, err
+ }
+ privateKeyOut.PublicKey.Point = publicKey[:]
+ privateKeyOut.Secret = privateKey[:]
+ return privateKeyOut, nil
+}
+
+func generateKey(rand io.Reader, privateKey *x448lib.Key, publicKey *x448lib.Key) error {
+ maxRounds := 10
+ isZero := true
+ for round := 0; isZero; round++ {
+ if round == maxRounds {
+ return errors.InvalidArgumentError("x448: zero keys only, randomness source might be corrupt")
+ }
+ _, err := io.ReadFull(rand, privateKey[:])
+ if err != nil {
+ return err
+ }
+ isZero = constantTimeIsZero(privateKey[:])
+ }
+ x448lib.KeyGen(publicKey, privateKey)
+ return nil
+}
+
+// Encrypt encrypts a sessionKey with x448 according to
+// the OpenPGP crypto refresh specification section 5.1.7. The function assumes that the
+// sessionKey has the correct format and padding according to the specification.
+func Encrypt(rand io.Reader, publicKey *PublicKey, sessionKey []byte) (ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, err error) {
+ var ephemeralPrivate, ephemeralPublic, staticPublic, shared x448lib.Key
+ // Check that the input static public key has 56 bytes.
+ if len(publicKey.Point) != KeySize {
+ err = errors.KeyInvalidError("x448: the public key has the wrong size")
+ return nil, nil, err
+ }
+ copy(staticPublic[:], publicKey.Point)
+ // Generate ephemeral keyPair.
+ if err = generateKey(rand, &ephemeralPrivate, &ephemeralPublic); err != nil {
+ return nil, nil, err
+ }
+ // Compute shared key.
+ ok := x448lib.Shared(&shared, &ephemeralPrivate, &staticPublic)
+ if !ok {
+ err = errors.KeyInvalidError("x448: the public key is a low order point")
+ return nil, nil, err
+ }
+ // Derive the encryption key from the shared secret.
+ encryptionKey := applyHKDF(ephemeralPublic[:], publicKey.Point[:], shared[:])
+ ephemeralPublicKey = &PublicKey{
+ Point: ephemeralPublic[:],
+ }
+ // Encrypt the sessionKey with aes key wrapping.
+ encryptedSessionKey, err = keywrap.Wrap(encryptionKey, sessionKey)
+ if err != nil {
+ return nil, nil, err
+ }
+ return ephemeralPublicKey, encryptedSessionKey, nil
+}
+
+// Decrypt decrypts a session key stored in ciphertext with the provided x448
+// private key and ephemeral public key.
+func Decrypt(privateKey *PrivateKey, ephemeralPublicKey *PublicKey, ciphertext []byte) (encodedSessionKey []byte, err error) {
+ var ephemeralPublic, staticPrivate, shared x448lib.Key
+ // Check that the input ephemeral public key has 56 bytes.
+ if len(ephemeralPublicKey.Point) != KeySize {
+ err = errors.KeyInvalidError("x448: the public key has the wrong size")
+ return nil, err
+ }
+ copy(ephemeralPublic[:], ephemeralPublicKey.Point)
+ subtle.ConstantTimeCopy(1, staticPrivate[:], privateKey.Secret)
+ // Compute shared key.
+ ok := x448lib.Shared(&shared, &staticPrivate, &ephemeralPublic)
+ if !ok {
+ err = errors.KeyInvalidError("x448: the ephemeral public key is a low order point")
+ return nil, err
+ }
+ // Derive the encryption key from the shared secret.
+ encryptionKey := applyHKDF(ephemeralPublicKey.Point[:], privateKey.PublicKey.Point[:], shared[:])
+ // Decrypt the session key with aes key wrapping.
+ encodedSessionKey, err = keywrap.Unwrap(encryptionKey, ciphertext)
+ if err != nil {
+ return nil, err
+ }
+ return encodedSessionKey, nil
+}
+
+func applyHKDF(ephemeralPublicKey []byte, publicKey []byte, sharedSecret []byte) []byte {
+ inputKey := make([]byte, 3*KeySize)
+ // ephemeral public key | recipient public key | shared secret.
+ subtle.ConstantTimeCopy(1, inputKey[:KeySize], ephemeralPublicKey)
+ subtle.ConstantTimeCopy(1, inputKey[KeySize:2*KeySize], publicKey)
+ subtle.ConstantTimeCopy(1, inputKey[2*KeySize:], sharedSecret)
+ hkdfReader := hkdf.New(sha512.New, inputKey, []byte{}, []byte(hkdfInfo))
+ encryptionKey := make([]byte, aes256KeySize)
+ _, _ = io.ReadFull(hkdfReader, encryptionKey)
+ return encryptionKey
+}
+
+func constantTimeIsZero(bytes []byte) bool {
+ isZero := byte(0)
+ for _, b := range bytes {
+ isZero |= b
+ }
+ return isZero == 0
+}
+
+// ENCODING/DECODING ciphertexts:
+
+// EncodeFieldsLength returns the length of the ciphertext encoding
+// given the encrypted session key.
+func EncodedFieldsLength(encryptedSessionKey []byte, v6 bool) int {
+ lenCipherFunction := 0
+ if !v6 {
+ lenCipherFunction = 1
+ }
+ return KeySize + 1 + len(encryptedSessionKey) + lenCipherFunction
+}
+
+// EncodeField encodes x448 session key encryption fields as
+// ephemeral x448 public key | follow byte length | cipherFunction (v3 only) | encryptedSessionKey
+// and writes it to writer.
+func EncodeFields(writer io.Writer, ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, cipherFunction byte, v6 bool) (err error) {
+ lenAlgorithm := 0
+ if !v6 {
+ lenAlgorithm = 1
+ }
+ if _, err = writer.Write(ephemeralPublicKey.Point); err != nil {
+ return err
+ }
+ if _, err = writer.Write([]byte{byte(len(encryptedSessionKey) + lenAlgorithm)}); err != nil {
+ return err
+ }
+ if !v6 {
+ if _, err = writer.Write([]byte{cipherFunction}); err != nil {
+ return err
+ }
+ }
+ if _, err = writer.Write(encryptedSessionKey); err != nil {
+ return err
+ }
+ return nil
+}
+
+// DecodeField decodes a x448 session key encryption as
+// ephemeral x448 public key | follow byte length | cipherFunction (v3 only) | encryptedSessionKey.
+func DecodeFields(reader io.Reader, v6 bool) (ephemeralPublicKey *PublicKey, encryptedSessionKey []byte, cipherFunction byte, err error) {
+ var buf [1]byte
+ ephemeralPublicKey = &PublicKey{
+ Point: make([]byte, KeySize),
+ }
+ // 56 octets representing an ephemeral x448 public key.
+ if _, err = io.ReadFull(reader, ephemeralPublicKey.Point); err != nil {
+ return nil, nil, 0, err
+ }
+ // A one-octet size of the following fields.
+ if _, err = io.ReadFull(reader, buf[:]); err != nil {
+ return nil, nil, 0, err
+ }
+ followingLen := buf[0]
+ // The one-octet algorithm identifier, if it was passed (in the case of a v3 PKESK packet).
+ if !v6 {
+ if _, err = io.ReadFull(reader, buf[:]); err != nil {
+ return nil, nil, 0, err
+ }
+ cipherFunction = buf[0]
+ followingLen -= 1
+ }
+ // The encrypted session key.
+ encryptedSessionKey = make([]byte, followingLen)
+ if _, err = io.ReadFull(reader, encryptedSessionKey); err != nil {
+ return nil, nil, 0, err
+ }
+ return ephemeralPublicKey, encryptedSessionKey, cipherFunction, nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/CHANGELOG.md
new file mode 100644
index 000000000..535fcaaea
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/CHANGELOG.md
@@ -0,0 +1,616 @@
+# v1.37.8 (2024-12-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.7 (2024-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.6 (2024-11-18)
+
+* **Dependency Update**: Update to smithy-go v1.22.1.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.5 (2024-11-07)
+
+* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses
+
+# v1.37.4 (2024-11-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.3 (2024-10-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.2 (2024-10-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.1 (2024-10-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.37.0 (2024-10-04)
+
+* **Feature**: Add support for HTTP client metrics.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.36.4 (2024-10-03)
+
+* No change notes available for this release.
+
+# v1.36.3 (2024-09-27)
+
+* No change notes available for this release.
+
+# v1.36.2 (2024-09-25)
+
+* No change notes available for this release.
+
+# v1.36.1 (2024-09-23)
+
+* No change notes available for this release.
+
+# v1.36.0 (2024-09-20)
+
+* **Feature**: Add tracing and metrics support to service clients.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.35.8 (2024-09-17)
+
+* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution.
+
+# v1.35.7 (2024-09-04)
+
+* No change notes available for this release.
+
+# v1.35.6 (2024-09-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.35.5 (2024-08-22)
+
+* No change notes available for this release.
+
+# v1.35.4 (2024-08-15)
+
+* **Dependency Update**: Bump minimum Go version to 1.21.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.35.3 (2024-07-10.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.35.2 (2024-07-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.35.1 (2024-06-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.35.0 (2024-06-26)
+
+* **Feature**: Support list-of-string endpoint parameter.
+
+# v1.34.1 (2024-06-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.34.0 (2024-06-18)
+
+* **Feature**: Track usage of various AWS SDK features in user-agent string.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.1 (2024-06-17)
+
+* **Documentation**: Updating SDK example for KMS DeriveSharedSecret API.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.33.0 (2024-06-13)
+
+* **Feature**: This feature allows customers to use their keys stored in KMS to derive a shared secret which can then be used to establish a secured channel for communication, provide proof of possession, or establish trust with other parties.
+
+# v1.32.3 (2024-06-07)
+
+* **Bug Fix**: Add clock skew correction on all service clients
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.32.2 (2024-06-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.32.1 (2024-05-23)
+
+* No change notes available for this release.
+
+# v1.32.0 (2024-05-22)
+
+* **Feature**: This release includes feature to import customer's asymmetric (RSA, ECC and SM2) and HMAC keys into KMS in China.
+
+# v1.31.3 (2024-05-16)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.31.2 (2024-05-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.31.1 (2024-05-08)
+
+* **Bug Fix**: GoDoc improvement
+
+# v1.31.0 (2024-04-12)
+
+* **Feature**: This feature supports the ability to specify a custom rotation period for automatic key rotations, the ability to perform on-demand key rotations, and visibility into your key material rotations.
+
+# v1.30.1 (2024-03-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.30.0 (2024-03-18)
+
+* **Feature**: Adds the ability to use the default policy name by omitting the policyName parameter in calls to PutKeyPolicy and GetKeyPolicy
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.2 (2024-03-07)
+
+* **Bug Fix**: Remove dependency on go-cmp.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.1 (2024-02-23)
+
+* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.29.0 (2024-02-22)
+
+* **Feature**: Add middleware stack snapshot tests.
+
+# v1.28.3 (2024-02-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.28.2 (2024-02-20)
+
+* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure.
+
+# v1.28.1 (2024-02-15)
+
+* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field.
+
+# v1.28.0 (2024-02-13)
+
+* **Feature**: Bump minimum Go version to 1.20 per our language support policy.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.9 (2024-01-05)
+
+* **Documentation**: Documentation updates for AWS Key Management Service (KMS).
+
+# v1.27.8 (2024-01-04)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.7 (2023-12-20)
+
+* No change notes available for this release.
+
+# v1.27.6 (2023-12-15)
+
+* **Documentation**: Documentation updates for AWS Key Management Service
+
+# v1.27.5 (2023-12-08)
+
+* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein.
+
+# v1.27.4 (2023-12-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.3 (2023-12-06)
+
+* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously.
+
+# v1.27.2 (2023-12-01)
+
+* **Bug Fix**: Correct wrapping of errors in authentication workflow.
+* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.1 (2023-11-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.27.0 (2023-11-29)
+
+* **Feature**: Expose Options() accessor on service clients.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.5 (2023-11-28.2)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.4 (2023-11-28)
+
+* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction.
+
+# v1.26.3 (2023-11-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.2 (2023-11-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.1 (2023-11-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.26.0 (2023-11-01)
+
+* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.25.0 (2023-10-31)
+
+* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/).
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.7 (2023-10-12)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.6 (2023-10-06)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.5 (2023-08-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.4 (2023-08-18)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.3 (2023-08-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.2 (2023-08-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.24.1 (2023-08-01)
+
+* No change notes available for this release.
+
+# v1.24.0 (2023-07-31)
+
+* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.2 (2023-07-28)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.1 (2023-07-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.23.0 (2023-07-05)
+
+* **Feature**: Added Dry Run Feature to cryptographic and cross-account mutating KMS APIs (14 in all). This feature allows users to test their permissions and parameters before making the actual API call.
+
+# v1.22.2 (2023-06-15)
+
+* No change notes available for this release.
+
+# v1.22.1 (2023-06-13)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.22.0 (2023-06-05)
+
+* **Feature**: This release includes feature to import customer's asymmetric (RSA and ECC) and HMAC keys into KMS. It also includes feature to allow customers to specify number of days to schedule a KMS key deletion as a policy condition key.
+
+# v1.21.1 (2023-05-04)
+
+* No change notes available for this release.
+
+# v1.21.0 (2023-05-01)
+
+* **Feature**: This release makes the NitroEnclave request parameter Recipient and the response field for CiphertextForRecipient available in AWS SDKs. It also adds the regex pattern for CloudHsmClusterId validation.
+
+# v1.20.12 (2023-04-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.11 (2023-04-20)
+
+* No change notes available for this release.
+
+# v1.20.10 (2023-04-10)
+
+* No change notes available for this release.
+
+# v1.20.9 (2023-04-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.8 (2023-03-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.7 (2023-03-10)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.6 (2023-02-28)
+
+* **Documentation**: AWS KMS is deprecating the RSAES_PKCS1_V1_5 wrapping algorithm option in the GetParametersForImport API that is used in the AWS KMS Import Key Material feature. AWS KMS will end support for this wrapping algorithm by October 1, 2023.
+
+# v1.20.5 (2023-02-22)
+
+* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes.
+
+# v1.20.4 (2023-02-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.3 (2023-02-15)
+
+* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910.
+* **Bug Fix**: Correct error type parsing for restJson services.
+
+# v1.20.2 (2023-02-03)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.20.1 (2023-01-23)
+
+* No change notes available for this release.
+
+# v1.20.0 (2023-01-05)
+
+* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401).
+
+# v1.19.4 (2022-12-15)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.3 (2022-12-14)
+
+* No change notes available for this release.
+
+# v1.19.2 (2022-12-07)
+
+* **Documentation**: Updated examples and exceptions for External Key Store (XKS).
+
+# v1.19.1 (2022-12-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.19.0 (2022-11-29.2)
+
+* **Feature**: AWS KMS introduces the External Key Store (XKS), a new feature for customers who want to protect their data with encryption keys stored in an external key management system under their control.
+
+# v1.18.18 (2022-11-22)
+
+* No change notes available for this release.
+
+# v1.18.17 (2022-11-16)
+
+* No change notes available for this release.
+
+# v1.18.16 (2022-11-10)
+
+* No change notes available for this release.
+
+# v1.18.15 (2022-10-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.14 (2022-10-21)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.13 (2022-10-20)
+
+* No change notes available for this release.
+
+# v1.18.12 (2022-10-13)
+
+* No change notes available for this release.
+
+# v1.18.11 (2022-09-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.10 (2022-09-14)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.9 (2022-09-02)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.8 (2022-08-31)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.7 (2022-08-30)
+
+* No change notes available for this release.
+
+# v1.18.6 (2022-08-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.5 (2022-08-22)
+
+* No change notes available for this release.
+
+# v1.18.4 (2022-08-11)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.3 (2022-08-09)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.2 (2022-08-08)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.1 (2022-08-01)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.18.0 (2022-07-18)
+
+* **Feature**: Added support for the SM2 KeySpec in China Partition Regions
+
+# v1.17.5 (2022-07-05)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.4 (2022-06-29)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.3 (2022-06-07)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.2 (2022-05-17)
+
+* **Documentation**: Add HMAC best practice tip, annual rotation of AWS managed keys.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.1 (2022-04-25)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.17.0 (2022-04-19)
+
+* **Feature**: Adds support for KMS keys and APIs that generate and verify HMAC codes
+
+# v1.16.3 (2022-03-30)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.2 (2022-03-24)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.1 (2022-03-23)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.16.0 (2022-03-08)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.15.0 (2022-02-24)
+
+* **Feature**: API client updated
+* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.14.0 (2022-01-14)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.13.0 (2022-01-07)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.12.0 (2021-12-21)
+
+* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens.
+* **Feature**: Updated to latest service endpoints
+
+# v1.11.1 (2021-12-02)
+
+* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514))
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.11.0 (2021-11-19)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.10.0 (2021-11-12)
+
+* **Feature**: Service clients now support custom endpoints that have an initial URI path defined.
+
+# v1.9.0 (2021-11-06)
+
+* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically.
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Feature**: Updated service to latest API model.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.8.0 (2021-10-21)
+
+* **Feature**: API client updated
+* **Feature**: Updated to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.7.0 (2021-10-11)
+
+* **Feature**: API client updated
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.1 (2021-09-17)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.6.0 (2021-09-02)
+
+* **Feature**: API client updated
+
+# v1.5.0 (2021-08-27)
+
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.3 (2021-08-19)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.2 (2021-08-04)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version.
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.1 (2021-07-15)
+
+* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.4.0 (2021-06-25)
+
+* **Feature**: API client updated
+* **Feature**: Updated `github.com/aws/smithy-go` to latest version
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.2 (2021-06-04)
+
+* No change notes available for this release.
+
+# v1.3.1 (2021-05-20)
+
+* **Dependency Update**: Updated to the latest SDK module versions
+
+# v1.3.0 (2021-05-14)
+
+* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting.
+* **Dependency Update**: Updated to the latest SDK module versions
+
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/LICENSE.txt
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ 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/github.com/aws/aws-sdk-go-v2/service/kms/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_client.go
new file mode 100644
index 000000000..64c4d0f80
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_client.go
@@ -0,0 +1,913 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ "github.com/aws/aws-sdk-go-v2/aws/defaults"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/aws/retry"
+ "github.com/aws/aws-sdk-go-v2/aws/signer/v4"
+ awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
+ internalauth "github.com/aws/aws-sdk-go-v2/internal/auth"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ smithydocument "github.com/aws/smithy-go/document"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/metrics"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net"
+ "net/http"
+ "sync/atomic"
+ "time"
+)
+
+const ServiceID = "KMS"
+const ServiceAPIVersion = "2014-11-01"
+
+type operationMetrics struct {
+ Duration metrics.Float64Histogram
+ SerializeDuration metrics.Float64Histogram
+ ResolveIdentityDuration metrics.Float64Histogram
+ ResolveEndpointDuration metrics.Float64Histogram
+ SignRequestDuration metrics.Float64Histogram
+ DeserializeDuration metrics.Float64Histogram
+}
+
+func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram {
+ switch name {
+ case "client.call.duration":
+ return m.Duration
+ case "client.call.serialization_duration":
+ return m.SerializeDuration
+ case "client.call.resolve_identity_duration":
+ return m.ResolveIdentityDuration
+ case "client.call.resolve_endpoint_duration":
+ return m.ResolveEndpointDuration
+ case "client.call.signing_duration":
+ return m.SignRequestDuration
+ case "client.call.deserialization_duration":
+ return m.DeserializeDuration
+ default:
+ panic("unrecognized operation metric")
+ }
+}
+
+func timeOperationMetric[T any](
+ ctx context.Context, metric string, fn func() (T, error),
+ opts ...metrics.RecordMetricOption,
+) (T, error) {
+ instr := getOperationMetrics(ctx).histogramFor(metric)
+ opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
+
+ start := time.Now()
+ v, err := fn()
+ end := time.Now()
+
+ elapsed := end.Sub(start)
+ instr.Record(ctx, float64(elapsed)/1e9, opts...)
+ return v, err
+}
+
+func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() {
+ instr := getOperationMetrics(ctx).histogramFor(metric)
+ opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...)
+
+ var ended bool
+ start := time.Now()
+ return func() {
+ if ended {
+ return
+ }
+ ended = true
+
+ end := time.Now()
+
+ elapsed := end.Sub(start)
+ instr.Record(ctx, float64(elapsed)/1e9, opts...)
+ }
+}
+
+func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption {
+ return func(o *metrics.RecordMetricOptions) {
+ o.Properties.Set("rpc.service", middleware.GetServiceID(ctx))
+ o.Properties.Set("rpc.method", middleware.GetOperationName(ctx))
+ }
+}
+
+type operationMetricsKey struct{}
+
+func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) {
+ meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/kms")
+ om := &operationMetrics{}
+
+ var err error
+
+ om.Duration, err = operationMetricTimer(meter, "client.call.duration",
+ "Overall call duration (including retries and time to send or receive request and response body)")
+ if err != nil {
+ return nil, err
+ }
+ om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration",
+ "The time it takes to serialize a message body")
+ if err != nil {
+ return nil, err
+ }
+ om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration",
+ "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider")
+ if err != nil {
+ return nil, err
+ }
+ om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration",
+ "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request")
+ if err != nil {
+ return nil, err
+ }
+ om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration",
+ "The time it takes to sign a request")
+ if err != nil {
+ return nil, err
+ }
+ om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration",
+ "The time it takes to deserialize a message body")
+ if err != nil {
+ return nil, err
+ }
+
+ return context.WithValue(parent, operationMetricsKey{}, om), nil
+}
+
+func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) {
+ return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) {
+ o.UnitLabel = "s"
+ o.Description = desc
+ })
+}
+
+func getOperationMetrics(ctx context.Context) *operationMetrics {
+ return ctx.Value(operationMetricsKey{}).(*operationMetrics)
+}
+
+func operationTracer(p tracing.TracerProvider) tracing.Tracer {
+ return p.Tracer("github.com/aws/aws-sdk-go-v2/service/kms")
+}
+
+// Client provides the API client to make operations call for AWS Key Management
+// Service.
+type Client struct {
+ options Options
+
+ // Difference between the time reported by the server and the client
+ timeOffset *atomic.Int64
+}
+
+// New returns an initialized Client based on the functional options. Provide
+// additional functional options to further configure the behavior of the client,
+// such as changing the client's endpoint or adding custom middleware behavior.
+func New(options Options, optFns ...func(*Options)) *Client {
+ options = options.Copy()
+
+ resolveDefaultLogger(&options)
+
+ setResolvedDefaultsMode(&options)
+
+ resolveRetryer(&options)
+
+ resolveHTTPClient(&options)
+
+ resolveHTTPSignerV4(&options)
+
+ resolveEndpointResolverV2(&options)
+
+ resolveTracerProvider(&options)
+
+ resolveMeterProvider(&options)
+
+ resolveAuthSchemeResolver(&options)
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ finalizeRetryMaxAttempts(&options)
+
+ ignoreAnonymousAuth(&options)
+
+ wrapWithAnonymousAuth(&options)
+
+ resolveAuthSchemes(&options)
+
+ client := &Client{
+ options: options,
+ }
+
+ initializeTimeOffsetResolver(client)
+
+ return client
+}
+
+// Options returns a copy of the client configuration.
+//
+// Callers SHOULD NOT perform mutations on any inner structures within client
+// config. Config overrides should instead be made on a per-operation basis through
+// functional options.
+func (c *Client) Options() Options {
+ return c.options.Copy()
+}
+
+func (c *Client) invokeOperation(
+ ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error,
+) (
+ result interface{}, metadata middleware.Metadata, err error,
+) {
+ ctx = middleware.ClearStackValues(ctx)
+ ctx = middleware.WithServiceID(ctx, ServiceID)
+ ctx = middleware.WithOperationName(ctx, opID)
+
+ stack := middleware.NewStack(opID, smithyhttp.NewStackRequest)
+ options := c.options.Copy()
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ finalizeOperationRetryMaxAttempts(&options, *c)
+
+ finalizeClientEndpointResolverOptions(&options)
+
+ for _, fn := range stackFns {
+ if err := fn(stack, options); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ for _, fn := range options.APIOptions {
+ if err := fn(stack); err != nil {
+ return nil, metadata, err
+ }
+ }
+
+ ctx, err = withOperationMetrics(ctx, options.MeterProvider)
+ if err != nil {
+ return nil, metadata, err
+ }
+
+ tracer := operationTracer(options.TracerProvider)
+ spanName := fmt.Sprintf("%s.%s", ServiceID, opID)
+
+ ctx = tracing.WithOperationTracer(ctx, tracer)
+
+ ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) {
+ o.Kind = tracing.SpanKindClient
+ o.Properties.Set("rpc.system", "aws-api")
+ o.Properties.Set("rpc.method", opID)
+ o.Properties.Set("rpc.service", ServiceID)
+ })
+ endTimer := startMetricTimer(ctx, "client.call.duration")
+ defer endTimer()
+ defer span.End()
+
+ handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) {
+ o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/kms")
+ })
+ decorated := middleware.DecorateHandler(handler, stack)
+ result, metadata, err = decorated.Handle(ctx, params)
+ if err != nil {
+ span.SetProperty("exception.type", fmt.Sprintf("%T", err))
+ span.SetProperty("exception.message", err.Error())
+
+ var aerr smithy.APIError
+ if errors.As(err, &aerr) {
+ span.SetProperty("api.error_code", aerr.ErrorCode())
+ span.SetProperty("api.error_message", aerr.ErrorMessage())
+ span.SetProperty("api.error_fault", aerr.ErrorFault().String())
+ }
+
+ err = &smithy.OperationError{
+ ServiceID: ServiceID,
+ OperationName: opID,
+ Err: err,
+ }
+ }
+
+ span.SetProperty("error", err != nil)
+ if err == nil {
+ span.SetStatus(tracing.SpanStatusOK)
+ } else {
+ span.SetStatus(tracing.SpanStatusError)
+ }
+
+ return result, metadata, err
+}
+
+type operationInputKey struct{}
+
+func setOperationInput(ctx context.Context, input interface{}) context.Context {
+ return middleware.WithStackValue(ctx, operationInputKey{}, input)
+}
+
+func getOperationInput(ctx context.Context) interface{} {
+ return middleware.GetStackValue(ctx, operationInputKey{})
+}
+
+type setOperationInputMiddleware struct {
+}
+
+func (*setOperationInputMiddleware) ID() string {
+ return "setOperationInput"
+}
+
+func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ ctx = setOperationInput(ctx, in.Parameters)
+ return next.HandleSerialize(ctx, in)
+}
+
+func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error {
+ if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil {
+ return fmt.Errorf("add ResolveAuthScheme: %w", err)
+ }
+ if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil {
+ return fmt.Errorf("add GetIdentity: %v", err)
+ }
+ if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil {
+ return fmt.Errorf("add ResolveEndpointV2: %v", err)
+ }
+ if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil {
+ return fmt.Errorf("add Signing: %w", err)
+ }
+ return nil
+}
+func resolveAuthSchemeResolver(options *Options) {
+ if options.AuthSchemeResolver == nil {
+ options.AuthSchemeResolver = &defaultAuthSchemeResolver{}
+ }
+}
+
+func resolveAuthSchemes(options *Options) {
+ if options.AuthSchemes == nil {
+ options.AuthSchemes = []smithyhttp.AuthScheme{
+ internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{
+ Signer: options.HTTPSignerV4,
+ Logger: options.Logger,
+ LogSigning: options.ClientLogMode.IsSigning(),
+ }),
+ }
+ }
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
+
+type legacyEndpointContextSetter struct {
+ LegacyResolver EndpointResolver
+}
+
+func (*legacyEndpointContextSetter) ID() string {
+ return "legacyEndpointContextSetter"
+}
+
+func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ if m.LegacyResolver != nil {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true)
+ }
+
+ return next.HandleInitialize(ctx, in)
+
+}
+func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error {
+ return stack.Initialize.Add(&legacyEndpointContextSetter{
+ LegacyResolver: o.EndpointResolver,
+ }, middleware.Before)
+}
+
+func resolveDefaultLogger(o *Options) {
+ if o.Logger != nil {
+ return
+ }
+ o.Logger = logging.Nop{}
+}
+
+func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error {
+ return middleware.AddSetLoggerMiddleware(stack, o.Logger)
+}
+
+func setResolvedDefaultsMode(o *Options) {
+ if len(o.resolvedDefaultsMode) > 0 {
+ return
+ }
+
+ var mode aws.DefaultsMode
+ mode.SetFromString(string(o.DefaultsMode))
+
+ if mode == aws.DefaultsModeAuto {
+ mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment)
+ }
+
+ o.resolvedDefaultsMode = mode
+}
+
+// NewFromConfig returns a new client from the provided config.
+func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client {
+ opts := Options{
+ Region: cfg.Region,
+ DefaultsMode: cfg.DefaultsMode,
+ RuntimeEnvironment: cfg.RuntimeEnvironment,
+ HTTPClient: cfg.HTTPClient,
+ Credentials: cfg.Credentials,
+ APIOptions: cfg.APIOptions,
+ Logger: cfg.Logger,
+ ClientLogMode: cfg.ClientLogMode,
+ AppID: cfg.AppID,
+ }
+ resolveAWSRetryerProvider(cfg, &opts)
+ resolveAWSRetryMaxAttempts(cfg, &opts)
+ resolveAWSRetryMode(cfg, &opts)
+ resolveAWSEndpointResolver(cfg, &opts)
+ resolveUseDualStackEndpoint(cfg, &opts)
+ resolveUseFIPSEndpoint(cfg, &opts)
+ resolveBaseEndpoint(cfg, &opts)
+ return New(opts, optFns...)
+}
+
+func resolveHTTPClient(o *Options) {
+ var buildable *awshttp.BuildableClient
+
+ if o.HTTPClient != nil {
+ var ok bool
+ buildable, ok = o.HTTPClient.(*awshttp.BuildableClient)
+ if !ok {
+ return
+ }
+ } else {
+ buildable = awshttp.NewBuildableClient()
+ }
+
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) {
+ if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok {
+ dialer.Timeout = dialerTimeout
+ }
+ })
+
+ buildable = buildable.WithTransportOptions(func(transport *http.Transport) {
+ if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok {
+ transport.TLSHandshakeTimeout = tlsHandshakeTimeout
+ }
+ })
+ }
+
+ o.HTTPClient = buildable
+}
+
+func resolveRetryer(o *Options) {
+ if o.Retryer != nil {
+ return
+ }
+
+ if len(o.RetryMode) == 0 {
+ modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode)
+ if err == nil {
+ o.RetryMode = modeConfig.RetryMode
+ }
+ }
+ if len(o.RetryMode) == 0 {
+ o.RetryMode = aws.RetryModeStandard
+ }
+
+ var standardOptions []func(*retry.StandardOptions)
+ if v := o.RetryMaxAttempts; v != 0 {
+ standardOptions = append(standardOptions, func(so *retry.StandardOptions) {
+ so.MaxAttempts = v
+ })
+ }
+
+ switch o.RetryMode {
+ case aws.RetryModeAdaptive:
+ var adaptiveOptions []func(*retry.AdaptiveModeOptions)
+ if len(standardOptions) != 0 {
+ adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) {
+ ao.StandardOptions = append(ao.StandardOptions, standardOptions...)
+ })
+ }
+ o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...)
+
+ default:
+ o.Retryer = retry.NewStandard(standardOptions...)
+ }
+}
+
+func resolveAWSRetryerProvider(cfg aws.Config, o *Options) {
+ if cfg.Retryer == nil {
+ return
+ }
+ o.Retryer = cfg.Retryer()
+}
+
+func resolveAWSRetryMode(cfg aws.Config, o *Options) {
+ if len(cfg.RetryMode) == 0 {
+ return
+ }
+ o.RetryMode = cfg.RetryMode
+}
+func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) {
+ if cfg.RetryMaxAttempts == 0 {
+ return
+ }
+ o.RetryMaxAttempts = cfg.RetryMaxAttempts
+}
+
+func finalizeRetryMaxAttempts(o *Options) {
+ if o.RetryMaxAttempts == 0 {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func finalizeOperationRetryMaxAttempts(o *Options, client Client) {
+ if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts {
+ return
+ }
+
+ o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts)
+}
+
+func resolveAWSEndpointResolver(cfg aws.Config, o *Options) {
+ if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil {
+ return
+ }
+ o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions)
+}
+
+func addClientUserAgent(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "kms", goModuleVersion)
+ if len(options.AppID) > 0 {
+ ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID)
+ }
+
+ return nil
+}
+
+func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) {
+ id := (*awsmiddleware.RequestUserAgent)(nil).ID()
+ mw, ok := stack.Build.Get(id)
+ if !ok {
+ mw = awsmiddleware.NewRequestUserAgent()
+ if err := stack.Build.Add(mw, middleware.After); err != nil {
+ return nil, err
+ }
+ }
+
+ ua, ok := mw.(*awsmiddleware.RequestUserAgent)
+ if !ok {
+ return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id)
+ }
+
+ return ua, nil
+}
+
+type HTTPSignerV4 interface {
+ SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error
+}
+
+func resolveHTTPSignerV4(o *Options) {
+ if o.HTTPSignerV4 != nil {
+ return
+ }
+ o.HTTPSignerV4 = newDefaultV4Signer(*o)
+}
+
+func newDefaultV4Signer(o Options) *v4.Signer {
+ return v4.NewSigner(func(so *v4.SignerOptions) {
+ so.Logger = o.Logger
+ so.LogSigning = o.ClientLogMode.IsSigning()
+ })
+}
+
+func addClientRequestID(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After)
+}
+
+func addComputeContentLength(stack *middleware.Stack) error {
+ return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After)
+}
+
+func addRawResponseToMetadata(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before)
+}
+
+func addRecordResponseTiming(stack *middleware.Stack) error {
+ return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After)
+}
+
+func addSpanRetryLoop(stack *middleware.Stack, options Options) error {
+ return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before)
+}
+
+type spanRetryLoop struct {
+ options Options
+}
+
+func (*spanRetryLoop) ID() string {
+ return "spanRetryLoop"
+}
+
+func (m *spanRetryLoop) HandleFinalize(
+ ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler,
+) (
+ middleware.FinalizeOutput, middleware.Metadata, error,
+) {
+ tracer := operationTracer(m.options.TracerProvider)
+ ctx, span := tracer.StartSpan(ctx, "RetryLoop")
+ defer span.End()
+
+ return next.HandleFinalize(ctx, in)
+}
+func addStreamingEventsPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before)
+}
+
+func addUnsignedPayload(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addComputePayloadSHA256(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After)
+}
+
+func addContentSHA256Header(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After)
+}
+
+func addIsWaiterUserAgent(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter)
+ return nil
+ })
+}
+
+func addIsPaginatorUserAgent(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator)
+ return nil
+ })
+}
+
+func addRetry(stack *middleware.Stack, o Options) error {
+ attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) {
+ m.LogAttempts = o.ClientLogMode.IsRetries()
+ m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/kms")
+ })
+ if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil {
+ return err
+ }
+ if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil {
+ return err
+ }
+ return nil
+}
+
+// resolves dual-stack endpoint configuration
+func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseDualStackEndpoint = value
+ }
+ return nil
+}
+
+// resolves FIPS endpoint configuration
+func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error {
+ if len(cfg.ConfigSources) == 0 {
+ return nil
+ }
+ value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources)
+ if err != nil {
+ return err
+ }
+ if found {
+ o.EndpointOptions.UseFIPSEndpoint = value
+ }
+ return nil
+}
+
+func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string {
+ if mode == aws.AccountIDEndpointModeDisabled {
+ return nil
+ }
+
+ if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" {
+ return aws.String(ca.Credentials.AccountID)
+ }
+
+ return nil
+}
+
+func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error {
+ mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset}
+ if err := stack.Build.Add(&mw, middleware.After); err != nil {
+ return err
+ }
+ return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before)
+}
+func initializeTimeOffsetResolver(c *Client) {
+ c.timeOffset = new(atomic.Int64)
+}
+
+func addUserAgentRetryMode(stack *middleware.Stack, options Options) error {
+ ua, err := getOrAddRequestUserAgent(stack)
+ if err != nil {
+ return err
+ }
+
+ switch options.Retryer.(type) {
+ case *retry.Standard:
+ ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard)
+ case *retry.AdaptiveMode:
+ ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive)
+ }
+ return nil
+}
+
+func resolveTracerProvider(options *Options) {
+ if options.TracerProvider == nil {
+ options.TracerProvider = &tracing.NopTracerProvider{}
+ }
+}
+
+func resolveMeterProvider(options *Options) {
+ if options.MeterProvider == nil {
+ options.MeterProvider = metrics.NopMeterProvider{}
+ }
+}
+
+func addRecursionDetection(stack *middleware.Stack) error {
+ return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After)
+}
+
+func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error {
+ return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before)
+
+}
+
+func addResponseErrorMiddleware(stack *middleware.Stack) error {
+ return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before)
+
+}
+
+func addRequestResponseLogging(stack *middleware.Stack, o Options) error {
+ return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{
+ LogRequest: o.ClientLogMode.IsRequest(),
+ LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(),
+ LogResponse: o.ClientLogMode.IsResponse(),
+ LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(),
+ }, middleware.After)
+}
+
+type disableHTTPSMiddleware struct {
+ DisableHTTPS bool
+}
+
+func (*disableHTTPSMiddleware) ID() string {
+ return "disableHTTPS"
+}
+
+func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) {
+ req.URL.Scheme = "http"
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Finalize.Insert(&disableHTTPSMiddleware{
+ DisableHTTPS: o.EndpointOptions.DisableHTTPS,
+ }, "ResolveEndpointV2", middleware.After)
+}
+
+type spanInitializeStart struct {
+}
+
+func (*spanInitializeStart) ID() string {
+ return "spanInitializeStart"
+}
+
+func (m *spanInitializeStart) HandleInitialize(
+ ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
+) (
+ middleware.InitializeOutput, middleware.Metadata, error,
+) {
+ ctx, _ = tracing.StartSpan(ctx, "Initialize")
+
+ return next.HandleInitialize(ctx, in)
+}
+
+type spanInitializeEnd struct {
+}
+
+func (*spanInitializeEnd) ID() string {
+ return "spanInitializeEnd"
+}
+
+func (m *spanInitializeEnd) HandleInitialize(
+ ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler,
+) (
+ middleware.InitializeOutput, middleware.Metadata, error,
+) {
+ ctx, span := tracing.PopSpan(ctx)
+ span.End()
+
+ return next.HandleInitialize(ctx, in)
+}
+
+type spanBuildRequestStart struct {
+}
+
+func (*spanBuildRequestStart) ID() string {
+ return "spanBuildRequestStart"
+}
+
+func (m *spanBuildRequestStart) HandleSerialize(
+ ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler,
+) (
+ middleware.SerializeOutput, middleware.Metadata, error,
+) {
+ ctx, _ = tracing.StartSpan(ctx, "BuildRequest")
+
+ return next.HandleSerialize(ctx, in)
+}
+
+type spanBuildRequestEnd struct {
+}
+
+func (*spanBuildRequestEnd) ID() string {
+ return "spanBuildRequestEnd"
+}
+
+func (m *spanBuildRequestEnd) HandleBuild(
+ ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler,
+) (
+ middleware.BuildOutput, middleware.Metadata, error,
+) {
+ ctx, span := tracing.PopSpan(ctx)
+ span.End()
+
+ return next.HandleBuild(ctx, in)
+}
+
+func addSpanInitializeStart(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before)
+}
+
+func addSpanInitializeEnd(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After)
+}
+
+func addSpanBuildRequestStart(stack *middleware.Stack) error {
+ return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before)
+}
+
+func addSpanBuildRequestEnd(stack *middleware.Stack) error {
+ return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CancelKeyDeletion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CancelKeyDeletion.go
new file mode 100644
index 000000000..706c00b30
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CancelKeyDeletion.go
@@ -0,0 +1,191 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Cancels the deletion of a KMS key. When this operation succeeds, the key state
+// of the KMS key is Disabled . To enable the KMS key, use EnableKey.
+//
+// For more information about scheduling and canceling deletion of a KMS key, see [Deleting KMS keys]
+// in the Key Management Service Developer Guide.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:CancelKeyDeletion] (key policy)
+//
+// Related operations: ScheduleKeyDeletion
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:CancelKeyDeletion]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Deleting KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) CancelKeyDeletion(ctx context.Context, params *CancelKeyDeletionInput, optFns ...func(*Options)) (*CancelKeyDeletionOutput, error) {
+ if params == nil {
+ params = &CancelKeyDeletionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CancelKeyDeletion", params, optFns, c.addOperationCancelKeyDeletionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CancelKeyDeletionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CancelKeyDeletionInput struct {
+
+ // Identifies the KMS key whose deletion is being canceled.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type CancelKeyDeletionOutput struct {
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key whose deletion is canceled.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCancelKeyDeletionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelKeyDeletion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelKeyDeletion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CancelKeyDeletion"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCancelKeyDeletionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelKeyDeletion(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCancelKeyDeletion(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CancelKeyDeletion",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ConnectCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ConnectCustomKeyStore.go
new file mode 100644
index 000000000..8656b61c8
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ConnectCustomKeyStore.go
@@ -0,0 +1,245 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Connects or reconnects a [custom key store] to its backing key store. For an CloudHSM key store,
+// ConnectCustomKeyStore connects the key store to its associated CloudHSM cluster.
+// For an external key store, ConnectCustomKeyStore connects the key store to the
+// external key store proxy that communicates with your external key manager.
+//
+// The custom key store must be connected before you can create KMS keys in the
+// key store or use the KMS keys it contains. You can disconnect and reconnect a
+// custom key store at any time.
+//
+// The connection process for a custom key store can take an extended amount of
+// time to complete. This operation starts the connection process, but it does not
+// wait for it to complete. When it succeeds, this operation quickly returns an
+// HTTP 200 response and a JSON object with no properties. However, this response
+// does not indicate that the custom key store is connected. To get the connection
+// state of the custom key store, use the DescribeCustomKeyStoresoperation.
+//
+// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
+// and extensive integration of KMS with the isolation and control of a key store
+// that you own and manage.
+//
+// The ConnectCustomKeyStore operation might fail for various reasons. To find the
+// reason, use the DescribeCustomKeyStoresoperation and see the ConnectionErrorCode in the response. For
+// help interpreting the ConnectionErrorCode , see CustomKeyStoresListEntry.
+//
+// To fix the failure, use the DisconnectCustomKeyStore operation to disconnect the custom key store,
+// correct the error, use the UpdateCustomKeyStoreoperation if necessary, and then use
+// ConnectCustomKeyStore again.
+//
+// # CloudHSM key store
+//
+// During the connection process for an CloudHSM key store, KMS finds the CloudHSM
+// cluster that is associated with the custom key store, creates the connection
+// infrastructure, connects to the cluster, logs into the CloudHSM client as the
+// kmsuser CU, and rotates its password.
+//
+// To connect an CloudHSM key store, its associated CloudHSM cluster must have at
+// least one active HSM. To get the number of active HSMs in a cluster, use the [DescribeClusters]
+// operation. To add HSMs to the cluster, use the [CreateHsm]operation. Also, the [kmsuser crypto user]kmsuser
+// (CU) must not be logged into the cluster. This prevents KMS from using this
+// account to log in.
+//
+// If you are having trouble connecting or disconnecting a CloudHSM key store, see [Troubleshooting an CloudHSM key store]
+// in the Key Management Service Developer Guide.
+//
+// # External key store
+//
+// When you connect an external key store that uses public endpoint connectivity,
+// KMS tests its ability to communicate with your external key manager by sending a
+// request via the external key store proxy.
+//
+// When you connect to an external key store that uses VPC endpoint service
+// connectivity, KMS establishes the networking elements that it needs to
+// communicate with your external key manager via the external key store proxy.
+// This includes creating an interface endpoint to the VPC endpoint service and a
+// private hosted zone for traffic between KMS and the VPC endpoint service.
+//
+// To connect an external key store, KMS must be able to connect to the external
+// key store proxy, the external key store proxy must be able to communicate with
+// your external key manager, and the external key manager must be available for
+// cryptographic operations.
+//
+// If you are having trouble connecting or disconnecting an external key store,
+// see [Troubleshooting an external key store]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a custom key store
+// in a different Amazon Web Services account.
+//
+// Required permissions: [kms:ConnectCustomKeyStore] (IAM policy)
+//
+// # Related operations
+//
+// # CreateCustomKeyStore
+//
+// # DeleteCustomKeyStore
+//
+// # DescribeCustomKeyStores
+//
+// # DisconnectCustomKeyStore
+//
+// # UpdateCustomKeyStore
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [DescribeClusters]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
+// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [kmsuser crypto user]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
+// [Troubleshooting an CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
+// [CreateHsm]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html
+// [kms:ConnectCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Troubleshooting an external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) ConnectCustomKeyStore(ctx context.Context, params *ConnectCustomKeyStoreInput, optFns ...func(*Options)) (*ConnectCustomKeyStoreOutput, error) {
+ if params == nil {
+ params = &ConnectCustomKeyStoreInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ConnectCustomKeyStore", params, optFns, c.addOperationConnectCustomKeyStoreMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ConnectCustomKeyStoreOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ConnectCustomKeyStoreInput struct {
+
+ // Enter the key store ID of the custom key store that you want to connect. To
+ // find the ID of a custom key store, use the DescribeCustomKeyStoresoperation.
+ //
+ // This member is required.
+ CustomKeyStoreId *string
+
+ noSmithyDocumentSerde
+}
+
+type ConnectCustomKeyStoreOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationConnectCustomKeyStoreMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpConnectCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpConnectCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ConnectCustomKeyStore"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpConnectCustomKeyStoreValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opConnectCustomKeyStore(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opConnectCustomKeyStore(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ConnectCustomKeyStore",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateAlias.go
new file mode 100644
index 000000000..84e8a58d4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateAlias.go
@@ -0,0 +1,244 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a friendly name for a KMS key.
+//
+// Adding, deleting, or updating an alias can allow or deny permission to the KMS
+// key. For details, see [ABAC for KMS]in the Key Management Service Developer Guide.
+//
+// You can use an alias to identify a KMS key in the KMS console, in the DescribeKey
+// operation and in [cryptographic operations], such as Encrypt and GenerateDataKey. You can also change the KMS key that's
+// associated with the alias (UpdateAlias ) or delete the alias (DeleteAlias ) at any time. These
+// operations don't affect the underlying KMS key.
+//
+// You can associate the alias with any customer managed key in the same Amazon
+// Web Services Region. Each alias is associated with only one KMS key at a time,
+// but a KMS key can have multiple aliases. A valid KMS key is required. You can't
+// create an alias without a KMS key.
+//
+// The alias must be unique in the account and Region, but you can have aliases
+// with the same name in different Regions. For detailed information about aliases,
+// see [Using aliases]in the Key Management Service Developer Guide.
+//
+// This operation does not return a response. To get the alias that you created,
+// use the ListAliasesoperation.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on an alias in a
+// different Amazon Web Services account.
+//
+// # Required permissions
+//
+// [kms:CreateAlias]
+// - on the alias (IAM policy).
+//
+// [kms:CreateAlias]
+// - on the KMS key (key policy).
+//
+// For details, see [Controlling access to aliases] in the Key Management Service Developer Guide.
+//
+// Related operations:
+//
+// # DeleteAlias
+//
+// # ListAliases
+//
+// # UpdateAlias
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+// [Using aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html
+// [kms:CreateAlias]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
+func (c *Client) CreateAlias(ctx context.Context, params *CreateAliasInput, optFns ...func(*Options)) (*CreateAliasOutput, error) {
+ if params == nil {
+ params = &CreateAliasInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateAlias", params, optFns, c.addOperationCreateAliasMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateAliasOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateAliasInput struct {
+
+ // Specifies the alias name. This value must begin with alias/ followed by a name,
+ // such as alias/ExampleAlias .
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // The AliasName value must be string of 1-256 characters. It can contain only
+ // alphanumeric characters, forward slashes (/), underscores (_), and dashes (-).
+ // The alias name cannot begin with alias/aws/ . The alias/aws/ prefix is reserved
+ // for [Amazon Web Services managed keys].
+ //
+ // [Amazon Web Services managed keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ //
+ // This member is required.
+ AliasName *string
+
+ // Associates the alias with the specified [customer managed key]. The KMS key must be in the same
+ // Amazon Web Services Region.
+ //
+ // A valid key ID is required. If you supply a null or empty string value, this
+ // operation returns an error.
+ //
+ // For help finding the key ID and ARN, see [Finding the Key ID and ARN] in the Key Management Service
+ // Developer Guide .
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
+ // [Finding the Key ID and ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn
+ //
+ // This member is required.
+ TargetKeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateAliasOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateAliasMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAlias"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateAliasValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAlias(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateAlias(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateAlias",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateCustomKeyStore.go
new file mode 100644
index 000000000..548da759f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateCustomKeyStore.go
@@ -0,0 +1,393 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a [custom key store] backed by a key store that you own and manage. When you use a KMS
+// key in a custom key store for a cryptographic operation, the cryptographic
+// operation is actually performed in your key store using your keys. KMS supports [CloudHSM key stores]
+// backed by an [CloudHSM cluster]and [external key stores] backed by an external key store proxy and external key
+// manager outside of Amazon Web Services.
+//
+// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
+// and extensive integration of KMS with the isolation and control of a key store
+// that you own and manage.
+//
+// Before you create the custom key store, the required elements must be in place
+// and operational. We recommend that you use the test tools that KMS provides to
+// verify the configuration your external key store proxy. For details about the
+// required elements and verification tests, see [Assemble the prerequisites (for CloudHSM key stores)]or [Assemble the prerequisites (for external key stores)] in the Key Management Service
+// Developer Guide.
+//
+// To create a custom key store, use the following parameters.
+//
+// - To create an CloudHSM key store, specify the CustomKeyStoreName ,
+// CloudHsmClusterId , KeyStorePassword , and TrustAnchorCertificate . The
+// CustomKeyStoreType parameter is optional for CloudHSM key stores. If you
+// include it, set it to the default value, AWS_CLOUDHSM . For help with
+// failures, see [Troubleshooting an CloudHSM key store]in the Key Management Service Developer Guide.
+//
+// - To create an external key store, specify the CustomKeyStoreName and a
+// CustomKeyStoreType of EXTERNAL_KEY_STORE . Also, specify values for
+// XksProxyConnectivity , XksProxyAuthenticationCredential , XksProxyUriEndpoint
+// , and XksProxyUriPath . If your XksProxyConnectivity value is
+// VPC_ENDPOINT_SERVICE , specify the XksProxyVpcEndpointServiceName parameter.
+// For help with failures, see [Troubleshooting an external key store]in the Key Management Service Developer Guide.
+//
+// For external key stores:
+//
+// Some external key managers provide a simpler method for creating an external
+// key store. For details, see your external key manager documentation.
+//
+// When creating an external key store in the KMS console, you can upload a
+// JSON-based proxy configuration file with the desired values. You cannot use a
+// proxy configuration with the CreateCustomKeyStore operation. However, you can
+// use the values in the file to help you determine the correct values for the
+// CreateCustomKeyStore parameters.
+//
+// When the operation completes successfully, it returns the ID of the new custom
+// key store. Before you can use your new custom key store, you need to use the ConnectCustomKeyStore
+// operation to connect a new CloudHSM key store to its CloudHSM cluster, or to
+// connect a new external key store to the external key store proxy for your
+// external key manager. Even if you are not going to use your custom key store
+// immediately, you might want to connect it to verify that all settings are
+// correct and then disconnect it until you are ready to use it.
+//
+// For help with failures, see [Troubleshooting a custom key store] in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a custom key store
+// in a different Amazon Web Services account.
+//
+// Required permissions: [kms:CreateCustomKeyStore] (IAM policy).
+//
+// Related operations:
+//
+// # ConnectCustomKeyStore
+//
+// # DeleteCustomKeyStore
+//
+// # DescribeCustomKeyStores
+//
+// # DisconnectCustomKeyStore
+//
+// # UpdateCustomKeyStore
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [CloudHSM key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
+// [CloudHSM cluster]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html
+// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [external key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
+// [Troubleshooting an CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
+// [Assemble the prerequisites (for CloudHSM key stores)]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
+// [Assemble the prerequisites (for external key stores)]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keystore.html#xks-requirements
+// [Troubleshooting a custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
+// [Troubleshooting an external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
+// [kms:CreateCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) CreateCustomKeyStore(ctx context.Context, params *CreateCustomKeyStoreInput, optFns ...func(*Options)) (*CreateCustomKeyStoreOutput, error) {
+ if params == nil {
+ params = &CreateCustomKeyStoreInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateCustomKeyStore", params, optFns, c.addOperationCreateCustomKeyStoreMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateCustomKeyStoreOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateCustomKeyStoreInput struct {
+
+ // Specifies a friendly name for the custom key store. The name must be unique in
+ // your Amazon Web Services account and Region. This parameter is required for all
+ // custom key stores.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // This member is required.
+ CustomKeyStoreName *string
+
+ // Identifies the CloudHSM cluster for an CloudHSM key store. This parameter is
+ // required for custom key stores with CustomKeyStoreType of AWS_CLOUDHSM .
+ //
+ // Enter the cluster ID of any active CloudHSM cluster that is not already
+ // associated with a custom key store. To find the cluster ID, use the [DescribeClusters]operation.
+ //
+ // [DescribeClusters]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
+ CloudHsmClusterId *string
+
+ // Specifies the type of custom key store. The default value is AWS_CLOUDHSM .
+ //
+ // For a custom key store backed by an CloudHSM cluster, omit the parameter or
+ // enter AWS_CLOUDHSM . For a custom key store backed by an external key manager
+ // outside of Amazon Web Services, enter EXTERNAL_KEY_STORE . You cannot change
+ // this property after the key store is created.
+ CustomKeyStoreType types.CustomKeyStoreType
+
+ // Specifies the kmsuser password for an CloudHSM key store. This parameter is
+ // required for custom key stores with a CustomKeyStoreType of AWS_CLOUDHSM .
+ //
+ // Enter the password of the [kmsuser crypto user (CU) account]kmsuser in the specified CloudHSM cluster. KMS logs
+ // into the cluster as this user to manage key material on your behalf.
+ //
+ // The password must be a string of 7 to 32 characters. Its value is case
+ // sensitive.
+ //
+ // This parameter tells KMS the kmsuser account password; it does not change the
+ // password in the CloudHSM cluster.
+ //
+ // [kmsuser crypto user (CU) account]: https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser
+ KeyStorePassword *string
+
+ // Specifies the certificate for an CloudHSM key store. This parameter is required
+ // for custom key stores with a CustomKeyStoreType of AWS_CLOUDHSM .
+ //
+ // Enter the content of the trust anchor certificate for the CloudHSM cluster.
+ // This is the content of the customerCA.crt file that you created when you [initialized the cluster].
+ //
+ // [initialized the cluster]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html
+ TrustAnchorCertificate *string
+
+ // Specifies an authentication credential for the external key store proxy (XKS
+ // proxy). This parameter is required for all custom key stores with a
+ // CustomKeyStoreType of EXTERNAL_KEY_STORE .
+ //
+ // The XksProxyAuthenticationCredential has two required elements:
+ // RawSecretAccessKey , a secret key, and AccessKeyId , a unique identifier for the
+ // RawSecretAccessKey . For character requirements, see XksProxyAuthenticationCredentialType.
+ //
+ // KMS uses this authentication credential to sign requests to the external key
+ // store proxy on your behalf. This credential is unrelated to Identity and Access
+ // Management (IAM) and Amazon Web Services credentials.
+ //
+ // This parameter doesn't set or change the authentication credentials on the XKS
+ // proxy. It just tells KMS the credential that you established on your external
+ // key store proxy. If you rotate your proxy authentication credential, use the UpdateCustomKeyStore
+ // operation to provide the new credential to KMS.
+ XksProxyAuthenticationCredential *types.XksProxyAuthenticationCredentialType
+
+ // Indicates how KMS communicates with the external key store proxy. This
+ // parameter is required for custom key stores with a CustomKeyStoreType of
+ // EXTERNAL_KEY_STORE .
+ //
+ // If the external key store proxy uses a public endpoint, specify PUBLIC_ENDPOINT
+ // . If the external key store proxy uses a Amazon VPC endpoint service for
+ // communication with KMS, specify VPC_ENDPOINT_SERVICE . For help making this
+ // choice, see [Choosing a connectivity option]in the Key Management Service Developer Guide.
+ //
+ // An Amazon VPC endpoint service keeps your communication with KMS in a private
+ // address space entirely within Amazon Web Services, but it requires more
+ // configuration, including establishing a Amazon VPC with multiple subnets, a VPC
+ // endpoint service, a network load balancer, and a verified private DNS name. A
+ // public endpoint is simpler to set up, but it might be slower and might not
+ // fulfill your security requirements. You might consider testing with a public
+ // endpoint, and then establishing a VPC endpoint service for production tasks.
+ // Note that this choice does not determine the location of the external key store
+ // proxy. Even if you choose a VPC endpoint service, the proxy can be hosted within
+ // the VPC or outside of Amazon Web Services such as in your corporate data center.
+ //
+ // [Choosing a connectivity option]: https://docs.aws.amazon.com/kms/latest/developerguide/plan-xks-keystore.html#choose-xks-connectivity
+ XksProxyConnectivity types.XksProxyConnectivityType
+
+ // Specifies the endpoint that KMS uses to send requests to the external key store
+ // proxy (XKS proxy). This parameter is required for custom key stores with a
+ // CustomKeyStoreType of EXTERNAL_KEY_STORE .
+ //
+ // The protocol must be HTTPS. KMS communicates on port 443. Do not specify the
+ // port in the XksProxyUriEndpoint value.
+ //
+ // For external key stores with XksProxyConnectivity value of VPC_ENDPOINT_SERVICE
+ // , specify https:// followed by the private DNS name of the VPC endpoint service.
+ //
+ // For external key stores with PUBLIC_ENDPOINT connectivity, this endpoint must
+ // be reachable before you create the custom key store. KMS connects to the
+ // external key store proxy while creating the custom key store. For external key
+ // stores with VPC_ENDPOINT_SERVICE connectivity, KMS connects when you call the ConnectCustomKeyStore
+ // operation.
+ //
+ // The value of this parameter must begin with https:// . The remainder can contain
+ // upper and lower case letters (A-Z and a-z), numbers (0-9), dots ( . ), and
+ // hyphens ( - ). Additional slashes ( / and \ ) are not permitted.
+ //
+ // Uniqueness requirements:
+ //
+ // - The combined XksProxyUriEndpoint and XksProxyUriPath values must be unique
+ // in the Amazon Web Services account and Region.
+ //
+ // - An external key store with PUBLIC_ENDPOINT connectivity cannot use the same
+ // XksProxyUriEndpoint value as an external key store with VPC_ENDPOINT_SERVICE
+ // connectivity in this Amazon Web Services Region.
+ //
+ // - Each external key store with VPC_ENDPOINT_SERVICE connectivity must have its
+ // own private DNS name. The XksProxyUriEndpoint value for external key stores
+ // with VPC_ENDPOINT_SERVICE connectivity (private DNS name) must be unique in
+ // the Amazon Web Services account and Region.
+ XksProxyUriEndpoint *string
+
+ // Specifies the base path to the proxy APIs for this external key store. To find
+ // this value, see the documentation for your external key store proxy. This
+ // parameter is required for all custom key stores with a CustomKeyStoreType of
+ // EXTERNAL_KEY_STORE .
+ //
+ // The value must start with / and must end with /kms/xks/v1 where v1 represents
+ // the version of the KMS external key store proxy API. This path can include an
+ // optional prefix between the required elements such as /prefix/kms/xks/v1 .
+ //
+ // Uniqueness requirements:
+ //
+ // - The combined XksProxyUriEndpoint and XksProxyUriPath values must be unique
+ // in the Amazon Web Services account and Region.
+ XksProxyUriPath *string
+
+ // Specifies the name of the Amazon VPC endpoint service for interface endpoints
+ // that is used to communicate with your external key store proxy (XKS proxy). This
+ // parameter is required when the value of CustomKeyStoreType is EXTERNAL_KEY_STORE
+ // and the value of XksProxyConnectivity is VPC_ENDPOINT_SERVICE .
+ //
+ // The Amazon VPC endpoint service must [fulfill all requirements] for use with an external key store.
+ //
+ // Uniqueness requirements:
+ //
+ // - External key stores with VPC_ENDPOINT_SERVICE connectivity can share an
+ // Amazon VPC, but each external key store must have its own VPC endpoint service
+ // and private DNS name.
+ //
+ // [fulfill all requirements]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keystore.html#xks-requirements
+ XksProxyVpcEndpointServiceName *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateCustomKeyStoreOutput struct {
+
+ // A unique identifier for the new custom key store.
+ CustomKeyStoreId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateCustomKeyStoreMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCustomKeyStore"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateCustomKeyStoreValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCustomKeyStore(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateCustomKeyStore(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateCustomKeyStore",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateGrant.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateGrant.go
new file mode 100644
index 000000000..d30a5e80e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateGrant.go
@@ -0,0 +1,351 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds a grant to a KMS key.
+//
+// A grant is a policy instrument that allows Amazon Web Services principals to
+// use KMS keys in cryptographic operations. It also can allow them to view a KMS
+// key (DescribeKey ) and create and manage grants. When authorizing access to a KMS key,
+// grants are considered along with key policies and IAM policies. Grants are often
+// used for temporary permissions because you can create one, use its permissions,
+// and delete it without changing your key policies or IAM policies.
+//
+// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
+// Key Management Service Developer Guide . For examples of working with grants in
+// several programming languages, see [Programming grants].
+//
+// The CreateGrant operation returns a GrantToken and a GrantId .
+//
+// - When you create, retire, or revoke a grant, there might be a brief delay,
+// usually less than five minutes, until the grant is available throughout KMS.
+// This state is known as eventual consistency. Once the grant has achieved
+// eventual consistency, the grantee principal can use the permissions in the grant
+// without identifying the grant.
+//
+// However, to use the permissions in the grant immediately, use the GrantToken
+//
+// that CreateGrant returns. For details, see [Using a grant token]in the Key Management Service
+// Developer Guide .
+//
+// - The CreateGrant operation also returns a GrantId . You can use the GrantId
+// and a key identifier to identify the grant in the RetireGrantand RevokeGrantoperations. To find the
+// grant ID, use the ListGrantsor ListRetirableGrantsoperations.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation on a KMS key in a different
+// Amazon Web Services account, specify the key ARN in the value of the KeyId
+// parameter.
+//
+// Required permissions: [kms:CreateGrant] (key policy)
+//
+// Related operations:
+//
+// # ListGrants
+//
+// # ListRetirableGrants
+//
+// # RetireGrant
+//
+// # RevokeGrant
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
+// [kms:CreateGrant]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+//
+// [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+func (c *Client) CreateGrant(ctx context.Context, params *CreateGrantInput, optFns ...func(*Options)) (*CreateGrantOutput, error) {
+ if params == nil {
+ params = &CreateGrantInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateGrant", params, optFns, c.addOperationCreateGrantMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateGrantOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateGrantInput struct {
+
+ // The identity that gets the permissions specified in the grant.
+ //
+ // To specify the grantee principal, use the Amazon Resource Name (ARN) of an
+ // Amazon Web Services principal. Valid principals include Amazon Web Services
+ // accounts, IAM users, IAM roles, federated users, and assumed role users. For
+ // help with the ARN syntax for a principal, see [IAM ARNs]in the Identity and Access
+ // Management User Guide .
+ //
+ // [IAM ARNs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
+ //
+ // This member is required.
+ GranteePrincipal *string
+
+ // Identifies the KMS key for the grant. The grant gives principals permission to
+ // use this KMS key.
+ //
+ // Specify the key ID or key ARN of the KMS key. To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // A list of operations that the grant permits.
+ //
+ // This list must include only operations that are permitted in a grant. Also, the
+ // operation must be supported on the KMS key. For example, you cannot create a
+ // grant for a symmetric encryption KMS key that allows the Signoperation, or a grant
+ // for an asymmetric KMS key that allows the GenerateDataKeyoperation. If you try, KMS returns a
+ // ValidationError exception. For details, see [Grant operations] in the Key Management Service
+ // Developer Guide.
+ //
+ // [Grant operations]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations
+ //
+ // This member is required.
+ Operations []types.GrantOperation
+
+ // Specifies a grant constraint.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // KMS supports the EncryptionContextEquals and EncryptionContextSubset grant
+ // constraints, which allow the permissions in the grant only when the encryption
+ // context in the request matches ( EncryptionContextEquals ) or includes (
+ // EncryptionContextSubset ) the encryption context specified in the constraint.
+ //
+ // The encryption context grant constraints are supported only on [grant operations] that include an
+ // EncryptionContext parameter, such as cryptographic operations on symmetric
+ // encryption KMS keys. Grants with grant constraints can include the DescribeKeyand RetireGrant
+ // operations, but the constraint doesn't apply to these operations. If a grant
+ // with a grant constraint includes the CreateGrant operation, the constraint
+ // requires that any grants created with the CreateGrant permission have an
+ // equally strict or stricter encryption context constraint.
+ //
+ // You cannot use an encryption context grant constraint for cryptographic
+ // operations with asymmetric KMS keys or HMAC KMS keys. Operations with these keys
+ // don't support an encryption context.
+ //
+ // Each constraint value can include up to 8 encryption context pairs. The
+ // encryption context value in each constraint cannot exceed 384 characters. For
+ // information about grant constraints, see [Using grant constraints]in the Key Management Service
+ // Developer Guide. For more information about encryption context, see [Encryption context]in the Key
+ // Management Service Developer Guide .
+ //
+ // [grant operations]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations
+ // [Using grant constraints]: https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ Constraints *types.GrantConstraints
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ // A friendly name for the grant. Use this value to prevent the unintended
+ // creation of duplicate grants when retrying this request.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // When this value is absent, all CreateGrant requests result in a new grant with
+ // a unique GrantId even if all the supplied parameters are identical. This can
+ // result in unintended duplicates when you retry the CreateGrant request.
+ //
+ // When this value is present, you can retry a CreateGrant request with identical
+ // parameters; if the grant already exists, the original GrantId is returned
+ // without creating a new grant. Note that the returned grant token is unique with
+ // every CreateGrant request, even when a duplicate GrantId is returned. All grant
+ // tokens for the same grant ID can be used interchangeably.
+ Name *string
+
+ // The principal that has permission to use the RetireGrant operation to retire the grant.
+ //
+ // To specify the principal, use the [Amazon Resource Name (ARN)] of an Amazon Web Services principal. Valid
+ // principals include Amazon Web Services accounts, IAM users, IAM roles, federated
+ // users, and assumed role users. For help with the ARN syntax for a principal, see
+ // [IAM ARNs]in the Identity and Access Management User Guide .
+ //
+ // The grant determines the retiring principal. Other principals might have
+ // permission to retire the grant or revoke the grant. For details, see RevokeGrantand [Retiring and revoking grants] in
+ // the Key Management Service Developer Guide.
+ //
+ // [IAM ARNs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
+ // [Amazon Resource Name (ARN)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
+ // [Retiring and revoking grants]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete
+ RetiringPrincipal *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateGrantOutput struct {
+
+ // The unique identifier for the grant.
+ //
+ // You can use the GrantId in a ListGrants, RetireGrant, or RevokeGrant operation.
+ GrantId *string
+
+ // The grant token.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantToken *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateGrantMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateGrant{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateGrant{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateGrant"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateGrantValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGrant(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateGrant(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateGrant",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateKey.go
new file mode 100644
index 000000000..259c5fce6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_CreateKey.go
@@ -0,0 +1,599 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a unique customer managed [KMS key] in your Amazon Web Services account and
+// Region. You can use a KMS key in cryptographic operations, such as encryption
+// and signing. Some Amazon Web Services services let you use KMS keys that you
+// create and manage to protect your service resources.
+//
+// A KMS key is a logical representation of a cryptographic key. In addition to
+// the key material used in cryptographic operations, a KMS key includes metadata,
+// such as the key ID, key policy, creation date, description, and key state. For
+// details, see [Managing keys]in the Key Management Service Developer Guide
+//
+// Use the parameters of CreateKey to specify the type of KMS key, the source of
+// its key material, its key policy, description, tags, and other properties.
+//
+// KMS has replaced the term customer master key (CMK) with KMS key and KMS key.
+// The concept has not changed. To prevent breaking changes, KMS is keeping some
+// variations of this term.
+//
+// To create different types of KMS keys, use the following guidance:
+//
+// Symmetric encryption KMS key By default, CreateKey creates a symmetric
+// encryption KMS key with key material that KMS generates. This is the basic and
+// most widely used type of KMS key, and provides the best performance.
+//
+// To create a symmetric encryption KMS key, you don't need to specify any
+// parameters. The default value for KeySpec , SYMMETRIC_DEFAULT , the default
+// value for KeyUsage , ENCRYPT_DECRYPT , and the default value for Origin ,
+// AWS_KMS , create a symmetric encryption KMS key with KMS key material.
+//
+// If you need a key for basic encryption and decryption or you are creating a KMS
+// key to protect your resources in an Amazon Web Services service, create a
+// symmetric encryption KMS key. The key material in a symmetric encryption key
+// never leaves KMS unencrypted. You can use a symmetric encryption KMS key to
+// encrypt and decrypt data up to 4,096 bytes, but they are typically used to
+// generate data keys and data keys pairs. For details, see GenerateDataKeyand GenerateDataKeyPair.
+//
+// Asymmetric KMS keys To create an asymmetric KMS key, use the KeySpec parameter
+// to specify the type of key material in the KMS key. Then, use the KeyUsage
+// parameter to determine whether the KMS key will be used to encrypt and decrypt
+// or sign and verify. You can't change these properties after the KMS key is
+// created.
+//
+// Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, or
+// an SM2 key pair (China Regions only). The private key in an asymmetric KMS key
+// never leaves KMS unencrypted. However, you can use the GetPublicKeyoperation to download
+// the public key so it can be used outside of KMS. Each KMS key can have only one
+// key usage. KMS keys with RSA key pairs can be used to encrypt and decrypt data
+// or sign and verify messages (but not both). KMS keys with NIST-recommended ECC
+// key pairs can be used to sign and verify messages or derive shared secrets (but
+// not both). KMS keys with ECC_SECG_P256K1 can be used only to sign and verify
+// messages. KMS keys with SM2 key pairs (China Regions only) can be used to either
+// encrypt and decrypt data, sign and verify messages, or derive shared secrets
+// (you must choose one key usage type). For information about asymmetric KMS keys,
+// see [Asymmetric KMS keys]in the Key Management Service Developer Guide.
+//
+// HMAC KMS key To create an HMAC KMS key, set the KeySpec parameter to a key spec
+// value for HMAC KMS keys. Then set the KeyUsage parameter to GENERATE_VERIFY_MAC
+// . You must set the key usage even though GENERATE_VERIFY_MAC is the only valid
+// key usage value for HMAC KMS keys. You can't change these properties after the
+// KMS key is created.
+//
+// HMAC KMS keys are symmetric keys that never leave KMS unencrypted. You can use
+// HMAC keys to generate (GenerateMac ) and verify (VerifyMac ) HMAC codes for messages up to 4096
+// bytes.
+//
+// Multi-Region primary keys Imported key material To create a multi-Region
+// primary key in the local Amazon Web Services Region, use the MultiRegion
+// parameter with a value of True . To create a multi-Region replica key, that is,
+// a KMS key with the same key ID and key material as a primary key, but in a
+// different Amazon Web Services Region, use the ReplicateKeyoperation. To change a replica
+// key to a primary key, and its primary key to a replica key, use the UpdatePrimaryRegionoperation.
+//
+// You can create multi-Region KMS keys for all supported KMS key types: symmetric
+// encryption KMS keys, HMAC KMS keys, asymmetric encryption KMS keys, and
+// asymmetric signing KMS keys. You can also create multi-Region keys with imported
+// key material. However, you can't create multi-Region keys in a custom key store.
+//
+// This operation supports multi-Region keys, an KMS feature that lets you create
+// multiple interoperable KMS keys in different Amazon Web Services Regions.
+// Because these KMS keys have the same key ID, key material, and other metadata,
+// you can use them interchangeably to encrypt data in one Amazon Web Services
+// Region and decrypt it in a different Amazon Web Services Region without
+// re-encrypting the data or making a cross-Region call. For more information about
+// multi-Region keys, see [Multi-Region keys in KMS]in the Key Management Service Developer Guide.
+//
+// To import your own key material into a KMS key, begin by creating a KMS key
+// with no key material. To do this, use the Origin parameter of CreateKey with a
+// value of EXTERNAL . Next, use GetParametersForImport operation to get a public key and import token.
+// Use the wrapping public key to encrypt your key material. Then, use ImportKeyMaterialwith your
+// import token to import the key material. For step-by-step instructions, see [Importing Key Material]in
+// the Key Management Service Developer Guide .
+//
+// You can import key material into KMS keys of all supported KMS key types:
+// symmetric encryption KMS keys, HMAC KMS keys, asymmetric encryption KMS keys,
+// and asymmetric signing KMS keys. You can also create multi-Region keys with
+// imported key material. However, you can't import key material into a KMS key in
+// a custom key store.
+//
+// To create a multi-Region primary key with imported key material, use the Origin
+// parameter of CreateKey with a value of EXTERNAL and the MultiRegion parameter
+// with a value of True . To create replicas of the multi-Region primary key, use
+// the ReplicateKeyoperation. For instructions, see [Importing key material into multi-Region keys]. For more information about multi-Region
+// keys, see [Multi-Region keys in KMS]in the Key Management Service Developer Guide.
+//
+// Custom key store A [custom key store] lets you protect your Amazon Web Services resources using
+// keys in a backing key store that you own and manage. When you request a
+// cryptographic operation with a KMS key in a custom key store, the operation is
+// performed in the backing key store using its cryptographic keys.
+//
+// KMS supports [CloudHSM key stores] backed by an CloudHSM cluster and [external key stores] backed by an external key
+// manager outside of Amazon Web Services. When you create a KMS key in an CloudHSM
+// key store, KMS generates an encryption key in the CloudHSM cluster and
+// associates it with the KMS key. When you create a KMS key in an external key
+// store, you specify an existing encryption key in the external key manager.
+//
+// Some external key managers provide a simpler method for creating a KMS key in
+// an external key store. For details, see your external key manager documentation.
+//
+// Before you create a KMS key in a custom key store, the ConnectionState of the
+// key store must be CONNECTED . To connect the custom key store, use the ConnectCustomKeyStore
+// operation. To find the ConnectionState , use the DescribeCustomKeyStores operation.
+//
+// To create a KMS key in a custom key store, use the CustomKeyStoreId . Use the
+// default KeySpec value, SYMMETRIC_DEFAULT , and the default KeyUsage value,
+// ENCRYPT_DECRYPT to create a symmetric encryption key. No other key type is
+// supported in a custom key store.
+//
+// To create a KMS key in an [CloudHSM key store], use the Origin parameter with a value of
+// AWS_CLOUDHSM . The CloudHSM cluster that is associated with the custom key store
+// must have at least two active HSMs in different Availability Zones in the Amazon
+// Web Services Region.
+//
+// To create a KMS key in an [external key store], use the Origin parameter with a value of
+// EXTERNAL_KEY_STORE and an XksKeyId parameter that identifies an existing
+// external key.
+//
+// Some external key managers provide a simpler method for creating a KMS key in
+// an external key store. For details, see your external key manager documentation.
+//
+// Cross-account use: No. You cannot use this operation to create a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:CreateKey] (IAM policy). To use the Tags parameter, [kms:TagResource] (IAM policy).
+// For examples and information about related permissions, see [Allow a user to create KMS keys]in the Key
+// Management Service Developer Guide.
+//
+// Related operations:
+//
+// # DescribeKey
+//
+// # ListKeys
+//
+// # ScheduleKeyDeletion
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [CloudHSM key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
+// [external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
+// [external key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
+// [Asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [Multi-Region keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
+// [Managing keys]: https://docs.aws.amazon.com/kms/latest/developerguide/getting-started.html
+// [KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms-keys
+// [Allow a user to create KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [kms:TagResource]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
+// [kms:CreateKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Importing key material into multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-import.html
+// [Importing Key Material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) CreateKey(ctx context.Context, params *CreateKeyInput, optFns ...func(*Options)) (*CreateKeyOutput, error) {
+ if params == nil {
+ params = &CreateKeyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "CreateKey", params, optFns, c.addOperationCreateKeyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*CreateKeyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type CreateKeyInput struct {
+
+ // Skips ("bypasses") the key policy lockout safety check. The default value is
+ // false.
+ //
+ // Setting this value to true increases the risk that the KMS key becomes
+ // unmanageable. Do not set this value to true indiscriminately.
+ //
+ // For more information, see [Default key policy] in the Key Management Service Developer Guide.
+ //
+ // Use this parameter only when you intend to prevent the principal that is making
+ // the request from making a subsequent [PutKeyPolicy]request on the KMS key.
+ //
+ // [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
+ // [PutKeyPolicy]: https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html
+ BypassPolicyLockoutSafetyCheck bool
+
+ // Creates the KMS key in the specified [custom key store]. The ConnectionState of the custom key
+ // store must be CONNECTED . To find the CustomKeyStoreID and ConnectionState use
+ // the DescribeCustomKeyStoresoperation.
+ //
+ // This parameter is valid only for symmetric encryption KMS keys in a single
+ // Region. You cannot create any other type of KMS key in a custom key store.
+ //
+ // When you create a KMS key in an CloudHSM key store, KMS generates a
+ // non-exportable 256-bit symmetric key in its associated CloudHSM cluster and
+ // associates it with the KMS key. When you create a KMS key in an external key
+ // store, you must use the XksKeyId parameter to specify an external key that
+ // serves as key material for the KMS key.
+ //
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ CustomKeyStoreId *string
+
+ // Instead, use the KeySpec parameter.
+ //
+ // The KeySpec and CustomerMasterKeySpec parameters work the same way. Only the
+ // names differ. We recommend that you use KeySpec parameter in your code.
+ // However, to avoid breaking changes, KMS supports both parameters.
+ //
+ // Deprecated: This parameter has been deprecated. Instead, use the KeySpec
+ // parameter.
+ CustomerMasterKeySpec types.CustomerMasterKeySpec
+
+ // A description of the KMS key. Use a description that helps you decide whether
+ // the KMS key is appropriate for a task. The default value is an empty string (no
+ // description).
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // To set or change the description after the key is created, use UpdateKeyDescription.
+ Description *string
+
+ // Specifies the type of KMS key to create. The default value, SYMMETRIC_DEFAULT ,
+ // creates a KMS key with a 256-bit AES-GCM key that is used for encryption and
+ // decryption, except in China Regions, where it creates a 128-bit symmetric key
+ // that uses SM4 encryption. For help choosing a key spec for your KMS key, see [Choosing a KMS key type]in
+ // the Key Management Service Developer Guide .
+ //
+ // The KeySpec determines whether the KMS key contains a symmetric key or an
+ // asymmetric key pair. It also determines the algorithms that the KMS key
+ // supports. You can't change the KeySpec after the KMS key is created. To further
+ // restrict the algorithms that can be used with the KMS key, use a condition key
+ // in its key policy or IAM policy. For more information, see [kms:EncryptionAlgorithm], [kms:MacAlgorithm] or [kms:Signing Algorithm] in the Key
+ // Management Service Developer Guide .
+ //
+ // [Amazon Web Services services that are integrated with KMS]use symmetric encryption KMS keys to protect your data. These services do not
+ // support asymmetric KMS keys or HMAC KMS keys.
+ //
+ // KMS supports the following key specs for KMS keys:
+ //
+ // - Symmetric encryption key (default)
+ //
+ // - SYMMETRIC_DEFAULT
+ //
+ // - HMAC keys (symmetric)
+ //
+ // - HMAC_224
+ //
+ // - HMAC_256
+ //
+ // - HMAC_384
+ //
+ // - HMAC_512
+ //
+ // - Asymmetric RSA key pairs (encryption and decryption -or- signing and
+ // verification)
+ //
+ // - RSA_2048
+ //
+ // - RSA_3072
+ //
+ // - RSA_4096
+ //
+ // - Asymmetric NIST-recommended elliptic curve key pairs (signing and
+ // verification -or- deriving shared secrets)
+ //
+ // - ECC_NIST_P256 (secp256r1)
+ //
+ // - ECC_NIST_P384 (secp384r1)
+ //
+ // - ECC_NIST_P521 (secp521r1)
+ //
+ // - Other asymmetric elliptic curve key pairs (signing and verification)
+ //
+ // - ECC_SECG_P256K1 (secp256k1), commonly used for cryptocurrencies.
+ //
+ // - SM2 key pairs (encryption and decryption -or- signing and verification -or-
+ // deriving shared secrets)
+ //
+ // - SM2 (China Regions only)
+ //
+ // [kms:EncryptionAlgorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-algorithm
+ // [kms:Signing Algorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-signing-algorithm
+ // [kms:MacAlgorithm]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-mac-algorithm
+ // [Choosing a KMS key type]: https://docs.aws.amazon.com/kms/latest/developerguide/key-types.html#symm-asymm-choose
+ // [Amazon Web Services services that are integrated with KMS]: http://aws.amazon.com/kms/features/#AWS_Service_Integration
+ KeySpec types.KeySpec
+
+ // Determines the [cryptographic operations] for which you can use the KMS key. The default value is
+ // ENCRYPT_DECRYPT . This parameter is optional when you are creating a symmetric
+ // encryption KMS key; otherwise, it is required. You can't change the KeyUsage
+ // value after the KMS key is created.
+ //
+ // Select only one valid value.
+ //
+ // - For symmetric encryption KMS keys, omit the parameter or specify
+ // ENCRYPT_DECRYPT .
+ //
+ // - For HMAC KMS keys (symmetric), specify GENERATE_VERIFY_MAC .
+ //
+ // - For asymmetric KMS keys with RSA key pairs, specify ENCRYPT_DECRYPT or
+ // SIGN_VERIFY .
+ //
+ // - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs,
+ // specify SIGN_VERIFY or KEY_AGREEMENT .
+ //
+ // - For asymmetric KMS keys with ECC_SECG_P256K1 key pairs specify SIGN_VERIFY .
+ //
+ // - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify
+ // ENCRYPT_DECRYPT , SIGN_VERIFY , or KEY_AGREEMENT .
+ //
+ // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ KeyUsage types.KeyUsageType
+
+ // Creates a multi-Region primary key that you can replicate into other Amazon Web
+ // Services Regions. You cannot change this value after you create the KMS key.
+ //
+ // For a multi-Region key, set this parameter to True . For a single-Region KMS
+ // key, omit this parameter or set it to False . The default value is False .
+ //
+ // This operation supports multi-Region keys, an KMS feature that lets you create
+ // multiple interoperable KMS keys in different Amazon Web Services Regions.
+ // Because these KMS keys have the same key ID, key material, and other metadata,
+ // you can use them interchangeably to encrypt data in one Amazon Web Services
+ // Region and decrypt it in a different Amazon Web Services Region without
+ // re-encrypting the data or making a cross-Region call. For more information about
+ // multi-Region keys, see [Multi-Region keys in KMS]in the Key Management Service Developer Guide.
+ //
+ // This value creates a primary key, not a replica. To create a replica key, use
+ // the ReplicateKeyoperation.
+ //
+ // You can create a symmetric or asymmetric multi-Region key, and you can create a
+ // multi-Region key with imported key material. However, you cannot create a
+ // multi-Region key in a custom key store.
+ //
+ // [Multi-Region keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
+ MultiRegion *bool
+
+ // The source of the key material for the KMS key. You cannot change the origin
+ // after you create the KMS key. The default is AWS_KMS , which means that KMS
+ // creates the key material.
+ //
+ // To [create a KMS key with no key material] (for imported key material), set this value to EXTERNAL . For more
+ // information about importing key material into KMS, see [Importing Key Material]in the Key Management
+ // Service Developer Guide. The EXTERNAL origin value is valid only for symmetric
+ // KMS keys.
+ //
+ // To [create a KMS key in an CloudHSM key store] and create its key material in the associated CloudHSM cluster, set this
+ // value to AWS_CLOUDHSM . You must also use the CustomKeyStoreId parameter to
+ // identify the CloudHSM key store. The KeySpec value must be SYMMETRIC_DEFAULT .
+ //
+ // To [create a KMS key in an external key store], set this value to EXTERNAL_KEY_STORE . You must also use the
+ // CustomKeyStoreId parameter to identify the external key store and the XksKeyId
+ // parameter to identify the associated external key. The KeySpec value must be
+ // SYMMETRIC_DEFAULT .
+ //
+ // [create a KMS key in an external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/create-xks-keys.html
+ // [create a KMS key in an CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/create-cmk-keystore.html
+ // [Importing Key Material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+ // [create a KMS key with no key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-create-cmk.html
+ Origin types.OriginType
+
+ // The key policy to attach to the KMS key.
+ //
+ // If you provide a key policy, it must meet the following criteria:
+ //
+ // - The key policy must allow the calling principal to make a subsequent
+ // PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key
+ // becomes unmanageable. For more information, see [Default key policy]in the Key Management Service
+ // Developer Guide. (To omit this condition, set BypassPolicyLockoutSafetyCheck
+ // to true.)
+ //
+ // - Each statement in the key policy must contain one or more principals. The
+ // principals in the key policy must exist and be visible to KMS. When you create a
+ // new Amazon Web Services principal, you might need to enforce a delay before
+ // including the new principal in a key policy because the new principal might not
+ // be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible]in the Amazon Web
+ // Services Identity and Access Management User Guide.
+ //
+ // If you do not provide a key policy, KMS attaches a default key policy to the
+ // KMS key. For more information, see [Default key policy]in the Key Management Service Developer
+ // Guide.
+ //
+ // The key policy size quota is 32 kilobytes (32768 bytes).
+ //
+ // For help writing and formatting a JSON policy document, see the [IAM JSON Policy Reference] in the
+ // Identity and Access Management User Guide .
+ //
+ // [IAM JSON Policy Reference]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
+ // [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
+ // [Changes that I make are not always immediately visible]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
+ Policy *string
+
+ // Assigns one or more tags to the KMS key. Use this parameter to tag the KMS key
+ // when it is created. To tag an existing KMS key, use the TagResourceoperation.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // Tagging or untagging a KMS key can allow or deny permission to the KMS key. For
+ // details, see [ABAC for KMS]in the Key Management Service Developer Guide.
+ //
+ // To use this parameter, you must have [kms:TagResource] permission in an IAM policy.
+ //
+ // Each tag consists of a tag key and a tag value. Both the tag key and the tag
+ // value are required, but the tag value can be an empty (null) string. You cannot
+ // have more than one tag on a KMS key with the same tag key. If you specify an
+ // existing tag key with a different tag value, KMS replaces the current tag value
+ // with the specified one.
+ //
+ // When you add tags to an Amazon Web Services resource, Amazon Web Services
+ // generates a cost allocation report with usage and costs aggregated by tags. Tags
+ // can also be used to control access to a KMS key. For details, see [Tagging Keys].
+ //
+ // [kms:TagResource]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+ // [Tagging Keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
+ // [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+ Tags []types.Tag
+
+ // Identifies the [external key] that serves as key material for the KMS key in an [external key store]. Specify the
+ // ID that the [external key store proxy]uses to refer to the external key. For help, see the documentation
+ // for your external key store proxy.
+ //
+ // This parameter is required for a KMS key with an Origin value of
+ // EXTERNAL_KEY_STORE . It is not valid for KMS keys with any other Origin value.
+ //
+ // The external key must be an existing 256-bit AES symmetric encryption key
+ // hosted outside of Amazon Web Services in an external key manager associated with
+ // the external key store specified by the CustomKeyStoreId parameter. This key
+ // must be enabled and configured to perform encryption and decryption. Each KMS
+ // key in an external key store must use a different external key. For details, see
+ // [Requirements for a KMS key in an external key store]in the Key Management Service Developer Guide.
+ //
+ // Each KMS key in an external key store is associated two backing keys. One is
+ // key material that KMS generates. The other is the external key specified by this
+ // parameter. When you use the KMS key in an external key store to encrypt data,
+ // the encryption operation is performed first by KMS using the KMS key material,
+ // and then by the external key manager using the specified external key, a process
+ // known as double encryption. For details, see [Double encryption]in the Key Management Service
+ // Developer Guide.
+ //
+ // [external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
+ // [Double encryption]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-double-encryption
+ // [external key]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key
+ // [Requirements for a KMS key in an external key store]: https://docs.aws.amazon.com/create-xks-keys.html#xks-key-requirements
+ // [external key store proxy]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-xks-proxy
+ XksKeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type CreateKeyOutput struct {
+
+ // Metadata associated with the KMS key.
+ KeyMetadata *types.KeyMetadata
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationCreateKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "CreateKey"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpCreateKeyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateKey(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opCreateKey(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "CreateKey",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Decrypt.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Decrypt.go
new file mode 100644
index 000000000..93d64f580
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Decrypt.go
@@ -0,0 +1,362 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Decrypts ciphertext that was encrypted by a KMS key using any of the following
+// operations:
+//
+// # Encrypt
+//
+// # GenerateDataKey
+//
+// # GenerateDataKeyPair
+//
+// # GenerateDataKeyWithoutPlaintext
+//
+// # GenerateDataKeyPairWithoutPlaintext
+//
+// You can use this operation to decrypt ciphertext that was encrypted under a
+// symmetric encryption KMS key or an asymmetric encryption KMS key. When the KMS
+// key is asymmetric, you must specify the KMS key and the encryption algorithm
+// that was used to encrypt the ciphertext. For information about asymmetric KMS
+// keys, see [Asymmetric KMS keys]in the Key Management Service Developer Guide.
+//
+// The Decrypt operation also decrypts ciphertext that was encrypted outside of
+// KMS by the public key in an KMS asymmetric KMS key. However, it cannot decrypt
+// symmetric ciphertext produced by other libraries, such as the [Amazon Web Services Encryption SDK]or [Amazon S3 client-side encryption]. These
+// libraries return a ciphertext format that is incompatible with KMS.
+//
+// If the ciphertext was encrypted under a symmetric encryption KMS key, the KeyId
+// parameter is optional. KMS can get this information from metadata that it adds
+// to the symmetric ciphertext blob. This feature adds durability to your
+// implementation by ensuring that authorized users can decrypt ciphertext decades
+// after it was encrypted, even if they've lost track of the key ID. However,
+// specifying the KMS key is always recommended as a best practice. When you use
+// the KeyId parameter to specify a KMS key, KMS only uses the KMS key you
+// specify. If the ciphertext was encrypted under a different KMS key, the Decrypt
+// operation fails. This practice ensures that you use the KMS key that you intend.
+//
+// Whenever possible, use key policies to give users permission to call the Decrypt
+// operation on a particular KMS key, instead of using &IAM; policies. Otherwise,
+// you might create an &IAM; policy that gives the user Decrypt permission on all
+// KMS keys. This user could decrypt ciphertext that was encrypted by KMS keys in
+// other accounts if the key policy for the cross-account KMS key permits it. If
+// you must use an IAM policy for Decrypt permissions, limit the user to
+// particular KMS keys or particular trusted accounts. For details, see [Best practices for IAM policies]in the Key
+// Management Service Developer Guide.
+//
+// Decrypt also supports [Amazon Web Services Nitro Enclaves], which provide an isolated compute environment in Amazon
+// EC2. To call Decrypt for a Nitro enclave, use the [Amazon Web Services Nitro Enclaves SDK] or any Amazon Web Services
+// SDK. Use the Recipient parameter to provide the attestation document for the
+// enclave. Instead of the plaintext data, the response includes the plaintext data
+// encrypted with the public key from the attestation document (
+// CiphertextForRecipient ). For information about the interaction between KMS and
+// Amazon Web Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer
+// Guide.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. If you use the KeyId parameter to identify a KMS key in
+// a different Amazon Web Services account, specify the key ARN or the alias ARN of
+// the KMS key.
+//
+// Required permissions: [kms:Decrypt] (key policy)
+//
+// Related operations:
+//
+// # Encrypt
+//
+// # GenerateDataKey
+//
+// # GenerateDataKeyPair
+//
+// # ReEncrypt
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Amazon Web Services Encryption SDK]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:Decrypt]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [Amazon Web Services Nitro Enclaves]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
+// [Amazon S3 client-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
+// [Best practices for IAM policies]: https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policies-best-practices
+// [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+func (c *Client) Decrypt(ctx context.Context, params *DecryptInput, optFns ...func(*Options)) (*DecryptOutput, error) {
+ if params == nil {
+ params = &DecryptInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "Decrypt", params, optFns, c.addOperationDecryptMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DecryptOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DecryptInput struct {
+
+ // Ciphertext to be decrypted. The blob includes metadata.
+ //
+ // This member is required.
+ CiphertextBlob []byte
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // Specifies the encryption algorithm that will be used to decrypt the ciphertext.
+ // Specify the same algorithm that was used to encrypt the data. If you specify a
+ // different algorithm, the Decrypt operation fails.
+ //
+ // This parameter is required only when the ciphertext was encrypted under an
+ // asymmetric KMS key. The default value, SYMMETRIC_DEFAULT , represents the only
+ // supported algorithm that is valid for symmetric encryption KMS keys.
+ EncryptionAlgorithm types.EncryptionAlgorithmSpec
+
+ // Specifies the encryption context to use when decrypting the data. An encryption
+ // context is valid only for [cryptographic operations]with a symmetric encryption KMS key. The standard
+ // asymmetric encryption algorithms and HMAC algorithms that KMS uses do not
+ // support an encryption context.
+ //
+ // An encryption context is a collection of non-secret key-value pairs that
+ // represent additional authenticated data. When you use an encryption context to
+ // encrypt data, you must specify the same (an exact case-sensitive match)
+ // encryption context to decrypt the data. An encryption context is supported only
+ // on operations with symmetric encryption KMS keys. On operations with symmetric
+ // encryption KMS keys, an encryption context is optional, but it is strongly
+ // recommended.
+ //
+ // For more information, see [Encryption context] in the Key Management Service Developer Guide.
+ //
+ // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ EncryptionContext map[string]string
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ // Specifies the KMS key that KMS uses to decrypt the ciphertext.
+ //
+ // Enter a key ID of the KMS key that was used to encrypt the ciphertext. If you
+ // identify a different KMS key, the Decrypt operation throws an
+ // IncorrectKeyException .
+ //
+ // This parameter is required only when the ciphertext was encrypted under an
+ // asymmetric KMS key. If you used a symmetric encryption KMS key, KMS can get the
+ // KMS key from metadata that it adds to the symmetric ciphertext blob. However, it
+ // is always recommended as a best practice. This practice ensures that you use the
+ // KMS key that you intend.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ KeyId *string
+
+ // A signed [attestation document] from an Amazon Web Services Nitro enclave and the encryption
+ // algorithm to use with the enclave's public key. The only valid encryption
+ // algorithm is RSAES_OAEP_SHA_256 .
+ //
+ // This parameter only supports attestation documents for Amazon Web Services
+ // Nitro Enclaves. To include this parameter, use the [Amazon Web Services Nitro Enclaves SDK]or any Amazon Web Services
+ // SDK.
+ //
+ // When you use this parameter, instead of returning the plaintext data, KMS
+ // encrypts the plaintext data with the public key in the attestation document, and
+ // returns the resulting ciphertext in the CiphertextForRecipient field in the
+ // response. This ciphertext can be decrypted only with the private key in the
+ // enclave. The Plaintext field in the response is null or empty.
+ //
+ // For information about the interaction between KMS and Amazon Web Services Nitro
+ // Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [attestation document]: https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-concepts.html#term-attestdoc
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ // [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+ Recipient *types.RecipientInfo
+
+ noSmithyDocumentSerde
+}
+
+type DecryptOutput struct {
+
+ // The plaintext data encrypted with the public key in the attestation document.
+ //
+ // This field is included in the response only when the Recipient parameter in the
+ // request includes a valid attestation document from an Amazon Web Services Nitro
+ // enclave. For information about the interaction between KMS and Amazon Web
+ // Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ CiphertextForRecipient []byte
+
+ // The encryption algorithm that was used to decrypt the ciphertext.
+ EncryptionAlgorithm types.EncryptionAlgorithmSpec
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key that was used to decrypt the
+ // ciphertext.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // Decrypted plaintext data. When you use the HTTP API or the Amazon Web Services
+ // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
+ //
+ // If the response includes the CiphertextForRecipient field, the Plaintext field
+ // is null or empty.
+ Plaintext []byte
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDecryptMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDecrypt{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDecrypt{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "Decrypt"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDecryptValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDecrypt(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDecrypt(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "Decrypt",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteAlias.go
new file mode 100644
index 000000000..58af22e36
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteAlias.go
@@ -0,0 +1,194 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified alias.
+//
+// Adding, deleting, or updating an alias can allow or deny permission to the KMS
+// key. For details, see [ABAC for KMS]in the Key Management Service Developer Guide.
+//
+// Because an alias is not a property of a KMS key, you can delete and change the
+// aliases of a KMS key without affecting the KMS key. Also, aliases do not appear
+// in the response from the DescribeKeyoperation. To get the aliases of all KMS keys, use the ListAliases
+// operation.
+//
+// Each KMS key can have multiple aliases. To change the alias of a KMS key, use DeleteAlias
+// to delete the current alias and CreateAliasto create a new alias. To associate an existing
+// alias with a different KMS key, call UpdateAlias.
+//
+// Cross-account use: No. You cannot perform this operation on an alias in a
+// different Amazon Web Services account.
+//
+// # Required permissions
+//
+// [kms:DeleteAlias]
+// - on the alias (IAM policy).
+//
+// [kms:DeleteAlias]
+// - on the KMS key (key policy).
+//
+// For details, see [Controlling access to aliases] in the Key Management Service Developer Guide.
+//
+// Related operations:
+//
+// # CreateAlias
+//
+// # ListAliases
+//
+// # UpdateAlias
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+// [kms:DeleteAlias]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
+func (c *Client) DeleteAlias(ctx context.Context, params *DeleteAliasInput, optFns ...func(*Options)) (*DeleteAliasOutput, error) {
+ if params == nil {
+ params = &DeleteAliasInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteAlias", params, optFns, c.addOperationDeleteAliasMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteAliasOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteAliasInput struct {
+
+ // The alias to be deleted. The alias name must begin with alias/ followed by the
+ // alias name, such as alias/ExampleAlias .
+ //
+ // This member is required.
+ AliasName *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteAliasOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteAliasMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAlias"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteAliasValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAlias(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteAlias(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteAlias",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteCustomKeyStore.go
new file mode 100644
index 000000000..b773858b9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteCustomKeyStore.go
@@ -0,0 +1,211 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a [custom key store]. This operation does not affect any backing elements of the custom
+// key store. It does not delete the CloudHSM cluster that is associated with an
+// CloudHSM key store, or affect any users or keys in the cluster. For an external
+// key store, it does not affect the external key store proxy, external key
+// manager, or any external keys.
+//
+// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
+// and extensive integration of KMS with the isolation and control of a key store
+// that you own and manage.
+//
+// The custom key store that you delete cannot contain any [KMS keys]. Before deleting the
+// key store, verify that you will never need to use any of the KMS keys in the key
+// store for any [cryptographic operations]. Then, use ScheduleKeyDeletion to delete the KMS keys from the key store. After the
+// required waiting period expires and all KMS keys are deleted from the custom key
+// store, use DisconnectCustomKeyStoreto disconnect the key store from KMS. Then, you can delete the
+// custom key store.
+//
+// For keys in an CloudHSM key store, the ScheduleKeyDeletion operation makes a
+// best effort to delete the key material from the associated cluster. However, you
+// might need to manually [delete the orphaned key material]from the cluster and its backups. KMS never creates,
+// manages, or deletes cryptographic keys in the external key manager associated
+// with an external key store. You must manage them using your external key manager
+// tools.
+//
+// Instead of deleting the custom key store, consider using the DisconnectCustomKeyStore operation to
+// disconnect the custom key store from its backing key store. While the key store
+// is disconnected, you cannot create or use the KMS keys in the key store. But,
+// you do not need to delete KMS keys and you can reconnect a disconnected custom
+// key store at any time.
+//
+// If the operation succeeds, it returns a JSON object with no properties.
+//
+// Cross-account use: No. You cannot perform this operation on a custom key store
+// in a different Amazon Web Services account.
+//
+// Required permissions: [kms:DeleteCustomKeyStore] (IAM policy)
+//
+// Related operations:
+//
+// # ConnectCustomKeyStore
+//
+// # CreateCustomKeyStore
+//
+// # DescribeCustomKeyStores
+//
+// # DisconnectCustomKeyStore
+//
+// # UpdateCustomKeyStore
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [delete the orphaned key material]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
+// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [kms:DeleteCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+// [KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) DeleteCustomKeyStore(ctx context.Context, params *DeleteCustomKeyStoreInput, optFns ...func(*Options)) (*DeleteCustomKeyStoreOutput, error) {
+ if params == nil {
+ params = &DeleteCustomKeyStoreInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteCustomKeyStore", params, optFns, c.addOperationDeleteCustomKeyStoreMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteCustomKeyStoreOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteCustomKeyStoreInput struct {
+
+ // Enter the ID of the custom key store you want to delete. To find the ID of a
+ // custom key store, use the DescribeCustomKeyStoresoperation.
+ //
+ // This member is required.
+ CustomKeyStoreId *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteCustomKeyStoreOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteCustomKeyStoreMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCustomKeyStore"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteCustomKeyStoreValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCustomKeyStore(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteCustomKeyStore(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteCustomKeyStore",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteImportedKeyMaterial.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteImportedKeyMaterial.go
new file mode 100644
index 000000000..c952f6305
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeleteImportedKeyMaterial.go
@@ -0,0 +1,193 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes key material that was previously imported. This operation makes the
+// specified KMS key temporarily unusable. To restore the usability of the KMS key,
+// reimport the same key material. For more information about importing key
+// material into KMS, see [Importing Key Material]in the Key Management Service Developer Guide.
+//
+// When the specified KMS key is in the PendingDeletion state, this operation does
+// not change the KMS key's state. Otherwise, it changes the KMS key's state to
+// PendingImport .
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:DeleteImportedKeyMaterial] (key policy)
+//
+// Related operations:
+//
+// # GetParametersForImport
+//
+// # ImportKeyMaterial
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:DeleteImportedKeyMaterial]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Importing Key Material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) DeleteImportedKeyMaterial(ctx context.Context, params *DeleteImportedKeyMaterialInput, optFns ...func(*Options)) (*DeleteImportedKeyMaterialOutput, error) {
+ if params == nil {
+ params = &DeleteImportedKeyMaterialInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeleteImportedKeyMaterial", params, optFns, c.addOperationDeleteImportedKeyMaterialMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeleteImportedKeyMaterialOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeleteImportedKeyMaterialInput struct {
+
+ // Identifies the KMS key from which you are deleting imported key material. The
+ // Origin of the KMS key must be EXTERNAL .
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type DeleteImportedKeyMaterialOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeleteImportedKeyMaterialMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteImportedKeyMaterial{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteImportedKeyMaterial{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteImportedKeyMaterial"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeleteImportedKeyMaterialValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteImportedKeyMaterial(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeleteImportedKeyMaterial(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeleteImportedKeyMaterial",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeriveSharedSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeriveSharedSecret.go
new file mode 100644
index 000000000..fef5dc426
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DeriveSharedSecret.go
@@ -0,0 +1,364 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Derives a shared secret using a key agreement algorithm.
+//
+// You must use an asymmetric NIST-recommended elliptic curve (ECC) or SM2 (China
+// Regions only) KMS key pair with a KeyUsage value of KEY_AGREEMENT to call
+// DeriveSharedSecret.
+//
+// DeriveSharedSecret uses the [Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive] (ECDH) to establish a key agreement between two
+// peers by deriving a shared secret from their elliptic curve public-private key
+// pairs. You can use the raw shared secret that DeriveSharedSecret returns to
+// derive a symmetric key that can encrypt and decrypt data that is sent between
+// the two peers, or that can generate and verify HMACs. KMS recommends that you
+// follow [NIST recommendations for key derivation]when using the raw shared secret to derive a symmetric key.
+//
+// The following workflow demonstrates how to establish key agreement over an
+// insecure communication channel using DeriveSharedSecret.
+//
+// - Alice calls CreateKeyto create an asymmetric KMS key pair with a KeyUsage value of
+// KEY_AGREEMENT .
+//
+// The asymmetric KMS key must use a NIST-recommended elliptic curve (ECC) or SM2
+//
+// (China Regions only) key spec.
+//
+// - Bob creates an elliptic curve key pair.
+//
+// Bob can call CreateKeyto create an asymmetric KMS key pair or generate a key pair
+//
+// outside of KMS. Bob's key pair must use the same NIST-recommended elliptic curve
+// (ECC) or SM2 (China Regions ony) curve as Alice.
+//
+// - Alice and Bob exchange their public keys through an insecure communication
+// channel (like the internet).
+//
+// Use GetPublicKeyto download the public key of your asymmetric KMS key pair.
+//
+// KMS strongly recommends verifying that the public key you receive came from the
+//
+// expected party before using it to derive a shared secret.
+//
+// - Alice calls DeriveSharedSecret.
+//
+// KMS uses the private key from the KMS key pair generated in Step 1, Bob's
+//
+// public key, and the Elliptic Curve Cryptography Cofactor Diffie-Hellman
+// Primitive to derive the shared secret. The private key in your KMS key pair
+// never leaves KMS unencrypted. DeriveSharedSecret returns the raw shared secret.
+//
+// - Bob uses the Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive
+// to calculate the same raw secret using his private key and Alice's public key.
+//
+// To derive a shared secret you must provide a key agreement algorithm, the
+// private key of the caller's asymmetric NIST-recommended elliptic curve or SM2
+// (China Regions only) KMS key pair, and the public key from your peer's
+// NIST-recommended elliptic curve or SM2 (China Regions only) key pair. The public
+// key can be from another asymmetric KMS key pair or from a key pair generated
+// outside of KMS, but both key pairs must be on the same elliptic curve.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:DeriveSharedSecret] (key policy)
+//
+// Related operations:
+//
+// # CreateKey
+//
+// # GetPublicKey
+//
+// # DescribeKey
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:DeriveSharedSecret]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar3.pdf#page=60
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [NIST recommendations for key derivation]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Cr2.pdf
+func (c *Client) DeriveSharedSecret(ctx context.Context, params *DeriveSharedSecretInput, optFns ...func(*Options)) (*DeriveSharedSecretOutput, error) {
+ if params == nil {
+ params = &DeriveSharedSecretInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DeriveSharedSecret", params, optFns, c.addOperationDeriveSharedSecretMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DeriveSharedSecretOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DeriveSharedSecretInput struct {
+
+ // Specifies the key agreement algorithm used to derive the shared secret. The
+ // only valid value is ECDH .
+ //
+ // This member is required.
+ KeyAgreementAlgorithm types.KeyAgreementAlgorithmSpec
+
+ // Identifies an asymmetric NIST-recommended ECC or SM2 (China Regions only) KMS
+ // key. KMS uses the private key in the specified key pair to derive the shared
+ // secret. The key usage of the KMS key must be KEY_AGREEMENT . To find the
+ // KeyUsage of a KMS key, use the DescribeKey operation.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Specifies the public key in your peer's NIST-recommended elliptic curve (ECC)
+ // or SM2 (China Regions only) key pair.
+ //
+ // The public key must be a DER-encoded X.509 public key, also known as
+ // SubjectPublicKeyInfo (SPKI), as defined in [RFC 5280].
+ //
+ // GetPublicKeyreturns the public key of an asymmetric KMS key pair in the required
+ // DER-encoded format.
+ //
+ // If you use [Amazon Web Services CLI version 1], you must provide the DER-encoded X.509 public key in a file.
+ // Otherwise, the Amazon Web Services CLI Base64-encodes the public key a second
+ // time, resulting in a ValidationException .
+ //
+ // You can specify the public key as binary data in a file using fileb ( fileb:// )
+ // or in-line using a Base64 encoded string.
+ //
+ // [RFC 5280]: https://tools.ietf.org/html/rfc5280
+ // [Amazon Web Services CLI version 1]: https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-welcome.html
+ //
+ // This member is required.
+ PublicKey []byte
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ // A signed [attestation document] from an Amazon Web Services Nitro enclave and the encryption
+ // algorithm to use with the enclave's public key. The only valid encryption
+ // algorithm is RSAES_OAEP_SHA_256 .
+ //
+ // This parameter only supports attestation documents for Amazon Web Services
+ // Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web Services Nitro
+ // Enclaves, use the [Amazon Web Services Nitro Enclaves SDK]to generate the attestation document and then use the
+ // Recipient parameter from any Amazon Web Services SDK to provide the attestation
+ // document for the enclave.
+ //
+ // When you use this parameter, instead of returning a plaintext copy of the
+ // shared secret, KMS encrypts the plaintext shared secret under the public key in
+ // the attestation document, and returns the resulting ciphertext in the
+ // CiphertextForRecipient field in the response. This ciphertext can be decrypted
+ // only with the private key in the enclave. The CiphertextBlob field in the
+ // response contains the encrypted shared secret derived from the KMS key specified
+ // by the KeyId parameter and public key specified by the PublicKey parameter. The
+ // SharedSecret field in the response is null or empty.
+ //
+ // For information about the interaction between KMS and Amazon Web Services Nitro
+ // Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [attestation document]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ // [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+ Recipient *types.RecipientInfo
+
+ noSmithyDocumentSerde
+}
+
+type DeriveSharedSecretOutput struct {
+
+ // The plaintext shared secret encrypted with the public key in the attestation
+ // document.
+ //
+ // This field is included in the response only when the Recipient parameter in the
+ // request includes a valid attestation document from an Amazon Web Services Nitro
+ // enclave. For information about the interaction between KMS and Amazon Web
+ // Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ CiphertextForRecipient []byte
+
+ // Identifies the key agreement algorithm used to derive the shared secret.
+ KeyAgreementAlgorithm types.KeyAgreementAlgorithmSpec
+
+ // Identifies the KMS key used to derive the shared secret.
+ KeyId *string
+
+ // The source of the key material for the specified KMS key.
+ //
+ // When this value is AWS_KMS , KMS created the key material. When this value is
+ // EXTERNAL , the key material was imported or the KMS key doesn't have any key
+ // material.
+ //
+ // The only valid values for DeriveSharedSecret are AWS_KMS and EXTERNAL .
+ // DeriveSharedSecret does not support KMS keys with a KeyOrigin value of
+ // AWS_CLOUDHSM or EXTERNAL_KEY_STORE .
+ KeyOrigin types.OriginType
+
+ // The raw secret derived from the specified key agreement algorithm, private key
+ // in the asymmetric KMS key, and your peer's public key.
+ //
+ // If the response includes the CiphertextForRecipient field, the SharedSecret
+ // field is null or empty.
+ SharedSecret []byte
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDeriveSharedSecretMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeriveSharedSecret{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeriveSharedSecret{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DeriveSharedSecret"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDeriveSharedSecretValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeriveSharedSecret(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDeriveSharedSecret(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DeriveSharedSecret",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeCustomKeyStores.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeCustomKeyStores.go
new file mode 100644
index 000000000..438537acd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeCustomKeyStores.go
@@ -0,0 +1,338 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets information about [custom key stores] in the account and Region.
+//
+// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
+// and extensive integration of KMS with the isolation and control of a key store
+// that you own and manage.
+//
+// By default, this operation returns information about all custom key stores in
+// the account and Region. To get only information about a particular custom key
+// store, use either the CustomKeyStoreName or CustomKeyStoreId parameter (but not
+// both).
+//
+// To determine whether the custom key store is connected to its CloudHSM cluster
+// or external key store proxy, use the ConnectionState element in the response.
+// If an attempt to connect the custom key store failed, the ConnectionState value
+// is FAILED and the ConnectionErrorCode element in the response indicates the
+// cause of the failure. For help interpreting the ConnectionErrorCode , see CustomKeyStoresListEntry.
+//
+// Custom key stores have a DISCONNECTED connection state if the key store has
+// never been connected or you used the DisconnectCustomKeyStoreoperation to disconnect it. Otherwise, the
+// connection state is CONNECTED. If your custom key store connection state is
+// CONNECTED but you are having trouble using it, verify that the backing store is
+// active and available. For an CloudHSM key store, verify that the associated
+// CloudHSM cluster is active and contains the minimum number of HSMs required for
+// the operation, if any. For an external key store, verify that the external key
+// store proxy and its associated external key manager are reachable and enabled.
+//
+// For help repairing your CloudHSM key store, see the [Troubleshooting CloudHSM key stores]. For help repairing your
+// external key store, see the [Troubleshooting external key stores]. Both topics are in the Key Management Service
+// Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a custom key store
+// in a different Amazon Web Services account.
+//
+// Required permissions: [kms:DescribeCustomKeyStores] (IAM policy)
+//
+// Related operations:
+//
+// # ConnectCustomKeyStore
+//
+// # CreateCustomKeyStore
+//
+// # DeleteCustomKeyStore
+//
+// # DisconnectCustomKeyStore
+//
+// # UpdateCustomKeyStore
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [kms:DescribeCustomKeyStores]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [Troubleshooting CloudHSM key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
+// [Troubleshooting external key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/xks-troubleshooting.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) DescribeCustomKeyStores(ctx context.Context, params *DescribeCustomKeyStoresInput, optFns ...func(*Options)) (*DescribeCustomKeyStoresOutput, error) {
+ if params == nil {
+ params = &DescribeCustomKeyStoresInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeCustomKeyStores", params, optFns, c.addOperationDescribeCustomKeyStoresMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeCustomKeyStoresOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeCustomKeyStoresInput struct {
+
+ // Gets only information about the specified custom key store. Enter the key store
+ // ID.
+ //
+ // By default, this operation gets information about all custom key stores in the
+ // account and Region. To limit the output to a particular custom key store,
+ // provide either the CustomKeyStoreId or CustomKeyStoreName parameter, but not
+ // both.
+ CustomKeyStoreId *string
+
+ // Gets only information about the specified custom key store. Enter the friendly
+ // name of the custom key store.
+ //
+ // By default, this operation gets information about all custom key stores in the
+ // account and Region. To limit the output to a particular custom key store,
+ // provide either the CustomKeyStoreId or CustomKeyStoreName parameter, but not
+ // both.
+ CustomKeyStoreName *string
+
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ Limit *int32
+
+ // Use this parameter in a subsequent request after you receive a response with
+ // truncated results. Set it to the value of NextMarker from the truncated
+ // response you just received.
+ Marker *string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeCustomKeyStoresOutput struct {
+
+ // Contains metadata about each custom key store.
+ CustomKeyStores []types.CustomKeyStoresListEntry
+
+ // When Truncated is true, this element is present and contains the value to use
+ // for the Marker parameter in a subsequent request.
+ NextMarker *string
+
+ // A flag that indicates whether there are more items in the list. When this value
+ // is true, the list in this response is truncated. To get more items, pass the
+ // value of the NextMarker element in this response to the Marker parameter in a
+ // subsequent request.
+ Truncated bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeCustomKeyStoresMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeCustomKeyStores{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeCustomKeyStores{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeCustomKeyStores"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeCustomKeyStores(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// DescribeCustomKeyStoresPaginatorOptions is the paginator options for
+// DescribeCustomKeyStores
+type DescribeCustomKeyStoresPaginatorOptions struct {
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// DescribeCustomKeyStoresPaginator is a paginator for DescribeCustomKeyStores
+type DescribeCustomKeyStoresPaginator struct {
+ options DescribeCustomKeyStoresPaginatorOptions
+ client DescribeCustomKeyStoresAPIClient
+ params *DescribeCustomKeyStoresInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewDescribeCustomKeyStoresPaginator returns a new
+// DescribeCustomKeyStoresPaginator
+func NewDescribeCustomKeyStoresPaginator(client DescribeCustomKeyStoresAPIClient, params *DescribeCustomKeyStoresInput, optFns ...func(*DescribeCustomKeyStoresPaginatorOptions)) *DescribeCustomKeyStoresPaginator {
+ if params == nil {
+ params = &DescribeCustomKeyStoresInput{}
+ }
+
+ options := DescribeCustomKeyStoresPaginatorOptions{}
+ if params.Limit != nil {
+ options.Limit = *params.Limit
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &DescribeCustomKeyStoresPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *DescribeCustomKeyStoresPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next DescribeCustomKeyStores page.
+func (p *DescribeCustomKeyStoresPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeCustomKeyStoresOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.Limit = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.DescribeCustomKeyStores(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// DescribeCustomKeyStoresAPIClient is a client that implements the
+// DescribeCustomKeyStores operation.
+type DescribeCustomKeyStoresAPIClient interface {
+ DescribeCustomKeyStores(context.Context, *DescribeCustomKeyStoresInput, ...func(*Options)) (*DescribeCustomKeyStoresOutput, error)
+}
+
+var _ DescribeCustomKeyStoresAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opDescribeCustomKeyStores(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DescribeCustomKeyStores",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeKey.go
new file mode 100644
index 000000000..3ac7fafa0
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DescribeKey.go
@@ -0,0 +1,257 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Provides detailed information about a KMS key. You can run DescribeKey on a [customer managed key] or
+// an [Amazon Web Services managed key].
+//
+// This detailed information includes the key ARN, creation date (and deletion
+// date, if applicable), the key state, and the origin and expiration date (if any)
+// of the key material. It includes fields, like KeySpec , that help you
+// distinguish different types of KMS keys. It also displays the key usage
+// (encryption, signing, or generating and verifying MACs) and the algorithms that
+// the KMS key supports.
+//
+// For [multi-Region keys], DescribeKey displays the primary key and all related replica keys. For
+// KMS keys in [CloudHSM key stores], it includes information about the key store, such as the key
+// store ID and the CloudHSM cluster ID. For KMS keys in [external key stores], it includes the custom
+// key store ID and the ID of the external key.
+//
+// DescribeKey does not return the following information:
+//
+// - Aliases associated with the KMS key. To get this information, use ListAliases.
+//
+// - Whether automatic key rotation is enabled on the KMS key. To get this
+// information, use GetKeyRotationStatus. Also, some key states prevent a KMS key from being
+// automatically rotated. For details, see [How Automatic Key Rotation Works]in the Key Management Service
+// Developer Guide.
+//
+// - Tags on the KMS key. To get this information, use ListResourceTags.
+//
+// - Key policies and grants on the KMS key. To get this information, use GetKeyPolicyand ListGrants.
+//
+// In general, DescribeKey is a non-mutating operation. It returns data about KMS
+// keys, but doesn't change them. However, Amazon Web Services services use
+// DescribeKey to create [Amazon Web Services managed keys] from a predefined Amazon Web Services alias with no key
+// ID.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:DescribeKey] (key policy)
+//
+// Related operations:
+//
+// # GetKeyPolicy
+//
+// # GetKeyRotationStatus
+//
+// # ListAliases
+//
+// # ListGrants
+//
+// # ListKeys
+//
+// # ListResourceTags
+//
+// # ListRetirableGrants
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [CloudHSM key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-cloudhsm.html
+// [external key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html
+// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
+// [kms:DescribeKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [How Automatic Key Rotation Works]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-how-it-works
+// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
+// [Amazon Web Services managed keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+func (c *Client) DescribeKey(ctx context.Context, params *DescribeKeyInput, optFns ...func(*Options)) (*DescribeKeyOutput, error) {
+ if params == nil {
+ params = &DescribeKeyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DescribeKey", params, optFns, c.addOperationDescribeKeyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DescribeKeyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DescribeKeyInput struct {
+
+ // Describes the specified KMS key.
+ //
+ // If you specify a predefined Amazon Web Services alias (an Amazon Web Services
+ // alias with no key ID), KMS associates the alias with an [Amazon Web Services managed key]and returns its KeyId
+ // and Arn in the response.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html##aws-managed-cmk
+ //
+ // This member is required.
+ KeyId *string
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ noSmithyDocumentSerde
+}
+
+type DescribeKeyOutput struct {
+
+ // Metadata associated with the key.
+ KeyMetadata *types.KeyMetadata
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDescribeKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeKey"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDescribeKeyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeKey(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDescribeKey(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DescribeKey",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKey.go
new file mode 100644
index 000000000..3d247346d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKey.go
@@ -0,0 +1,185 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Sets the state of a KMS key to disabled. This change temporarily prevents use
+// of the KMS key for [cryptographic operations].
+//
+// For more information about how key state affects the use of a KMS key, see [Key states of KMS keys] in
+// the Key Management Service Developer Guide .
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:DisableKey] (key policy)
+//
+// Related operations: EnableKey
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+// [kms:DisableKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) DisableKey(ctx context.Context, params *DisableKeyInput, optFns ...func(*Options)) (*DisableKeyOutput, error) {
+ if params == nil {
+ params = &DisableKeyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableKey", params, optFns, c.addOperationDisableKeyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableKeyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableKeyInput struct {
+
+ // Identifies the KMS key to disable.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type DisableKeyOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisableKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisableKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DisableKey"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDisableKeyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableKey(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDisableKey(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DisableKey",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKeyRotation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKeyRotation.go
new file mode 100644
index 000000000..30ee5155f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisableKeyRotation.go
@@ -0,0 +1,215 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disables [automatic rotation of the key material] of the specified symmetric encryption KMS key.
+//
+// Automatic key rotation is supported only on symmetric encryption KMS keys. You
+// cannot enable automatic rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To
+// enable or disable automatic rotation of a set of related [multi-Region keys], set the property on
+// the primary key.
+//
+// You can enable (EnableKeyRotation ) and disable automatic rotation of the key material in [customer managed KMS keys]. Key
+// material rotation of [Amazon Web Services managed KMS keys]is not configurable. KMS always rotates the key material
+// for every year. Rotation of [Amazon Web Services owned KMS keys]varies.
+//
+// In May 2022, KMS changed the rotation schedule for Amazon Web Services managed
+// keys from every three years to every year. For details, see EnableKeyRotation.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:DisableKeyRotation] (key policy)
+//
+// Related operations:
+//
+// # EnableKeyRotation
+//
+// # GetKeyRotationStatus
+//
+// # ListKeyRotations
+//
+// # RotateKeyOnDemand
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+// [Amazon Web Services managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+// [automatic rotation of the key material]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
+// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [customer managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
+// [Amazon Web Services owned KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+// [kms:DisableKeyRotation]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) DisableKeyRotation(ctx context.Context, params *DisableKeyRotationInput, optFns ...func(*Options)) (*DisableKeyRotationOutput, error) {
+ if params == nil {
+ params = &DisableKeyRotationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisableKeyRotation", params, optFns, c.addOperationDisableKeyRotationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisableKeyRotationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisableKeyRotationInput struct {
+
+ // Identifies a symmetric encryption KMS key. You cannot enable or disable
+ // automatic rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store].
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+ // [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+ // [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#asymmetric-cmks
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ //
+ // This member is required.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type DisableKeyRotationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisableKeyRotationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisableKeyRotation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisableKeyRotation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DisableKeyRotation"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDisableKeyRotationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableKeyRotation(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDisableKeyRotation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DisableKeyRotation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisconnectCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisconnectCustomKeyStore.go
new file mode 100644
index 000000000..55327cb72
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_DisconnectCustomKeyStore.go
@@ -0,0 +1,200 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Disconnects the [custom key store] from its backing key store. This operation disconnects an
+// CloudHSM key store from its associated CloudHSM cluster or disconnects an
+// external key store from the external key store proxy that communicates with your
+// external key manager.
+//
+// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
+// and extensive integration of KMS with the isolation and control of a key store
+// that you own and manage.
+//
+// While a custom key store is disconnected, you can manage the custom key store
+// and its KMS keys, but you cannot create or use its KMS keys. You can reconnect
+// the custom key store at any time.
+//
+// While a custom key store is disconnected, all attempts to create KMS keys in
+// the custom key store or to use existing KMS keys in [cryptographic operations]will fail. This action can
+// prevent users from storing and accessing sensitive data.
+//
+// When you disconnect a custom key store, its ConnectionState changes to
+// Disconnected . To find the connection state of a custom key store, use the DescribeCustomKeyStores
+// operation. To reconnect a custom key store, use the ConnectCustomKeyStoreoperation.
+//
+// If the operation succeeds, it returns a JSON object with no properties.
+//
+// Cross-account use: No. You cannot perform this operation on a custom key store
+// in a different Amazon Web Services account.
+//
+// Required permissions: [kms:DisconnectCustomKeyStore] (IAM policy)
+//
+// Related operations:
+//
+// # ConnectCustomKeyStore
+//
+// # CreateCustomKeyStore
+//
+// # DeleteCustomKeyStore
+//
+// # DescribeCustomKeyStores
+//
+// # UpdateCustomKeyStore
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+// [kms:DisconnectCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) DisconnectCustomKeyStore(ctx context.Context, params *DisconnectCustomKeyStoreInput, optFns ...func(*Options)) (*DisconnectCustomKeyStoreOutput, error) {
+ if params == nil {
+ params = &DisconnectCustomKeyStoreInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "DisconnectCustomKeyStore", params, optFns, c.addOperationDisconnectCustomKeyStoreMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*DisconnectCustomKeyStoreOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type DisconnectCustomKeyStoreInput struct {
+
+ // Enter the ID of the custom key store you want to disconnect. To find the ID of
+ // a custom key store, use the DescribeCustomKeyStoresoperation.
+ //
+ // This member is required.
+ CustomKeyStoreId *string
+
+ noSmithyDocumentSerde
+}
+
+type DisconnectCustomKeyStoreOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationDisconnectCustomKeyStoreMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisconnectCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisconnectCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "DisconnectCustomKeyStore"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpDisconnectCustomKeyStoreValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisconnectCustomKeyStore(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opDisconnectCustomKeyStore(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "DisconnectCustomKeyStore",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKey.go
new file mode 100644
index 000000000..fc8402f5e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKey.go
@@ -0,0 +1,182 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Sets the key state of a KMS key to enabled. This allows you to use the KMS key
+// for [cryptographic operations].
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:EnableKey] (key policy)
+//
+// Related operations: DisableKey
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:EnableKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) EnableKey(ctx context.Context, params *EnableKeyInput, optFns ...func(*Options)) (*EnableKeyOutput, error) {
+ if params == nil {
+ params = &EnableKeyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableKey", params, optFns, c.addOperationEnableKeyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableKeyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableKeyInput struct {
+
+ // Identifies the KMS key to enable.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type EnableKeyOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpEnableKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpEnableKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "EnableKey"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpEnableKeyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableKey(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opEnableKey(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "EnableKey",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKeyRotation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKeyRotation.go
new file mode 100644
index 000000000..3236e4970
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_EnableKeyRotation.go
@@ -0,0 +1,254 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Enables [automatic rotation of the key material] of the specified symmetric encryption KMS key.
+//
+// By default, when you enable automatic rotation of a [customer managed KMS key], KMS rotates the key
+// material of the KMS key one year (approximately 365 days) from the enable date
+// and every year thereafter. You can use the optional RotationPeriodInDays
+// parameter to specify a custom rotation period when you enable key rotation, or
+// you can use RotationPeriodInDays to modify the rotation period of a key that
+// you previously enabled automatic key rotation on.
+//
+// You can monitor rotation of the key material for your KMS keys in CloudTrail
+// and Amazon CloudWatch. To disable rotation of the key material in a customer
+// managed KMS key, use the DisableKeyRotationoperation. You can use the GetKeyRotationStatus operation to identify any
+// in progress rotations. You can use the ListKeyRotationsoperation to view the details of
+// completed rotations.
+//
+// Automatic key rotation is supported only on [symmetric encryption KMS keys]. You cannot enable automatic
+// rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To enable or disable
+// automatic rotation of a set of related [multi-Region keys], set the property on the primary key.
+//
+// You cannot enable or disable automatic rotation of [Amazon Web Services managed KMS keys]. KMS always rotates the key
+// material of Amazon Web Services managed keys every year. Rotation of [Amazon Web Services owned KMS keys]is managed
+// by the Amazon Web Services service that owns the key.
+//
+// In May 2022, KMS changed the rotation schedule for Amazon Web Services managed
+// keys from every three years (approximately 1,095 days) to every year
+// (approximately 365 days).
+//
+// New Amazon Web Services managed keys are automatically rotated one year after
+// they are created, and approximately every year thereafter.
+//
+// Existing Amazon Web Services managed keys are automatically rotated one year
+// after their most recent rotation, and every year thereafter.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:EnableKeyRotation] (key policy)
+//
+// Related operations:
+//
+// # DisableKeyRotation
+//
+// # GetKeyRotationStatus
+//
+// # ListKeyRotations
+//
+// RotateKeyOnDemand
+//
+// - You can perform on-demand (RotateKeyOnDemand ) rotation of the key material in customer
+// managed KMS keys, regardless of whether or not automatic key rotation is
+// enabled.
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [kms:EnableKeyRotation]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Amazon Web Services owned KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+// [Amazon Web Services managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+// [customer managed KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
+// [automatic rotation of the key material]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-enable-disable
+// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [symmetric encryption KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) EnableKeyRotation(ctx context.Context, params *EnableKeyRotationInput, optFns ...func(*Options)) (*EnableKeyRotationOutput, error) {
+ if params == nil {
+ params = &EnableKeyRotationInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "EnableKeyRotation", params, optFns, c.addOperationEnableKeyRotationMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EnableKeyRotationOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EnableKeyRotationInput struct {
+
+ // Identifies a symmetric encryption KMS key. You cannot enable automatic rotation
+ // of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To enable or disable automatic
+ // rotation of a set of related [multi-Region keys], set the property on the primary key.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+ // [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+ // [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+ // [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ //
+ // This member is required.
+ KeyId *string
+
+ // Use this parameter to specify a custom period of time between each rotation
+ // date. If no value is specified, the default value is 365 days.
+ //
+ // The rotation period defines the number of days after you enable automatic key
+ // rotation that KMS will rotate your key material, and the number of days between
+ // each automatic rotation thereafter.
+ //
+ // You can use the [kms:RotationPeriodInDays]kms:RotationPeriodInDays condition key to further constrain the
+ // values that principals can specify in the RotationPeriodInDays parameter.
+ //
+ // [kms:RotationPeriodInDays]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-rotation-period-in-days
+ RotationPeriodInDays *int32
+
+ noSmithyDocumentSerde
+}
+
+type EnableKeyRotationOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEnableKeyRotationMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpEnableKeyRotation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpEnableKeyRotation{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "EnableKeyRotation"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpEnableKeyRotationValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableKeyRotation(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opEnableKeyRotation(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "EnableKeyRotation",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Encrypt.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Encrypt.go
new file mode 100644
index 000000000..ac6031bdf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Encrypt.go
@@ -0,0 +1,322 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Encrypts plaintext of up to 4,096 bytes using a KMS key. You can use a
+// symmetric or asymmetric KMS key with a KeyUsage of ENCRYPT_DECRYPT .
+//
+// You can use this operation to encrypt small amounts of arbitrary data, such as
+// a personal identifier or database password, or other sensitive information. You
+// don't need to use the Encrypt operation to encrypt a data key. The GenerateDataKey and GenerateDataKeyPair
+// operations return a plaintext data key and an encrypted copy of that data key.
+//
+// If you use a symmetric encryption KMS key, you can use an encryption context to
+// add additional security to your encryption operation. If you specify an
+// EncryptionContext when encrypting data, you must specify the same encryption
+// context (a case-sensitive exact match) when decrypting the data. Otherwise, the
+// request to decrypt fails with an InvalidCiphertextException . For more
+// information, see [Encryption Context]in the Key Management Service Developer Guide.
+//
+// If you specify an asymmetric KMS key, you must also specify the encryption
+// algorithm. The algorithm must be compatible with the KMS key spec.
+//
+// When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to
+// record the KMS key and encryption algorithm that you choose. You will be
+// required to provide the same KMS key and encryption algorithm when you decrypt
+// the data. If the KMS key and algorithm do not match the values used to encrypt
+// the data, the decrypt operation fails.
+//
+// You are not required to supply the key ID and encryption algorithm when you
+// decrypt with symmetric encryption KMS keys because KMS stores this information
+// in the ciphertext blob. KMS cannot store metadata in ciphertext generated with
+// asymmetric keys. The standard format for asymmetric key ciphertext does not
+// include configurable fields.
+//
+// The maximum size of the data that you can encrypt varies with the type of KMS
+// key and the encryption algorithm that you choose.
+//
+// - Symmetric encryption KMS keys
+//
+// - SYMMETRIC_DEFAULT : 4096 bytes
+//
+// - RSA_2048
+//
+// - RSAES_OAEP_SHA_1 : 214 bytes
+//
+// - RSAES_OAEP_SHA_256 : 190 bytes
+//
+// - RSA_3072
+//
+// - RSAES_OAEP_SHA_1 : 342 bytes
+//
+// - RSAES_OAEP_SHA_256 : 318 bytes
+//
+// - RSA_4096
+//
+// - RSAES_OAEP_SHA_1 : 470 bytes
+//
+// - RSAES_OAEP_SHA_256 : 446 bytes
+//
+// - SM2PKE : 1024 bytes (China Regions only)
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:Encrypt] (key policy)
+//
+// Related operations:
+//
+// # Decrypt
+//
+// # GenerateDataKey
+//
+// # GenerateDataKeyPair
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [kms:Encrypt]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) Encrypt(ctx context.Context, params *EncryptInput, optFns ...func(*Options)) (*EncryptOutput, error) {
+ if params == nil {
+ params = &EncryptInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "Encrypt", params, optFns, c.addOperationEncryptMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*EncryptOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type EncryptInput struct {
+
+ // Identifies the KMS key to use in the encryption operation. The KMS key must
+ // have a KeyUsage of ENCRYPT_DECRYPT . To find the KeyUsage of a KMS key, use the DescribeKey
+ // operation.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Data to be encrypted.
+ //
+ // This member is required.
+ Plaintext []byte
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // Specifies the encryption algorithm that KMS will use to encrypt the plaintext
+ // message. The algorithm must be compatible with the KMS key that you specify.
+ //
+ // This parameter is required only for asymmetric KMS keys. The default value,
+ // SYMMETRIC_DEFAULT , is the algorithm used for symmetric encryption KMS keys. If
+ // you are using an asymmetric KMS key, we recommend RSAES_OAEP_SHA_256.
+ //
+ // The SM2PKE algorithm is only available in China Regions.
+ EncryptionAlgorithm types.EncryptionAlgorithmSpec
+
+ // Specifies the encryption context that will be used to encrypt the data. An
+ // encryption context is valid only for [cryptographic operations]with a symmetric encryption KMS key. The
+ // standard asymmetric encryption algorithms and HMAC algorithms that KMS uses do
+ // not support an encryption context.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // An encryption context is a collection of non-secret key-value pairs that
+ // represent additional authenticated data. When you use an encryption context to
+ // encrypt data, you must specify the same (an exact case-sensitive match)
+ // encryption context to decrypt the data. An encryption context is supported only
+ // on operations with symmetric encryption KMS keys. On operations with symmetric
+ // encryption KMS keys, an encryption context is optional, but it is strongly
+ // recommended.
+ //
+ // For more information, see [Encryption context] in the Key Management Service Developer Guide.
+ //
+ // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ EncryptionContext map[string]string
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ noSmithyDocumentSerde
+}
+
+type EncryptOutput struct {
+
+ // The encrypted plaintext. When you use the HTTP API or the Amazon Web Services
+ // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
+ CiphertextBlob []byte
+
+ // The encryption algorithm that was used to encrypt the plaintext.
+ EncryptionAlgorithm types.EncryptionAlgorithmSpec
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key that was used to encrypt the
+ // plaintext.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationEncryptMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpEncrypt{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpEncrypt{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "Encrypt"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpEncryptValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEncrypt(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opEncrypt(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "Encrypt",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKey.go
new file mode 100644
index 000000000..5cab73d3f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKey.go
@@ -0,0 +1,377 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a unique symmetric data key for use outside of KMS. This operation
+// returns a plaintext copy of the data key and a copy that is encrypted under a
+// symmetric encryption KMS key that you specify. The bytes in the plaintext key
+// are random; they are not related to the caller or the KMS key. You can use the
+// plaintext key to encrypt your data outside of KMS and store the encrypted data
+// key with the encrypted data.
+//
+// To generate a data key, specify the symmetric encryption KMS key that will be
+// used to encrypt the data key. You cannot use an asymmetric KMS key to encrypt
+// data keys. To get the type of your KMS key, use the DescribeKeyoperation.
+//
+// You must also specify the length of the data key. Use either the KeySpec or
+// NumberOfBytes parameters (but not both). For 128-bit and 256-bit data keys, use
+// the KeySpec parameter.
+//
+// To generate a 128-bit SM4 data key (China Regions only), specify a KeySpec
+// value of AES_128 or a NumberOfBytes value of 16 . The symmetric encryption key
+// used in China Regions to encrypt your data key is an SM4 encryption key.
+//
+// To get only an encrypted copy of the data key, use GenerateDataKeyWithoutPlaintext. To generate an asymmetric
+// data key pair, use the GenerateDataKeyPairor GenerateDataKeyPairWithoutPlaintext operation. To get a cryptographically secure random
+// byte string, use GenerateRandom.
+//
+// You can use an optional encryption context to add additional security to the
+// encryption operation. If you specify an EncryptionContext , you must specify the
+// same encryption context (a case-sensitive exact match) when decrypting the
+// encrypted data key. Otherwise, the request to decrypt fails with an
+// InvalidCiphertextException . For more information, see [Encryption Context] in the Key Management
+// Service Developer Guide.
+//
+// GenerateDataKey also supports [Amazon Web Services Nitro Enclaves], which provide an isolated compute environment
+// in Amazon EC2. To call GenerateDataKey for an Amazon Web Services Nitro
+// enclave, use the [Amazon Web Services Nitro Enclaves SDK]or any Amazon Web Services SDK. Use the Recipient parameter to
+// provide the attestation document for the enclave. GenerateDataKey returns a
+// copy of the data key encrypted under the specified KMS key, as usual. But
+// instead of a plaintext copy of the data key, the response includes a copy of the
+// data key encrypted under the public key from the attestation document (
+// CiphertextForRecipient ). For information about the interaction between KMS and
+// Amazon Web Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer
+// Guide..
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// # How to use your data key
+//
+// We recommend that you use the following pattern to encrypt data locally in your
+// application. You can write your own code or use a client-side encryption
+// library, such as the [Amazon Web Services Encryption SDK], the [Amazon DynamoDB Encryption Client], or [Amazon S3 client-side encryption] to do these tasks for you.
+//
+// To encrypt data outside of KMS:
+//
+// - Use the GenerateDataKey operation to get a data key.
+//
+// - Use the plaintext data key (in the Plaintext field of the response) to
+// encrypt your data outside of KMS. Then erase the plaintext data key from memory.
+//
+// - Store the encrypted data key (in the CiphertextBlob field of the response)
+// with the encrypted data.
+//
+// To decrypt data outside of KMS:
+//
+// - Use the Decryptoperation to decrypt the encrypted data key. The operation returns
+// a plaintext copy of the data key.
+//
+// - Use the plaintext data key to decrypt data outside of KMS, then erase the
+// plaintext data key from memory.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:GenerateDataKey] (key policy)
+//
+// Related operations:
+//
+// # Decrypt
+//
+// # Encrypt
+//
+// # GenerateDataKeyPair
+//
+// # GenerateDataKeyPairWithoutPlaintext
+//
+// # GenerateDataKeyWithoutPlaintext
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Amazon Web Services Encryption SDK]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
+// [Amazon DynamoDB Encryption Client]: https://docs.aws.amazon.com/dynamodb-encryption-client/latest/devguide/
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [Amazon Web Services Nitro Enclaves]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
+// [Amazon S3 client-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
+// [kms:GenerateDataKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+func (c *Client) GenerateDataKey(ctx context.Context, params *GenerateDataKeyInput, optFns ...func(*Options)) (*GenerateDataKeyOutput, error) {
+ if params == nil {
+ params = &GenerateDataKeyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GenerateDataKey", params, optFns, c.addOperationGenerateDataKeyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GenerateDataKeyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GenerateDataKeyInput struct {
+
+ // Specifies the symmetric encryption KMS key that encrypts the data key. You
+ // cannot specify an asymmetric KMS key or a KMS key in a custom key store. To get
+ // the type and origin of your KMS key, use the DescribeKeyoperation.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // Specifies the encryption context that will be used when encrypting the data key.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // An encryption context is a collection of non-secret key-value pairs that
+ // represent additional authenticated data. When you use an encryption context to
+ // encrypt data, you must specify the same (an exact case-sensitive match)
+ // encryption context to decrypt the data. An encryption context is supported only
+ // on operations with symmetric encryption KMS keys. On operations with symmetric
+ // encryption KMS keys, an encryption context is optional, but it is strongly
+ // recommended.
+ //
+ // For more information, see [Encryption context] in the Key Management Service Developer Guide.
+ //
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ EncryptionContext map[string]string
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ // Specifies the length of the data key. Use AES_128 to generate a 128-bit
+ // symmetric key, or AES_256 to generate a 256-bit symmetric key.
+ //
+ // You must specify either the KeySpec or the NumberOfBytes parameter (but not
+ // both) in every GenerateDataKey request.
+ KeySpec types.DataKeySpec
+
+ // Specifies the length of the data key in bytes. For example, use the value 64 to
+ // generate a 512-bit data key (64 bytes is 512 bits). For 128-bit (16-byte) and
+ // 256-bit (32-byte) data keys, use the KeySpec parameter.
+ //
+ // You must specify either the KeySpec or the NumberOfBytes parameter (but not
+ // both) in every GenerateDataKey request.
+ NumberOfBytes *int32
+
+ // A signed [attestation document] from an Amazon Web Services Nitro enclave and the encryption
+ // algorithm to use with the enclave's public key. The only valid encryption
+ // algorithm is RSAES_OAEP_SHA_256 .
+ //
+ // This parameter only supports attestation documents for Amazon Web Services
+ // Nitro Enclaves. To include this parameter, use the [Amazon Web Services Nitro Enclaves SDK]or any Amazon Web Services
+ // SDK.
+ //
+ // When you use this parameter, instead of returning the plaintext data key, KMS
+ // encrypts the plaintext data key under the public key in the attestation
+ // document, and returns the resulting ciphertext in the CiphertextForRecipient
+ // field in the response. This ciphertext can be decrypted only with the private
+ // key in the enclave. The CiphertextBlob field in the response contains a copy of
+ // the data key encrypted under the KMS key specified by the KeyId parameter. The
+ // Plaintext field in the response is null or empty.
+ //
+ // For information about the interaction between KMS and Amazon Web Services Nitro
+ // Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [attestation document]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ // [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+ Recipient *types.RecipientInfo
+
+ noSmithyDocumentSerde
+}
+
+type GenerateDataKeyOutput struct {
+
+ // The encrypted copy of the data key. When you use the HTTP API or the Amazon Web
+ // Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
+ CiphertextBlob []byte
+
+ // The plaintext data key encrypted with the public key from the Nitro enclave.
+ // This ciphertext can be decrypted only by using a private key in the Nitro
+ // enclave.
+ //
+ // This field is included in the response only when the Recipient parameter in the
+ // request includes a valid attestation document from an Amazon Web Services Nitro
+ // enclave. For information about the interaction between KMS and Amazon Web
+ // Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ CiphertextForRecipient []byte
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key that encrypted the data key.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // The plaintext data key. When you use the HTTP API or the Amazon Web Services
+ // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. Use this
+ // data key to encrypt your data outside of KMS. Then, remove it from memory as
+ // soon as possible.
+ //
+ // If the response includes the CiphertextForRecipient field, the Plaintext field
+ // is null or empty.
+ Plaintext []byte
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGenerateDataKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGenerateDataKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGenerateDataKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GenerateDataKey"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGenerateDataKeyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateDataKey(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGenerateDataKey(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GenerateDataKey",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPair.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPair.go
new file mode 100644
index 000000000..394bac814
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPair.go
@@ -0,0 +1,375 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a unique asymmetric data key pair for use outside of KMS. This
+// operation returns a plaintext public key, a plaintext private key, and a copy of
+// the private key that is encrypted under the symmetric encryption KMS key you
+// specify. You can use the data key pair to perform asymmetric cryptography and
+// implement digital signatures outside of KMS. The bytes in the keys are random;
+// they are not related to the caller or to the KMS key that is used to encrypt the
+// private key.
+//
+// You can use the public key that GenerateDataKeyPair returns to encrypt data or
+// verify a signature outside of KMS. Then, store the encrypted private key with
+// the data. When you are ready to decrypt data or sign a message, you can use the Decrypt
+// operation to decrypt the encrypted private key.
+//
+// To generate a data key pair, you must specify a symmetric encryption KMS key to
+// encrypt the private key in a data key pair. You cannot use an asymmetric KMS key
+// or a KMS key in a custom key store. To get the type and origin of your KMS key,
+// use the DescribeKeyoperation.
+//
+// Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data key
+// pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends
+// that you use ECC key pairs for signing, and use RSA and SM2 key pairs for either
+// encryption or signing, but not both. However, KMS cannot enforce any
+// restrictions on the use of data key pairs outside of KMS.
+//
+// If you are using the data key pair to encrypt data, or for any operation where
+// you don't immediately need a private key, consider using the GenerateDataKeyPairWithoutPlaintextoperation.
+// GenerateDataKeyPairWithoutPlaintext returns a plaintext public key and an
+// encrypted private key, but omits the plaintext private key that you need only to
+// decrypt ciphertext or sign a message. Later, when you need to decrypt the data
+// or sign a message, use the Decryptoperation to decrypt the encrypted private key in
+// the data key pair.
+//
+// GenerateDataKeyPair returns a unique data key pair for each request. The bytes
+// in the keys are random; they are not related to the caller or the KMS key that
+// is used to encrypt the private key. The public key is a DER-encoded X.509
+// SubjectPublicKeyInfo, as specified in [RFC 5280]. The private key is a DER-encoded PKCS8
+// PrivateKeyInfo, as specified in [RFC 5958].
+//
+// GenerateDataKeyPair also supports [Amazon Web Services Nitro Enclaves], which provide an isolated compute
+// environment in Amazon EC2. To call GenerateDataKeyPair for an Amazon Web
+// Services Nitro enclave, use the [Amazon Web Services Nitro Enclaves SDK]or any Amazon Web Services SDK. Use the
+// Recipient parameter to provide the attestation document for the enclave.
+// GenerateDataKeyPair returns the public data key and a copy of the private data
+// key encrypted under the specified KMS key, as usual. But instead of a plaintext
+// copy of the private data key ( PrivateKeyPlaintext ), the response includes a
+// copy of the private data key encrypted under the public key from the attestation
+// document ( CiphertextForRecipient ). For information about the interaction
+// between KMS and Amazon Web Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management
+// Service Developer Guide..
+//
+// You can use an optional encryption context to add additional security to the
+// encryption operation. If you specify an EncryptionContext , you must specify the
+// same encryption context (a case-sensitive exact match) when decrypting the
+// encrypted data key. Otherwise, the request to decrypt fails with an
+// InvalidCiphertextException . For more information, see [Encryption Context] in the Key Management
+// Service Developer Guide.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:GenerateDataKeyPair] (key policy)
+//
+// Related operations:
+//
+// # Decrypt
+//
+// # Encrypt
+//
+// # GenerateDataKey
+//
+// # GenerateDataKeyPairWithoutPlaintext
+//
+// # GenerateDataKeyWithoutPlaintext
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [RFC 5280]: https://tools.ietf.org/html/rfc5280
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [Amazon Web Services Nitro Enclaves]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
+// [RFC 5958]: https://tools.ietf.org/html/rfc5958
+// [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+// [kms:GenerateDataKeyPair]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+func (c *Client) GenerateDataKeyPair(ctx context.Context, params *GenerateDataKeyPairInput, optFns ...func(*Options)) (*GenerateDataKeyPairOutput, error) {
+ if params == nil {
+ params = &GenerateDataKeyPairInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GenerateDataKeyPair", params, optFns, c.addOperationGenerateDataKeyPairMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GenerateDataKeyPairOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GenerateDataKeyPairInput struct {
+
+ // Specifies the symmetric encryption KMS key that encrypts the private key in the
+ // data key pair. You cannot specify an asymmetric KMS key or a KMS key in a custom
+ // key store. To get the type and origin of your KMS key, use the DescribeKeyoperation.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Determines the type of data key pair that is generated.
+ //
+ // The KMS rule that restricts the use of asymmetric RSA and SM2 KMS keys to
+ // encrypt and decrypt or to sign and verify (but not both), and the rule that
+ // permits you to use ECC KMS keys only to sign and verify, are not effective on
+ // data key pairs, which are used outside of KMS. The SM2 key spec is only
+ // available in China Regions.
+ //
+ // This member is required.
+ KeyPairSpec types.DataKeyPairSpec
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // Specifies the encryption context that will be used when encrypting the private
+ // key in the data key pair.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // An encryption context is a collection of non-secret key-value pairs that
+ // represent additional authenticated data. When you use an encryption context to
+ // encrypt data, you must specify the same (an exact case-sensitive match)
+ // encryption context to decrypt the data. An encryption context is supported only
+ // on operations with symmetric encryption KMS keys. On operations with symmetric
+ // encryption KMS keys, an encryption context is optional, but it is strongly
+ // recommended.
+ //
+ // For more information, see [Encryption context] in the Key Management Service Developer Guide.
+ //
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ EncryptionContext map[string]string
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ // A signed [attestation document] from an Amazon Web Services Nitro enclave and the encryption
+ // algorithm to use with the enclave's public key. The only valid encryption
+ // algorithm is RSAES_OAEP_SHA_256 .
+ //
+ // This parameter only supports attestation documents for Amazon Web Services
+ // Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web Services Nitro
+ // Enclaves, use the [Amazon Web Services Nitro Enclaves SDK]to generate the attestation document and then use the
+ // Recipient parameter from any Amazon Web Services SDK to provide the attestation
+ // document for the enclave.
+ //
+ // When you use this parameter, instead of returning a plaintext copy of the
+ // private data key, KMS encrypts the plaintext private data key under the public
+ // key in the attestation document, and returns the resulting ciphertext in the
+ // CiphertextForRecipient field in the response. This ciphertext can be decrypted
+ // only with the private key in the enclave. The CiphertextBlob field in the
+ // response contains a copy of the private data key encrypted under the KMS key
+ // specified by the KeyId parameter. The PrivateKeyPlaintext field in the response
+ // is null or empty.
+ //
+ // For information about the interaction between KMS and Amazon Web Services Nitro
+ // Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [attestation document]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ // [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+ Recipient *types.RecipientInfo
+
+ noSmithyDocumentSerde
+}
+
+type GenerateDataKeyPairOutput struct {
+
+ // The plaintext private data key encrypted with the public key from the Nitro
+ // enclave. This ciphertext can be decrypted only by using a private key in the
+ // Nitro enclave.
+ //
+ // This field is included in the response only when the Recipient parameter in the
+ // request includes a valid attestation document from an Amazon Web Services Nitro
+ // enclave. For information about the interaction between KMS and Amazon Web
+ // Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ CiphertextForRecipient []byte
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key that encrypted the private key.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // The type of data key pair that was generated.
+ KeyPairSpec types.DataKeyPairSpec
+
+ // The encrypted copy of the private key. When you use the HTTP API or the Amazon
+ // Web Services CLI, the value is Base64-encoded. Otherwise, it is not
+ // Base64-encoded.
+ PrivateKeyCiphertextBlob []byte
+
+ // The plaintext copy of the private key. When you use the HTTP API or the Amazon
+ // Web Services CLI, the value is Base64-encoded. Otherwise, it is not
+ // Base64-encoded.
+ //
+ // If the response includes the CiphertextForRecipient field, the
+ // PrivateKeyPlaintext field is null or empty.
+ PrivateKeyPlaintext []byte
+
+ // The public key (in plaintext). When you use the HTTP API or the Amazon Web
+ // Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
+ PublicKey []byte
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGenerateDataKeyPairMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGenerateDataKeyPair{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGenerateDataKeyPair{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GenerateDataKeyPair"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGenerateDataKeyPairValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateDataKeyPair(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGenerateDataKeyPair(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GenerateDataKeyPair",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go
new file mode 100644
index 000000000..5bbc48fda
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyPairWithoutPlaintext.go
@@ -0,0 +1,302 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a unique asymmetric data key pair for use outside of KMS. This
+// operation returns a plaintext public key and a copy of the private key that is
+// encrypted under the symmetric encryption KMS key you specify. Unlike GenerateDataKeyPair, this
+// operation does not return a plaintext private key. The bytes in the keys are
+// random; they are not related to the caller or to the KMS key that is used to
+// encrypt the private key.
+//
+// You can use the public key that GenerateDataKeyPairWithoutPlaintext returns to
+// encrypt data or verify a signature outside of KMS. Then, store the encrypted
+// private key with the data. When you are ready to decrypt data or sign a message,
+// you can use the Decryptoperation to decrypt the encrypted private key.
+//
+// To generate a data key pair, you must specify a symmetric encryption KMS key to
+// encrypt the private key in a data key pair. You cannot use an asymmetric KMS key
+// or a KMS key in a custom key store. To get the type and origin of your KMS key,
+// use the DescribeKeyoperation.
+//
+// Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data key
+// pair. In China Regions, you can also choose an SM2 data key pair. KMS recommends
+// that you use ECC key pairs for signing, and use RSA and SM2 key pairs for either
+// encryption or signing, but not both. However, KMS cannot enforce any
+// restrictions on the use of data key pairs outside of KMS.
+//
+// GenerateDataKeyPairWithoutPlaintext returns a unique data key pair for each
+// request. The bytes in the key are not related to the caller or KMS key that is
+// used to encrypt the private key. The public key is a DER-encoded X.509
+// SubjectPublicKeyInfo, as specified in [RFC 5280].
+//
+// You can use an optional encryption context to add additional security to the
+// encryption operation. If you specify an EncryptionContext , you must specify the
+// same encryption context (a case-sensitive exact match) when decrypting the
+// encrypted data key. Otherwise, the request to decrypt fails with an
+// InvalidCiphertextException . For more information, see [Encryption Context] in the Key Management
+// Service Developer Guide.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:GenerateDataKeyPairWithoutPlaintext] (key policy)
+//
+// Related operations:
+//
+// # Decrypt
+//
+// # Encrypt
+//
+// # GenerateDataKey
+//
+// # GenerateDataKeyPair
+//
+// # GenerateDataKeyWithoutPlaintext
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [RFC 5280]: https://tools.ietf.org/html/rfc5280
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [kms:GenerateDataKeyPairWithoutPlaintext]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) GenerateDataKeyPairWithoutPlaintext(ctx context.Context, params *GenerateDataKeyPairWithoutPlaintextInput, optFns ...func(*Options)) (*GenerateDataKeyPairWithoutPlaintextOutput, error) {
+ if params == nil {
+ params = &GenerateDataKeyPairWithoutPlaintextInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GenerateDataKeyPairWithoutPlaintext", params, optFns, c.addOperationGenerateDataKeyPairWithoutPlaintextMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GenerateDataKeyPairWithoutPlaintextOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GenerateDataKeyPairWithoutPlaintextInput struct {
+
+ // Specifies the symmetric encryption KMS key that encrypts the private key in the
+ // data key pair. You cannot specify an asymmetric KMS key or a KMS key in a custom
+ // key store. To get the type and origin of your KMS key, use the DescribeKeyoperation.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Determines the type of data key pair that is generated.
+ //
+ // The KMS rule that restricts the use of asymmetric RSA and SM2 KMS keys to
+ // encrypt and decrypt or to sign and verify (but not both), and the rule that
+ // permits you to use ECC KMS keys only to sign and verify, are not effective on
+ // data key pairs, which are used outside of KMS. The SM2 key spec is only
+ // available in China Regions.
+ //
+ // This member is required.
+ KeyPairSpec types.DataKeyPairSpec
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // Specifies the encryption context that will be used when encrypting the private
+ // key in the data key pair.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // An encryption context is a collection of non-secret key-value pairs that
+ // represent additional authenticated data. When you use an encryption context to
+ // encrypt data, you must specify the same (an exact case-sensitive match)
+ // encryption context to decrypt the data. An encryption context is supported only
+ // on operations with symmetric encryption KMS keys. On operations with symmetric
+ // encryption KMS keys, an encryption context is optional, but it is strongly
+ // recommended.
+ //
+ // For more information, see [Encryption context] in the Key Management Service Developer Guide.
+ //
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ EncryptionContext map[string]string
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ noSmithyDocumentSerde
+}
+
+type GenerateDataKeyPairWithoutPlaintextOutput struct {
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key that encrypted the private key.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // The type of data key pair that was generated.
+ KeyPairSpec types.DataKeyPairSpec
+
+ // The encrypted copy of the private key. When you use the HTTP API or the Amazon
+ // Web Services CLI, the value is Base64-encoded. Otherwise, it is not
+ // Base64-encoded.
+ PrivateKeyCiphertextBlob []byte
+
+ // The public key (in plaintext). When you use the HTTP API or the Amazon Web
+ // Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
+ PublicKey []byte
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGenerateDataKeyPairWithoutPlaintextMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGenerateDataKeyPairWithoutPlaintext{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGenerateDataKeyPairWithoutPlaintext{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GenerateDataKeyPairWithoutPlaintext"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGenerateDataKeyPairWithoutPlaintextValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateDataKeyPairWithoutPlaintext(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGenerateDataKeyPairWithoutPlaintext(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GenerateDataKeyPairWithoutPlaintext",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go
new file mode 100644
index 000000000..69b955021
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateDataKeyWithoutPlaintext.go
@@ -0,0 +1,302 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a unique symmetric data key for use outside of KMS. This operation
+// returns a data key that is encrypted under a symmetric encryption KMS key that
+// you specify. The bytes in the key are random; they are not related to the caller
+// or to the KMS key.
+//
+// GenerateDataKeyWithoutPlaintext is identical to the GenerateDataKey operation except that it
+// does not return a plaintext copy of the data key.
+//
+// This operation is useful for systems that need to encrypt data at some point,
+// but not immediately. When you need to encrypt the data, you call the Decryptoperation
+// on the encrypted copy of the key.
+//
+// It's also useful in distributed systems with different levels of trust. For
+// example, you might store encrypted data in containers. One component of your
+// system creates new containers and stores an encrypted data key with each
+// container. Then, a different component puts the data into the containers. That
+// component first decrypts the data key, uses the plaintext data key to encrypt
+// data, puts the encrypted data into the container, and then destroys the
+// plaintext data key. In this system, the component that creates the containers
+// never sees the plaintext data key.
+//
+// To request an asymmetric data key pair, use the GenerateDataKeyPair or GenerateDataKeyPairWithoutPlaintext operations.
+//
+// To generate a data key, you must specify the symmetric encryption KMS key that
+// is used to encrypt the data key. You cannot use an asymmetric KMS key or a key
+// in a custom key store to generate a data key. To get the type of your KMS key,
+// use the DescribeKeyoperation.
+//
+// You must also specify the length of the data key. Use either the KeySpec or
+// NumberOfBytes parameters (but not both). For 128-bit and 256-bit data keys, use
+// the KeySpec parameter.
+//
+// To generate an SM4 data key (China Regions only), specify a KeySpec value of
+// AES_128 or NumberOfBytes value of 16 . The symmetric encryption key used in
+// China Regions to encrypt your data key is an SM4 encryption key.
+//
+// If the operation succeeds, you will find the encrypted copy of the data key in
+// the CiphertextBlob field.
+//
+// You can use an optional encryption context to add additional security to the
+// encryption operation. If you specify an EncryptionContext , you must specify the
+// same encryption context (a case-sensitive exact match) when decrypting the
+// encrypted data key. Otherwise, the request to decrypt fails with an
+// InvalidCiphertextException . For more information, see [Encryption Context] in the Key Management
+// Service Developer Guide.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:GenerateDataKeyWithoutPlaintext] (key policy)
+//
+// Related operations:
+//
+// # Decrypt
+//
+// # Encrypt
+//
+// # GenerateDataKey
+//
+// # GenerateDataKeyPair
+//
+// # GenerateDataKeyPairWithoutPlaintext
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [Encryption Context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [kms:GenerateDataKeyWithoutPlaintext]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) GenerateDataKeyWithoutPlaintext(ctx context.Context, params *GenerateDataKeyWithoutPlaintextInput, optFns ...func(*Options)) (*GenerateDataKeyWithoutPlaintextOutput, error) {
+ if params == nil {
+ params = &GenerateDataKeyWithoutPlaintextInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GenerateDataKeyWithoutPlaintext", params, optFns, c.addOperationGenerateDataKeyWithoutPlaintextMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GenerateDataKeyWithoutPlaintextOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GenerateDataKeyWithoutPlaintextInput struct {
+
+ // Specifies the symmetric encryption KMS key that encrypts the data key. You
+ // cannot specify an asymmetric KMS key or a KMS key in a custom key store. To get
+ // the type and origin of your KMS key, use the DescribeKeyoperation.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // Specifies the encryption context that will be used when encrypting the data key.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // An encryption context is a collection of non-secret key-value pairs that
+ // represent additional authenticated data. When you use an encryption context to
+ // encrypt data, you must specify the same (an exact case-sensitive match)
+ // encryption context to decrypt the data. An encryption context is supported only
+ // on operations with symmetric encryption KMS keys. On operations with symmetric
+ // encryption KMS keys, an encryption context is optional, but it is strongly
+ // recommended.
+ //
+ // For more information, see [Encryption context] in the Key Management Service Developer Guide.
+ //
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ EncryptionContext map[string]string
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ // The length of the data key. Use AES_128 to generate a 128-bit symmetric key, or
+ // AES_256 to generate a 256-bit symmetric key.
+ KeySpec types.DataKeySpec
+
+ // The length of the data key in bytes. For example, use the value 64 to generate
+ // a 512-bit data key (64 bytes is 512 bits). For common key lengths (128-bit and
+ // 256-bit symmetric keys), we recommend that you use the KeySpec field instead of
+ // this one.
+ NumberOfBytes *int32
+
+ noSmithyDocumentSerde
+}
+
+type GenerateDataKeyWithoutPlaintextOutput struct {
+
+ // The encrypted data key. When you use the HTTP API or the Amazon Web Services
+ // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
+ CiphertextBlob []byte
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key that encrypted the data key.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGenerateDataKeyWithoutPlaintextMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGenerateDataKeyWithoutPlaintext{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGenerateDataKeyWithoutPlaintext{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GenerateDataKeyWithoutPlaintext"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGenerateDataKeyWithoutPlaintextValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateDataKeyWithoutPlaintext(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGenerateDataKeyWithoutPlaintext(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GenerateDataKeyWithoutPlaintext",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateMac.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateMac.go
new file mode 100644
index 000000000..a5505e333
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateMac.go
@@ -0,0 +1,247 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Generates a hash-based message authentication code (HMAC) for a message using
+// an HMAC KMS key and a MAC algorithm that the key supports. HMAC KMS keys and the
+// HMAC algorithms that KMS uses conform to industry standards defined in [RFC 2104].
+//
+// You can use value that GenerateMac returns in the VerifyMac operation to demonstrate
+// that the original message has not changed. Also, because a secret key is used to
+// create the hash, you can verify that the party that generated the hash has the
+// required secret key. You can also use the raw result to implement HMAC-based
+// algorithms such as key derivation functions. This operation is part of KMS
+// support for HMAC KMS keys. For details, see [HMAC keys in KMS]in the Key Management Service
+// Developer Guide .
+//
+// Best practices recommend that you limit the time during which any signing
+// mechanism, including an HMAC, is effective. This deters an attack where the
+// actor uses a signed message to establish validity repeatedly or long after the
+// message is superseded. HMAC tags do not include a timestamp, but you can include
+// a timestamp in the token or message to help you detect when its time to refresh
+// the HMAC.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:GenerateMac] (key policy)
+//
+// Related operations: VerifyMac
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:GenerateMac]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [RFC 2104]: https://datatracker.ietf.org/doc/html/rfc2104
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [HMAC keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+func (c *Client) GenerateMac(ctx context.Context, params *GenerateMacInput, optFns ...func(*Options)) (*GenerateMacOutput, error) {
+ if params == nil {
+ params = &GenerateMacInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GenerateMac", params, optFns, c.addOperationGenerateMacMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GenerateMacOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GenerateMacInput struct {
+
+ // The HMAC KMS key to use in the operation. The MAC algorithm computes the HMAC
+ // for the message and the key as described in [RFC 2104].
+ //
+ // To identify an HMAC KMS key, use the DescribeKey operation and see the KeySpec field in
+ // the response.
+ //
+ // [RFC 2104]: https://datatracker.ietf.org/doc/html/rfc2104
+ //
+ // This member is required.
+ KeyId *string
+
+ // The MAC algorithm used in the operation.
+ //
+ // The algorithm must be compatible with the HMAC KMS key that you specify. To
+ // find the MAC algorithms that your HMAC KMS key supports, use the DescribeKeyoperation and
+ // see the MacAlgorithms field in the DescribeKey response.
+ //
+ // This member is required.
+ MacAlgorithm types.MacAlgorithmSpec
+
+ // The message to be hashed. Specify a message of up to 4,096 bytes.
+ //
+ // GenerateMac and VerifyMac do not provide special handling for message digests. If you
+ // generate an HMAC for a hash digest of a message, you must verify the HMAC of the
+ // same hash digest.
+ //
+ // This member is required.
+ Message []byte
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ noSmithyDocumentSerde
+}
+
+type GenerateMacOutput struct {
+
+ // The HMAC KMS key used in the operation.
+ KeyId *string
+
+ // The hash-based message authentication code (HMAC) that was generated for the
+ // specified message, HMAC KMS key, and MAC algorithm.
+ //
+ // This is the standard, raw HMAC defined in [RFC 2104].
+ //
+ // [RFC 2104]: https://datatracker.ietf.org/doc/html/rfc2104
+ Mac []byte
+
+ // The MAC algorithm that was used to generate the HMAC.
+ MacAlgorithm types.MacAlgorithmSpec
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGenerateMacMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGenerateMac{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGenerateMac{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GenerateMac"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGenerateMacValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateMac(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGenerateMac(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GenerateMac",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateRandom.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateRandom.go
new file mode 100644
index 000000000..3ff869365
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GenerateRandom.go
@@ -0,0 +1,232 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns a random byte string that is cryptographically secure.
+//
+// You must use the NumberOfBytes parameter to specify the length of the random
+// byte string. There is no default value for string length.
+//
+// By default, the random byte string is generated in KMS. To generate the byte
+// string in the CloudHSM cluster associated with an CloudHSM key store, use the
+// CustomKeyStoreId parameter.
+//
+// GenerateRandom also supports [Amazon Web Services Nitro Enclaves], which provide an isolated compute environment in
+// Amazon EC2. To call GenerateRandom for a Nitro enclave, use the [Amazon Web Services Nitro Enclaves SDK] or any Amazon
+// Web Services SDK. Use the Recipient parameter to provide the attestation
+// document for the enclave. Instead of plaintext bytes, the response includes the
+// plaintext bytes encrypted under the public key from the attestation document (
+// CiphertextForRecipient ).For information about the interaction between KMS and
+// Amazon Web Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer
+// Guide.
+//
+// For more information about entropy and random number generation, see [Key Management Service Cryptographic Details].
+//
+// Cross-account use: Not applicable. GenerateRandom does not use any
+// account-specific resources, such as KMS keys.
+//
+// Required permissions: [kms:GenerateRandom] (IAM policy)
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [kms:GenerateRandom]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Amazon Web Services Nitro Enclaves]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave.html
+// [Key Management Service Cryptographic Details]: https://docs.aws.amazon.com/kms/latest/cryptographic-details/
+// [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+func (c *Client) GenerateRandom(ctx context.Context, params *GenerateRandomInput, optFns ...func(*Options)) (*GenerateRandomOutput, error) {
+ if params == nil {
+ params = &GenerateRandomInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GenerateRandom", params, optFns, c.addOperationGenerateRandomMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GenerateRandomOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GenerateRandomInput struct {
+
+ // Generates the random byte string in the CloudHSM cluster that is associated
+ // with the specified CloudHSM key store. To find the ID of a custom key store, use
+ // the DescribeCustomKeyStoresoperation.
+ //
+ // External key store IDs are not valid for this parameter. If you specify the ID
+ // of an external key store, GenerateRandom throws an UnsupportedOperationException
+ // .
+ CustomKeyStoreId *string
+
+ // The length of the random byte string. This parameter is required.
+ NumberOfBytes *int32
+
+ // A signed [attestation document] from an Amazon Web Services Nitro enclave and the encryption
+ // algorithm to use with the enclave's public key. The only valid encryption
+ // algorithm is RSAES_OAEP_SHA_256 .
+ //
+ // This parameter only supports attestation documents for Amazon Web Services
+ // Nitro Enclaves. To include this parameter, use the [Amazon Web Services Nitro Enclaves SDK]or any Amazon Web Services
+ // SDK.
+ //
+ // When you use this parameter, instead of returning plaintext bytes, KMS encrypts
+ // the plaintext bytes under the public key in the attestation document, and
+ // returns the resulting ciphertext in the CiphertextForRecipient field in the
+ // response. This ciphertext can be decrypted only with the private key in the
+ // enclave. The Plaintext field in the response is null or empty.
+ //
+ // For information about the interaction between KMS and Amazon Web Services Nitro
+ // Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [attestation document]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ // [Amazon Web Services Nitro Enclaves SDK]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
+ Recipient *types.RecipientInfo
+
+ noSmithyDocumentSerde
+}
+
+type GenerateRandomOutput struct {
+
+ // The plaintext random bytes encrypted with the public key from the Nitro
+ // enclave. This ciphertext can be decrypted only by using a private key in the
+ // Nitro enclave.
+ //
+ // This field is included in the response only when the Recipient parameter in the
+ // request includes a valid attestation document from an Amazon Web Services Nitro
+ // enclave. For information about the interaction between KMS and Amazon Web
+ // Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]in the Key Management Service Developer Guide.
+ //
+ // [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+ CiphertextForRecipient []byte
+
+ // The random byte string. When you use the HTTP API or the Amazon Web Services
+ // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
+ //
+ // If the response includes the CiphertextForRecipient field, the Plaintext field
+ // is null or empty.
+ Plaintext []byte
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGenerateRandomMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGenerateRandom{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGenerateRandom{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GenerateRandom"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGenerateRandom(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGenerateRandom(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GenerateRandom",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyPolicy.go
new file mode 100644
index 000000000..b0368d534
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyPolicy.go
@@ -0,0 +1,189 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets a key policy attached to the specified KMS key.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:GetKeyPolicy] (key policy)
+//
+// Related operations: [PutKeyPolicy]
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [kms:GetKeyPolicy]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [PutKeyPolicy]: https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) GetKeyPolicy(ctx context.Context, params *GetKeyPolicyInput, optFns ...func(*Options)) (*GetKeyPolicyOutput, error) {
+ if params == nil {
+ params = &GetKeyPolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetKeyPolicy", params, optFns, c.addOperationGetKeyPolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetKeyPolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetKeyPolicyInput struct {
+
+ // Gets the key policy for the specified KMS key.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Specifies the name of the key policy. If no policy name is specified, the
+ // default value is default . The only valid name is default . To get the names of
+ // key policies, use ListKeyPolicies.
+ PolicyName *string
+
+ noSmithyDocumentSerde
+}
+
+type GetKeyPolicyOutput struct {
+
+ // A key policy document in JSON format.
+ Policy *string
+
+ // The name of the key policy. The only valid value is default .
+ PolicyName *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetKeyPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetKeyPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetKeyPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetKeyPolicy"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetKeyPolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetKeyPolicy(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetKeyPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetKeyPolicy",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyRotationStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyRotationStatus.go
new file mode 100644
index 000000000..0484bb59c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetKeyRotationStatus.go
@@ -0,0 +1,258 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Provides detailed information about the rotation status for a KMS key,
+// including whether [automatic rotation of the key material]is enabled for the specified KMS key, the [rotation period], and the next
+// scheduled rotation date.
+//
+// Automatic key rotation is supported only on [symmetric encryption KMS keys]. You cannot enable automatic
+// rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To enable or disable
+// automatic rotation of a set of related [multi-Region keys], set the property on the primary key..
+//
+// You can enable (EnableKeyRotation ) and disable automatic rotation (DisableKeyRotation ) of the key material in
+// customer managed KMS keys. Key material rotation of [Amazon Web Services managed KMS keys]is not configurable. KMS
+// always rotates the key material in Amazon Web Services managed KMS keys every
+// year. The key rotation status for Amazon Web Services managed KMS keys is always
+// true .
+//
+// You can perform on-demand (RotateKeyOnDemand ) rotation of the key material in customer managed
+// KMS keys, regardless of whether or not automatic key rotation is enabled. You
+// can use GetKeyRotationStatus to identify the date and time that an in progress
+// on-demand rotation was initiated. You can use ListKeyRotationsto view the details of completed
+// rotations.
+//
+// In May 2022, KMS changed the rotation schedule for Amazon Web Services managed
+// keys from every three years to every year. For details, see EnableKeyRotation.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// - Disabled: The key rotation status does not change when you disable a KMS
+// key. However, while the KMS key is disabled, KMS does not rotate the key
+// material. When you re-enable the KMS key, rotation resumes. If the key material
+// in the re-enabled KMS key hasn't been rotated in one year, KMS rotates it
+// immediately, and every year thereafter. If it's been less than a year since the
+// key material in the re-enabled KMS key was rotated, the KMS key resumes its
+// prior rotation schedule.
+//
+// - Pending deletion: While a KMS key is pending deletion, its key rotation
+// status is false and KMS does not rotate the key material. If you cancel the
+// deletion, the original key rotation status returns to true .
+//
+// Cross-account use: Yes. To perform this operation on a KMS key in a different
+// Amazon Web Services account, specify the key ARN in the value of the KeyId
+// parameter.
+//
+// Required permissions: [kms:GetKeyRotationStatus] (key policy)
+//
+// Related operations:
+//
+// # DisableKeyRotation
+//
+// # EnableKeyRotation
+//
+// # ListKeyRotations
+//
+// # RotateKeyOnDemand
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+// [rotation period]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotation-period
+// [Amazon Web Services managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+// [kms:GetKeyRotationStatus]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [automatic rotation of the key material]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
+// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [symmetric encryption KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks
+// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) GetKeyRotationStatus(ctx context.Context, params *GetKeyRotationStatusInput, optFns ...func(*Options)) (*GetKeyRotationStatusOutput, error) {
+ if params == nil {
+ params = &GetKeyRotationStatusInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetKeyRotationStatus", params, optFns, c.addOperationGetKeyRotationStatusMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetKeyRotationStatusOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetKeyRotationStatusInput struct {
+
+ // Gets the rotation status for the specified KMS key.
+ //
+ // Specify the key ID or key ARN of the KMS key. To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type GetKeyRotationStatusOutput struct {
+
+ // Identifies the specified symmetric encryption KMS key.
+ KeyId *string
+
+ // A Boolean value that specifies whether key rotation is enabled.
+ KeyRotationEnabled bool
+
+ // The next date that KMS will automatically rotate the key material.
+ NextRotationDate *time.Time
+
+ // Identifies the date and time that an in progress on-demand rotation was
+ // initiated.
+ //
+ // The KMS API follows an [eventual consistency] model due to the distributed nature of the system. As a
+ // result, there might be a slight delay between initiating on-demand key rotation
+ // and the rotation's completion. Once the on-demand rotation is complete, use ListKeyRotationsto
+ // view the details of the on-demand rotation.
+ //
+ // [eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+ OnDemandRotationStartDate *time.Time
+
+ // The number of days between each automatic rotation. The default value is 365
+ // days.
+ RotationPeriodInDays *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetKeyRotationStatusMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetKeyRotationStatus{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetKeyRotationStatus{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetKeyRotationStatus"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetKeyRotationStatusValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetKeyRotationStatus(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetKeyRotationStatus(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetKeyRotationStatus",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetParametersForImport.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetParametersForImport.go
new file mode 100644
index 000000000..e3ffaca7a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetParametersForImport.go
@@ -0,0 +1,306 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Returns the public key and an import token you need to import or reimport key
+// material for a KMS key.
+//
+// By default, KMS keys are created with key material that KMS generates. This
+// operation supports [Importing key material], an advanced feature that lets you generate and import the
+// cryptographic key material for a KMS key. For more information about importing
+// key material into KMS, see [Importing key material]in the Key Management Service Developer Guide.
+//
+// Before calling GetParametersForImport , use the CreateKey operation with an Origin value
+// of EXTERNAL to create a KMS key with no key material. You can import key
+// material for a symmetric encryption KMS key, HMAC KMS key, asymmetric encryption
+// KMS key, or asymmetric signing KMS key. You can also import key material into a [multi-Region key]
+// of any supported type. However, you can't import key material into a KMS key in
+// a [custom key store]. You can also use GetParametersForImport to get a public key and import
+// token to [reimport the original key material]into a KMS key whose key material expired or was deleted.
+//
+// GetParametersForImport returns the items that you need to import your key
+// material.
+//
+// - The public key (or "wrapping key") of an RSA key pair that KMS generates.
+//
+// You will use this public key to encrypt ("wrap") your key material while it's
+//
+// in transit to KMS.
+//
+// - A import token that ensures that KMS can decrypt your key material and
+// associate it with the correct KMS key.
+//
+// The public key and its import token are permanently linked and must be used
+// together. Each public key and import token set is valid for 24 hours. The
+// expiration date and time appear in the ParametersValidTo field in the
+// GetParametersForImport response. You cannot use an expired public key or import
+// token in an ImportKeyMaterialrequest. If your key and token expire, send another
+// GetParametersForImport request.
+//
+// GetParametersForImport requires the following information:
+//
+// - The key ID of the KMS key for which you are importing the key material.
+//
+// - The key spec of the public key ("wrapping key") that you will use to
+// encrypt your key material during import.
+//
+// - The wrapping algorithm that you will use with the public key to encrypt
+// your key material.
+//
+// You can use the same or a different public key spec and wrapping algorithm each
+// time you import or reimport the same key material.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:GetParametersForImport] (key policy)
+//
+// Related operations:
+//
+// # ImportKeyMaterial
+//
+// # DeleteImportedKeyMaterial
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Importing key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+// [kms:GetParametersForImport]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [reimport the original key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [multi-Region key]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) GetParametersForImport(ctx context.Context, params *GetParametersForImportInput, optFns ...func(*Options)) (*GetParametersForImportOutput, error) {
+ if params == nil {
+ params = &GetParametersForImportInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetParametersForImport", params, optFns, c.addOperationGetParametersForImportMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetParametersForImportOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetParametersForImportInput struct {
+
+ // The identifier of the KMS key that will be associated with the imported key
+ // material. The Origin of the KMS key must be EXTERNAL .
+ //
+ // All KMS key types are supported, including multi-Region keys. However, you
+ // cannot import key material into a KMS key in a custom key store.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // The algorithm you will use with the RSA public key ( PublicKey ) in the response
+ // to protect your key material during import. For more information, see Select a wrapping algorithmin the
+ // Key Management Service Developer Guide.
+ //
+ // For RSA_AES wrapping algorithms, you encrypt your key material with an AES key
+ // that you generate, then encrypt your AES key with the RSA public key from KMS.
+ // For RSAES wrapping algorithms, you encrypt your key material directly with the
+ // RSA public key from KMS.
+ //
+ // The wrapping algorithms that you can use depend on the type of key material
+ // that you are importing. To import an RSA private key, you must use an RSA_AES
+ // wrapping algorithm.
+ //
+ // - RSA_AES_KEY_WRAP_SHA_256 — Supported for wrapping RSA and ECC key material.
+ //
+ // - RSA_AES_KEY_WRAP_SHA_1 — Supported for wrapping RSA and ECC key material.
+ //
+ // - RSAES_OAEP_SHA_256 — Supported for all types of key material, except RSA
+ // key material (private key).
+ //
+ // You cannot use the RSAES_OAEP_SHA_256 wrapping algorithm with the RSA_2048
+ // wrapping key spec to wrap ECC_NIST_P521 key material.
+ //
+ // - RSAES_OAEP_SHA_1 — Supported for all types of key material, except RSA key
+ // material (private key).
+ //
+ // You cannot use the RSAES_OAEP_SHA_1 wrapping algorithm with the RSA_2048
+ // wrapping key spec to wrap ECC_NIST_P521 key material.
+ //
+ // - RSAES_PKCS1_V1_5 (Deprecated) — As of October 10, 2023, KMS does not
+ // support the RSAES_PKCS1_V1_5 wrapping algorithm.
+ //
+ // This member is required.
+ WrappingAlgorithm types.AlgorithmSpec
+
+ // The type of RSA public key to return in the response. You will use this
+ // wrapping key with the specified wrapping algorithm to protect your key material
+ // during import.
+ //
+ // Use the longest RSA wrapping key that is practical.
+ //
+ // You cannot use an RSA_2048 public key to directly wrap an ECC_NIST_P521 private
+ // key. Instead, use an RSA_AES wrapping algorithm or choose a longer RSA public
+ // key.
+ //
+ // This member is required.
+ WrappingKeySpec types.WrappingKeySpec
+
+ noSmithyDocumentSerde
+}
+
+type GetParametersForImportOutput struct {
+
+ // The import token to send in a subsequent ImportKeyMaterial request.
+ ImportToken []byte
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key to use in a subsequent ImportKeyMaterial request.
+ // This is the same KMS key specified in the GetParametersForImport request.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // The time at which the import token and public key are no longer valid. After
+ // this time, you cannot use them to make an ImportKeyMaterialrequest and you must send another
+ // GetParametersForImport request to get new ones.
+ ParametersValidTo *time.Time
+
+ // The public key to use to encrypt the key material before importing it with ImportKeyMaterial.
+ PublicKey []byte
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetParametersForImportMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetParametersForImport{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetParametersForImport{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetParametersForImport"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetParametersForImportValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetParametersForImport(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetParametersForImport(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetParametersForImport",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetPublicKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetPublicKey.go
new file mode 100644
index 000000000..245cf4610
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_GetPublicKey.go
@@ -0,0 +1,297 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns the public key of an asymmetric KMS key. Unlike the private key of a
+// asymmetric KMS key, which never leaves KMS unencrypted, callers with
+// kms:GetPublicKey permission can download the public key of an asymmetric KMS
+// key. You can share the public key to allow others to encrypt messages and verify
+// signatures outside of KMS. For information about asymmetric KMS keys, see [Asymmetric KMS keys]in
+// the Key Management Service Developer Guide.
+//
+// You do not need to download the public key. Instead, you can use the public key
+// within KMS by calling the Encrypt, ReEncrypt, or Verify operations with the identifier of an
+// asymmetric KMS key. When you use the public key within KMS, you benefit from the
+// authentication, authorization, and logging that are part of every KMS operation.
+// You also reduce of risk of encrypting data that cannot be decrypted. These
+// features are not effective outside of KMS.
+//
+// To help you use the public key safely outside of KMS, GetPublicKey returns
+// important information about the public key in the response, including:
+//
+// [KeySpec]
+// - : The type of key material in the public key, such as RSA_4096 or
+// ECC_NIST_P521 .
+//
+// [KeyUsage]
+// - : Whether the key is used for encryption, signing, or deriving a shared
+// secret.
+//
+// [EncryptionAlgorithms]
+// - or [SigningAlgorithms]: A list of the encryption algorithms or the signing algorithms for the
+// key.
+//
+// Although KMS cannot enforce these restrictions on external operations, it is
+// crucial that you use this information to prevent the public key from being used
+// improperly. For example, you can prevent a public signing key from being used
+// encrypt data, or prevent a public key from being used with an encryption
+// algorithm that is not supported by KMS. You can also avoid errors, such as using
+// the wrong signing algorithm in a verification operation.
+//
+// To verify a signature outside of KMS with an SM2 public key (China Regions
+// only), you must specify the distinguishing ID. By default, KMS uses
+// 1234567812345678 as the distinguishing ID. For more information, see [Offline verification with SM2 key pairs].
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:GetPublicKey] (key policy)
+//
+// Related operations: CreateKey
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [SigningAlgorithms]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:GetPublicKey]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [EncryptionAlgorithms]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms
+// [Asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [KeySpec]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec
+// [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
+// [KeyUsage]: https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) GetPublicKey(ctx context.Context, params *GetPublicKeyInput, optFns ...func(*Options)) (*GetPublicKeyOutput, error) {
+ if params == nil {
+ params = &GetPublicKeyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "GetPublicKey", params, optFns, c.addOperationGetPublicKeyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*GetPublicKeyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type GetPublicKeyInput struct {
+
+ // Identifies the asymmetric KMS key that includes the public key.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ KeyId *string
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ noSmithyDocumentSerde
+}
+
+type GetPublicKeyOutput struct {
+
+ // Instead, use the KeySpec field in the GetPublicKey response.
+ //
+ // The KeySpec and CustomerMasterKeySpec fields have the same value. We recommend
+ // that you use the KeySpec field in your code. However, to avoid breaking
+ // changes, KMS supports both fields.
+ //
+ // Deprecated: This field has been deprecated. Instead, use the KeySpec field.
+ CustomerMasterKeySpec types.CustomerMasterKeySpec
+
+ // The encryption algorithms that KMS supports for this key.
+ //
+ // This information is critical. If a public key encrypts data outside of KMS by
+ // using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
+ //
+ // This field appears in the response only when the KeyUsage of the public key is
+ // ENCRYPT_DECRYPT .
+ EncryptionAlgorithms []types.EncryptionAlgorithmSpec
+
+ // The key agreement algorithm used to derive a shared secret. This field is
+ // present only when the KMS key has a KeyUsage value of KEY_AGREEMENT .
+ KeyAgreementAlgorithms []types.KeyAgreementAlgorithmSpec
+
+ // The Amazon Resource Name ([key ARN] ) of the asymmetric KMS key from which the public key
+ // was downloaded.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // The type of the of the public key that was downloaded.
+ KeySpec types.KeySpec
+
+ // The permitted use of the public key. Valid values for asymmetric key pairs are
+ // ENCRYPT_DECRYPT , SIGN_VERIFY , and KEY_AGREEMENT .
+ //
+ // This information is critical. For example, if a public key with SIGN_VERIFY key
+ // usage encrypts data outside of KMS, the ciphertext cannot be decrypted.
+ KeyUsage types.KeyUsageType
+
+ // The exported public key.
+ //
+ // The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo
+ // (SPKI), as defined in [RFC 5280]. When you use the HTTP API or the Amazon Web Services
+ // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
+ //
+ // [RFC 5280]: https://tools.ietf.org/html/rfc5280
+ PublicKey []byte
+
+ // The signing algorithms that KMS supports for this key.
+ //
+ // This field appears in the response only when the KeyUsage of the public key is
+ // SIGN_VERIFY .
+ SigningAlgorithms []types.SigningAlgorithmSpec
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationGetPublicKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetPublicKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetPublicKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "GetPublicKey"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpGetPublicKeyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetPublicKey(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opGetPublicKey(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "GetPublicKey",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ImportKeyMaterial.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ImportKeyMaterial.go
new file mode 100644
index 000000000..ee7037a49
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ImportKeyMaterial.go
@@ -0,0 +1,321 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Imports or reimports key material into an existing KMS key that was created
+// without key material. ImportKeyMaterial also sets the expiration model and
+// expiration date of the imported key material.
+//
+// By default, KMS keys are created with key material that KMS generates. This
+// operation supports [Importing key material], an advanced feature that lets you generate and import the
+// cryptographic key material for a KMS key. For more information about importing
+// key material into KMS, see [Importing key material]in the Key Management Service Developer Guide.
+//
+// After you successfully import key material into a KMS key, you can [reimport the same key material] into that
+// KMS key, but you cannot import different key material. You might reimport key
+// material to replace key material that expired or key material that you deleted.
+// You might also reimport key material to change the expiration model or
+// expiration date of the key material.
+//
+// Each time you import key material into KMS, you can determine whether (
+// ExpirationModel ) and when ( ValidTo ) the key material expires. To change the
+// expiration of your key material, you must import it again, either by calling
+// ImportKeyMaterial or using the import features of the KMS console.
+//
+// Before calling ImportKeyMaterial :
+//
+// - Create or identify a KMS key with no key material. The KMS key must have an
+// Origin value of EXTERNAL , which indicates that the KMS key is designed for
+// imported key material.
+//
+// To create an new KMS key for imported key material, call the CreateKeyoperation with an
+//
+// Origin value of EXTERNAL . You can create a symmetric encryption KMS key, HMAC
+// KMS key, asymmetric encryption KMS key, or asymmetric signing KMS key. You can
+// also import key material into a multi-Region keyof any supported type. However, you can't
+// import key material into a KMS key in a custom key store.
+//
+// - Use the DescribeKeyoperation to verify that the KeyState of the KMS key is
+// PendingImport , which indicates that the KMS key has no key material.
+//
+// If you are reimporting the same key material into an existing KMS key, you
+//
+// might need to call the DeleteImportedKeyMaterialto delete its existing key material.
+//
+// - Call the GetParametersForImportoperation to get a public key and import token set for importing
+// key material.
+//
+// - Use the public key in the GetParametersForImportresponse to encrypt your key material.
+//
+// Then, in an ImportKeyMaterial request, you submit your encrypted key material
+// and import token. When calling this operation, you must specify the following
+// values:
+//
+// - The key ID or key ARN of the KMS key to associate with the imported key
+// material. Its Origin must be EXTERNAL and its KeyState must be PendingImport .
+// You cannot perform this operation on a KMS key in a custom key store, or on a KMS key in a
+// different Amazon Web Services account. To get the Origin and KeyState of a KMS
+// key, call DescribeKey.
+//
+// - The encrypted key material.
+//
+// - The import token that GetParametersForImportreturned. You must use a public key and token from
+// the same GetParametersForImport response.
+//
+// - Whether the key material expires ( ExpirationModel ) and, if so, when (
+// ValidTo ). For help with this choice, see [Setting an expiration time]in the Key Management Service
+// Developer Guide.
+//
+// If you set an expiration date, KMS deletes the key material from the KMS key on
+//
+// the specified date, making the KMS key unusable. To use the KMS key in
+// cryptographic operations again, you must reimport the same key material.
+// However, you can delete and reimport the key material at any time, including
+// before the key material expires. Each time you reimport, you can eliminate or
+// reset the expiration time.
+//
+// When this operation is successful, the key state of the KMS key changes from
+// PendingImport to Enabled , and you can use the KMS key in cryptographic
+// operations.
+//
+// If this operation fails, use the exception to help determine the problem. If
+// the error is related to the key material, the import token, or wrapping key, use
+// GetParametersForImportto get a new public key and import token for the KMS key and repeat the import
+// procedure. For help, see [How To Import Key Material]in the Key Management Service Developer Guide.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:ImportKeyMaterial] (key policy)
+//
+// Related operations:
+//
+// # DeleteImportedKeyMaterial
+//
+// # GetParametersForImport
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Importing key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [How To Import Key Material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#importing-keys-overview
+// [kms:ImportKeyMaterial]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [reimport the same key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material
+// [Setting an expiration time]: https://docs.aws.amazon.com/en_us/kms/latest/developerguide/importing-keys.html#importing-keys-expiration
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) ImportKeyMaterial(ctx context.Context, params *ImportKeyMaterialInput, optFns ...func(*Options)) (*ImportKeyMaterialOutput, error) {
+ if params == nil {
+ params = &ImportKeyMaterialInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ImportKeyMaterial", params, optFns, c.addOperationImportKeyMaterialMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ImportKeyMaterialOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ImportKeyMaterialInput struct {
+
+ // The encrypted key material to import. The key material must be encrypted under
+ // the public wrapping key that GetParametersForImportreturned, using the wrapping algorithm that you
+ // specified in the same GetParametersForImport request.
+ //
+ // This member is required.
+ EncryptedKeyMaterial []byte
+
+ // The import token that you received in the response to a previous GetParametersForImport request. It
+ // must be from the same response that contained the public key that you used to
+ // encrypt the key material.
+ //
+ // This member is required.
+ ImportToken []byte
+
+ // The identifier of the KMS key that will be associated with the imported key
+ // material. This must be the same KMS key specified in the KeyID parameter of the
+ // corresponding GetParametersForImportrequest. The Origin of the KMS key must be EXTERNAL and its
+ // KeyState must be PendingImport .
+ //
+ // The KMS key can be a symmetric encryption KMS key, HMAC KMS key, asymmetric
+ // encryption KMS key, or asymmetric signing KMS key, including a multi-Region keyof any supported
+ // type. You cannot perform this operation on a KMS key in a custom key store, or
+ // on a KMS key in a different Amazon Web Services account.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Specifies whether the key material expires. The default is KEY_MATERIAL_EXPIRES
+ // . For help with this choice, see [Setting an expiration time]in the Key Management Service Developer Guide.
+ //
+ // When the value of ExpirationModel is KEY_MATERIAL_EXPIRES , you must specify a
+ // value for the ValidTo parameter. When value is KEY_MATERIAL_DOES_NOT_EXPIRE ,
+ // you must omit the ValidTo parameter.
+ //
+ // You cannot change the ExpirationModel or ValidTo values for the current import
+ // after the request completes. To change either value, you must reimport the key
+ // material.
+ //
+ // [Setting an expiration time]: https://docs.aws.amazon.com/en_us/kms/latest/developerguide/importing-keys.html#importing-keys-expiration
+ ExpirationModel types.ExpirationModelType
+
+ // The date and time when the imported key material expires. This parameter is
+ // required when the value of the ExpirationModel parameter is KEY_MATERIAL_EXPIRES
+ // . Otherwise it is not valid.
+ //
+ // The value of this parameter must be a future date and time. The maximum value
+ // is 365 days from the request date.
+ //
+ // When the key material expires, KMS deletes the key material from the KMS key.
+ // Without its key material, the KMS key is unusable. To use the KMS key in
+ // cryptographic operations, you must reimport the same key material.
+ //
+ // You cannot change the ExpirationModel or ValidTo values for the current import
+ // after the request completes. To change either value, you must delete (DeleteImportedKeyMaterial ) and
+ // reimport the key material.
+ ValidTo *time.Time
+
+ noSmithyDocumentSerde
+}
+
+type ImportKeyMaterialOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationImportKeyMaterialMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpImportKeyMaterial{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpImportKeyMaterial{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ImportKeyMaterial"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpImportKeyMaterialValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opImportKeyMaterial(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opImportKeyMaterial(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ImportKeyMaterial",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListAliases.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListAliases.go
new file mode 100644
index 000000000..e7f68db3f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListAliases.go
@@ -0,0 +1,326 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets a list of aliases in the caller's Amazon Web Services account and region.
+// For more information about aliases, see CreateAlias.
+//
+// By default, the ListAliases operation returns all aliases in the account and
+// region. To get only the aliases associated with a particular KMS key, use the
+// KeyId parameter.
+//
+// The ListAliases response can include aliases that you created and associated
+// with your customer managed keys, and aliases that Amazon Web Services created
+// and associated with Amazon Web Services managed keys in your account. You can
+// recognize Amazon Web Services aliases because their names have the format aws/ ,
+// such as aws/dynamodb .
+//
+// The response might also include aliases that have no TargetKeyId field. These
+// are predefined aliases that Amazon Web Services has created but has not yet
+// associated with a KMS key. Aliases that Amazon Web Services creates in your
+// account, including predefined aliases, do not count against your [KMS aliases quota].
+//
+// Cross-account use: No. ListAliases does not return aliases in other Amazon Web
+// Services accounts.
+//
+// Required permissions: [kms:ListAliases] (IAM policy)
+//
+// For details, see [Controlling access to aliases] in the Key Management Service Developer Guide.
+//
+// Related operations:
+//
+// # CreateAlias
+//
+// # DeleteAlias
+//
+// # UpdateAlias
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [KMS aliases quota]: https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit
+// [kms:ListAliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
+func (c *Client) ListAliases(ctx context.Context, params *ListAliasesInput, optFns ...func(*Options)) (*ListAliasesOutput, error) {
+ if params == nil {
+ params = &ListAliasesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListAliases", params, optFns, c.addOperationListAliasesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListAliasesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListAliasesInput struct {
+
+ // Lists only aliases that are associated with the specified KMS key. Enter a KMS
+ // key in your Amazon Web Services account.
+ //
+ // This parameter is optional. If you omit it, ListAliases returns all aliases in
+ // the account and Region.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ KeyId *string
+
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 100,
+ // inclusive. If you do not include a value, it defaults to 50.
+ Limit *int32
+
+ // Use this parameter in a subsequent request after you receive a response with
+ // truncated results. Set it to the value of NextMarker from the truncated
+ // response you just received.
+ Marker *string
+
+ noSmithyDocumentSerde
+}
+
+type ListAliasesOutput struct {
+
+ // A list of aliases.
+ Aliases []types.AliasListEntry
+
+ // When Truncated is true, this element is present and contains the value to use
+ // for the Marker parameter in a subsequent request.
+ NextMarker *string
+
+ // A flag that indicates whether there are more items in the list. When this value
+ // is true, the list in this response is truncated. To get more items, pass the
+ // value of the NextMarker element in this response to the Marker parameter in a
+ // subsequent request.
+ Truncated bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListAliasesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpListAliases{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListAliases{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListAliases"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAliases(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListAliasesPaginatorOptions is the paginator options for ListAliases
+type ListAliasesPaginatorOptions struct {
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 100,
+ // inclusive. If you do not include a value, it defaults to 50.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListAliasesPaginator is a paginator for ListAliases
+type ListAliasesPaginator struct {
+ options ListAliasesPaginatorOptions
+ client ListAliasesAPIClient
+ params *ListAliasesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListAliasesPaginator returns a new ListAliasesPaginator
+func NewListAliasesPaginator(client ListAliasesAPIClient, params *ListAliasesInput, optFns ...func(*ListAliasesPaginatorOptions)) *ListAliasesPaginator {
+ if params == nil {
+ params = &ListAliasesInput{}
+ }
+
+ options := ListAliasesPaginatorOptions{}
+ if params.Limit != nil {
+ options.Limit = *params.Limit
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListAliasesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListAliasesPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListAliases page.
+func (p *ListAliasesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAliasesOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.Limit = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListAliases(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListAliasesAPIClient is a client that implements the ListAliases operation.
+type ListAliasesAPIClient interface {
+ ListAliases(context.Context, *ListAliasesInput, ...func(*Options)) (*ListAliasesOutput, error)
+}
+
+var _ ListAliasesAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListAliases(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListAliases",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListGrants.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListGrants.go
new file mode 100644
index 000000000..bd9433fa6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListGrants.go
@@ -0,0 +1,335 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets a list of all grants for the specified KMS key.
+//
+// You must specify the KMS key in all requests. You can filter the grant list by
+// grant ID or grantee principal.
+//
+// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
+// Key Management Service Developer Guide . For examples of working with grants in
+// several programming languages, see [Programming grants].
+//
+// The GranteePrincipal field in the ListGrants response usually contains the user
+// or role designated as the grantee principal in the grant. However, when the
+// grantee principal in the grant is an Amazon Web Services service, the
+// GranteePrincipal field contains the [service principal], which might represent several different
+// grantee principals.
+//
+// Cross-account use: Yes. To perform this operation on a KMS key in a different
+// Amazon Web Services account, specify the key ARN in the value of the KeyId
+// parameter.
+//
+// Required permissions: [kms:ListGrants] (key policy)
+//
+// Related operations:
+//
+// # CreateGrant
+//
+// # ListRetirableGrants
+//
+// # RetireGrant
+//
+// # RevokeGrant
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
+// [service principal]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
+// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
+// [kms:ListGrants]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) ListGrants(ctx context.Context, params *ListGrantsInput, optFns ...func(*Options)) (*ListGrantsOutput, error) {
+ if params == nil {
+ params = &ListGrantsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListGrants", params, optFns, c.addOperationListGrantsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListGrantsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListGrantsInput struct {
+
+ // Returns only grants for the specified KMS key. This parameter is required.
+ //
+ // Specify the key ID or key ARN of the KMS key. To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Returns only the grant with the specified grant ID. The grant ID uniquely
+ // identifies the grant.
+ GrantId *string
+
+ // Returns only grants where the specified principal is the grantee principal for
+ // the grant.
+ GranteePrincipal *string
+
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 100,
+ // inclusive. If you do not include a value, it defaults to 50.
+ Limit *int32
+
+ // Use this parameter in a subsequent request after you receive a response with
+ // truncated results. Set it to the value of NextMarker from the truncated
+ // response you just received.
+ Marker *string
+
+ noSmithyDocumentSerde
+}
+
+type ListGrantsOutput struct {
+
+ // A list of grants.
+ Grants []types.GrantListEntry
+
+ // When Truncated is true, this element is present and contains the value to use
+ // for the Marker parameter in a subsequent request.
+ NextMarker *string
+
+ // A flag that indicates whether there are more items in the list. When this value
+ // is true, the list in this response is truncated. To get more items, pass the
+ // value of the NextMarker element in this response to the Marker parameter in a
+ // subsequent request.
+ Truncated bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListGrantsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpListGrants{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListGrants{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListGrants"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListGrantsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGrants(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListGrantsPaginatorOptions is the paginator options for ListGrants
+type ListGrantsPaginatorOptions struct {
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 100,
+ // inclusive. If you do not include a value, it defaults to 50.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListGrantsPaginator is a paginator for ListGrants
+type ListGrantsPaginator struct {
+ options ListGrantsPaginatorOptions
+ client ListGrantsAPIClient
+ params *ListGrantsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListGrantsPaginator returns a new ListGrantsPaginator
+func NewListGrantsPaginator(client ListGrantsAPIClient, params *ListGrantsInput, optFns ...func(*ListGrantsPaginatorOptions)) *ListGrantsPaginator {
+ if params == nil {
+ params = &ListGrantsInput{}
+ }
+
+ options := ListGrantsPaginatorOptions{}
+ if params.Limit != nil {
+ options.Limit = *params.Limit
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListGrantsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListGrantsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListGrants page.
+func (p *ListGrantsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGrantsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.Limit = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListGrants(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListGrantsAPIClient is a client that implements the ListGrants operation.
+type ListGrantsAPIClient interface {
+ ListGrants(context.Context, *ListGrantsInput, ...func(*Options)) (*ListGrantsOutput, error)
+}
+
+var _ ListGrantsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListGrants(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListGrants",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyPolicies.go
new file mode 100644
index 000000000..c68867a53
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyPolicies.go
@@ -0,0 +1,312 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets the names of the key policies that are attached to a KMS key. This
+// operation is designed to get policy names that you can use in a GetKeyPolicyoperation.
+// However, the only valid policy name is default .
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:ListKeyPolicies] (key policy)
+//
+// Related operations:
+//
+// # GetKeyPolicy
+//
+// [PutKeyPolicy]
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [kms:ListKeyPolicies]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [PutKeyPolicy]: https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) ListKeyPolicies(ctx context.Context, params *ListKeyPoliciesInput, optFns ...func(*Options)) (*ListKeyPoliciesOutput, error) {
+ if params == nil {
+ params = &ListKeyPoliciesInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListKeyPolicies", params, optFns, c.addOperationListKeyPoliciesMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListKeyPoliciesOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListKeyPoliciesInput struct {
+
+ // Gets the names of key policies for the specified KMS key.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 1000,
+ // inclusive. If you do not include a value, it defaults to 100.
+ //
+ // Only one policy can be attached to a key.
+ Limit *int32
+
+ // Use this parameter in a subsequent request after you receive a response with
+ // truncated results. Set it to the value of NextMarker from the truncated
+ // response you just received.
+ Marker *string
+
+ noSmithyDocumentSerde
+}
+
+type ListKeyPoliciesOutput struct {
+
+ // When Truncated is true, this element is present and contains the value to use
+ // for the Marker parameter in a subsequent request.
+ NextMarker *string
+
+ // A list of key policy names. The only valid value is default .
+ PolicyNames []string
+
+ // A flag that indicates whether there are more items in the list. When this value
+ // is true, the list in this response is truncated. To get more items, pass the
+ // value of the NextMarker element in this response to the Marker parameter in a
+ // subsequent request.
+ Truncated bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListKeyPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpListKeyPolicies{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListKeyPolicies{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListKeyPolicies"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListKeyPoliciesValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeyPolicies(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListKeyPoliciesPaginatorOptions is the paginator options for ListKeyPolicies
+type ListKeyPoliciesPaginatorOptions struct {
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 1000,
+ // inclusive. If you do not include a value, it defaults to 100.
+ //
+ // Only one policy can be attached to a key.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListKeyPoliciesPaginator is a paginator for ListKeyPolicies
+type ListKeyPoliciesPaginator struct {
+ options ListKeyPoliciesPaginatorOptions
+ client ListKeyPoliciesAPIClient
+ params *ListKeyPoliciesInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListKeyPoliciesPaginator returns a new ListKeyPoliciesPaginator
+func NewListKeyPoliciesPaginator(client ListKeyPoliciesAPIClient, params *ListKeyPoliciesInput, optFns ...func(*ListKeyPoliciesPaginatorOptions)) *ListKeyPoliciesPaginator {
+ if params == nil {
+ params = &ListKeyPoliciesInput{}
+ }
+
+ options := ListKeyPoliciesPaginatorOptions{}
+ if params.Limit != nil {
+ options.Limit = *params.Limit
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListKeyPoliciesPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListKeyPoliciesPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListKeyPolicies page.
+func (p *ListKeyPoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListKeyPoliciesOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.Limit = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListKeyPolicies(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListKeyPoliciesAPIClient is a client that implements the ListKeyPolicies
+// operation.
+type ListKeyPoliciesAPIClient interface {
+ ListKeyPolicies(context.Context, *ListKeyPoliciesInput, ...func(*Options)) (*ListKeyPoliciesOutput, error)
+}
+
+var _ ListKeyPoliciesAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListKeyPolicies(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListKeyPolicies",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyRotations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyRotations.go
new file mode 100644
index 000000000..eed276b15
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeyRotations.go
@@ -0,0 +1,318 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns information about all completed key material rotations for the
+// specified KMS key.
+//
+// You must specify the KMS key in all requests. You can refine the key rotations
+// list by limiting the number of rotations returned.
+//
+// For detailed information about automatic and on-demand key rotations, see [Rotating KMS keys] in
+// the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:ListKeyRotations] (key policy)
+//
+// Related operations:
+//
+// # EnableKeyRotation
+//
+// # DisableKeyRotation
+//
+// # GetKeyRotationStatus
+//
+// # RotateKeyOnDemand
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Rotating KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
+// [kms:ListKeyRotations]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) ListKeyRotations(ctx context.Context, params *ListKeyRotationsInput, optFns ...func(*Options)) (*ListKeyRotationsOutput, error) {
+ if params == nil {
+ params = &ListKeyRotationsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListKeyRotations", params, optFns, c.addOperationListKeyRotationsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListKeyRotationsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListKeyRotationsInput struct {
+
+ // Gets the key rotations for the specified KMS key.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 1000,
+ // inclusive. If you do not include a value, it defaults to 100.
+ Limit *int32
+
+ // Use this parameter in a subsequent request after you receive a response with
+ // truncated results. Set it to the value of NextMarker from the truncated
+ // response you just received.
+ Marker *string
+
+ noSmithyDocumentSerde
+}
+
+type ListKeyRotationsOutput struct {
+
+ // When Truncated is true, this element is present and contains the value to use
+ // for the Marker parameter in a subsequent request.
+ NextMarker *string
+
+ // A list of completed key material rotations.
+ Rotations []types.RotationsListEntry
+
+ // A flag that indicates whether there are more items in the list. When this value
+ // is true, the list in this response is truncated. To get more items, pass the
+ // value of the NextMarker element in this response to the Marker parameter in a
+ // subsequent request.
+ Truncated bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListKeyRotationsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpListKeyRotations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListKeyRotations{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListKeyRotations"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListKeyRotationsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeyRotations(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListKeyRotationsPaginatorOptions is the paginator options for ListKeyRotations
+type ListKeyRotationsPaginatorOptions struct {
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 1000,
+ // inclusive. If you do not include a value, it defaults to 100.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListKeyRotationsPaginator is a paginator for ListKeyRotations
+type ListKeyRotationsPaginator struct {
+ options ListKeyRotationsPaginatorOptions
+ client ListKeyRotationsAPIClient
+ params *ListKeyRotationsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListKeyRotationsPaginator returns a new ListKeyRotationsPaginator
+func NewListKeyRotationsPaginator(client ListKeyRotationsAPIClient, params *ListKeyRotationsInput, optFns ...func(*ListKeyRotationsPaginatorOptions)) *ListKeyRotationsPaginator {
+ if params == nil {
+ params = &ListKeyRotationsInput{}
+ }
+
+ options := ListKeyRotationsPaginatorOptions{}
+ if params.Limit != nil {
+ options.Limit = *params.Limit
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListKeyRotationsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListKeyRotationsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListKeyRotations page.
+func (p *ListKeyRotationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListKeyRotationsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.Limit = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListKeyRotations(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListKeyRotationsAPIClient is a client that implements the ListKeyRotations
+// operation.
+type ListKeyRotationsAPIClient interface {
+ ListKeyRotations(context.Context, *ListKeyRotationsInput, ...func(*Options)) (*ListKeyRotationsOutput, error)
+}
+
+var _ ListKeyRotationsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListKeyRotations(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListKeyRotations",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeys.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeys.go
new file mode 100644
index 000000000..9c3860fcc
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListKeys.go
@@ -0,0 +1,291 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Gets a list of all KMS keys in the caller's Amazon Web Services account and
+// Region.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:ListKeys] (IAM policy)
+//
+// Related operations:
+//
+// # CreateKey
+//
+// # DescribeKey
+//
+// # ListAliases
+//
+// # ListResourceTags
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [kms:ListKeys]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) ListKeys(ctx context.Context, params *ListKeysInput, optFns ...func(*Options)) (*ListKeysOutput, error) {
+ if params == nil {
+ params = &ListKeysInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListKeys", params, optFns, c.addOperationListKeysMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListKeysOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListKeysInput struct {
+
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 1000,
+ // inclusive. If you do not include a value, it defaults to 100.
+ Limit *int32
+
+ // Use this parameter in a subsequent request after you receive a response with
+ // truncated results. Set it to the value of NextMarker from the truncated
+ // response you just received.
+ Marker *string
+
+ noSmithyDocumentSerde
+}
+
+type ListKeysOutput struct {
+
+ // A list of KMS keys.
+ Keys []types.KeyListEntry
+
+ // When Truncated is true, this element is present and contains the value to use
+ // for the Marker parameter in a subsequent request.
+ NextMarker *string
+
+ // A flag that indicates whether there are more items in the list. When this value
+ // is true, the list in this response is truncated. To get more items, pass the
+ // value of the NextMarker element in this response to the Marker parameter in a
+ // subsequent request.
+ Truncated bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListKeysMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpListKeys{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListKeys{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListKeys"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListKeys(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListKeysPaginatorOptions is the paginator options for ListKeys
+type ListKeysPaginatorOptions struct {
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 1000,
+ // inclusive. If you do not include a value, it defaults to 100.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListKeysPaginator is a paginator for ListKeys
+type ListKeysPaginator struct {
+ options ListKeysPaginatorOptions
+ client ListKeysAPIClient
+ params *ListKeysInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListKeysPaginator returns a new ListKeysPaginator
+func NewListKeysPaginator(client ListKeysAPIClient, params *ListKeysInput, optFns ...func(*ListKeysPaginatorOptions)) *ListKeysPaginator {
+ if params == nil {
+ params = &ListKeysInput{}
+ }
+
+ options := ListKeysPaginatorOptions{}
+ if params.Limit != nil {
+ options.Limit = *params.Limit
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListKeysPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListKeysPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListKeys page.
+func (p *ListKeysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListKeysOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.Limit = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListKeys(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListKeysAPIClient is a client that implements the ListKeys operation.
+type ListKeysAPIClient interface {
+ ListKeys(context.Context, *ListKeysInput, ...func(*Options)) (*ListKeysOutput, error)
+}
+
+var _ ListKeysAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListKeys(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListKeys",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListResourceTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListResourceTags.go
new file mode 100644
index 000000000..7bdf6304c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListResourceTags.go
@@ -0,0 +1,326 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns all tags on the specified KMS key.
+//
+// For general information about tags, including the format and syntax, see [Tagging Amazon Web Services resources] in
+// the Amazon Web Services General Reference. For information about using tags in
+// KMS, see [Tagging keys].
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:ListResourceTags] (key policy)
+//
+// Related operations:
+//
+// # CreateKey
+//
+// # ReplicateKey
+//
+// # TagResource
+//
+// # UntagResource
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Tagging keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
+// [kms:ListResourceTags]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
+func (c *Client) ListResourceTags(ctx context.Context, params *ListResourceTagsInput, optFns ...func(*Options)) (*ListResourceTagsOutput, error) {
+ if params == nil {
+ params = &ListResourceTagsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListResourceTags", params, optFns, c.addOperationListResourceTagsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListResourceTagsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListResourceTagsInput struct {
+
+ // Gets tags on the specified KMS key.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 50,
+ // inclusive. If you do not include a value, it defaults to 50.
+ Limit *int32
+
+ // Use this parameter in a subsequent request after you receive a response with
+ // truncated results. Set it to the value of NextMarker from the truncated
+ // response you just received.
+ //
+ // Do not attempt to construct this value. Use only the value of NextMarker from
+ // the truncated response you just received.
+ Marker *string
+
+ noSmithyDocumentSerde
+}
+
+type ListResourceTagsOutput struct {
+
+ // When Truncated is true, this element is present and contains the value to use
+ // for the Marker parameter in a subsequent request.
+ //
+ // Do not assume or infer any information from this value.
+ NextMarker *string
+
+ // A list of tags. Each tag consists of a tag key and a tag value.
+ //
+ // Tagging or untagging a KMS key can allow or deny permission to the KMS key. For
+ // details, see [ABAC for KMS]in the Key Management Service Developer Guide.
+ //
+ // [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+ Tags []types.Tag
+
+ // A flag that indicates whether there are more items in the list. When this value
+ // is true, the list in this response is truncated. To get more items, pass the
+ // value of the NextMarker element in this response to the Marker parameter in a
+ // subsequent request.
+ Truncated bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListResourceTagsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpListResourceTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListResourceTags{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListResourceTags"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListResourceTagsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceTags(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListResourceTagsPaginatorOptions is the paginator options for ListResourceTags
+type ListResourceTagsPaginatorOptions struct {
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 50,
+ // inclusive. If you do not include a value, it defaults to 50.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListResourceTagsPaginator is a paginator for ListResourceTags
+type ListResourceTagsPaginator struct {
+ options ListResourceTagsPaginatorOptions
+ client ListResourceTagsAPIClient
+ params *ListResourceTagsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListResourceTagsPaginator returns a new ListResourceTagsPaginator
+func NewListResourceTagsPaginator(client ListResourceTagsAPIClient, params *ListResourceTagsInput, optFns ...func(*ListResourceTagsPaginatorOptions)) *ListResourceTagsPaginator {
+ if params == nil {
+ params = &ListResourceTagsInput{}
+ }
+
+ options := ListResourceTagsPaginatorOptions{}
+ if params.Limit != nil {
+ options.Limit = *params.Limit
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListResourceTagsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListResourceTagsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListResourceTags page.
+func (p *ListResourceTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceTagsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.Limit = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListResourceTags(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListResourceTagsAPIClient is a client that implements the ListResourceTags
+// operation.
+type ListResourceTagsAPIClient interface {
+ ListResourceTags(context.Context, *ListResourceTagsInput, ...func(*Options)) (*ListResourceTagsOutput, error)
+}
+
+var _ ListResourceTagsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListResourceTags(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListResourceTags",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListRetirableGrants.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListRetirableGrants.go
new file mode 100644
index 000000000..7fe68d8e2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ListRetirableGrants.go
@@ -0,0 +1,332 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Returns information about all grants in the Amazon Web Services account and
+// Region that have the specified retiring principal.
+//
+// You can specify any principal in your Amazon Web Services account. The grants
+// that are returned include grants for KMS keys in your Amazon Web Services
+// account and other Amazon Web Services accounts. You might use this operation to
+// determine which grants you may retire. To retire a grant, use the RetireGrantoperation.
+//
+// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
+// Key Management Service Developer Guide . For examples of working with grants in
+// several programming languages, see [Programming grants].
+//
+// Cross-account use: You must specify a principal in your Amazon Web Services
+// account. This operation returns a list of grants where the retiring principal
+// specified in the ListRetirableGrants request is the same retiring principal on
+// the grant. This can include grants on KMS keys owned by other Amazon Web
+// Services accounts, but you do not need kms:ListRetirableGrants permission (or
+// any other additional permission) in any Amazon Web Services account other than
+// your own.
+//
+// Required permissions: [kms:ListRetirableGrants] (IAM policy) in your Amazon Web Services account.
+//
+// KMS authorizes ListRetirableGrants requests by evaluating the caller account's
+// kms:ListRetirableGrants permissions. The authorized resource in
+// ListRetirableGrants calls is the retiring principal specified in the request.
+// KMS does not evaluate the caller's permissions to verify their access to any KMS
+// keys or grants that might be returned by the ListRetirableGrants call.
+//
+// Related operations:
+//
+// # CreateGrant
+//
+// # ListGrants
+//
+// # RetireGrant
+//
+// # RevokeGrant
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
+// [kms:ListRetirableGrants]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) ListRetirableGrants(ctx context.Context, params *ListRetirableGrantsInput, optFns ...func(*Options)) (*ListRetirableGrantsOutput, error) {
+ if params == nil {
+ params = &ListRetirableGrantsInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ListRetirableGrants", params, optFns, c.addOperationListRetirableGrantsMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ListRetirableGrantsOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ListRetirableGrantsInput struct {
+
+ // The retiring principal for which to list grants. Enter a principal in your
+ // Amazon Web Services account.
+ //
+ // To specify the retiring principal, use the [Amazon Resource Name (ARN)] of an Amazon Web Services
+ // principal. Valid principals include Amazon Web Services accounts, IAM users, IAM
+ // roles, federated users, and assumed role users. For help with the ARN syntax for
+ // a principal, see [IAM ARNs]in the Identity and Access Management User Guide .
+ //
+ // [IAM ARNs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns
+ // [Amazon Resource Name (ARN)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
+ //
+ // This member is required.
+ RetiringPrincipal *string
+
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 100,
+ // inclusive. If you do not include a value, it defaults to 50.
+ Limit *int32
+
+ // Use this parameter in a subsequent request after you receive a response with
+ // truncated results. Set it to the value of NextMarker from the truncated
+ // response you just received.
+ Marker *string
+
+ noSmithyDocumentSerde
+}
+
+type ListRetirableGrantsOutput struct {
+
+ // A list of grants.
+ Grants []types.GrantListEntry
+
+ // When Truncated is true, this element is present and contains the value to use
+ // for the Marker parameter in a subsequent request.
+ NextMarker *string
+
+ // A flag that indicates whether there are more items in the list. When this value
+ // is true, the list in this response is truncated. To get more items, pass the
+ // value of the NextMarker element in this response to the Marker parameter in a
+ // subsequent request.
+ Truncated bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationListRetirableGrantsMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRetirableGrants{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRetirableGrants{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ListRetirableGrants"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpListRetirableGrantsValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRetirableGrants(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ListRetirableGrantsPaginatorOptions is the paginator options for
+// ListRetirableGrants
+type ListRetirableGrantsPaginatorOptions struct {
+ // Use this parameter to specify the maximum number of items to return. When this
+ // value is present, KMS does not return more than the specified number of items,
+ // but it might return fewer.
+ //
+ // This value is optional. If you include a value, it must be between 1 and 100,
+ // inclusive. If you do not include a value, it defaults to 50.
+ Limit int32
+
+ // Set to true if pagination should stop if the service returns a pagination token
+ // that matches the most recent token provided to the service.
+ StopOnDuplicateToken bool
+}
+
+// ListRetirableGrantsPaginator is a paginator for ListRetirableGrants
+type ListRetirableGrantsPaginator struct {
+ options ListRetirableGrantsPaginatorOptions
+ client ListRetirableGrantsAPIClient
+ params *ListRetirableGrantsInput
+ nextToken *string
+ firstPage bool
+}
+
+// NewListRetirableGrantsPaginator returns a new ListRetirableGrantsPaginator
+func NewListRetirableGrantsPaginator(client ListRetirableGrantsAPIClient, params *ListRetirableGrantsInput, optFns ...func(*ListRetirableGrantsPaginatorOptions)) *ListRetirableGrantsPaginator {
+ if params == nil {
+ params = &ListRetirableGrantsInput{}
+ }
+
+ options := ListRetirableGrantsPaginatorOptions{}
+ if params.Limit != nil {
+ options.Limit = *params.Limit
+ }
+
+ for _, fn := range optFns {
+ fn(&options)
+ }
+
+ return &ListRetirableGrantsPaginator{
+ options: options,
+ client: client,
+ params: params,
+ firstPage: true,
+ nextToken: params.Marker,
+ }
+}
+
+// HasMorePages returns a boolean indicating whether more pages are available
+func (p *ListRetirableGrantsPaginator) HasMorePages() bool {
+ return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0)
+}
+
+// NextPage retrieves the next ListRetirableGrants page.
+func (p *ListRetirableGrantsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRetirableGrantsOutput, error) {
+ if !p.HasMorePages() {
+ return nil, fmt.Errorf("no more pages available")
+ }
+
+ params := *p.params
+ params.Marker = p.nextToken
+
+ var limit *int32
+ if p.options.Limit > 0 {
+ limit = &p.options.Limit
+ }
+ params.Limit = limit
+
+ optFns = append([]func(*Options){
+ addIsPaginatorUserAgent,
+ }, optFns...)
+ result, err := p.client.ListRetirableGrants(ctx, ¶ms, optFns...)
+ if err != nil {
+ return nil, err
+ }
+ p.firstPage = false
+
+ prevToken := p.nextToken
+ p.nextToken = result.NextMarker
+
+ if p.options.StopOnDuplicateToken &&
+ prevToken != nil &&
+ p.nextToken != nil &&
+ *prevToken == *p.nextToken {
+ p.nextToken = nil
+ }
+
+ return result, nil
+}
+
+// ListRetirableGrantsAPIClient is a client that implements the
+// ListRetirableGrants operation.
+type ListRetirableGrantsAPIClient interface {
+ ListRetirableGrants(context.Context, *ListRetirableGrantsInput, ...func(*Options)) (*ListRetirableGrantsOutput, error)
+}
+
+var _ ListRetirableGrantsAPIClient = (*Client)(nil)
+
+func newServiceMetadataMiddleware_opListRetirableGrants(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ListRetirableGrants",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_PutKeyPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_PutKeyPolicy.go
new file mode 100644
index 000000000..4957cdee9
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_PutKeyPolicy.go
@@ -0,0 +1,244 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Attaches a key policy to the specified KMS key.
+//
+// For more information about key policies, see [Key Policies] in the Key Management Service
+// Developer Guide. For help writing and formatting a JSON policy document, see the
+// [IAM JSON Policy Reference]in the Identity and Access Management User Guide . For examples of adding a key
+// policy in multiple programming languages, see [Setting a key policy]in the Key Management Service
+// Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:PutKeyPolicy] (key policy)
+//
+// Related operations: GetKeyPolicy
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [IAM JSON Policy Reference]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
+// [kms:PutKeyPolicy]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Setting a key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-key-policies.html#put-policy
+// [Key Policies]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) PutKeyPolicy(ctx context.Context, params *PutKeyPolicyInput, optFns ...func(*Options)) (*PutKeyPolicyOutput, error) {
+ if params == nil {
+ params = &PutKeyPolicyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "PutKeyPolicy", params, optFns, c.addOperationPutKeyPolicyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*PutKeyPolicyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type PutKeyPolicyInput struct {
+
+ // Sets the key policy on the specified KMS key.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // The key policy to attach to the KMS key.
+ //
+ // The key policy must meet the following criteria:
+ //
+ // - The key policy must allow the calling principal to make a subsequent
+ // PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key
+ // becomes unmanageable. For more information, see [Default key policy]in the Key Management Service
+ // Developer Guide. (To omit this condition, set BypassPolicyLockoutSafetyCheck
+ // to true.)
+ //
+ // - Each statement in the key policy must contain one or more principals. The
+ // principals in the key policy must exist and be visible to KMS. When you create a
+ // new Amazon Web Services principal, you might need to enforce a delay before
+ // including the new principal in a key policy because the new principal might not
+ // be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible]in the Amazon Web
+ // Services Identity and Access Management User Guide.
+ //
+ // A key policy document can include only the following characters:
+ //
+ // - Printable ASCII characters from the space character ( \u0020 ) through the
+ // end of the ASCII character range.
+ //
+ // - Printable characters in the Basic Latin and Latin-1 Supplement character
+ // set (through \u00FF ).
+ //
+ // - The tab ( \u0009 ), line feed ( \u000A ), and carriage return ( \u000D )
+ // special characters
+ //
+ // For information about key policies, see [Key policies in KMS] in the Key Management Service
+ // Developer Guide.For help writing and formatting a JSON policy document, see the [IAM JSON Policy Reference]
+ // in the Identity and Access Management User Guide .
+ //
+ // [Key policies in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
+ // [IAM JSON Policy Reference]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
+ // [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
+ // [Changes that I make are not always immediately visible]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
+ //
+ // This member is required.
+ Policy *string
+
+ // Skips ("bypasses") the key policy lockout safety check. The default value is
+ // false.
+ //
+ // Setting this value to true increases the risk that the KMS key becomes
+ // unmanageable. Do not set this value to true indiscriminately.
+ //
+ // For more information, see [Default key policy] in the Key Management Service Developer Guide.
+ //
+ // Use this parameter only when you intend to prevent the principal that is making
+ // the request from making a subsequent [PutKeyPolicy]request on the KMS key.
+ //
+ // [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
+ // [PutKeyPolicy]: https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html
+ BypassPolicyLockoutSafetyCheck bool
+
+ // The name of the key policy. If no policy name is specified, the default value
+ // is default . The only valid value is default .
+ PolicyName *string
+
+ noSmithyDocumentSerde
+}
+
+type PutKeyPolicyOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationPutKeyPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutKeyPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutKeyPolicy{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "PutKeyPolicy"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpPutKeyPolicyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutKeyPolicy(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opPutKeyPolicy(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "PutKeyPolicy",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReEncrypt.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReEncrypt.go
new file mode 100644
index 000000000..7d6f278de
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReEncrypt.go
@@ -0,0 +1,401 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Decrypts ciphertext and then reencrypts it entirely within KMS. You can use
+// this operation to change the KMS key under which data is encrypted, such as when
+// you [manually rotate]a KMS key or change the KMS key that protects a ciphertext. You can also
+// use it to reencrypt ciphertext under the same KMS key, such as to change the [encryption context]of
+// a ciphertext.
+//
+// The ReEncrypt operation can decrypt ciphertext that was encrypted by using a
+// KMS key in an KMS operation, such as Encryptor GenerateDataKey. It can also decrypt ciphertext that
+// was encrypted by using the public key of an [asymmetric KMS key]outside of KMS. However, it cannot
+// decrypt ciphertext produced by other libraries, such as the [Amazon Web Services Encryption SDK]or [Amazon S3 client-side encryption]. These
+// libraries return a ciphertext format that is incompatible with KMS.
+//
+// When you use the ReEncrypt operation, you need to provide information for the
+// decrypt operation and the subsequent encrypt operation.
+//
+// - If your ciphertext was encrypted under an asymmetric KMS key, you must use
+// the SourceKeyId parameter to identify the KMS key that encrypted the
+// ciphertext. You must also supply the encryption algorithm that was used. This
+// information is required to decrypt the data.
+//
+// - If your ciphertext was encrypted under a symmetric encryption KMS key, the
+// SourceKeyId parameter is optional. KMS can get this information from metadata
+// that it adds to the symmetric ciphertext blob. This feature adds durability to
+// your implementation by ensuring that authorized users can decrypt ciphertext
+// decades after it was encrypted, even if they've lost track of the key ID.
+// However, specifying the source KMS key is always recommended as a best practice.
+// When you use the SourceKeyId parameter to specify a KMS key, KMS uses only the
+// KMS key you specify. If the ciphertext was encrypted under a different KMS key,
+// the ReEncrypt operation fails. This practice ensures that you use the KMS key
+// that you intend.
+//
+// - To reencrypt the data, you must use the DestinationKeyId parameter to
+// specify the KMS key that re-encrypts the data after it is decrypted. If the
+// destination KMS key is an asymmetric KMS key, you must also provide the
+// encryption algorithm. The algorithm that you choose must be compatible with the
+// KMS key.
+//
+// When you use an asymmetric KMS key to encrypt or reencrypt data, be sure to
+//
+// record the KMS key and encryption algorithm that you choose. You will be
+// required to provide the same KMS key and encryption algorithm when you decrypt
+// the data. If the KMS key and algorithm do not match the values used to encrypt
+// the data, the decrypt operation fails.
+//
+// You are not required to supply the key ID and encryption algorithm when you
+//
+// decrypt with symmetric encryption KMS keys because KMS stores this information
+// in the ciphertext blob. KMS cannot store metadata in ciphertext generated with
+// asymmetric keys. The standard format for asymmetric key ciphertext does not
+// include configurable fields.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. The source KMS key and destination KMS key can be in
+// different Amazon Web Services accounts. Either or both KMS keys can be in a
+// different account than the caller. To specify a KMS key in a different account,
+// you must use its key ARN or alias ARN.
+//
+// Required permissions:
+//
+// [kms:ReEncryptFrom]
+// - permission on the source KMS key (key policy)
+//
+// [kms:ReEncryptTo]
+// - permission on the destination KMS key (key policy)
+//
+// To permit reencryption from or to a KMS key, include the "kms:ReEncrypt*"
+// permission in your [key policy]. This permission is automatically included in the key
+// policy when you use the console to create a KMS key. But you must include it
+// manually when you create a KMS key programmatically or when you use the PutKeyPolicy
+// operation to set a key policy.
+//
+// Related operations:
+//
+// # Decrypt
+//
+// # Encrypt
+//
+// # GenerateDataKey
+//
+// # GenerateDataKeyPair
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Amazon Web Services Encryption SDK]: https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [asymmetric KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks
+// [key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
+// [Amazon S3 client-side encryption]: https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
+// [kms:ReEncryptTo]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [manually rotate]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-manually
+// [kms:ReEncryptFrom]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) ReEncrypt(ctx context.Context, params *ReEncryptInput, optFns ...func(*Options)) (*ReEncryptOutput, error) {
+ if params == nil {
+ params = &ReEncryptInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReEncrypt", params, optFns, c.addOperationReEncryptMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReEncryptOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReEncryptInput struct {
+
+ // Ciphertext of the data to reencrypt.
+ //
+ // This member is required.
+ CiphertextBlob []byte
+
+ // A unique identifier for the KMS key that is used to reencrypt the data. Specify
+ // a symmetric encryption KMS key or an asymmetric KMS key with a KeyUsage value
+ // of ENCRYPT_DECRYPT . To find the KeyUsage value of a KMS key, use the DescribeKey
+ // operation.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ DestinationKeyId *string
+
+ // Specifies the encryption algorithm that KMS will use to reecrypt the data after
+ // it has decrypted it. The default value, SYMMETRIC_DEFAULT , represents the
+ // encryption algorithm used for symmetric encryption KMS keys.
+ //
+ // This parameter is required only when the destination KMS key is an asymmetric
+ // KMS key.
+ DestinationEncryptionAlgorithm types.EncryptionAlgorithmSpec
+
+ // Specifies that encryption context to use when the reencrypting the data.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // A destination encryption context is valid only when the destination KMS key is
+ // a symmetric encryption KMS key. The standard ciphertext format for asymmetric
+ // KMS keys does not include fields for metadata.
+ //
+ // An encryption context is a collection of non-secret key-value pairs that
+ // represent additional authenticated data. When you use an encryption context to
+ // encrypt data, you must specify the same (an exact case-sensitive match)
+ // encryption context to decrypt the data. An encryption context is supported only
+ // on operations with symmetric encryption KMS keys. On operations with symmetric
+ // encryption KMS keys, an encryption context is optional, but it is strongly
+ // recommended.
+ //
+ // For more information, see [Encryption context] in the Key Management Service Developer Guide.
+ //
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ DestinationEncryptionContext map[string]string
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ // Specifies the encryption algorithm that KMS will use to decrypt the ciphertext
+ // before it is reencrypted. The default value, SYMMETRIC_DEFAULT , represents the
+ // algorithm used for symmetric encryption KMS keys.
+ //
+ // Specify the same algorithm that was used to encrypt the ciphertext. If you
+ // specify a different algorithm, the decrypt attempt fails.
+ //
+ // This parameter is required only when the ciphertext was encrypted under an
+ // asymmetric KMS key.
+ SourceEncryptionAlgorithm types.EncryptionAlgorithmSpec
+
+ // Specifies the encryption context to use to decrypt the ciphertext. Enter the
+ // same encryption context that was used to encrypt the ciphertext.
+ //
+ // An encryption context is a collection of non-secret key-value pairs that
+ // represent additional authenticated data. When you use an encryption context to
+ // encrypt data, you must specify the same (an exact case-sensitive match)
+ // encryption context to decrypt the data. An encryption context is supported only
+ // on operations with symmetric encryption KMS keys. On operations with symmetric
+ // encryption KMS keys, an encryption context is optional, but it is strongly
+ // recommended.
+ //
+ // For more information, see [Encryption context] in the Key Management Service Developer Guide.
+ //
+ // [Encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+ SourceEncryptionContext map[string]string
+
+ // Specifies the KMS key that KMS will use to decrypt the ciphertext before it is
+ // re-encrypted.
+ //
+ // Enter a key ID of the KMS key that was used to encrypt the ciphertext. If you
+ // identify a different KMS key, the ReEncrypt operation throws an
+ // IncorrectKeyException .
+ //
+ // This parameter is required only when the ciphertext was encrypted under an
+ // asymmetric KMS key. If you used a symmetric encryption KMS key, KMS can get the
+ // KMS key from metadata that it adds to the symmetric ciphertext blob. However, it
+ // is always recommended as a best practice. This practice ensures that you use the
+ // KMS key that you intend.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ SourceKeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type ReEncryptOutput struct {
+
+ // The reencrypted data. When you use the HTTP API or the Amazon Web Services CLI,
+ // the value is Base64-encoded. Otherwise, it is not Base64-encoded.
+ CiphertextBlob []byte
+
+ // The encryption algorithm that was used to reencrypt the data.
+ DestinationEncryptionAlgorithm types.EncryptionAlgorithmSpec
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key that was used to reencrypt the data.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // The encryption algorithm that was used to decrypt the ciphertext before it was
+ // reencrypted.
+ SourceEncryptionAlgorithm types.EncryptionAlgorithmSpec
+
+ // Unique identifier of the KMS key used to originally encrypt the data.
+ SourceKeyId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReEncryptMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpReEncrypt{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpReEncrypt{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ReEncrypt"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpReEncryptValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReEncrypt(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opReEncrypt(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ReEncrypt",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReplicateKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReplicateKey.go
new file mode 100644
index 000000000..4c5bb7b17
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ReplicateKey.go
@@ -0,0 +1,398 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Replicates a multi-Region key into the specified Region. This operation creates
+// a multi-Region replica key based on a multi-Region primary key in a different
+// Region of the same Amazon Web Services partition. You can create multiple
+// replicas of a primary key, but each must be in a different Region. To create a
+// multi-Region primary key, use the CreateKeyoperation.
+//
+// This operation supports multi-Region keys, an KMS feature that lets you create
+// multiple interoperable KMS keys in different Amazon Web Services Regions.
+// Because these KMS keys have the same key ID, key material, and other metadata,
+// you can use them interchangeably to encrypt data in one Amazon Web Services
+// Region and decrypt it in a different Amazon Web Services Region without
+// re-encrypting the data or making a cross-Region call. For more information about
+// multi-Region keys, see [Multi-Region keys in KMS]in the Key Management Service Developer Guide.
+//
+// A replica key is a fully-functional KMS key that can be used independently of
+// its primary and peer replica keys. A primary key and its replica keys share
+// properties that make them interoperable. They have the same [key ID]and key material.
+// They also have the same [key spec], [key usage], [key material origin], and [automatic key rotation status]. KMS automatically synchronizes these shared
+// properties among related multi-Region keys. All other properties of a replica
+// key can differ, including its [key policy], [tags], [aliases], and [Key states of KMS keys]. KMS pricing and quotas for KMS keys
+// apply to each primary key and replica key.
+//
+// When this operation completes, the new replica key has a transient key state of
+// Creating . This key state changes to Enabled (or PendingImport ) after a few
+// seconds when the process of creating the new replica key is complete. While the
+// key state is Creating , you can manage key, but you cannot yet use it in
+// cryptographic operations. If you are creating and using the replica key
+// programmatically, retry on KMSInvalidStateException or call DescribeKey to
+// check its KeyState value before using it. For details about the Creating key
+// state, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// You cannot create more than one replica of a primary key in any Region. If the
+// Region already includes a replica of the key you're trying to replicate,
+// ReplicateKey returns an AlreadyExistsException error. If the key state of the
+// existing replica is PendingDeletion , you can cancel the scheduled key deletion (CancelKeyDeletion
+// ) or wait for the key to be deleted. The new replica key you create will have
+// the same [shared properties]as the original replica key.
+//
+// The CloudTrail log of a ReplicateKey operation records a ReplicateKey operation
+// in the primary key's Region and a CreateKeyoperation in the replica key's Region.
+//
+// If you replicate a multi-Region primary key with imported key material, the
+// replica key is created with no key material. You must import the same key
+// material that you imported into the primary key. For details, see [Importing key material into multi-Region keys]in the Key
+// Management Service Developer Guide.
+//
+// To convert a replica key to a primary key, use the UpdatePrimaryRegion operation.
+//
+// ReplicateKey uses different default values for the KeyPolicy and Tags
+// parameters than those used in the KMS console. For details, see the parameter
+// descriptions.
+//
+// Cross-account use: No. You cannot use this operation to create a replica key in
+// a different Amazon Web Services account.
+//
+// Required permissions:
+//
+// - kms:ReplicateKey on the primary key (in the primary key's Region). Include
+// this permission in the primary key's key policy.
+//
+// - kms:CreateKey in an IAM policy in the replica Region.
+//
+// - To use the Tags parameter, kms:TagResource in an IAM policy in the replica
+// Region.
+//
+// # Related operations
+//
+// # CreateKey
+//
+// # UpdatePrimaryRegion
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [key ID]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id
+// [automatic key rotation status]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
+// [aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html
+// [key usage]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage
+// [Multi-Region keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
+// [key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [tags]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [key spec]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec
+// [Importing key material into multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-import.html
+// [key material origin]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin
+// [shared properties]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-sync-properties
+func (c *Client) ReplicateKey(ctx context.Context, params *ReplicateKeyInput, optFns ...func(*Options)) (*ReplicateKeyOutput, error) {
+ if params == nil {
+ params = &ReplicateKeyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ReplicateKey", params, optFns, c.addOperationReplicateKeyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ReplicateKeyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ReplicateKeyInput struct {
+
+ // Identifies the multi-Region primary key that is being replicated. To determine
+ // whether a KMS key is a multi-Region primary key, use the DescribeKeyoperation to check the
+ // value of the MultiRegionKeyType property.
+ //
+ // Specify the key ID or key ARN of a multi-Region primary key.
+ //
+ // For example:
+ //
+ // - Key ID: mrk-1234abcd12ab34cd56ef1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // The Region ID of the Amazon Web Services Region for this replica key.
+ //
+ // Enter the Region ID, such as us-east-1 or ap-southeast-2 . For a list of Amazon
+ // Web Services Regions in which KMS is supported, see [KMS service endpoints]in the Amazon Web Services
+ // General Reference.
+ //
+ // HMAC KMS keys are not supported in all Amazon Web Services Regions. If you try
+ // to replicate an HMAC KMS key in an Amazon Web Services Region in which HMAC keys
+ // are not supported, the ReplicateKey operation returns an
+ // UnsupportedOperationException . For a list of Regions in which HMAC KMS keys are
+ // supported, see [HMAC keys in KMS]in the Key Management Service Developer Guide.
+ //
+ // The replica must be in a different Amazon Web Services Region than its primary
+ // key and other replicas of that primary key, but in the same Amazon Web Services
+ // partition. KMS must be available in the replica Region. If the Region is not
+ // enabled by default, the Amazon Web Services account must be enabled in the
+ // Region. For information about Amazon Web Services partitions, see [Amazon Resource Names (ARNs)]in the Amazon
+ // Web Services General Reference. For information about enabling and disabling
+ // Regions, see [Enabling a Region]and [Disabling a Region] in the Amazon Web Services General Reference.
+ //
+ // [Disabling a Region]: https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-disable
+ // [Enabling a Region]: https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable
+ // [KMS service endpoints]: https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region
+ // [HMAC keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+ // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
+ //
+ // This member is required.
+ ReplicaRegion *string
+
+ // Skips ("bypasses") the key policy lockout safety check. The default value is
+ // false.
+ //
+ // Setting this value to true increases the risk that the KMS key becomes
+ // unmanageable. Do not set this value to true indiscriminately.
+ //
+ // For more information, see [Default key policy] in the Key Management Service Developer Guide.
+ //
+ // Use this parameter only when you intend to prevent the principal that is making
+ // the request from making a subsequent [PutKeyPolicy]request on the KMS key.
+ //
+ // [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
+ // [PutKeyPolicy]: https://docs.aws.amazon.com/kms/latest/APIReference/API_PutKeyPolicy.html
+ BypassPolicyLockoutSafetyCheck bool
+
+ // A description of the KMS key. The default value is an empty string (no
+ // description).
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // The description is not a shared property of multi-Region keys. You can specify
+ // the same description or a different description for each key in a set of related
+ // multi-Region keys. KMS does not synchronize this property.
+ Description *string
+
+ // The key policy to attach to the KMS key. This parameter is optional. If you do
+ // not provide a key policy, KMS attaches the [default key policy]to the KMS key.
+ //
+ // The key policy is not a shared property of multi-Region keys. You can specify
+ // the same key policy or a different key policy for each key in a set of related
+ // multi-Region keys. KMS does not synchronize this property.
+ //
+ // If you provide a key policy, it must meet the following criteria:
+ //
+ // - The key policy must allow the calling principal to make a subsequent
+ // PutKeyPolicy request on the KMS key. This reduces the risk that the KMS key
+ // becomes unmanageable. For more information, see [Default key policy]in the Key Management Service
+ // Developer Guide. (To omit this condition, set BypassPolicyLockoutSafetyCheck
+ // to true.)
+ //
+ // - Each statement in the key policy must contain one or more principals. The
+ // principals in the key policy must exist and be visible to KMS. When you create a
+ // new Amazon Web Services principal, you might need to enforce a delay before
+ // including the new principal in a key policy because the new principal might not
+ // be immediately visible to KMS. For more information, see [Changes that I make are not always immediately visible]in the Amazon Web
+ // Services Identity and Access Management User Guide.
+ //
+ // A key policy document can include only the following characters:
+ //
+ // - Printable ASCII characters from the space character ( \u0020 ) through the
+ // end of the ASCII character range.
+ //
+ // - Printable characters in the Basic Latin and Latin-1 Supplement character
+ // set (through \u00FF ).
+ //
+ // - The tab ( \u0009 ), line feed ( \u000A ), and carriage return ( \u000D )
+ // special characters
+ //
+ // For information about key policies, see [Key policies in KMS] in the Key Management Service
+ // Developer Guide. For help writing and formatting a JSON policy document, see the
+ // [IAM JSON Policy Reference]in the Identity and Access Management User Guide .
+ //
+ // [Key policies in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html
+ // [default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default
+ // [IAM JSON Policy Reference]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html
+ // [Default key policy]: https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-default.html#prevent-unmanageable-key
+ // [Changes that I make are not always immediately visible]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
+ Policy *string
+
+ // Assigns one or more tags to the replica key. Use this parameter to tag the KMS
+ // key when it is created. To tag an existing KMS key, use the TagResourceoperation.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // Tagging or untagging a KMS key can allow or deny permission to the KMS key. For
+ // details, see [ABAC for KMS]in the Key Management Service Developer Guide.
+ //
+ // To use this parameter, you must have [kms:TagResource] permission in an IAM policy.
+ //
+ // Tags are not a shared property of multi-Region keys. You can specify the same
+ // tags or different tags for each key in a set of related multi-Region keys. KMS
+ // does not synchronize this property.
+ //
+ // Each tag consists of a tag key and a tag value. Both the tag key and the tag
+ // value are required, but the tag value can be an empty (null) string. You cannot
+ // have more than one tag on a KMS key with the same tag key. If you specify an
+ // existing tag key with a different tag value, KMS replaces the current tag value
+ // with the specified one.
+ //
+ // When you add tags to an Amazon Web Services resource, Amazon Web Services
+ // generates a cost allocation report with usage and costs aggregated by tags. Tags
+ // can also be used to control access to a KMS key. For details, see [Tagging Keys].
+ //
+ // [kms:TagResource]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+ // [Tagging Keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
+ // [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+ Tags []types.Tag
+
+ noSmithyDocumentSerde
+}
+
+type ReplicateKeyOutput struct {
+
+ // Displays details about the new replica key, including its Amazon Resource Name ([key ARN]
+ // ) and [Key states of KMS keys]. It also includes the ARN and Amazon Web Services Region of its primary
+ // key and other replica keys.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ // [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+ ReplicaKeyMetadata *types.KeyMetadata
+
+ // The key policy of the new replica key. The value is a key policy document in
+ // JSON format.
+ ReplicaPolicy *string
+
+ // The tags on the new replica key. The value is a list of tag key and tag value
+ // pairs.
+ ReplicaTags []types.Tag
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationReplicateKeyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpReplicateKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpReplicateKey{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ReplicateKey"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpReplicateKeyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplicateKey(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opReplicateKey(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ReplicateKey",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RetireGrant.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RetireGrant.go
new file mode 100644
index 000000000..016739eab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RetireGrant.go
@@ -0,0 +1,213 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes a grant. Typically, you retire a grant when you no longer need its
+// permissions. To identify the grant to retire, use a [grant token], or both the grant ID and
+// a key identifier (key ID or key ARN) of the KMS key. The CreateGrantoperation returns both
+// values.
+//
+// This operation can be called by the retiring principal for a grant, by the
+// grantee principal if the grant allows the RetireGrant operation, and by the
+// Amazon Web Services account in which the grant is created. It can also be called
+// by principals to whom permission for retiring a grant is delegated. For details,
+// see [Retiring and revoking grants]in the Key Management Service Developer Guide.
+//
+// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
+// Key Management Service Developer Guide . For examples of working with grants in
+// several programming languages, see [Programming grants].
+//
+// Cross-account use: Yes. You can retire a grant on a KMS key in a different
+// Amazon Web Services account.
+//
+// Required permissions: Permission to retire a grant is determined primarily by
+// the grant. For details, see [Retiring and revoking grants]in the Key Management Service Developer Guide.
+//
+// Related operations:
+//
+// # CreateGrant
+//
+// # ListGrants
+//
+// # ListRetirableGrants
+//
+// # RevokeGrant
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
+// [grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+// [Retiring and revoking grants]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete
+// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) RetireGrant(ctx context.Context, params *RetireGrantInput, optFns ...func(*Options)) (*RetireGrantOutput, error) {
+ if params == nil {
+ params = &RetireGrantInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RetireGrant", params, optFns, c.addOperationRetireGrantMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RetireGrantOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RetireGrantInput struct {
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // Identifies the grant to retire. To get the grant ID, use CreateGrant, ListGrants, or ListRetirableGrants.
+ //
+ // - Grant ID Example -
+ // 0123456789012345678901234567890123456789012345678901234567890123
+ GrantId *string
+
+ // Identifies the grant to be retired. You can use a grant token to identify a new
+ // grant even before it has achieved eventual consistency.
+ //
+ // Only the CreateGrant operation returns a grant token. For details, see [Grant token] and [Eventual consistency] in the Key
+ // Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency
+ GrantToken *string
+
+ // The key ARN KMS key associated with the grant. To find the key ARN, use the ListKeys
+ // operation.
+ //
+ // For example:
+ // arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type RetireGrantOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRetireGrantMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpRetireGrant{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRetireGrant{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "RetireGrant"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRetireGrant(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opRetireGrant(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "RetireGrant",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RevokeGrant.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RevokeGrant.go
new file mode 100644
index 000000000..c97a332bf
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RevokeGrant.go
@@ -0,0 +1,215 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes the specified grant. You revoke a grant to terminate the permissions
+// that the grant allows. For more information, see [Retiring and revoking grants]in the Key Management Service
+// Developer Guide .
+//
+// When you create, retire, or revoke a grant, there might be a brief delay,
+// usually less than five minutes, until the grant is available throughout KMS.
+// This state is known as eventual consistency. For details, see [Eventual consistency]in the Key
+// Management Service Developer Guide .
+//
+// For detailed information about grants, including grant terminology, see [Grants in KMS] in the
+// Key Management Service Developer Guide . For examples of working with grants in
+// several programming languages, see [Programming grants].
+//
+// Cross-account use: Yes. To perform this operation on a KMS key in a different
+// Amazon Web Services account, specify the key ARN in the value of the KeyId
+// parameter.
+//
+// Required permissions: [kms:RevokeGrant] (key policy).
+//
+// Related operations:
+//
+// # CreateGrant
+//
+// # ListGrants
+//
+// # ListRetirableGrants
+//
+// # RetireGrant
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency
+// [Programming grants]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html
+// [kms:RevokeGrant]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [Retiring and revoking grants]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete
+// [Grants in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) RevokeGrant(ctx context.Context, params *RevokeGrantInput, optFns ...func(*Options)) (*RevokeGrantOutput, error) {
+ if params == nil {
+ params = &RevokeGrantInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RevokeGrant", params, optFns, c.addOperationRevokeGrantMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RevokeGrantOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RevokeGrantInput struct {
+
+ // Identifies the grant to revoke. To get the grant ID, use CreateGrant, ListGrants, or ListRetirableGrants.
+ //
+ // This member is required.
+ GrantId *string
+
+ // A unique identifier for the KMS key associated with the grant. To get the key
+ // ID and key ARN for a KMS key, use ListKeysor DescribeKey.
+ //
+ // Specify the key ID or key ARN of the KMS key. To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ noSmithyDocumentSerde
+}
+
+type RevokeGrantOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRevokeGrantMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpRevokeGrant{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRevokeGrant{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "RevokeGrant"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpRevokeGrantValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRevokeGrant(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opRevokeGrant(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "RevokeGrant",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RotateKeyOnDemand.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RotateKeyOnDemand.go
new file mode 100644
index 000000000..5424efcf6
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_RotateKeyOnDemand.go
@@ -0,0 +1,237 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Immediately initiates rotation of the key material of the specified symmetric
+// encryption KMS key.
+//
+// You can perform [on-demand rotation] of the key material in customer managed KMS keys, regardless
+// of whether or not [automatic key rotation]is enabled. On-demand rotations do not change existing
+// automatic rotation schedules. For example, consider a KMS key that has automatic
+// key rotation enabled with a rotation period of 730 days. If the key is scheduled
+// to automatically rotate on April 14, 2024, and you perform an on-demand rotation
+// on April 10, 2024, the key will automatically rotate, as scheduled, on April 14,
+// 2024 and every 730 days thereafter.
+//
+// You can perform on-demand key rotation a maximum of 10 times per KMS key. You
+// can use the KMS console to view the number of remaining on-demand rotations
+// available for a KMS key.
+//
+// You can use GetKeyRotationStatus to identify any in progress on-demand rotations. You can use ListKeyRotations to
+// identify the date that completed on-demand rotations were performed. You can
+// monitor rotation of the key material for your KMS keys in CloudTrail and Amazon
+// CloudWatch.
+//
+// On-demand key rotation is supported only on [symmetric encryption KMS keys]. You cannot perform on-demand
+// rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To perform on-demand
+// rotation of a set of related [multi-Region keys], invoke the on-demand rotation on the primary key.
+//
+// You cannot initiate on-demand rotation of [Amazon Web Services managed KMS keys]. KMS always rotates the key material
+// of Amazon Web Services managed keys every year. Rotation of [Amazon Web Services owned KMS keys]is managed by the
+// Amazon Web Services service that owns the key.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:RotateKeyOnDemand] (key policy)
+//
+// Related operations:
+//
+// # EnableKeyRotation
+//
+// # DisableKeyRotation
+//
+// # GetKeyRotationStatus
+//
+// # ListKeyRotations
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [on-demand rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-on-demand
+// [Amazon Web Services owned KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+// [automatic key rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-enable-disable
+// [kms:RotateKeyOnDemand]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+// [Amazon Web Services managed KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+// [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [symmetric encryption KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#symmetric-cmks
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+func (c *Client) RotateKeyOnDemand(ctx context.Context, params *RotateKeyOnDemandInput, optFns ...func(*Options)) (*RotateKeyOnDemandOutput, error) {
+ if params == nil {
+ params = &RotateKeyOnDemandInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "RotateKeyOnDemand", params, optFns, c.addOperationRotateKeyOnDemandMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*RotateKeyOnDemandOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type RotateKeyOnDemandInput struct {
+
+ // Identifies a symmetric encryption KMS key. You cannot perform on-demand
+ // rotation of [asymmetric KMS keys], [HMAC KMS keys], KMS keys with [imported key material], or KMS keys in a [custom key store]. To perform on-demand
+ // rotation of a set of related [multi-Region keys], invoke the on-demand rotation on the primary key.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // [imported key material]: https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html
+ // [HMAC KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+ // [asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+ // [multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-rotate
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ //
+ // This member is required.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type RotateKeyOnDemandOutput struct {
+
+ // Identifies the symmetric encryption KMS key that you initiated on-demand
+ // rotation on.
+ KeyId *string
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationRotateKeyOnDemandMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpRotateKeyOnDemand{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRotateKeyOnDemand{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "RotateKeyOnDemand"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpRotateKeyOnDemandValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRotateKeyOnDemand(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opRotateKeyOnDemand(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "RotateKeyOnDemand",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ScheduleKeyDeletion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ScheduleKeyDeletion.go
new file mode 100644
index 000000000..090468d5e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_ScheduleKeyDeletion.go
@@ -0,0 +1,268 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "time"
+)
+
+// Schedules the deletion of a KMS key. By default, KMS applies a waiting period
+// of 30 days, but you can specify a waiting period of 7-30 days. When this
+// operation is successful, the key state of the KMS key changes to PendingDeletion
+// and the key can't be used in any cryptographic operations. It remains in this
+// state for the duration of the waiting period. Before the waiting period ends,
+// you can use CancelKeyDeletionto cancel the deletion of the KMS key. After the waiting period
+// ends, KMS deletes the KMS key, its key material, and all KMS data associated
+// with it, including all aliases that refer to it.
+//
+// Deleting a KMS key is a destructive and potentially dangerous operation. When a
+// KMS key is deleted, all data that was encrypted under the KMS key is
+// unrecoverable. (The only exception is a [multi-Region replica key], or an asymmetric or HMAC KMS key with imported key material.) To prevent the use of a KMS
+// key without deleting it, use DisableKey.
+//
+// You can schedule the deletion of a multi-Region primary key and its replica
+// keys at any time. However, KMS will not delete a multi-Region primary key with
+// existing replica keys. If you schedule the deletion of a primary key with
+// replicas, its key state changes to PendingReplicaDeletion and it cannot be
+// replicated or used in cryptographic operations. This status can continue
+// indefinitely. When the last of its replicas keys is deleted (not just
+// scheduled), the key state of the primary key changes to PendingDeletion and its
+// waiting period ( PendingWindowInDays ) begins. For details, see [Deleting multi-Region keys] in the Key
+// Management Service Developer Guide.
+//
+// When KMS [deletes a KMS key from an CloudHSM key store], it makes a best effort to delete the associated key material from
+// the associated CloudHSM cluster. However, you might need to manually [delete the orphaned key material]from the
+// cluster and its backups. [Deleting a KMS key from an external key store]has no effect on the associated external key. However,
+// for both types of custom key stores, deleting a KMS key is destructive and
+// irreversible. You cannot decrypt ciphertext encrypted under the KMS key by using
+// only its associated external key or CloudHSM key. Also, you cannot recreate a
+// KMS key in an external key store by creating a new KMS key with the same key
+// material.
+//
+// For more information about scheduling a KMS key for deletion, see [Deleting KMS keys] in the Key
+// Management Service Developer Guide.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: kms:ScheduleKeyDeletion (key policy)
+//
+// # Related operations
+//
+// # CancelKeyDeletion
+//
+// # DisableKey
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [delete the orphaned key material]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [Deleting a KMS key from an external key store]: https://docs.aws.amazon.com/kms/latest/developerguide/delete-xks-key.html
+// [Deleting multi-Region keys]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html
+// [Deleting KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html
+// [multi-Region replica key]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [deletes a KMS key from an CloudHSM key store]: https://docs.aws.amazon.com/kms/latest/developerguide/delete-cmk-keystore.html
+func (c *Client) ScheduleKeyDeletion(ctx context.Context, params *ScheduleKeyDeletionInput, optFns ...func(*Options)) (*ScheduleKeyDeletionOutput, error) {
+ if params == nil {
+ params = &ScheduleKeyDeletionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "ScheduleKeyDeletion", params, optFns, c.addOperationScheduleKeyDeletionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*ScheduleKeyDeletionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type ScheduleKeyDeletionInput struct {
+
+ // The unique identifier of the KMS key to delete.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // The waiting period, specified in number of days. After the waiting period ends,
+ // KMS deletes the KMS key.
+ //
+ // If the KMS key is a multi-Region primary key with replica keys, the waiting
+ // period begins when the last of its replica keys is deleted. Otherwise, the
+ // waiting period begins immediately.
+ //
+ // This value is optional. If you include a value, it must be between 7 and 30,
+ // inclusive. If you do not include a value, it defaults to 30. You can use the [kms:ScheduleKeyDeletionPendingWindowInDays]
+ // kms:ScheduleKeyDeletionPendingWindowInDays condition key to further constrain
+ // the values that principals can specify in the PendingWindowInDays parameter.
+ //
+ // [kms:ScheduleKeyDeletionPendingWindowInDays]: https://docs.aws.amazon.com/kms/latest/developerguide/conditions-kms.html#conditions-kms-schedule-key-deletion-pending-window-in-days
+ PendingWindowInDays *int32
+
+ noSmithyDocumentSerde
+}
+
+type ScheduleKeyDeletionOutput struct {
+
+ // The date and time after which KMS deletes the KMS key.
+ //
+ // If the KMS key is a multi-Region primary key with replica keys, this field does
+ // not appear. The deletion date for the primary key isn't known until its last
+ // replica key is deleted.
+ DeletionDate *time.Time
+
+ // The Amazon Resource Name ([key ARN] ) of the KMS key whose deletion is scheduled.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // The current status of the KMS key.
+ //
+ // For more information about how key state affects the use of a KMS key, see [Key states of KMS keys] in
+ // the Key Management Service Developer Guide.
+ //
+ // [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+ KeyState types.KeyState
+
+ // The waiting period before the KMS key is deleted.
+ //
+ // If the KMS key is a multi-Region primary key with replicas, the waiting period
+ // begins when the last of its replica keys is deleted. Otherwise, the waiting
+ // period begins immediately.
+ PendingWindowInDays *int32
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationScheduleKeyDeletionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpScheduleKeyDeletion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpScheduleKeyDeletion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "ScheduleKeyDeletion"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpScheduleKeyDeletionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opScheduleKeyDeletion(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opScheduleKeyDeletion(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "ScheduleKeyDeletion",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Sign.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Sign.go
new file mode 100644
index 000000000..553404e23
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Sign.go
@@ -0,0 +1,325 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Creates a [digital signature] for a message or message digest by using the private key in an
+// asymmetric signing KMS key. To verify the signature, use the Verifyoperation, or use
+// the public key in the same asymmetric KMS key outside of KMS. For information
+// about asymmetric KMS keys, see [Asymmetric KMS keys]in the Key Management Service Developer Guide.
+//
+// Digital signatures are generated and verified by using asymmetric key pair,
+// such as an RSA or ECC pair that is represented by an asymmetric KMS key. The key
+// owner (or an authorized user) uses their private key to sign a message. Anyone
+// with the public key can verify that the message was signed with that particular
+// private key and that the message hasn't changed since it was signed.
+//
+// To use the Sign operation, provide the following information:
+//
+// - Use the KeyId parameter to identify an asymmetric KMS key with a KeyUsage
+// value of SIGN_VERIFY . To get the KeyUsage value of a KMS key, use the DescribeKey
+// operation. The caller must have kms:Sign permission on the KMS key.
+//
+// - Use the Message parameter to specify the message or message digest to sign.
+// You can submit messages of up to 4096 bytes. To sign a larger message, generate
+// a hash digest of the message, and then provide the hash digest in the Message
+// parameter. To indicate whether the message is a full message or a digest, use
+// the MessageType parameter.
+//
+// - Choose a signing algorithm that is compatible with the KMS key.
+//
+// When signing a message, be sure to record the KMS key and the signing
+// algorithm. This information is required to verify the signature.
+//
+// Best practices recommend that you limit the time during which any signature is
+// effective. This deters an attack where the actor uses a signed message to
+// establish validity repeatedly or long after the message is superseded.
+// Signatures do not include a timestamp, but you can include a timestamp in the
+// signed message to help you detect when its time to refresh the signature.
+//
+// To verify the signature that this operation generates, use the Verify operation. Or
+// use the GetPublicKeyoperation to download the public key and then use the public key to
+// verify the signature outside of KMS.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:Sign] (key policy)
+//
+// Related operations: Verify
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [digital signature]: https://en.wikipedia.org/wiki/Digital_signature
+// [Asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [kms:Sign]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) Sign(ctx context.Context, params *SignInput, optFns ...func(*Options)) (*SignOutput, error) {
+ if params == nil {
+ params = &SignInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "Sign", params, optFns, c.addOperationSignMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*SignOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type SignInput struct {
+
+ // Identifies an asymmetric KMS key. KMS uses the private key in the asymmetric
+ // KMS key to sign the message. The KeyUsage type of the KMS key must be
+ // SIGN_VERIFY . To find the KeyUsage of a KMS key, use the DescribeKey operation.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Specifies the message or message digest to sign. Messages can be 0-4096 bytes.
+ // To sign a larger message, provide a message digest.
+ //
+ // If you provide a message digest, use the DIGEST value of MessageType to prevent
+ // the digest from being hashed again while signing.
+ //
+ // This member is required.
+ Message []byte
+
+ // Specifies the signing algorithm to use when signing the message.
+ //
+ // Choose an algorithm that is compatible with the type and size of the specified
+ // asymmetric KMS key. When signing with RSA key pairs, RSASSA-PSS algorithms are
+ // preferred. We include RSASSA-PKCS1-v1_5 algorithms for compatibility with
+ // existing applications.
+ //
+ // This member is required.
+ SigningAlgorithm types.SigningAlgorithmSpec
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ // Tells KMS whether the value of the Message parameter should be hashed as part
+ // of the signing algorithm. Use RAW for unhashed messages; use DIGEST for message
+ // digests, which are already hashed.
+ //
+ // When the value of MessageType is RAW , KMS uses the standard signing algorithm,
+ // which begins with a hash function. When the value is DIGEST , KMS skips the
+ // hashing step in the signing algorithm.
+ //
+ // Use the DIGEST value only when the value of the Message parameter is a message
+ // digest. If you use the DIGEST value with an unhashed message, the security of
+ // the signing operation can be compromised.
+ //
+ // When the value of MessageType is DIGEST , the length of the Message value must
+ // match the length of hashed messages for the specified signing algorithm.
+ //
+ // You can submit a message digest and omit the MessageType or specify RAW so the
+ // digest is hashed again while signing. However, this can cause verification
+ // failures when verifying with a system that assumes a single hash.
+ //
+ // The hashing algorithm in that Sign uses is based on the SigningAlgorithm value.
+ //
+ // - Signing algorithms that end in SHA_256 use the SHA_256 hashing algorithm.
+ //
+ // - Signing algorithms that end in SHA_384 use the SHA_384 hashing algorithm.
+ //
+ // - Signing algorithms that end in SHA_512 use the SHA_512 hashing algorithm.
+ //
+ // - SM2DSA uses the SM3 hashing algorithm. For details, see [Offline verification with SM2 key pairs].
+ //
+ // [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
+ MessageType types.MessageType
+
+ noSmithyDocumentSerde
+}
+
+type SignOutput struct {
+
+ // The Amazon Resource Name ([key ARN] ) of the asymmetric KMS key that was used to sign the
+ // message.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // The cryptographic signature that was generated for the message.
+ //
+ // - When used with the supported RSA signing algorithms, the encoding of this
+ // value is defined by [PKCS #1 in RFC 8017].
+ //
+ // - When used with the ECDSA_SHA_256 , ECDSA_SHA_384 , or ECDSA_SHA_512 signing
+ // algorithms, this value is a DER-encoded object as defined by ANSI X9.62–2005 and
+ // [RFC 3279 Section 2.2.3]. This is the most commonly used signature format and is appropriate for most
+ // uses.
+ //
+ // When you use the HTTP API or the Amazon Web Services CLI, the value is
+ // Base64-encoded. Otherwise, it is not Base64-encoded.
+ //
+ // [RFC 3279 Section 2.2.3]: https://tools.ietf.org/html/rfc3279#section-2.2.3
+ // [PKCS #1 in RFC 8017]: https://tools.ietf.org/html/rfc8017
+ Signature []byte
+
+ // The signing algorithm that was used to sign the message.
+ SigningAlgorithm types.SigningAlgorithmSpec
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationSignMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpSign{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpSign{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "Sign"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpSignValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSign(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opSign(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "Sign",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_TagResource.go
new file mode 100644
index 000000000..6ec3ee335
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_TagResource.go
@@ -0,0 +1,226 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Adds or edits tags on a [customer managed key].
+//
+// Tagging or untagging a KMS key can allow or deny permission to the KMS key. For
+// details, see [ABAC for KMS]in the Key Management Service Developer Guide.
+//
+// Each tag consists of a tag key and a tag value, both of which are
+// case-sensitive strings. The tag value can be an empty (null) string. To add a
+// tag, specify a new tag key and a tag value. To edit a tag, specify an existing
+// tag key and a new tag value.
+//
+// You can use this operation to tag a [customer managed key], but you cannot tag an [Amazon Web Services managed key], an [Amazon Web Services owned key], a [custom key store], or an [alias].
+//
+// You can also add tags to a KMS key while creating it (CreateKey ) or replicating it (ReplicateKey ).
+//
+// For information about using tags in KMS, see [Tagging keys]. For general information about
+// tags, including the format and syntax, see [Tagging Amazon Web Services resources]in the Amazon Web Services General
+// Reference.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:TagResource] (key policy)
+//
+// # Related operations
+//
+// # CreateKey
+//
+// # ListResourceTags
+//
+// # ReplicateKey
+//
+// # UntagResource
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Amazon Web Services owned key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:TagResource]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
+// [Tagging keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
+// [alias]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#alias-concept
+// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+// [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#keystore-concept
+// [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
+func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) {
+ if params == nil {
+ params = &TagResourceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*TagResourceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type TagResourceInput struct {
+
+ // Identifies a customer managed key in the account and Region.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // One or more tags. Each tag consists of a tag key and a tag value. The tag value
+ // can be an empty (null) string.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // You cannot have more than one tag on a KMS key with the same tag key. If you
+ // specify an existing tag key with a different tag value, KMS replaces the current
+ // tag value with the specified one.
+ //
+ // This member is required.
+ Tags []types.Tag
+
+ noSmithyDocumentSerde
+}
+
+type TagResourceOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagResource{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpTagResourceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "TagResource",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UntagResource.go
new file mode 100644
index 000000000..ee01e6e7c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UntagResource.go
@@ -0,0 +1,209 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Deletes tags from a [customer managed key]. To delete a tag, specify the tag key and the KMS key.
+//
+// Tagging or untagging a KMS key can allow or deny permission to the KMS key. For
+// details, see [ABAC for KMS]in the Key Management Service Developer Guide.
+//
+// When it succeeds, the UntagResource operation doesn't return any output. Also,
+// if the specified tag key isn't found on the KMS key, it doesn't throw an
+// exception or return a response. To confirm that the operation worked, use the ListResourceTags
+// operation.
+//
+// For information about using tags in KMS, see [Tagging keys]. For general information about
+// tags, including the format and syntax, see [Tagging Amazon Web Services resources]in the Amazon Web Services General
+// Reference.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:UntagResource] (key policy)
+//
+// # Related operations
+//
+// # CreateKey
+//
+// # ListResourceTags
+//
+// # ReplicateKey
+//
+// # TagResource
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:UntagResource]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
+// [Tagging keys]: https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html
+// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html
+func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) {
+ if params == nil {
+ params = &UntagResourceInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UntagResourceOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UntagResourceInput struct {
+
+ // Identifies the KMS key from which you are removing tags.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // One or more tag keys. Specify only the tag keys, not the tag values.
+ //
+ // This member is required.
+ TagKeys []string
+
+ noSmithyDocumentSerde
+}
+
+type UntagResourceOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagResource{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUntagResourceValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UntagResource",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateAlias.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateAlias.go
new file mode 100644
index 000000000..2238087b2
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateAlias.go
@@ -0,0 +1,240 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Associates an existing KMS alias with a different KMS key. Each alias is
+// associated with only one KMS key at a time, although a KMS key can have multiple
+// aliases. The alias and the KMS key must be in the same Amazon Web Services
+// account and Region.
+//
+// Adding, deleting, or updating an alias can allow or deny permission to the KMS
+// key. For details, see [ABAC for KMS]in the Key Management Service Developer Guide.
+//
+// The current and new KMS key must be the same type (both symmetric or both
+// asymmetric or both HMAC), and they must have the same key usage. This
+// restriction prevents errors in code that uses aliases. If you must assign an
+// alias to a different type of KMS key, use DeleteAliasto delete the old alias and CreateAlias to
+// create a new alias.
+//
+// You cannot use UpdateAlias to change an alias name. To change an alias name,
+// use DeleteAliasto delete the old alias and CreateAlias to create a new alias.
+//
+// Because an alias is not a property of a KMS key, you can create, update, and
+// delete the aliases of a KMS key without affecting the KMS key. Also, aliases do
+// not appear in the response from the DescribeKeyoperation. To get the aliases of all KMS
+// keys in the account, use the ListAliasesoperation.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// # Required permissions
+//
+// [kms:UpdateAlias]
+// - on the alias (IAM policy).
+//
+// [kms:UpdateAlias]
+// - on the current KMS key (key policy).
+//
+// [kms:UpdateAlias]
+// - on the new KMS key (key policy).
+//
+// For details, see [Controlling access to aliases] in the Key Management Service Developer Guide.
+//
+// Related operations:
+//
+// # CreateAlias
+//
+// # DeleteAlias
+//
+// # ListAliases
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [ABAC for KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/abac.html
+// [kms:UpdateAlias]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [Controlling access to aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access
+func (c *Client) UpdateAlias(ctx context.Context, params *UpdateAliasInput, optFns ...func(*Options)) (*UpdateAliasOutput, error) {
+ if params == nil {
+ params = &UpdateAliasInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateAlias", params, optFns, c.addOperationUpdateAliasMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateAliasOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateAliasInput struct {
+
+ // Identifies the alias that is changing its KMS key. This value must begin with
+ // alias/ followed by the alias name, such as alias/ExampleAlias . You cannot use
+ // UpdateAlias to change the alias name.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // This member is required.
+ AliasName *string
+
+ // Identifies the [customer managed key] to associate with the alias. You don't have permission to
+ // associate an alias with an [Amazon Web Services managed key].
+ //
+ // The KMS key must be in the same Amazon Web Services account and Region as the
+ // alias. Also, the new target KMS key must be the same type as the current target
+ // KMS key (both symmetric or both asymmetric or both HMAC) and they must have the
+ // same key usage.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // To verify that the alias is mapped to the correct KMS key, use ListAliases.
+ //
+ // [customer managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk
+ // [Amazon Web Services managed key]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk
+ //
+ // This member is required.
+ TargetKeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type UpdateAliasOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateAliasMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateAlias{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAlias"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateAliasValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAlias(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateAlias(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateAlias",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateCustomKeyStore.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateCustomKeyStore.go
new file mode 100644
index 000000000..fa7c84dfd
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateCustomKeyStore.go
@@ -0,0 +1,350 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Changes the properties of a custom key store. You can use this operation to
+// change the properties of an CloudHSM key store or an external key store.
+//
+// Use the required CustomKeyStoreId parameter to identify the custom key store.
+// Use the remaining optional parameters to change its properties. This operation
+// does not return any property values. To verify the updated property values, use
+// the DescribeCustomKeyStoresoperation.
+//
+// This operation is part of the [custom key stores] feature in KMS, which combines the convenience
+// and extensive integration of KMS with the isolation and control of a key store
+// that you own and manage.
+//
+// When updating the properties of an external key store, verify that the updated
+// settings connect your key store, via the external key store proxy, to the same
+// external key manager as the previous settings, or to a backup or snapshot of the
+// external key manager with the same cryptographic keys. If the updated connection
+// settings fail, you can fix them and retry, although an extended delay might
+// disrupt Amazon Web Services services. However, if KMS permanently loses its
+// access to cryptographic keys, ciphertext encrypted under those keys is
+// unrecoverable.
+//
+// For external key stores:
+//
+// Some external key managers provide a simpler method for updating an external
+// key store. For details, see your external key manager documentation.
+//
+// When updating an external key store in the KMS console, you can upload a
+// JSON-based proxy configuration file with the desired values. You cannot upload
+// the proxy configuration file to the UpdateCustomKeyStore operation. However,
+// you can use the file to help you determine the correct values for the
+// UpdateCustomKeyStore parameters.
+//
+// For an CloudHSM key store, you can use this operation to change the custom key
+// store friendly name ( NewCustomKeyStoreName ), to tell KMS about a change to the
+// kmsuser crypto user password ( KeyStorePassword ), or to associate the custom
+// key store with a different, but related, CloudHSM cluster ( CloudHsmClusterId ).
+// To update any property of an CloudHSM key store, the ConnectionState of the
+// CloudHSM key store must be DISCONNECTED .
+//
+// For an external key store, you can use this operation to change the custom key
+// store friendly name ( NewCustomKeyStoreName ), or to tell KMS about a change to
+// the external key store proxy authentication credentials (
+// XksProxyAuthenticationCredential ), connection method ( XksProxyConnectivity ),
+// external proxy endpoint ( XksProxyUriEndpoint ) and path ( XksProxyUriPath ).
+// For external key stores with an XksProxyConnectivity of VPC_ENDPOINT_SERVICE ,
+// you can also update the Amazon VPC endpoint service name (
+// XksProxyVpcEndpointServiceName ). To update most properties of an external key
+// store, the ConnectionState of the external key store must be DISCONNECTED .
+// However, you can update the CustomKeyStoreName ,
+// XksProxyAuthenticationCredential , and XksProxyUriPath of an external key store
+// when it is in the CONNECTED or DISCONNECTED state.
+//
+// If your update requires a DISCONNECTED state, before using UpdateCustomKeyStore
+// , use the DisconnectCustomKeyStoreoperation to disconnect the custom key store. After the
+// UpdateCustomKeyStore operation completes, use the ConnectCustomKeyStore to reconnect the custom key
+// store. To find the ConnectionState of the custom key store, use the DescribeCustomKeyStores operation.
+//
+// Before updating the custom key store, verify that the new values allow KMS to
+// connect the custom key store to its backing key store. For example, before you
+// change the XksProxyUriPath value, verify that the external key store proxy is
+// reachable at the new path.
+//
+// If the operation succeeds, it returns a JSON object with no properties.
+//
+// Cross-account use: No. You cannot perform this operation on a custom key store
+// in a different Amazon Web Services account.
+//
+// Required permissions: [kms:UpdateCustomKeyStore] (IAM policy)
+//
+// Related operations:
+//
+// # ConnectCustomKeyStore
+//
+// # CreateCustomKeyStore
+//
+// # DeleteCustomKeyStore
+//
+// # DescribeCustomKeyStores
+//
+// # DisconnectCustomKeyStore
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [custom key stores]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+// [kms:UpdateCustomKeyStore]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) UpdateCustomKeyStore(ctx context.Context, params *UpdateCustomKeyStoreInput, optFns ...func(*Options)) (*UpdateCustomKeyStoreOutput, error) {
+ if params == nil {
+ params = &UpdateCustomKeyStoreInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateCustomKeyStore", params, optFns, c.addOperationUpdateCustomKeyStoreMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateCustomKeyStoreOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateCustomKeyStoreInput struct {
+
+ // Identifies the custom key store that you want to update. Enter the ID of the
+ // custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStoresoperation.
+ //
+ // This member is required.
+ CustomKeyStoreId *string
+
+ // Associates the custom key store with a related CloudHSM cluster. This parameter
+ // is valid only for custom key stores with a CustomKeyStoreType of AWS_CLOUDHSM .
+ //
+ // Enter the cluster ID of the cluster that you used to create the custom key
+ // store or a cluster that shares a backup history and has the same cluster
+ // certificate as the original cluster. You cannot use this parameter to associate
+ // a custom key store with an unrelated cluster. In addition, the replacement
+ // cluster must [fulfill the requirements]for a cluster associated with a custom key store. To view the
+ // cluster certificate of a cluster, use the [DescribeClusters]operation.
+ //
+ // To change this value, the CloudHSM key store must be disconnected.
+ //
+ // [fulfill the requirements]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
+ // [DescribeClusters]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
+ CloudHsmClusterId *string
+
+ // Enter the current password of the kmsuser crypto user (CU) in the CloudHSM
+ // cluster that is associated with the custom key store. This parameter is valid
+ // only for custom key stores with a CustomKeyStoreType of AWS_CLOUDHSM .
+ //
+ // This parameter tells KMS the current password of the kmsuser crypto user (CU).
+ // It does not set or change the password of any users in the CloudHSM cluster.
+ //
+ // To change this value, the CloudHSM key store must be disconnected.
+ KeyStorePassword *string
+
+ // Changes the friendly name of the custom key store to the value that you
+ // specify. The custom key store name must be unique in the Amazon Web Services
+ // account.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // To change this value, an CloudHSM key store must be disconnected. An external
+ // key store can be connected or disconnected.
+ NewCustomKeyStoreName *string
+
+ // Changes the credentials that KMS uses to sign requests to the external key
+ // store proxy (XKS proxy). This parameter is valid only for custom key stores with
+ // a CustomKeyStoreType of EXTERNAL_KEY_STORE .
+ //
+ // You must specify both the AccessKeyId and SecretAccessKey value in the
+ // authentication credential, even if you are only updating one value.
+ //
+ // This parameter doesn't establish or change your authentication credentials on
+ // the proxy. It just tells KMS the credential that you established with your
+ // external key store proxy. For example, if you rotate the credential on your
+ // external key store proxy, you can use this parameter to update the credential in
+ // KMS.
+ //
+ // You can change this value when the external key store is connected or
+ // disconnected.
+ XksProxyAuthenticationCredential *types.XksProxyAuthenticationCredentialType
+
+ // Changes the connectivity setting for the external key store. To indicate that
+ // the external key store proxy uses a Amazon VPC endpoint service to communicate
+ // with KMS, specify VPC_ENDPOINT_SERVICE . Otherwise, specify PUBLIC_ENDPOINT .
+ //
+ // If you change the XksProxyConnectivity to VPC_ENDPOINT_SERVICE , you must also
+ // change the XksProxyUriEndpoint and add an XksProxyVpcEndpointServiceName value.
+ //
+ // If you change the XksProxyConnectivity to PUBLIC_ENDPOINT , you must also change
+ // the XksProxyUriEndpoint and specify a null or empty string for the
+ // XksProxyVpcEndpointServiceName value.
+ //
+ // To change this value, the external key store must be disconnected.
+ XksProxyConnectivity types.XksProxyConnectivityType
+
+ // Changes the URI endpoint that KMS uses to connect to your external key store
+ // proxy (XKS proxy). This parameter is valid only for custom key stores with a
+ // CustomKeyStoreType of EXTERNAL_KEY_STORE .
+ //
+ // For external key stores with an XksProxyConnectivity value of PUBLIC_ENDPOINT ,
+ // the protocol must be HTTPS.
+ //
+ // For external key stores with an XksProxyConnectivity value of
+ // VPC_ENDPOINT_SERVICE , specify https:// followed by the private DNS name
+ // associated with the VPC endpoint service. Each external key store must use a
+ // different private DNS name.
+ //
+ // The combined XksProxyUriEndpoint and XksProxyUriPath values must be unique in
+ // the Amazon Web Services account and Region.
+ //
+ // To change this value, the external key store must be disconnected.
+ XksProxyUriEndpoint *string
+
+ // Changes the base path to the proxy APIs for this external key store. To find
+ // this value, see the documentation for your external key manager and external key
+ // store proxy (XKS proxy). This parameter is valid only for custom key stores with
+ // a CustomKeyStoreType of EXTERNAL_KEY_STORE .
+ //
+ // The value must start with / and must end with /kms/xks/v1 , where v1 represents
+ // the version of the KMS external key store proxy API. You can include an optional
+ // prefix between the required elements such as /example/kms/xks/v1 .
+ //
+ // The combined XksProxyUriEndpoint and XksProxyUriPath values must be unique in
+ // the Amazon Web Services account and Region.
+ //
+ // You can change this value when the external key store is connected or
+ // disconnected.
+ XksProxyUriPath *string
+
+ // Changes the name that KMS uses to identify the Amazon VPC endpoint service for
+ // your external key store proxy (XKS proxy). This parameter is valid when the
+ // CustomKeyStoreType is EXTERNAL_KEY_STORE and the XksProxyConnectivity is
+ // VPC_ENDPOINT_SERVICE .
+ //
+ // To change this value, the external key store must be disconnected.
+ XksProxyVpcEndpointServiceName *string
+
+ noSmithyDocumentSerde
+}
+
+type UpdateCustomKeyStoreOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateCustomKeyStoreMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateCustomKeyStore{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCustomKeyStore"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateCustomKeyStoreValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCustomKeyStore(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateCustomKeyStore(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateCustomKeyStore",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateKeyDescription.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateKeyDescription.go
new file mode 100644
index 000000000..83ed78459
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdateKeyDescription.go
@@ -0,0 +1,193 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Updates the description of a KMS key. To see the description of a KMS key, use DescribeKey
+// .
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: No. You cannot perform this operation on a KMS key in a
+// different Amazon Web Services account.
+//
+// Required permissions: [kms:UpdateKeyDescription] (key policy)
+//
+// # Related operations
+//
+// # CreateKey
+//
+// # DescribeKey
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [kms:UpdateKeyDescription]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) UpdateKeyDescription(ctx context.Context, params *UpdateKeyDescriptionInput, optFns ...func(*Options)) (*UpdateKeyDescriptionOutput, error) {
+ if params == nil {
+ params = &UpdateKeyDescriptionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdateKeyDescription", params, optFns, c.addOperationUpdateKeyDescriptionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdateKeyDescriptionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdateKeyDescriptionInput struct {
+
+ // New description for the KMS key.
+ //
+ // Do not include confidential or sensitive information in this field. This field
+ // may be displayed in plaintext in CloudTrail logs and other output.
+ //
+ // This member is required.
+ Description *string
+
+ // Updates the description of the specified KMS key.
+ //
+ // Specify the key ID or key ARN of the KMS key.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+type UpdateKeyDescriptionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdateKeyDescriptionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateKeyDescription{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateKeyDescription{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateKeyDescription"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdateKeyDescriptionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateKeyDescription(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdateKeyDescription(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdateKeyDescription",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdatePrimaryRegion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdatePrimaryRegion.go
new file mode 100644
index 000000000..e79f816ab
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_UpdatePrimaryRegion.go
@@ -0,0 +1,248 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Changes the primary key of a multi-Region key.
+//
+// This operation changes the replica key in the specified Region to a primary key
+// and changes the former primary key to a replica key. For example, suppose you
+// have a primary key in us-east-1 and a replica key in eu-west-2 . If you run
+// UpdatePrimaryRegion with a PrimaryRegion value of eu-west-2 , the primary key is
+// now the key in eu-west-2 , and the key in us-east-1 becomes a replica key. For
+// details, see [Updating the primary Region]in the Key Management Service Developer Guide.
+//
+// This operation supports multi-Region keys, an KMS feature that lets you create
+// multiple interoperable KMS keys in different Amazon Web Services Regions.
+// Because these KMS keys have the same key ID, key material, and other metadata,
+// you can use them interchangeably to encrypt data in one Amazon Web Services
+// Region and decrypt it in a different Amazon Web Services Region without
+// re-encrypting the data or making a cross-Region call. For more information about
+// multi-Region keys, see [Multi-Region keys in KMS]in the Key Management Service Developer Guide.
+//
+// The primary key of a multi-Region key is the source for properties that are
+// always shared by primary and replica keys, including the key material, [key ID], [key spec], [key usage], [key material origin],
+// and [automatic key rotation]. It's the only key that can be replicated. You cannot [delete the primary key] until all replica
+// keys are deleted.
+//
+// The key ID and primary Region that you specify uniquely identify the replica
+// key that will become the primary key. The primary Region must already have a
+// replica key. This operation does not create a KMS key in the specified Region.
+// To find the replica keys, use the DescribeKeyoperation on the primary key or any replica
+// key. To create a replica key, use the ReplicateKeyoperation.
+//
+// You can run this operation while using the affected multi-Region keys in
+// cryptographic operations. This operation should not delay, interrupt, or cause
+// failures in cryptographic operations.
+//
+// Even after this operation completes, the process of updating the primary Region
+// might still be in progress for a few more seconds. Operations such as
+// DescribeKey might display both the old and new primary keys as replicas. The old
+// and new primary keys have a transient key state of Updating . The original key
+// state is restored when the update is complete. While the key state is Updating ,
+// you can use the keys in cryptographic operations, but you cannot replicate the
+// new primary key or perform certain management operations, such as enabling or
+// disabling these keys. For details about the Updating key state, see [Key states of KMS keys] in the Key
+// Management Service Developer Guide.
+//
+// This operation does not return any output. To verify that primary key is
+// changed, use the DescribeKeyoperation.
+//
+// Cross-account use: No. You cannot use this operation in a different Amazon Web
+// Services account.
+//
+// Required permissions:
+//
+// - kms:UpdatePrimaryRegion on the current primary key (in the primary key's
+// Region). Include this permission primary key's key policy.
+//
+// - kms:UpdatePrimaryRegion on the current replica key (in the replica key's
+// Region). Include this permission in the replica key's key policy.
+//
+// # Related operations
+//
+// # CreateKey
+//
+// # ReplicateKey
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [key ID]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [delete the primary key]: https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html
+// [key usage]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage
+// [Updating the primary Region]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-update
+// [Multi-Region keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
+// [key spec]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec
+// [key material origin]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin
+// [automatic key rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) UpdatePrimaryRegion(ctx context.Context, params *UpdatePrimaryRegionInput, optFns ...func(*Options)) (*UpdatePrimaryRegionOutput, error) {
+ if params == nil {
+ params = &UpdatePrimaryRegionInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "UpdatePrimaryRegion", params, optFns, c.addOperationUpdatePrimaryRegionMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*UpdatePrimaryRegionOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type UpdatePrimaryRegionInput struct {
+
+ // Identifies the current primary key. When the operation completes, this KMS key
+ // will be a replica key.
+ //
+ // Specify the key ID or key ARN of a multi-Region primary key.
+ //
+ // For example:
+ //
+ // - Key ID: mrk-1234abcd12ab34cd56ef1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
+ //
+ // This member is required.
+ KeyId *string
+
+ // The Amazon Web Services Region of the new primary key. Enter the Region ID,
+ // such as us-east-1 or ap-southeast-2 . There must be an existing replica key in
+ // this Region.
+ //
+ // When the operation completes, the multi-Region key in this Region will be the
+ // primary key.
+ //
+ // This member is required.
+ PrimaryRegion *string
+
+ noSmithyDocumentSerde
+}
+
+type UpdatePrimaryRegionOutput struct {
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationUpdatePrimaryRegionMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdatePrimaryRegion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdatePrimaryRegion{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "UpdatePrimaryRegion"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpUpdatePrimaryRegionValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdatePrimaryRegion(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opUpdatePrimaryRegion(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "UpdatePrimaryRegion",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Verify.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Verify.go
new file mode 100644
index 000000000..4a25ff29f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_Verify.go
@@ -0,0 +1,313 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Verifies a digital signature that was generated by the Sign operation.
+//
+// Verification confirms that an authorized user signed the message with the
+// specified KMS key and signing algorithm, and the message hasn't changed since it
+// was signed. If the signature is verified, the value of the SignatureValid field
+// in the response is True . If the signature verification fails, the Verify
+// operation fails with an KMSInvalidSignatureException exception.
+//
+// A digital signature is generated by using the private key in an asymmetric KMS
+// key. The signature is verified by using the public key in the same asymmetric
+// KMS key. For information about asymmetric KMS keys, see [Asymmetric KMS keys]in the Key Management
+// Service Developer Guide.
+//
+// To use the Verify operation, specify the same asymmetric KMS key, message, and
+// signing algorithm that were used to produce the signature. The message type does
+// not need to be the same as the one used for signing, but it must indicate
+// whether the value of the Message parameter should be hashed as part of the
+// verification process.
+//
+// You can also verify the digital signature by using the public key of the KMS
+// key outside of KMS. Use the GetPublicKeyoperation to download the public key in the
+// asymmetric KMS key and then use the public key to verify the signature outside
+// of KMS. The advantage of using the Verify operation is that it is performed
+// within KMS. As a result, it's easy to call, the operation is performed within
+// the FIPS boundary, it is logged in CloudTrail, and you can use key policy and
+// IAM policy to determine who is authorized to use the KMS key to verify
+// signatures.
+//
+// To verify a signature outside of KMS with an SM2 public key (China Regions
+// only), you must specify the distinguishing ID. By default, KMS uses
+// 1234567812345678 as the distinguishing ID. For more information, see [Offline verification with SM2 key pairs].
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:Verify] (key policy)
+//
+// Related operations: Sign
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [Asymmetric KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html
+// [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
+// [kms:Verify]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+func (c *Client) Verify(ctx context.Context, params *VerifyInput, optFns ...func(*Options)) (*VerifyOutput, error) {
+ if params == nil {
+ params = &VerifyInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "Verify", params, optFns, c.addOperationVerifyMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*VerifyOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type VerifyInput struct {
+
+ // Identifies the asymmetric KMS key that will be used to verify the signature.
+ // This must be the same KMS key that was used to generate the signature. If you
+ // specify a different KMS key, the signature verification fails.
+ //
+ // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN. When
+ // using an alias name, prefix it with "alias/" . To specify a KMS key in a
+ // different Amazon Web Services account, you must use the key ARN or alias ARN.
+ //
+ // For example:
+ //
+ // - Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Key ARN:
+ // arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
+ //
+ // - Alias name: alias/ExampleAlias
+ //
+ // - Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
+ //
+ // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey. To get the alias name
+ // and alias ARN, use ListAliases.
+ //
+ // This member is required.
+ KeyId *string
+
+ // Specifies the message that was signed. You can submit a raw message of up to
+ // 4096 bytes, or a hash digest of the message. If you submit a digest, use the
+ // MessageType parameter with a value of DIGEST .
+ //
+ // If the message specified here is different from the message that was signed,
+ // the signature verification fails. A message and its hash digest are considered
+ // to be the same message.
+ //
+ // This member is required.
+ Message []byte
+
+ // The signature that the Sign operation generated.
+ //
+ // This member is required.
+ Signature []byte
+
+ // The signing algorithm that was used to sign the message. If you submit a
+ // different algorithm, the signature verification fails.
+ //
+ // This member is required.
+ SigningAlgorithm types.SigningAlgorithmSpec
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ // Tells KMS whether the value of the Message parameter should be hashed as part
+ // of the signing algorithm. Use RAW for unhashed messages; use DIGEST for message
+ // digests, which are already hashed.
+ //
+ // When the value of MessageType is RAW , KMS uses the standard signing algorithm,
+ // which begins with a hash function. When the value is DIGEST , KMS skips the
+ // hashing step in the signing algorithm.
+ //
+ // Use the DIGEST value only when the value of the Message parameter is a message
+ // digest. If you use the DIGEST value with an unhashed message, the security of
+ // the verification operation can be compromised.
+ //
+ // When the value of MessageType is DIGEST , the length of the Message value must
+ // match the length of hashed messages for the specified signing algorithm.
+ //
+ // You can submit a message digest and omit the MessageType or specify RAW so the
+ // digest is hashed again while signing. However, if the signed message is hashed
+ // once while signing, but twice while verifying, verification fails, even when the
+ // message hasn't changed.
+ //
+ // The hashing algorithm in that Verify uses is based on the SigningAlgorithm
+ // value.
+ //
+ // - Signing algorithms that end in SHA_256 use the SHA_256 hashing algorithm.
+ //
+ // - Signing algorithms that end in SHA_384 use the SHA_384 hashing algorithm.
+ //
+ // - Signing algorithms that end in SHA_512 use the SHA_512 hashing algorithm.
+ //
+ // - SM2DSA uses the SM3 hashing algorithm. For details, see [Offline verification with SM2 key pairs].
+ //
+ // [Offline verification with SM2 key pairs]: https://docs.aws.amazon.com/kms/latest/developerguide/asymmetric-key-specs.html#key-spec-sm-offline-verification
+ MessageType types.MessageType
+
+ noSmithyDocumentSerde
+}
+
+type VerifyOutput struct {
+
+ // The Amazon Resource Name ([key ARN] ) of the asymmetric KMS key that was used to verify
+ // the signature.
+ //
+ // [key ARN]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN
+ KeyId *string
+
+ // A Boolean value that indicates whether the signature was verified. A value of
+ // True indicates that the Signature was produced by signing the Message with the
+ // specified KeyID and SigningAlgorithm. If the signature is not verified, the
+ // Verify operation fails with a KMSInvalidSignatureException exception.
+ SignatureValid bool
+
+ // The signing algorithm that was used to verify the signature.
+ SigningAlgorithm types.SigningAlgorithmSpec
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationVerifyMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpVerify{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpVerify{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "Verify"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpVerifyValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opVerify(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opVerify(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "Verify",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_VerifyMac.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_VerifyMac.go
new file mode 100644
index 000000000..484906a5b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/api_op_VerifyMac.go
@@ -0,0 +1,246 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ "github.com/aws/smithy-go/middleware"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// Verifies the hash-based message authentication code (HMAC) for a specified
+// message, HMAC KMS key, and MAC algorithm. To verify the HMAC, VerifyMac
+// computes an HMAC using the message, HMAC KMS key, and MAC algorithm that you
+// specify, and compares the computed HMAC to the HMAC that you specify. If the
+// HMACs are identical, the verification succeeds; otherwise, it fails.
+// Verification indicates that the message hasn't changed since the HMAC was
+// calculated, and the specified key was used to generate and verify the HMAC.
+//
+// HMAC KMS keys and the HMAC algorithms that KMS uses conform to industry
+// standards defined in [RFC 2104].
+//
+// This operation is part of KMS support for HMAC KMS keys. For details, see [HMAC keys in KMS] in
+// the Key Management Service Developer Guide.
+//
+// The KMS key that you use for this operation must be in a compatible key state.
+// For details, see [Key states of KMS keys]in the Key Management Service Developer Guide.
+//
+// Cross-account use: Yes. To perform this operation with a KMS key in a different
+// Amazon Web Services account, specify the key ARN or alias ARN in the value of
+// the KeyId parameter.
+//
+// Required permissions: [kms:VerifyMac] (key policy)
+//
+// Related operations: GenerateMac
+//
+// Eventual consistency: The KMS API follows an eventual consistency model. For
+// more information, see [KMS eventual consistency].
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+// [RFC 2104]: https://datatracker.ietf.org/doc/html/rfc2104
+// [kms:VerifyMac]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
+// [KMS eventual consistency]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
+// [HMAC keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/hmac.html
+func (c *Client) VerifyMac(ctx context.Context, params *VerifyMacInput, optFns ...func(*Options)) (*VerifyMacOutput, error) {
+ if params == nil {
+ params = &VerifyMacInput{}
+ }
+
+ result, metadata, err := c.invokeOperation(ctx, "VerifyMac", params, optFns, c.addOperationVerifyMacMiddlewares)
+ if err != nil {
+ return nil, err
+ }
+
+ out := result.(*VerifyMacOutput)
+ out.ResultMetadata = metadata
+ return out, nil
+}
+
+type VerifyMacInput struct {
+
+ // The KMS key that will be used in the verification.
+ //
+ // Enter a key ID of the KMS key that was used to generate the HMAC. If you
+ // identify a different KMS key, the VerifyMac operation fails.
+ //
+ // This member is required.
+ KeyId *string
+
+ // The HMAC to verify. Enter the HMAC that was generated by the GenerateMac operation when
+ // you specified the same message, HMAC KMS key, and MAC algorithm as the values
+ // specified in this request.
+ //
+ // This member is required.
+ Mac []byte
+
+ // The MAC algorithm that will be used in the verification. Enter the same MAC
+ // algorithm that was used to compute the HMAC. This algorithm must be supported by
+ // the HMAC KMS key identified by the KeyId parameter.
+ //
+ // This member is required.
+ MacAlgorithm types.MacAlgorithmSpec
+
+ // The message that will be used in the verification. Enter the same message that
+ // was used to generate the HMAC.
+ //
+ // GenerateMacand VerifyMac do not provide special handling for message digests. If you
+ // generated an HMAC for a hash digest of a message, you must verify the HMAC for
+ // the same hash digest.
+ //
+ // This member is required.
+ Message []byte
+
+ // Checks if your request will succeed. DryRun is an optional parameter.
+ //
+ // To learn more about how to use this parameter, see [Testing your KMS API calls] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Testing your KMS API calls]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
+ DryRun *bool
+
+ // A list of grant tokens.
+ //
+ // Use a grant token when your permission to call this operation comes from a new
+ // grant that has not yet achieved eventual consistency. For more information, see [Grant token]
+ // and [Using a grant token]in the Key Management Service Developer Guide.
+ //
+ // [Grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
+ // [Using a grant token]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
+ GrantTokens []string
+
+ noSmithyDocumentSerde
+}
+
+type VerifyMacOutput struct {
+
+ // The HMAC KMS key used in the verification.
+ KeyId *string
+
+ // The MAC algorithm used in the verification.
+ MacAlgorithm types.MacAlgorithmSpec
+
+ // A Boolean value that indicates whether the HMAC was verified. A value of True
+ // indicates that the HMAC ( Mac ) was generated with the specified Message , HMAC
+ // KMS key ( KeyID ) and MacAlgorithm. .
+ //
+ // If the HMAC is not verified, the VerifyMac operation fails with a
+ // KMSInvalidMacException exception. This exception indicates that one or more of
+ // the inputs changed since the HMAC was computed.
+ MacValid bool
+
+ // Metadata pertaining to the operation's result.
+ ResultMetadata middleware.Metadata
+
+ noSmithyDocumentSerde
+}
+
+func (c *Client) addOperationVerifyMacMiddlewares(stack *middleware.Stack, options Options) (err error) {
+ if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil {
+ return err
+ }
+ err = stack.Serialize.Add(&awsAwsjson11_serializeOpVerifyMac{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpVerifyMac{}, middleware.After)
+ if err != nil {
+ return err
+ }
+ if err := addProtocolFinalizerMiddlewares(stack, options, "VerifyMac"); err != nil {
+ return fmt.Errorf("add protocol finalizers: %v", err)
+ }
+
+ if err = addlegacyEndpointContextSetter(stack, options); err != nil {
+ return err
+ }
+ if err = addSetLoggerMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addClientRequestID(stack); err != nil {
+ return err
+ }
+ if err = addComputeContentLength(stack); err != nil {
+ return err
+ }
+ if err = addResolveEndpointMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addComputePayloadSHA256(stack); err != nil {
+ return err
+ }
+ if err = addRetry(stack, options); err != nil {
+ return err
+ }
+ if err = addRawResponseToMetadata(stack); err != nil {
+ return err
+ }
+ if err = addRecordResponseTiming(stack); err != nil {
+ return err
+ }
+ if err = addSpanRetryLoop(stack, options); err != nil {
+ return err
+ }
+ if err = addClientUserAgent(stack, options); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addTimeOffsetBuild(stack, c); err != nil {
+ return err
+ }
+ if err = addUserAgentRetryMode(stack, options); err != nil {
+ return err
+ }
+ if err = addOpVerifyMacValidationMiddleware(stack); err != nil {
+ return err
+ }
+ if err = stack.Initialize.Add(newServiceMetadataMiddleware_opVerifyMac(options.Region), middleware.Before); err != nil {
+ return err
+ }
+ if err = addRecursionDetection(stack); err != nil {
+ return err
+ }
+ if err = addRequestIDRetrieverMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addResponseErrorMiddleware(stack); err != nil {
+ return err
+ }
+ if err = addRequestResponseLogging(stack, options); err != nil {
+ return err
+ }
+ if err = addDisableHTTPSMiddleware(stack, options); err != nil {
+ return err
+ }
+ if err = addSpanInitializeStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanInitializeEnd(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestStart(stack); err != nil {
+ return err
+ }
+ if err = addSpanBuildRequestEnd(stack); err != nil {
+ return err
+ }
+ return nil
+}
+
+func newServiceMetadataMiddleware_opVerifyMac(region string) *awsmiddleware.RegisterServiceMetadata {
+ return &awsmiddleware.RegisterServiceMetadata{
+ Region: region,
+ ServiceID: ServiceID,
+ OperationName: "VerifyMac",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/auth.go
new file mode 100644
index 000000000..f9d4ef035
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/auth.go
@@ -0,0 +1,313 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ smithy "github.com/aws/smithy-go"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/metrics"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) {
+ params.Region = options.Region
+}
+
+type setLegacyContextSigningOptionsMiddleware struct {
+}
+
+func (*setLegacyContextSigningOptionsMiddleware) ID() string {
+ return "setLegacyContextSigningOptions"
+}
+
+func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ rscheme := getResolvedAuthScheme(ctx)
+ schemeID := rscheme.Scheme.SchemeID()
+
+ if sn := awsmiddleware.GetSigningName(ctx); sn != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn)
+ }
+ }
+
+ if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" {
+ if schemeID == "aws.auth#sigv4" {
+ smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr)
+ } else if schemeID == "aws.auth#sigv4a" {
+ smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr})
+ }
+ }
+
+ return next.HandleFinalize(ctx, in)
+}
+
+func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error {
+ return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before)
+}
+
+type withAnonymous struct {
+ resolver AuthSchemeResolver
+}
+
+var _ AuthSchemeResolver = (*withAnonymous)(nil)
+
+func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ opts, err := v.resolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return nil, err
+ }
+
+ opts = append(opts, &smithyauth.Option{
+ SchemeID: smithyauth.SchemeIDAnonymous,
+ })
+ return opts, nil
+}
+
+func wrapWithAnonymousAuth(options *Options) {
+ if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok {
+ return
+ }
+
+ options.AuthSchemeResolver = &withAnonymous{
+ resolver: options.AuthSchemeResolver,
+ }
+}
+
+// AuthResolverParameters contains the set of inputs necessary for auth scheme
+// resolution.
+type AuthResolverParameters struct {
+ // The name of the operation being invoked.
+ Operation string
+
+ // The region in which the operation is being invoked.
+ Region string
+}
+
+func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters {
+ params := &AuthResolverParameters{
+ Operation: operation,
+ }
+
+ bindAuthParamsRegion(ctx, params, input, options)
+
+ return params
+}
+
+// AuthSchemeResolver returns a set of possible authentication options for an
+// operation.
+type AuthSchemeResolver interface {
+ ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error)
+}
+
+type defaultAuthSchemeResolver struct{}
+
+var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil)
+
+func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) {
+ if overrides, ok := operationAuthOptions[params.Operation]; ok {
+ return overrides(params), nil
+ }
+ return serviceAuthOptions(params), nil
+}
+
+var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{}
+
+func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option {
+ return []*smithyauth.Option{
+ {
+ SchemeID: smithyauth.SchemeIDSigV4,
+ SignerProperties: func() smithy.Properties {
+ var props smithy.Properties
+ smithyhttp.SetSigV4SigningName(&props, "kms")
+ smithyhttp.SetSigV4SigningRegion(&props, params.Region)
+ return props
+ }(),
+ },
+ }
+}
+
+type resolveAuthSchemeMiddleware struct {
+ operation string
+ options Options
+}
+
+func (*resolveAuthSchemeMiddleware) ID() string {
+ return "ResolveAuthScheme"
+}
+
+func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "ResolveAuthScheme")
+ defer span.End()
+
+ params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options)
+ options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params)
+ if err != nil {
+ return out, metadata, fmt.Errorf("resolve auth scheme: %w", err)
+ }
+
+ scheme, ok := m.selectScheme(options)
+ if !ok {
+ return out, metadata, fmt.Errorf("could not select an auth scheme")
+ }
+
+ ctx = setResolvedAuthScheme(ctx, scheme)
+
+ span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID())
+ span.End()
+ return next.HandleFinalize(ctx, in)
+}
+
+func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) {
+ for _, option := range options {
+ if option.SchemeID == smithyauth.SchemeIDAnonymous {
+ return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true
+ }
+
+ for _, scheme := range m.options.AuthSchemes {
+ if scheme.SchemeID() != option.SchemeID {
+ continue
+ }
+
+ if scheme.IdentityResolver(m.options) != nil {
+ return newResolvedAuthScheme(scheme, option), true
+ }
+ }
+ }
+
+ return nil, false
+}
+
+type resolvedAuthSchemeKey struct{}
+
+type resolvedAuthScheme struct {
+ Scheme smithyhttp.AuthScheme
+ IdentityProperties smithy.Properties
+ SignerProperties smithy.Properties
+}
+
+func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme {
+ return &resolvedAuthScheme{
+ Scheme: scheme,
+ IdentityProperties: option.IdentityProperties,
+ SignerProperties: option.SignerProperties,
+ }
+}
+
+func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context {
+ return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme)
+}
+
+func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme {
+ v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme)
+ return v
+}
+
+type getIdentityMiddleware struct {
+ options Options
+}
+
+func (*getIdentityMiddleware) ID() string {
+ return "GetIdentity"
+}
+
+func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ innerCtx, span := tracing.StartSpan(ctx, "GetIdentity")
+ defer span.End()
+
+ rscheme := getResolvedAuthScheme(innerCtx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ resolver := rscheme.Scheme.IdentityResolver(m.options)
+ if resolver == nil {
+ return out, metadata, fmt.Errorf("no identity resolver")
+ }
+
+ identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration",
+ func() (smithyauth.Identity, error) {
+ return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties)
+ },
+ func(o *metrics.RecordMetricOptions) {
+ o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID())
+ })
+ if err != nil {
+ return out, metadata, fmt.Errorf("get identity: %w", err)
+ }
+
+ ctx = setIdentity(ctx, identity)
+
+ span.End()
+ return next.HandleFinalize(ctx, in)
+}
+
+type identityKey struct{}
+
+func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context {
+ return middleware.WithStackValue(ctx, identityKey{}, identity)
+}
+
+func getIdentity(ctx context.Context) smithyauth.Identity {
+ v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity)
+ return v
+}
+
+type signRequestMiddleware struct {
+ options Options
+}
+
+func (*signRequestMiddleware) ID() string {
+ return "Signing"
+}
+
+func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "SignRequest")
+ defer span.End()
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request)
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ identity := getIdentity(ctx)
+ if identity == nil {
+ return out, metadata, fmt.Errorf("no identity")
+ }
+
+ signer := rscheme.Scheme.Signer()
+ if signer == nil {
+ return out, metadata, fmt.Errorf("no signer")
+ }
+
+ _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) {
+ return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties)
+ }, func(o *metrics.RecordMetricOptions) {
+ o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID())
+ })
+ if err != nil {
+ return out, metadata, fmt.Errorf("sign request: %w", err)
+ }
+
+ span.End()
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/deserializers.go
new file mode 100644
index 000000000..4a408e0ff
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/deserializers.go
@@ -0,0 +1,13880 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "bytes"
+ "context"
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ smithy "github.com/aws/smithy-go"
+ smithyio "github.com/aws/smithy-go/io"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ smithytime "github.com/aws/smithy-go/time"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "io"
+ "io/ioutil"
+ "strings"
+ "time"
+)
+
+func deserializeS3Expires(v string) (*time.Time, error) {
+ t, err := smithytime.ParseHTTPDate(v)
+ if err != nil {
+ return nil, nil
+ }
+ return &t, nil
+}
+
+type awsAwsjson11_deserializeOpCancelKeyDeletion struct {
+}
+
+func (*awsAwsjson11_deserializeOpCancelKeyDeletion) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpCancelKeyDeletion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorCancelKeyDeletion(response, &metadata)
+ }
+ output := &CancelKeyDeletionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentCancelKeyDeletionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorCancelKeyDeletion(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpConnectCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_deserializeOpConnectCustomKeyStore) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpConnectCustomKeyStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorConnectCustomKeyStore(response, &metadata)
+ }
+ output := &ConnectCustomKeyStoreOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentConnectCustomKeyStoreOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorConnectCustomKeyStore(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("CloudHsmClusterInvalidConfigurationException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterInvalidConfigurationException(response, errorBody)
+
+ case strings.EqualFold("CloudHsmClusterNotActiveException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterNotActiveException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreNotFoundException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpCreateAlias struct {
+}
+
+func (*awsAwsjson11_deserializeOpCreateAlias) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpCreateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorCreateAlias(response, &metadata)
+ }
+ output := &CreateAliasOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorCreateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("AlreadyExistsException", errorCode):
+ return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody)
+
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidAliasNameException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidAliasNameException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpCreateCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_deserializeOpCreateCustomKeyStore) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpCreateCustomKeyStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorCreateCustomKeyStore(response, &metadata)
+ }
+ output := &CreateCustomKeyStoreOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentCreateCustomKeyStoreOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorCreateCustomKeyStore(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("CloudHsmClusterInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterInUseException(response, errorBody)
+
+ case strings.EqualFold("CloudHsmClusterInvalidConfigurationException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterInvalidConfigurationException(response, errorBody)
+
+ case strings.EqualFold("CloudHsmClusterNotActiveException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterNotActiveException(response, errorBody)
+
+ case strings.EqualFold("CloudHsmClusterNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterNotFoundException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreNameInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreNameInUseException(response, errorBody)
+
+ case strings.EqualFold("IncorrectTrustAnchorException", errorCode):
+ return awsAwsjson11_deserializeErrorIncorrectTrustAnchorException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("XksProxyIncorrectAuthenticationCredentialException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyIncorrectAuthenticationCredentialException(response, errorBody)
+
+ case strings.EqualFold("XksProxyInvalidConfigurationException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyInvalidConfigurationException(response, errorBody)
+
+ case strings.EqualFold("XksProxyInvalidResponseException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyInvalidResponseException(response, errorBody)
+
+ case strings.EqualFold("XksProxyUriEndpointInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyUriEndpointInUseException(response, errorBody)
+
+ case strings.EqualFold("XksProxyUriInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyUriInUseException(response, errorBody)
+
+ case strings.EqualFold("XksProxyUriUnreachableException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyUriUnreachableException(response, errorBody)
+
+ case strings.EqualFold("XksProxyVpcEndpointServiceInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyVpcEndpointServiceInUseException(response, errorBody)
+
+ case strings.EqualFold("XksProxyVpcEndpointServiceInvalidConfigurationException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyVpcEndpointServiceInvalidConfigurationException(response, errorBody)
+
+ case strings.EqualFold("XksProxyVpcEndpointServiceNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyVpcEndpointServiceNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpCreateGrant struct {
+}
+
+func (*awsAwsjson11_deserializeOpCreateGrant) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpCreateGrant) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorCreateGrant(response, &metadata)
+ }
+ output := &CreateGrantOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentCreateGrantOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorCreateGrant(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpCreateKey struct {
+}
+
+func (*awsAwsjson11_deserializeOpCreateKey) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpCreateKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorCreateKey(response, &metadata)
+ }
+ output := &CreateKeyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentCreateKeyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorCreateKey(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("CloudHsmClusterInvalidConfigurationException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterInvalidConfigurationException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreNotFoundException(response, errorBody)
+
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("MalformedPolicyDocumentException", errorCode):
+ return awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
+
+ case strings.EqualFold("TagException", errorCode):
+ return awsAwsjson11_deserializeErrorTagException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ case strings.EqualFold("XksKeyAlreadyInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorXksKeyAlreadyInUseException(response, errorBody)
+
+ case strings.EqualFold("XksKeyInvalidConfigurationException", errorCode):
+ return awsAwsjson11_deserializeErrorXksKeyInvalidConfigurationException(response, errorBody)
+
+ case strings.EqualFold("XksKeyNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorXksKeyNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDecrypt struct {
+}
+
+func (*awsAwsjson11_deserializeOpDecrypt) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDecrypt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDecrypt(response, &metadata)
+ }
+ output := &DecryptOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentDecryptOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDecrypt(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("IncorrectKeyException", errorCode):
+ return awsAwsjson11_deserializeErrorIncorrectKeyException(response, errorBody)
+
+ case strings.EqualFold("InvalidCiphertextException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidCiphertextException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDeleteAlias struct {
+}
+
+func (*awsAwsjson11_deserializeOpDeleteAlias) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDeleteAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDeleteAlias(response, &metadata)
+ }
+ output := &DeleteAliasOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDeleteAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDeleteCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_deserializeOpDeleteCustomKeyStore) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDeleteCustomKeyStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDeleteCustomKeyStore(response, &metadata)
+ }
+ output := &DeleteCustomKeyStoreOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentDeleteCustomKeyStoreOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDeleteCustomKeyStore(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("CustomKeyStoreHasCMKsException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreHasCMKsException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreNotFoundException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDeleteImportedKeyMaterial struct {
+}
+
+func (*awsAwsjson11_deserializeOpDeleteImportedKeyMaterial) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDeleteImportedKeyMaterial) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDeleteImportedKeyMaterial(response, &metadata)
+ }
+ output := &DeleteImportedKeyMaterialOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDeleteImportedKeyMaterial(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDeriveSharedSecret struct {
+}
+
+func (*awsAwsjson11_deserializeOpDeriveSharedSecret) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDeriveSharedSecret) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDeriveSharedSecret(response, &metadata)
+ }
+ output := &DeriveSharedSecretOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentDeriveSharedSecretOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDeriveSharedSecret(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDescribeCustomKeyStores struct {
+}
+
+func (*awsAwsjson11_deserializeOpDescribeCustomKeyStores) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDescribeCustomKeyStores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDescribeCustomKeyStores(response, &metadata)
+ }
+ output := &DescribeCustomKeyStoresOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentDescribeCustomKeyStoresOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDescribeCustomKeyStores(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("CustomKeyStoreNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreNotFoundException(response, errorBody)
+
+ case strings.EqualFold("InvalidMarkerException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidMarkerException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDescribeKey struct {
+}
+
+func (*awsAwsjson11_deserializeOpDescribeKey) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDescribeKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDescribeKey(response, &metadata)
+ }
+ output := &DescribeKeyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentDescribeKeyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDescribeKey(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDisableKey struct {
+}
+
+func (*awsAwsjson11_deserializeOpDisableKey) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDisableKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDisableKey(response, &metadata)
+ }
+ output := &DisableKeyOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDisableKey(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDisableKeyRotation struct {
+}
+
+func (*awsAwsjson11_deserializeOpDisableKeyRotation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDisableKeyRotation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDisableKeyRotation(response, &metadata)
+ }
+ output := &DisableKeyRotationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDisableKeyRotation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpDisconnectCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_deserializeOpDisconnectCustomKeyStore) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpDisconnectCustomKeyStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorDisconnectCustomKeyStore(response, &metadata)
+ }
+ output := &DisconnectCustomKeyStoreOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentDisconnectCustomKeyStoreOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorDisconnectCustomKeyStore(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("CustomKeyStoreInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreNotFoundException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpEnableKey struct {
+}
+
+func (*awsAwsjson11_deserializeOpEnableKey) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpEnableKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorEnableKey(response, &metadata)
+ }
+ output := &EnableKeyOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorEnableKey(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpEnableKeyRotation struct {
+}
+
+func (*awsAwsjson11_deserializeOpEnableKeyRotation) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpEnableKeyRotation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorEnableKeyRotation(response, &metadata)
+ }
+ output := &EnableKeyRotationOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorEnableKeyRotation(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpEncrypt struct {
+}
+
+func (*awsAwsjson11_deserializeOpEncrypt) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpEncrypt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorEncrypt(response, &metadata)
+ }
+ output := &EncryptOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentEncryptOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorEncrypt(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGenerateDataKey struct {
+}
+
+func (*awsAwsjson11_deserializeOpGenerateDataKey) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGenerateDataKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGenerateDataKey(response, &metadata)
+ }
+ output := &GenerateDataKeyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGenerateDataKeyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGenerateDataKey(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGenerateDataKeyPair struct {
+}
+
+func (*awsAwsjson11_deserializeOpGenerateDataKeyPair) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGenerateDataKeyPair) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGenerateDataKeyPair(response, &metadata)
+ }
+ output := &GenerateDataKeyPairOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGenerateDataKeyPairOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGenerateDataKeyPair(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGenerateDataKeyPairWithoutPlaintext struct {
+}
+
+func (*awsAwsjson11_deserializeOpGenerateDataKeyPairWithoutPlaintext) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGenerateDataKeyPairWithoutPlaintext) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGenerateDataKeyPairWithoutPlaintext(response, &metadata)
+ }
+ output := &GenerateDataKeyPairWithoutPlaintextOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGenerateDataKeyPairWithoutPlaintextOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGenerateDataKeyPairWithoutPlaintext(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGenerateDataKeyWithoutPlaintext struct {
+}
+
+func (*awsAwsjson11_deserializeOpGenerateDataKeyWithoutPlaintext) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGenerateDataKeyWithoutPlaintext) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGenerateDataKeyWithoutPlaintext(response, &metadata)
+ }
+ output := &GenerateDataKeyWithoutPlaintextOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGenerateDataKeyWithoutPlaintextOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGenerateDataKeyWithoutPlaintext(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGenerateMac struct {
+}
+
+func (*awsAwsjson11_deserializeOpGenerateMac) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGenerateMac) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGenerateMac(response, &metadata)
+ }
+ output := &GenerateMacOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGenerateMacOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGenerateMac(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGenerateRandom struct {
+}
+
+func (*awsAwsjson11_deserializeOpGenerateRandom) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGenerateRandom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGenerateRandom(response, &metadata)
+ }
+ output := &GenerateRandomOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGenerateRandomOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGenerateRandom(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("CustomKeyStoreInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreNotFoundException(response, errorBody)
+
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGetKeyPolicy struct {
+}
+
+func (*awsAwsjson11_deserializeOpGetKeyPolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGetKeyPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGetKeyPolicy(response, &metadata)
+ }
+ output := &GetKeyPolicyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGetKeyPolicyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGetKeyPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGetKeyRotationStatus struct {
+}
+
+func (*awsAwsjson11_deserializeOpGetKeyRotationStatus) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGetKeyRotationStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGetKeyRotationStatus(response, &metadata)
+ }
+ output := &GetKeyRotationStatusOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGetKeyRotationStatusOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGetKeyRotationStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGetParametersForImport struct {
+}
+
+func (*awsAwsjson11_deserializeOpGetParametersForImport) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGetParametersForImport) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGetParametersForImport(response, &metadata)
+ }
+ output := &GetParametersForImportOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGetParametersForImportOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGetParametersForImport(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpGetPublicKey struct {
+}
+
+func (*awsAwsjson11_deserializeOpGetPublicKey) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpGetPublicKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorGetPublicKey(response, &metadata)
+ }
+ output := &GetPublicKeyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentGetPublicKeyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorGetPublicKey(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpImportKeyMaterial struct {
+}
+
+func (*awsAwsjson11_deserializeOpImportKeyMaterial) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpImportKeyMaterial) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorImportKeyMaterial(response, &metadata)
+ }
+ output := &ImportKeyMaterialOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentImportKeyMaterialOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorImportKeyMaterial(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("ExpiredImportTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorExpiredImportTokenException(response, errorBody)
+
+ case strings.EqualFold("IncorrectKeyMaterialException", errorCode):
+ return awsAwsjson11_deserializeErrorIncorrectKeyMaterialException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidCiphertextException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidCiphertextException(response, errorBody)
+
+ case strings.EqualFold("InvalidImportTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidImportTokenException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpListAliases struct {
+}
+
+func (*awsAwsjson11_deserializeOpListAliases) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpListAliases) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorListAliases(response, &metadata)
+ }
+ output := &ListAliasesOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentListAliasesOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorListAliases(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidMarkerException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidMarkerException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpListGrants struct {
+}
+
+func (*awsAwsjson11_deserializeOpListGrants) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpListGrants) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorListGrants(response, &metadata)
+ }
+ output := &ListGrantsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentListGrantsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorListGrants(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantIdException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantIdException(response, errorBody)
+
+ case strings.EqualFold("InvalidMarkerException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidMarkerException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpListKeyPolicies struct {
+}
+
+func (*awsAwsjson11_deserializeOpListKeyPolicies) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpListKeyPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorListKeyPolicies(response, &metadata)
+ }
+ output := &ListKeyPoliciesOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentListKeyPoliciesOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorListKeyPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpListKeyRotations struct {
+}
+
+func (*awsAwsjson11_deserializeOpListKeyRotations) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpListKeyRotations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorListKeyRotations(response, &metadata)
+ }
+ output := &ListKeyRotationsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentListKeyRotationsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorListKeyRotations(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidMarkerException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidMarkerException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpListKeys struct {
+}
+
+func (*awsAwsjson11_deserializeOpListKeys) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpListKeys) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorListKeys(response, &metadata)
+ }
+ output := &ListKeysOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentListKeysOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorListKeys(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidMarkerException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidMarkerException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpListResourceTags struct {
+}
+
+func (*awsAwsjson11_deserializeOpListResourceTags) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpListResourceTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorListResourceTags(response, &metadata)
+ }
+ output := &ListResourceTagsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentListResourceTagsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorListResourceTags(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidMarkerException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidMarkerException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpListRetirableGrants struct {
+}
+
+func (*awsAwsjson11_deserializeOpListRetirableGrants) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpListRetirableGrants) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorListRetirableGrants(response, &metadata)
+ }
+ output := &ListRetirableGrantsOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentListRetirableGrantsOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorListRetirableGrants(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidMarkerException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidMarkerException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpPutKeyPolicy struct {
+}
+
+func (*awsAwsjson11_deserializeOpPutKeyPolicy) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpPutKeyPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorPutKeyPolicy(response, &metadata)
+ }
+ output := &PutKeyPolicyOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorPutKeyPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("MalformedPolicyDocumentException", errorCode):
+ return awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpReEncrypt struct {
+}
+
+func (*awsAwsjson11_deserializeOpReEncrypt) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpReEncrypt) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorReEncrypt(response, &metadata)
+ }
+ output := &ReEncryptOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentReEncryptOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorReEncrypt(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("IncorrectKeyException", errorCode):
+ return awsAwsjson11_deserializeErrorIncorrectKeyException(response, errorBody)
+
+ case strings.EqualFold("InvalidCiphertextException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidCiphertextException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpReplicateKey struct {
+}
+
+func (*awsAwsjson11_deserializeOpReplicateKey) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpReplicateKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorReplicateKey(response, &metadata)
+ }
+ output := &ReplicateKeyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentReplicateKeyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorReplicateKey(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("AlreadyExistsException", errorCode):
+ return awsAwsjson11_deserializeErrorAlreadyExistsException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("MalformedPolicyDocumentException", errorCode):
+ return awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("TagException", errorCode):
+ return awsAwsjson11_deserializeErrorTagException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpRetireGrant struct {
+}
+
+func (*awsAwsjson11_deserializeOpRetireGrant) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpRetireGrant) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorRetireGrant(response, &metadata)
+ }
+ output := &RetireGrantOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorRetireGrant(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantIdException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantIdException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpRevokeGrant struct {
+}
+
+func (*awsAwsjson11_deserializeOpRevokeGrant) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpRevokeGrant) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorRevokeGrant(response, &metadata)
+ }
+ output := &RevokeGrantOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorRevokeGrant(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantIdException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantIdException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpRotateKeyOnDemand struct {
+}
+
+func (*awsAwsjson11_deserializeOpRotateKeyOnDemand) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpRotateKeyOnDemand) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorRotateKeyOnDemand(response, &metadata)
+ }
+ output := &RotateKeyOnDemandOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentRotateKeyOnDemandOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorRotateKeyOnDemand(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("ConflictException", errorCode):
+ return awsAwsjson11_deserializeErrorConflictException(response, errorBody)
+
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpScheduleKeyDeletion struct {
+}
+
+func (*awsAwsjson11_deserializeOpScheduleKeyDeletion) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpScheduleKeyDeletion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorScheduleKeyDeletion(response, &metadata)
+ }
+ output := &ScheduleKeyDeletionOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentScheduleKeyDeletionOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorScheduleKeyDeletion(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpSign struct {
+}
+
+func (*awsAwsjson11_deserializeOpSign) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpSign) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorSign(response, &metadata)
+ }
+ output := &SignOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentSignOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorSign(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpTagResource struct {
+}
+
+func (*awsAwsjson11_deserializeOpTagResource) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata)
+ }
+ output := &TagResourceOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("TagException", errorCode):
+ return awsAwsjson11_deserializeErrorTagException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpUntagResource struct {
+}
+
+func (*awsAwsjson11_deserializeOpUntagResource) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata)
+ }
+ output := &UntagResourceOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("TagException", errorCode):
+ return awsAwsjson11_deserializeErrorTagException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpUpdateAlias struct {
+}
+
+func (*awsAwsjson11_deserializeOpUpdateAlias) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpUpdateAlias) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorUpdateAlias(response, &metadata)
+ }
+ output := &UpdateAliasOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorUpdateAlias(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("LimitExceededException", errorCode):
+ return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpUpdateCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_deserializeOpUpdateCustomKeyStore) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpUpdateCustomKeyStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorUpdateCustomKeyStore(response, &metadata)
+ }
+ output := &UpdateCustomKeyStoreOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentUpdateCustomKeyStoreOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorUpdateCustomKeyStore(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("CloudHsmClusterInvalidConfigurationException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterInvalidConfigurationException(response, errorBody)
+
+ case strings.EqualFold("CloudHsmClusterNotActiveException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterNotActiveException(response, errorBody)
+
+ case strings.EqualFold("CloudHsmClusterNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterNotFoundException(response, errorBody)
+
+ case strings.EqualFold("CloudHsmClusterNotRelatedException", errorCode):
+ return awsAwsjson11_deserializeErrorCloudHsmClusterNotRelatedException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreNameInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreNameInUseException(response, errorBody)
+
+ case strings.EqualFold("CustomKeyStoreNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorCustomKeyStoreNotFoundException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("XksProxyIncorrectAuthenticationCredentialException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyIncorrectAuthenticationCredentialException(response, errorBody)
+
+ case strings.EqualFold("XksProxyInvalidConfigurationException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyInvalidConfigurationException(response, errorBody)
+
+ case strings.EqualFold("XksProxyInvalidResponseException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyInvalidResponseException(response, errorBody)
+
+ case strings.EqualFold("XksProxyUriEndpointInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyUriEndpointInUseException(response, errorBody)
+
+ case strings.EqualFold("XksProxyUriInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyUriInUseException(response, errorBody)
+
+ case strings.EqualFold("XksProxyUriUnreachableException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyUriUnreachableException(response, errorBody)
+
+ case strings.EqualFold("XksProxyVpcEndpointServiceInUseException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyVpcEndpointServiceInUseException(response, errorBody)
+
+ case strings.EqualFold("XksProxyVpcEndpointServiceInvalidConfigurationException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyVpcEndpointServiceInvalidConfigurationException(response, errorBody)
+
+ case strings.EqualFold("XksProxyVpcEndpointServiceNotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorXksProxyVpcEndpointServiceNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpUpdateKeyDescription struct {
+}
+
+func (*awsAwsjson11_deserializeOpUpdateKeyDescription) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpUpdateKeyDescription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorUpdateKeyDescription(response, &metadata)
+ }
+ output := &UpdateKeyDescriptionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorUpdateKeyDescription(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpUpdatePrimaryRegion struct {
+}
+
+func (*awsAwsjson11_deserializeOpUpdatePrimaryRegion) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpUpdatePrimaryRegion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorUpdatePrimaryRegion(response, &metadata)
+ }
+ output := &UpdatePrimaryRegionOutput{}
+ out.Result = output
+
+ if _, err = io.Copy(ioutil.Discard, response.Body); err != nil {
+ return out, metadata, &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to discard response body, %w", err),
+ }
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorUpdatePrimaryRegion(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("InvalidArnException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ case strings.EqualFold("UnsupportedOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpVerify struct {
+}
+
+func (*awsAwsjson11_deserializeOpVerify) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpVerify) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorVerify(response, &metadata)
+ }
+ output := &VerifyOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentVerifyOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorVerify(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DependencyTimeoutException", errorCode):
+ return awsAwsjson11_deserializeErrorDependencyTimeoutException(response, errorBody)
+
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidSignatureException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidSignatureException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+type awsAwsjson11_deserializeOpVerifyMac struct {
+}
+
+func (*awsAwsjson11_deserializeOpVerifyMac) ID() string {
+ return "OperationDeserializer"
+}
+
+func (m *awsAwsjson11_deserializeOpVerifyMac) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) (
+ out middleware.DeserializeOutput, metadata middleware.Metadata, err error,
+) {
+ out, metadata, err = next.HandleDeserialize(ctx, in)
+ if err != nil {
+ return out, metadata, err
+ }
+
+ _, span := tracing.StartSpan(ctx, "OperationDeserializer")
+ endTimer := startMetricTimer(ctx, "client.call.deserialization_duration")
+ defer endTimer()
+ defer span.End()
+ response, ok := out.RawResponse.(*smithyhttp.Response)
+ if !ok {
+ return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)}
+ }
+
+ if response.StatusCode < 200 || response.StatusCode >= 300 {
+ return out, metadata, awsAwsjson11_deserializeOpErrorVerifyMac(response, &metadata)
+ }
+ output := &VerifyMacOutput{}
+ out.Result = output
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(response.Body, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ err = awsAwsjson11_deserializeOpDocumentVerifyMacOutput(&output, shape)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return out, metadata, err
+ }
+
+ return out, metadata, err
+}
+
+func awsAwsjson11_deserializeOpErrorVerifyMac(response *smithyhttp.Response, metadata *middleware.Metadata) error {
+ var errorBuffer bytes.Buffer
+ if _, err := io.Copy(&errorBuffer, response.Body); err != nil {
+ return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)}
+ }
+ errorBody := bytes.NewReader(errorBuffer.Bytes())
+
+ errorCode := "UnknownError"
+ errorMessage := errorCode
+
+ headerCode := response.Header.Get("X-Amzn-ErrorType")
+
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ bodyInfo, err := getProtocolErrorInfo(decoder)
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok {
+ errorCode = restjson.SanitizeErrorCode(typ)
+ }
+ if len(bodyInfo.Message) != 0 {
+ errorMessage = bodyInfo.Message
+ }
+ switch {
+ case strings.EqualFold("DisabledException", errorCode):
+ return awsAwsjson11_deserializeErrorDisabledException(response, errorBody)
+
+ case strings.EqualFold("DryRunOperationException", errorCode):
+ return awsAwsjson11_deserializeErrorDryRunOperationException(response, errorBody)
+
+ case strings.EqualFold("InvalidGrantTokenException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidGrantTokenException(response, errorBody)
+
+ case strings.EqualFold("InvalidKeyUsageException", errorCode):
+ return awsAwsjson11_deserializeErrorInvalidKeyUsageException(response, errorBody)
+
+ case strings.EqualFold("KMSInternalException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInternalException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidMacException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidMacException(response, errorBody)
+
+ case strings.EqualFold("KMSInvalidStateException", errorCode):
+ return awsAwsjson11_deserializeErrorKMSInvalidStateException(response, errorBody)
+
+ case strings.EqualFold("KeyUnavailableException", errorCode):
+ return awsAwsjson11_deserializeErrorKeyUnavailableException(response, errorBody)
+
+ case strings.EqualFold("NotFoundException", errorCode):
+ return awsAwsjson11_deserializeErrorNotFoundException(response, errorBody)
+
+ default:
+ genericError := &smithy.GenericAPIError{
+ Code: errorCode,
+ Message: errorMessage,
+ }
+ return genericError
+
+ }
+}
+
+func awsAwsjson11_deserializeErrorAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.AlreadyExistsException{}
+ err := awsAwsjson11_deserializeDocumentAlreadyExistsException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorCloudHsmClusterInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.CloudHsmClusterInUseException{}
+ err := awsAwsjson11_deserializeDocumentCloudHsmClusterInUseException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorCloudHsmClusterInvalidConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.CloudHsmClusterInvalidConfigurationException{}
+ err := awsAwsjson11_deserializeDocumentCloudHsmClusterInvalidConfigurationException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorCloudHsmClusterNotActiveException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.CloudHsmClusterNotActiveException{}
+ err := awsAwsjson11_deserializeDocumentCloudHsmClusterNotActiveException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorCloudHsmClusterNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.CloudHsmClusterNotFoundException{}
+ err := awsAwsjson11_deserializeDocumentCloudHsmClusterNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorCloudHsmClusterNotRelatedException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.CloudHsmClusterNotRelatedException{}
+ err := awsAwsjson11_deserializeDocumentCloudHsmClusterNotRelatedException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.ConflictException{}
+ err := awsAwsjson11_deserializeDocumentConflictException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorCustomKeyStoreHasCMKsException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.CustomKeyStoreHasCMKsException{}
+ err := awsAwsjson11_deserializeDocumentCustomKeyStoreHasCMKsException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorCustomKeyStoreInvalidStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.CustomKeyStoreInvalidStateException{}
+ err := awsAwsjson11_deserializeDocumentCustomKeyStoreInvalidStateException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorCustomKeyStoreNameInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.CustomKeyStoreNameInUseException{}
+ err := awsAwsjson11_deserializeDocumentCustomKeyStoreNameInUseException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorCustomKeyStoreNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.CustomKeyStoreNotFoundException{}
+ err := awsAwsjson11_deserializeDocumentCustomKeyStoreNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorDependencyTimeoutException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.DependencyTimeoutException{}
+ err := awsAwsjson11_deserializeDocumentDependencyTimeoutException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.DisabledException{}
+ err := awsAwsjson11_deserializeDocumentDisabledException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorDryRunOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.DryRunOperationException{}
+ err := awsAwsjson11_deserializeDocumentDryRunOperationException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorExpiredImportTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.ExpiredImportTokenException{}
+ err := awsAwsjson11_deserializeDocumentExpiredImportTokenException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorIncorrectKeyException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.IncorrectKeyException{}
+ err := awsAwsjson11_deserializeDocumentIncorrectKeyException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorIncorrectKeyMaterialException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.IncorrectKeyMaterialException{}
+ err := awsAwsjson11_deserializeDocumentIncorrectKeyMaterialException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorIncorrectTrustAnchorException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.IncorrectTrustAnchorException{}
+ err := awsAwsjson11_deserializeDocumentIncorrectTrustAnchorException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidAliasNameException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidAliasNameException{}
+ err := awsAwsjson11_deserializeDocumentInvalidAliasNameException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidArnException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidArnException{}
+ err := awsAwsjson11_deserializeDocumentInvalidArnException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidCiphertextException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidCiphertextException{}
+ err := awsAwsjson11_deserializeDocumentInvalidCiphertextException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidGrantIdException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidGrantIdException{}
+ err := awsAwsjson11_deserializeDocumentInvalidGrantIdException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidGrantTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidGrantTokenException{}
+ err := awsAwsjson11_deserializeDocumentInvalidGrantTokenException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidImportTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidImportTokenException{}
+ err := awsAwsjson11_deserializeDocumentInvalidImportTokenException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidKeyUsageException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidKeyUsageException{}
+ err := awsAwsjson11_deserializeDocumentInvalidKeyUsageException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorInvalidMarkerException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.InvalidMarkerException{}
+ err := awsAwsjson11_deserializeDocumentInvalidMarkerException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorKeyUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KeyUnavailableException{}
+ err := awsAwsjson11_deserializeDocumentKeyUnavailableException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorKMSInternalException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KMSInternalException{}
+ err := awsAwsjson11_deserializeDocumentKMSInternalException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorKMSInvalidMacException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KMSInvalidMacException{}
+ err := awsAwsjson11_deserializeDocumentKMSInvalidMacException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorKMSInvalidSignatureException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KMSInvalidSignatureException{}
+ err := awsAwsjson11_deserializeDocumentKMSInvalidSignatureException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorKMSInvalidStateException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.KMSInvalidStateException{}
+ err := awsAwsjson11_deserializeDocumentKMSInvalidStateException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.LimitExceededException{}
+ err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.MalformedPolicyDocumentException{}
+ err := awsAwsjson11_deserializeDocumentMalformedPolicyDocumentException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.NotFoundException{}
+ err := awsAwsjson11_deserializeDocumentNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorTagException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.TagException{}
+ err := awsAwsjson11_deserializeDocumentTagException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.UnsupportedOperationException{}
+ err := awsAwsjson11_deserializeDocumentUnsupportedOperationException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksKeyAlreadyInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksKeyAlreadyInUseException{}
+ err := awsAwsjson11_deserializeDocumentXksKeyAlreadyInUseException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksKeyInvalidConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksKeyInvalidConfigurationException{}
+ err := awsAwsjson11_deserializeDocumentXksKeyInvalidConfigurationException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksKeyNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksKeyNotFoundException{}
+ err := awsAwsjson11_deserializeDocumentXksKeyNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksProxyIncorrectAuthenticationCredentialException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksProxyIncorrectAuthenticationCredentialException{}
+ err := awsAwsjson11_deserializeDocumentXksProxyIncorrectAuthenticationCredentialException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksProxyInvalidConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksProxyInvalidConfigurationException{}
+ err := awsAwsjson11_deserializeDocumentXksProxyInvalidConfigurationException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksProxyInvalidResponseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksProxyInvalidResponseException{}
+ err := awsAwsjson11_deserializeDocumentXksProxyInvalidResponseException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksProxyUriEndpointInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksProxyUriEndpointInUseException{}
+ err := awsAwsjson11_deserializeDocumentXksProxyUriEndpointInUseException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksProxyUriInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksProxyUriInUseException{}
+ err := awsAwsjson11_deserializeDocumentXksProxyUriInUseException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksProxyUriUnreachableException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksProxyUriUnreachableException{}
+ err := awsAwsjson11_deserializeDocumentXksProxyUriUnreachableException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksProxyVpcEndpointServiceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksProxyVpcEndpointServiceInUseException{}
+ err := awsAwsjson11_deserializeDocumentXksProxyVpcEndpointServiceInUseException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksProxyVpcEndpointServiceInvalidConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksProxyVpcEndpointServiceInvalidConfigurationException{}
+ err := awsAwsjson11_deserializeDocumentXksProxyVpcEndpointServiceInvalidConfigurationException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeErrorXksProxyVpcEndpointServiceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error {
+ var buff [1024]byte
+ ringBuffer := smithyio.NewRingBuffer(buff[:])
+
+ body := io.TeeReader(errorBody, ringBuffer)
+ decoder := json.NewDecoder(body)
+ decoder.UseNumber()
+ var shape interface{}
+ if err := decoder.Decode(&shape); err != nil && err != io.EOF {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ output := &types.XksProxyVpcEndpointServiceNotFoundException{}
+ err := awsAwsjson11_deserializeDocumentXksProxyVpcEndpointServiceNotFoundException(&output, shape)
+
+ if err != nil {
+ var snapshot bytes.Buffer
+ io.Copy(&snapshot, ringBuffer)
+ err = &smithy.DeserializationError{
+ Err: fmt.Errorf("failed to decode response body, %w", err),
+ Snapshot: snapshot.Bytes(),
+ }
+ return err
+ }
+
+ errorBody.Seek(0, io.SeekStart)
+ return output
+}
+
+func awsAwsjson11_deserializeDocumentAliasList(v *[]types.AliasListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.AliasListEntry
+ if *v == nil {
+ cv = []types.AliasListEntry{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.AliasListEntry
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentAliasListEntry(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentAliasListEntry(v **types.AliasListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AliasListEntry
+ if *v == nil {
+ sv = &types.AliasListEntry{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AliasArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ArnType to be of type string, got %T instead", value)
+ }
+ sv.AliasArn = ptr.String(jtv)
+ }
+
+ case "AliasName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected AliasNameType to be of type string, got %T instead", value)
+ }
+ sv.AliasName = ptr.String(jtv)
+ }
+
+ case "CreationDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "LastUpdatedDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.LastUpdatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "TargetKeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.TargetKeyId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentAlreadyExistsException(v **types.AlreadyExistsException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.AlreadyExistsException
+ if *v == nil {
+ sv = &types.AlreadyExistsException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCloudHsmClusterInUseException(v **types.CloudHsmClusterInUseException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CloudHsmClusterInUseException
+ if *v == nil {
+ sv = &types.CloudHsmClusterInUseException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCloudHsmClusterInvalidConfigurationException(v **types.CloudHsmClusterInvalidConfigurationException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CloudHsmClusterInvalidConfigurationException
+ if *v == nil {
+ sv = &types.CloudHsmClusterInvalidConfigurationException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCloudHsmClusterNotActiveException(v **types.CloudHsmClusterNotActiveException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CloudHsmClusterNotActiveException
+ if *v == nil {
+ sv = &types.CloudHsmClusterNotActiveException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCloudHsmClusterNotFoundException(v **types.CloudHsmClusterNotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CloudHsmClusterNotFoundException
+ if *v == nil {
+ sv = &types.CloudHsmClusterNotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCloudHsmClusterNotRelatedException(v **types.CloudHsmClusterNotRelatedException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CloudHsmClusterNotRelatedException
+ if *v == nil {
+ sv = &types.CloudHsmClusterNotRelatedException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ConflictException
+ if *v == nil {
+ sv = &types.ConflictException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCustomKeyStoreHasCMKsException(v **types.CustomKeyStoreHasCMKsException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CustomKeyStoreHasCMKsException
+ if *v == nil {
+ sv = &types.CustomKeyStoreHasCMKsException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCustomKeyStoreInvalidStateException(v **types.CustomKeyStoreInvalidStateException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CustomKeyStoreInvalidStateException
+ if *v == nil {
+ sv = &types.CustomKeyStoreInvalidStateException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCustomKeyStoreNameInUseException(v **types.CustomKeyStoreNameInUseException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CustomKeyStoreNameInUseException
+ if *v == nil {
+ sv = &types.CustomKeyStoreNameInUseException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCustomKeyStoreNotFoundException(v **types.CustomKeyStoreNotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CustomKeyStoreNotFoundException
+ if *v == nil {
+ sv = &types.CustomKeyStoreNotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCustomKeyStoresList(v *[]types.CustomKeyStoresListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.CustomKeyStoresListEntry
+ if *v == nil {
+ cv = []types.CustomKeyStoresListEntry{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.CustomKeyStoresListEntry
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentCustomKeyStoresListEntry(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentCustomKeyStoresListEntry(v **types.CustomKeyStoresListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.CustomKeyStoresListEntry
+ if *v == nil {
+ sv = &types.CustomKeyStoresListEntry{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CloudHsmClusterId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CloudHsmClusterIdType to be of type string, got %T instead", value)
+ }
+ sv.CloudHsmClusterId = ptr.String(jtv)
+ }
+
+ case "ConnectionErrorCode":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ConnectionErrorCodeType to be of type string, got %T instead", value)
+ }
+ sv.ConnectionErrorCode = types.ConnectionErrorCodeType(jtv)
+ }
+
+ case "ConnectionState":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ConnectionStateType to be of type string, got %T instead", value)
+ }
+ sv.ConnectionState = types.ConnectionStateType(jtv)
+ }
+
+ case "CreationDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "CustomKeyStoreId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CustomKeyStoreIdType to be of type string, got %T instead", value)
+ }
+ sv.CustomKeyStoreId = ptr.String(jtv)
+ }
+
+ case "CustomKeyStoreName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CustomKeyStoreNameType to be of type string, got %T instead", value)
+ }
+ sv.CustomKeyStoreName = ptr.String(jtv)
+ }
+
+ case "CustomKeyStoreType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CustomKeyStoreType to be of type string, got %T instead", value)
+ }
+ sv.CustomKeyStoreType = types.CustomKeyStoreType(jtv)
+ }
+
+ case "TrustAnchorCertificate":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TrustAnchorCertificateType to be of type string, got %T instead", value)
+ }
+ sv.TrustAnchorCertificate = ptr.String(jtv)
+ }
+
+ case "XksProxyConfiguration":
+ if err := awsAwsjson11_deserializeDocumentXksProxyConfigurationType(&sv.XksProxyConfiguration, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentDependencyTimeoutException(v **types.DependencyTimeoutException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.DependencyTimeoutException
+ if *v == nil {
+ sv = &types.DependencyTimeoutException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentDisabledException(v **types.DisabledException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.DisabledException
+ if *v == nil {
+ sv = &types.DisabledException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentDryRunOperationException(v **types.DryRunOperationException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.DryRunOperationException
+ if *v == nil {
+ sv = &types.DryRunOperationException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentEncryptionAlgorithmSpecList(v *[]types.EncryptionAlgorithmSpec, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.EncryptionAlgorithmSpec
+ if *v == nil {
+ cv = []types.EncryptionAlgorithmSpec{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.EncryptionAlgorithmSpec
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EncryptionAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ col = types.EncryptionAlgorithmSpec(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentEncryptionContextType(v *map[string]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var mv map[string]string
+ if *v == nil {
+ mv = map[string]string{}
+ } else {
+ mv = *v
+ }
+
+ for key, value := range shape {
+ var parsedVal string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EncryptionContextValue to be of type string, got %T instead", value)
+ }
+ parsedVal = jtv
+ }
+ mv[key] = parsedVal
+
+ }
+ *v = mv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentExpiredImportTokenException(v **types.ExpiredImportTokenException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.ExpiredImportTokenException
+ if *v == nil {
+ sv = &types.ExpiredImportTokenException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentGrantConstraints(v **types.GrantConstraints, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.GrantConstraints
+ if *v == nil {
+ sv = &types.GrantConstraints{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "EncryptionContextEquals":
+ if err := awsAwsjson11_deserializeDocumentEncryptionContextType(&sv.EncryptionContextEquals, value); err != nil {
+ return err
+ }
+
+ case "EncryptionContextSubset":
+ if err := awsAwsjson11_deserializeDocumentEncryptionContextType(&sv.EncryptionContextSubset, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentGrantList(v *[]types.GrantListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.GrantListEntry
+ if *v == nil {
+ cv = []types.GrantListEntry{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.GrantListEntry
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentGrantListEntry(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentGrantListEntry(v **types.GrantListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.GrantListEntry
+ if *v == nil {
+ sv = &types.GrantListEntry{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Constraints":
+ if err := awsAwsjson11_deserializeDocumentGrantConstraints(&sv.Constraints, value); err != nil {
+ return err
+ }
+
+ case "CreationDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "GranteePrincipal":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PrincipalIdType to be of type string, got %T instead", value)
+ }
+ sv.GranteePrincipal = ptr.String(jtv)
+ }
+
+ case "GrantId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected GrantIdType to be of type string, got %T instead", value)
+ }
+ sv.GrantId = ptr.String(jtv)
+ }
+
+ case "IssuingAccount":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PrincipalIdType to be of type string, got %T instead", value)
+ }
+ sv.IssuingAccount = ptr.String(jtv)
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "Name":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected GrantNameType to be of type string, got %T instead", value)
+ }
+ sv.Name = ptr.String(jtv)
+ }
+
+ case "Operations":
+ if err := awsAwsjson11_deserializeDocumentGrantOperationList(&sv.Operations, value); err != nil {
+ return err
+ }
+
+ case "RetiringPrincipal":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PrincipalIdType to be of type string, got %T instead", value)
+ }
+ sv.RetiringPrincipal = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentGrantOperationList(v *[]types.GrantOperation, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.GrantOperation
+ if *v == nil {
+ cv = []types.GrantOperation{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.GrantOperation
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected GrantOperation to be of type string, got %T instead", value)
+ }
+ col = types.GrantOperation(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentIncorrectKeyException(v **types.IncorrectKeyException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.IncorrectKeyException
+ if *v == nil {
+ sv = &types.IncorrectKeyException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentIncorrectKeyMaterialException(v **types.IncorrectKeyMaterialException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.IncorrectKeyMaterialException
+ if *v == nil {
+ sv = &types.IncorrectKeyMaterialException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentIncorrectTrustAnchorException(v **types.IncorrectTrustAnchorException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.IncorrectTrustAnchorException
+ if *v == nil {
+ sv = &types.IncorrectTrustAnchorException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidAliasNameException(v **types.InvalidAliasNameException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidAliasNameException
+ if *v == nil {
+ sv = &types.InvalidAliasNameException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidArnException(v **types.InvalidArnException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidArnException
+ if *v == nil {
+ sv = &types.InvalidArnException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidCiphertextException(v **types.InvalidCiphertextException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidCiphertextException
+ if *v == nil {
+ sv = &types.InvalidCiphertextException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidGrantIdException(v **types.InvalidGrantIdException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidGrantIdException
+ if *v == nil {
+ sv = &types.InvalidGrantIdException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidGrantTokenException(v **types.InvalidGrantTokenException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidGrantTokenException
+ if *v == nil {
+ sv = &types.InvalidGrantTokenException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidImportTokenException(v **types.InvalidImportTokenException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidImportTokenException
+ if *v == nil {
+ sv = &types.InvalidImportTokenException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidKeyUsageException(v **types.InvalidKeyUsageException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidKeyUsageException
+ if *v == nil {
+ sv = &types.InvalidKeyUsageException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentInvalidMarkerException(v **types.InvalidMarkerException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.InvalidMarkerException
+ if *v == nil {
+ sv = &types.InvalidMarkerException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentKeyAgreementAlgorithmSpecList(v *[]types.KeyAgreementAlgorithmSpec, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.KeyAgreementAlgorithmSpec
+ if *v == nil {
+ cv = []types.KeyAgreementAlgorithmSpec{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.KeyAgreementAlgorithmSpec
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyAgreementAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ col = types.KeyAgreementAlgorithmSpec(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentKeyList(v *[]types.KeyListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.KeyListEntry
+ if *v == nil {
+ cv = []types.KeyListEntry{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.KeyListEntry
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentKeyListEntry(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentKeyListEntry(v **types.KeyListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KeyListEntry
+ if *v == nil {
+ sv = &types.KeyListEntry{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyArn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ArnType to be of type string, got %T instead", value)
+ }
+ sv.KeyArn = ptr.String(jtv)
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentKeyMetadata(v **types.KeyMetadata, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KeyMetadata
+ if *v == nil {
+ sv = &types.KeyMetadata{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Arn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ArnType to be of type string, got %T instead", value)
+ }
+ sv.Arn = ptr.String(jtv)
+ }
+
+ case "AWSAccountId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected AWSAccountIdType to be of type string, got %T instead", value)
+ }
+ sv.AWSAccountId = ptr.String(jtv)
+ }
+
+ case "CloudHsmClusterId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CloudHsmClusterIdType to be of type string, got %T instead", value)
+ }
+ sv.CloudHsmClusterId = ptr.String(jtv)
+ }
+
+ case "CreationDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.CreationDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "CustomerMasterKeySpec":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CustomerMasterKeySpec to be of type string, got %T instead", value)
+ }
+ sv.CustomerMasterKeySpec = types.CustomerMasterKeySpec(jtv)
+ }
+
+ case "CustomKeyStoreId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CustomKeyStoreIdType to be of type string, got %T instead", value)
+ }
+ sv.CustomKeyStoreId = ptr.String(jtv)
+ }
+
+ case "DeletionDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.DeletionDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "Description":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DescriptionType to be of type string, got %T instead", value)
+ }
+ sv.Description = ptr.String(jtv)
+ }
+
+ case "Enabled":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.Enabled = jtv
+ }
+
+ case "EncryptionAlgorithms":
+ if err := awsAwsjson11_deserializeDocumentEncryptionAlgorithmSpecList(&sv.EncryptionAlgorithms, value); err != nil {
+ return err
+ }
+
+ case "ExpirationModel":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ExpirationModelType to be of type string, got %T instead", value)
+ }
+ sv.ExpirationModel = types.ExpirationModelType(jtv)
+ }
+
+ case "KeyAgreementAlgorithms":
+ if err := awsAwsjson11_deserializeDocumentKeyAgreementAlgorithmSpecList(&sv.KeyAgreementAlgorithms, value); err != nil {
+ return err
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "KeyManager":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyManagerType to be of type string, got %T instead", value)
+ }
+ sv.KeyManager = types.KeyManagerType(jtv)
+ }
+
+ case "KeySpec":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeySpec to be of type string, got %T instead", value)
+ }
+ sv.KeySpec = types.KeySpec(jtv)
+ }
+
+ case "KeyState":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyState to be of type string, got %T instead", value)
+ }
+ sv.KeyState = types.KeyState(jtv)
+ }
+
+ case "KeyUsage":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyUsageType to be of type string, got %T instead", value)
+ }
+ sv.KeyUsage = types.KeyUsageType(jtv)
+ }
+
+ case "MacAlgorithms":
+ if err := awsAwsjson11_deserializeDocumentMacAlgorithmSpecList(&sv.MacAlgorithms, value); err != nil {
+ return err
+ }
+
+ case "MultiRegion":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected NullableBooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.MultiRegion = ptr.Bool(jtv)
+ }
+
+ case "MultiRegionConfiguration":
+ if err := awsAwsjson11_deserializeDocumentMultiRegionConfiguration(&sv.MultiRegionConfiguration, value); err != nil {
+ return err
+ }
+
+ case "Origin":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected OriginType to be of type string, got %T instead", value)
+ }
+ sv.Origin = types.OriginType(jtv)
+ }
+
+ case "PendingDeletionWindowInDays":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected PendingWindowInDaysType to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.PendingDeletionWindowInDays = ptr.Int32(int32(i64))
+ }
+
+ case "SigningAlgorithms":
+ if err := awsAwsjson11_deserializeDocumentSigningAlgorithmSpecList(&sv.SigningAlgorithms, value); err != nil {
+ return err
+ }
+
+ case "ValidTo":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.ValidTo = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "XksKeyConfiguration":
+ if err := awsAwsjson11_deserializeDocumentXksKeyConfigurationType(&sv.XksKeyConfiguration, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentKeyUnavailableException(v **types.KeyUnavailableException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KeyUnavailableException
+ if *v == nil {
+ sv = &types.KeyUnavailableException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentKMSInternalException(v **types.KMSInternalException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KMSInternalException
+ if *v == nil {
+ sv = &types.KMSInternalException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentKMSInvalidMacException(v **types.KMSInvalidMacException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KMSInvalidMacException
+ if *v == nil {
+ sv = &types.KMSInvalidMacException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentKMSInvalidSignatureException(v **types.KMSInvalidSignatureException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KMSInvalidSignatureException
+ if *v == nil {
+ sv = &types.KMSInvalidSignatureException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentKMSInvalidStateException(v **types.KMSInvalidStateException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.KMSInvalidStateException
+ if *v == nil {
+ sv = &types.KMSInvalidStateException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.LimitExceededException
+ if *v == nil {
+ sv = &types.LimitExceededException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentMacAlgorithmSpecList(v *[]types.MacAlgorithmSpec, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.MacAlgorithmSpec
+ if *v == nil {
+ cv = []types.MacAlgorithmSpec{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.MacAlgorithmSpec
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MacAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ col = types.MacAlgorithmSpec(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.MalformedPolicyDocumentException
+ if *v == nil {
+ sv = &types.MalformedPolicyDocumentException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentMultiRegionConfiguration(v **types.MultiRegionConfiguration, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.MultiRegionConfiguration
+ if *v == nil {
+ sv = &types.MultiRegionConfiguration{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "MultiRegionKeyType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MultiRegionKeyType to be of type string, got %T instead", value)
+ }
+ sv.MultiRegionKeyType = types.MultiRegionKeyType(jtv)
+ }
+
+ case "PrimaryKey":
+ if err := awsAwsjson11_deserializeDocumentMultiRegionKey(&sv.PrimaryKey, value); err != nil {
+ return err
+ }
+
+ case "ReplicaKeys":
+ if err := awsAwsjson11_deserializeDocumentMultiRegionKeyList(&sv.ReplicaKeys, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentMultiRegionKey(v **types.MultiRegionKey, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.MultiRegionKey
+ if *v == nil {
+ sv = &types.MultiRegionKey{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Arn":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ArnType to be of type string, got %T instead", value)
+ }
+ sv.Arn = ptr.String(jtv)
+ }
+
+ case "Region":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RegionType to be of type string, got %T instead", value)
+ }
+ sv.Region = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentMultiRegionKeyList(v *[]types.MultiRegionKey, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.MultiRegionKey
+ if *v == nil {
+ cv = []types.MultiRegionKey{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.MultiRegionKey
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentMultiRegionKey(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.NotFoundException
+ if *v == nil {
+ sv = &types.NotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentPolicyNameList(v *[]string, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []string
+ if *v == nil {
+ cv = []string{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col string
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PolicyNameType to be of type string, got %T instead", value)
+ }
+ col = jtv
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentRotationsList(v *[]types.RotationsListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.RotationsListEntry
+ if *v == nil {
+ cv = []types.RotationsListEntry{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.RotationsListEntry
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentRotationsListEntry(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentRotationsListEntry(v **types.RotationsListEntry, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.RotationsListEntry
+ if *v == nil {
+ sv = &types.RotationsListEntry{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "RotationDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.RotationDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "RotationType":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected RotationType to be of type string, got %T instead", value)
+ }
+ sv.RotationType = types.RotationType(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentSigningAlgorithmSpecList(v *[]types.SigningAlgorithmSpec, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.SigningAlgorithmSpec
+ if *v == nil {
+ cv = []types.SigningAlgorithmSpec{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.SigningAlgorithmSpec
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SigningAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ col = types.SigningAlgorithmSpec(jtv)
+ }
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.Tag
+ if *v == nil {
+ sv = &types.Tag{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "TagKey":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TagKeyType to be of type string, got %T instead", value)
+ }
+ sv.TagKey = ptr.String(jtv)
+ }
+
+ case "TagValue":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected TagValueType to be of type string, got %T instead", value)
+ }
+ sv.TagValue = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentTagException(v **types.TagException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.TagException
+ if *v == nil {
+ sv = &types.TagException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.([]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var cv []types.Tag
+ if *v == nil {
+ cv = []types.Tag{}
+ } else {
+ cv = *v
+ }
+
+ for _, value := range shape {
+ var col types.Tag
+ destAddr := &col
+ if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil {
+ return err
+ }
+ col = *destAddr
+ cv = append(cv, col)
+
+ }
+ *v = cv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentUnsupportedOperationException(v **types.UnsupportedOperationException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.UnsupportedOperationException
+ if *v == nil {
+ sv = &types.UnsupportedOperationException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksKeyAlreadyInUseException(v **types.XksKeyAlreadyInUseException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksKeyAlreadyInUseException
+ if *v == nil {
+ sv = &types.XksKeyAlreadyInUseException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksKeyConfigurationType(v **types.XksKeyConfigurationType, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksKeyConfigurationType
+ if *v == nil {
+ sv = &types.XksKeyConfigurationType{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Id":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected XksKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.Id = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksKeyInvalidConfigurationException(v **types.XksKeyInvalidConfigurationException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksKeyInvalidConfigurationException
+ if *v == nil {
+ sv = &types.XksKeyInvalidConfigurationException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksKeyNotFoundException(v **types.XksKeyNotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksKeyNotFoundException
+ if *v == nil {
+ sv = &types.XksKeyNotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyConfigurationType(v **types.XksProxyConfigurationType, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyConfigurationType
+ if *v == nil {
+ sv = &types.XksProxyConfigurationType{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "AccessKeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected XksProxyAuthenticationAccessKeyIdType to be of type string, got %T instead", value)
+ }
+ sv.AccessKeyId = ptr.String(jtv)
+ }
+
+ case "Connectivity":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected XksProxyConnectivityType to be of type string, got %T instead", value)
+ }
+ sv.Connectivity = types.XksProxyConnectivityType(jtv)
+ }
+
+ case "UriEndpoint":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected XksProxyUriEndpointType to be of type string, got %T instead", value)
+ }
+ sv.UriEndpoint = ptr.String(jtv)
+ }
+
+ case "UriPath":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected XksProxyUriPathType to be of type string, got %T instead", value)
+ }
+ sv.UriPath = ptr.String(jtv)
+ }
+
+ case "VpcEndpointServiceName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected XksProxyVpcEndpointServiceNameType to be of type string, got %T instead", value)
+ }
+ sv.VpcEndpointServiceName = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyIncorrectAuthenticationCredentialException(v **types.XksProxyIncorrectAuthenticationCredentialException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyIncorrectAuthenticationCredentialException
+ if *v == nil {
+ sv = &types.XksProxyIncorrectAuthenticationCredentialException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyInvalidConfigurationException(v **types.XksProxyInvalidConfigurationException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyInvalidConfigurationException
+ if *v == nil {
+ sv = &types.XksProxyInvalidConfigurationException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyInvalidResponseException(v **types.XksProxyInvalidResponseException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyInvalidResponseException
+ if *v == nil {
+ sv = &types.XksProxyInvalidResponseException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyUriEndpointInUseException(v **types.XksProxyUriEndpointInUseException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyUriEndpointInUseException
+ if *v == nil {
+ sv = &types.XksProxyUriEndpointInUseException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyUriInUseException(v **types.XksProxyUriInUseException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyUriInUseException
+ if *v == nil {
+ sv = &types.XksProxyUriInUseException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyUriUnreachableException(v **types.XksProxyUriUnreachableException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyUriUnreachableException
+ if *v == nil {
+ sv = &types.XksProxyUriUnreachableException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyVpcEndpointServiceInUseException(v **types.XksProxyVpcEndpointServiceInUseException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyVpcEndpointServiceInUseException
+ if *v == nil {
+ sv = &types.XksProxyVpcEndpointServiceInUseException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyVpcEndpointServiceInvalidConfigurationException(v **types.XksProxyVpcEndpointServiceInvalidConfigurationException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyVpcEndpointServiceInvalidConfigurationException
+ if *v == nil {
+ sv = &types.XksProxyVpcEndpointServiceInvalidConfigurationException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeDocumentXksProxyVpcEndpointServiceNotFoundException(v **types.XksProxyVpcEndpointServiceNotFoundException, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *types.XksProxyVpcEndpointServiceNotFoundException
+ if *v == nil {
+ sv = &types.XksProxyVpcEndpointServiceNotFoundException{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "message", "Message":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected ErrorMessageType to be of type string, got %T instead", value)
+ }
+ sv.Message = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentCancelKeyDeletionOutput(v **CancelKeyDeletionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CancelKeyDeletionOutput
+ if *v == nil {
+ sv = &CancelKeyDeletionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentConnectCustomKeyStoreOutput(v **ConnectCustomKeyStoreOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ConnectCustomKeyStoreOutput
+ if *v == nil {
+ sv = &ConnectCustomKeyStoreOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentCreateCustomKeyStoreOutput(v **CreateCustomKeyStoreOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateCustomKeyStoreOutput
+ if *v == nil {
+ sv = &CreateCustomKeyStoreOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CustomKeyStoreId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CustomKeyStoreIdType to be of type string, got %T instead", value)
+ }
+ sv.CustomKeyStoreId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentCreateGrantOutput(v **CreateGrantOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateGrantOutput
+ if *v == nil {
+ sv = &CreateGrantOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "GrantId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected GrantIdType to be of type string, got %T instead", value)
+ }
+ sv.GrantId = ptr.String(jtv)
+ }
+
+ case "GrantToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected GrantTokenType to be of type string, got %T instead", value)
+ }
+ sv.GrantToken = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentCreateKeyOutput(v **CreateKeyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *CreateKeyOutput
+ if *v == nil {
+ sv = &CreateKeyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyMetadata":
+ if err := awsAwsjson11_deserializeDocumentKeyMetadata(&sv.KeyMetadata, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentDecryptOutput(v **DecryptOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *DecryptOutput
+ if *v == nil {
+ sv = &DecryptOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CiphertextForRecipient":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.CiphertextForRecipient = dv
+ }
+
+ case "EncryptionAlgorithm":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EncryptionAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ sv.EncryptionAlgorithm = types.EncryptionAlgorithmSpec(jtv)
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "Plaintext":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PlaintextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode PlaintextType, %w", err)
+ }
+ sv.Plaintext = dv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentDeleteCustomKeyStoreOutput(v **DeleteCustomKeyStoreOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *DeleteCustomKeyStoreOutput
+ if *v == nil {
+ sv = &DeleteCustomKeyStoreOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentDeriveSharedSecretOutput(v **DeriveSharedSecretOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *DeriveSharedSecretOutput
+ if *v == nil {
+ sv = &DeriveSharedSecretOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CiphertextForRecipient":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.CiphertextForRecipient = dv
+ }
+
+ case "KeyAgreementAlgorithm":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyAgreementAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ sv.KeyAgreementAlgorithm = types.KeyAgreementAlgorithmSpec(jtv)
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "KeyOrigin":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected OriginType to be of type string, got %T instead", value)
+ }
+ sv.KeyOrigin = types.OriginType(jtv)
+ }
+
+ case "SharedSecret":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PlaintextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode PlaintextType, %w", err)
+ }
+ sv.SharedSecret = dv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentDescribeCustomKeyStoresOutput(v **DescribeCustomKeyStoresOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *DescribeCustomKeyStoresOutput
+ if *v == nil {
+ sv = &DescribeCustomKeyStoresOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CustomKeyStores":
+ if err := awsAwsjson11_deserializeDocumentCustomKeyStoresList(&sv.CustomKeyStores, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MarkerType to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "Truncated":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.Truncated = jtv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentDescribeKeyOutput(v **DescribeKeyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *DescribeKeyOutput
+ if *v == nil {
+ sv = &DescribeKeyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyMetadata":
+ if err := awsAwsjson11_deserializeDocumentKeyMetadata(&sv.KeyMetadata, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentDisconnectCustomKeyStoreOutput(v **DisconnectCustomKeyStoreOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *DisconnectCustomKeyStoreOutput
+ if *v == nil {
+ sv = &DisconnectCustomKeyStoreOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentEncryptOutput(v **EncryptOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *EncryptOutput
+ if *v == nil {
+ sv = &EncryptOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CiphertextBlob":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.CiphertextBlob = dv
+ }
+
+ case "EncryptionAlgorithm":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EncryptionAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ sv.EncryptionAlgorithm = types.EncryptionAlgorithmSpec(jtv)
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGenerateDataKeyOutput(v **GenerateDataKeyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GenerateDataKeyOutput
+ if *v == nil {
+ sv = &GenerateDataKeyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CiphertextBlob":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.CiphertextBlob = dv
+ }
+
+ case "CiphertextForRecipient":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.CiphertextForRecipient = dv
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "Plaintext":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PlaintextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode PlaintextType, %w", err)
+ }
+ sv.Plaintext = dv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGenerateDataKeyPairOutput(v **GenerateDataKeyPairOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GenerateDataKeyPairOutput
+ if *v == nil {
+ sv = &GenerateDataKeyPairOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CiphertextForRecipient":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.CiphertextForRecipient = dv
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "KeyPairSpec":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DataKeyPairSpec to be of type string, got %T instead", value)
+ }
+ sv.KeyPairSpec = types.DataKeyPairSpec(jtv)
+ }
+
+ case "PrivateKeyCiphertextBlob":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.PrivateKeyCiphertextBlob = dv
+ }
+
+ case "PrivateKeyPlaintext":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PlaintextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode PlaintextType, %w", err)
+ }
+ sv.PrivateKeyPlaintext = dv
+ }
+
+ case "PublicKey":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PublicKeyType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode PublicKeyType, %w", err)
+ }
+ sv.PublicKey = dv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGenerateDataKeyPairWithoutPlaintextOutput(v **GenerateDataKeyPairWithoutPlaintextOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GenerateDataKeyPairWithoutPlaintextOutput
+ if *v == nil {
+ sv = &GenerateDataKeyPairWithoutPlaintextOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "KeyPairSpec":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected DataKeyPairSpec to be of type string, got %T instead", value)
+ }
+ sv.KeyPairSpec = types.DataKeyPairSpec(jtv)
+ }
+
+ case "PrivateKeyCiphertextBlob":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.PrivateKeyCiphertextBlob = dv
+ }
+
+ case "PublicKey":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PublicKeyType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode PublicKeyType, %w", err)
+ }
+ sv.PublicKey = dv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGenerateDataKeyWithoutPlaintextOutput(v **GenerateDataKeyWithoutPlaintextOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GenerateDataKeyWithoutPlaintextOutput
+ if *v == nil {
+ sv = &GenerateDataKeyWithoutPlaintextOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CiphertextBlob":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.CiphertextBlob = dv
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGenerateMacOutput(v **GenerateMacOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GenerateMacOutput
+ if *v == nil {
+ sv = &GenerateMacOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "Mac":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.Mac = dv
+ }
+
+ case "MacAlgorithm":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MacAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ sv.MacAlgorithm = types.MacAlgorithmSpec(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGenerateRandomOutput(v **GenerateRandomOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GenerateRandomOutput
+ if *v == nil {
+ sv = &GenerateRandomOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CiphertextForRecipient":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.CiphertextForRecipient = dv
+ }
+
+ case "Plaintext":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PlaintextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode PlaintextType, %w", err)
+ }
+ sv.Plaintext = dv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGetKeyPolicyOutput(v **GetKeyPolicyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetKeyPolicyOutput
+ if *v == nil {
+ sv = &GetKeyPolicyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Policy":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PolicyType to be of type string, got %T instead", value)
+ }
+ sv.Policy = ptr.String(jtv)
+ }
+
+ case "PolicyName":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PolicyNameType to be of type string, got %T instead", value)
+ }
+ sv.PolicyName = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGetKeyRotationStatusOutput(v **GetKeyRotationStatusOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetKeyRotationStatusOutput
+ if *v == nil {
+ sv = &GetKeyRotationStatusOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "KeyRotationEnabled":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.KeyRotationEnabled = jtv
+ }
+
+ case "NextRotationDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.NextRotationDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "OnDemandRotationStartDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.OnDemandRotationStartDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "RotationPeriodInDays":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected RotationPeriodInDaysType to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.RotationPeriodInDays = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGetParametersForImportOutput(v **GetParametersForImportOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetParametersForImportOutput
+ if *v == nil {
+ sv = &GetParametersForImportOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ImportToken":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.ImportToken = dv
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "ParametersValidTo":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.ParametersValidTo = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "PublicKey":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PlaintextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode PlaintextType, %w", err)
+ }
+ sv.PublicKey = dv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentGetPublicKeyOutput(v **GetPublicKeyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *GetPublicKeyOutput
+ if *v == nil {
+ sv = &GetPublicKeyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CustomerMasterKeySpec":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CustomerMasterKeySpec to be of type string, got %T instead", value)
+ }
+ sv.CustomerMasterKeySpec = types.CustomerMasterKeySpec(jtv)
+ }
+
+ case "EncryptionAlgorithms":
+ if err := awsAwsjson11_deserializeDocumentEncryptionAlgorithmSpecList(&sv.EncryptionAlgorithms, value); err != nil {
+ return err
+ }
+
+ case "KeyAgreementAlgorithms":
+ if err := awsAwsjson11_deserializeDocumentKeyAgreementAlgorithmSpecList(&sv.KeyAgreementAlgorithms, value); err != nil {
+ return err
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "KeySpec":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeySpec to be of type string, got %T instead", value)
+ }
+ sv.KeySpec = types.KeySpec(jtv)
+ }
+
+ case "KeyUsage":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyUsageType to be of type string, got %T instead", value)
+ }
+ sv.KeyUsage = types.KeyUsageType(jtv)
+ }
+
+ case "PublicKey":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PublicKeyType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode PublicKeyType, %w", err)
+ }
+ sv.PublicKey = dv
+ }
+
+ case "SigningAlgorithms":
+ if err := awsAwsjson11_deserializeDocumentSigningAlgorithmSpecList(&sv.SigningAlgorithms, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentImportKeyMaterialOutput(v **ImportKeyMaterialOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ImportKeyMaterialOutput
+ if *v == nil {
+ sv = &ImportKeyMaterialOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentListAliasesOutput(v **ListAliasesOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListAliasesOutput
+ if *v == nil {
+ sv = &ListAliasesOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Aliases":
+ if err := awsAwsjson11_deserializeDocumentAliasList(&sv.Aliases, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MarkerType to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "Truncated":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.Truncated = jtv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentListGrantsOutput(v **ListGrantsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListGrantsOutput
+ if *v == nil {
+ sv = &ListGrantsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Grants":
+ if err := awsAwsjson11_deserializeDocumentGrantList(&sv.Grants, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MarkerType to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "Truncated":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.Truncated = jtv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentListKeyPoliciesOutput(v **ListKeyPoliciesOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListKeyPoliciesOutput
+ if *v == nil {
+ sv = &ListKeyPoliciesOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MarkerType to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "PolicyNames":
+ if err := awsAwsjson11_deserializeDocumentPolicyNameList(&sv.PolicyNames, value); err != nil {
+ return err
+ }
+
+ case "Truncated":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.Truncated = jtv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentListKeyRotationsOutput(v **ListKeyRotationsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListKeyRotationsOutput
+ if *v == nil {
+ sv = &ListKeyRotationsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MarkerType to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "Rotations":
+ if err := awsAwsjson11_deserializeDocumentRotationsList(&sv.Rotations, value); err != nil {
+ return err
+ }
+
+ case "Truncated":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.Truncated = jtv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentListKeysOutput(v **ListKeysOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListKeysOutput
+ if *v == nil {
+ sv = &ListKeysOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Keys":
+ if err := awsAwsjson11_deserializeDocumentKeyList(&sv.Keys, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MarkerType to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "Truncated":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.Truncated = jtv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentListResourceTagsOutput(v **ListResourceTagsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListResourceTagsOutput
+ if *v == nil {
+ sv = &ListResourceTagsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MarkerType to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "Tags":
+ if err := awsAwsjson11_deserializeDocumentTagList(&sv.Tags, value); err != nil {
+ return err
+ }
+
+ case "Truncated":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.Truncated = jtv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentListRetirableGrantsOutput(v **ListRetirableGrantsOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ListRetirableGrantsOutput
+ if *v == nil {
+ sv = &ListRetirableGrantsOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "Grants":
+ if err := awsAwsjson11_deserializeDocumentGrantList(&sv.Grants, value); err != nil {
+ return err
+ }
+
+ case "NextMarker":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MarkerType to be of type string, got %T instead", value)
+ }
+ sv.NextMarker = ptr.String(jtv)
+ }
+
+ case "Truncated":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.Truncated = jtv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentReEncryptOutput(v **ReEncryptOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ReEncryptOutput
+ if *v == nil {
+ sv = &ReEncryptOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "CiphertextBlob":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.CiphertextBlob = dv
+ }
+
+ case "DestinationEncryptionAlgorithm":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EncryptionAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ sv.DestinationEncryptionAlgorithm = types.EncryptionAlgorithmSpec(jtv)
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "SourceEncryptionAlgorithm":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected EncryptionAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ sv.SourceEncryptionAlgorithm = types.EncryptionAlgorithmSpec(jtv)
+ }
+
+ case "SourceKeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.SourceKeyId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentReplicateKeyOutput(v **ReplicateKeyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ReplicateKeyOutput
+ if *v == nil {
+ sv = &ReplicateKeyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "ReplicaKeyMetadata":
+ if err := awsAwsjson11_deserializeDocumentKeyMetadata(&sv.ReplicaKeyMetadata, value); err != nil {
+ return err
+ }
+
+ case "ReplicaPolicy":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected PolicyType to be of type string, got %T instead", value)
+ }
+ sv.ReplicaPolicy = ptr.String(jtv)
+ }
+
+ case "ReplicaTags":
+ if err := awsAwsjson11_deserializeDocumentTagList(&sv.ReplicaTags, value); err != nil {
+ return err
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentRotateKeyOnDemandOutput(v **RotateKeyOnDemandOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *RotateKeyOnDemandOutput
+ if *v == nil {
+ sv = &RotateKeyOnDemandOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentScheduleKeyDeletionOutput(v **ScheduleKeyDeletionOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *ScheduleKeyDeletionOutput
+ if *v == nil {
+ sv = &ScheduleKeyDeletionOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "DeletionDate":
+ if value != nil {
+ switch jtv := value.(type) {
+ case json.Number:
+ f64, err := jtv.Float64()
+ if err != nil {
+ return err
+ }
+ sv.DeletionDate = ptr.Time(smithytime.ParseEpochSeconds(f64))
+
+ default:
+ return fmt.Errorf("expected DateType to be a JSON Number, got %T instead", value)
+
+ }
+ }
+
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "KeyState":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyState to be of type string, got %T instead", value)
+ }
+ sv.KeyState = types.KeyState(jtv)
+ }
+
+ case "PendingWindowInDays":
+ if value != nil {
+ jtv, ok := value.(json.Number)
+ if !ok {
+ return fmt.Errorf("expected PendingWindowInDaysType to be json.Number, got %T instead", value)
+ }
+ i64, err := jtv.Int64()
+ if err != nil {
+ return err
+ }
+ sv.PendingWindowInDays = ptr.Int32(int32(i64))
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentSignOutput(v **SignOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *SignOutput
+ if *v == nil {
+ sv = &SignOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "Signature":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected CiphertextType to be []byte, got %T instead", value)
+ }
+ dv, err := base64.StdEncoding.DecodeString(jtv)
+ if err != nil {
+ return fmt.Errorf("failed to base64 decode CiphertextType, %w", err)
+ }
+ sv.Signature = dv
+ }
+
+ case "SigningAlgorithm":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SigningAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ sv.SigningAlgorithm = types.SigningAlgorithmSpec(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentUpdateCustomKeyStoreOutput(v **UpdateCustomKeyStoreOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *UpdateCustomKeyStoreOutput
+ if *v == nil {
+ sv = &UpdateCustomKeyStoreOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentVerifyMacOutput(v **VerifyMacOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *VerifyMacOutput
+ if *v == nil {
+ sv = &VerifyMacOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "MacAlgorithm":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected MacAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ sv.MacAlgorithm = types.MacAlgorithmSpec(jtv)
+ }
+
+ case "MacValid":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.MacValid = jtv
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+func awsAwsjson11_deserializeOpDocumentVerifyOutput(v **VerifyOutput, value interface{}) error {
+ if v == nil {
+ return fmt.Errorf("unexpected nil of type %T", v)
+ }
+ if value == nil {
+ return nil
+ }
+
+ shape, ok := value.(map[string]interface{})
+ if !ok {
+ return fmt.Errorf("unexpected JSON type %v", value)
+ }
+
+ var sv *VerifyOutput
+ if *v == nil {
+ sv = &VerifyOutput{}
+ } else {
+ sv = *v
+ }
+
+ for key, value := range shape {
+ switch key {
+ case "KeyId":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected KeyIdType to be of type string, got %T instead", value)
+ }
+ sv.KeyId = ptr.String(jtv)
+ }
+
+ case "SignatureValid":
+ if value != nil {
+ jtv, ok := value.(bool)
+ if !ok {
+ return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value)
+ }
+ sv.SignatureValid = jtv
+ }
+
+ case "SigningAlgorithm":
+ if value != nil {
+ jtv, ok := value.(string)
+ if !ok {
+ return fmt.Errorf("expected SigningAlgorithmSpec to be of type string, got %T instead", value)
+ }
+ sv.SigningAlgorithm = types.SigningAlgorithmSpec(jtv)
+ }
+
+ default:
+ _, _ = key, value
+
+ }
+ }
+ *v = sv
+ return nil
+}
+
+type protocolErrorInfo struct {
+ Type string `json:"__type"`
+ Message string
+ Code any // nonstandard for awsjson but some services do present the type here
+}
+
+func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) {
+ var errInfo protocolErrorInfo
+ if err := decoder.Decode(&errInfo); err != nil {
+ if err == io.EOF {
+ return errInfo, nil
+ }
+ return errInfo, err
+ }
+
+ return errInfo, nil
+}
+
+func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) {
+ if len(headerType) != 0 {
+ return headerType, true
+ } else if len(bodyInfo.Type) != 0 {
+ return bodyInfo.Type, true
+ } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 {
+ return code, true
+ }
+ return "", false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/doc.go
new file mode 100644
index 000000000..f989361a1
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/doc.go
@@ -0,0 +1,97 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+// Package kms provides the API client, operations, and parameter types for AWS
+// Key Management Service.
+//
+// # Key Management Service
+//
+// Key Management Service (KMS) is an encryption and key management web service.
+// This guide describes the KMS operations that you can call programmatically. For
+// general information about KMS, see the [Key Management Service Developer Guide].
+//
+// KMS has replaced the term customer master key (CMK) with KMS key and KMS key.
+// The concept has not changed. To prevent breaking changes, KMS is keeping some
+// variations of this term.
+//
+// Amazon Web Services provides SDKs that consist of libraries and sample code for
+// various programming languages and platforms (Java, Ruby, .Net, macOS, Android,
+// etc.). The SDKs provide a convenient way to create programmatic access to KMS
+// and other Amazon Web Services services. For example, the SDKs take care of tasks
+// such as signing requests (see below), managing errors, and retrying requests
+// automatically. For more information about the Amazon Web Services SDKs,
+// including how to download and install them, see [Tools for Amazon Web Services].
+//
+// We recommend that you use the Amazon Web Services SDKs to make programmatic API
+// calls to KMS.
+//
+// If you need to use FIPS 140-2 validated cryptographic modules when
+// communicating with Amazon Web Services, use the FIPS endpoint in your preferred
+// Amazon Web Services Region. For more information about the available FIPS
+// endpoints, see [Service endpoints]in the Key Management Service topic of the Amazon Web Services
+// General Reference.
+//
+// All KMS API calls must be signed and be transmitted using Transport Layer
+// Security (TLS). KMS recommends you always use the latest supported TLS version.
+// Clients must also support cipher suites with Perfect Forward Secrecy (PFS) such
+// as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral Diffie-Hellman
+// (ECDHE). Most modern systems such as Java 7 and later support these modes.
+//
+// # Signing Requests
+//
+// Requests must be signed using an access key ID and a secret access key. We
+// strongly recommend that you do not use your Amazon Web Services account root
+// access key ID and secret access key for everyday work. You can use the access
+// key ID and secret access key for an IAM user or you can use the Security Token
+// Service (STS) to generate temporary security credentials and use those to sign
+// requests.
+//
+// All KMS requests must be signed with [Signature Version 4].
+//
+// # Logging API Requests
+//
+// KMS supports CloudTrail, a service that logs Amazon Web Services API calls and
+// related events for your Amazon Web Services account and delivers them to an
+// Amazon S3 bucket that you specify. By using the information collected by
+// CloudTrail, you can determine what requests were made to KMS, who made the
+// request, when it was made, and so on. To learn more about CloudTrail, including
+// how to turn it on and find your log files, see the [CloudTrail User Guide].
+//
+// # Additional Resources
+//
+// For more information about credentials and request signing, see the following:
+//
+// [Amazon Web Services Security Credentials]
+// - - This topic provides general information about the types of credentials
+// used to access Amazon Web Services.
+//
+// [Temporary Security Credentials]
+// - - This section of the IAM User Guide describes how to create and use
+// temporary security credentials.
+//
+// [Signature Version 4 Signing Process]
+// - - This set of topics walks you through the process of signing a request
+// using an access key ID and a secret access key.
+//
+// # Commonly Used API Operations
+//
+// Of the API operations discussed in this guide, the following will prove the
+// most useful for most applications. You will likely perform operations other than
+// these, such as creating keys and assigning policies, by using the console.
+//
+// # Encrypt
+//
+// # Decrypt
+//
+// # GenerateDataKey
+//
+// # GenerateDataKeyWithoutPlaintext
+//
+// [Signature Version 4]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
+// [Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html
+// [Tools for Amazon Web Services]: http://aws.amazon.com/tools/
+// [Amazon Web Services Security Credentials]: https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html
+// [Key Management Service Developer Guide]: https://docs.aws.amazon.com/kms/latest/developerguide/
+// [Service endpoints]: https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region
+// [CloudTrail User Guide]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/
+// [Signature Version 4 Signing Process]: https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
+package kms
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/endpoints.go
new file mode 100644
index 000000000..0d9f88d68
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/endpoints.go
@@ -0,0 +1,537 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints"
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn"
+ internalendpoints "github.com/aws/aws-sdk-go-v2/service/kms/internal/endpoints"
+ smithyauth "github.com/aws/smithy-go/auth"
+ smithyendpoints "github.com/aws/smithy-go/endpoints"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/ptr"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+ "net/url"
+ "os"
+ "strings"
+)
+
+// EndpointResolverOptions is the service endpoint resolver options
+type EndpointResolverOptions = internalendpoints.Options
+
+// EndpointResolver interface for resolving service endpoints.
+type EndpointResolver interface {
+ ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+}
+
+var _ EndpointResolver = &internalendpoints.Resolver{}
+
+// NewDefaultEndpointResolver constructs a new service endpoint resolver
+func NewDefaultEndpointResolver() *internalendpoints.Resolver {
+ return internalendpoints.New()
+}
+
+// EndpointResolverFunc is a helper utility that wraps a function so it satisfies
+// the EndpointResolver interface. This is useful when you want to add additional
+// endpoint resolving logic, or stub out specific endpoints with custom values.
+type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error)
+
+func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return fn(region, options)
+}
+
+// EndpointResolverFromURL returns an EndpointResolver configured using the
+// provided endpoint url. By default, the resolved endpoint resolver uses the
+// client region as signing region, and the endpoint source is set to
+// EndpointSourceCustom.You can provide functional options to configure endpoint
+// values for the resolved endpoint.
+func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver {
+ e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom}
+ for _, fn := range optFns {
+ fn(&e)
+ }
+
+ return EndpointResolverFunc(
+ func(region string, options EndpointResolverOptions) (aws.Endpoint, error) {
+ if len(e.SigningRegion) == 0 {
+ e.SigningRegion = region
+ }
+ return e, nil
+ },
+ )
+}
+
+type ResolveEndpoint struct {
+ Resolver EndpointResolver
+ Options EndpointResolverOptions
+}
+
+func (*ResolveEndpoint) ID() string {
+ return "ResolveEndpoint"
+}
+
+func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleSerialize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.Resolver == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ eo := m.Options
+ eo.Logger = middleware.GetLogger(ctx)
+
+ var endpoint aws.Endpoint
+ endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo)
+ if err != nil {
+ nf := (&aws.EndpointNotFoundError{})
+ if errors.As(err, &nf) {
+ ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false)
+ return next.HandleSerialize(ctx, in)
+ }
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ req.URL, err = url.Parse(endpoint.URL)
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err)
+ }
+
+ if len(awsmiddleware.GetSigningName(ctx)) == 0 {
+ signingName := endpoint.SigningName
+ if len(signingName) == 0 {
+ signingName = "kms"
+ }
+ ctx = awsmiddleware.SetSigningName(ctx, signingName)
+ }
+ ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source)
+ ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable)
+ ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion)
+ ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID)
+ return next.HandleSerialize(ctx, in)
+}
+func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error {
+ return stack.Serialize.Insert(&ResolveEndpoint{
+ Resolver: o.EndpointResolver,
+ Options: o.EndpointOptions,
+ }, "OperationSerializer", middleware.Before)
+}
+
+func removeResolveEndpointMiddleware(stack *middleware.Stack) error {
+ _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID())
+ return err
+}
+
+type wrappedEndpointResolver struct {
+ awsResolver aws.EndpointResolverWithOptions
+}
+
+func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) {
+ return w.awsResolver.ResolveEndpoint(ServiceID, region, options)
+}
+
+type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error)
+
+func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) {
+ return a(service, region)
+}
+
+var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil)
+
+// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver.
+// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error,
+// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked
+// via its middleware.
+//
+// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated.
+func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver {
+ var resolver aws.EndpointResolverWithOptions
+
+ if awsResolverWithOptions != nil {
+ resolver = awsResolverWithOptions
+ } else if awsResolver != nil {
+ resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint)
+ }
+
+ return &wrappedEndpointResolver{
+ awsResolver: resolver,
+ }
+}
+
+func finalizeClientEndpointResolverOptions(options *Options) {
+ options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage()
+
+ if len(options.EndpointOptions.ResolvedRegion) == 0 {
+ const fipsInfix = "-fips-"
+ const fipsPrefix = "fips-"
+ const fipsSuffix = "-fips"
+
+ if strings.Contains(options.Region, fipsInfix) ||
+ strings.Contains(options.Region, fipsPrefix) ||
+ strings.Contains(options.Region, fipsSuffix) {
+ options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(
+ options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "")
+ options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled
+ }
+ }
+
+}
+
+func resolveEndpointResolverV2(options *Options) {
+ if options.EndpointResolverV2 == nil {
+ options.EndpointResolverV2 = NewDefaultEndpointResolverV2()
+ }
+}
+
+func resolveBaseEndpoint(cfg aws.Config, o *Options) {
+ if cfg.BaseEndpoint != nil {
+ o.BaseEndpoint = cfg.BaseEndpoint
+ }
+
+ _, g := os.LookupEnv("AWS_ENDPOINT_URL")
+ _, s := os.LookupEnv("AWS_ENDPOINT_URL_KMS")
+
+ if g && !s {
+ return
+ }
+
+ value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "KMS", cfg.ConfigSources)
+ if found && err == nil {
+ o.BaseEndpoint = &value
+ }
+}
+
+func bindRegion(region string) *string {
+ if region == "" {
+ return nil
+ }
+ return aws.String(endpoints.MapFIPSRegion(region))
+}
+
+// EndpointParameters provides the parameters that influence how endpoints are
+// resolved.
+type EndpointParameters struct {
+ // The AWS region used to dispatch the request.
+ //
+ // Parameter is
+ // required.
+ //
+ // AWS::Region
+ Region *string
+
+ // When true, use the dual-stack endpoint. If the configured endpoint does not
+ // support dual-stack, dispatching the request MAY return an error.
+ //
+ // Defaults to
+ // false if no value is provided.
+ //
+ // AWS::UseDualStack
+ UseDualStack *bool
+
+ // When true, send this request to the FIPS-compliant regional endpoint. If the
+ // configured endpoint does not have a FIPS compliant endpoint, dispatching the
+ // request will return an error.
+ //
+ // Defaults to false if no value is
+ // provided.
+ //
+ // AWS::UseFIPS
+ UseFIPS *bool
+
+ // Override the endpoint used to send this request
+ //
+ // Parameter is
+ // required.
+ //
+ // SDK::Endpoint
+ Endpoint *string
+}
+
+// ValidateRequired validates required parameters are set.
+func (p EndpointParameters) ValidateRequired() error {
+ if p.UseDualStack == nil {
+ return fmt.Errorf("parameter UseDualStack is required")
+ }
+
+ if p.UseFIPS == nil {
+ return fmt.Errorf("parameter UseFIPS is required")
+ }
+
+ return nil
+}
+
+// WithDefaults returns a shallow copy of EndpointParameterswith default values
+// applied to members where applicable.
+func (p EndpointParameters) WithDefaults() EndpointParameters {
+ if p.UseDualStack == nil {
+ p.UseDualStack = ptr.Bool(false)
+ }
+
+ if p.UseFIPS == nil {
+ p.UseFIPS = ptr.Bool(false)
+ }
+ return p
+}
+
+type stringSlice []string
+
+func (s stringSlice) Get(i int) *string {
+ if i < 0 || i >= len(s) {
+ return nil
+ }
+
+ v := s[i]
+ return &v
+}
+
+// EndpointResolverV2 provides the interface for resolving service endpoints.
+type EndpointResolverV2 interface {
+ // ResolveEndpoint attempts to resolve the endpoint with the provided options,
+ // returning the endpoint if found. Otherwise an error is returned.
+ ResolveEndpoint(ctx context.Context, params EndpointParameters) (
+ smithyendpoints.Endpoint, error,
+ )
+}
+
+// resolver provides the implementation for resolving endpoints.
+type resolver struct{}
+
+func NewDefaultEndpointResolverV2() EndpointResolverV2 {
+ return &resolver{}
+}
+
+// ResolveEndpoint attempts to resolve the endpoint with the provided options,
+// returning the endpoint if found. Otherwise an error is returned.
+func (r *resolver) ResolveEndpoint(
+ ctx context.Context, params EndpointParameters,
+) (
+ endpoint smithyendpoints.Endpoint, err error,
+) {
+ params = params.WithDefaults()
+ if err = params.ValidateRequired(); err != nil {
+ return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err)
+ }
+ _UseDualStack := *params.UseDualStack
+ _UseFIPS := *params.UseFIPS
+
+ if exprVal := params.Endpoint; exprVal != nil {
+ _Endpoint := *exprVal
+ _ = _Endpoint
+ if _UseFIPS == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported")
+ }
+ if _UseDualStack == true {
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported")
+ }
+ uriString := _Endpoint
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ if exprVal := params.Region; exprVal != nil {
+ _Region := *exprVal
+ _ = _Region
+ if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil {
+ _PartitionResult := *exprVal
+ _ = _PartitionResult
+ if _UseFIPS == true {
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsFIPS {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://kms-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both")
+ }
+ }
+ if _UseFIPS == true {
+ if _PartitionResult.SupportsFIPS == true {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://kms-fips.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS")
+ }
+ if _UseDualStack == true {
+ if true == _PartitionResult.SupportsDualStack {
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://kms.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DualStackDnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack")
+ }
+ uriString := func() string {
+ var out strings.Builder
+ out.WriteString("https://kms.")
+ out.WriteString(_Region)
+ out.WriteString(".")
+ out.WriteString(_PartitionResult.DnsSuffix)
+ return out.String()
+ }()
+
+ uri, err := url.Parse(uriString)
+ if err != nil {
+ return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString)
+ }
+
+ return smithyendpoints.Endpoint{
+ URI: *uri,
+ Headers: http.Header{},
+ }, nil
+ }
+ return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.")
+ }
+ return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region")
+}
+
+type endpointParamsBinder interface {
+ bindEndpointParams(*EndpointParameters)
+}
+
+func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters {
+ params := &EndpointParameters{}
+
+ params.Region = bindRegion(options.Region)
+ params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled)
+ params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled)
+ params.Endpoint = options.BaseEndpoint
+
+ if b, ok := input.(endpointParamsBinder); ok {
+ b.bindEndpointParams(params)
+ }
+
+ return params
+}
+
+type resolveEndpointV2Middleware struct {
+ options Options
+}
+
+func (*resolveEndpointV2Middleware) ID() string {
+ return "ResolveEndpointV2"
+}
+
+func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) (
+ out middleware.FinalizeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "ResolveEndpoint")
+ defer span.End()
+
+ if awsmiddleware.GetRequiresLegacyEndpoints(ctx) {
+ return next.HandleFinalize(ctx, in)
+ }
+
+ req, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown transport type %T", in.Request)
+ }
+
+ if m.options.EndpointResolverV2 == nil {
+ return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil")
+ }
+
+ params := bindEndpointParams(ctx, getOperationInput(ctx), m.options)
+ endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration",
+ func() (smithyendpoints.Endpoint, error) {
+ return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params)
+ })
+ if err != nil {
+ return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err)
+ }
+
+ span.SetProperty("client.call.resolved_endpoint", endpt.URI.String())
+
+ if endpt.URI.RawPath == "" && req.URL.RawPath != "" {
+ endpt.URI.RawPath = endpt.URI.Path
+ }
+ req.URL.Scheme = endpt.URI.Scheme
+ req.URL.Host = endpt.URI.Host
+ req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path)
+ req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath)
+ for k := range endpt.Headers {
+ req.Header.Set(k, endpt.Headers.Get(k))
+ }
+
+ rscheme := getResolvedAuthScheme(ctx)
+ if rscheme == nil {
+ return out, metadata, fmt.Errorf("no resolved auth scheme")
+ }
+
+ opts, _ := smithyauth.GetAuthOptions(&endpt.Properties)
+ for _, o := range opts {
+ rscheme.SignerProperties.SetAll(&o.SignerProperties)
+ }
+
+ span.End()
+ return next.HandleFinalize(ctx, in)
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/generated.json
new file mode 100644
index 000000000..301d9467a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/generated.json
@@ -0,0 +1,85 @@
+{
+ "dependencies": {
+ "github.com/aws/aws-sdk-go-v2": "v1.4.0",
+ "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000",
+ "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000",
+ "github.com/aws/smithy-go": "v1.4.0"
+ },
+ "files": [
+ "api_client.go",
+ "api_client_test.go",
+ "api_op_CancelKeyDeletion.go",
+ "api_op_ConnectCustomKeyStore.go",
+ "api_op_CreateAlias.go",
+ "api_op_CreateCustomKeyStore.go",
+ "api_op_CreateGrant.go",
+ "api_op_CreateKey.go",
+ "api_op_Decrypt.go",
+ "api_op_DeleteAlias.go",
+ "api_op_DeleteCustomKeyStore.go",
+ "api_op_DeleteImportedKeyMaterial.go",
+ "api_op_DeriveSharedSecret.go",
+ "api_op_DescribeCustomKeyStores.go",
+ "api_op_DescribeKey.go",
+ "api_op_DisableKey.go",
+ "api_op_DisableKeyRotation.go",
+ "api_op_DisconnectCustomKeyStore.go",
+ "api_op_EnableKey.go",
+ "api_op_EnableKeyRotation.go",
+ "api_op_Encrypt.go",
+ "api_op_GenerateDataKey.go",
+ "api_op_GenerateDataKeyPair.go",
+ "api_op_GenerateDataKeyPairWithoutPlaintext.go",
+ "api_op_GenerateDataKeyWithoutPlaintext.go",
+ "api_op_GenerateMac.go",
+ "api_op_GenerateRandom.go",
+ "api_op_GetKeyPolicy.go",
+ "api_op_GetKeyRotationStatus.go",
+ "api_op_GetParametersForImport.go",
+ "api_op_GetPublicKey.go",
+ "api_op_ImportKeyMaterial.go",
+ "api_op_ListAliases.go",
+ "api_op_ListGrants.go",
+ "api_op_ListKeyPolicies.go",
+ "api_op_ListKeyRotations.go",
+ "api_op_ListKeys.go",
+ "api_op_ListResourceTags.go",
+ "api_op_ListRetirableGrants.go",
+ "api_op_PutKeyPolicy.go",
+ "api_op_ReEncrypt.go",
+ "api_op_ReplicateKey.go",
+ "api_op_RetireGrant.go",
+ "api_op_RevokeGrant.go",
+ "api_op_RotateKeyOnDemand.go",
+ "api_op_ScheduleKeyDeletion.go",
+ "api_op_Sign.go",
+ "api_op_TagResource.go",
+ "api_op_UntagResource.go",
+ "api_op_UpdateAlias.go",
+ "api_op_UpdateCustomKeyStore.go",
+ "api_op_UpdateKeyDescription.go",
+ "api_op_UpdatePrimaryRegion.go",
+ "api_op_Verify.go",
+ "api_op_VerifyMac.go",
+ "auth.go",
+ "deserializers.go",
+ "doc.go",
+ "endpoints.go",
+ "endpoints_config_test.go",
+ "endpoints_test.go",
+ "generated.json",
+ "internal/endpoints/endpoints.go",
+ "internal/endpoints/endpoints_test.go",
+ "options.go",
+ "protocol_test.go",
+ "serializers.go",
+ "snapshot_test.go",
+ "types/enums.go",
+ "types/errors.go",
+ "types/types.go",
+ "validators.go"
+ ],
+ "go": "1.15",
+ "module": "github.com/aws/aws-sdk-go-v2/service/kms",
+ "unstable": false
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go_module_metadata.go
new file mode 100644
index 000000000..b71377eae
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/go_module_metadata.go
@@ -0,0 +1,6 @@
+// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT.
+
+package kms
+
+// goModuleVersion is the tagged release for this module
+const goModuleVersion = "1.37.8"
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/internal/endpoints/endpoints.go
new file mode 100644
index 000000000..0c6bbd587
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/internal/endpoints/endpoints.go
@@ -0,0 +1,978 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package endpoints
+
+import (
+ "github.com/aws/aws-sdk-go-v2/aws"
+ endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2"
+ "github.com/aws/smithy-go/logging"
+ "regexp"
+)
+
+// Options is the endpoint resolver configuration options
+type Options struct {
+ // Logger is a logging implementation that log events should be sent to.
+ Logger logging.Logger
+
+ // LogDeprecated indicates that deprecated endpoints should be logged to the
+ // provided logger.
+ LogDeprecated bool
+
+ // ResolvedRegion is used to override the region to be resolved, rather then the
+ // using the value passed to the ResolveEndpoint method. This value is used by the
+ // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative
+ // name. You must not set this value directly in your application.
+ ResolvedRegion string
+
+ // DisableHTTPS informs the resolver to return an endpoint that does not use the
+ // HTTPS scheme.
+ DisableHTTPS bool
+
+ // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint.
+ UseDualStackEndpoint aws.DualStackEndpointState
+
+ // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
+ UseFIPSEndpoint aws.FIPSEndpointState
+}
+
+func (o Options) GetResolvedRegion() string {
+ return o.ResolvedRegion
+}
+
+func (o Options) GetDisableHTTPS() bool {
+ return o.DisableHTTPS
+}
+
+func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState {
+ return o.UseDualStackEndpoint
+}
+
+func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState {
+ return o.UseFIPSEndpoint
+}
+
+func transformToSharedOptions(options Options) endpoints.Options {
+ return endpoints.Options{
+ Logger: options.Logger,
+ LogDeprecated: options.LogDeprecated,
+ ResolvedRegion: options.ResolvedRegion,
+ DisableHTTPS: options.DisableHTTPS,
+ UseDualStackEndpoint: options.UseDualStackEndpoint,
+ UseFIPSEndpoint: options.UseFIPSEndpoint,
+ }
+}
+
+// Resolver KMS endpoint resolver
+type Resolver struct {
+ partitions endpoints.Partitions
+}
+
+// ResolveEndpoint resolves the service endpoint for the given region and options
+func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) {
+ if len(region) == 0 {
+ return endpoint, &aws.MissingRegionError{}
+ }
+
+ opt := transformToSharedOptions(options)
+ return r.partitions.ResolveEndpoint(region, opt)
+}
+
+// New returns a new Resolver
+func New() *Resolver {
+ return &Resolver{
+ partitions: defaultPartitions,
+ }
+}
+
+var partitionRegexp = struct {
+ Aws *regexp.Regexp
+ AwsCn *regexp.Regexp
+ AwsIso *regexp.Regexp
+ AwsIsoB *regexp.Regexp
+ AwsIsoE *regexp.Regexp
+ AwsIsoF *regexp.Regexp
+ AwsUsGov *regexp.Regexp
+}{
+
+ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"),
+ AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"),
+ AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"),
+ AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"),
+ AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"),
+ AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"),
+ AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"),
+}
+
+var defaultPartitions = endpoints.Partitions{
+ {
+ ID: "aws",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "kms.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "kms-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "kms.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.Aws,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "ProdFips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-central-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-central-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "af-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "af-south-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.af-south-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "af-south-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.af-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "af-south-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-east-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-east-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-northeast-3-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-northeast-3",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-south-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-south-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-south-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-south-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-south-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-south-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-south-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-south-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-3",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-southeast-3.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-3-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-southeast-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-3",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-4",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-4",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-southeast-4.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-4-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-southeast-4.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-4",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-5",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ap-southeast-5",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ap-southeast-5.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ap-southeast-5-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ap-southeast-5.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ap-southeast-5",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ca-central-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ca-central-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ca-central-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ca-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ca-central-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "ca-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.ca-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "ca-west-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.ca-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "ca-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.eu-central-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-central-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-central-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.eu-central-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-central-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-central-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-central-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-north-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.eu-north-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-north-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-north-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-north-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-south-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.eu-south-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-south-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-south-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.eu-south-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-south-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-south-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-south-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.eu-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.eu-west-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "eu-west-3",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.eu-west-3.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "eu-west-3-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.eu-west-3.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "eu-west-3",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "il-central-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.il-central-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "il-central-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.il-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "il-central-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-central-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.me-central-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "me-central-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.me-central-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "me-central-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "me-south-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.me-south-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "me-south-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.me-south-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "me-south-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "sa-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.sa-east-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "sa-east-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.sa-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "sa-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.us-east-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-east-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.us-east-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-east-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-east-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-east-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.us-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-west-2",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.us-west-2.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-west-2-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-west-2.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-west-2",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "kms.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "kms-fips.{region}.api.amazonwebservices.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "kms.{region}.amazonaws.com.cn",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsCn,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "cn-north-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "cn-northwest-1",
+ }: endpoints.Endpoint{},
+ },
+ },
+ {
+ ID: "aws-iso",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "kms.{region}.c2s.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIso,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "ProdFips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-iso-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-iso-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
+ },
+ endpoints.EndpointKey{
+ Region: "us-iso-east-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-iso-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-iso-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-iso-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
+ },
+ endpoints.EndpointKey{
+ Region: "us-iso-west-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-iso-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ },
+ },
+ {
+ ID: "aws-iso-b",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "kms.{region}.sc2s.sgov.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoB,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "ProdFips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-isob-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-isob-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
+ },
+ endpoints.EndpointKey{
+ Region: "us-isob-east-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-isob-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ },
+ },
+ {
+ ID: "aws-iso-e",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "kms.{region}.cloud.adc-e.uk",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoE,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-iso-f",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "kms.{region}.csp.hci.ic.gov",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsIsoF,
+ IsRegionalized: true,
+ },
+ {
+ ID: "aws-us-gov",
+ Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{
+ {
+ Variant: endpoints.DualStackVariant,
+ }: {
+ Hostname: "kms.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: endpoints.FIPSVariant | endpoints.DualStackVariant,
+ }: {
+ Hostname: "kms-fips.{region}.api.aws",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ {
+ Variant: 0,
+ }: {
+ Hostname: "kms.{region}.amazonaws.com",
+ Protocols: []string{"https"},
+ SignatureVersions: []string{"v4"},
+ },
+ },
+ RegionRegex: partitionRegexp.AwsUsGov,
+ IsRegionalized: true,
+ Endpoints: endpoints.Endpoints{
+ endpoints.EndpointKey{
+ Region: "ProdFips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-east-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-east-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ }: endpoints.Endpoint{},
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1",
+ Variant: endpoints.FIPSVariant,
+ }: {
+ Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
+ },
+ endpoints.EndpointKey{
+ Region: "us-gov-west-1-fips",
+ }: endpoints.Endpoint{
+ Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
+ CredentialScope: endpoints.CredentialScope{
+ Region: "us-gov-west-1",
+ },
+ Deprecated: aws.TrueTernary,
+ },
+ },
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/options.go
new file mode 100644
index 000000000..e7f5513b4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/options.go
@@ -0,0 +1,232 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "github.com/aws/aws-sdk-go-v2/aws"
+ awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
+ internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy"
+ smithyauth "github.com/aws/smithy-go/auth"
+ "github.com/aws/smithy-go/logging"
+ "github.com/aws/smithy-go/metrics"
+ "github.com/aws/smithy-go/middleware"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "net/http"
+)
+
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+type Options struct {
+ // Set of options to modify how an operation is invoked. These apply to all
+ // operations invoked for this client. Use functional options on operation call to
+ // modify this list for per operation behavior.
+ APIOptions []func(*middleware.Stack) error
+
+ // The optional application specific identifier appended to the User-Agent header.
+ AppID string
+
+ // This endpoint will be given as input to an EndpointResolverV2. It is used for
+ // providing a custom base endpoint that is subject to modifications by the
+ // processing EndpointResolverV2.
+ BaseEndpoint *string
+
+ // Configures the events that will be sent to the configured logger.
+ ClientLogMode aws.ClientLogMode
+
+ // The credentials object to use when signing requests.
+ Credentials aws.CredentialsProvider
+
+ // The configuration DefaultsMode that the SDK should use when constructing the
+ // clients initial default settings.
+ DefaultsMode aws.DefaultsMode
+
+ // The endpoint options to be used when attempting to resolve an endpoint.
+ EndpointOptions EndpointResolverOptions
+
+ // The service endpoint resolver.
+ //
+ // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a
+ // value for this field will likely prevent you from using any endpoint-related
+ // service features released after the introduction of EndpointResolverV2 and
+ // BaseEndpoint.
+ //
+ // To migrate an EndpointResolver implementation that uses a custom endpoint, set
+ // the client option BaseEndpoint instead.
+ EndpointResolver EndpointResolver
+
+ // Resolves the endpoint used for a particular service operation. This should be
+ // used over the deprecated EndpointResolver.
+ EndpointResolverV2 EndpointResolverV2
+
+ // Signature Version 4 (SigV4) Signer
+ HTTPSignerV4 HTTPSignerV4
+
+ // The logger writer interface to write logging messages to.
+ Logger logging.Logger
+
+ // The client meter provider.
+ MeterProvider metrics.MeterProvider
+
+ // The region to send requests to. (Required)
+ Region string
+
+ // RetryMaxAttempts specifies the maximum number attempts an API client will call
+ // an operation that fails with a retryable error. A value of 0 is ignored, and
+ // will not be used to configure the API client created default retryer, or modify
+ // per operation call's retry max attempts.
+ //
+ // If specified in an operation call's functional options with a value that is
+ // different than the constructed client's Options, the Client's Retryer will be
+ // wrapped to use the operation's specific RetryMaxAttempts value.
+ RetryMaxAttempts int
+
+ // RetryMode specifies the retry mode the API client will be created with, if
+ // Retryer option is not also specified.
+ //
+ // When creating a new API Clients this member will only be used if the Retryer
+ // Options member is nil. This value will be ignored if Retryer is not nil.
+ //
+ // Currently does not support per operation call overrides, may in the future.
+ RetryMode aws.RetryMode
+
+ // Retryer guides how HTTP requests should be retried in case of recoverable
+ // failures. When nil the API client will use a default retryer. The kind of
+ // default retry created by the API client can be changed with the RetryMode
+ // option.
+ Retryer aws.Retryer
+
+ // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set
+ // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You
+ // should not populate this structure programmatically, or rely on the values here
+ // within your applications.
+ RuntimeEnvironment aws.RuntimeEnvironment
+
+ // The client tracer provider.
+ TracerProvider tracing.TracerProvider
+
+ // The initial DefaultsMode used when the client options were constructed. If the
+ // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved
+ // value was at that point in time.
+ //
+ // Currently does not support per operation call overrides, may in the future.
+ resolvedDefaultsMode aws.DefaultsMode
+
+ // The HTTP client to invoke API calls with. Defaults to client's default HTTP
+ // implementation if nil.
+ HTTPClient HTTPClient
+
+ // The auth scheme resolver which determines how to authenticate for each
+ // operation.
+ AuthSchemeResolver AuthSchemeResolver
+
+ // The list of auth schemes supported by the client.
+ AuthSchemes []smithyhttp.AuthScheme
+}
+
+// Copy creates a clone where the APIOptions list is deep copied.
+func (o Options) Copy() Options {
+ to := o
+ to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions))
+ copy(to.APIOptions, o.APIOptions)
+
+ return to
+}
+
+func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver {
+ if schemeID == "aws.auth#sigv4" {
+ return getSigV4IdentityResolver(o)
+ }
+ if schemeID == "smithy.api#noAuth" {
+ return &smithyauth.AnonymousIdentityResolver{}
+ }
+ return nil
+}
+
+// WithAPIOptions returns a functional option for setting the Client's APIOptions
+// option.
+func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) {
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, optFns...)
+ }
+}
+
+// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for
+// this field will likely prevent you from using any endpoint-related service
+// features released after the introduction of EndpointResolverV2 and BaseEndpoint.
+//
+// To migrate an EndpointResolver implementation that uses a custom endpoint, set
+// the client option BaseEndpoint instead.
+func WithEndpointResolver(v EndpointResolver) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolver = v
+ }
+}
+
+// WithEndpointResolverV2 returns a functional option for setting the Client's
+// EndpointResolverV2 option.
+func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) {
+ return func(o *Options) {
+ o.EndpointResolverV2 = v
+ }
+}
+
+func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver {
+ if o.Credentials != nil {
+ return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials}
+ }
+ return nil
+}
+
+// WithSigV4SigningName applies an override to the authentication workflow to
+// use the given signing name for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing name from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningName(name string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+// WithSigV4SigningRegion applies an override to the authentication workflow to
+// use the given signing region for SigV4-authenticated operations.
+//
+// This is an advanced setting. The value here is FINAL, taking precedence over
+// the resolved signing region from both auth scheme resolution and endpoint
+// resolution.
+func WithSigV4SigningRegion(region string) func(*Options) {
+ fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+ ) {
+ return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in)
+ }
+ return func(o *Options) {
+ o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error {
+ return s.Initialize.Add(
+ middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn),
+ middleware.Before,
+ )
+ })
+ }
+}
+
+func ignoreAnonymousAuth(options *Options) {
+ if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) {
+ options.Credentials = nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/serializers.go
new file mode 100644
index 000000000..1f9dabb9c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/serializers.go
@@ -0,0 +1,4827 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/encoding/httpbinding"
+ smithyjson "github.com/aws/smithy-go/encoding/json"
+ "github.com/aws/smithy-go/middleware"
+ smithytime "github.com/aws/smithy-go/time"
+ "github.com/aws/smithy-go/tracing"
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+ "path"
+)
+
+type awsAwsjson11_serializeOpCancelKeyDeletion struct {
+}
+
+func (*awsAwsjson11_serializeOpCancelKeyDeletion) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpCancelKeyDeletion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CancelKeyDeletionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.CancelKeyDeletion")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentCancelKeyDeletionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpConnectCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_serializeOpConnectCustomKeyStore) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpConnectCustomKeyStore) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ConnectCustomKeyStoreInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ConnectCustomKeyStore")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentConnectCustomKeyStoreInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpCreateAlias struct {
+}
+
+func (*awsAwsjson11_serializeOpCreateAlias) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpCreateAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateAliasInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.CreateAlias")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentCreateAliasInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpCreateCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_serializeOpCreateCustomKeyStore) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpCreateCustomKeyStore) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateCustomKeyStoreInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.CreateCustomKeyStore")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentCreateCustomKeyStoreInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpCreateGrant struct {
+}
+
+func (*awsAwsjson11_serializeOpCreateGrant) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpCreateGrant) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateGrantInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.CreateGrant")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentCreateGrantInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpCreateKey struct {
+}
+
+func (*awsAwsjson11_serializeOpCreateKey) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpCreateKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*CreateKeyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.CreateKey")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentCreateKeyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDecrypt struct {
+}
+
+func (*awsAwsjson11_serializeOpDecrypt) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDecrypt) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DecryptInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.Decrypt")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDecryptInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDeleteAlias struct {
+}
+
+func (*awsAwsjson11_serializeOpDeleteAlias) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDeleteAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteAliasInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.DeleteAlias")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDeleteAliasInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDeleteCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_serializeOpDeleteCustomKeyStore) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDeleteCustomKeyStore) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteCustomKeyStoreInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.DeleteCustomKeyStore")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDeleteCustomKeyStoreInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDeleteImportedKeyMaterial struct {
+}
+
+func (*awsAwsjson11_serializeOpDeleteImportedKeyMaterial) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDeleteImportedKeyMaterial) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeleteImportedKeyMaterialInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.DeleteImportedKeyMaterial")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDeleteImportedKeyMaterialInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDeriveSharedSecret struct {
+}
+
+func (*awsAwsjson11_serializeOpDeriveSharedSecret) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDeriveSharedSecret) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DeriveSharedSecretInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.DeriveSharedSecret")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDeriveSharedSecretInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDescribeCustomKeyStores struct {
+}
+
+func (*awsAwsjson11_serializeOpDescribeCustomKeyStores) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDescribeCustomKeyStores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DescribeCustomKeyStoresInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.DescribeCustomKeyStores")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDescribeCustomKeyStoresInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDescribeKey struct {
+}
+
+func (*awsAwsjson11_serializeOpDescribeKey) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDescribeKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DescribeKeyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.DescribeKey")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDescribeKeyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDisableKey struct {
+}
+
+func (*awsAwsjson11_serializeOpDisableKey) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDisableKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DisableKeyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.DisableKey")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDisableKeyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDisableKeyRotation struct {
+}
+
+func (*awsAwsjson11_serializeOpDisableKeyRotation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDisableKeyRotation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DisableKeyRotationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.DisableKeyRotation")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDisableKeyRotationInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpDisconnectCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_serializeOpDisconnectCustomKeyStore) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpDisconnectCustomKeyStore) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*DisconnectCustomKeyStoreInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.DisconnectCustomKeyStore")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentDisconnectCustomKeyStoreInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpEnableKey struct {
+}
+
+func (*awsAwsjson11_serializeOpEnableKey) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpEnableKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*EnableKeyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.EnableKey")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentEnableKeyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpEnableKeyRotation struct {
+}
+
+func (*awsAwsjson11_serializeOpEnableKeyRotation) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpEnableKeyRotation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*EnableKeyRotationInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.EnableKeyRotation")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentEnableKeyRotationInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpEncrypt struct {
+}
+
+func (*awsAwsjson11_serializeOpEncrypt) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpEncrypt) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*EncryptInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.Encrypt")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentEncryptInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGenerateDataKey struct {
+}
+
+func (*awsAwsjson11_serializeOpGenerateDataKey) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGenerateDataKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GenerateDataKeyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GenerateDataKey")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGenerateDataKeyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGenerateDataKeyPair struct {
+}
+
+func (*awsAwsjson11_serializeOpGenerateDataKeyPair) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGenerateDataKeyPair) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GenerateDataKeyPairInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GenerateDataKeyPair")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGenerateDataKeyPairInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGenerateDataKeyPairWithoutPlaintext struct {
+}
+
+func (*awsAwsjson11_serializeOpGenerateDataKeyPairWithoutPlaintext) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGenerateDataKeyPairWithoutPlaintext) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GenerateDataKeyPairWithoutPlaintextInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GenerateDataKeyPairWithoutPlaintext")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGenerateDataKeyPairWithoutPlaintextInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGenerateDataKeyWithoutPlaintext struct {
+}
+
+func (*awsAwsjson11_serializeOpGenerateDataKeyWithoutPlaintext) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGenerateDataKeyWithoutPlaintext) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GenerateDataKeyWithoutPlaintextInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GenerateDataKeyWithoutPlaintext")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGenerateDataKeyWithoutPlaintextInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGenerateMac struct {
+}
+
+func (*awsAwsjson11_serializeOpGenerateMac) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGenerateMac) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GenerateMacInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GenerateMac")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGenerateMacInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGenerateRandom struct {
+}
+
+func (*awsAwsjson11_serializeOpGenerateRandom) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGenerateRandom) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GenerateRandomInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GenerateRandom")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGenerateRandomInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGetKeyPolicy struct {
+}
+
+func (*awsAwsjson11_serializeOpGetKeyPolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGetKeyPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetKeyPolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GetKeyPolicy")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGetKeyPolicyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGetKeyRotationStatus struct {
+}
+
+func (*awsAwsjson11_serializeOpGetKeyRotationStatus) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGetKeyRotationStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetKeyRotationStatusInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GetKeyRotationStatus")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGetKeyRotationStatusInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGetParametersForImport struct {
+}
+
+func (*awsAwsjson11_serializeOpGetParametersForImport) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGetParametersForImport) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetParametersForImportInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GetParametersForImport")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGetParametersForImportInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpGetPublicKey struct {
+}
+
+func (*awsAwsjson11_serializeOpGetPublicKey) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpGetPublicKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*GetPublicKeyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.GetPublicKey")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentGetPublicKeyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpImportKeyMaterial struct {
+}
+
+func (*awsAwsjson11_serializeOpImportKeyMaterial) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpImportKeyMaterial) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ImportKeyMaterialInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ImportKeyMaterial")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentImportKeyMaterialInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpListAliases struct {
+}
+
+func (*awsAwsjson11_serializeOpListAliases) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpListAliases) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListAliasesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ListAliases")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentListAliasesInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpListGrants struct {
+}
+
+func (*awsAwsjson11_serializeOpListGrants) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpListGrants) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListGrantsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ListGrants")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentListGrantsInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpListKeyPolicies struct {
+}
+
+func (*awsAwsjson11_serializeOpListKeyPolicies) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpListKeyPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListKeyPoliciesInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ListKeyPolicies")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentListKeyPoliciesInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpListKeyRotations struct {
+}
+
+func (*awsAwsjson11_serializeOpListKeyRotations) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpListKeyRotations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListKeyRotationsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ListKeyRotations")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentListKeyRotationsInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpListKeys struct {
+}
+
+func (*awsAwsjson11_serializeOpListKeys) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpListKeys) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListKeysInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ListKeys")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentListKeysInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpListResourceTags struct {
+}
+
+func (*awsAwsjson11_serializeOpListResourceTags) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpListResourceTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListResourceTagsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ListResourceTags")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentListResourceTagsInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpListRetirableGrants struct {
+}
+
+func (*awsAwsjson11_serializeOpListRetirableGrants) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpListRetirableGrants) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ListRetirableGrantsInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ListRetirableGrants")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentListRetirableGrantsInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpPutKeyPolicy struct {
+}
+
+func (*awsAwsjson11_serializeOpPutKeyPolicy) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpPutKeyPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*PutKeyPolicyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.PutKeyPolicy")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentPutKeyPolicyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpReEncrypt struct {
+}
+
+func (*awsAwsjson11_serializeOpReEncrypt) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpReEncrypt) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ReEncryptInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ReEncrypt")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentReEncryptInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpReplicateKey struct {
+}
+
+func (*awsAwsjson11_serializeOpReplicateKey) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpReplicateKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ReplicateKeyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ReplicateKey")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentReplicateKeyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpRetireGrant struct {
+}
+
+func (*awsAwsjson11_serializeOpRetireGrant) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpRetireGrant) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*RetireGrantInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.RetireGrant")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentRetireGrantInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpRevokeGrant struct {
+}
+
+func (*awsAwsjson11_serializeOpRevokeGrant) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpRevokeGrant) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*RevokeGrantInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.RevokeGrant")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentRevokeGrantInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpRotateKeyOnDemand struct {
+}
+
+func (*awsAwsjson11_serializeOpRotateKeyOnDemand) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpRotateKeyOnDemand) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*RotateKeyOnDemandInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.RotateKeyOnDemand")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentRotateKeyOnDemandInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpScheduleKeyDeletion struct {
+}
+
+func (*awsAwsjson11_serializeOpScheduleKeyDeletion) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpScheduleKeyDeletion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*ScheduleKeyDeletionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.ScheduleKeyDeletion")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentScheduleKeyDeletionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpSign struct {
+}
+
+func (*awsAwsjson11_serializeOpSign) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpSign) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*SignInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.Sign")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentSignInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpTagResource struct {
+}
+
+func (*awsAwsjson11_serializeOpTagResource) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*TagResourceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.TagResource")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpUntagResource struct {
+}
+
+func (*awsAwsjson11_serializeOpUntagResource) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UntagResourceInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.UntagResource")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpUpdateAlias struct {
+}
+
+func (*awsAwsjson11_serializeOpUpdateAlias) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpUpdateAlias) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateAliasInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.UpdateAlias")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentUpdateAliasInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpUpdateCustomKeyStore struct {
+}
+
+func (*awsAwsjson11_serializeOpUpdateCustomKeyStore) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpUpdateCustomKeyStore) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateCustomKeyStoreInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.UpdateCustomKeyStore")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentUpdateCustomKeyStoreInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpUpdateKeyDescription struct {
+}
+
+func (*awsAwsjson11_serializeOpUpdateKeyDescription) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpUpdateKeyDescription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdateKeyDescriptionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.UpdateKeyDescription")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentUpdateKeyDescriptionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpUpdatePrimaryRegion struct {
+}
+
+func (*awsAwsjson11_serializeOpUpdatePrimaryRegion) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpUpdatePrimaryRegion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*UpdatePrimaryRegionInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.UpdatePrimaryRegion")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentUpdatePrimaryRegionInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpVerify struct {
+}
+
+func (*awsAwsjson11_serializeOpVerify) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpVerify) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*VerifyInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.Verify")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentVerifyInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+
+type awsAwsjson11_serializeOpVerifyMac struct {
+}
+
+func (*awsAwsjson11_serializeOpVerifyMac) ID() string {
+ return "OperationSerializer"
+}
+
+func (m *awsAwsjson11_serializeOpVerifyMac) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
+ out middleware.SerializeOutput, metadata middleware.Metadata, err error,
+) {
+ _, span := tracing.StartSpan(ctx, "OperationSerializer")
+ endTimer := startMetricTimer(ctx, "client.call.serialization_duration")
+ defer endTimer()
+ defer span.End()
+ request, ok := in.Request.(*smithyhttp.Request)
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)}
+ }
+
+ input, ok := in.Parameters.(*VerifyMacInput)
+ _ = input
+ if !ok {
+ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
+ }
+
+ operationPath := "/"
+ if len(request.Request.URL.Path) == 0 {
+ request.Request.URL.Path = operationPath
+ } else {
+ request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
+ if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
+ request.Request.URL.Path += "/"
+ }
+ }
+ request.Request.Method = "POST"
+ httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
+ if err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1")
+ httpBindingEncoder.SetHeader("X-Amz-Target").String("TrentService.VerifyMac")
+
+ jsonEncoder := smithyjson.NewEncoder()
+ if err := awsAwsjson11_serializeOpDocumentVerifyMacInput(input, jsonEncoder.Value); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+
+ if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
+ return out, metadata, &smithy.SerializationError{Err: err}
+ }
+ in.Request = request
+
+ endTimer()
+ span.End()
+ return next.HandleSerialize(ctx, in)
+}
+func awsAwsjson11_serializeDocumentEncryptionContextType(v map[string]string, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ for key := range v {
+ om := object.Key(key)
+ om.String(v[key])
+ }
+ return nil
+}
+
+func awsAwsjson11_serializeDocumentGrantConstraints(v *types.GrantConstraints, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.EncryptionContextEquals != nil {
+ ok := object.Key("EncryptionContextEquals")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.EncryptionContextEquals, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.EncryptionContextSubset != nil {
+ ok := object.Key("EncryptionContextSubset")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.EncryptionContextSubset, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeDocumentGrantOperationList(v []types.GrantOperation, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(string(v[i]))
+ }
+ return nil
+}
+
+func awsAwsjson11_serializeDocumentGrantTokenList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsjson11_serializeDocumentRecipientInfo(v *types.RecipientInfo, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AttestationDocument != nil {
+ ok := object.Key("AttestationDocument")
+ ok.Base64EncodeBytes(v.AttestationDocument)
+ }
+
+ if len(v.KeyEncryptionAlgorithm) > 0 {
+ ok := object.Key("KeyEncryptionAlgorithm")
+ ok.String(string(v.KeyEncryptionAlgorithm))
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.TagKey != nil {
+ ok := object.Key("TagKey")
+ ok.String(*v.TagKey)
+ }
+
+ if v.TagValue != nil {
+ ok := object.Key("TagValue")
+ ok.String(*v.TagValue)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ av.String(v[i])
+ }
+ return nil
+}
+
+func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error {
+ array := value.Array()
+ defer array.Close()
+
+ for i := range v {
+ av := array.Value()
+ if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func awsAwsjson11_serializeDocumentXksProxyAuthenticationCredentialType(v *types.XksProxyAuthenticationCredentialType, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AccessKeyId != nil {
+ ok := object.Key("AccessKeyId")
+ ok.String(*v.AccessKeyId)
+ }
+
+ if v.RawSecretAccessKey != nil {
+ ok := object.Key("RawSecretAccessKey")
+ ok.String(*v.RawSecretAccessKey)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentCancelKeyDeletionInput(v *CancelKeyDeletionInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentConnectCustomKeyStoreInput(v *ConnectCustomKeyStoreInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CustomKeyStoreId != nil {
+ ok := object.Key("CustomKeyStoreId")
+ ok.String(*v.CustomKeyStoreId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentCreateAliasInput(v *CreateAliasInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AliasName != nil {
+ ok := object.Key("AliasName")
+ ok.String(*v.AliasName)
+ }
+
+ if v.TargetKeyId != nil {
+ ok := object.Key("TargetKeyId")
+ ok.String(*v.TargetKeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentCreateCustomKeyStoreInput(v *CreateCustomKeyStoreInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CloudHsmClusterId != nil {
+ ok := object.Key("CloudHsmClusterId")
+ ok.String(*v.CloudHsmClusterId)
+ }
+
+ if v.CustomKeyStoreName != nil {
+ ok := object.Key("CustomKeyStoreName")
+ ok.String(*v.CustomKeyStoreName)
+ }
+
+ if len(v.CustomKeyStoreType) > 0 {
+ ok := object.Key("CustomKeyStoreType")
+ ok.String(string(v.CustomKeyStoreType))
+ }
+
+ if v.KeyStorePassword != nil {
+ ok := object.Key("KeyStorePassword")
+ ok.String(*v.KeyStorePassword)
+ }
+
+ if v.TrustAnchorCertificate != nil {
+ ok := object.Key("TrustAnchorCertificate")
+ ok.String(*v.TrustAnchorCertificate)
+ }
+
+ if v.XksProxyAuthenticationCredential != nil {
+ ok := object.Key("XksProxyAuthenticationCredential")
+ if err := awsAwsjson11_serializeDocumentXksProxyAuthenticationCredentialType(v.XksProxyAuthenticationCredential, ok); err != nil {
+ return err
+ }
+ }
+
+ if len(v.XksProxyConnectivity) > 0 {
+ ok := object.Key("XksProxyConnectivity")
+ ok.String(string(v.XksProxyConnectivity))
+ }
+
+ if v.XksProxyUriEndpoint != nil {
+ ok := object.Key("XksProxyUriEndpoint")
+ ok.String(*v.XksProxyUriEndpoint)
+ }
+
+ if v.XksProxyUriPath != nil {
+ ok := object.Key("XksProxyUriPath")
+ ok.String(*v.XksProxyUriPath)
+ }
+
+ if v.XksProxyVpcEndpointServiceName != nil {
+ ok := object.Key("XksProxyVpcEndpointServiceName")
+ ok.String(*v.XksProxyVpcEndpointServiceName)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentCreateGrantInput(v *CreateGrantInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Constraints != nil {
+ ok := object.Key("Constraints")
+ if err := awsAwsjson11_serializeDocumentGrantConstraints(v.Constraints, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.GranteePrincipal != nil {
+ ok := object.Key("GranteePrincipal")
+ ok.String(*v.GranteePrincipal)
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Name != nil {
+ ok := object.Key("Name")
+ ok.String(*v.Name)
+ }
+
+ if v.Operations != nil {
+ ok := object.Key("Operations")
+ if err := awsAwsjson11_serializeDocumentGrantOperationList(v.Operations, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.RetiringPrincipal != nil {
+ ok := object.Key("RetiringPrincipal")
+ ok.String(*v.RetiringPrincipal)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentCreateKeyInput(v *CreateKeyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.BypassPolicyLockoutSafetyCheck {
+ ok := object.Key("BypassPolicyLockoutSafetyCheck")
+ ok.Boolean(v.BypassPolicyLockoutSafetyCheck)
+ }
+
+ if len(v.CustomerMasterKeySpec) > 0 {
+ ok := object.Key("CustomerMasterKeySpec")
+ ok.String(string(v.CustomerMasterKeySpec))
+ }
+
+ if v.CustomKeyStoreId != nil {
+ ok := object.Key("CustomKeyStoreId")
+ ok.String(*v.CustomKeyStoreId)
+ }
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if len(v.KeySpec) > 0 {
+ ok := object.Key("KeySpec")
+ ok.String(string(v.KeySpec))
+ }
+
+ if len(v.KeyUsage) > 0 {
+ ok := object.Key("KeyUsage")
+ ok.String(string(v.KeyUsage))
+ }
+
+ if v.MultiRegion != nil {
+ ok := object.Key("MultiRegion")
+ ok.Boolean(*v.MultiRegion)
+ }
+
+ if len(v.Origin) > 0 {
+ ok := object.Key("Origin")
+ ok.String(string(v.Origin))
+ }
+
+ if v.Policy != nil {
+ ok := object.Key("Policy")
+ ok.String(*v.Policy)
+ }
+
+ if v.Tags != nil {
+ ok := object.Key("Tags")
+ if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.XksKeyId != nil {
+ ok := object.Key("XksKeyId")
+ ok.String(*v.XksKeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDecryptInput(v *DecryptInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CiphertextBlob != nil {
+ ok := object.Key("CiphertextBlob")
+ ok.Base64EncodeBytes(v.CiphertextBlob)
+ }
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if len(v.EncryptionAlgorithm) > 0 {
+ ok := object.Key("EncryptionAlgorithm")
+ ok.String(string(v.EncryptionAlgorithm))
+ }
+
+ if v.EncryptionContext != nil {
+ ok := object.Key("EncryptionContext")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.EncryptionContext, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Recipient != nil {
+ ok := object.Key("Recipient")
+ if err := awsAwsjson11_serializeDocumentRecipientInfo(v.Recipient, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDeleteAliasInput(v *DeleteAliasInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AliasName != nil {
+ ok := object.Key("AliasName")
+ ok.String(*v.AliasName)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDeleteCustomKeyStoreInput(v *DeleteCustomKeyStoreInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CustomKeyStoreId != nil {
+ ok := object.Key("CustomKeyStoreId")
+ ok.String(*v.CustomKeyStoreId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDeleteImportedKeyMaterialInput(v *DeleteImportedKeyMaterialInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDeriveSharedSecretInput(v *DeriveSharedSecretInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if len(v.KeyAgreementAlgorithm) > 0 {
+ ok := object.Key("KeyAgreementAlgorithm")
+ ok.String(string(v.KeyAgreementAlgorithm))
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.PublicKey != nil {
+ ok := object.Key("PublicKey")
+ ok.Base64EncodeBytes(v.PublicKey)
+ }
+
+ if v.Recipient != nil {
+ ok := object.Key("Recipient")
+ if err := awsAwsjson11_serializeDocumentRecipientInfo(v.Recipient, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDescribeCustomKeyStoresInput(v *DescribeCustomKeyStoresInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CustomKeyStoreId != nil {
+ ok := object.Key("CustomKeyStoreId")
+ ok.String(*v.CustomKeyStoreId)
+ }
+
+ if v.CustomKeyStoreName != nil {
+ ok := object.Key("CustomKeyStoreName")
+ ok.String(*v.CustomKeyStoreName)
+ }
+
+ if v.Limit != nil {
+ ok := object.Key("Limit")
+ ok.Integer(*v.Limit)
+ }
+
+ if v.Marker != nil {
+ ok := object.Key("Marker")
+ ok.String(*v.Marker)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDescribeKeyInput(v *DescribeKeyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDisableKeyInput(v *DisableKeyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDisableKeyRotationInput(v *DisableKeyRotationInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentDisconnectCustomKeyStoreInput(v *DisconnectCustomKeyStoreInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CustomKeyStoreId != nil {
+ ok := object.Key("CustomKeyStoreId")
+ ok.String(*v.CustomKeyStoreId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentEnableKeyInput(v *EnableKeyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentEnableKeyRotationInput(v *EnableKeyRotationInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.RotationPeriodInDays != nil {
+ ok := object.Key("RotationPeriodInDays")
+ ok.Integer(*v.RotationPeriodInDays)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentEncryptInput(v *EncryptInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if len(v.EncryptionAlgorithm) > 0 {
+ ok := object.Key("EncryptionAlgorithm")
+ ok.String(string(v.EncryptionAlgorithm))
+ }
+
+ if v.EncryptionContext != nil {
+ ok := object.Key("EncryptionContext")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.EncryptionContext, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Plaintext != nil {
+ ok := object.Key("Plaintext")
+ ok.Base64EncodeBytes(v.Plaintext)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGenerateDataKeyInput(v *GenerateDataKeyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.EncryptionContext != nil {
+ ok := object.Key("EncryptionContext")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.EncryptionContext, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if len(v.KeySpec) > 0 {
+ ok := object.Key("KeySpec")
+ ok.String(string(v.KeySpec))
+ }
+
+ if v.NumberOfBytes != nil {
+ ok := object.Key("NumberOfBytes")
+ ok.Integer(*v.NumberOfBytes)
+ }
+
+ if v.Recipient != nil {
+ ok := object.Key("Recipient")
+ if err := awsAwsjson11_serializeDocumentRecipientInfo(v.Recipient, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGenerateDataKeyPairInput(v *GenerateDataKeyPairInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.EncryptionContext != nil {
+ ok := object.Key("EncryptionContext")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.EncryptionContext, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if len(v.KeyPairSpec) > 0 {
+ ok := object.Key("KeyPairSpec")
+ ok.String(string(v.KeyPairSpec))
+ }
+
+ if v.Recipient != nil {
+ ok := object.Key("Recipient")
+ if err := awsAwsjson11_serializeDocumentRecipientInfo(v.Recipient, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGenerateDataKeyPairWithoutPlaintextInput(v *GenerateDataKeyPairWithoutPlaintextInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.EncryptionContext != nil {
+ ok := object.Key("EncryptionContext")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.EncryptionContext, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if len(v.KeyPairSpec) > 0 {
+ ok := object.Key("KeyPairSpec")
+ ok.String(string(v.KeyPairSpec))
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGenerateDataKeyWithoutPlaintextInput(v *GenerateDataKeyWithoutPlaintextInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.EncryptionContext != nil {
+ ok := object.Key("EncryptionContext")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.EncryptionContext, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if len(v.KeySpec) > 0 {
+ ok := object.Key("KeySpec")
+ ok.String(string(v.KeySpec))
+ }
+
+ if v.NumberOfBytes != nil {
+ ok := object.Key("NumberOfBytes")
+ ok.Integer(*v.NumberOfBytes)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGenerateMacInput(v *GenerateMacInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if len(v.MacAlgorithm) > 0 {
+ ok := object.Key("MacAlgorithm")
+ ok.String(string(v.MacAlgorithm))
+ }
+
+ if v.Message != nil {
+ ok := object.Key("Message")
+ ok.Base64EncodeBytes(v.Message)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGenerateRandomInput(v *GenerateRandomInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CustomKeyStoreId != nil {
+ ok := object.Key("CustomKeyStoreId")
+ ok.String(*v.CustomKeyStoreId)
+ }
+
+ if v.NumberOfBytes != nil {
+ ok := object.Key("NumberOfBytes")
+ ok.Integer(*v.NumberOfBytes)
+ }
+
+ if v.Recipient != nil {
+ ok := object.Key("Recipient")
+ if err := awsAwsjson11_serializeDocumentRecipientInfo(v.Recipient, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGetKeyPolicyInput(v *GetKeyPolicyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.PolicyName != nil {
+ ok := object.Key("PolicyName")
+ ok.String(*v.PolicyName)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGetKeyRotationStatusInput(v *GetKeyRotationStatusInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGetParametersForImportInput(v *GetParametersForImportInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if len(v.WrappingAlgorithm) > 0 {
+ ok := object.Key("WrappingAlgorithm")
+ ok.String(string(v.WrappingAlgorithm))
+ }
+
+ if len(v.WrappingKeySpec) > 0 {
+ ok := object.Key("WrappingKeySpec")
+ ok.String(string(v.WrappingKeySpec))
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentGetPublicKeyInput(v *GetPublicKeyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentImportKeyMaterialInput(v *ImportKeyMaterialInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.EncryptedKeyMaterial != nil {
+ ok := object.Key("EncryptedKeyMaterial")
+ ok.Base64EncodeBytes(v.EncryptedKeyMaterial)
+ }
+
+ if len(v.ExpirationModel) > 0 {
+ ok := object.Key("ExpirationModel")
+ ok.String(string(v.ExpirationModel))
+ }
+
+ if v.ImportToken != nil {
+ ok := object.Key("ImportToken")
+ ok.Base64EncodeBytes(v.ImportToken)
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.ValidTo != nil {
+ ok := object.Key("ValidTo")
+ ok.Double(smithytime.FormatEpochSeconds(*v.ValidTo))
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentListAliasesInput(v *ListAliasesInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Limit != nil {
+ ok := object.Key("Limit")
+ ok.Integer(*v.Limit)
+ }
+
+ if v.Marker != nil {
+ ok := object.Key("Marker")
+ ok.String(*v.Marker)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentListGrantsInput(v *ListGrantsInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.GranteePrincipal != nil {
+ ok := object.Key("GranteePrincipal")
+ ok.String(*v.GranteePrincipal)
+ }
+
+ if v.GrantId != nil {
+ ok := object.Key("GrantId")
+ ok.String(*v.GrantId)
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Limit != nil {
+ ok := object.Key("Limit")
+ ok.Integer(*v.Limit)
+ }
+
+ if v.Marker != nil {
+ ok := object.Key("Marker")
+ ok.String(*v.Marker)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentListKeyPoliciesInput(v *ListKeyPoliciesInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Limit != nil {
+ ok := object.Key("Limit")
+ ok.Integer(*v.Limit)
+ }
+
+ if v.Marker != nil {
+ ok := object.Key("Marker")
+ ok.String(*v.Marker)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentListKeyRotationsInput(v *ListKeyRotationsInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Limit != nil {
+ ok := object.Key("Limit")
+ ok.Integer(*v.Limit)
+ }
+
+ if v.Marker != nil {
+ ok := object.Key("Marker")
+ ok.String(*v.Marker)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentListKeysInput(v *ListKeysInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Limit != nil {
+ ok := object.Key("Limit")
+ ok.Integer(*v.Limit)
+ }
+
+ if v.Marker != nil {
+ ok := object.Key("Marker")
+ ok.String(*v.Marker)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentListResourceTagsInput(v *ListResourceTagsInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Limit != nil {
+ ok := object.Key("Limit")
+ ok.Integer(*v.Limit)
+ }
+
+ if v.Marker != nil {
+ ok := object.Key("Marker")
+ ok.String(*v.Marker)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentListRetirableGrantsInput(v *ListRetirableGrantsInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Limit != nil {
+ ok := object.Key("Limit")
+ ok.Integer(*v.Limit)
+ }
+
+ if v.Marker != nil {
+ ok := object.Key("Marker")
+ ok.String(*v.Marker)
+ }
+
+ if v.RetiringPrincipal != nil {
+ ok := object.Key("RetiringPrincipal")
+ ok.String(*v.RetiringPrincipal)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentPutKeyPolicyInput(v *PutKeyPolicyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.BypassPolicyLockoutSafetyCheck {
+ ok := object.Key("BypassPolicyLockoutSafetyCheck")
+ ok.Boolean(v.BypassPolicyLockoutSafetyCheck)
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Policy != nil {
+ ok := object.Key("Policy")
+ ok.String(*v.Policy)
+ }
+
+ if v.PolicyName != nil {
+ ok := object.Key("PolicyName")
+ ok.String(*v.PolicyName)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentReEncryptInput(v *ReEncryptInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CiphertextBlob != nil {
+ ok := object.Key("CiphertextBlob")
+ ok.Base64EncodeBytes(v.CiphertextBlob)
+ }
+
+ if len(v.DestinationEncryptionAlgorithm) > 0 {
+ ok := object.Key("DestinationEncryptionAlgorithm")
+ ok.String(string(v.DestinationEncryptionAlgorithm))
+ }
+
+ if v.DestinationEncryptionContext != nil {
+ ok := object.Key("DestinationEncryptionContext")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.DestinationEncryptionContext, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.DestinationKeyId != nil {
+ ok := object.Key("DestinationKeyId")
+ ok.String(*v.DestinationKeyId)
+ }
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if len(v.SourceEncryptionAlgorithm) > 0 {
+ ok := object.Key("SourceEncryptionAlgorithm")
+ ok.String(string(v.SourceEncryptionAlgorithm))
+ }
+
+ if v.SourceEncryptionContext != nil {
+ ok := object.Key("SourceEncryptionContext")
+ if err := awsAwsjson11_serializeDocumentEncryptionContextType(v.SourceEncryptionContext, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.SourceKeyId != nil {
+ ok := object.Key("SourceKeyId")
+ ok.String(*v.SourceKeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentReplicateKeyInput(v *ReplicateKeyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.BypassPolicyLockoutSafetyCheck {
+ ok := object.Key("BypassPolicyLockoutSafetyCheck")
+ ok.Boolean(v.BypassPolicyLockoutSafetyCheck)
+ }
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Policy != nil {
+ ok := object.Key("Policy")
+ ok.String(*v.Policy)
+ }
+
+ if v.ReplicaRegion != nil {
+ ok := object.Key("ReplicaRegion")
+ ok.String(*v.ReplicaRegion)
+ }
+
+ if v.Tags != nil {
+ ok := object.Key("Tags")
+ if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentRetireGrantInput(v *RetireGrantInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.GrantId != nil {
+ ok := object.Key("GrantId")
+ ok.String(*v.GrantId)
+ }
+
+ if v.GrantToken != nil {
+ ok := object.Key("GrantToken")
+ ok.String(*v.GrantToken)
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentRevokeGrantInput(v *RevokeGrantInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.GrantId != nil {
+ ok := object.Key("GrantId")
+ ok.String(*v.GrantId)
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentRotateKeyOnDemandInput(v *RotateKeyOnDemandInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentScheduleKeyDeletionInput(v *ScheduleKeyDeletionInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.PendingWindowInDays != nil {
+ ok := object.Key("PendingWindowInDays")
+ ok.Integer(*v.PendingWindowInDays)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentSignInput(v *SignInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Message != nil {
+ ok := object.Key("Message")
+ ok.Base64EncodeBytes(v.Message)
+ }
+
+ if len(v.MessageType) > 0 {
+ ok := object.Key("MessageType")
+ ok.String(string(v.MessageType))
+ }
+
+ if len(v.SigningAlgorithm) > 0 {
+ ok := object.Key("SigningAlgorithm")
+ ok.String(string(v.SigningAlgorithm))
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Tags != nil {
+ ok := object.Key("Tags")
+ if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.TagKeys != nil {
+ ok := object.Key("TagKeys")
+ if err := awsAwsjson11_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentUpdateAliasInput(v *UpdateAliasInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.AliasName != nil {
+ ok := object.Key("AliasName")
+ ok.String(*v.AliasName)
+ }
+
+ if v.TargetKeyId != nil {
+ ok := object.Key("TargetKeyId")
+ ok.String(*v.TargetKeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentUpdateCustomKeyStoreInput(v *UpdateCustomKeyStoreInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.CloudHsmClusterId != nil {
+ ok := object.Key("CloudHsmClusterId")
+ ok.String(*v.CloudHsmClusterId)
+ }
+
+ if v.CustomKeyStoreId != nil {
+ ok := object.Key("CustomKeyStoreId")
+ ok.String(*v.CustomKeyStoreId)
+ }
+
+ if v.KeyStorePassword != nil {
+ ok := object.Key("KeyStorePassword")
+ ok.String(*v.KeyStorePassword)
+ }
+
+ if v.NewCustomKeyStoreName != nil {
+ ok := object.Key("NewCustomKeyStoreName")
+ ok.String(*v.NewCustomKeyStoreName)
+ }
+
+ if v.XksProxyAuthenticationCredential != nil {
+ ok := object.Key("XksProxyAuthenticationCredential")
+ if err := awsAwsjson11_serializeDocumentXksProxyAuthenticationCredentialType(v.XksProxyAuthenticationCredential, ok); err != nil {
+ return err
+ }
+ }
+
+ if len(v.XksProxyConnectivity) > 0 {
+ ok := object.Key("XksProxyConnectivity")
+ ok.String(string(v.XksProxyConnectivity))
+ }
+
+ if v.XksProxyUriEndpoint != nil {
+ ok := object.Key("XksProxyUriEndpoint")
+ ok.String(*v.XksProxyUriEndpoint)
+ }
+
+ if v.XksProxyUriPath != nil {
+ ok := object.Key("XksProxyUriPath")
+ ok.String(*v.XksProxyUriPath)
+ }
+
+ if v.XksProxyVpcEndpointServiceName != nil {
+ ok := object.Key("XksProxyVpcEndpointServiceName")
+ ok.String(*v.XksProxyVpcEndpointServiceName)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentUpdateKeyDescriptionInput(v *UpdateKeyDescriptionInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.Description != nil {
+ ok := object.Key("Description")
+ ok.String(*v.Description)
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentUpdatePrimaryRegionInput(v *UpdatePrimaryRegionInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.PrimaryRegion != nil {
+ ok := object.Key("PrimaryRegion")
+ ok.String(*v.PrimaryRegion)
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentVerifyInput(v *VerifyInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Message != nil {
+ ok := object.Key("Message")
+ ok.Base64EncodeBytes(v.Message)
+ }
+
+ if len(v.MessageType) > 0 {
+ ok := object.Key("MessageType")
+ ok.String(string(v.MessageType))
+ }
+
+ if v.Signature != nil {
+ ok := object.Key("Signature")
+ ok.Base64EncodeBytes(v.Signature)
+ }
+
+ if len(v.SigningAlgorithm) > 0 {
+ ok := object.Key("SigningAlgorithm")
+ ok.String(string(v.SigningAlgorithm))
+ }
+
+ return nil
+}
+
+func awsAwsjson11_serializeOpDocumentVerifyMacInput(v *VerifyMacInput, value smithyjson.Value) error {
+ object := value.Object()
+ defer object.Close()
+
+ if v.DryRun != nil {
+ ok := object.Key("DryRun")
+ ok.Boolean(*v.DryRun)
+ }
+
+ if v.GrantTokens != nil {
+ ok := object.Key("GrantTokens")
+ if err := awsAwsjson11_serializeDocumentGrantTokenList(v.GrantTokens, ok); err != nil {
+ return err
+ }
+ }
+
+ if v.KeyId != nil {
+ ok := object.Key("KeyId")
+ ok.String(*v.KeyId)
+ }
+
+ if v.Mac != nil {
+ ok := object.Key("Mac")
+ ok.Base64EncodeBytes(v.Mac)
+ }
+
+ if len(v.MacAlgorithm) > 0 {
+ ok := object.Key("MacAlgorithm")
+ ok.String(string(v.MacAlgorithm))
+ }
+
+ if v.Message != nil {
+ ok := object.Key("Message")
+ ok.Base64EncodeBytes(v.Message)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/enums.go
new file mode 100644
index 000000000..9c111656d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/enums.go
@@ -0,0 +1,635 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+type AlgorithmSpec string
+
+// Enum values for AlgorithmSpec
+const (
+ AlgorithmSpecRsaesPkcs1V15 AlgorithmSpec = "RSAES_PKCS1_V1_5"
+ AlgorithmSpecRsaesOaepSha1 AlgorithmSpec = "RSAES_OAEP_SHA_1"
+ AlgorithmSpecRsaesOaepSha256 AlgorithmSpec = "RSAES_OAEP_SHA_256"
+ AlgorithmSpecRsaAesKeyWrapSha1 AlgorithmSpec = "RSA_AES_KEY_WRAP_SHA_1"
+ AlgorithmSpecRsaAesKeyWrapSha256 AlgorithmSpec = "RSA_AES_KEY_WRAP_SHA_256"
+ AlgorithmSpecSm2pke AlgorithmSpec = "SM2PKE"
+)
+
+// Values returns all known values for AlgorithmSpec. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (AlgorithmSpec) Values() []AlgorithmSpec {
+ return []AlgorithmSpec{
+ "RSAES_PKCS1_V1_5",
+ "RSAES_OAEP_SHA_1",
+ "RSAES_OAEP_SHA_256",
+ "RSA_AES_KEY_WRAP_SHA_1",
+ "RSA_AES_KEY_WRAP_SHA_256",
+ "SM2PKE",
+ }
+}
+
+type ConnectionErrorCodeType string
+
+// Enum values for ConnectionErrorCodeType
+const (
+ ConnectionErrorCodeTypeInvalidCredentials ConnectionErrorCodeType = "INVALID_CREDENTIALS"
+ ConnectionErrorCodeTypeClusterNotFound ConnectionErrorCodeType = "CLUSTER_NOT_FOUND"
+ ConnectionErrorCodeTypeNetworkErrors ConnectionErrorCodeType = "NETWORK_ERRORS"
+ ConnectionErrorCodeTypeInternalError ConnectionErrorCodeType = "INTERNAL_ERROR"
+ ConnectionErrorCodeTypeInsufficientCloudhsmHsms ConnectionErrorCodeType = "INSUFFICIENT_CLOUDHSM_HSMS"
+ ConnectionErrorCodeTypeUserLockedOut ConnectionErrorCodeType = "USER_LOCKED_OUT"
+ ConnectionErrorCodeTypeUserNotFound ConnectionErrorCodeType = "USER_NOT_FOUND"
+ ConnectionErrorCodeTypeUserLoggedIn ConnectionErrorCodeType = "USER_LOGGED_IN"
+ ConnectionErrorCodeTypeSubnetNotFound ConnectionErrorCodeType = "SUBNET_NOT_FOUND"
+ ConnectionErrorCodeTypeInsufficientFreeAddressesInSubnet ConnectionErrorCodeType = "INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET"
+ ConnectionErrorCodeTypeXksProxyAccessDenied ConnectionErrorCodeType = "XKS_PROXY_ACCESS_DENIED"
+ ConnectionErrorCodeTypeXksProxyNotReachable ConnectionErrorCodeType = "XKS_PROXY_NOT_REACHABLE"
+ ConnectionErrorCodeTypeXksVpcEndpointServiceNotFound ConnectionErrorCodeType = "XKS_VPC_ENDPOINT_SERVICE_NOT_FOUND"
+ ConnectionErrorCodeTypeXksProxyInvalidResponse ConnectionErrorCodeType = "XKS_PROXY_INVALID_RESPONSE"
+ ConnectionErrorCodeTypeXksProxyInvalidConfiguration ConnectionErrorCodeType = "XKS_PROXY_INVALID_CONFIGURATION"
+ ConnectionErrorCodeTypeXksVpcEndpointServiceInvalidConfiguration ConnectionErrorCodeType = "XKS_VPC_ENDPOINT_SERVICE_INVALID_CONFIGURATION"
+ ConnectionErrorCodeTypeXksProxyTimedOut ConnectionErrorCodeType = "XKS_PROXY_TIMED_OUT"
+ ConnectionErrorCodeTypeXksProxyInvalidTlsConfiguration ConnectionErrorCodeType = "XKS_PROXY_INVALID_TLS_CONFIGURATION"
+)
+
+// Values returns all known values for ConnectionErrorCodeType. Note that this can
+// be expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ConnectionErrorCodeType) Values() []ConnectionErrorCodeType {
+ return []ConnectionErrorCodeType{
+ "INVALID_CREDENTIALS",
+ "CLUSTER_NOT_FOUND",
+ "NETWORK_ERRORS",
+ "INTERNAL_ERROR",
+ "INSUFFICIENT_CLOUDHSM_HSMS",
+ "USER_LOCKED_OUT",
+ "USER_NOT_FOUND",
+ "USER_LOGGED_IN",
+ "SUBNET_NOT_FOUND",
+ "INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET",
+ "XKS_PROXY_ACCESS_DENIED",
+ "XKS_PROXY_NOT_REACHABLE",
+ "XKS_VPC_ENDPOINT_SERVICE_NOT_FOUND",
+ "XKS_PROXY_INVALID_RESPONSE",
+ "XKS_PROXY_INVALID_CONFIGURATION",
+ "XKS_VPC_ENDPOINT_SERVICE_INVALID_CONFIGURATION",
+ "XKS_PROXY_TIMED_OUT",
+ "XKS_PROXY_INVALID_TLS_CONFIGURATION",
+ }
+}
+
+type ConnectionStateType string
+
+// Enum values for ConnectionStateType
+const (
+ ConnectionStateTypeConnected ConnectionStateType = "CONNECTED"
+ ConnectionStateTypeConnecting ConnectionStateType = "CONNECTING"
+ ConnectionStateTypeFailed ConnectionStateType = "FAILED"
+ ConnectionStateTypeDisconnected ConnectionStateType = "DISCONNECTED"
+ ConnectionStateTypeDisconnecting ConnectionStateType = "DISCONNECTING"
+)
+
+// Values returns all known values for ConnectionStateType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ConnectionStateType) Values() []ConnectionStateType {
+ return []ConnectionStateType{
+ "CONNECTED",
+ "CONNECTING",
+ "FAILED",
+ "DISCONNECTED",
+ "DISCONNECTING",
+ }
+}
+
+type CustomerMasterKeySpec string
+
+// Enum values for CustomerMasterKeySpec
+const (
+ CustomerMasterKeySpecRsa2048 CustomerMasterKeySpec = "RSA_2048"
+ CustomerMasterKeySpecRsa3072 CustomerMasterKeySpec = "RSA_3072"
+ CustomerMasterKeySpecRsa4096 CustomerMasterKeySpec = "RSA_4096"
+ CustomerMasterKeySpecEccNistP256 CustomerMasterKeySpec = "ECC_NIST_P256"
+ CustomerMasterKeySpecEccNistP384 CustomerMasterKeySpec = "ECC_NIST_P384"
+ CustomerMasterKeySpecEccNistP521 CustomerMasterKeySpec = "ECC_NIST_P521"
+ CustomerMasterKeySpecEccSecgP256k1 CustomerMasterKeySpec = "ECC_SECG_P256K1"
+ CustomerMasterKeySpecSymmetricDefault CustomerMasterKeySpec = "SYMMETRIC_DEFAULT"
+ CustomerMasterKeySpecHmac224 CustomerMasterKeySpec = "HMAC_224"
+ CustomerMasterKeySpecHmac256 CustomerMasterKeySpec = "HMAC_256"
+ CustomerMasterKeySpecHmac384 CustomerMasterKeySpec = "HMAC_384"
+ CustomerMasterKeySpecHmac512 CustomerMasterKeySpec = "HMAC_512"
+ CustomerMasterKeySpecSm2 CustomerMasterKeySpec = "SM2"
+)
+
+// Values returns all known values for CustomerMasterKeySpec. Note that this can
+// be expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (CustomerMasterKeySpec) Values() []CustomerMasterKeySpec {
+ return []CustomerMasterKeySpec{
+ "RSA_2048",
+ "RSA_3072",
+ "RSA_4096",
+ "ECC_NIST_P256",
+ "ECC_NIST_P384",
+ "ECC_NIST_P521",
+ "ECC_SECG_P256K1",
+ "SYMMETRIC_DEFAULT",
+ "HMAC_224",
+ "HMAC_256",
+ "HMAC_384",
+ "HMAC_512",
+ "SM2",
+ }
+}
+
+type CustomKeyStoreType string
+
+// Enum values for CustomKeyStoreType
+const (
+ CustomKeyStoreTypeAwsCloudhsm CustomKeyStoreType = "AWS_CLOUDHSM"
+ CustomKeyStoreTypeExternalKeyStore CustomKeyStoreType = "EXTERNAL_KEY_STORE"
+)
+
+// Values returns all known values for CustomKeyStoreType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (CustomKeyStoreType) Values() []CustomKeyStoreType {
+ return []CustomKeyStoreType{
+ "AWS_CLOUDHSM",
+ "EXTERNAL_KEY_STORE",
+ }
+}
+
+type DataKeyPairSpec string
+
+// Enum values for DataKeyPairSpec
+const (
+ DataKeyPairSpecRsa2048 DataKeyPairSpec = "RSA_2048"
+ DataKeyPairSpecRsa3072 DataKeyPairSpec = "RSA_3072"
+ DataKeyPairSpecRsa4096 DataKeyPairSpec = "RSA_4096"
+ DataKeyPairSpecEccNistP256 DataKeyPairSpec = "ECC_NIST_P256"
+ DataKeyPairSpecEccNistP384 DataKeyPairSpec = "ECC_NIST_P384"
+ DataKeyPairSpecEccNistP521 DataKeyPairSpec = "ECC_NIST_P521"
+ DataKeyPairSpecEccSecgP256k1 DataKeyPairSpec = "ECC_SECG_P256K1"
+ DataKeyPairSpecSm2 DataKeyPairSpec = "SM2"
+)
+
+// Values returns all known values for DataKeyPairSpec. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (DataKeyPairSpec) Values() []DataKeyPairSpec {
+ return []DataKeyPairSpec{
+ "RSA_2048",
+ "RSA_3072",
+ "RSA_4096",
+ "ECC_NIST_P256",
+ "ECC_NIST_P384",
+ "ECC_NIST_P521",
+ "ECC_SECG_P256K1",
+ "SM2",
+ }
+}
+
+type DataKeySpec string
+
+// Enum values for DataKeySpec
+const (
+ DataKeySpecAes256 DataKeySpec = "AES_256"
+ DataKeySpecAes128 DataKeySpec = "AES_128"
+)
+
+// Values returns all known values for DataKeySpec. Note that this can be expanded
+// in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (DataKeySpec) Values() []DataKeySpec {
+ return []DataKeySpec{
+ "AES_256",
+ "AES_128",
+ }
+}
+
+type EncryptionAlgorithmSpec string
+
+// Enum values for EncryptionAlgorithmSpec
+const (
+ EncryptionAlgorithmSpecSymmetricDefault EncryptionAlgorithmSpec = "SYMMETRIC_DEFAULT"
+ EncryptionAlgorithmSpecRsaesOaepSha1 EncryptionAlgorithmSpec = "RSAES_OAEP_SHA_1"
+ EncryptionAlgorithmSpecRsaesOaepSha256 EncryptionAlgorithmSpec = "RSAES_OAEP_SHA_256"
+ EncryptionAlgorithmSpecSm2pke EncryptionAlgorithmSpec = "SM2PKE"
+)
+
+// Values returns all known values for EncryptionAlgorithmSpec. Note that this can
+// be expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (EncryptionAlgorithmSpec) Values() []EncryptionAlgorithmSpec {
+ return []EncryptionAlgorithmSpec{
+ "SYMMETRIC_DEFAULT",
+ "RSAES_OAEP_SHA_1",
+ "RSAES_OAEP_SHA_256",
+ "SM2PKE",
+ }
+}
+
+type ExpirationModelType string
+
+// Enum values for ExpirationModelType
+const (
+ ExpirationModelTypeKeyMaterialExpires ExpirationModelType = "KEY_MATERIAL_EXPIRES"
+ ExpirationModelTypeKeyMaterialDoesNotExpire ExpirationModelType = "KEY_MATERIAL_DOES_NOT_EXPIRE"
+)
+
+// Values returns all known values for ExpirationModelType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (ExpirationModelType) Values() []ExpirationModelType {
+ return []ExpirationModelType{
+ "KEY_MATERIAL_EXPIRES",
+ "KEY_MATERIAL_DOES_NOT_EXPIRE",
+ }
+}
+
+type GrantOperation string
+
+// Enum values for GrantOperation
+const (
+ GrantOperationDecrypt GrantOperation = "Decrypt"
+ GrantOperationEncrypt GrantOperation = "Encrypt"
+ GrantOperationGenerateDataKey GrantOperation = "GenerateDataKey"
+ GrantOperationGenerateDataKeyWithoutPlaintext GrantOperation = "GenerateDataKeyWithoutPlaintext"
+ GrantOperationReEncryptFrom GrantOperation = "ReEncryptFrom"
+ GrantOperationReEncryptTo GrantOperation = "ReEncryptTo"
+ GrantOperationSign GrantOperation = "Sign"
+ GrantOperationVerify GrantOperation = "Verify"
+ GrantOperationGetPublicKey GrantOperation = "GetPublicKey"
+ GrantOperationCreateGrant GrantOperation = "CreateGrant"
+ GrantOperationRetireGrant GrantOperation = "RetireGrant"
+ GrantOperationDescribeKey GrantOperation = "DescribeKey"
+ GrantOperationGenerateDataKeyPair GrantOperation = "GenerateDataKeyPair"
+ GrantOperationGenerateDataKeyPairWithoutPlaintext GrantOperation = "GenerateDataKeyPairWithoutPlaintext"
+ GrantOperationGenerateMac GrantOperation = "GenerateMac"
+ GrantOperationVerifyMac GrantOperation = "VerifyMac"
+ GrantOperationDeriveSharedSecret GrantOperation = "DeriveSharedSecret"
+)
+
+// Values returns all known values for GrantOperation. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (GrantOperation) Values() []GrantOperation {
+ return []GrantOperation{
+ "Decrypt",
+ "Encrypt",
+ "GenerateDataKey",
+ "GenerateDataKeyWithoutPlaintext",
+ "ReEncryptFrom",
+ "ReEncryptTo",
+ "Sign",
+ "Verify",
+ "GetPublicKey",
+ "CreateGrant",
+ "RetireGrant",
+ "DescribeKey",
+ "GenerateDataKeyPair",
+ "GenerateDataKeyPairWithoutPlaintext",
+ "GenerateMac",
+ "VerifyMac",
+ "DeriveSharedSecret",
+ }
+}
+
+type KeyAgreementAlgorithmSpec string
+
+// Enum values for KeyAgreementAlgorithmSpec
+const (
+ KeyAgreementAlgorithmSpecEcdh KeyAgreementAlgorithmSpec = "ECDH"
+)
+
+// Values returns all known values for KeyAgreementAlgorithmSpec. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (KeyAgreementAlgorithmSpec) Values() []KeyAgreementAlgorithmSpec {
+ return []KeyAgreementAlgorithmSpec{
+ "ECDH",
+ }
+}
+
+type KeyEncryptionMechanism string
+
+// Enum values for KeyEncryptionMechanism
+const (
+ KeyEncryptionMechanismRsaesOaepSha256 KeyEncryptionMechanism = "RSAES_OAEP_SHA_256"
+)
+
+// Values returns all known values for KeyEncryptionMechanism. Note that this can
+// be expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (KeyEncryptionMechanism) Values() []KeyEncryptionMechanism {
+ return []KeyEncryptionMechanism{
+ "RSAES_OAEP_SHA_256",
+ }
+}
+
+type KeyManagerType string
+
+// Enum values for KeyManagerType
+const (
+ KeyManagerTypeAws KeyManagerType = "AWS"
+ KeyManagerTypeCustomer KeyManagerType = "CUSTOMER"
+)
+
+// Values returns all known values for KeyManagerType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (KeyManagerType) Values() []KeyManagerType {
+ return []KeyManagerType{
+ "AWS",
+ "CUSTOMER",
+ }
+}
+
+type KeySpec string
+
+// Enum values for KeySpec
+const (
+ KeySpecRsa2048 KeySpec = "RSA_2048"
+ KeySpecRsa3072 KeySpec = "RSA_3072"
+ KeySpecRsa4096 KeySpec = "RSA_4096"
+ KeySpecEccNistP256 KeySpec = "ECC_NIST_P256"
+ KeySpecEccNistP384 KeySpec = "ECC_NIST_P384"
+ KeySpecEccNistP521 KeySpec = "ECC_NIST_P521"
+ KeySpecEccSecgP256k1 KeySpec = "ECC_SECG_P256K1"
+ KeySpecSymmetricDefault KeySpec = "SYMMETRIC_DEFAULT"
+ KeySpecHmac224 KeySpec = "HMAC_224"
+ KeySpecHmac256 KeySpec = "HMAC_256"
+ KeySpecHmac384 KeySpec = "HMAC_384"
+ KeySpecHmac512 KeySpec = "HMAC_512"
+ KeySpecSm2 KeySpec = "SM2"
+)
+
+// Values returns all known values for KeySpec. Note that this can be expanded in
+// the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (KeySpec) Values() []KeySpec {
+ return []KeySpec{
+ "RSA_2048",
+ "RSA_3072",
+ "RSA_4096",
+ "ECC_NIST_P256",
+ "ECC_NIST_P384",
+ "ECC_NIST_P521",
+ "ECC_SECG_P256K1",
+ "SYMMETRIC_DEFAULT",
+ "HMAC_224",
+ "HMAC_256",
+ "HMAC_384",
+ "HMAC_512",
+ "SM2",
+ }
+}
+
+type KeyState string
+
+// Enum values for KeyState
+const (
+ KeyStateCreating KeyState = "Creating"
+ KeyStateEnabled KeyState = "Enabled"
+ KeyStateDisabled KeyState = "Disabled"
+ KeyStatePendingDeletion KeyState = "PendingDeletion"
+ KeyStatePendingImport KeyState = "PendingImport"
+ KeyStatePendingReplicaDeletion KeyState = "PendingReplicaDeletion"
+ KeyStateUnavailable KeyState = "Unavailable"
+ KeyStateUpdating KeyState = "Updating"
+)
+
+// Values returns all known values for KeyState. Note that this can be expanded in
+// the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (KeyState) Values() []KeyState {
+ return []KeyState{
+ "Creating",
+ "Enabled",
+ "Disabled",
+ "PendingDeletion",
+ "PendingImport",
+ "PendingReplicaDeletion",
+ "Unavailable",
+ "Updating",
+ }
+}
+
+type KeyUsageType string
+
+// Enum values for KeyUsageType
+const (
+ KeyUsageTypeSignVerify KeyUsageType = "SIGN_VERIFY"
+ KeyUsageTypeEncryptDecrypt KeyUsageType = "ENCRYPT_DECRYPT"
+ KeyUsageTypeGenerateVerifyMac KeyUsageType = "GENERATE_VERIFY_MAC"
+ KeyUsageTypeKeyAgreement KeyUsageType = "KEY_AGREEMENT"
+)
+
+// Values returns all known values for KeyUsageType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (KeyUsageType) Values() []KeyUsageType {
+ return []KeyUsageType{
+ "SIGN_VERIFY",
+ "ENCRYPT_DECRYPT",
+ "GENERATE_VERIFY_MAC",
+ "KEY_AGREEMENT",
+ }
+}
+
+type MacAlgorithmSpec string
+
+// Enum values for MacAlgorithmSpec
+const (
+ MacAlgorithmSpecHmacSha224 MacAlgorithmSpec = "HMAC_SHA_224"
+ MacAlgorithmSpecHmacSha256 MacAlgorithmSpec = "HMAC_SHA_256"
+ MacAlgorithmSpecHmacSha384 MacAlgorithmSpec = "HMAC_SHA_384"
+ MacAlgorithmSpecHmacSha512 MacAlgorithmSpec = "HMAC_SHA_512"
+)
+
+// Values returns all known values for MacAlgorithmSpec. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (MacAlgorithmSpec) Values() []MacAlgorithmSpec {
+ return []MacAlgorithmSpec{
+ "HMAC_SHA_224",
+ "HMAC_SHA_256",
+ "HMAC_SHA_384",
+ "HMAC_SHA_512",
+ }
+}
+
+type MessageType string
+
+// Enum values for MessageType
+const (
+ MessageTypeRaw MessageType = "RAW"
+ MessageTypeDigest MessageType = "DIGEST"
+)
+
+// Values returns all known values for MessageType. Note that this can be expanded
+// in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (MessageType) Values() []MessageType {
+ return []MessageType{
+ "RAW",
+ "DIGEST",
+ }
+}
+
+type MultiRegionKeyType string
+
+// Enum values for MultiRegionKeyType
+const (
+ MultiRegionKeyTypePrimary MultiRegionKeyType = "PRIMARY"
+ MultiRegionKeyTypeReplica MultiRegionKeyType = "REPLICA"
+)
+
+// Values returns all known values for MultiRegionKeyType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (MultiRegionKeyType) Values() []MultiRegionKeyType {
+ return []MultiRegionKeyType{
+ "PRIMARY",
+ "REPLICA",
+ }
+}
+
+type OriginType string
+
+// Enum values for OriginType
+const (
+ OriginTypeAwsKms OriginType = "AWS_KMS"
+ OriginTypeExternal OriginType = "EXTERNAL"
+ OriginTypeAwsCloudhsm OriginType = "AWS_CLOUDHSM"
+ OriginTypeExternalKeyStore OriginType = "EXTERNAL_KEY_STORE"
+)
+
+// Values returns all known values for OriginType. Note that this can be expanded
+// in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (OriginType) Values() []OriginType {
+ return []OriginType{
+ "AWS_KMS",
+ "EXTERNAL",
+ "AWS_CLOUDHSM",
+ "EXTERNAL_KEY_STORE",
+ }
+}
+
+type RotationType string
+
+// Enum values for RotationType
+const (
+ RotationTypeAutomatic RotationType = "AUTOMATIC"
+ RotationTypeOnDemand RotationType = "ON_DEMAND"
+)
+
+// Values returns all known values for RotationType. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (RotationType) Values() []RotationType {
+ return []RotationType{
+ "AUTOMATIC",
+ "ON_DEMAND",
+ }
+}
+
+type SigningAlgorithmSpec string
+
+// Enum values for SigningAlgorithmSpec
+const (
+ SigningAlgorithmSpecRsassaPssSha256 SigningAlgorithmSpec = "RSASSA_PSS_SHA_256"
+ SigningAlgorithmSpecRsassaPssSha384 SigningAlgorithmSpec = "RSASSA_PSS_SHA_384"
+ SigningAlgorithmSpecRsassaPssSha512 SigningAlgorithmSpec = "RSASSA_PSS_SHA_512"
+ SigningAlgorithmSpecRsassaPkcs1V15Sha256 SigningAlgorithmSpec = "RSASSA_PKCS1_V1_5_SHA_256"
+ SigningAlgorithmSpecRsassaPkcs1V15Sha384 SigningAlgorithmSpec = "RSASSA_PKCS1_V1_5_SHA_384"
+ SigningAlgorithmSpecRsassaPkcs1V15Sha512 SigningAlgorithmSpec = "RSASSA_PKCS1_V1_5_SHA_512"
+ SigningAlgorithmSpecEcdsaSha256 SigningAlgorithmSpec = "ECDSA_SHA_256"
+ SigningAlgorithmSpecEcdsaSha384 SigningAlgorithmSpec = "ECDSA_SHA_384"
+ SigningAlgorithmSpecEcdsaSha512 SigningAlgorithmSpec = "ECDSA_SHA_512"
+ SigningAlgorithmSpecSm2dsa SigningAlgorithmSpec = "SM2DSA"
+)
+
+// Values returns all known values for SigningAlgorithmSpec. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (SigningAlgorithmSpec) Values() []SigningAlgorithmSpec {
+ return []SigningAlgorithmSpec{
+ "RSASSA_PSS_SHA_256",
+ "RSASSA_PSS_SHA_384",
+ "RSASSA_PSS_SHA_512",
+ "RSASSA_PKCS1_V1_5_SHA_256",
+ "RSASSA_PKCS1_V1_5_SHA_384",
+ "RSASSA_PKCS1_V1_5_SHA_512",
+ "ECDSA_SHA_256",
+ "ECDSA_SHA_384",
+ "ECDSA_SHA_512",
+ "SM2DSA",
+ }
+}
+
+type WrappingKeySpec string
+
+// Enum values for WrappingKeySpec
+const (
+ WrappingKeySpecRsa2048 WrappingKeySpec = "RSA_2048"
+ WrappingKeySpecRsa3072 WrappingKeySpec = "RSA_3072"
+ WrappingKeySpecRsa4096 WrappingKeySpec = "RSA_4096"
+ WrappingKeySpecSm2 WrappingKeySpec = "SM2"
+)
+
+// Values returns all known values for WrappingKeySpec. Note that this can be
+// expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (WrappingKeySpec) Values() []WrappingKeySpec {
+ return []WrappingKeySpec{
+ "RSA_2048",
+ "RSA_3072",
+ "RSA_4096",
+ "SM2",
+ }
+}
+
+type XksProxyConnectivityType string
+
+// Enum values for XksProxyConnectivityType
+const (
+ XksProxyConnectivityTypePublicEndpoint XksProxyConnectivityType = "PUBLIC_ENDPOINT"
+ XksProxyConnectivityTypeVpcEndpointService XksProxyConnectivityType = "VPC_ENDPOINT_SERVICE"
+)
+
+// Values returns all known values for XksProxyConnectivityType. Note that this
+// can be expanded in the future, and so it is only as up to date as the client.
+//
+// The ordering of this slice is not guaranteed to be stable across updates.
+func (XksProxyConnectivityType) Values() []XksProxyConnectivityType {
+ return []XksProxyConnectivityType{
+ "PUBLIC_ENDPOINT",
+ "VPC_ENDPOINT_SERVICE",
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/errors.go
new file mode 100644
index 000000000..a68d1739e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/errors.go
@@ -0,0 +1,1474 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ "fmt"
+ smithy "github.com/aws/smithy-go"
+)
+
+// The request was rejected because it attempted to create a resource that already
+// exists.
+type AlreadyExistsException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *AlreadyExistsException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *AlreadyExistsException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *AlreadyExistsException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "AlreadyExistsException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *AlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified CloudHSM cluster is already
+// associated with an CloudHSM key store in the account, or it shares a backup
+// history with an CloudHSM key store in the account. Each CloudHSM key store in
+// the account must be associated with a different CloudHSM cluster.
+//
+// CloudHSM clusters that share a backup history have the same cluster
+// certificate. To view the cluster certificate of an CloudHSM cluster, use the [DescribeClusters]
+// operation.
+//
+// [DescribeClusters]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
+type CloudHsmClusterInUseException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CloudHsmClusterInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CloudHsmClusterInUseException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CloudHsmClusterInUseException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CloudHsmClusterInUseException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CloudHsmClusterInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the associated CloudHSM cluster did not meet
+// the configuration requirements for an CloudHSM key store.
+//
+// - The CloudHSM cluster must be configured with private subnets in at least
+// two different Availability Zones in the Region.
+//
+// - The [security group for the cluster](cloudhsm-cluster--sg) must include inbound rules and outbound rules
+// that allow TCP traffic on ports 2223-2225. The Source in the inbound rules and
+// the Destination in the outbound rules must match the security group ID. These
+// rules are set by default when you create the CloudHSM cluster. Do not delete or
+// change them. To get information about a particular security group, use the [DescribeSecurityGroups]
+// operation.
+//
+// - The CloudHSM cluster must contain at least as many HSMs as the operation
+// requires. To add HSMs, use the CloudHSM [CreateHsm]operation.
+//
+// For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKeyoperations, the CloudHSM cluster must have at least two active
+//
+// HSMs, each in a different Availability Zone. For the ConnectCustomKeyStoreoperation, the CloudHSM
+// must contain at least one active HSM.
+//
+// For information about the requirements for an CloudHSM cluster that is
+// associated with an CloudHSM key store, see [Assemble the Prerequisites]in the Key Management Service
+// Developer Guide. For information about creating a private subnet for an CloudHSM
+// cluster, see [Create a Private Subnet]in the CloudHSM User Guide. For information about cluster security
+// groups, see [Configure a Default Security Group]in the CloudHSM User Guide .
+//
+// [Assemble the Prerequisites]: https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore
+// [Create a Private Subnet]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html
+// [Configure a Default Security Group]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html
+// [DescribeSecurityGroups]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html
+// [CreateHsm]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html
+// [security group for the cluster]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html
+type CloudHsmClusterInvalidConfigurationException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CloudHsmClusterInvalidConfigurationException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CloudHsmClusterInvalidConfigurationException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CloudHsmClusterInvalidConfigurationException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CloudHsmClusterInvalidConfigurationException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CloudHsmClusterInvalidConfigurationException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// The request was rejected because the CloudHSM cluster associated with the
+// CloudHSM key store is not active. Initialize and activate the cluster and try
+// the command again. For detailed instructions, see [Getting Started]in the CloudHSM User Guide.
+//
+// [Getting Started]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html
+type CloudHsmClusterNotActiveException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CloudHsmClusterNotActiveException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CloudHsmClusterNotActiveException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CloudHsmClusterNotActiveException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CloudHsmClusterNotActiveException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CloudHsmClusterNotActiveException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because KMS cannot find the CloudHSM cluster with the
+// specified cluster ID. Retry the request with a different cluster ID.
+type CloudHsmClusterNotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CloudHsmClusterNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CloudHsmClusterNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CloudHsmClusterNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CloudHsmClusterNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CloudHsmClusterNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified CloudHSM cluster has a different
+// cluster certificate than the original cluster. You cannot use the operation to
+// specify an unrelated cluster for an CloudHSM key store.
+//
+// Specify an CloudHSM cluster that shares a backup history with the original
+// cluster. This includes clusters that were created from a backup of the current
+// cluster, and clusters that were created from the same backup that produced the
+// current cluster.
+//
+// CloudHSM clusters that share a backup history have the same cluster
+// certificate. To view the cluster certificate of an CloudHSM cluster, use the [DescribeClusters]
+// operation.
+//
+// [DescribeClusters]: https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html
+type CloudHsmClusterNotRelatedException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CloudHsmClusterNotRelatedException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CloudHsmClusterNotRelatedException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CloudHsmClusterNotRelatedException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CloudHsmClusterNotRelatedException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CloudHsmClusterNotRelatedException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// The request was rejected because an automatic rotation of this key is currently
+// in progress or scheduled to begin within the next 20 minutes.
+type ConflictException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ConflictException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ConflictException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ConflictException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ConflictException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the custom key store contains KMS keys. After
+// verifying that you do not need to use the KMS keys, use the ScheduleKeyDeletionoperation to delete
+// the KMS keys. After they are deleted, you can delete the custom key store.
+type CustomKeyStoreHasCMKsException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CustomKeyStoreHasCMKsException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CustomKeyStoreHasCMKsException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CustomKeyStoreHasCMKsException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CustomKeyStoreHasCMKsException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CustomKeyStoreHasCMKsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because of the ConnectionState of the custom key
+// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores operation.
+//
+// This exception is thrown under the following conditions:
+//
+// - You requested the ConnectCustomKeyStoreoperation on a custom key store with a ConnectionState of
+// DISCONNECTING or FAILED . This operation is valid for all other
+// ConnectionState values. To reconnect a custom key store in a FAILED state,
+// disconnect it (DisconnectCustomKeyStore ), then connect it ( ConnectCustomKeyStore ).
+//
+// - You requested the CreateKeyoperation in a custom key store that is not connected.
+// This operations is valid only when the custom key store ConnectionState is
+// CONNECTED .
+//
+// - You requested the DisconnectCustomKeyStoreoperation on a custom key store with a ConnectionState of
+// DISCONNECTING or DISCONNECTED . This operation is valid for all other
+// ConnectionState values.
+//
+// - You requested the UpdateCustomKeyStoreor DeleteCustomKeyStoreoperation on a custom key store that is not
+// disconnected. This operation is valid only when the custom key store
+// ConnectionState is DISCONNECTED .
+//
+// - You requested the GenerateRandomoperation in an CloudHSM key store that is not connected.
+// This operation is valid only when the CloudHSM key store ConnectionState is
+// CONNECTED .
+type CustomKeyStoreInvalidStateException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CustomKeyStoreInvalidStateException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CustomKeyStoreInvalidStateException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CustomKeyStoreInvalidStateException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CustomKeyStoreInvalidStateException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CustomKeyStoreInvalidStateException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// The request was rejected because the specified custom key store name is already
+// assigned to another custom key store in the account. Try again with a custom key
+// store name that is unique in the account.
+type CustomKeyStoreNameInUseException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CustomKeyStoreNameInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CustomKeyStoreNameInUseException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CustomKeyStoreNameInUseException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CustomKeyStoreNameInUseException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CustomKeyStoreNameInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because KMS cannot find a custom key store with the
+// specified key store name or ID.
+type CustomKeyStoreNotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *CustomKeyStoreNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *CustomKeyStoreNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *CustomKeyStoreNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "CustomKeyStoreNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *CustomKeyStoreNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The system timed out while trying to fulfill the request. You can retry the
+// request.
+type DependencyTimeoutException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *DependencyTimeoutException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *DependencyTimeoutException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *DependencyTimeoutException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "DependencyTimeoutException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *DependencyTimeoutException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The request was rejected because the specified KMS key is not enabled.
+type DisabledException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *DisabledException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *DisabledException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *DisabledException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "DisabledException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *DisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the DryRun parameter was specified.
+type DryRunOperationException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *DryRunOperationException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *DryRunOperationException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *DryRunOperationException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "DryRunOperationException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *DryRunOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified import token is expired. Use GetParametersForImport to
+// get a new import token and public key, use the new public key to encrypt the key
+// material, and then try the request again.
+type ExpiredImportTokenException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *ExpiredImportTokenException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *ExpiredImportTokenException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *ExpiredImportTokenException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "ExpiredImportTokenException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *ExpiredImportTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified KMS key cannot decrypt the data.
+// The KeyId in a Decrypt request and the SourceKeyId in a ReEncrypt request must identify the
+// same KMS key that was used to encrypt the ciphertext.
+type IncorrectKeyException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *IncorrectKeyException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *IncorrectKeyException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *IncorrectKeyException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "IncorrectKeyException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *IncorrectKeyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the key material in the request is, expired,
+// invalid, or is not the same key material that was previously imported into this
+// KMS key.
+type IncorrectKeyMaterialException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *IncorrectKeyMaterialException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *IncorrectKeyMaterialException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *IncorrectKeyMaterialException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "IncorrectKeyMaterialException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *IncorrectKeyMaterialException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the trust anchor certificate in the request to
+// create an CloudHSM key store is not the trust anchor certificate for the
+// specified CloudHSM cluster.
+//
+// When you [initialize the CloudHSM cluster], you create the trust anchor certificate and save it in the
+// customerCA.crt file.
+//
+// [initialize the CloudHSM cluster]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr
+type IncorrectTrustAnchorException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *IncorrectTrustAnchorException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *IncorrectTrustAnchorException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *IncorrectTrustAnchorException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "IncorrectTrustAnchorException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *IncorrectTrustAnchorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified alias name is not valid.
+type InvalidAliasNameException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidAliasNameException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidAliasNameException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidAliasNameException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidAliasNameException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidAliasNameException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because a specified ARN, or an ARN in a key policy, is
+// not valid.
+type InvalidArnException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidArnException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidArnException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidArnException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidArnException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidArnException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// From the Decrypt or ReEncrypt operation, the request was rejected because the specified
+// ciphertext, or additional authenticated data incorporated into the ciphertext,
+// such as the encryption context, is corrupted, missing, or otherwise invalid.
+//
+// From the ImportKeyMaterial operation, the request was rejected because KMS could not decrypt the
+// encrypted (wrapped) key material.
+type InvalidCiphertextException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidCiphertextException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidCiphertextException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidCiphertextException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidCiphertextException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidCiphertextException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified GrantId is not valid.
+type InvalidGrantIdException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidGrantIdException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidGrantIdException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidGrantIdException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidGrantIdException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidGrantIdException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified grant token is not valid.
+type InvalidGrantTokenException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidGrantTokenException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidGrantTokenException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidGrantTokenException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidGrantTokenException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidGrantTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the provided import token is invalid or is
+// associated with a different KMS key.
+type InvalidImportTokenException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidImportTokenException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidImportTokenException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidImportTokenException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidImportTokenException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidImportTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected for one of the following reasons:
+//
+// - The KeyUsage value of the KMS key is incompatible with the API operation.
+//
+// - The encryption algorithm or signing algorithm specified for the operation
+// is incompatible with the type of key material in the KMS key (KeySpec ).
+//
+// For encrypting, decrypting, re-encrypting, and generating data keys, the
+// KeyUsage must be ENCRYPT_DECRYPT . For signing and verifying messages, the
+// KeyUsage must be SIGN_VERIFY . For generating and verifying message
+// authentication codes (MACs), the KeyUsage must be GENERATE_VERIFY_MAC . For
+// deriving key agreement secrets, the KeyUsage must be KEY_AGREEMENT . To find the
+// KeyUsage of a KMS key, use the DescribeKey operation.
+//
+// To find the encryption or signing algorithms supported for a particular KMS
+// key, use the DescribeKeyoperation.
+type InvalidKeyUsageException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidKeyUsageException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidKeyUsageException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidKeyUsageException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidKeyUsageException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidKeyUsageException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the marker that specifies where pagination
+// should next begin is not valid.
+type InvalidMarkerException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *InvalidMarkerException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *InvalidMarkerException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *InvalidMarkerException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "InvalidMarkerException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *InvalidMarkerException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified KMS key was not available. You
+// can retry the request.
+type KeyUnavailableException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KeyUnavailableException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KeyUnavailableException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KeyUnavailableException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KeyUnavailableException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KeyUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The request was rejected because an internal exception occurred. The request
+// can be retried.
+type KMSInternalException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KMSInternalException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KMSInternalException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KMSInternalException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KMSInternalException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KMSInternalException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer }
+
+// The request was rejected because the HMAC verification failed. HMAC
+// verification fails when the HMAC computed by using the specified message, HMAC
+// KMS key, and MAC algorithm does not match the HMAC specified in the request.
+type KMSInvalidMacException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KMSInvalidMacException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KMSInvalidMacException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KMSInvalidMacException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KMSInvalidMacException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KMSInvalidMacException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the signature verification failed. Signature
+// verification fails when it cannot confirm that signature was produced by signing
+// the specified message with the specified KMS key and signing algorithm.
+type KMSInvalidSignatureException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KMSInvalidSignatureException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KMSInvalidSignatureException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KMSInvalidSignatureException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KMSInvalidSignatureException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KMSInvalidSignatureException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the state of the specified resource is not
+// valid for this request.
+//
+// This exceptions means one of the following:
+//
+// - The key state of the KMS key is not compatible with the operation.
+//
+// To find the key state, use the DescribeKeyoperation. For more information about which key
+//
+// states are compatible with each KMS operation, see [Key states of KMS keys]in the Key Management
+// Service Developer Guide .
+//
+// - For cryptographic operations on KMS keys in custom key stores, this
+// exception represents a general failure with many possible causes. To identify
+// the cause, see the error message that accompanies the exception.
+//
+// [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+type KMSInvalidStateException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *KMSInvalidStateException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *KMSInvalidStateException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *KMSInvalidStateException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "KMSInvalidStateException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *KMSInvalidStateException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because a quota was exceeded. For more information,
+// see [Quotas]in the Key Management Service Developer Guide.
+//
+// [Quotas]: https://docs.aws.amazon.com/kms/latest/developerguide/limits.html
+type LimitExceededException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *LimitExceededException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *LimitExceededException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *LimitExceededException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "LimitExceededException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified policy is not syntactically or
+// semantically correct.
+type MalformedPolicyDocumentException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *MalformedPolicyDocumentException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *MalformedPolicyDocumentException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *MalformedPolicyDocumentException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "MalformedPolicyDocumentException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified entity or resource could not be
+// found.
+type NotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *NotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *NotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *NotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "NotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *NotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because one or more tags are not valid.
+type TagException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *TagException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *TagException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *TagException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "TagException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *TagException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because a specified parameter is not supported or a
+// specified resource is not valid for this operation.
+type UnsupportedOperationException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *UnsupportedOperationException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *UnsupportedOperationException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *UnsupportedOperationException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "UnsupportedOperationException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *UnsupportedOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the ( XksKeyId ) is already associated with
+// another KMS key in this external key store. Each KMS key in an external key
+// store must be associated with a different external key.
+type XksKeyAlreadyInUseException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksKeyAlreadyInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksKeyAlreadyInUseException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksKeyAlreadyInUseException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksKeyAlreadyInUseException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksKeyAlreadyInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the external key specified by the XksKeyId
+// parameter did not meet the configuration requirements for an external key store.
+//
+// The external key must be an AES-256 symmetric key that is enabled and performs
+// encryption and decryption.
+type XksKeyInvalidConfigurationException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksKeyInvalidConfigurationException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksKeyInvalidConfigurationException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksKeyInvalidConfigurationException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksKeyInvalidConfigurationException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksKeyInvalidConfigurationException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// The request was rejected because the external key store proxy could not find
+// the external key. This exception is thrown when the value of the XksKeyId
+// parameter doesn't identify a key in the external key manager associated with the
+// external key proxy.
+//
+// Verify that the XksKeyId represents an existing key in the external key
+// manager. Use the key identifier that the external key store proxy uses to
+// identify the key. For details, see the documentation provided with your external
+// key store proxy or key manager.
+type XksKeyNotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksKeyNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksKeyNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksKeyNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksKeyNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksKeyNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the proxy credentials failed to authenticate
+// to the specified external key store proxy. The specified external key store
+// proxy rejected a status request from KMS due to invalid credentials. This can
+// indicate an error in the credentials or in the identification of the external
+// key store proxy.
+type XksProxyIncorrectAuthenticationCredentialException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksProxyIncorrectAuthenticationCredentialException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksProxyIncorrectAuthenticationCredentialException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksProxyIncorrectAuthenticationCredentialException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksProxyIncorrectAuthenticationCredentialException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksProxyIncorrectAuthenticationCredentialException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// The request was rejected because the external key store proxy is not configured
+// correctly. To identify the cause, see the error message that accompanies the
+// exception.
+type XksProxyInvalidConfigurationException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksProxyInvalidConfigurationException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksProxyInvalidConfigurationException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksProxyInvalidConfigurationException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksProxyInvalidConfigurationException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksProxyInvalidConfigurationException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// KMS cannot interpret the response it received from the external key store
+// proxy. The problem might be a poorly constructed response, but it could also be
+// a transient network issue. If you see this error repeatedly, report it to the
+// proxy vendor.
+type XksProxyInvalidResponseException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksProxyInvalidResponseException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksProxyInvalidResponseException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksProxyInvalidResponseException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksProxyInvalidResponseException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksProxyInvalidResponseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the XksProxyUriEndpoint is already associated
+// with another external key store in this Amazon Web Services Region. To identify
+// the cause, see the error message that accompanies the exception.
+type XksProxyUriEndpointInUseException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksProxyUriEndpointInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksProxyUriEndpointInUseException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksProxyUriEndpointInUseException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksProxyUriEndpointInUseException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksProxyUriEndpointInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the concatenation of the XksProxyUriEndpoint
+// and XksProxyUriPath is already associated with another external key store in
+// this Amazon Web Services Region. Each external key store in a Region must use a
+// unique external key store proxy API address.
+type XksProxyUriInUseException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksProxyUriInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksProxyUriInUseException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksProxyUriInUseException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksProxyUriInUseException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksProxyUriInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// KMS was unable to reach the specified XksProxyUriPath . The path must be
+// reachable before you create the external key store or update its settings.
+//
+// This exception is also thrown when the external key store proxy response to a
+// GetHealthStatus request indicates that all external key manager instances are
+// unavailable.
+type XksProxyUriUnreachableException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksProxyUriUnreachableException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksProxyUriUnreachableException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksProxyUriUnreachableException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksProxyUriUnreachableException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksProxyUriUnreachableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
+
+// The request was rejected because the specified Amazon VPC endpoint service is
+// already associated with another external key store in this Amazon Web Services
+// Region. Each external key store in a Region must use a different Amazon VPC
+// endpoint service.
+type XksProxyVpcEndpointServiceInUseException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksProxyVpcEndpointServiceInUseException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksProxyVpcEndpointServiceInUseException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksProxyVpcEndpointServiceInUseException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksProxyVpcEndpointServiceInUseException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksProxyVpcEndpointServiceInUseException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// The request was rejected because the Amazon VPC endpoint service configuration
+// does not fulfill the requirements for an external key store. To identify the
+// cause, see the error message that accompanies the exception and [review the requirements]for Amazon VPC
+// endpoint service connectivity for an external key store.
+//
+// [review the requirements]: https://docs.aws.amazon.com/kms/latest/developerguide/vpc-connectivity.html#xks-vpc-requirements
+type XksProxyVpcEndpointServiceInvalidConfigurationException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksProxyVpcEndpointServiceInvalidConfigurationException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksProxyVpcEndpointServiceInvalidConfigurationException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksProxyVpcEndpointServiceInvalidConfigurationException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksProxyVpcEndpointServiceInvalidConfigurationException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksProxyVpcEndpointServiceInvalidConfigurationException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
+
+// The request was rejected because KMS could not find the specified VPC endpoint
+// service. Use DescribeCustomKeyStoresto verify the VPC endpoint service name for the external key
+// store. Also, confirm that the Allow principals list for the VPC endpoint
+// service includes the KMS service principal for the Region, such as
+// cks.kms.us-east-1.amazonaws.com .
+type XksProxyVpcEndpointServiceNotFoundException struct {
+ Message *string
+
+ ErrorCodeOverride *string
+
+ noSmithyDocumentSerde
+}
+
+func (e *XksProxyVpcEndpointServiceNotFoundException) Error() string {
+ return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
+}
+func (e *XksProxyVpcEndpointServiceNotFoundException) ErrorMessage() string {
+ if e.Message == nil {
+ return ""
+ }
+ return *e.Message
+}
+func (e *XksProxyVpcEndpointServiceNotFoundException) ErrorCode() string {
+ if e == nil || e.ErrorCodeOverride == nil {
+ return "XksProxyVpcEndpointServiceNotFoundException"
+ }
+ return *e.ErrorCodeOverride
+}
+func (e *XksProxyVpcEndpointServiceNotFoundException) ErrorFault() smithy.ErrorFault {
+ return smithy.FaultClient
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/types.go
new file mode 100644
index 000000000..62a8f7f8b
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/types/types.go
@@ -0,0 +1,691 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package types
+
+import (
+ smithydocument "github.com/aws/smithy-go/document"
+ "time"
+)
+
+// Contains information about an alias.
+type AliasListEntry struct {
+
+ // String that contains the key ARN.
+ AliasArn *string
+
+ // String that contains the alias. This value begins with alias/ .
+ AliasName *string
+
+ // Date and time that the alias was most recently created in the account and
+ // Region. Formatted as Unix time.
+ CreationDate *time.Time
+
+ // Date and time that the alias was most recently associated with a KMS key in the
+ // account and Region. Formatted as Unix time.
+ LastUpdatedDate *time.Time
+
+ // String that contains the key identifier of the KMS key associated with the
+ // alias.
+ TargetKeyId *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains information about each custom key store in the custom key store list.
+type CustomKeyStoresListEntry struct {
+
+ // A unique identifier for the CloudHSM cluster that is associated with an
+ // CloudHSM key store. This field appears only when the CustomKeyStoreType is
+ // AWS_CLOUDHSM .
+ CloudHsmClusterId *string
+
+ // Describes the connection error. This field appears in the response only when
+ // the ConnectionState is FAILED .
+ //
+ // Many failures can be resolved by updating the properties of the custom key
+ // store. To update a custom key store, disconnect it (DisconnectCustomKeyStore ), correct the errors (UpdateCustomKeyStore ),
+ // and try to connect again (ConnectCustomKeyStore ). For additional help resolving these errors, see [How to Fix a Connection Failure]
+ // in Key Management Service Developer Guide.
+ //
+ // All custom key stores:
+ //
+ // - INTERNAL_ERROR — KMS could not complete the request due to an internal
+ // error. Retry the request. For ConnectCustomKeyStore requests, disconnect the
+ // custom key store before trying to connect again.
+ //
+ // - NETWORK_ERRORS — Network errors are preventing KMS from connecting the
+ // custom key store to its backing key store.
+ //
+ // CloudHSM key stores:
+ //
+ // - CLUSTER_NOT_FOUND — KMS cannot find the CloudHSM cluster with the specified
+ // cluster ID.
+ //
+ // - INSUFFICIENT_CLOUDHSM_HSMS — The associated CloudHSM cluster does not
+ // contain any active HSMs. To connect a custom key store to its CloudHSM cluster,
+ // the cluster must contain at least one active HSM.
+ //
+ // - INSUFFICIENT_FREE_ADDRESSES_IN_SUBNET — At least one private subnet
+ // associated with the CloudHSM cluster doesn't have any available IP addresses. A
+ // CloudHSM key store connection requires one free IP address in each of the
+ // associated private subnets, although two are preferable. For details, see [How to Fix a Connection Failure]in
+ // the Key Management Service Developer Guide.
+ //
+ // - INVALID_CREDENTIALS — The KeyStorePassword for the custom key store doesn't
+ // match the current password of the kmsuser crypto user in the CloudHSM cluster.
+ // Before you can connect your custom key store to its CloudHSM cluster, you must
+ // change the kmsuser account password and update the KeyStorePassword value for
+ // the custom key store.
+ //
+ // - SUBNET_NOT_FOUND — A subnet in the CloudHSM cluster configuration was
+ // deleted. If KMS cannot find all of the subnets in the cluster configuration,
+ // attempts to connect the custom key store to the CloudHSM cluster fail. To fix
+ // this error, create a cluster from a recent backup and associate it with your
+ // custom key store. (This process creates a new cluster configuration with a VPC
+ // and private subnets.) For details, see [How to Fix a Connection Failure]in the Key Management Service
+ // Developer Guide.
+ //
+ // - USER_LOCKED_OUT — The kmsuser CU account is locked out of the associated
+ // CloudHSM cluster due to too many failed password attempts. Before you can
+ // connect your custom key store to its CloudHSM cluster, you must change the
+ // kmsuser account password and update the key store password value for the
+ // custom key store.
+ //
+ // - USER_LOGGED_IN — The kmsuser CU account is logged into the associated
+ // CloudHSM cluster. This prevents KMS from rotating the kmsuser account password
+ // and logging into the cluster. Before you can connect your custom key store to
+ // its CloudHSM cluster, you must log the kmsuser CU out of the cluster. If you
+ // changed the kmsuser password to log into the cluster, you must also and update
+ // the key store password value for the custom key store. For help, see [How to Log Out and Reconnect]in the
+ // Key Management Service Developer Guide.
+ //
+ // - USER_NOT_FOUND — KMS cannot find a kmsuser CU account in the associated
+ // CloudHSM cluster. Before you can connect your custom key store to its CloudHSM
+ // cluster, you must create a kmsuser CU account in the cluster, and then update
+ // the key store password value for the custom key store.
+ //
+ // External key stores:
+ //
+ // - INVALID_CREDENTIALS — One or both of the XksProxyAuthenticationCredential
+ // values is not valid on the specified external key store proxy.
+ //
+ // - XKS_PROXY_ACCESS_DENIED — KMS requests are denied access to the external key
+ // store proxy. If the external key store proxy has authorization rules, verify
+ // that they permit KMS to communicate with the proxy on your behalf.
+ //
+ // - XKS_PROXY_INVALID_CONFIGURATION — A configuration error is preventing the
+ // external key store from connecting to its proxy. Verify the value of the
+ // XksProxyUriPath .
+ //
+ // - XKS_PROXY_INVALID_RESPONSE — KMS cannot interpret the response from the
+ // external key store proxy. If you see this connection error code repeatedly,
+ // notify your external key store proxy vendor.
+ //
+ // - XKS_PROXY_INVALID_TLS_CONFIGURATION — KMS cannot connect to the external key
+ // store proxy because the TLS configuration is invalid. Verify that the XKS proxy
+ // supports TLS 1.2 or 1.3. Also, verify that the TLS certificate is not expired,
+ // and that it matches the hostname in the XksProxyUriEndpoint value, and that it
+ // is signed by a certificate authority included in the [Trusted Certificate Authorities]list.
+ //
+ // - XKS_PROXY_NOT_REACHABLE — KMS can't communicate with your external key store
+ // proxy. Verify that the XksProxyUriEndpoint and XksProxyUriPath are correct.
+ // Use the tools for your external key store proxy to verify that the proxy is
+ // active and available on its network. Also, verify that your external key manager
+ // instances are operating properly. Connection attempts fail with this connection
+ // error code if the proxy reports that all external key manager instances are
+ // unavailable.
+ //
+ // - XKS_PROXY_TIMED_OUT — KMS can connect to the external key store proxy, but
+ // the proxy does not respond to KMS in the time allotted. If you see this
+ // connection error code repeatedly, notify your external key store proxy vendor.
+ //
+ // - XKS_VPC_ENDPOINT_SERVICE_INVALID_CONFIGURATION — The Amazon VPC endpoint
+ // service configuration doesn't conform to the requirements for an KMS external
+ // key store.
+ //
+ // - The VPC endpoint service must be an endpoint service for interface
+ // endpoints in the caller's Amazon Web Services account.
+ //
+ // - It must have a network load balancer (NLB) connected to at least two
+ // subnets, each in a different Availability Zone.
+ //
+ // - The Allow principals list must include the KMS service principal for the
+ // Region, cks.kms..amazonaws.com , such as cks.kms.us-east-1.amazonaws.com .
+ //
+ // - It must not require [acceptance]of connection requests.
+ //
+ // - It must have a private DNS name. The private DNS name for an external key
+ // store with VPC_ENDPOINT_SERVICE connectivity must be unique in its Amazon Web
+ // Services Region.
+ //
+ // - The domain of the private DNS name must have a [verification status]of verified .
+ //
+ // - The [TLS certificate]specifies the private DNS hostname at which the endpoint is reachable.
+ //
+ // - XKS_VPC_ENDPOINT_SERVICE_NOT_FOUND — KMS can't find the VPC endpoint service
+ // that it uses to communicate with the external key store proxy. Verify that the
+ // XksProxyVpcEndpointServiceName is correct and the KMS service principal has
+ // service consumer permissions on the Amazon VPC endpoint service.
+ //
+ // [acceptance]: https://docs.aws.amazon.com/vpc/latest/privatelink/create-endpoint-service.html
+ // [verification status]: https://docs.aws.amazon.com/vpc/latest/privatelink/verify-domains.html
+ // [How to Log Out and Reconnect]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#login-kmsuser-2
+ // [TLS certificate]: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html
+ // [Trusted Certificate Authorities]: https://github.com/aws/aws-kms-xksproxy-api-spec/blob/main/TrustedCertificateAuthorities
+ // [How to Fix a Connection Failure]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-failed
+ ConnectionErrorCode ConnectionErrorCodeType
+
+ // Indicates whether the custom key store is connected to its backing key store.
+ // For an CloudHSM key store, the ConnectionState indicates whether it is
+ // connected to its CloudHSM cluster. For an external key store, the
+ // ConnectionState indicates whether it is connected to the external key store
+ // proxy that communicates with your external key manager.
+ //
+ // You can create and use KMS keys in your custom key stores only when its
+ // ConnectionState is CONNECTED .
+ //
+ // The ConnectionState value is DISCONNECTED only if the key store has never been
+ // connected or you use the DisconnectCustomKeyStoreoperation to disconnect it. If the value is CONNECTED
+ // but you are having trouble using the custom key store, make sure that the
+ // backing key store is reachable and active. For an CloudHSM key store, verify
+ // that its associated CloudHSM cluster is active and contains at least one active
+ // HSM. For an external key store, verify that the external key store proxy and
+ // external key manager are connected and enabled.
+ //
+ // A value of FAILED indicates that an attempt to connect was unsuccessful. The
+ // ConnectionErrorCode field in the response indicates the cause of the failure.
+ // For help resolving a connection failure, see [Troubleshooting a custom key store]in the Key Management Service
+ // Developer Guide.
+ //
+ // [Troubleshooting a custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html
+ ConnectionState ConnectionStateType
+
+ // The date and time when the custom key store was created.
+ CreationDate *time.Time
+
+ // A unique identifier for the custom key store.
+ CustomKeyStoreId *string
+
+ // The user-specified friendly name for the custom key store.
+ CustomKeyStoreName *string
+
+ // Indicates the type of the custom key store. AWS_CLOUDHSM indicates a custom key
+ // store backed by an CloudHSM cluster. EXTERNAL_KEY_STORE indicates a custom key
+ // store backed by an external key store proxy and external key manager outside of
+ // Amazon Web Services.
+ CustomKeyStoreType CustomKeyStoreType
+
+ // The trust anchor certificate of the CloudHSM cluster associated with an
+ // CloudHSM key store. When you [initialize the cluster], you create this certificate and save it in the
+ // customerCA.crt file.
+ //
+ // This field appears only when the CustomKeyStoreType is AWS_CLOUDHSM .
+ //
+ // [initialize the cluster]: https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr
+ TrustAnchorCertificate *string
+
+ // Configuration settings for the external key store proxy (XKS proxy). The
+ // external key store proxy translates KMS requests into a format that your
+ // external key manager can understand. The proxy configuration includes connection
+ // information that KMS requires.
+ //
+ // This field appears only when the CustomKeyStoreType is EXTERNAL_KEY_STORE .
+ XksProxyConfiguration *XksProxyConfigurationType
+
+ noSmithyDocumentSerde
+}
+
+// Use this structure to allow [cryptographic operations] in the grant only when the operation request
+// includes the specified [encryption context].
+//
+// KMS applies the grant constraints only to cryptographic operations that support
+// an encryption context, that is, all cryptographic operations with a [symmetric KMS key]. Grant
+// constraints are not applied to operations that do not support an encryption
+// context, such as cryptographic operations with asymmetric KMS keys and
+// management operations, such as DescribeKeyor RetireGrant.
+//
+// In a cryptographic operation, the encryption context in the decryption
+// operation must be an exact, case-sensitive match for the keys and values in the
+// encryption context of the encryption operation. Only the order of the pairs can
+// vary.
+//
+// However, in a grant constraint, the key in each key-value pair is not case
+// sensitive, but the value is case sensitive.
+//
+// To avoid confusion, do not use multiple encryption context pairs that differ
+// only by case. To require a fully case-sensitive encryption context, use the
+// kms:EncryptionContext: and kms:EncryptionContextKeys conditions in an IAM or
+// key policy. For details, see [kms:EncryptionContext:]in the Key Management Service Developer Guide .
+//
+// [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+// [kms:EncryptionContext:]: https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-context
+// [encryption context]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context
+// [symmetric KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#symmetric-cmks
+type GrantConstraints struct {
+
+ // A list of key-value pairs that must match the encryption context in the [cryptographic operation]
+ // request. The grant allows the operation only when the encryption context in the
+ // request is the same as the encryption context specified in this constraint.
+ //
+ // [cryptographic operation]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ EncryptionContextEquals map[string]string
+
+ // A list of key-value pairs that must be included in the encryption context of
+ // the [cryptographic operation]request. The grant allows the cryptographic operation only when the
+ // encryption context in the request includes the key-value pairs specified in this
+ // constraint, although it can include additional key-value pairs.
+ //
+ // [cryptographic operation]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ EncryptionContextSubset map[string]string
+
+ noSmithyDocumentSerde
+}
+
+// Contains information about a grant.
+type GrantListEntry struct {
+
+ // A list of key-value pairs that must be present in the encryption context of
+ // certain subsequent operations that the grant allows.
+ Constraints *GrantConstraints
+
+ // The date and time when the grant was created.
+ CreationDate *time.Time
+
+ // The unique identifier for the grant.
+ GrantId *string
+
+ // The identity that gets the permissions in the grant.
+ //
+ // The GranteePrincipal field in the ListGrants response usually contains the user
+ // or role designated as the grantee principal in the grant. However, when the
+ // grantee principal in the grant is an Amazon Web Services service, the
+ // GranteePrincipal field contains the [service principal], which might represent several different
+ // grantee principals.
+ //
+ // [service principal]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services
+ GranteePrincipal *string
+
+ // The Amazon Web Services account under which the grant was issued.
+ IssuingAccount *string
+
+ // The unique identifier for the KMS key to which the grant applies.
+ KeyId *string
+
+ // The friendly name that identifies the grant. If a name was provided in the CreateGrant
+ // request, that name is returned. Otherwise this value is null.
+ Name *string
+
+ // The list of operations permitted by the grant.
+ Operations []GrantOperation
+
+ // The principal that can retire the grant.
+ RetiringPrincipal *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains information about each entry in the key list.
+type KeyListEntry struct {
+
+ // ARN of the key.
+ KeyArn *string
+
+ // Unique identifier of the key.
+ KeyId *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains metadata about a KMS key.
+//
+// This data type is used as a response element for the CreateKey, DescribeKey, and ReplicateKey operations.
+type KeyMetadata struct {
+
+ // The globally unique identifier for the KMS key.
+ //
+ // This member is required.
+ KeyId *string
+
+ // The twelve-digit account ID of the Amazon Web Services account that owns the
+ // KMS key.
+ AWSAccountId *string
+
+ // The Amazon Resource Name (ARN) of the KMS key. For examples, see [Key Management Service (KMS)] in the
+ // Example ARNs section of the Amazon Web Services General Reference.
+ //
+ // [Key Management Service (KMS)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms
+ Arn *string
+
+ // The cluster ID of the CloudHSM cluster that contains the key material for the
+ // KMS key. When you create a KMS key in an CloudHSM [custom key store], KMS creates the key
+ // material for the KMS key in the associated CloudHSM cluster. This field is
+ // present only when the KMS key is created in an CloudHSM key store.
+ //
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ CloudHsmClusterId *string
+
+ // The date and time when the KMS key was created.
+ CreationDate *time.Time
+
+ // A unique identifier for the [custom key store] that contains the KMS key. This field is present
+ // only when the KMS key is created in a custom key store.
+ //
+ // [custom key store]: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html
+ CustomKeyStoreId *string
+
+ // Instead, use the KeySpec field.
+ //
+ // The KeySpec and CustomerMasterKeySpec fields have the same value. We recommend
+ // that you use the KeySpec field in your code. However, to avoid breaking
+ // changes, KMS supports both fields.
+ //
+ // Deprecated: This field has been deprecated. Instead, use the KeySpec field.
+ CustomerMasterKeySpec CustomerMasterKeySpec
+
+ // The date and time after which KMS deletes this KMS key. This value is present
+ // only when the KMS key is scheduled for deletion, that is, when its KeyState is
+ // PendingDeletion .
+ //
+ // When the primary key in a multi-Region key is scheduled for deletion but still
+ // has replica keys, its key state is PendingReplicaDeletion and the length of its
+ // waiting period is displayed in the PendingDeletionWindowInDays field.
+ DeletionDate *time.Time
+
+ // The description of the KMS key.
+ Description *string
+
+ // Specifies whether the KMS key is enabled. When KeyState is Enabled this value
+ // is true, otherwise it is false.
+ Enabled bool
+
+ // The encryption algorithms that the KMS key supports. You cannot use the KMS key
+ // with other encryption algorithms within KMS.
+ //
+ // This value is present only when the KeyUsage of the KMS key is ENCRYPT_DECRYPT .
+ EncryptionAlgorithms []EncryptionAlgorithmSpec
+
+ // Specifies whether the KMS key's key material expires. This value is present
+ // only when Origin is EXTERNAL , otherwise this value is omitted.
+ ExpirationModel ExpirationModelType
+
+ // The key agreement algorithm used to derive a shared secret.
+ KeyAgreementAlgorithms []KeyAgreementAlgorithmSpec
+
+ // The manager of the KMS key. KMS keys in your Amazon Web Services account are
+ // either customer managed or Amazon Web Services managed. For more information
+ // about the difference, see [KMS keys]in the Key Management Service Developer Guide.
+ //
+ // [KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys
+ KeyManager KeyManagerType
+
+ // Describes the type of key material in the KMS key.
+ KeySpec KeySpec
+
+ // The current status of the KMS key.
+ //
+ // For more information about how key state affects the use of a KMS key, see [Key states of KMS keys] in
+ // the Key Management Service Developer Guide.
+ //
+ // [Key states of KMS keys]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
+ KeyState KeyState
+
+ // The [cryptographic operations] for which you can use the KMS key.
+ //
+ // [cryptographic operations]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations
+ KeyUsage KeyUsageType
+
+ // The message authentication code (MAC) algorithm that the HMAC KMS key supports.
+ //
+ // This value is present only when the KeyUsage of the KMS key is
+ // GENERATE_VERIFY_MAC .
+ MacAlgorithms []MacAlgorithmSpec
+
+ // Indicates whether the KMS key is a multi-Region ( True ) or regional ( False )
+ // key. This value is True for multi-Region primary and replica keys and False for
+ // regional KMS keys.
+ //
+ // For more information about multi-Region keys, see [Multi-Region keys in KMS] in the Key Management
+ // Service Developer Guide.
+ //
+ // [Multi-Region keys in KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html
+ MultiRegion *bool
+
+ // Lists the primary and replica keys in same multi-Region key. This field is
+ // present only when the value of the MultiRegion field is True .
+ //
+ // For more information about any listed KMS key, use the DescribeKey operation.
+ //
+ // - MultiRegionKeyType indicates whether the KMS key is a PRIMARY or REPLICA key.
+ //
+ // - PrimaryKey displays the key ARN and Region of the primary key. This field
+ // displays the current KMS key if it is the primary key.
+ //
+ // - ReplicaKeys displays the key ARNs and Regions of all replica keys. This
+ // field includes the current KMS key if it is a replica key.
+ MultiRegionConfiguration *MultiRegionConfiguration
+
+ // The source of the key material for the KMS key. When this value is AWS_KMS , KMS
+ // created the key material. When this value is EXTERNAL , the key material was
+ // imported or the KMS key doesn't have any key material. When this value is
+ // AWS_CLOUDHSM , the key material was created in the CloudHSM cluster associated
+ // with a custom key store.
+ Origin OriginType
+
+ // The waiting period before the primary key in a multi-Region key is deleted.
+ // This waiting period begins when the last of its replica keys is deleted. This
+ // value is present only when the KeyState of the KMS key is PendingReplicaDeletion
+ // . That indicates that the KMS key is the primary key in a multi-Region key, it
+ // is scheduled for deletion, and it still has existing replica keys.
+ //
+ // When a single-Region KMS key or a multi-Region replica key is scheduled for
+ // deletion, its deletion date is displayed in the DeletionDate field. However,
+ // when the primary key in a multi-Region key is scheduled for deletion, its
+ // waiting period doesn't begin until all of its replica keys are deleted. This
+ // value displays that waiting period. When the last replica key in the
+ // multi-Region key is deleted, the KeyState of the scheduled primary key changes
+ // from PendingReplicaDeletion to PendingDeletion and the deletion date appears in
+ // the DeletionDate field.
+ PendingDeletionWindowInDays *int32
+
+ // The signing algorithms that the KMS key supports. You cannot use the KMS key
+ // with other signing algorithms within KMS.
+ //
+ // This field appears only when the KeyUsage of the KMS key is SIGN_VERIFY .
+ SigningAlgorithms []SigningAlgorithmSpec
+
+ // The time at which the imported key material expires. When the key material
+ // expires, KMS deletes the key material and the KMS key becomes unusable. This
+ // value is present only for KMS keys whose Origin is EXTERNAL and whose
+ // ExpirationModel is KEY_MATERIAL_EXPIRES , otherwise this value is omitted.
+ ValidTo *time.Time
+
+ // Information about the external key that is associated with a KMS key in an
+ // external key store.
+ //
+ // For more information, see [External key] in the Key Management Service Developer Guide.
+ //
+ // [External key]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key
+ XksKeyConfiguration *XksKeyConfigurationType
+
+ noSmithyDocumentSerde
+}
+
+// Describes the configuration of this multi-Region key. This field appears only
+// when the KMS key is a primary or replica of a multi-Region key.
+//
+// For more information about any listed KMS key, use the DescribeKey operation.
+type MultiRegionConfiguration struct {
+
+ // Indicates whether the KMS key is a PRIMARY or REPLICA key.
+ MultiRegionKeyType MultiRegionKeyType
+
+ // Displays the key ARN and Region of the primary key. This field includes the
+ // current KMS key if it is the primary key.
+ PrimaryKey *MultiRegionKey
+
+ // displays the key ARNs and Regions of all replica keys. This field includes the
+ // current KMS key if it is a replica key.
+ ReplicaKeys []MultiRegionKey
+
+ noSmithyDocumentSerde
+}
+
+// Describes the primary or replica key in a multi-Region key.
+type MultiRegionKey struct {
+
+ // Displays the key ARN of a primary or replica key of a multi-Region key.
+ Arn *string
+
+ // Displays the Amazon Web Services Region of a primary or replica key in a
+ // multi-Region key.
+ Region *string
+
+ noSmithyDocumentSerde
+}
+
+// Contains information about the party that receives the response from the API
+// operation.
+//
+// This data type is designed to support Amazon Web Services Nitro Enclaves, which
+// lets you create an isolated compute environment in Amazon EC2. For information
+// about the interaction between KMS and Amazon Web Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves uses KMS]
+// in the Key Management Service Developer Guide.
+//
+// [How Amazon Web Services Nitro Enclaves uses KMS]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
+type RecipientInfo struct {
+
+ // The attestation document for an Amazon Web Services Nitro Enclave. This
+ // document includes the enclave's public key.
+ AttestationDocument []byte
+
+ // The encryption algorithm that KMS should use with the public key for an Amazon
+ // Web Services Nitro Enclave to encrypt plaintext values for the response. The
+ // only valid value is RSAES_OAEP_SHA_256 .
+ KeyEncryptionAlgorithm KeyEncryptionMechanism
+
+ noSmithyDocumentSerde
+}
+
+// Contains information about completed key material rotations.
+type RotationsListEntry struct {
+
+ // Unique identifier of the key.
+ KeyId *string
+
+ // Date and time that the key material rotation completed. Formatted as Unix time.
+ RotationDate *time.Time
+
+ // Identifies whether the key material rotation was a scheduled [automatic rotation] or an [on-demand rotation].
+ //
+ // [automatic rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-enable-disable
+ // [on-demand rotation]: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotating-keys-on-demand
+ RotationType RotationType
+
+ noSmithyDocumentSerde
+}
+
+// A key-value pair. A tag consists of a tag key and a tag value. Tag keys and tag
+// values are both required, but tag values can be empty (null) strings.
+//
+// Do not include confidential or sensitive information in this field. This field
+// may be displayed in plaintext in CloudTrail logs and other output.
+//
+// For information about the rules that apply to tag keys and tag values, see [User-Defined Tag Restrictions] in
+// the Amazon Web Services Billing and Cost Management User Guide.
+//
+// [User-Defined Tag Restrictions]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html
+type Tag struct {
+
+ // The key of the tag.
+ //
+ // This member is required.
+ TagKey *string
+
+ // The value of the tag.
+ //
+ // This member is required.
+ TagValue *string
+
+ noSmithyDocumentSerde
+}
+
+// Information about the [external key]that is associated with a KMS key in an external key
+// store.
+//
+// This element appears in a CreateKey or DescribeKey response only for a KMS key in an external key
+// store.
+//
+// The external key is a symmetric encryption key that is hosted by an external
+// key manager outside of Amazon Web Services. When you use the KMS key in an
+// external key store in a cryptographic operation, the cryptographic operation is
+// performed in the external key manager using the specified external key. For more
+// information, see [External key]in the Key Management Service Developer Guide.
+//
+// [External key]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key
+// [external key]: https://docs.aws.amazon.com/kms/latest/developerguide/keystore-external.html#concept-external-key
+type XksKeyConfigurationType struct {
+
+ // The ID of the external key in its external key manager. This is the ID that the
+ // external key store proxy uses to identify the external key.
+ Id *string
+
+ noSmithyDocumentSerde
+}
+
+// KMS uses the authentication credential to sign requests that it sends to the
+// external key store proxy (XKS proxy) on your behalf. You establish these
+// credentials on your external key store proxy and report them to KMS.
+//
+// The XksProxyAuthenticationCredential includes two required elements.
+type XksProxyAuthenticationCredentialType struct {
+
+ // A unique identifier for the raw secret access key.
+ //
+ // This member is required.
+ AccessKeyId *string
+
+ // A secret string of 43-64 characters. Valid characters are a-z, A-Z, 0-9, /, +,
+ // and =.
+ //
+ // This member is required.
+ RawSecretAccessKey *string
+
+ noSmithyDocumentSerde
+}
+
+// Detailed information about the external key store proxy (XKS proxy). Your
+// external key store proxy translates KMS requests into a format that your
+// external key manager can understand. These fields appear in a DescribeCustomKeyStoresresponse only
+// when the CustomKeyStoreType is EXTERNAL_KEY_STORE .
+type XksProxyConfigurationType struct {
+
+ // The part of the external key store [proxy authentication credential] that uniquely identifies the secret access
+ // key.
+ //
+ // [proxy authentication credential]: https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateCustomKeyStore.html#KMS-CreateCustomKeyStore-request-XksProxyAuthenticationCredential
+ AccessKeyId *string
+
+ // Indicates whether the external key store proxy uses a public endpoint or an
+ // Amazon VPC endpoint service to communicate with KMS.
+ Connectivity XksProxyConnectivityType
+
+ // The URI endpoint for the external key store proxy.
+ //
+ // If the external key store proxy has a public endpoint, it is displayed here.
+ //
+ // If the external key store proxy uses an Amazon VPC endpoint service name, this
+ // field displays the private DNS name associated with the VPC endpoint service.
+ UriEndpoint *string
+
+ // The path to the external key store proxy APIs.
+ UriPath *string
+
+ // The Amazon VPC endpoint service used to communicate with the external key store
+ // proxy. This field appears only when the external key store proxy uses an Amazon
+ // VPC endpoint service to communicate with KMS.
+ VpcEndpointServiceName *string
+
+ noSmithyDocumentSerde
+}
+
+type noSmithyDocumentSerde = smithydocument.NoSerde
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/kms/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/validators.go
new file mode 100644
index 000000000..58254d141
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/service/kms/validators.go
@@ -0,0 +1,2050 @@
+// Code generated by smithy-go-codegen DO NOT EDIT.
+
+package kms
+
+import (
+ "context"
+ "fmt"
+ "github.com/aws/aws-sdk-go-v2/service/kms/types"
+ smithy "github.com/aws/smithy-go"
+ "github.com/aws/smithy-go/middleware"
+)
+
+type validateOpCancelKeyDeletion struct {
+}
+
+func (*validateOpCancelKeyDeletion) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCancelKeyDeletion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CancelKeyDeletionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCancelKeyDeletionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpConnectCustomKeyStore struct {
+}
+
+func (*validateOpConnectCustomKeyStore) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpConnectCustomKeyStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ConnectCustomKeyStoreInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpConnectCustomKeyStoreInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateAlias struct {
+}
+
+func (*validateOpCreateAlias) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateAliasInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateAliasInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateCustomKeyStore struct {
+}
+
+func (*validateOpCreateCustomKeyStore) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateCustomKeyStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateCustomKeyStoreInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateCustomKeyStoreInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateGrant struct {
+}
+
+func (*validateOpCreateGrant) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateGrant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateGrantInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateGrantInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpCreateKey struct {
+}
+
+func (*validateOpCreateKey) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpCreateKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*CreateKeyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpCreateKeyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDecrypt struct {
+}
+
+func (*validateOpDecrypt) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDecrypt) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DecryptInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDecryptInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteAlias struct {
+}
+
+func (*validateOpDeleteAlias) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteAliasInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteAliasInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteCustomKeyStore struct {
+}
+
+func (*validateOpDeleteCustomKeyStore) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteCustomKeyStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteCustomKeyStoreInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteCustomKeyStoreInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeleteImportedKeyMaterial struct {
+}
+
+func (*validateOpDeleteImportedKeyMaterial) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeleteImportedKeyMaterial) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeleteImportedKeyMaterialInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeleteImportedKeyMaterialInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDeriveSharedSecret struct {
+}
+
+func (*validateOpDeriveSharedSecret) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDeriveSharedSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DeriveSharedSecretInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDeriveSharedSecretInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDescribeKey struct {
+}
+
+func (*validateOpDescribeKey) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDescribeKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DescribeKeyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDescribeKeyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDisableKey struct {
+}
+
+func (*validateOpDisableKey) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDisableKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DisableKeyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDisableKeyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDisableKeyRotation struct {
+}
+
+func (*validateOpDisableKeyRotation) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDisableKeyRotation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DisableKeyRotationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDisableKeyRotationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpDisconnectCustomKeyStore struct {
+}
+
+func (*validateOpDisconnectCustomKeyStore) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpDisconnectCustomKeyStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*DisconnectCustomKeyStoreInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpDisconnectCustomKeyStoreInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpEnableKey struct {
+}
+
+func (*validateOpEnableKey) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpEnableKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*EnableKeyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpEnableKeyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpEnableKeyRotation struct {
+}
+
+func (*validateOpEnableKeyRotation) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpEnableKeyRotation) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*EnableKeyRotationInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpEnableKeyRotationInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpEncrypt struct {
+}
+
+func (*validateOpEncrypt) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpEncrypt) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*EncryptInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpEncryptInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGenerateDataKey struct {
+}
+
+func (*validateOpGenerateDataKey) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGenerateDataKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GenerateDataKeyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGenerateDataKeyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGenerateDataKeyPair struct {
+}
+
+func (*validateOpGenerateDataKeyPair) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGenerateDataKeyPair) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GenerateDataKeyPairInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGenerateDataKeyPairInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGenerateDataKeyPairWithoutPlaintext struct {
+}
+
+func (*validateOpGenerateDataKeyPairWithoutPlaintext) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGenerateDataKeyPairWithoutPlaintext) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GenerateDataKeyPairWithoutPlaintextInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGenerateDataKeyPairWithoutPlaintextInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGenerateDataKeyWithoutPlaintext struct {
+}
+
+func (*validateOpGenerateDataKeyWithoutPlaintext) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGenerateDataKeyWithoutPlaintext) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GenerateDataKeyWithoutPlaintextInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGenerateDataKeyWithoutPlaintextInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGenerateMac struct {
+}
+
+func (*validateOpGenerateMac) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGenerateMac) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GenerateMacInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGenerateMacInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetKeyPolicy struct {
+}
+
+func (*validateOpGetKeyPolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetKeyPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetKeyPolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetKeyPolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetKeyRotationStatus struct {
+}
+
+func (*validateOpGetKeyRotationStatus) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetKeyRotationStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetKeyRotationStatusInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetKeyRotationStatusInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetParametersForImport struct {
+}
+
+func (*validateOpGetParametersForImport) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetParametersForImport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetParametersForImportInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetParametersForImportInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpGetPublicKey struct {
+}
+
+func (*validateOpGetPublicKey) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpGetPublicKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*GetPublicKeyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpGetPublicKeyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpImportKeyMaterial struct {
+}
+
+func (*validateOpImportKeyMaterial) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpImportKeyMaterial) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ImportKeyMaterialInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpImportKeyMaterialInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListGrants struct {
+}
+
+func (*validateOpListGrants) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListGrants) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListGrantsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListGrantsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListKeyPolicies struct {
+}
+
+func (*validateOpListKeyPolicies) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListKeyPolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListKeyPoliciesInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListKeyPoliciesInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListKeyRotations struct {
+}
+
+func (*validateOpListKeyRotations) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListKeyRotations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListKeyRotationsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListKeyRotationsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListResourceTags struct {
+}
+
+func (*validateOpListResourceTags) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListResourceTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListResourceTagsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListResourceTagsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpListRetirableGrants struct {
+}
+
+func (*validateOpListRetirableGrants) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpListRetirableGrants) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ListRetirableGrantsInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpListRetirableGrantsInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpPutKeyPolicy struct {
+}
+
+func (*validateOpPutKeyPolicy) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpPutKeyPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*PutKeyPolicyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpPutKeyPolicyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpReEncrypt struct {
+}
+
+func (*validateOpReEncrypt) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpReEncrypt) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ReEncryptInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpReEncryptInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpReplicateKey struct {
+}
+
+func (*validateOpReplicateKey) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpReplicateKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ReplicateKeyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpReplicateKeyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpRevokeGrant struct {
+}
+
+func (*validateOpRevokeGrant) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpRevokeGrant) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*RevokeGrantInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpRevokeGrantInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpRotateKeyOnDemand struct {
+}
+
+func (*validateOpRotateKeyOnDemand) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpRotateKeyOnDemand) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*RotateKeyOnDemandInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpRotateKeyOnDemandInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpScheduleKeyDeletion struct {
+}
+
+func (*validateOpScheduleKeyDeletion) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpScheduleKeyDeletion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*ScheduleKeyDeletionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpScheduleKeyDeletionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpSign struct {
+}
+
+func (*validateOpSign) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpSign) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*SignInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpSignInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpTagResource struct {
+}
+
+func (*validateOpTagResource) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*TagResourceInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpTagResourceInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUntagResource struct {
+}
+
+func (*validateOpUntagResource) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UntagResourceInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUntagResourceInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateAlias struct {
+}
+
+func (*validateOpUpdateAlias) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateAlias) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateAliasInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateAliasInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateCustomKeyStore struct {
+}
+
+func (*validateOpUpdateCustomKeyStore) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateCustomKeyStore) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateCustomKeyStoreInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateCustomKeyStoreInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdateKeyDescription struct {
+}
+
+func (*validateOpUpdateKeyDescription) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdateKeyDescription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdateKeyDescriptionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdateKeyDescriptionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpUpdatePrimaryRegion struct {
+}
+
+func (*validateOpUpdatePrimaryRegion) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpUpdatePrimaryRegion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*UpdatePrimaryRegionInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpUpdatePrimaryRegionInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpVerify struct {
+}
+
+func (*validateOpVerify) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpVerify) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*VerifyInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpVerifyInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+type validateOpVerifyMac struct {
+}
+
+func (*validateOpVerifyMac) ID() string {
+ return "OperationInputValidation"
+}
+
+func (m *validateOpVerifyMac) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) (
+ out middleware.InitializeOutput, metadata middleware.Metadata, err error,
+) {
+ input, ok := in.Parameters.(*VerifyMacInput)
+ if !ok {
+ return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters)
+ }
+ if err := validateOpVerifyMacInput(input); err != nil {
+ return out, metadata, err
+ }
+ return next.HandleInitialize(ctx, in)
+}
+
+func addOpCancelKeyDeletionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCancelKeyDeletion{}, middleware.After)
+}
+
+func addOpConnectCustomKeyStoreValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpConnectCustomKeyStore{}, middleware.After)
+}
+
+func addOpCreateAliasValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateAlias{}, middleware.After)
+}
+
+func addOpCreateCustomKeyStoreValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateCustomKeyStore{}, middleware.After)
+}
+
+func addOpCreateGrantValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateGrant{}, middleware.After)
+}
+
+func addOpCreateKeyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpCreateKey{}, middleware.After)
+}
+
+func addOpDecryptValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDecrypt{}, middleware.After)
+}
+
+func addOpDeleteAliasValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteAlias{}, middleware.After)
+}
+
+func addOpDeleteCustomKeyStoreValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteCustomKeyStore{}, middleware.After)
+}
+
+func addOpDeleteImportedKeyMaterialValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeleteImportedKeyMaterial{}, middleware.After)
+}
+
+func addOpDeriveSharedSecretValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDeriveSharedSecret{}, middleware.After)
+}
+
+func addOpDescribeKeyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDescribeKey{}, middleware.After)
+}
+
+func addOpDisableKeyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDisableKey{}, middleware.After)
+}
+
+func addOpDisableKeyRotationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDisableKeyRotation{}, middleware.After)
+}
+
+func addOpDisconnectCustomKeyStoreValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpDisconnectCustomKeyStore{}, middleware.After)
+}
+
+func addOpEnableKeyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpEnableKey{}, middleware.After)
+}
+
+func addOpEnableKeyRotationValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpEnableKeyRotation{}, middleware.After)
+}
+
+func addOpEncryptValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpEncrypt{}, middleware.After)
+}
+
+func addOpGenerateDataKeyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGenerateDataKey{}, middleware.After)
+}
+
+func addOpGenerateDataKeyPairValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGenerateDataKeyPair{}, middleware.After)
+}
+
+func addOpGenerateDataKeyPairWithoutPlaintextValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGenerateDataKeyPairWithoutPlaintext{}, middleware.After)
+}
+
+func addOpGenerateDataKeyWithoutPlaintextValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGenerateDataKeyWithoutPlaintext{}, middleware.After)
+}
+
+func addOpGenerateMacValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGenerateMac{}, middleware.After)
+}
+
+func addOpGetKeyPolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetKeyPolicy{}, middleware.After)
+}
+
+func addOpGetKeyRotationStatusValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetKeyRotationStatus{}, middleware.After)
+}
+
+func addOpGetParametersForImportValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetParametersForImport{}, middleware.After)
+}
+
+func addOpGetPublicKeyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpGetPublicKey{}, middleware.After)
+}
+
+func addOpImportKeyMaterialValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpImportKeyMaterial{}, middleware.After)
+}
+
+func addOpListGrantsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListGrants{}, middleware.After)
+}
+
+func addOpListKeyPoliciesValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListKeyPolicies{}, middleware.After)
+}
+
+func addOpListKeyRotationsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListKeyRotations{}, middleware.After)
+}
+
+func addOpListResourceTagsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListResourceTags{}, middleware.After)
+}
+
+func addOpListRetirableGrantsValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpListRetirableGrants{}, middleware.After)
+}
+
+func addOpPutKeyPolicyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpPutKeyPolicy{}, middleware.After)
+}
+
+func addOpReEncryptValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpReEncrypt{}, middleware.After)
+}
+
+func addOpReplicateKeyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpReplicateKey{}, middleware.After)
+}
+
+func addOpRevokeGrantValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpRevokeGrant{}, middleware.After)
+}
+
+func addOpRotateKeyOnDemandValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpRotateKeyOnDemand{}, middleware.After)
+}
+
+func addOpScheduleKeyDeletionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpScheduleKeyDeletion{}, middleware.After)
+}
+
+func addOpSignValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpSign{}, middleware.After)
+}
+
+func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpTagResource{}, middleware.After)
+}
+
+func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After)
+}
+
+func addOpUpdateAliasValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateAlias{}, middleware.After)
+}
+
+func addOpUpdateCustomKeyStoreValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateCustomKeyStore{}, middleware.After)
+}
+
+func addOpUpdateKeyDescriptionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdateKeyDescription{}, middleware.After)
+}
+
+func addOpUpdatePrimaryRegionValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpUpdatePrimaryRegion{}, middleware.After)
+}
+
+func addOpVerifyValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpVerify{}, middleware.After)
+}
+
+func addOpVerifyMacValidationMiddleware(stack *middleware.Stack) error {
+ return stack.Initialize.Add(&validateOpVerifyMac{}, middleware.After)
+}
+
+func validateTag(v *types.Tag) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "Tag"}
+ if v.TagKey == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TagKey"))
+ }
+ if v.TagValue == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TagValue"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateTagList(v []types.Tag) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TagList"}
+ for i := range v {
+ if err := validateTag(&v[i]); err != nil {
+ invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateXksProxyAuthenticationCredentialType(v *types.XksProxyAuthenticationCredentialType) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "XksProxyAuthenticationCredentialType"}
+ if v.AccessKeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId"))
+ }
+ if v.RawSecretAccessKey == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RawSecretAccessKey"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCancelKeyDeletionInput(v *CancelKeyDeletionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CancelKeyDeletionInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpConnectCustomKeyStoreInput(v *ConnectCustomKeyStoreInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ConnectCustomKeyStoreInput"}
+ if v.CustomKeyStoreId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CustomKeyStoreId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateAliasInput(v *CreateAliasInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateAliasInput"}
+ if v.AliasName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AliasName"))
+ }
+ if v.TargetKeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TargetKeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateCustomKeyStoreInput(v *CreateCustomKeyStoreInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateCustomKeyStoreInput"}
+ if v.CustomKeyStoreName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CustomKeyStoreName"))
+ }
+ if v.XksProxyAuthenticationCredential != nil {
+ if err := validateXksProxyAuthenticationCredentialType(v.XksProxyAuthenticationCredential); err != nil {
+ invalidParams.AddNested("XksProxyAuthenticationCredential", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateGrantInput(v *CreateGrantInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateGrantInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.GranteePrincipal == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("GranteePrincipal"))
+ }
+ if v.Operations == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Operations"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpCreateKeyInput(v *CreateKeyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "CreateKeyInput"}
+ if v.Tags != nil {
+ if err := validateTagList(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDecryptInput(v *DecryptInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DecryptInput"}
+ if v.CiphertextBlob == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CiphertextBlob"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteAliasInput(v *DeleteAliasInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteAliasInput"}
+ if v.AliasName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AliasName"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteCustomKeyStoreInput(v *DeleteCustomKeyStoreInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteCustomKeyStoreInput"}
+ if v.CustomKeyStoreId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CustomKeyStoreId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeleteImportedKeyMaterialInput(v *DeleteImportedKeyMaterialInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeleteImportedKeyMaterialInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDeriveSharedSecretInput(v *DeriveSharedSecretInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DeriveSharedSecretInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if len(v.KeyAgreementAlgorithm) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyAgreementAlgorithm"))
+ }
+ if v.PublicKey == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PublicKey"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDescribeKeyInput(v *DescribeKeyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DescribeKeyInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDisableKeyInput(v *DisableKeyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DisableKeyInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDisableKeyRotationInput(v *DisableKeyRotationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DisableKeyRotationInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpDisconnectCustomKeyStoreInput(v *DisconnectCustomKeyStoreInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "DisconnectCustomKeyStoreInput"}
+ if v.CustomKeyStoreId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CustomKeyStoreId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpEnableKeyInput(v *EnableKeyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "EnableKeyInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpEnableKeyRotationInput(v *EnableKeyRotationInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "EnableKeyRotationInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpEncryptInput(v *EncryptInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "EncryptInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.Plaintext == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Plaintext"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGenerateDataKeyInput(v *GenerateDataKeyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GenerateDataKeyInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGenerateDataKeyPairInput(v *GenerateDataKeyPairInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GenerateDataKeyPairInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if len(v.KeyPairSpec) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyPairSpec"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGenerateDataKeyPairWithoutPlaintextInput(v *GenerateDataKeyPairWithoutPlaintextInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GenerateDataKeyPairWithoutPlaintextInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if len(v.KeyPairSpec) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyPairSpec"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGenerateDataKeyWithoutPlaintextInput(v *GenerateDataKeyWithoutPlaintextInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GenerateDataKeyWithoutPlaintextInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGenerateMacInput(v *GenerateMacInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GenerateMacInput"}
+ if v.Message == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Message"))
+ }
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if len(v.MacAlgorithm) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("MacAlgorithm"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetKeyPolicyInput(v *GetKeyPolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetKeyPolicyInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetKeyRotationStatusInput(v *GetKeyRotationStatusInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetKeyRotationStatusInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetParametersForImportInput(v *GetParametersForImportInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetParametersForImportInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if len(v.WrappingAlgorithm) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("WrappingAlgorithm"))
+ }
+ if len(v.WrappingKeySpec) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("WrappingKeySpec"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpGetPublicKeyInput(v *GetPublicKeyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "GetPublicKeyInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpImportKeyMaterialInput(v *ImportKeyMaterialInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ImportKeyMaterialInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.ImportToken == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ImportToken"))
+ }
+ if v.EncryptedKeyMaterial == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("EncryptedKeyMaterial"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListGrantsInput(v *ListGrantsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListGrantsInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListKeyPoliciesInput(v *ListKeyPoliciesInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListKeyPoliciesInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListKeyRotationsInput(v *ListKeyRotationsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListKeyRotationsInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListResourceTagsInput(v *ListResourceTagsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListResourceTagsInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpListRetirableGrantsInput(v *ListRetirableGrantsInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ListRetirableGrantsInput"}
+ if v.RetiringPrincipal == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("RetiringPrincipal"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpPutKeyPolicyInput(v *PutKeyPolicyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "PutKeyPolicyInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.Policy == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Policy"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpReEncryptInput(v *ReEncryptInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ReEncryptInput"}
+ if v.CiphertextBlob == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CiphertextBlob"))
+ }
+ if v.DestinationKeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("DestinationKeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpReplicateKeyInput(v *ReplicateKeyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ReplicateKeyInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.ReplicaRegion == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("ReplicaRegion"))
+ }
+ if v.Tags != nil {
+ if err := validateTagList(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpRevokeGrantInput(v *RevokeGrantInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RevokeGrantInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.GrantId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("GrantId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpRotateKeyOnDemandInput(v *RotateKeyOnDemandInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "RotateKeyOnDemandInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpScheduleKeyDeletionInput(v *ScheduleKeyDeletionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "ScheduleKeyDeletionInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpSignInput(v *SignInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "SignInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.Message == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Message"))
+ }
+ if len(v.SigningAlgorithm) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("SigningAlgorithm"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpTagResourceInput(v *TagResourceInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.Tags == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Tags"))
+ } else if v.Tags != nil {
+ if err := validateTagList(v.Tags); err != nil {
+ invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUntagResourceInput(v *UntagResourceInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.TagKeys == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TagKeys"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateAliasInput(v *UpdateAliasInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateAliasInput"}
+ if v.AliasName == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("AliasName"))
+ }
+ if v.TargetKeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("TargetKeyId"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateCustomKeyStoreInput(v *UpdateCustomKeyStoreInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateCustomKeyStoreInput"}
+ if v.CustomKeyStoreId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("CustomKeyStoreId"))
+ }
+ if v.XksProxyAuthenticationCredential != nil {
+ if err := validateXksProxyAuthenticationCredentialType(v.XksProxyAuthenticationCredential); err != nil {
+ invalidParams.AddNested("XksProxyAuthenticationCredential", err.(smithy.InvalidParamsError))
+ }
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdateKeyDescriptionInput(v *UpdateKeyDescriptionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdateKeyDescriptionInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.Description == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Description"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpUpdatePrimaryRegionInput(v *UpdatePrimaryRegionInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "UpdatePrimaryRegionInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.PrimaryRegion == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("PrimaryRegion"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpVerifyInput(v *VerifyInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "VerifyInput"}
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if v.Message == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Message"))
+ }
+ if v.Signature == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Signature"))
+ }
+ if len(v.SigningAlgorithm) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("SigningAlgorithm"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
+
+func validateOpVerifyMacInput(v *VerifyMacInput) error {
+ if v == nil {
+ return nil
+ }
+ invalidParams := smithy.InvalidParamsError{Context: "VerifyMacInput"}
+ if v.Message == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Message"))
+ }
+ if v.KeyId == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("KeyId"))
+ }
+ if len(v.MacAlgorithm) == 0 {
+ invalidParams.Add(smithy.NewErrParamRequired("MacAlgorithm"))
+ }
+ if v.Mac == nil {
+ invalidParams.Add(smithy.NewErrParamRequired("Mac"))
+ }
+ if invalidParams.Len() > 0 {
+ return invalidParams
+ } else {
+ return nil
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go/NOTICE.txt b/vendor/github.com/aws/aws-sdk-go/NOTICE.txt
deleted file mode 100644
index 899129ecc..000000000
--- a/vendor/github.com/aws/aws-sdk-go/NOTICE.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-AWS SDK for Go
-Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
-Copyright 2014-2015 Stripe, Inc.
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go b/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
deleted file mode 100644
index 99849c0e1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/awserr/error.go
+++ /dev/null
@@ -1,164 +0,0 @@
-// Package awserr represents API error interface accessors for the SDK.
-package awserr
-
-// An Error wraps lower level errors with code, message and an original error.
-// The underlying concrete error type may also satisfy other interfaces which
-// can be to used to obtain more specific information about the error.
-//
-// Calling Error() or String() will always include the full information about
-// an error based on its underlying type.
-//
-// Example:
-//
-// output, err := s3manage.Upload(svc, input, opts)
-// if err != nil {
-// if awsErr, ok := err.(awserr.Error); ok {
-// // Get error details
-// log.Println("Error:", awsErr.Code(), awsErr.Message())
-//
-// // Prints out full error message, including original error if there was one.
-// log.Println("Error:", awsErr.Error())
-//
-// // Get original error
-// if origErr := awsErr.OrigErr(); origErr != nil {
-// // operate on original error.
-// }
-// } else {
-// fmt.Println(err.Error())
-// }
-// }
-//
-type Error interface {
- // Satisfy the generic error interface.
- error
-
- // Returns the short phrase depicting the classification of the error.
- Code() string
-
- // Returns the error details message.
- Message() string
-
- // Returns the original error if one was set. Nil is returned if not set.
- OrigErr() error
-}
-
-// BatchError is a batch of errors which also wraps lower level errors with
-// code, message, and original errors. Calling Error() will include all errors
-// that occurred in the batch.
-//
-// Deprecated: Replaced with BatchedErrors. Only defined for backwards
-// compatibility.
-type BatchError interface {
- // Satisfy the generic error interface.
- error
-
- // Returns the short phrase depicting the classification of the error.
- Code() string
-
- // Returns the error details message.
- Message() string
-
- // Returns the original error if one was set. Nil is returned if not set.
- OrigErrs() []error
-}
-
-// BatchedErrors is a batch of errors which also wraps lower level errors with
-// code, message, and original errors. Calling Error() will include all errors
-// that occurred in the batch.
-//
-// Replaces BatchError
-type BatchedErrors interface {
- // Satisfy the base Error interface.
- Error
-
- // Returns the original error if one was set. Nil is returned if not set.
- OrigErrs() []error
-}
-
-// New returns an Error object described by the code, message, and origErr.
-//
-// If origErr satisfies the Error interface it will not be wrapped within a new
-// Error object and will instead be returned.
-func New(code, message string, origErr error) Error {
- var errs []error
- if origErr != nil {
- errs = append(errs, origErr)
- }
- return newBaseError(code, message, errs)
-}
-
-// NewBatchError returns an BatchedErrors with a collection of errors as an
-// array of errors.
-func NewBatchError(code, message string, errs []error) BatchedErrors {
- return newBaseError(code, message, errs)
-}
-
-// A RequestFailure is an interface to extract request failure information from
-// an Error such as the request ID of the failed request returned by a service.
-// RequestFailures may not always have a requestID value if the request failed
-// prior to reaching the service such as a connection error.
-//
-// Example:
-//
-// output, err := s3manage.Upload(svc, input, opts)
-// if err != nil {
-// if reqerr, ok := err.(RequestFailure); ok {
-// log.Println("Request failed", reqerr.Code(), reqerr.Message(), reqerr.RequestID())
-// } else {
-// log.Println("Error:", err.Error())
-// }
-// }
-//
-// Combined with awserr.Error:
-//
-// output, err := s3manage.Upload(svc, input, opts)
-// if err != nil {
-// if awsErr, ok := err.(awserr.Error); ok {
-// // Generic AWS Error with Code, Message, and original error (if any)
-// fmt.Println(awsErr.Code(), awsErr.Message(), awsErr.OrigErr())
-//
-// if reqErr, ok := err.(awserr.RequestFailure); ok {
-// // A service error occurred
-// fmt.Println(reqErr.StatusCode(), reqErr.RequestID())
-// }
-// } else {
-// fmt.Println(err.Error())
-// }
-// }
-//
-type RequestFailure interface {
- Error
-
- // The status code of the HTTP response.
- StatusCode() int
-
- // The request ID returned by the service for a request failure. This will
- // be empty if no request ID is available such as the request failed due
- // to a connection error.
- RequestID() string
-}
-
-// NewRequestFailure returns a wrapped error with additional information for
-// request status code, and service requestID.
-//
-// Should be used to wrap all request which involve service requests. Even if
-// the request failed without a service response, but had an HTTP status code
-// that may be meaningful.
-func NewRequestFailure(err Error, statusCode int, reqID string) RequestFailure {
- return newRequestError(err, statusCode, reqID)
-}
-
-// UnmarshalError provides the interface for the SDK failing to unmarshal data.
-type UnmarshalError interface {
- awsError
- Bytes() []byte
-}
-
-// NewUnmarshalError returns an initialized UnmarshalError error wrapper adding
-// the bytes that fail to unmarshal to the error.
-func NewUnmarshalError(err error, msg string, bytes []byte) UnmarshalError {
- return &unmarshalError{
- awsError: New("UnmarshalError", msg, err),
- bytes: bytes,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go b/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go
deleted file mode 100644
index 9cf7eaf40..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/awserr/types.go
+++ /dev/null
@@ -1,221 +0,0 @@
-package awserr
-
-import (
- "encoding/hex"
- "fmt"
-)
-
-// SprintError returns a string of the formatted error code.
-//
-// Both extra and origErr are optional. If they are included their lines
-// will be added, but if they are not included their lines will be ignored.
-func SprintError(code, message, extra string, origErr error) string {
- msg := fmt.Sprintf("%s: %s", code, message)
- if extra != "" {
- msg = fmt.Sprintf("%s\n\t%s", msg, extra)
- }
- if origErr != nil {
- msg = fmt.Sprintf("%s\ncaused by: %s", msg, origErr.Error())
- }
- return msg
-}
-
-// A baseError wraps the code and message which defines an error. It also
-// can be used to wrap an original error object.
-//
-// Should be used as the root for errors satisfying the awserr.Error. Also
-// for any error which does not fit into a specific error wrapper type.
-type baseError struct {
- // Classification of error
- code string
-
- // Detailed information about error
- message string
-
- // Optional original error this error is based off of. Allows building
- // chained errors.
- errs []error
-}
-
-// newBaseError returns an error object for the code, message, and errors.
-//
-// code is a short no whitespace phrase depicting the classification of
-// the error that is being created.
-//
-// message is the free flow string containing detailed information about the
-// error.
-//
-// origErrs is the error objects which will be nested under the new errors to
-// be returned.
-func newBaseError(code, message string, origErrs []error) *baseError {
- b := &baseError{
- code: code,
- message: message,
- errs: origErrs,
- }
-
- return b
-}
-
-// Error returns the string representation of the error.
-//
-// See ErrorWithExtra for formatting.
-//
-// Satisfies the error interface.
-func (b baseError) Error() string {
- size := len(b.errs)
- if size > 0 {
- return SprintError(b.code, b.message, "", errorList(b.errs))
- }
-
- return SprintError(b.code, b.message, "", nil)
-}
-
-// String returns the string representation of the error.
-// Alias for Error to satisfy the stringer interface.
-func (b baseError) String() string {
- return b.Error()
-}
-
-// Code returns the short phrase depicting the classification of the error.
-func (b baseError) Code() string {
- return b.code
-}
-
-// Message returns the error details message.
-func (b baseError) Message() string {
- return b.message
-}
-
-// OrigErr returns the original error if one was set. Nil is returned if no
-// error was set. This only returns the first element in the list. If the full
-// list is needed, use BatchedErrors.
-func (b baseError) OrigErr() error {
- switch len(b.errs) {
- case 0:
- return nil
- case 1:
- return b.errs[0]
- default:
- if err, ok := b.errs[0].(Error); ok {
- return NewBatchError(err.Code(), err.Message(), b.errs[1:])
- }
- return NewBatchError("BatchedErrors",
- "multiple errors occurred", b.errs)
- }
-}
-
-// OrigErrs returns the original errors if one was set. An empty slice is
-// returned if no error was set.
-func (b baseError) OrigErrs() []error {
- return b.errs
-}
-
-// So that the Error interface type can be included as an anonymous field
-// in the requestError struct and not conflict with the error.Error() method.
-type awsError Error
-
-// A requestError wraps a request or service error.
-//
-// Composed of baseError for code, message, and original error.
-type requestError struct {
- awsError
- statusCode int
- requestID string
- bytes []byte
-}
-
-// newRequestError returns a wrapped error with additional information for
-// request status code, and service requestID.
-//
-// Should be used to wrap all request which involve service requests. Even if
-// the request failed without a service response, but had an HTTP status code
-// that may be meaningful.
-//
-// Also wraps original errors via the baseError.
-func newRequestError(err Error, statusCode int, requestID string) *requestError {
- return &requestError{
- awsError: err,
- statusCode: statusCode,
- requestID: requestID,
- }
-}
-
-// Error returns the string representation of the error.
-// Satisfies the error interface.
-func (r requestError) Error() string {
- extra := fmt.Sprintf("status code: %d, request id: %s",
- r.statusCode, r.requestID)
- return SprintError(r.Code(), r.Message(), extra, r.OrigErr())
-}
-
-// String returns the string representation of the error.
-// Alias for Error to satisfy the stringer interface.
-func (r requestError) String() string {
- return r.Error()
-}
-
-// StatusCode returns the wrapped status code for the error
-func (r requestError) StatusCode() int {
- return r.statusCode
-}
-
-// RequestID returns the wrapped requestID
-func (r requestError) RequestID() string {
- return r.requestID
-}
-
-// OrigErrs returns the original errors if one was set. An empty slice is
-// returned if no error was set.
-func (r requestError) OrigErrs() []error {
- if b, ok := r.awsError.(BatchedErrors); ok {
- return b.OrigErrs()
- }
- return []error{r.OrigErr()}
-}
-
-type unmarshalError struct {
- awsError
- bytes []byte
-}
-
-// Error returns the string representation of the error.
-// Satisfies the error interface.
-func (e unmarshalError) Error() string {
- extra := hex.Dump(e.bytes)
- return SprintError(e.Code(), e.Message(), extra, e.OrigErr())
-}
-
-// String returns the string representation of the error.
-// Alias for Error to satisfy the stringer interface.
-func (e unmarshalError) String() string {
- return e.Error()
-}
-
-// Bytes returns the bytes that failed to unmarshal.
-func (e unmarshalError) Bytes() []byte {
- return e.bytes
-}
-
-// An error list that satisfies the golang interface
-type errorList []error
-
-// Error returns the string representation of the error.
-//
-// Satisfies the error interface.
-func (e errorList) Error() string {
- msg := ""
- // How do we want to handle the array size being zero
- if size := len(e); size > 0 {
- for i := 0; i < size; i++ {
- msg += e[i].Error()
- // We check the next index to see if it is within the slice.
- // If it is, then we append a newline. We do this, because unit tests
- // could be broken with the additional '\n'
- if i+1 < size {
- msg += "\n"
- }
- }
- }
- return msg
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go
deleted file mode 100644
index 1a3d106d5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/copy.go
+++ /dev/null
@@ -1,108 +0,0 @@
-package awsutil
-
-import (
- "io"
- "reflect"
- "time"
-)
-
-// Copy deeply copies a src structure to dst. Useful for copying request and
-// response structures.
-//
-// Can copy between structs of different type, but will only copy fields which
-// are assignable, and exist in both structs. Fields which are not assignable,
-// or do not exist in both structs are ignored.
-func Copy(dst, src interface{}) {
- dstval := reflect.ValueOf(dst)
- if !dstval.IsValid() {
- panic("Copy dst cannot be nil")
- }
-
- rcopy(dstval, reflect.ValueOf(src), true)
-}
-
-// CopyOf returns a copy of src while also allocating the memory for dst.
-// src must be a pointer type or this operation will fail.
-func CopyOf(src interface{}) (dst interface{}) {
- dsti := reflect.New(reflect.TypeOf(src).Elem())
- dst = dsti.Interface()
- rcopy(dsti, reflect.ValueOf(src), true)
- return
-}
-
-// rcopy performs a recursive copy of values from the source to destination.
-//
-// root is used to skip certain aspects of the copy which are not valid
-// for the root node of a object.
-func rcopy(dst, src reflect.Value, root bool) {
- if !src.IsValid() {
- return
- }
-
- switch src.Kind() {
- case reflect.Ptr:
- if _, ok := src.Interface().(io.Reader); ok {
- if dst.Kind() == reflect.Ptr && dst.Elem().CanSet() {
- dst.Elem().Set(src)
- } else if dst.CanSet() {
- dst.Set(src)
- }
- } else {
- e := src.Type().Elem()
- if dst.CanSet() && !src.IsNil() {
- if _, ok := src.Interface().(*time.Time); !ok {
- dst.Set(reflect.New(e))
- } else {
- tempValue := reflect.New(e)
- tempValue.Elem().Set(src.Elem())
- // Sets time.Time's unexported values
- dst.Set(tempValue)
- }
- }
- if src.Elem().IsValid() {
- // Keep the current root state since the depth hasn't changed
- rcopy(dst.Elem(), src.Elem(), root)
- }
- }
- case reflect.Struct:
- t := dst.Type()
- for i := 0; i < t.NumField(); i++ {
- name := t.Field(i).Name
- srcVal := src.FieldByName(name)
- dstVal := dst.FieldByName(name)
- if srcVal.IsValid() && dstVal.CanSet() {
- rcopy(dstVal, srcVal, false)
- }
- }
- case reflect.Slice:
- if src.IsNil() {
- break
- }
-
- s := reflect.MakeSlice(src.Type(), src.Len(), src.Cap())
- dst.Set(s)
- for i := 0; i < src.Len(); i++ {
- rcopy(dst.Index(i), src.Index(i), false)
- }
- case reflect.Map:
- if src.IsNil() {
- break
- }
-
- s := reflect.MakeMap(src.Type())
- dst.Set(s)
- for _, k := range src.MapKeys() {
- v := src.MapIndex(k)
- v2 := reflect.New(v.Type()).Elem()
- rcopy(v2, v, false)
- dst.SetMapIndex(k, v2)
- }
- default:
- // Assign the value if possible. If its not assignable, the value would
- // need to be converted and the impact of that may be unexpected, or is
- // not compatible with the dst type.
- if src.Type().AssignableTo(dst.Type()) {
- dst.Set(src)
- }
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go
deleted file mode 100644
index 142a7a01c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/equal.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package awsutil
-
-import (
- "reflect"
-)
-
-// DeepEqual returns if the two values are deeply equal like reflect.DeepEqual.
-// In addition to this, this method will also dereference the input values if
-// possible so the DeepEqual performed will not fail if one parameter is a
-// pointer and the other is not.
-//
-// DeepEqual will not perform indirection of nested values of the input parameters.
-func DeepEqual(a, b interface{}) bool {
- ra := reflect.Indirect(reflect.ValueOf(a))
- rb := reflect.Indirect(reflect.ValueOf(b))
-
- if raValid, rbValid := ra.IsValid(), rb.IsValid(); !raValid && !rbValid {
- // If the elements are both nil, and of the same type they are equal
- // If they are of different types they are not equal
- return reflect.TypeOf(a) == reflect.TypeOf(b)
- } else if raValid != rbValid {
- // Both values must be valid to be equal
- return false
- }
-
- return reflect.DeepEqual(ra.Interface(), rb.Interface())
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
deleted file mode 100644
index a4eb6a7f4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/path_value.go
+++ /dev/null
@@ -1,221 +0,0 @@
-package awsutil
-
-import (
- "reflect"
- "regexp"
- "strconv"
- "strings"
-
- "github.com/jmespath/go-jmespath"
-)
-
-var indexRe = regexp.MustCompile(`(.+)\[(-?\d+)?\]$`)
-
-// rValuesAtPath returns a slice of values found in value v. The values
-// in v are explored recursively so all nested values are collected.
-func rValuesAtPath(v interface{}, path string, createPath, caseSensitive, nilTerm bool) []reflect.Value {
- pathparts := strings.Split(path, "||")
- if len(pathparts) > 1 {
- for _, pathpart := range pathparts {
- vals := rValuesAtPath(v, pathpart, createPath, caseSensitive, nilTerm)
- if len(vals) > 0 {
- return vals
- }
- }
- return nil
- }
-
- values := []reflect.Value{reflect.Indirect(reflect.ValueOf(v))}
- components := strings.Split(path, ".")
- for len(values) > 0 && len(components) > 0 {
- var index *int64
- var indexStar bool
- c := strings.TrimSpace(components[0])
- if c == "" { // no actual component, illegal syntax
- return nil
- } else if caseSensitive && c != "*" && strings.ToLower(c[0:1]) == c[0:1] {
- // TODO normalize case for user
- return nil // don't support unexported fields
- }
-
- // parse this component
- if m := indexRe.FindStringSubmatch(c); m != nil {
- c = m[1]
- if m[2] == "" {
- index = nil
- indexStar = true
- } else {
- i, _ := strconv.ParseInt(m[2], 10, 32)
- index = &i
- indexStar = false
- }
- }
-
- nextvals := []reflect.Value{}
- for _, value := range values {
- // pull component name out of struct member
- if value.Kind() != reflect.Struct {
- continue
- }
-
- if c == "*" { // pull all members
- for i := 0; i < value.NumField(); i++ {
- if f := reflect.Indirect(value.Field(i)); f.IsValid() {
- nextvals = append(nextvals, f)
- }
- }
- continue
- }
-
- value = value.FieldByNameFunc(func(name string) bool {
- if c == name {
- return true
- } else if !caseSensitive && strings.EqualFold(name, c) {
- return true
- }
- return false
- })
-
- if nilTerm && value.Kind() == reflect.Ptr && len(components[1:]) == 0 {
- if !value.IsNil() {
- value.Set(reflect.Zero(value.Type()))
- }
- return []reflect.Value{value}
- }
-
- if createPath && value.Kind() == reflect.Ptr && value.IsNil() {
- // TODO if the value is the terminus it should not be created
- // if the value to be set to its position is nil.
- value.Set(reflect.New(value.Type().Elem()))
- value = value.Elem()
- } else {
- value = reflect.Indirect(value)
- }
-
- if value.Kind() == reflect.Slice || value.Kind() == reflect.Map {
- if !createPath && value.IsNil() {
- value = reflect.ValueOf(nil)
- }
- }
-
- if value.IsValid() {
- nextvals = append(nextvals, value)
- }
- }
- values = nextvals
-
- if indexStar || index != nil {
- nextvals = []reflect.Value{}
- for _, valItem := range values {
- value := reflect.Indirect(valItem)
- if value.Kind() != reflect.Slice {
- continue
- }
-
- if indexStar { // grab all indices
- for i := 0; i < value.Len(); i++ {
- idx := reflect.Indirect(value.Index(i))
- if idx.IsValid() {
- nextvals = append(nextvals, idx)
- }
- }
- continue
- }
-
- // pull out index
- i := int(*index)
- if i >= value.Len() { // check out of bounds
- if createPath {
- // TODO resize slice
- } else {
- continue
- }
- } else if i < 0 { // support negative indexing
- i = value.Len() + i
- }
- value = reflect.Indirect(value.Index(i))
-
- if value.Kind() == reflect.Slice || value.Kind() == reflect.Map {
- if !createPath && value.IsNil() {
- value = reflect.ValueOf(nil)
- }
- }
-
- if value.IsValid() {
- nextvals = append(nextvals, value)
- }
- }
- values = nextvals
- }
-
- components = components[1:]
- }
- return values
-}
-
-// ValuesAtPath returns a list of values at the case insensitive lexical
-// path inside of a structure.
-func ValuesAtPath(i interface{}, path string) ([]interface{}, error) {
- result, err := jmespath.Search(path, i)
- if err != nil {
- return nil, err
- }
-
- v := reflect.ValueOf(result)
- if !v.IsValid() || (v.Kind() == reflect.Ptr && v.IsNil()) {
- return nil, nil
- }
- if s, ok := result.([]interface{}); ok {
- return s, err
- }
- if v.Kind() == reflect.Map && v.Len() == 0 {
- return nil, nil
- }
- if v.Kind() == reflect.Slice {
- out := make([]interface{}, v.Len())
- for i := 0; i < v.Len(); i++ {
- out[i] = v.Index(i).Interface()
- }
- return out, nil
- }
-
- return []interface{}{result}, nil
-}
-
-// SetValueAtPath sets a value at the case insensitive lexical path inside
-// of a structure.
-func SetValueAtPath(i interface{}, path string, v interface{}) {
- rvals := rValuesAtPath(i, path, true, false, v == nil)
- for _, rval := range rvals {
- if rval.Kind() == reflect.Ptr && rval.IsNil() {
- continue
- }
- setValue(rval, v)
- }
-}
-
-func setValue(dstVal reflect.Value, src interface{}) {
- if dstVal.Kind() == reflect.Ptr {
- dstVal = reflect.Indirect(dstVal)
- }
- srcVal := reflect.ValueOf(src)
-
- if !srcVal.IsValid() { // src is literal nil
- if dstVal.CanAddr() {
- // Convert to pointer so that pointer's value can be nil'ed
- // dstVal = dstVal.Addr()
- }
- dstVal.Set(reflect.Zero(dstVal.Type()))
-
- } else if srcVal.Kind() == reflect.Ptr {
- if srcVal.IsNil() {
- srcVal = reflect.Zero(dstVal.Type())
- } else {
- srcVal = reflect.ValueOf(src).Elem()
- }
- dstVal.Set(srcVal)
- } else {
- dstVal.Set(srcVal)
- }
-
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go
deleted file mode 100644
index 11d4240d6..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/prettify.go
+++ /dev/null
@@ -1,123 +0,0 @@
-package awsutil
-
-import (
- "bytes"
- "fmt"
- "io"
- "reflect"
- "strings"
-)
-
-// Prettify returns the string representation of a value.
-func Prettify(i interface{}) string {
- var buf bytes.Buffer
- prettify(reflect.ValueOf(i), 0, &buf)
- return buf.String()
-}
-
-// prettify will recursively walk value v to build a textual
-// representation of the value.
-func prettify(v reflect.Value, indent int, buf *bytes.Buffer) {
- for v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
-
- switch v.Kind() {
- case reflect.Struct:
- strtype := v.Type().String()
- if strtype == "time.Time" {
- fmt.Fprintf(buf, "%s", v.Interface())
- break
- } else if strings.HasPrefix(strtype, "io.") {
- buf.WriteString("")
- break
- }
-
- buf.WriteString("{\n")
-
- names := []string{}
- for i := 0; i < v.Type().NumField(); i++ {
- name := v.Type().Field(i).Name
- f := v.Field(i)
- if name[0:1] == strings.ToLower(name[0:1]) {
- continue // ignore unexported fields
- }
- if (f.Kind() == reflect.Ptr || f.Kind() == reflect.Slice || f.Kind() == reflect.Map) && f.IsNil() {
- continue // ignore unset fields
- }
- names = append(names, name)
- }
-
- for i, n := range names {
- val := v.FieldByName(n)
- ft, ok := v.Type().FieldByName(n)
- if !ok {
- panic(fmt.Sprintf("expected to find field %v on type %v, but was not found", n, v.Type()))
- }
-
- buf.WriteString(strings.Repeat(" ", indent+2))
- buf.WriteString(n + ": ")
-
- if tag := ft.Tag.Get("sensitive"); tag == "true" {
- buf.WriteString("")
- } else {
- prettify(val, indent+2, buf)
- }
-
- if i < len(names)-1 {
- buf.WriteString(",\n")
- }
- }
-
- buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
- case reflect.Slice:
- strtype := v.Type().String()
- if strtype == "[]uint8" {
- fmt.Fprintf(buf, " len %d", v.Len())
- break
- }
-
- nl, id, id2 := "", "", ""
- if v.Len() > 3 {
- nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2)
- }
- buf.WriteString("[" + nl)
- for i := 0; i < v.Len(); i++ {
- buf.WriteString(id2)
- prettify(v.Index(i), indent+2, buf)
-
- if i < v.Len()-1 {
- buf.WriteString("," + nl)
- }
- }
-
- buf.WriteString(nl + id + "]")
- case reflect.Map:
- buf.WriteString("{\n")
-
- for i, k := range v.MapKeys() {
- buf.WriteString(strings.Repeat(" ", indent+2))
- buf.WriteString(k.String() + ": ")
- prettify(v.MapIndex(k), indent+2, buf)
-
- if i < v.Len()-1 {
- buf.WriteString(",\n")
- }
- }
-
- buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
- default:
- if !v.IsValid() {
- fmt.Fprint(buf, "")
- return
- }
- format := "%v"
- switch v.Interface().(type) {
- case string:
- format = "%q"
- case io.ReadSeeker, io.Reader:
- format = "buffer(%p)"
- }
- fmt.Fprintf(buf, format, v.Interface())
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go b/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go
deleted file mode 100644
index 3f7cffd95..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/awsutil/string_value.go
+++ /dev/null
@@ -1,90 +0,0 @@
-package awsutil
-
-import (
- "bytes"
- "fmt"
- "reflect"
- "strings"
-)
-
-// StringValue returns the string representation of a value.
-//
-// Deprecated: Use Prettify instead.
-func StringValue(i interface{}) string {
- var buf bytes.Buffer
- stringValue(reflect.ValueOf(i), 0, &buf)
- return buf.String()
-}
-
-func stringValue(v reflect.Value, indent int, buf *bytes.Buffer) {
- for v.Kind() == reflect.Ptr {
- v = v.Elem()
- }
-
- switch v.Kind() {
- case reflect.Struct:
- buf.WriteString("{\n")
-
- for i := 0; i < v.Type().NumField(); i++ {
- ft := v.Type().Field(i)
- fv := v.Field(i)
-
- if ft.Name[0:1] == strings.ToLower(ft.Name[0:1]) {
- continue // ignore unexported fields
- }
- if (fv.Kind() == reflect.Ptr || fv.Kind() == reflect.Slice) && fv.IsNil() {
- continue // ignore unset fields
- }
-
- buf.WriteString(strings.Repeat(" ", indent+2))
- buf.WriteString(ft.Name + ": ")
-
- if tag := ft.Tag.Get("sensitive"); tag == "true" {
- buf.WriteString("")
- } else {
- stringValue(fv, indent+2, buf)
- }
-
- buf.WriteString(",\n")
- }
-
- buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
- case reflect.Slice:
- nl, id, id2 := "", "", ""
- if v.Len() > 3 {
- nl, id, id2 = "\n", strings.Repeat(" ", indent), strings.Repeat(" ", indent+2)
- }
- buf.WriteString("[" + nl)
- for i := 0; i < v.Len(); i++ {
- buf.WriteString(id2)
- stringValue(v.Index(i), indent+2, buf)
-
- if i < v.Len()-1 {
- buf.WriteString("," + nl)
- }
- }
-
- buf.WriteString(nl + id + "]")
- case reflect.Map:
- buf.WriteString("{\n")
-
- for i, k := range v.MapKeys() {
- buf.WriteString(strings.Repeat(" ", indent+2))
- buf.WriteString(k.String() + ": ")
- stringValue(v.MapIndex(k), indent+2, buf)
-
- if i < v.Len()-1 {
- buf.WriteString(",\n")
- }
- }
-
- buf.WriteString("\n" + strings.Repeat(" ", indent) + "}")
- default:
- format := "%v"
- switch v.Interface().(type) {
- case string:
- format = "%q"
- }
- fmt.Fprintf(buf, format, v.Interface())
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
deleted file mode 100644
index b147f103c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package client
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// A Config provides configuration to a service client instance.
-type Config struct {
- Config *aws.Config
- Handlers request.Handlers
- PartitionID string
- Endpoint string
- SigningRegion string
- SigningName string
- ResolvedRegion string
-
- // States that the signing name did not come from a modeled source but
- // was derived based on other data. Used by service client constructors
- // to determine if the signin name can be overridden based on metadata the
- // service has.
- SigningNameDerived bool
-}
-
-// ConfigProvider provides a generic way for a service client to receive
-// the ClientConfig without circular dependencies.
-type ConfigProvider interface {
- ClientConfig(serviceName string, cfgs ...*aws.Config) Config
-}
-
-// ConfigNoResolveEndpointProvider same as ConfigProvider except it will not
-// resolve the endpoint automatically. The service client's endpoint must be
-// provided via the aws.Config.Endpoint field.
-type ConfigNoResolveEndpointProvider interface {
- ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) Config
-}
-
-// A Client implements the base client request and response handling
-// used by all service clients.
-type Client struct {
- request.Retryer
- metadata.ClientInfo
-
- Config aws.Config
- Handlers request.Handlers
-}
-
-// New will return a pointer to a new initialized service client.
-func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, options ...func(*Client)) *Client {
- svc := &Client{
- Config: cfg,
- ClientInfo: info,
- Handlers: handlers.Copy(),
- }
-
- switch retryer, ok := cfg.Retryer.(request.Retryer); {
- case ok:
- svc.Retryer = retryer
- case cfg.Retryer != nil && cfg.Logger != nil:
- s := fmt.Sprintf("WARNING: %T does not implement request.Retryer; using DefaultRetryer instead", cfg.Retryer)
- cfg.Logger.Log(s)
- fallthrough
- default:
- maxRetries := aws.IntValue(cfg.MaxRetries)
- if cfg.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries {
- maxRetries = DefaultRetryerMaxNumRetries
- }
- svc.Retryer = DefaultRetryer{NumMaxRetries: maxRetries}
- }
-
- svc.AddDebugHandlers()
-
- for _, option := range options {
- option(svc)
- }
-
- return svc
-}
-
-// NewRequest returns a new Request pointer for the service API
-// operation and parameters.
-func (c *Client) NewRequest(operation *request.Operation, params interface{}, data interface{}) *request.Request {
- return request.New(c.Config, c.ClientInfo, c.Handlers, c.Retryer, operation, params, data)
-}
-
-// AddDebugHandlers injects debug logging handlers into the service to log request
-// debug information.
-func (c *Client) AddDebugHandlers() {
- c.Handlers.Send.PushFrontNamed(LogHTTPRequestHandler)
- c.Handlers.Send.PushBackNamed(LogHTTPResponseHandler)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
deleted file mode 100644
index 9f6af19dd..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/default_retryer.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package client
-
-import (
- "math"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkrand"
-)
-
-// DefaultRetryer implements basic retry logic using exponential backoff for
-// most services. If you want to implement custom retry logic, you can implement the
-// request.Retryer interface.
-//
-type DefaultRetryer struct {
- // Num max Retries is the number of max retries that will be performed.
- // By default, this is zero.
- NumMaxRetries int
-
- // MinRetryDelay is the minimum retry delay after which retry will be performed.
- // If not set, the value is 0ns.
- MinRetryDelay time.Duration
-
- // MinThrottleRetryDelay is the minimum retry delay when throttled.
- // If not set, the value is 0ns.
- MinThrottleDelay time.Duration
-
- // MaxRetryDelay is the maximum retry delay before which retry must be performed.
- // If not set, the value is 0ns.
- MaxRetryDelay time.Duration
-
- // MaxThrottleDelay is the maximum retry delay when throttled.
- // If not set, the value is 0ns.
- MaxThrottleDelay time.Duration
-}
-
-const (
- // DefaultRetryerMaxNumRetries sets maximum number of retries
- DefaultRetryerMaxNumRetries = 3
-
- // DefaultRetryerMinRetryDelay sets minimum retry delay
- DefaultRetryerMinRetryDelay = 30 * time.Millisecond
-
- // DefaultRetryerMinThrottleDelay sets minimum delay when throttled
- DefaultRetryerMinThrottleDelay = 500 * time.Millisecond
-
- // DefaultRetryerMaxRetryDelay sets maximum retry delay
- DefaultRetryerMaxRetryDelay = 300 * time.Second
-
- // DefaultRetryerMaxThrottleDelay sets maximum delay when throttled
- DefaultRetryerMaxThrottleDelay = 300 * time.Second
-)
-
-// MaxRetries returns the number of maximum returns the service will use to make
-// an individual API request.
-func (d DefaultRetryer) MaxRetries() int {
- return d.NumMaxRetries
-}
-
-// setRetryerDefaults sets the default values of the retryer if not set
-func (d *DefaultRetryer) setRetryerDefaults() {
- if d.MinRetryDelay == 0 {
- d.MinRetryDelay = DefaultRetryerMinRetryDelay
- }
- if d.MaxRetryDelay == 0 {
- d.MaxRetryDelay = DefaultRetryerMaxRetryDelay
- }
- if d.MinThrottleDelay == 0 {
- d.MinThrottleDelay = DefaultRetryerMinThrottleDelay
- }
- if d.MaxThrottleDelay == 0 {
- d.MaxThrottleDelay = DefaultRetryerMaxThrottleDelay
- }
-}
-
-// RetryRules returns the delay duration before retrying this request again
-func (d DefaultRetryer) RetryRules(r *request.Request) time.Duration {
-
- // if number of max retries is zero, no retries will be performed.
- if d.NumMaxRetries == 0 {
- return 0
- }
-
- // Sets default value for retryer members
- d.setRetryerDefaults()
-
- // minDelay is the minimum retryer delay
- minDelay := d.MinRetryDelay
-
- var initialDelay time.Duration
-
- isThrottle := r.IsErrorThrottle()
- if isThrottle {
- if delay, ok := getRetryAfterDelay(r); ok {
- initialDelay = delay
- }
- minDelay = d.MinThrottleDelay
- }
-
- retryCount := r.RetryCount
-
- // maxDelay the maximum retryer delay
- maxDelay := d.MaxRetryDelay
-
- if isThrottle {
- maxDelay = d.MaxThrottleDelay
- }
-
- var delay time.Duration
-
- // Logic to cap the retry count based on the minDelay provided
- actualRetryCount := int(math.Log2(float64(minDelay))) + 1
- if actualRetryCount < 63-retryCount {
- delay = time.Duration(1< maxDelay {
- delay = getJitterDelay(maxDelay / 2)
- }
- } else {
- delay = getJitterDelay(maxDelay / 2)
- }
- return delay + initialDelay
-}
-
-// getJitterDelay returns a jittered delay for retry
-func getJitterDelay(duration time.Duration) time.Duration {
- return time.Duration(sdkrand.SeededRand.Int63n(int64(duration)) + int64(duration))
-}
-
-// ShouldRetry returns true if the request should be retried.
-func (d DefaultRetryer) ShouldRetry(r *request.Request) bool {
-
- // ShouldRetry returns false if number of max retries is 0.
- if d.NumMaxRetries == 0 {
- return false
- }
-
- // If one of the other handlers already set the retry state
- // we don't want to override it based on the service's state
- if r.Retryable != nil {
- return *r.Retryable
- }
- return r.IsErrorRetryable() || r.IsErrorThrottle()
-}
-
-// This will look in the Retry-After header, RFC 7231, for how long
-// it will wait before attempting another request
-func getRetryAfterDelay(r *request.Request) (time.Duration, bool) {
- if !canUseRetryAfterHeader(r) {
- return 0, false
- }
-
- delayStr := r.HTTPResponse.Header.Get("Retry-After")
- if len(delayStr) == 0 {
- return 0, false
- }
-
- delay, err := strconv.Atoi(delayStr)
- if err != nil {
- return 0, false
- }
-
- return time.Duration(delay) * time.Second, true
-}
-
-// Will look at the status code to see if the retry header pertains to
-// the status code.
-func canUseRetryAfterHeader(r *request.Request) bool {
- switch r.HTTPResponse.StatusCode {
- case 429:
- case 503:
- default:
- return false
- }
-
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
deleted file mode 100644
index 5ac5c24a1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go
+++ /dev/null
@@ -1,206 +0,0 @@
-package client
-
-import (
- "bytes"
- "fmt"
- "io"
- "io/ioutil"
- "net/http/httputil"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const logReqMsg = `DEBUG: Request %s/%s Details:
----[ REQUEST POST-SIGN ]-----------------------------
-%s
------------------------------------------------------`
-
-const logReqErrMsg = `DEBUG ERROR: Request %s/%s:
----[ REQUEST DUMP ERROR ]-----------------------------
-%s
-------------------------------------------------------`
-
-type logWriter struct {
- // Logger is what we will use to log the payload of a response.
- Logger aws.Logger
- // buf stores the contents of what has been read
- buf *bytes.Buffer
-}
-
-func (logger *logWriter) Write(b []byte) (int, error) {
- return logger.buf.Write(b)
-}
-
-type teeReaderCloser struct {
- // io.Reader will be a tee reader that is used during logging.
- // This structure will read from a body and write the contents to a logger.
- io.Reader
- // Source is used just to close when we are done reading.
- Source io.ReadCloser
-}
-
-func (reader *teeReaderCloser) Close() error {
- return reader.Source.Close()
-}
-
-// LogHTTPRequestHandler is a SDK request handler to log the HTTP request sent
-// to a service. Will include the HTTP request body if the LogLevel of the
-// request matches LogDebugWithHTTPBody.
-var LogHTTPRequestHandler = request.NamedHandler{
- Name: "awssdk.client.LogRequest",
- Fn: logRequest,
-}
-
-func logRequest(r *request.Request) {
- if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil {
- return
- }
-
- logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
- bodySeekable := aws.IsReaderSeekable(r.Body)
-
- b, err := httputil.DumpRequestOut(r.HTTPRequest, logBody)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- if logBody {
- if !bodySeekable {
- r.SetReaderBody(aws.ReadSeekCloser(r.HTTPRequest.Body))
- }
- // Reset the request body because dumpRequest will re-wrap the
- // r.HTTPRequest's Body as a NoOpCloser and will not be reset after
- // read by the HTTP client reader.
- if err := r.Error; err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
- }
-
- r.Config.Logger.Log(fmt.Sprintf(logReqMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, string(b)))
-}
-
-// LogHTTPRequestHeaderHandler is a SDK request handler to log the HTTP request sent
-// to a service. Will only log the HTTP request's headers. The request payload
-// will not be read.
-var LogHTTPRequestHeaderHandler = request.NamedHandler{
- Name: "awssdk.client.LogRequestHeader",
- Fn: logRequestHeader,
-}
-
-func logRequestHeader(r *request.Request) {
- if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil {
- return
- }
-
- b, err := httputil.DumpRequestOut(r.HTTPRequest, false)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logReqErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- r.Config.Logger.Log(fmt.Sprintf(logReqMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, string(b)))
-}
-
-const logRespMsg = `DEBUG: Response %s/%s Details:
----[ RESPONSE ]--------------------------------------
-%s
------------------------------------------------------`
-
-const logRespErrMsg = `DEBUG ERROR: Response %s/%s:
----[ RESPONSE DUMP ERROR ]-----------------------------
-%s
------------------------------------------------------`
-
-// LogHTTPResponseHandler is a SDK request handler to log the HTTP response
-// received from a service. Will include the HTTP response body if the LogLevel
-// of the request matches LogDebugWithHTTPBody.
-var LogHTTPResponseHandler = request.NamedHandler{
- Name: "awssdk.client.LogResponse",
- Fn: logResponse,
-}
-
-func logResponse(r *request.Request) {
- if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil {
- return
- }
-
- lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)}
-
- if r.HTTPResponse == nil {
- lw.Logger.Log(fmt.Sprintf(logRespErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, "request's HTTPResponse is nil"))
- return
- }
-
- logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody)
- if logBody {
- r.HTTPResponse.Body = &teeReaderCloser{
- Reader: io.TeeReader(r.HTTPResponse.Body, lw),
- Source: r.HTTPResponse.Body,
- }
- }
-
- handlerFn := func(req *request.Request) {
- b, err := httputil.DumpResponse(req.HTTPResponse, false)
- if err != nil {
- lw.Logger.Log(fmt.Sprintf(logRespErrMsg,
- req.ClientInfo.ServiceName, req.Operation.Name, err))
- return
- }
-
- lw.Logger.Log(fmt.Sprintf(logRespMsg,
- req.ClientInfo.ServiceName, req.Operation.Name, string(b)))
-
- if logBody {
- b, err := ioutil.ReadAll(lw.buf)
- if err != nil {
- lw.Logger.Log(fmt.Sprintf(logRespErrMsg,
- req.ClientInfo.ServiceName, req.Operation.Name, err))
- return
- }
-
- lw.Logger.Log(string(b))
- }
- }
-
- const handlerName = "awsdk.client.LogResponse.ResponseBody"
-
- r.Handlers.Unmarshal.SetBackNamed(request.NamedHandler{
- Name: handlerName, Fn: handlerFn,
- })
- r.Handlers.UnmarshalError.SetBackNamed(request.NamedHandler{
- Name: handlerName, Fn: handlerFn,
- })
-}
-
-// LogHTTPResponseHeaderHandler is a SDK request handler to log the HTTP
-// response received from a service. Will only log the HTTP response's headers.
-// The response payload will not be read.
-var LogHTTPResponseHeaderHandler = request.NamedHandler{
- Name: "awssdk.client.LogResponseHeader",
- Fn: logResponseHeader,
-}
-
-func logResponseHeader(r *request.Request) {
- if !r.Config.LogLevel.AtLeast(aws.LogDebug) || r.Config.Logger == nil {
- return
- }
-
- b, err := httputil.DumpResponse(r.HTTPResponse, false)
- if err != nil {
- r.Config.Logger.Log(fmt.Sprintf(logRespErrMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, err))
- return
- }
-
- r.Config.Logger.Log(fmt.Sprintf(logRespMsg,
- r.ClientInfo.ServiceName, r.Operation.Name, string(b)))
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go b/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
deleted file mode 100644
index a7530ebb3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go
+++ /dev/null
@@ -1,15 +0,0 @@
-package metadata
-
-// ClientInfo wraps immutable data from the client.Client structure.
-type ClientInfo struct {
- ServiceName string
- ServiceID string
- APIVersion string
- PartitionID string
- Endpoint string
- SigningName string
- SigningRegion string
- JSONVersion string
- TargetPrefix string
- ResolvedRegion string
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go
deleted file mode 100644
index 881d575f0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/client/no_op_retryer.go
+++ /dev/null
@@ -1,28 +0,0 @@
-package client
-
-import (
- "time"
-
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// NoOpRetryer provides a retryer that performs no retries.
-// It should be used when we do not want retries to be performed.
-type NoOpRetryer struct{}
-
-// MaxRetries returns the number of maximum returns the service will use to make
-// an individual API; For NoOpRetryer the MaxRetries will always be zero.
-func (d NoOpRetryer) MaxRetries() int {
- return 0
-}
-
-// ShouldRetry will always return false for NoOpRetryer, as it should never retry.
-func (d NoOpRetryer) ShouldRetry(_ *request.Request) bool {
- return false
-}
-
-// RetryRules returns the delay duration before retrying this request again;
-// since NoOpRetryer does not retry, RetryRules always returns 0.
-func (d NoOpRetryer) RetryRules(_ *request.Request) time.Duration {
- return 0
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go
deleted file mode 100644
index 79f18fb2f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/config.go
+++ /dev/null
@@ -1,628 +0,0 @@
-package aws
-
-import (
- "net/http"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/endpoints"
-)
-
-// UseServiceDefaultRetries instructs the config to use the service's own
-// default number of retries. This will be the default action if
-// Config.MaxRetries is nil also.
-const UseServiceDefaultRetries = -1
-
-// RequestRetryer is an alias for a type that implements the request.Retryer
-// interface.
-type RequestRetryer interface{}
-
-// A Config provides service configuration for service clients. By default,
-// all clients will use the defaults.DefaultConfig structure.
-//
-// // Create Session with MaxRetries configuration to be shared by multiple
-// // service clients.
-// sess := session.Must(session.NewSession(&aws.Config{
-// MaxRetries: aws.Int(3),
-// }))
-//
-// // Create S3 service client with a specific Region.
-// svc := s3.New(sess, &aws.Config{
-// Region: aws.String("us-west-2"),
-// })
-type Config struct {
- // Enables verbose error printing of all credential chain errors.
- // Should be used when wanting to see all errors while attempting to
- // retrieve credentials.
- CredentialsChainVerboseErrors *bool
-
- // The credentials object to use when signing requests. Defaults to a
- // chain of credential providers to search for credentials in environment
- // variables, shared credential file, and EC2 Instance Roles.
- Credentials *credentials.Credentials
-
- // An optional endpoint URL (hostname only or fully qualified URI)
- // that overrides the default generated endpoint for a client. Set this
- // to `nil` or the value to `""` to use the default generated endpoint.
- //
- // Note: You must still provide a `Region` value when specifying an
- // endpoint for a client.
- Endpoint *string
-
- // The resolver to use for looking up endpoints for AWS service clients
- // to use based on region.
- EndpointResolver endpoints.Resolver
-
- // EnforceShouldRetryCheck is used in the AfterRetryHandler to always call
- // ShouldRetry regardless of whether or not if request.Retryable is set.
- // This will utilize ShouldRetry method of custom retryers. If EnforceShouldRetryCheck
- // is not set, then ShouldRetry will only be called if request.Retryable is nil.
- // Proper handling of the request.Retryable field is important when setting this field.
- EnforceShouldRetryCheck *bool
-
- // The region to send requests to. This parameter is required and must
- // be configured globally or on a per-client basis unless otherwise
- // noted. A full list of regions is found in the "Regions and Endpoints"
- // document.
- //
- // See http://docs.aws.amazon.com/general/latest/gr/rande.html for AWS
- // Regions and Endpoints.
- Region *string
-
- // Set this to `true` to disable SSL when sending requests. Defaults
- // to `false`.
- DisableSSL *bool
-
- // The HTTP client to use when sending requests. Defaults to
- // `http.DefaultClient`.
- HTTPClient *http.Client
-
- // An integer value representing the logging level. The default log level
- // is zero (LogOff), which represents no logging. To enable logging set
- // to a LogLevel Value.
- LogLevel *LogLevelType
-
- // The logger writer interface to write logging messages to. Defaults to
- // standard out.
- Logger Logger
-
- // The maximum number of times that a request will be retried for failures.
- // Defaults to -1, which defers the max retry setting to the service
- // specific configuration.
- MaxRetries *int
-
- // Retryer guides how HTTP requests should be retried in case of
- // recoverable failures.
- //
- // When nil or the value does not implement the request.Retryer interface,
- // the client.DefaultRetryer will be used.
- //
- // When both Retryer and MaxRetries are non-nil, the former is used and
- // the latter ignored.
- //
- // To set the Retryer field in a type-safe manner and with chaining, use
- // the request.WithRetryer helper function:
- //
- // cfg := request.WithRetryer(aws.NewConfig(), myRetryer)
- //
- Retryer RequestRetryer
-
- // Disables semantic parameter validation, which validates input for
- // missing required fields and/or other semantic request input errors.
- DisableParamValidation *bool
-
- // Disables the computation of request and response checksums, e.g.,
- // CRC32 checksums in Amazon DynamoDB.
- DisableComputeChecksums *bool
-
- // Set this to `true` to force the request to use path-style addressing,
- // i.e., `http://s3.amazonaws.com/BUCKET/KEY`. By default, the S3 client
- // will use virtual hosted bucket addressing when possible
- // (`http://BUCKET.s3.amazonaws.com/KEY`).
- //
- // Note: This configuration option is specific to the Amazon S3 service.
- //
- // See http://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html
- // for Amazon S3: Virtual Hosting of Buckets
- S3ForcePathStyle *bool
-
- // Set this to `true` to disable the SDK adding the `Expect: 100-Continue`
- // header to PUT requests over 2MB of content. 100-Continue instructs the
- // HTTP client not to send the body until the service responds with a
- // `continue` status. This is useful to prevent sending the request body
- // until after the request is authenticated, and validated.
- //
- // http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
- //
- // 100-Continue is only enabled for Go 1.6 and above. See `http.Transport`'s
- // `ExpectContinueTimeout` for information on adjusting the continue wait
- // timeout. https://golang.org/pkg/net/http/#Transport
- //
- // You should use this flag to disable 100-Continue if you experience issues
- // with proxies or third party S3 compatible services.
- S3Disable100Continue *bool
-
- // Set this to `true` to enable S3 Accelerate feature. For all operations
- // compatible with S3 Accelerate will use the accelerate endpoint for
- // requests. Requests not compatible will fall back to normal S3 requests.
- //
- // The bucket must be enable for accelerate to be used with S3 client with
- // accelerate enabled. If the bucket is not enabled for accelerate an error
- // will be returned. The bucket name must be DNS compatible to also work
- // with accelerate.
- S3UseAccelerate *bool
-
- // S3DisableContentMD5Validation config option is temporarily disabled,
- // For S3 GetObject API calls, #1837.
- //
- // Set this to `true` to disable the S3 service client from automatically
- // adding the ContentMD5 to S3 Object Put and Upload API calls. This option
- // will also disable the SDK from performing object ContentMD5 validation
- // on GetObject API calls.
- S3DisableContentMD5Validation *bool
-
- // Set this to `true` to have the S3 service client to use the region specified
- // in the ARN, when an ARN is provided as an argument to a bucket parameter.
- S3UseARNRegion *bool
-
- // Set this to `true` to enable the SDK to unmarshal API response header maps to
- // normalized lower case map keys.
- //
- // For example S3's X-Amz-Meta prefixed header will be unmarshaled to lower case
- // Metadata member's map keys. The value of the header in the map is unaffected.
- LowerCaseHeaderMaps *bool
-
- // Set this to `true` to disable the EC2Metadata client from overriding the
- // default http.Client's Timeout. This is helpful if you do not want the
- // EC2Metadata client to create a new http.Client. This options is only
- // meaningful if you're not already using a custom HTTP client with the
- // SDK. Enabled by default.
- //
- // Must be set and provided to the session.NewSession() in order to disable
- // the EC2Metadata overriding the timeout for default credentials chain.
- //
- // Example:
- // sess := session.Must(session.NewSession(aws.NewConfig()
- // .WithEC2MetadataDisableTimeoutOverride(true)))
- //
- // svc := s3.New(sess)
- //
- EC2MetadataDisableTimeoutOverride *bool
-
- // Instructs the endpoint to be generated for a service client to
- // be the dual stack endpoint. The dual stack endpoint will support
- // both IPv4 and IPv6 addressing.
- //
- // Setting this for a service which does not support dual stack will fail
- // to make requests. It is not recommended to set this value on the session
- // as it will apply to all service clients created with the session. Even
- // services which don't support dual stack endpoints.
- //
- // If the Endpoint config value is also provided the UseDualStack flag
- // will be ignored.
- //
- // Only supported with.
- //
- // sess := session.Must(session.NewSession())
- //
- // svc := s3.New(sess, &aws.Config{
- // UseDualStack: aws.Bool(true),
- // })
- //
- // Deprecated: This option will continue to function for S3 and S3 Control for backwards compatibility.
- // UseDualStackEndpoint should be used to enable usage of a service's dual-stack endpoint for all service clients
- // moving forward. For S3 and S3 Control, when UseDualStackEndpoint is set to a non-zero value it takes higher
- // precedence then this option.
- UseDualStack *bool
-
- // Sets the resolver to resolve a dual-stack endpoint for the service.
- UseDualStackEndpoint endpoints.DualStackEndpointState
-
- // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
- UseFIPSEndpoint endpoints.FIPSEndpointState
-
- // SleepDelay is an override for the func the SDK will call when sleeping
- // during the lifecycle of a request. Specifically this will be used for
- // request delays. This value should only be used for testing. To adjust
- // the delay of a request see the aws/client.DefaultRetryer and
- // aws/request.Retryer.
- //
- // SleepDelay will prevent any Context from being used for canceling retry
- // delay of an API operation. It is recommended to not use SleepDelay at all
- // and specify a Retryer instead.
- SleepDelay func(time.Duration)
-
- // DisableRestProtocolURICleaning will not clean the URL path when making rest protocol requests.
- // Will default to false. This would only be used for empty directory names in s3 requests.
- //
- // Example:
- // sess := session.Must(session.NewSession(&aws.Config{
- // DisableRestProtocolURICleaning: aws.Bool(true),
- // }))
- //
- // svc := s3.New(sess)
- // out, err := svc.GetObject(&s3.GetObjectInput {
- // Bucket: aws.String("bucketname"),
- // Key: aws.String("//foo//bar//moo"),
- // })
- DisableRestProtocolURICleaning *bool
-
- // EnableEndpointDiscovery will allow for endpoint discovery on operations that
- // have the definition in its model. By default, endpoint discovery is off.
- // To use EndpointDiscovery, Endpoint should be unset or set to an empty string.
- //
- // Example:
- // sess := session.Must(session.NewSession(&aws.Config{
- // EnableEndpointDiscovery: aws.Bool(true),
- // }))
- //
- // svc := s3.New(sess)
- // out, err := svc.GetObject(&s3.GetObjectInput {
- // Bucket: aws.String("bucketname"),
- // Key: aws.String("/foo/bar/moo"),
- // })
- EnableEndpointDiscovery *bool
-
- // DisableEndpointHostPrefix will disable the SDK's behavior of prefixing
- // request endpoint hosts with modeled information.
- //
- // Disabling this feature is useful when you want to use local endpoints
- // for testing that do not support the modeled host prefix pattern.
- DisableEndpointHostPrefix *bool
-
- // STSRegionalEndpoint will enable regional or legacy endpoint resolving
- STSRegionalEndpoint endpoints.STSRegionalEndpoint
-
- // S3UsEast1RegionalEndpoint will enable regional or legacy endpoint resolving
- S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint
-}
-
-// NewConfig returns a new Config pointer that can be chained with builder
-// methods to set multiple configuration values inline without using pointers.
-//
-// // Create Session with MaxRetries configuration to be shared by multiple
-// // service clients.
-// sess := session.Must(session.NewSession(aws.NewConfig().
-// WithMaxRetries(3),
-// ))
-//
-// // Create S3 service client with a specific Region.
-// svc := s3.New(sess, aws.NewConfig().
-// WithRegion("us-west-2"),
-// )
-func NewConfig() *Config {
- return &Config{}
-}
-
-// WithCredentialsChainVerboseErrors sets a config verbose errors boolean and returning
-// a Config pointer.
-func (c *Config) WithCredentialsChainVerboseErrors(verboseErrs bool) *Config {
- c.CredentialsChainVerboseErrors = &verboseErrs
- return c
-}
-
-// WithCredentials sets a config Credentials value returning a Config pointer
-// for chaining.
-func (c *Config) WithCredentials(creds *credentials.Credentials) *Config {
- c.Credentials = creds
- return c
-}
-
-// WithEndpoint sets a config Endpoint value returning a Config pointer for
-// chaining.
-func (c *Config) WithEndpoint(endpoint string) *Config {
- c.Endpoint = &endpoint
- return c
-}
-
-// WithEndpointResolver sets a config EndpointResolver value returning a
-// Config pointer for chaining.
-func (c *Config) WithEndpointResolver(resolver endpoints.Resolver) *Config {
- c.EndpointResolver = resolver
- return c
-}
-
-// WithRegion sets a config Region value returning a Config pointer for
-// chaining.
-func (c *Config) WithRegion(region string) *Config {
- c.Region = ®ion
- return c
-}
-
-// WithDisableSSL sets a config DisableSSL value returning a Config pointer
-// for chaining.
-func (c *Config) WithDisableSSL(disable bool) *Config {
- c.DisableSSL = &disable
- return c
-}
-
-// WithHTTPClient sets a config HTTPClient value returning a Config pointer
-// for chaining.
-func (c *Config) WithHTTPClient(client *http.Client) *Config {
- c.HTTPClient = client
- return c
-}
-
-// WithMaxRetries sets a config MaxRetries value returning a Config pointer
-// for chaining.
-func (c *Config) WithMaxRetries(max int) *Config {
- c.MaxRetries = &max
- return c
-}
-
-// WithDisableParamValidation sets a config DisableParamValidation value
-// returning a Config pointer for chaining.
-func (c *Config) WithDisableParamValidation(disable bool) *Config {
- c.DisableParamValidation = &disable
- return c
-}
-
-// WithDisableComputeChecksums sets a config DisableComputeChecksums value
-// returning a Config pointer for chaining.
-func (c *Config) WithDisableComputeChecksums(disable bool) *Config {
- c.DisableComputeChecksums = &disable
- return c
-}
-
-// WithLogLevel sets a config LogLevel value returning a Config pointer for
-// chaining.
-func (c *Config) WithLogLevel(level LogLevelType) *Config {
- c.LogLevel = &level
- return c
-}
-
-// WithLogger sets a config Logger value returning a Config pointer for
-// chaining.
-func (c *Config) WithLogger(logger Logger) *Config {
- c.Logger = logger
- return c
-}
-
-// WithS3ForcePathStyle sets a config S3ForcePathStyle value returning a Config
-// pointer for chaining.
-func (c *Config) WithS3ForcePathStyle(force bool) *Config {
- c.S3ForcePathStyle = &force
- return c
-}
-
-// WithS3Disable100Continue sets a config S3Disable100Continue value returning
-// a Config pointer for chaining.
-func (c *Config) WithS3Disable100Continue(disable bool) *Config {
- c.S3Disable100Continue = &disable
- return c
-}
-
-// WithS3UseAccelerate sets a config S3UseAccelerate value returning a Config
-// pointer for chaining.
-func (c *Config) WithS3UseAccelerate(enable bool) *Config {
- c.S3UseAccelerate = &enable
- return c
-
-}
-
-// WithS3DisableContentMD5Validation sets a config
-// S3DisableContentMD5Validation value returning a Config pointer for chaining.
-func (c *Config) WithS3DisableContentMD5Validation(enable bool) *Config {
- c.S3DisableContentMD5Validation = &enable
- return c
-
-}
-
-// WithS3UseARNRegion sets a config S3UseARNRegion value and
-// returning a Config pointer for chaining
-func (c *Config) WithS3UseARNRegion(enable bool) *Config {
- c.S3UseARNRegion = &enable
- return c
-}
-
-// WithUseDualStack sets a config UseDualStack value returning a Config
-// pointer for chaining.
-func (c *Config) WithUseDualStack(enable bool) *Config {
- c.UseDualStack = &enable
- return c
-}
-
-// WithEC2MetadataDisableTimeoutOverride sets a config EC2MetadataDisableTimeoutOverride value
-// returning a Config pointer for chaining.
-func (c *Config) WithEC2MetadataDisableTimeoutOverride(enable bool) *Config {
- c.EC2MetadataDisableTimeoutOverride = &enable
- return c
-}
-
-// WithSleepDelay overrides the function used to sleep while waiting for the
-// next retry. Defaults to time.Sleep.
-func (c *Config) WithSleepDelay(fn func(time.Duration)) *Config {
- c.SleepDelay = fn
- return c
-}
-
-// WithEndpointDiscovery will set whether or not to use endpoint discovery.
-func (c *Config) WithEndpointDiscovery(t bool) *Config {
- c.EnableEndpointDiscovery = &t
- return c
-}
-
-// WithDisableEndpointHostPrefix will set whether or not to use modeled host prefix
-// when making requests.
-func (c *Config) WithDisableEndpointHostPrefix(t bool) *Config {
- c.DisableEndpointHostPrefix = &t
- return c
-}
-
-// WithSTSRegionalEndpoint will set whether or not to use regional endpoint flag
-// when resolving the endpoint for a service
-func (c *Config) WithSTSRegionalEndpoint(sre endpoints.STSRegionalEndpoint) *Config {
- c.STSRegionalEndpoint = sre
- return c
-}
-
-// WithS3UsEast1RegionalEndpoint will set whether or not to use regional endpoint flag
-// when resolving the endpoint for a service
-func (c *Config) WithS3UsEast1RegionalEndpoint(sre endpoints.S3UsEast1RegionalEndpoint) *Config {
- c.S3UsEast1RegionalEndpoint = sre
- return c
-}
-
-// WithLowerCaseHeaderMaps sets a config LowerCaseHeaderMaps value
-// returning a Config pointer for chaining.
-func (c *Config) WithLowerCaseHeaderMaps(t bool) *Config {
- c.LowerCaseHeaderMaps = &t
- return c
-}
-
-// WithDisableRestProtocolURICleaning sets a config DisableRestProtocolURICleaning value
-// returning a Config pointer for chaining.
-func (c *Config) WithDisableRestProtocolURICleaning(t bool) *Config {
- c.DisableRestProtocolURICleaning = &t
- return c
-}
-
-// MergeIn merges the passed in configs into the existing config object.
-func (c *Config) MergeIn(cfgs ...*Config) {
- for _, other := range cfgs {
- mergeInConfig(c, other)
- }
-}
-
-func mergeInConfig(dst *Config, other *Config) {
- if other == nil {
- return
- }
-
- if other.CredentialsChainVerboseErrors != nil {
- dst.CredentialsChainVerboseErrors = other.CredentialsChainVerboseErrors
- }
-
- if other.Credentials != nil {
- dst.Credentials = other.Credentials
- }
-
- if other.Endpoint != nil {
- dst.Endpoint = other.Endpoint
- }
-
- if other.EndpointResolver != nil {
- dst.EndpointResolver = other.EndpointResolver
- }
-
- if other.Region != nil {
- dst.Region = other.Region
- }
-
- if other.DisableSSL != nil {
- dst.DisableSSL = other.DisableSSL
- }
-
- if other.HTTPClient != nil {
- dst.HTTPClient = other.HTTPClient
- }
-
- if other.LogLevel != nil {
- dst.LogLevel = other.LogLevel
- }
-
- if other.Logger != nil {
- dst.Logger = other.Logger
- }
-
- if other.MaxRetries != nil {
- dst.MaxRetries = other.MaxRetries
- }
-
- if other.Retryer != nil {
- dst.Retryer = other.Retryer
- }
-
- if other.DisableParamValidation != nil {
- dst.DisableParamValidation = other.DisableParamValidation
- }
-
- if other.DisableComputeChecksums != nil {
- dst.DisableComputeChecksums = other.DisableComputeChecksums
- }
-
- if other.S3ForcePathStyle != nil {
- dst.S3ForcePathStyle = other.S3ForcePathStyle
- }
-
- if other.S3Disable100Continue != nil {
- dst.S3Disable100Continue = other.S3Disable100Continue
- }
-
- if other.S3UseAccelerate != nil {
- dst.S3UseAccelerate = other.S3UseAccelerate
- }
-
- if other.S3DisableContentMD5Validation != nil {
- dst.S3DisableContentMD5Validation = other.S3DisableContentMD5Validation
- }
-
- if other.S3UseARNRegion != nil {
- dst.S3UseARNRegion = other.S3UseARNRegion
- }
-
- if other.UseDualStack != nil {
- dst.UseDualStack = other.UseDualStack
- }
-
- if other.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset {
- dst.UseDualStackEndpoint = other.UseDualStackEndpoint
- }
-
- if other.EC2MetadataDisableTimeoutOverride != nil {
- dst.EC2MetadataDisableTimeoutOverride = other.EC2MetadataDisableTimeoutOverride
- }
-
- if other.SleepDelay != nil {
- dst.SleepDelay = other.SleepDelay
- }
-
- if other.DisableRestProtocolURICleaning != nil {
- dst.DisableRestProtocolURICleaning = other.DisableRestProtocolURICleaning
- }
-
- if other.EnforceShouldRetryCheck != nil {
- dst.EnforceShouldRetryCheck = other.EnforceShouldRetryCheck
- }
-
- if other.EnableEndpointDiscovery != nil {
- dst.EnableEndpointDiscovery = other.EnableEndpointDiscovery
- }
-
- if other.DisableEndpointHostPrefix != nil {
- dst.DisableEndpointHostPrefix = other.DisableEndpointHostPrefix
- }
-
- if other.STSRegionalEndpoint != endpoints.UnsetSTSEndpoint {
- dst.STSRegionalEndpoint = other.STSRegionalEndpoint
- }
-
- if other.S3UsEast1RegionalEndpoint != endpoints.UnsetS3UsEast1Endpoint {
- dst.S3UsEast1RegionalEndpoint = other.S3UsEast1RegionalEndpoint
- }
-
- if other.LowerCaseHeaderMaps != nil {
- dst.LowerCaseHeaderMaps = other.LowerCaseHeaderMaps
- }
-
- if other.UseDualStackEndpoint != endpoints.DualStackEndpointStateUnset {
- dst.UseDualStackEndpoint = other.UseDualStackEndpoint
- }
-
- if other.UseFIPSEndpoint != endpoints.FIPSEndpointStateUnset {
- dst.UseFIPSEndpoint = other.UseFIPSEndpoint
- }
-}
-
-// Copy will return a shallow copy of the Config object. If any additional
-// configurations are provided they will be merged into the new config returned.
-func (c *Config) Copy(cfgs ...*Config) *Config {
- dst := &Config{}
- dst.MergeIn(c)
-
- for _, cfg := range cfgs {
- dst.MergeIn(cfg)
- }
-
- return dst
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go
deleted file mode 100644
index 89aad2c67..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_5.go
+++ /dev/null
@@ -1,38 +0,0 @@
-//go:build !go1.9
-// +build !go1.9
-
-package aws
-
-import "time"
-
-// Context is an copy of the Go v1.7 stdlib's context.Context interface.
-// It is represented as a SDK interface to enable you to use the "WithContext"
-// API methods with Go v1.6 and a Context type such as golang.org/x/net/context.
-//
-// See https://golang.org/pkg/context on how to use contexts.
-type Context interface {
- // Deadline returns the time when work done on behalf of this context
- // should be canceled. Deadline returns ok==false when no deadline is
- // set. Successive calls to Deadline return the same results.
- Deadline() (deadline time.Time, ok bool)
-
- // Done returns a channel that's closed when work done on behalf of this
- // context should be canceled. Done may return nil if this context can
- // never be canceled. Successive calls to Done return the same value.
- Done() <-chan struct{}
-
- // Err returns a non-nil error value after Done is closed. Err returns
- // Canceled if the context was canceled or DeadlineExceeded if the
- // context's deadline passed. No other values for Err are defined.
- // After Done is closed, successive calls to Err return the same value.
- Err() error
-
- // Value returns the value associated with this context for key, or nil
- // if no value is associated with key. Successive calls to Value with
- // the same key returns the same result.
- //
- // Use context values only for request-scoped data that transits
- // processes and API boundaries, not for passing optional parameters to
- // functions.
- Value(key interface{}) interface{}
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go b/vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go
deleted file mode 100644
index 6ee9ddd18..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_1_9.go
+++ /dev/null
@@ -1,12 +0,0 @@
-//go:build go1.9
-// +build go1.9
-
-package aws
-
-import "context"
-
-// Context is an alias of the Go stdlib's context.Context interface.
-// It can be used within the SDK's API operation "WithContext" methods.
-//
-// See https://golang.org/pkg/context on how to use contexts.
-type Context = context.Context
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go b/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go
deleted file mode 100644
index 313218190..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_5.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package aws
-
-import (
- "github.com/aws/aws-sdk-go/internal/context"
-)
-
-// BackgroundContext returns a context that will never be canceled, has no
-// values, and no deadline. This context is used by the SDK to provide
-// backwards compatibility with non-context API operations and functionality.
-//
-// Go 1.6 and before:
-// This context function is equivalent to context.Background in the Go stdlib.
-//
-// Go 1.7 and later:
-// The context returned will be the value returned by context.Background()
-//
-// See https://golang.org/pkg/context for more information on Contexts.
-func BackgroundContext() Context {
- return context.BackgroundCtx
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go
deleted file mode 100644
index 9975d561b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_background_1_7.go
+++ /dev/null
@@ -1,21 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package aws
-
-import "context"
-
-// BackgroundContext returns a context that will never be canceled, has no
-// values, and no deadline. This context is used by the SDK to provide
-// backwards compatibility with non-context API operations and functionality.
-//
-// Go 1.6 and before:
-// This context function is equivalent to context.Background in the Go stdlib.
-//
-// Go 1.7 and later:
-// The context returned will be the value returned by context.Background()
-//
-// See https://golang.org/pkg/context for more information on Contexts.
-func BackgroundContext() Context {
- return context.Background()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go b/vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go
deleted file mode 100644
index 304fd1561..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/context_sleep.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package aws
-
-import (
- "time"
-)
-
-// SleepWithContext will wait for the timer duration to expire, or the context
-// is canceled. Which ever happens first. If the context is canceled the Context's
-// error will be returned.
-//
-// Expects Context to always return a non-nil error if the Done channel is closed.
-func SleepWithContext(ctx Context, dur time.Duration) error {
- t := time.NewTimer(dur)
- defer t.Stop()
-
- select {
- case <-t.C:
- break
- case <-ctx.Done():
- return ctx.Err()
- }
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go b/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
deleted file mode 100644
index 4e076c183..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/convert_types.go
+++ /dev/null
@@ -1,918 +0,0 @@
-package aws
-
-import "time"
-
-// String returns a pointer to the string value passed in.
-func String(v string) *string {
- return &v
-}
-
-// StringValue returns the value of the string pointer passed in or
-// "" if the pointer is nil.
-func StringValue(v *string) string {
- if v != nil {
- return *v
- }
- return ""
-}
-
-// StringSlice converts a slice of string values into a slice of
-// string pointers
-func StringSlice(src []string) []*string {
- dst := make([]*string, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// StringValueSlice converts a slice of string pointers into a slice of
-// string values
-func StringValueSlice(src []*string) []string {
- dst := make([]string, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// StringMap converts a string map of string values into a string
-// map of string pointers
-func StringMap(src map[string]string) map[string]*string {
- dst := make(map[string]*string)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// StringValueMap converts a string map of string pointers into a string
-// map of string values
-func StringValueMap(src map[string]*string) map[string]string {
- dst := make(map[string]string)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Bool returns a pointer to the bool value passed in.
-func Bool(v bool) *bool {
- return &v
-}
-
-// BoolValue returns the value of the bool pointer passed in or
-// false if the pointer is nil.
-func BoolValue(v *bool) bool {
- if v != nil {
- return *v
- }
- return false
-}
-
-// BoolSlice converts a slice of bool values into a slice of
-// bool pointers
-func BoolSlice(src []bool) []*bool {
- dst := make([]*bool, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// BoolValueSlice converts a slice of bool pointers into a slice of
-// bool values
-func BoolValueSlice(src []*bool) []bool {
- dst := make([]bool, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// BoolMap converts a string map of bool values into a string
-// map of bool pointers
-func BoolMap(src map[string]bool) map[string]*bool {
- dst := make(map[string]*bool)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// BoolValueMap converts a string map of bool pointers into a string
-// map of bool values
-func BoolValueMap(src map[string]*bool) map[string]bool {
- dst := make(map[string]bool)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int returns a pointer to the int value passed in.
-func Int(v int) *int {
- return &v
-}
-
-// IntValue returns the value of the int pointer passed in or
-// 0 if the pointer is nil.
-func IntValue(v *int) int {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// IntSlice converts a slice of int values into a slice of
-// int pointers
-func IntSlice(src []int) []*int {
- dst := make([]*int, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// IntValueSlice converts a slice of int pointers into a slice of
-// int values
-func IntValueSlice(src []*int) []int {
- dst := make([]int, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// IntMap converts a string map of int values into a string
-// map of int pointers
-func IntMap(src map[string]int) map[string]*int {
- dst := make(map[string]*int)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// IntValueMap converts a string map of int pointers into a string
-// map of int values
-func IntValueMap(src map[string]*int) map[string]int {
- dst := make(map[string]int)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint returns a pointer to the uint value passed in.
-func Uint(v uint) *uint {
- return &v
-}
-
-// UintValue returns the value of the uint pointer passed in or
-// 0 if the pointer is nil.
-func UintValue(v *uint) uint {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// UintSlice converts a slice of uint values uinto a slice of
-// uint pointers
-func UintSlice(src []uint) []*uint {
- dst := make([]*uint, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// UintValueSlice converts a slice of uint pointers uinto a slice of
-// uint values
-func UintValueSlice(src []*uint) []uint {
- dst := make([]uint, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// UintMap converts a string map of uint values uinto a string
-// map of uint pointers
-func UintMap(src map[string]uint) map[string]*uint {
- dst := make(map[string]*uint)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// UintValueMap converts a string map of uint pointers uinto a string
-// map of uint values
-func UintValueMap(src map[string]*uint) map[string]uint {
- dst := make(map[string]uint)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int8 returns a pointer to the int8 value passed in.
-func Int8(v int8) *int8 {
- return &v
-}
-
-// Int8Value returns the value of the int8 pointer passed in or
-// 0 if the pointer is nil.
-func Int8Value(v *int8) int8 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int8Slice converts a slice of int8 values into a slice of
-// int8 pointers
-func Int8Slice(src []int8) []*int8 {
- dst := make([]*int8, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int8ValueSlice converts a slice of int8 pointers into a slice of
-// int8 values
-func Int8ValueSlice(src []*int8) []int8 {
- dst := make([]int8, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int8Map converts a string map of int8 values into a string
-// map of int8 pointers
-func Int8Map(src map[string]int8) map[string]*int8 {
- dst := make(map[string]*int8)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int8ValueMap converts a string map of int8 pointers into a string
-// map of int8 values
-func Int8ValueMap(src map[string]*int8) map[string]int8 {
- dst := make(map[string]int8)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int16 returns a pointer to the int16 value passed in.
-func Int16(v int16) *int16 {
- return &v
-}
-
-// Int16Value returns the value of the int16 pointer passed in or
-// 0 if the pointer is nil.
-func Int16Value(v *int16) int16 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int16Slice converts a slice of int16 values into a slice of
-// int16 pointers
-func Int16Slice(src []int16) []*int16 {
- dst := make([]*int16, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int16ValueSlice converts a slice of int16 pointers into a slice of
-// int16 values
-func Int16ValueSlice(src []*int16) []int16 {
- dst := make([]int16, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int16Map converts a string map of int16 values into a string
-// map of int16 pointers
-func Int16Map(src map[string]int16) map[string]*int16 {
- dst := make(map[string]*int16)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int16ValueMap converts a string map of int16 pointers into a string
-// map of int16 values
-func Int16ValueMap(src map[string]*int16) map[string]int16 {
- dst := make(map[string]int16)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int32 returns a pointer to the int32 value passed in.
-func Int32(v int32) *int32 {
- return &v
-}
-
-// Int32Value returns the value of the int32 pointer passed in or
-// 0 if the pointer is nil.
-func Int32Value(v *int32) int32 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int32Slice converts a slice of int32 values into a slice of
-// int32 pointers
-func Int32Slice(src []int32) []*int32 {
- dst := make([]*int32, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int32ValueSlice converts a slice of int32 pointers into a slice of
-// int32 values
-func Int32ValueSlice(src []*int32) []int32 {
- dst := make([]int32, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int32Map converts a string map of int32 values into a string
-// map of int32 pointers
-func Int32Map(src map[string]int32) map[string]*int32 {
- dst := make(map[string]*int32)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int32ValueMap converts a string map of int32 pointers into a string
-// map of int32 values
-func Int32ValueMap(src map[string]*int32) map[string]int32 {
- dst := make(map[string]int32)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Int64 returns a pointer to the int64 value passed in.
-func Int64(v int64) *int64 {
- return &v
-}
-
-// Int64Value returns the value of the int64 pointer passed in or
-// 0 if the pointer is nil.
-func Int64Value(v *int64) int64 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Int64Slice converts a slice of int64 values into a slice of
-// int64 pointers
-func Int64Slice(src []int64) []*int64 {
- dst := make([]*int64, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Int64ValueSlice converts a slice of int64 pointers into a slice of
-// int64 values
-func Int64ValueSlice(src []*int64) []int64 {
- dst := make([]int64, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Int64Map converts a string map of int64 values into a string
-// map of int64 pointers
-func Int64Map(src map[string]int64) map[string]*int64 {
- dst := make(map[string]*int64)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Int64ValueMap converts a string map of int64 pointers into a string
-// map of int64 values
-func Int64ValueMap(src map[string]*int64) map[string]int64 {
- dst := make(map[string]int64)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint8 returns a pointer to the uint8 value passed in.
-func Uint8(v uint8) *uint8 {
- return &v
-}
-
-// Uint8Value returns the value of the uint8 pointer passed in or
-// 0 if the pointer is nil.
-func Uint8Value(v *uint8) uint8 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint8Slice converts a slice of uint8 values into a slice of
-// uint8 pointers
-func Uint8Slice(src []uint8) []*uint8 {
- dst := make([]*uint8, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint8ValueSlice converts a slice of uint8 pointers into a slice of
-// uint8 values
-func Uint8ValueSlice(src []*uint8) []uint8 {
- dst := make([]uint8, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint8Map converts a string map of uint8 values into a string
-// map of uint8 pointers
-func Uint8Map(src map[string]uint8) map[string]*uint8 {
- dst := make(map[string]*uint8)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint8ValueMap converts a string map of uint8 pointers into a string
-// map of uint8 values
-func Uint8ValueMap(src map[string]*uint8) map[string]uint8 {
- dst := make(map[string]uint8)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint16 returns a pointer to the uint16 value passed in.
-func Uint16(v uint16) *uint16 {
- return &v
-}
-
-// Uint16Value returns the value of the uint16 pointer passed in or
-// 0 if the pointer is nil.
-func Uint16Value(v *uint16) uint16 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint16Slice converts a slice of uint16 values into a slice of
-// uint16 pointers
-func Uint16Slice(src []uint16) []*uint16 {
- dst := make([]*uint16, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint16ValueSlice converts a slice of uint16 pointers into a slice of
-// uint16 values
-func Uint16ValueSlice(src []*uint16) []uint16 {
- dst := make([]uint16, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint16Map converts a string map of uint16 values into a string
-// map of uint16 pointers
-func Uint16Map(src map[string]uint16) map[string]*uint16 {
- dst := make(map[string]*uint16)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint16ValueMap converts a string map of uint16 pointers into a string
-// map of uint16 values
-func Uint16ValueMap(src map[string]*uint16) map[string]uint16 {
- dst := make(map[string]uint16)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint32 returns a pointer to the uint32 value passed in.
-func Uint32(v uint32) *uint32 {
- return &v
-}
-
-// Uint32Value returns the value of the uint32 pointer passed in or
-// 0 if the pointer is nil.
-func Uint32Value(v *uint32) uint32 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint32Slice converts a slice of uint32 values into a slice of
-// uint32 pointers
-func Uint32Slice(src []uint32) []*uint32 {
- dst := make([]*uint32, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint32ValueSlice converts a slice of uint32 pointers into a slice of
-// uint32 values
-func Uint32ValueSlice(src []*uint32) []uint32 {
- dst := make([]uint32, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint32Map converts a string map of uint32 values into a string
-// map of uint32 pointers
-func Uint32Map(src map[string]uint32) map[string]*uint32 {
- dst := make(map[string]*uint32)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint32ValueMap converts a string map of uint32 pointers into a string
-// map of uint32 values
-func Uint32ValueMap(src map[string]*uint32) map[string]uint32 {
- dst := make(map[string]uint32)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Uint64 returns a pointer to the uint64 value passed in.
-func Uint64(v uint64) *uint64 {
- return &v
-}
-
-// Uint64Value returns the value of the uint64 pointer passed in or
-// 0 if the pointer is nil.
-func Uint64Value(v *uint64) uint64 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Uint64Slice converts a slice of uint64 values into a slice of
-// uint64 pointers
-func Uint64Slice(src []uint64) []*uint64 {
- dst := make([]*uint64, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Uint64ValueSlice converts a slice of uint64 pointers into a slice of
-// uint64 values
-func Uint64ValueSlice(src []*uint64) []uint64 {
- dst := make([]uint64, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Uint64Map converts a string map of uint64 values into a string
-// map of uint64 pointers
-func Uint64Map(src map[string]uint64) map[string]*uint64 {
- dst := make(map[string]*uint64)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Uint64ValueMap converts a string map of uint64 pointers into a string
-// map of uint64 values
-func Uint64ValueMap(src map[string]*uint64) map[string]uint64 {
- dst := make(map[string]uint64)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Float32 returns a pointer to the float32 value passed in.
-func Float32(v float32) *float32 {
- return &v
-}
-
-// Float32Value returns the value of the float32 pointer passed in or
-// 0 if the pointer is nil.
-func Float32Value(v *float32) float32 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Float32Slice converts a slice of float32 values into a slice of
-// float32 pointers
-func Float32Slice(src []float32) []*float32 {
- dst := make([]*float32, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Float32ValueSlice converts a slice of float32 pointers into a slice of
-// float32 values
-func Float32ValueSlice(src []*float32) []float32 {
- dst := make([]float32, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Float32Map converts a string map of float32 values into a string
-// map of float32 pointers
-func Float32Map(src map[string]float32) map[string]*float32 {
- dst := make(map[string]*float32)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Float32ValueMap converts a string map of float32 pointers into a string
-// map of float32 values
-func Float32ValueMap(src map[string]*float32) map[string]float32 {
- dst := make(map[string]float32)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Float64 returns a pointer to the float64 value passed in.
-func Float64(v float64) *float64 {
- return &v
-}
-
-// Float64Value returns the value of the float64 pointer passed in or
-// 0 if the pointer is nil.
-func Float64Value(v *float64) float64 {
- if v != nil {
- return *v
- }
- return 0
-}
-
-// Float64Slice converts a slice of float64 values into a slice of
-// float64 pointers
-func Float64Slice(src []float64) []*float64 {
- dst := make([]*float64, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// Float64ValueSlice converts a slice of float64 pointers into a slice of
-// float64 values
-func Float64ValueSlice(src []*float64) []float64 {
- dst := make([]float64, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// Float64Map converts a string map of float64 values into a string
-// map of float64 pointers
-func Float64Map(src map[string]float64) map[string]*float64 {
- dst := make(map[string]*float64)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// Float64ValueMap converts a string map of float64 pointers into a string
-// map of float64 values
-func Float64ValueMap(src map[string]*float64) map[string]float64 {
- dst := make(map[string]float64)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
-
-// Time returns a pointer to the time.Time value passed in.
-func Time(v time.Time) *time.Time {
- return &v
-}
-
-// TimeValue returns the value of the time.Time pointer passed in or
-// time.Time{} if the pointer is nil.
-func TimeValue(v *time.Time) time.Time {
- if v != nil {
- return *v
- }
- return time.Time{}
-}
-
-// SecondsTimeValue converts an int64 pointer to a time.Time value
-// representing seconds since Epoch or time.Time{} if the pointer is nil.
-func SecondsTimeValue(v *int64) time.Time {
- if v != nil {
- return time.Unix((*v / 1000), 0)
- }
- return time.Time{}
-}
-
-// MillisecondsTimeValue converts an int64 pointer to a time.Time value
-// representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.
-func MillisecondsTimeValue(v *int64) time.Time {
- if v != nil {
- return time.Unix(0, (*v * 1000000))
- }
- return time.Time{}
-}
-
-// TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC".
-// The result is undefined if the Unix time cannot be represented by an int64.
-// Which includes calling TimeUnixMilli on a zero Time is undefined.
-//
-// This utility is useful for service API's such as CloudWatch Logs which require
-// their unix time values to be in milliseconds.
-//
-// See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.
-func TimeUnixMilli(t time.Time) int64 {
- return t.UnixNano() / int64(time.Millisecond/time.Nanosecond)
-}
-
-// TimeSlice converts a slice of time.Time values into a slice of
-// time.Time pointers
-func TimeSlice(src []time.Time) []*time.Time {
- dst := make([]*time.Time, len(src))
- for i := 0; i < len(src); i++ {
- dst[i] = &(src[i])
- }
- return dst
-}
-
-// TimeValueSlice converts a slice of time.Time pointers into a slice of
-// time.Time values
-func TimeValueSlice(src []*time.Time) []time.Time {
- dst := make([]time.Time, len(src))
- for i := 0; i < len(src); i++ {
- if src[i] != nil {
- dst[i] = *(src[i])
- }
- }
- return dst
-}
-
-// TimeMap converts a string map of time.Time values into a string
-// map of time.Time pointers
-func TimeMap(src map[string]time.Time) map[string]*time.Time {
- dst := make(map[string]*time.Time)
- for k, val := range src {
- v := val
- dst[k] = &v
- }
- return dst
-}
-
-// TimeValueMap converts a string map of time.Time pointers into a string
-// map of time.Time values
-func TimeValueMap(src map[string]*time.Time) map[string]time.Time {
- dst := make(map[string]time.Time)
- for k, val := range src {
- if val != nil {
- dst[k] = *val
- }
- }
- return dst
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
deleted file mode 100644
index 36a915efe..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go
+++ /dev/null
@@ -1,232 +0,0 @@
-package corehandlers
-
-import (
- "bytes"
- "fmt"
- "io/ioutil"
- "net/http"
- "net/url"
- "regexp"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// Interface for matching types which also have a Len method.
-type lener interface {
- Len() int
-}
-
-// BuildContentLengthHandler builds the content length of a request based on the body,
-// or will use the HTTPRequest.Header's "Content-Length" if defined. If unable
-// to determine request body length and no "Content-Length" was specified it will panic.
-//
-// The Content-Length will only be added to the request if the length of the body
-// is greater than 0. If the body is empty or the current `Content-Length`
-// header is <= 0, the header will also be stripped.
-var BuildContentLengthHandler = request.NamedHandler{Name: "core.BuildContentLengthHandler", Fn: func(r *request.Request) {
- var length int64
-
- if slength := r.HTTPRequest.Header.Get("Content-Length"); slength != "" {
- length, _ = strconv.ParseInt(slength, 10, 64)
- } else {
- if r.Body != nil {
- var err error
- length, err = aws.SeekerLen(r.Body)
- if err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "failed to get request body's length", err)
- return
- }
- }
- }
-
- if length > 0 {
- r.HTTPRequest.ContentLength = length
- r.HTTPRequest.Header.Set("Content-Length", fmt.Sprintf("%d", length))
- } else {
- r.HTTPRequest.ContentLength = 0
- r.HTTPRequest.Header.Del("Content-Length")
- }
-}}
-
-var reStatusCode = regexp.MustCompile(`^(\d{3})`)
-
-// ValidateReqSigHandler is a request handler to ensure that the request's
-// signature doesn't expire before it is sent. This can happen when a request
-// is built and signed significantly before it is sent. Or significant delays
-// occur when retrying requests that would cause the signature to expire.
-var ValidateReqSigHandler = request.NamedHandler{
- Name: "core.ValidateReqSigHandler",
- Fn: func(r *request.Request) {
- // Unsigned requests are not signed
- if r.Config.Credentials == credentials.AnonymousCredentials {
- return
- }
-
- signedTime := r.Time
- if !r.LastSignedAt.IsZero() {
- signedTime = r.LastSignedAt
- }
-
- // 5 minutes to allow for some clock skew/delays in transmission.
- // Would be improved with aws/aws-sdk-go#423
- if signedTime.Add(5 * time.Minute).After(time.Now()) {
- return
- }
-
- fmt.Println("request expired, resigning")
- r.Sign()
- },
-}
-
-// SendHandler is a request handler to send service request using HTTP client.
-var SendHandler = request.NamedHandler{
- Name: "core.SendHandler",
- Fn: func(r *request.Request) {
- sender := sendFollowRedirects
- if r.DisableFollowRedirects {
- sender = sendWithoutFollowRedirects
- }
-
- if request.NoBody == r.HTTPRequest.Body {
- // Strip off the request body if the NoBody reader was used as a
- // place holder for a request body. This prevents the SDK from
- // making requests with a request body when it would be invalid
- // to do so.
- //
- // Use a shallow copy of the http.Request to ensure the race condition
- // of transport on Body will not trigger
- reqOrig, reqCopy := r.HTTPRequest, *r.HTTPRequest
- reqCopy.Body = nil
- r.HTTPRequest = &reqCopy
- defer func() {
- r.HTTPRequest = reqOrig
- }()
- }
-
- var err error
- r.HTTPResponse, err = sender(r)
- if err != nil {
- handleSendError(r, err)
- }
- },
-}
-
-func sendFollowRedirects(r *request.Request) (*http.Response, error) {
- return r.Config.HTTPClient.Do(r.HTTPRequest)
-}
-
-func sendWithoutFollowRedirects(r *request.Request) (*http.Response, error) {
- transport := r.Config.HTTPClient.Transport
- if transport == nil {
- transport = http.DefaultTransport
- }
-
- return transport.RoundTrip(r.HTTPRequest)
-}
-
-func handleSendError(r *request.Request, err error) {
- // Prevent leaking if an HTTPResponse was returned. Clean up
- // the body.
- if r.HTTPResponse != nil {
- r.HTTPResponse.Body.Close()
- }
- // Capture the case where url.Error is returned for error processing
- // response. e.g. 301 without location header comes back as string
- // error and r.HTTPResponse is nil. Other URL redirect errors will
- // comeback in a similar method.
- if e, ok := err.(*url.Error); ok && e.Err != nil {
- if s := reStatusCode.FindStringSubmatch(e.Err.Error()); s != nil {
- code, _ := strconv.ParseInt(s[1], 10, 64)
- r.HTTPResponse = &http.Response{
- StatusCode: int(code),
- Status: http.StatusText(int(code)),
- Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
- }
- return
- }
- }
- if r.HTTPResponse == nil {
- // Add a dummy request response object to ensure the HTTPResponse
- // value is consistent.
- r.HTTPResponse = &http.Response{
- StatusCode: int(0),
- Status: http.StatusText(int(0)),
- Body: ioutil.NopCloser(bytes.NewReader([]byte{})),
- }
- }
- // Catch all request errors, and let the default retrier determine
- // if the error is retryable.
- r.Error = awserr.New(request.ErrCodeRequestError, "send request failed", err)
-
- // Override the error with a context canceled error, if that was canceled.
- ctx := r.Context()
- select {
- case <-ctx.Done():
- r.Error = awserr.New(request.CanceledErrorCode,
- "request context canceled", ctx.Err())
- r.Retryable = aws.Bool(false)
- default:
- }
-}
-
-// ValidateResponseHandler is a request handler to validate service response.
-var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseHandler", Fn: func(r *request.Request) {
- if r.HTTPResponse.StatusCode == 0 || r.HTTPResponse.StatusCode >= 300 {
- // this may be replaced by an UnmarshalError handler
- r.Error = awserr.New("UnknownError", "unknown error", r.Error)
- }
-}}
-
-// AfterRetryHandler performs final checks to determine if the request should
-// be retried and how long to delay.
-var AfterRetryHandler = request.NamedHandler{
- Name: "core.AfterRetryHandler",
- Fn: func(r *request.Request) {
- // If one of the other handlers already set the retry state
- // we don't want to override it based on the service's state
- if r.Retryable == nil || aws.BoolValue(r.Config.EnforceShouldRetryCheck) {
- r.Retryable = aws.Bool(r.ShouldRetry(r))
- }
-
- if r.WillRetry() {
- r.RetryDelay = r.RetryRules(r)
-
- if sleepFn := r.Config.SleepDelay; sleepFn != nil {
- // Support SleepDelay for backwards compatibility and testing
- sleepFn(r.RetryDelay)
- } else if err := aws.SleepWithContext(r.Context(), r.RetryDelay); err != nil {
- r.Error = awserr.New(request.CanceledErrorCode,
- "request context canceled", err)
- r.Retryable = aws.Bool(false)
- return
- }
-
- // when the expired token exception occurs the credentials
- // need to be expired locally so that the next request to
- // get credentials will trigger a credentials refresh.
- if r.IsErrorExpired() {
- r.Config.Credentials.Expire()
- }
-
- r.RetryCount++
- r.Error = nil
- }
- }}
-
-// ValidateEndpointHandler is a request handler to validate a request had the
-// appropriate Region and Endpoint set. Will set r.Error if the endpoint or
-// region is not valid.
-var ValidateEndpointHandler = request.NamedHandler{Name: "core.ValidateEndpointHandler", Fn: func(r *request.Request) {
- if r.ClientInfo.SigningRegion == "" && aws.StringValue(r.Config.Region) == "" {
- r.Error = aws.ErrMissingRegion
- } else if r.ClientInfo.Endpoint == "" {
- // Was any endpoint provided by the user, or one was derived by the
- // SDK's endpoint resolver?
- r.Error = aws.ErrMissingEndpoint
- }
-}}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go
deleted file mode 100644
index 7d50b1557..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/param_validator.go
+++ /dev/null
@@ -1,17 +0,0 @@
-package corehandlers
-
-import "github.com/aws/aws-sdk-go/aws/request"
-
-// ValidateParametersHandler is a request handler to validate the input parameters.
-// Validating parameters only has meaning if done prior to the request being sent.
-var ValidateParametersHandler = request.NamedHandler{Name: "core.ValidateParametersHandler", Fn: func(r *request.Request) {
- if !r.ParamsFilled() {
- return
- }
-
- if v, ok := r.Params.(request.Validator); ok {
- if err := v.Validate(); err != nil {
- r.Error = err
- }
- }
-}}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go
deleted file mode 100644
index ab69c7a6f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/user_agent.go
+++ /dev/null
@@ -1,37 +0,0 @@
-package corehandlers
-
-import (
- "os"
- "runtime"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// SDKVersionUserAgentHandler is a request handler for adding the SDK Version
-// to the user agent.
-var SDKVersionUserAgentHandler = request.NamedHandler{
- Name: "core.SDKVersionUserAgentHandler",
- Fn: request.MakeAddToUserAgentHandler(aws.SDKName, aws.SDKVersion,
- runtime.Version(), runtime.GOOS, runtime.GOARCH),
-}
-
-const execEnvVar = `AWS_EXECUTION_ENV`
-const execEnvUAKey = `exec-env`
-
-// AddHostExecEnvUserAgentHander is a request handler appending the SDK's
-// execution environment to the user agent.
-//
-// If the environment variable AWS_EXECUTION_ENV is set, its value will be
-// appended to the user agent string.
-var AddHostExecEnvUserAgentHander = request.NamedHandler{
- Name: "core.AddHostExecEnvUserAgentHander",
- Fn: func(r *request.Request) {
- v := os.Getenv(execEnvVar)
- if len(v) == 0 {
- return
- }
-
- request.AddToUserAgent(r, execEnvUAKey+"/"+v)
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
deleted file mode 100644
index 3ad1e798d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/chain_provider.go
+++ /dev/null
@@ -1,100 +0,0 @@
-package credentials
-
-import (
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-var (
- // ErrNoValidProvidersFoundInChain Is returned when there are no valid
- // providers in the ChainProvider.
- //
- // This has been deprecated. For verbose error messaging set
- // aws.Config.CredentialsChainVerboseErrors to true.
- ErrNoValidProvidersFoundInChain = awserr.New("NoCredentialProviders",
- `no valid providers in chain. Deprecated.
- For verbose messaging see aws.Config.CredentialsChainVerboseErrors`,
- nil)
-)
-
-// A ChainProvider will search for a provider which returns credentials
-// and cache that provider until Retrieve is called again.
-//
-// The ChainProvider provides a way of chaining multiple providers together
-// which will pick the first available using priority order of the Providers
-// in the list.
-//
-// If none of the Providers retrieve valid credentials Value, ChainProvider's
-// Retrieve() will return the error ErrNoValidProvidersFoundInChain.
-//
-// If a Provider is found which returns valid credentials Value ChainProvider
-// will cache that Provider for all calls to IsExpired(), until Retrieve is
-// called again.
-//
-// Example of ChainProvider to be used with an EnvProvider and EC2RoleProvider.
-// In this example EnvProvider will first check if any credentials are available
-// via the environment variables. If there are none ChainProvider will check
-// the next Provider in the list, EC2RoleProvider in this case. If EC2RoleProvider
-// does not return any credentials ChainProvider will return the error
-// ErrNoValidProvidersFoundInChain
-//
-// creds := credentials.NewChainCredentials(
-// []credentials.Provider{
-// &credentials.EnvProvider{},
-// &ec2rolecreds.EC2RoleProvider{
-// Client: ec2metadata.New(sess),
-// },
-// })
-//
-// // Usage of ChainCredentials with aws.Config
-// svc := ec2.New(session.Must(session.NewSession(&aws.Config{
-// Credentials: creds,
-// })))
-//
-type ChainProvider struct {
- Providers []Provider
- curr Provider
- VerboseErrors bool
-}
-
-// NewChainCredentials returns a pointer to a new Credentials object
-// wrapping a chain of providers.
-func NewChainCredentials(providers []Provider) *Credentials {
- return NewCredentials(&ChainProvider{
- Providers: append([]Provider{}, providers...),
- })
-}
-
-// Retrieve returns the credentials value or error if no provider returned
-// without error.
-//
-// If a provider is found it will be cached and any calls to IsExpired()
-// will return the expired state of the cached provider.
-func (c *ChainProvider) Retrieve() (Value, error) {
- var errs []error
- for _, p := range c.Providers {
- creds, err := p.Retrieve()
- if err == nil {
- c.curr = p
- return creds, nil
- }
- errs = append(errs, err)
- }
- c.curr = nil
-
- var err error
- err = ErrNoValidProvidersFoundInChain
- if c.VerboseErrors {
- err = awserr.NewBatchError("NoCredentialProviders", "no valid providers in chain", errs)
- }
- return Value{}, err
-}
-
-// IsExpired will returned the expired state of the currently cached provider
-// if there is one. If there is no current provider, true will be returned.
-func (c *ChainProvider) IsExpired() bool {
- if c.curr != nil {
- return c.curr.IsExpired()
- }
-
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.5.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.5.go
deleted file mode 100644
index 6e3406b1f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.5.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package credentials
-
-import (
- "github.com/aws/aws-sdk-go/internal/context"
-)
-
-// backgroundContext returns a context that will never be canceled, has no
-// values, and no deadline. This context is used by the SDK to provide
-// backwards compatibility with non-context API operations and functionality.
-//
-// Go 1.6 and before:
-// This context function is equivalent to context.Background in the Go stdlib.
-//
-// Go 1.7 and later:
-// The context returned will be the value returned by context.Background()
-//
-// See https://golang.org/pkg/context for more information on Contexts.
-func backgroundContext() Context {
- return context.BackgroundCtx
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.7.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.7.go
deleted file mode 100644
index a68df0ee7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_background_go1.7.go
+++ /dev/null
@@ -1,21 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package credentials
-
-import "context"
-
-// backgroundContext returns a context that will never be canceled, has no
-// values, and no deadline. This context is used by the SDK to provide
-// backwards compatibility with non-context API operations and functionality.
-//
-// Go 1.6 and before:
-// This context function is equivalent to context.Background in the Go stdlib.
-//
-// Go 1.7 and later:
-// The context returned will be the value returned by context.Background()
-//
-// See https://golang.org/pkg/context for more information on Contexts.
-func backgroundContext() Context {
- return context.Background()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.5.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.5.go
deleted file mode 100644
index 0345fab2d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.5.go
+++ /dev/null
@@ -1,40 +0,0 @@
-//go:build !go1.9
-// +build !go1.9
-
-package credentials
-
-import "time"
-
-// Context is an copy of the Go v1.7 stdlib's context.Context interface.
-// It is represented as a SDK interface to enable you to use the "WithContext"
-// API methods with Go v1.6 and a Context type such as golang.org/x/net/context.
-//
-// This type, aws.Context, and context.Context are equivalent.
-//
-// See https://golang.org/pkg/context on how to use contexts.
-type Context interface {
- // Deadline returns the time when work done on behalf of this context
- // should be canceled. Deadline returns ok==false when no deadline is
- // set. Successive calls to Deadline return the same results.
- Deadline() (deadline time.Time, ok bool)
-
- // Done returns a channel that's closed when work done on behalf of this
- // context should be canceled. Done may return nil if this context can
- // never be canceled. Successive calls to Done return the same value.
- Done() <-chan struct{}
-
- // Err returns a non-nil error value after Done is closed. Err returns
- // Canceled if the context was canceled or DeadlineExceeded if the
- // context's deadline passed. No other values for Err are defined.
- // After Done is closed, successive calls to Err return the same value.
- Err() error
-
- // Value returns the value associated with this context for key, or nil
- // if no value is associated with key. Successive calls to Value with
- // the same key returns the same result.
- //
- // Use context values only for request-scoped data that transits
- // processes and API boundaries, not for passing optional parameters to
- // functions.
- Value(key interface{}) interface{}
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.9.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.9.go
deleted file mode 100644
index 79018aba7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/context_go1.9.go
+++ /dev/null
@@ -1,14 +0,0 @@
-//go:build go1.9
-// +build go1.9
-
-package credentials
-
-import "context"
-
-// Context is an alias of the Go stdlib's context.Context interface.
-// It can be used within the SDK's API operation "WithContext" methods.
-//
-// This type, aws.Context, and context.Context are equivalent.
-//
-// See https://golang.org/pkg/context on how to use contexts.
-type Context = context.Context
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
deleted file mode 100644
index a880a3de8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/credentials.go
+++ /dev/null
@@ -1,383 +0,0 @@
-// Package credentials provides credential retrieval and management
-//
-// The Credentials is the primary method of getting access to and managing
-// credentials Values. Using dependency injection retrieval of the credential
-// values is handled by a object which satisfies the Provider interface.
-//
-// By default the Credentials.Get() will cache the successful result of a
-// Provider's Retrieve() until Provider.IsExpired() returns true. At which
-// point Credentials will call Provider's Retrieve() to get new credential Value.
-//
-// The Provider is responsible for determining when credentials Value have expired.
-// It is also important to note that Credentials will always call Retrieve the
-// first time Credentials.Get() is called.
-//
-// Example of using the environment variable credentials.
-//
-// creds := credentials.NewEnvCredentials()
-//
-// // Retrieve the credentials value
-// credValue, err := creds.Get()
-// if err != nil {
-// // handle error
-// }
-//
-// Example of forcing credentials to expire and be refreshed on the next Get().
-// This may be helpful to proactively expire credentials and refresh them sooner
-// than they would naturally expire on their own.
-//
-// creds := credentials.NewCredentials(&ec2rolecreds.EC2RoleProvider{})
-// creds.Expire()
-// credsValue, err := creds.Get()
-// // New credentials will be retrieved instead of from cache.
-//
-//
-// Custom Provider
-//
-// Each Provider built into this package also provides a helper method to generate
-// a Credentials pointer setup with the provider. To use a custom Provider just
-// create a type which satisfies the Provider interface and pass it to the
-// NewCredentials method.
-//
-// type MyProvider struct{}
-// func (m *MyProvider) Retrieve() (Value, error) {...}
-// func (m *MyProvider) IsExpired() bool {...}
-//
-// creds := credentials.NewCredentials(&MyProvider{})
-// credValue, err := creds.Get()
-//
-package credentials
-
-import (
- "fmt"
- "sync"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/internal/sync/singleflight"
-)
-
-// AnonymousCredentials is an empty Credential object that can be used as
-// dummy placeholder credentials for requests that do not need signed.
-//
-// This Credentials can be used to configure a service to not sign requests
-// when making service API calls. For example, when accessing public
-// s3 buckets.
-//
-// svc := s3.New(session.Must(session.NewSession(&aws.Config{
-// Credentials: credentials.AnonymousCredentials,
-// })))
-// // Access public S3 buckets.
-var AnonymousCredentials = NewStaticCredentials("", "", "")
-
-// A Value is the AWS credentials value for individual credential fields.
-type Value struct {
- // AWS Access key ID
- AccessKeyID string
-
- // AWS Secret Access Key
- SecretAccessKey string
-
- // AWS Session Token
- SessionToken string
-
- // Provider used to get credentials
- ProviderName string
-}
-
-// HasKeys returns if the credentials Value has both AccessKeyID and
-// SecretAccessKey value set.
-func (v Value) HasKeys() bool {
- return len(v.AccessKeyID) != 0 && len(v.SecretAccessKey) != 0
-}
-
-// A Provider is the interface for any component which will provide credentials
-// Value. A provider is required to manage its own Expired state, and what to
-// be expired means.
-//
-// The Provider should not need to implement its own mutexes, because
-// that will be managed by Credentials.
-type Provider interface {
- // Retrieve returns nil if it successfully retrieved the value.
- // Error is returned if the value were not obtainable, or empty.
- Retrieve() (Value, error)
-
- // IsExpired returns if the credentials are no longer valid, and need
- // to be retrieved.
- IsExpired() bool
-}
-
-// ProviderWithContext is a Provider that can retrieve credentials with a Context
-type ProviderWithContext interface {
- Provider
-
- RetrieveWithContext(Context) (Value, error)
-}
-
-// An Expirer is an interface that Providers can implement to expose the expiration
-// time, if known. If the Provider cannot accurately provide this info,
-// it should not implement this interface.
-type Expirer interface {
- // The time at which the credentials are no longer valid
- ExpiresAt() time.Time
-}
-
-// An ErrorProvider is a stub credentials provider that always returns an error
-// this is used by the SDK when construction a known provider is not possible
-// due to an error.
-type ErrorProvider struct {
- // The error to be returned from Retrieve
- Err error
-
- // The provider name to set on the Retrieved returned Value
- ProviderName string
-}
-
-// Retrieve will always return the error that the ErrorProvider was created with.
-func (p ErrorProvider) Retrieve() (Value, error) {
- return Value{ProviderName: p.ProviderName}, p.Err
-}
-
-// IsExpired will always return not expired.
-func (p ErrorProvider) IsExpired() bool {
- return false
-}
-
-// A Expiry provides shared expiration logic to be used by credentials
-// providers to implement expiry functionality.
-//
-// The best method to use this struct is as an anonymous field within the
-// provider's struct.
-//
-// Example:
-// type EC2RoleProvider struct {
-// Expiry
-// ...
-// }
-type Expiry struct {
- // The date/time when to expire on
- expiration time.Time
-
- // If set will be used by IsExpired to determine the current time.
- // Defaults to time.Now if CurrentTime is not set. Available for testing
- // to be able to mock out the current time.
- CurrentTime func() time.Time
-}
-
-// SetExpiration sets the expiration IsExpired will check when called.
-//
-// If window is greater than 0 the expiration time will be reduced by the
-// window value.
-//
-// Using a window is helpful to trigger credentials to expire sooner than
-// the expiration time given to ensure no requests are made with expired
-// tokens.
-func (e *Expiry) SetExpiration(expiration time.Time, window time.Duration) {
- // Passed in expirations should have the monotonic clock values stripped.
- // This ensures time comparisons will be based on wall-time.
- e.expiration = expiration.Round(0)
- if window > 0 {
- e.expiration = e.expiration.Add(-window)
- }
-}
-
-// IsExpired returns if the credentials are expired.
-func (e *Expiry) IsExpired() bool {
- curTime := e.CurrentTime
- if curTime == nil {
- curTime = time.Now
- }
- return e.expiration.Before(curTime())
-}
-
-// ExpiresAt returns the expiration time of the credential
-func (e *Expiry) ExpiresAt() time.Time {
- return e.expiration
-}
-
-// A Credentials provides concurrency safe retrieval of AWS credentials Value.
-// Credentials will cache the credentials value until they expire. Once the value
-// expires the next Get will attempt to retrieve valid credentials.
-//
-// Credentials is safe to use across multiple goroutines and will manage the
-// synchronous state so the Providers do not need to implement their own
-// synchronization.
-//
-// The first Credentials.Get() will always call Provider.Retrieve() to get the
-// first instance of the credentials Value. All calls to Get() after that
-// will return the cached credentials Value until IsExpired() returns true.
-type Credentials struct {
- sf singleflight.Group
-
- m sync.RWMutex
- creds Value
- provider Provider
-}
-
-// NewCredentials returns a pointer to a new Credentials with the provider set.
-func NewCredentials(provider Provider) *Credentials {
- c := &Credentials{
- provider: provider,
- }
- return c
-}
-
-// GetWithContext returns the credentials value, or error if the credentials
-// Value failed to be retrieved. Will return early if the passed in context is
-// canceled.
-//
-// Will return the cached credentials Value if it has not expired. If the
-// credentials Value has expired the Provider's Retrieve() will be called
-// to refresh the credentials.
-//
-// If Credentials.Expire() was called the credentials Value will be force
-// expired, and the next call to Get() will cause them to be refreshed.
-//
-// Passed in Context is equivalent to aws.Context, and context.Context.
-func (c *Credentials) GetWithContext(ctx Context) (Value, error) {
- // Check if credentials are cached, and not expired.
- select {
- case curCreds, ok := <-c.asyncIsExpired():
- // ok will only be true, of the credentials were not expired. ok will
- // be false and have no value if the credentials are expired.
- if ok {
- return curCreds, nil
- }
- case <-ctx.Done():
- return Value{}, awserr.New("RequestCanceled",
- "request context canceled", ctx.Err())
- }
-
- // Cannot pass context down to the actual retrieve, because the first
- // context would cancel the whole group when there is not direct
- // association of items in the group.
- resCh := c.sf.DoChan("", func() (interface{}, error) {
- return c.singleRetrieve(&suppressedContext{ctx})
- })
- select {
- case res := <-resCh:
- return res.Val.(Value), res.Err
- case <-ctx.Done():
- return Value{}, awserr.New("RequestCanceled",
- "request context canceled", ctx.Err())
- }
-}
-
-func (c *Credentials) singleRetrieve(ctx Context) (interface{}, error) {
- c.m.Lock()
- defer c.m.Unlock()
-
- if curCreds := c.creds; !c.isExpiredLocked(curCreds) {
- return curCreds, nil
- }
-
- var creds Value
- var err error
- if p, ok := c.provider.(ProviderWithContext); ok {
- creds, err = p.RetrieveWithContext(ctx)
- } else {
- creds, err = c.provider.Retrieve()
- }
- if err == nil {
- c.creds = creds
- }
-
- return creds, err
-}
-
-// Get returns the credentials value, or error if the credentials Value failed
-// to be retrieved.
-//
-// Will return the cached credentials Value if it has not expired. If the
-// credentials Value has expired the Provider's Retrieve() will be called
-// to refresh the credentials.
-//
-// If Credentials.Expire() was called the credentials Value will be force
-// expired, and the next call to Get() will cause them to be refreshed.
-func (c *Credentials) Get() (Value, error) {
- return c.GetWithContext(backgroundContext())
-}
-
-// Expire expires the credentials and forces them to be retrieved on the
-// next call to Get().
-//
-// This will override the Provider's expired state, and force Credentials
-// to call the Provider's Retrieve().
-func (c *Credentials) Expire() {
- c.m.Lock()
- defer c.m.Unlock()
-
- c.creds = Value{}
-}
-
-// IsExpired returns if the credentials are no longer valid, and need
-// to be retrieved.
-//
-// If the Credentials were forced to be expired with Expire() this will
-// reflect that override.
-func (c *Credentials) IsExpired() bool {
- c.m.RLock()
- defer c.m.RUnlock()
-
- return c.isExpiredLocked(c.creds)
-}
-
-// asyncIsExpired returns a channel of credentials Value. If the channel is
-// closed the credentials are expired and credentials value are not empty.
-func (c *Credentials) asyncIsExpired() <-chan Value {
- ch := make(chan Value, 1)
- go func() {
- c.m.RLock()
- defer c.m.RUnlock()
-
- if curCreds := c.creds; !c.isExpiredLocked(curCreds) {
- ch <- curCreds
- }
-
- close(ch)
- }()
-
- return ch
-}
-
-// isExpiredLocked helper method wrapping the definition of expired credentials.
-func (c *Credentials) isExpiredLocked(creds interface{}) bool {
- return creds == nil || creds.(Value) == Value{} || c.provider.IsExpired()
-}
-
-// ExpiresAt provides access to the functionality of the Expirer interface of
-// the underlying Provider, if it supports that interface. Otherwise, it returns
-// an error.
-func (c *Credentials) ExpiresAt() (time.Time, error) {
- c.m.RLock()
- defer c.m.RUnlock()
-
- expirer, ok := c.provider.(Expirer)
- if !ok {
- return time.Time{}, awserr.New("ProviderNotExpirer",
- fmt.Sprintf("provider %s does not support ExpiresAt()",
- c.creds.ProviderName),
- nil)
- }
- if c.creds == (Value{}) {
- // set expiration time to the distant past
- return time.Time{}, nil
- }
- return expirer.ExpiresAt(), nil
-}
-
-type suppressedContext struct {
- Context
-}
-
-func (s *suppressedContext) Deadline() (deadline time.Time, ok bool) {
- return time.Time{}, false
-}
-
-func (s *suppressedContext) Done() <-chan struct{} {
- return nil
-}
-
-func (s *suppressedContext) Err() error {
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
deleted file mode 100644
index 92af5b725..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds/ec2_role_provider.go
+++ /dev/null
@@ -1,188 +0,0 @@
-package ec2rolecreds
-
-import (
- "bufio"
- "encoding/json"
- "fmt"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/ec2metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkuri"
-)
-
-// ProviderName provides a name of EC2Role provider
-const ProviderName = "EC2RoleProvider"
-
-// A EC2RoleProvider retrieves credentials from the EC2 service, and keeps track if
-// those credentials are expired.
-//
-// Example how to configure the EC2RoleProvider with custom http Client, Endpoint
-// or ExpiryWindow
-//
-// p := &ec2rolecreds.EC2RoleProvider{
-// // Pass in a custom timeout to be used when requesting
-// // IAM EC2 Role credentials.
-// Client: ec2metadata.New(sess, aws.Config{
-// HTTPClient: &http.Client{Timeout: 10 * time.Second},
-// }),
-//
-// // Do not use early expiry of credentials. If a non zero value is
-// // specified the credentials will be expired early
-// ExpiryWindow: 0,
-// }
-type EC2RoleProvider struct {
- credentials.Expiry
-
- // Required EC2Metadata client to use when connecting to EC2 metadata service.
- Client *ec2metadata.EC2Metadata
-
- // ExpiryWindow will allow the credentials to trigger refreshing prior to
- // the credentials actually expiring. This is beneficial so race conditions
- // with expiring credentials do not cause request to fail unexpectedly
- // due to ExpiredTokenException exceptions.
- //
- // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
- // 10 seconds before the credentials are actually expired.
- //
- // If ExpiryWindow is 0 or less it will be ignored.
- ExpiryWindow time.Duration
-}
-
-// NewCredentials returns a pointer to a new Credentials object wrapping
-// the EC2RoleProvider. Takes a ConfigProvider to create a EC2Metadata client.
-// The ConfigProvider is satisfied by the session.Session type.
-func NewCredentials(c client.ConfigProvider, options ...func(*EC2RoleProvider)) *credentials.Credentials {
- p := &EC2RoleProvider{
- Client: ec2metadata.New(c),
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// NewCredentialsWithClient returns a pointer to a new Credentials object wrapping
-// the EC2RoleProvider. Takes a EC2Metadata client to use when connecting to EC2
-// metadata service.
-func NewCredentialsWithClient(client *ec2metadata.EC2Metadata, options ...func(*EC2RoleProvider)) *credentials.Credentials {
- p := &EC2RoleProvider{
- Client: client,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// Retrieve retrieves credentials from the EC2 service.
-// Error will be returned if the request fails, or unable to extract
-// the desired credentials.
-func (m *EC2RoleProvider) Retrieve() (credentials.Value, error) {
- return m.RetrieveWithContext(aws.BackgroundContext())
-}
-
-// RetrieveWithContext retrieves credentials from the EC2 service.
-// Error will be returned if the request fails, or unable to extract
-// the desired credentials.
-func (m *EC2RoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
- credsList, err := requestCredList(ctx, m.Client)
- if err != nil {
- return credentials.Value{ProviderName: ProviderName}, err
- }
-
- if len(credsList) == 0 {
- return credentials.Value{ProviderName: ProviderName}, awserr.New("EmptyEC2RoleList", "empty EC2 Role list", nil)
- }
- credsName := credsList[0]
-
- roleCreds, err := requestCred(ctx, m.Client, credsName)
- if err != nil {
- return credentials.Value{ProviderName: ProviderName}, err
- }
-
- m.SetExpiration(roleCreds.Expiration, m.ExpiryWindow)
-
- return credentials.Value{
- AccessKeyID: roleCreds.AccessKeyID,
- SecretAccessKey: roleCreds.SecretAccessKey,
- SessionToken: roleCreds.Token,
- ProviderName: ProviderName,
- }, nil
-}
-
-// A ec2RoleCredRespBody provides the shape for unmarshaling credential
-// request responses.
-type ec2RoleCredRespBody struct {
- // Success State
- Expiration time.Time
- AccessKeyID string
- SecretAccessKey string
- Token string
-
- // Error state
- Code string
- Message string
-}
-
-const iamSecurityCredsPath = "iam/security-credentials/"
-
-// requestCredList requests a list of credentials from the EC2 service.
-// If there are no credentials, or there is an error making or receiving the request
-func requestCredList(ctx aws.Context, client *ec2metadata.EC2Metadata) ([]string, error) {
- resp, err := client.GetMetadataWithContext(ctx, iamSecurityCredsPath)
- if err != nil {
- return nil, awserr.New("EC2RoleRequestError", "no EC2 instance role found", err)
- }
-
- credsList := []string{}
- s := bufio.NewScanner(strings.NewReader(resp))
- for s.Scan() {
- credsList = append(credsList, s.Text())
- }
-
- if err := s.Err(); err != nil {
- return nil, awserr.New(request.ErrCodeSerialization,
- "failed to read EC2 instance role from metadata service", err)
- }
-
- return credsList, nil
-}
-
-// requestCred requests the credentials for a specific credentials from the EC2 service.
-//
-// If the credentials cannot be found, or there is an error reading the response
-// and error will be returned.
-func requestCred(ctx aws.Context, client *ec2metadata.EC2Metadata, credsName string) (ec2RoleCredRespBody, error) {
- resp, err := client.GetMetadataWithContext(ctx, sdkuri.PathJoin(iamSecurityCredsPath, credsName))
- if err != nil {
- return ec2RoleCredRespBody{},
- awserr.New("EC2RoleRequestError",
- fmt.Sprintf("failed to get %s EC2 instance role credentials", credsName),
- err)
- }
-
- respCreds := ec2RoleCredRespBody{}
- if err := json.NewDecoder(strings.NewReader(resp)).Decode(&respCreds); err != nil {
- return ec2RoleCredRespBody{},
- awserr.New(request.ErrCodeSerialization,
- fmt.Sprintf("failed to decode %s EC2 instance role credentials", credsName),
- err)
- }
-
- if respCreds.Code != "Success" {
- // If an error code was returned something failed requesting the role.
- return ec2RoleCredRespBody{}, awserr.New(respCreds.Code, respCreds.Message, nil)
- }
-
- return respCreds, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go
deleted file mode 100644
index 785f30d8e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/endpointcreds/provider.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// Package endpointcreds provides support for retrieving credentials from an
-// arbitrary HTTP endpoint.
-//
-// The credentials endpoint Provider can receive both static and refreshable
-// credentials that will expire. Credentials are static when an "Expiration"
-// value is not provided in the endpoint's response.
-//
-// Static credentials will never expire once they have been retrieved. The format
-// of the static credentials response:
-// {
-// "AccessKeyId" : "MUA...",
-// "SecretAccessKey" : "/7PC5om....",
-// }
-//
-// Refreshable credentials will expire within the "ExpiryWindow" of the Expiration
-// value in the response. The format of the refreshable credentials response:
-// {
-// "AccessKeyId" : "MUA...",
-// "SecretAccessKey" : "/7PC5om....",
-// "Token" : "AQoDY....=",
-// "Expiration" : "2016-02-25T06:03:31Z"
-// }
-//
-// Errors should be returned in the following format and only returned with 400
-// or 500 HTTP status codes.
-// {
-// "code": "ErrorCode",
-// "message": "Helpful error message."
-// }
-package endpointcreds
-
-import (
- "encoding/json"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
-)
-
-// ProviderName is the name of the credentials provider.
-const ProviderName = `CredentialsEndpointProvider`
-
-// Provider satisfies the credentials.Provider interface, and is a client to
-// retrieve credentials from an arbitrary endpoint.
-type Provider struct {
- staticCreds bool
- credentials.Expiry
-
- // Requires a AWS Client to make HTTP requests to the endpoint with.
- // the Endpoint the request will be made to is provided by the aws.Config's
- // Endpoint value.
- Client *client.Client
-
- // ExpiryWindow will allow the credentials to trigger refreshing prior to
- // the credentials actually expiring. This is beneficial so race conditions
- // with expiring credentials do not cause request to fail unexpectedly
- // due to ExpiredTokenException exceptions.
- //
- // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
- // 10 seconds before the credentials are actually expired.
- //
- // If ExpiryWindow is 0 or less it will be ignored.
- ExpiryWindow time.Duration
-
- // Optional authorization token value if set will be used as the value of
- // the Authorization header of the endpoint credential request.
- AuthorizationToken string
-}
-
-// NewProviderClient returns a credentials Provider for retrieving AWS credentials
-// from arbitrary endpoint.
-func NewProviderClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) credentials.Provider {
- p := &Provider{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: "CredentialsEndpoint",
- Endpoint: endpoint,
- },
- handlers,
- ),
- }
-
- p.Client.Handlers.Unmarshal.PushBack(unmarshalHandler)
- p.Client.Handlers.UnmarshalError.PushBack(unmarshalError)
- p.Client.Handlers.Validate.Clear()
- p.Client.Handlers.Validate.PushBack(validateEndpointHandler)
-
- for _, option := range options {
- option(p)
- }
-
- return p
-}
-
-// NewCredentialsClient returns a pointer to a new Credentials object
-// wrapping the endpoint credentials Provider.
-func NewCredentialsClient(cfg aws.Config, handlers request.Handlers, endpoint string, options ...func(*Provider)) *credentials.Credentials {
- return credentials.NewCredentials(NewProviderClient(cfg, handlers, endpoint, options...))
-}
-
-// IsExpired returns true if the credentials retrieved are expired, or not yet
-// retrieved.
-func (p *Provider) IsExpired() bool {
- if p.staticCreds {
- return false
- }
- return p.Expiry.IsExpired()
-}
-
-// Retrieve will attempt to request the credentials from the endpoint the Provider
-// was configured for. And error will be returned if the retrieval fails.
-func (p *Provider) Retrieve() (credentials.Value, error) {
- return p.RetrieveWithContext(aws.BackgroundContext())
-}
-
-// RetrieveWithContext will attempt to request the credentials from the endpoint the Provider
-// was configured for. And error will be returned if the retrieval fails.
-func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
- resp, err := p.getCredentials(ctx)
- if err != nil {
- return credentials.Value{ProviderName: ProviderName},
- awserr.New("CredentialsEndpointError", "failed to load credentials", err)
- }
-
- if resp.Expiration != nil {
- p.SetExpiration(*resp.Expiration, p.ExpiryWindow)
- } else {
- p.staticCreds = true
- }
-
- return credentials.Value{
- AccessKeyID: resp.AccessKeyID,
- SecretAccessKey: resp.SecretAccessKey,
- SessionToken: resp.Token,
- ProviderName: ProviderName,
- }, nil
-}
-
-type getCredentialsOutput struct {
- Expiration *time.Time
- AccessKeyID string
- SecretAccessKey string
- Token string
-}
-
-type errorOutput struct {
- Code string `json:"code"`
- Message string `json:"message"`
-}
-
-func (p *Provider) getCredentials(ctx aws.Context) (*getCredentialsOutput, error) {
- op := &request.Operation{
- Name: "GetCredentials",
- HTTPMethod: "GET",
- }
-
- out := &getCredentialsOutput{}
- req := p.Client.NewRequest(op, nil, out)
- req.SetContext(ctx)
- req.HTTPRequest.Header.Set("Accept", "application/json")
- if authToken := p.AuthorizationToken; len(authToken) != 0 {
- req.HTTPRequest.Header.Set("Authorization", authToken)
- }
-
- return out, req.Send()
-}
-
-func validateEndpointHandler(r *request.Request) {
- if len(r.ClientInfo.Endpoint) == 0 {
- r.Error = aws.ErrMissingEndpoint
- }
-}
-
-func unmarshalHandler(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- out := r.Data.(*getCredentialsOutput)
- if err := json.NewDecoder(r.HTTPResponse.Body).Decode(&out); err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization,
- "failed to decode endpoint credentials",
- err,
- )
- }
-}
-
-func unmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- var errOut errorOutput
- err := jsonutil.UnmarshalJSONError(&errOut, r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to decode error message", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
-
- // Response body format is not consistent between metadata endpoints.
- // Grab the error message as a string and include that as the source error
- r.Error = awserr.New(errOut.Code, errOut.Message, nil)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
deleted file mode 100644
index 54c5cf733..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/env_provider.go
+++ /dev/null
@@ -1,74 +0,0 @@
-package credentials
-
-import (
- "os"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// EnvProviderName provides a name of Env provider
-const EnvProviderName = "EnvProvider"
-
-var (
- // ErrAccessKeyIDNotFound is returned when the AWS Access Key ID can't be
- // found in the process's environment.
- ErrAccessKeyIDNotFound = awserr.New("EnvAccessKeyNotFound", "AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY not found in environment", nil)
-
- // ErrSecretAccessKeyNotFound is returned when the AWS Secret Access Key
- // can't be found in the process's environment.
- ErrSecretAccessKeyNotFound = awserr.New("EnvSecretNotFound", "AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY not found in environment", nil)
-)
-
-// A EnvProvider retrieves credentials from the environment variables of the
-// running process. Environment credentials never expire.
-//
-// Environment variables used:
-//
-// * Access Key ID: AWS_ACCESS_KEY_ID or AWS_ACCESS_KEY
-//
-// * Secret Access Key: AWS_SECRET_ACCESS_KEY or AWS_SECRET_KEY
-type EnvProvider struct {
- retrieved bool
-}
-
-// NewEnvCredentials returns a pointer to a new Credentials object
-// wrapping the environment variable provider.
-func NewEnvCredentials() *Credentials {
- return NewCredentials(&EnvProvider{})
-}
-
-// Retrieve retrieves the keys from the environment.
-func (e *EnvProvider) Retrieve() (Value, error) {
- e.retrieved = false
-
- id := os.Getenv("AWS_ACCESS_KEY_ID")
- if id == "" {
- id = os.Getenv("AWS_ACCESS_KEY")
- }
-
- secret := os.Getenv("AWS_SECRET_ACCESS_KEY")
- if secret == "" {
- secret = os.Getenv("AWS_SECRET_KEY")
- }
-
- if id == "" {
- return Value{ProviderName: EnvProviderName}, ErrAccessKeyIDNotFound
- }
-
- if secret == "" {
- return Value{ProviderName: EnvProviderName}, ErrSecretAccessKeyNotFound
- }
-
- e.retrieved = true
- return Value{
- AccessKeyID: id,
- SecretAccessKey: secret,
- SessionToken: os.Getenv("AWS_SESSION_TOKEN"),
- ProviderName: EnvProviderName,
- }, nil
-}
-
-// IsExpired returns if the credentials have been retrieved.
-func (e *EnvProvider) IsExpired() bool {
- return !e.retrieved
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini b/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini
deleted file mode 100644
index 7fc91d9d2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-[default]
-aws_access_key_id = accessKey
-aws_secret_access_key = secret
-aws_session_token = token
-
-[no_token]
-aws_access_key_id = accessKey
-aws_secret_access_key = secret
-
-[with_colon]
-aws_access_key_id: accessKey
-aws_secret_access_key: secret
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go
deleted file mode 100644
index e62483600..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/processcreds/provider.go
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
-Package processcreds is a credential Provider to retrieve `credential_process`
-credentials.
-
-WARNING: The following describes a method of sourcing credentials from an external
-process. This can potentially be dangerous, so proceed with caution. Other
-credential providers should be preferred if at all possible. If using this
-option, you should make sure that the config file is as locked down as possible
-using security best practices for your operating system.
-
-You can use credentials from a `credential_process` in a variety of ways.
-
-One way is to setup your shared config file, located in the default
-location, with the `credential_process` key and the command you want to be
-called. You also need to set the AWS_SDK_LOAD_CONFIG environment variable
-(e.g., `export AWS_SDK_LOAD_CONFIG=1`) to use the shared config file.
-
- [default]
- credential_process = /command/to/call
-
-Creating a new session will use the credential process to retrieve credentials.
-NOTE: If there are credentials in the profile you are using, the credential
-process will not be used.
-
- // Initialize a session to load credentials.
- sess, _ := session.NewSession(&aws.Config{
- Region: aws.String("us-east-1")},
- )
-
- // Create S3 service client to use the credentials.
- svc := s3.New(sess)
-
-Another way to use the `credential_process` method is by using
-`credentials.NewCredentials()` and providing a command to be executed to
-retrieve credentials:
-
- // Create credentials using the ProcessProvider.
- creds := processcreds.NewCredentials("/path/to/command")
-
- // Create service client value configured for credentials.
- svc := s3.New(sess, &aws.Config{Credentials: creds})
-
-You can set a non-default timeout for the `credential_process` with another
-constructor, `credentials.NewCredentialsTimeout()`, providing the timeout. To
-set a one minute timeout:
-
- // Create credentials using the ProcessProvider.
- creds := processcreds.NewCredentialsTimeout(
- "/path/to/command",
- time.Duration(500) * time.Millisecond)
-
-If you need more control, you can set any configurable options in the
-credentials using one or more option functions. For example, you can set a two
-minute timeout, a credential duration of 60 minutes, and a maximum stdout
-buffer size of 2k.
-
- creds := processcreds.NewCredentials(
- "/path/to/command",
- func(opt *ProcessProvider) {
- opt.Timeout = time.Duration(2) * time.Minute
- opt.Duration = time.Duration(60) * time.Minute
- opt.MaxBufSize = 2048
- })
-
-You can also use your own `exec.Cmd`:
-
- // Create an exec.Cmd
- myCommand := exec.Command("/path/to/command")
-
- // Create credentials using your exec.Cmd and custom timeout
- creds := processcreds.NewCredentialsCommand(
- myCommand,
- func(opt *processcreds.ProcessProvider) {
- opt.Timeout = time.Duration(1) * time.Second
- })
-*/
-package processcreds
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "os/exec"
- "runtime"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/internal/sdkio"
-)
-
-const (
- // ProviderName is the name this credentials provider will label any
- // returned credentials Value with.
- ProviderName = `ProcessProvider`
-
- // ErrCodeProcessProviderParse error parsing process output
- ErrCodeProcessProviderParse = "ProcessProviderParseError"
-
- // ErrCodeProcessProviderVersion version error in output
- ErrCodeProcessProviderVersion = "ProcessProviderVersionError"
-
- // ErrCodeProcessProviderRequired required attribute missing in output
- ErrCodeProcessProviderRequired = "ProcessProviderRequiredError"
-
- // ErrCodeProcessProviderExecution execution of command failed
- ErrCodeProcessProviderExecution = "ProcessProviderExecutionError"
-
- // errMsgProcessProviderTimeout process took longer than allowed
- errMsgProcessProviderTimeout = "credential process timed out"
-
- // errMsgProcessProviderProcess process error
- errMsgProcessProviderProcess = "error in credential_process"
-
- // errMsgProcessProviderParse problem parsing output
- errMsgProcessProviderParse = "parse failed of credential_process output"
-
- // errMsgProcessProviderVersion version error in output
- errMsgProcessProviderVersion = "wrong version in process output (not 1)"
-
- // errMsgProcessProviderMissKey missing access key id in output
- errMsgProcessProviderMissKey = "missing AccessKeyId in process output"
-
- // errMsgProcessProviderMissSecret missing secret acess key in output
- errMsgProcessProviderMissSecret = "missing SecretAccessKey in process output"
-
- // errMsgProcessProviderPrepareCmd prepare of command failed
- errMsgProcessProviderPrepareCmd = "failed to prepare command"
-
- // errMsgProcessProviderEmptyCmd command must not be empty
- errMsgProcessProviderEmptyCmd = "command must not be empty"
-
- // errMsgProcessProviderPipe failed to initialize pipe
- errMsgProcessProviderPipe = "failed to initialize pipe"
-
- // DefaultDuration is the default amount of time in minutes that the
- // credentials will be valid for.
- DefaultDuration = time.Duration(15) * time.Minute
-
- // DefaultBufSize limits buffer size from growing to an enormous
- // amount due to a faulty process.
- DefaultBufSize = int(8 * sdkio.KibiByte)
-
- // DefaultTimeout default limit on time a process can run.
- DefaultTimeout = time.Duration(1) * time.Minute
-)
-
-// ProcessProvider satisfies the credentials.Provider interface, and is a
-// client to retrieve credentials from a process.
-type ProcessProvider struct {
- staticCreds bool
- credentials.Expiry
- originalCommand []string
-
- // Expiry duration of the credentials. Defaults to 15 minutes if not set.
- Duration time.Duration
-
- // ExpiryWindow will allow the credentials to trigger refreshing prior to
- // the credentials actually expiring. This is beneficial so race conditions
- // with expiring credentials do not cause request to fail unexpectedly
- // due to ExpiredTokenException exceptions.
- //
- // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
- // 10 seconds before the credentials are actually expired.
- //
- // If ExpiryWindow is 0 or less it will be ignored.
- ExpiryWindow time.Duration
-
- // A string representing an os command that should return a JSON with
- // credential information.
- command *exec.Cmd
-
- // MaxBufSize limits memory usage from growing to an enormous
- // amount due to a faulty process.
- MaxBufSize int
-
- // Timeout limits the time a process can run.
- Timeout time.Duration
-}
-
-// NewCredentials returns a pointer to a new Credentials object wrapping the
-// ProcessProvider. The credentials will expire every 15 minutes by default.
-func NewCredentials(command string, options ...func(*ProcessProvider)) *credentials.Credentials {
- p := &ProcessProvider{
- command: exec.Command(command),
- Duration: DefaultDuration,
- Timeout: DefaultTimeout,
- MaxBufSize: DefaultBufSize,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// NewCredentialsTimeout returns a pointer to a new Credentials object with
-// the specified command and timeout, and default duration and max buffer size.
-func NewCredentialsTimeout(command string, timeout time.Duration) *credentials.Credentials {
- p := NewCredentials(command, func(opt *ProcessProvider) {
- opt.Timeout = timeout
- })
-
- return p
-}
-
-// NewCredentialsCommand returns a pointer to a new Credentials object with
-// the specified command, and default timeout, duration and max buffer size.
-func NewCredentialsCommand(command *exec.Cmd, options ...func(*ProcessProvider)) *credentials.Credentials {
- p := &ProcessProvider{
- command: command,
- Duration: DefaultDuration,
- Timeout: DefaultTimeout,
- MaxBufSize: DefaultBufSize,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-type credentialProcessResponse struct {
- Version int
- AccessKeyID string `json:"AccessKeyId"`
- SecretAccessKey string
- SessionToken string
- Expiration *time.Time
-}
-
-// Retrieve executes the 'credential_process' and returns the credentials.
-func (p *ProcessProvider) Retrieve() (credentials.Value, error) {
- out, err := p.executeCredentialProcess()
- if err != nil {
- return credentials.Value{ProviderName: ProviderName}, err
- }
-
- // Serialize and validate response
- resp := &credentialProcessResponse{}
- if err = json.Unmarshal(out, resp); err != nil {
- return credentials.Value{ProviderName: ProviderName}, awserr.New(
- ErrCodeProcessProviderParse,
- fmt.Sprintf("%s: %s", errMsgProcessProviderParse, string(out)),
- err)
- }
-
- if resp.Version != 1 {
- return credentials.Value{ProviderName: ProviderName}, awserr.New(
- ErrCodeProcessProviderVersion,
- errMsgProcessProviderVersion,
- nil)
- }
-
- if len(resp.AccessKeyID) == 0 {
- return credentials.Value{ProviderName: ProviderName}, awserr.New(
- ErrCodeProcessProviderRequired,
- errMsgProcessProviderMissKey,
- nil)
- }
-
- if len(resp.SecretAccessKey) == 0 {
- return credentials.Value{ProviderName: ProviderName}, awserr.New(
- ErrCodeProcessProviderRequired,
- errMsgProcessProviderMissSecret,
- nil)
- }
-
- // Handle expiration
- p.staticCreds = resp.Expiration == nil
- if resp.Expiration != nil {
- p.SetExpiration(*resp.Expiration, p.ExpiryWindow)
- }
-
- return credentials.Value{
- ProviderName: ProviderName,
- AccessKeyID: resp.AccessKeyID,
- SecretAccessKey: resp.SecretAccessKey,
- SessionToken: resp.SessionToken,
- }, nil
-}
-
-// IsExpired returns true if the credentials retrieved are expired, or not yet
-// retrieved.
-func (p *ProcessProvider) IsExpired() bool {
- if p.staticCreds {
- return false
- }
- return p.Expiry.IsExpired()
-}
-
-// prepareCommand prepares the command to be executed.
-func (p *ProcessProvider) prepareCommand() error {
-
- var cmdArgs []string
- if runtime.GOOS == "windows" {
- cmdArgs = []string{"cmd.exe", "/C"}
- } else {
- cmdArgs = []string{"sh", "-c"}
- }
-
- if len(p.originalCommand) == 0 {
- p.originalCommand = make([]string, len(p.command.Args))
- copy(p.originalCommand, p.command.Args)
-
- // check for empty command because it succeeds
- if len(strings.TrimSpace(p.originalCommand[0])) < 1 {
- return awserr.New(
- ErrCodeProcessProviderExecution,
- fmt.Sprintf(
- "%s: %s",
- errMsgProcessProviderPrepareCmd,
- errMsgProcessProviderEmptyCmd),
- nil)
- }
- }
-
- cmdArgs = append(cmdArgs, p.originalCommand...)
- p.command = exec.Command(cmdArgs[0], cmdArgs[1:]...)
- p.command.Env = os.Environ()
-
- return nil
-}
-
-// executeCredentialProcess starts the credential process on the OS and
-// returns the results or an error.
-func (p *ProcessProvider) executeCredentialProcess() ([]byte, error) {
-
- if err := p.prepareCommand(); err != nil {
- return nil, err
- }
-
- // Setup the pipes
- outReadPipe, outWritePipe, err := os.Pipe()
- if err != nil {
- return nil, awserr.New(
- ErrCodeProcessProviderExecution,
- errMsgProcessProviderPipe,
- err)
- }
-
- p.command.Stderr = os.Stderr // display stderr on console for MFA
- p.command.Stdout = outWritePipe // get creds json on process's stdout
- p.command.Stdin = os.Stdin // enable stdin for MFA
-
- output := bytes.NewBuffer(make([]byte, 0, p.MaxBufSize))
-
- stdoutCh := make(chan error, 1)
- go readInput(
- io.LimitReader(outReadPipe, int64(p.MaxBufSize)),
- output,
- stdoutCh)
-
- execCh := make(chan error, 1)
- go executeCommand(*p.command, execCh)
-
- finished := false
- var errors []error
- for !finished {
- select {
- case readError := <-stdoutCh:
- errors = appendError(errors, readError)
- finished = true
- case execError := <-execCh:
- err := outWritePipe.Close()
- errors = appendError(errors, err)
- errors = appendError(errors, execError)
- if errors != nil {
- return output.Bytes(), awserr.NewBatchError(
- ErrCodeProcessProviderExecution,
- errMsgProcessProviderProcess,
- errors)
- }
- case <-time.After(p.Timeout):
- finished = true
- return output.Bytes(), awserr.NewBatchError(
- ErrCodeProcessProviderExecution,
- errMsgProcessProviderTimeout,
- errors) // errors can be nil
- }
- }
-
- out := output.Bytes()
-
- if runtime.GOOS == "windows" {
- // windows adds slashes to quotes
- out = []byte(strings.Replace(string(out), `\"`, `"`, -1))
- }
-
- return out, nil
-}
-
-// appendError conveniently checks for nil before appending slice
-func appendError(errors []error, err error) []error {
- if err != nil {
- return append(errors, err)
- }
- return errors
-}
-
-func executeCommand(cmd exec.Cmd, exec chan error) {
- // Start the command
- err := cmd.Start()
- if err == nil {
- err = cmd.Wait()
- }
-
- exec <- err
-}
-
-func readInput(r io.Reader, w io.Writer, read chan error) {
- tee := io.TeeReader(r, w)
-
- _, err := ioutil.ReadAll(tee)
-
- if err == io.EOF {
- err = nil
- }
-
- read <- err // will only arrive here when write end of pipe is closed
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
deleted file mode 100644
index 22b5c5d9f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/shared_credentials_provider.go
+++ /dev/null
@@ -1,151 +0,0 @@
-package credentials
-
-import (
- "fmt"
- "os"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/internal/ini"
- "github.com/aws/aws-sdk-go/internal/shareddefaults"
-)
-
-// SharedCredsProviderName provides a name of SharedCreds provider
-const SharedCredsProviderName = "SharedCredentialsProvider"
-
-var (
- // ErrSharedCredentialsHomeNotFound is emitted when the user directory cannot be found.
- ErrSharedCredentialsHomeNotFound = awserr.New("UserHomeNotFound", "user home directory not found.", nil)
-)
-
-// A SharedCredentialsProvider retrieves access key pair (access key ID,
-// secret access key, and session token if present) credentials from the current
-// user's home directory, and keeps track if those credentials are expired.
-//
-// Profile ini file example: $HOME/.aws/credentials
-type SharedCredentialsProvider struct {
- // Path to the shared credentials file.
- //
- // If empty will look for "AWS_SHARED_CREDENTIALS_FILE" env variable. If the
- // env value is empty will default to current user's home directory.
- // Linux/OSX: "$HOME/.aws/credentials"
- // Windows: "%USERPROFILE%\.aws\credentials"
- Filename string
-
- // AWS Profile to extract credentials from the shared credentials file. If empty
- // will default to environment variable "AWS_PROFILE" or "default" if
- // environment variable is also not set.
- Profile string
-
- // retrieved states if the credentials have been successfully retrieved.
- retrieved bool
-}
-
-// NewSharedCredentials returns a pointer to a new Credentials object
-// wrapping the Profile file provider.
-func NewSharedCredentials(filename, profile string) *Credentials {
- return NewCredentials(&SharedCredentialsProvider{
- Filename: filename,
- Profile: profile,
- })
-}
-
-// Retrieve reads and extracts the shared credentials from the current
-// users home directory.
-func (p *SharedCredentialsProvider) Retrieve() (Value, error) {
- p.retrieved = false
-
- filename, err := p.filename()
- if err != nil {
- return Value{ProviderName: SharedCredsProviderName}, err
- }
-
- creds, err := loadProfile(filename, p.profile())
- if err != nil {
- return Value{ProviderName: SharedCredsProviderName}, err
- }
-
- p.retrieved = true
- return creds, nil
-}
-
-// IsExpired returns if the shared credentials have expired.
-func (p *SharedCredentialsProvider) IsExpired() bool {
- return !p.retrieved
-}
-
-// loadProfiles loads from the file pointed to by shared credentials filename for profile.
-// The credentials retrieved from the profile will be returned or error. Error will be
-// returned if it fails to read from the file, or the data is invalid.
-func loadProfile(filename, profile string) (Value, error) {
- config, err := ini.OpenFile(filename)
- if err != nil {
- return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to load shared credentials file", err)
- }
-
- iniProfile, ok := config.GetSection(profile)
- if !ok {
- return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsLoad", "failed to get profile", nil)
- }
-
- id := iniProfile.String("aws_access_key_id")
- if len(id) == 0 {
- return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsAccessKey",
- fmt.Sprintf("shared credentials %s in %s did not contain aws_access_key_id", profile, filename),
- nil)
- }
-
- secret := iniProfile.String("aws_secret_access_key")
- if len(secret) == 0 {
- return Value{ProviderName: SharedCredsProviderName}, awserr.New("SharedCredsSecret",
- fmt.Sprintf("shared credentials %s in %s did not contain aws_secret_access_key", profile, filename),
- nil)
- }
-
- // Default to empty string if not found
- token := iniProfile.String("aws_session_token")
-
- return Value{
- AccessKeyID: id,
- SecretAccessKey: secret,
- SessionToken: token,
- ProviderName: SharedCredsProviderName,
- }, nil
-}
-
-// filename returns the filename to use to read AWS shared credentials.
-//
-// Will return an error if the user's home directory path cannot be found.
-func (p *SharedCredentialsProvider) filename() (string, error) {
- if len(p.Filename) != 0 {
- return p.Filename, nil
- }
-
- if p.Filename = os.Getenv("AWS_SHARED_CREDENTIALS_FILE"); len(p.Filename) != 0 {
- return p.Filename, nil
- }
-
- if home := shareddefaults.UserHomeDir(); len(home) == 0 {
- // Backwards compatibility of home directly not found error being returned.
- // This error is too verbose, failure when opening the file would of been
- // a better error to return.
- return "", ErrSharedCredentialsHomeNotFound
- }
-
- p.Filename = shareddefaults.SharedCredentialsFilename()
-
- return p.Filename, nil
-}
-
-// profile returns the AWS shared credentials profile. If empty will read
-// environment variable "AWS_PROFILE". If that is not set profile will
-// return "default".
-func (p *SharedCredentialsProvider) profile() string {
- if p.Profile == "" {
- p.Profile = os.Getenv("AWS_PROFILE")
- }
- if p.Profile == "" {
- p.Profile = "default"
- }
-
- return p.Profile
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go
deleted file mode 100644
index 18c940ab3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Package ssocreds provides a credential provider for retrieving temporary AWS credentials using an SSO access token.
-//
-// IMPORTANT: The provider in this package does not initiate or perform the AWS SSO login flow. The SDK provider
-// expects that you have already performed the SSO login flow using AWS CLI using the "aws sso login" command, or by
-// some other mechanism. The provider must find a valid non-expired access token for the AWS SSO user portal URL in
-// ~/.aws/sso/cache. If a cached token is not found, it is expired, or the file is malformed an error will be returned.
-//
-// Loading AWS SSO credentials with the AWS shared configuration file
-//
-// You can use configure AWS SSO credentials from the AWS shared configuration file by
-// providing the specifying the required keys in the profile:
-//
-// sso_account_id
-// sso_region
-// sso_role_name
-// sso_start_url
-//
-// For example, the following defines a profile "devsso" and specifies the AWS SSO parameters that defines the target
-// account, role, sign-on portal, and the region where the user portal is located. Note: all SSO arguments must be
-// provided, or an error will be returned.
-//
-// [profile devsso]
-// sso_start_url = https://my-sso-portal.awsapps.com/start
-// sso_role_name = SSOReadOnlyRole
-// sso_region = us-east-1
-// sso_account_id = 123456789012
-//
-// Using the config module, you can load the AWS SDK shared configuration, and specify that this profile be used to
-// retrieve credentials. For example:
-//
-// sess, err := session.NewSessionWithOptions(session.Options{
-// SharedConfigState: session.SharedConfigEnable,
-// Profile: "devsso",
-// })
-// if err != nil {
-// return err
-// }
-//
-// Programmatically loading AWS SSO credentials directly
-//
-// You can programmatically construct the AWS SSO Provider in your application, and provide the necessary information
-// to load and retrieve temporary credentials using an access token from ~/.aws/sso/cache.
-//
-// svc := sso.New(sess, &aws.Config{
-// Region: aws.String("us-west-2"), // Client Region must correspond to the AWS SSO user portal region
-// })
-//
-// provider := ssocreds.NewCredentialsWithClient(svc, "123456789012", "SSOReadOnlyRole", "https://my-sso-portal.awsapps.com/start")
-//
-// credentials, err := provider.Get()
-// if err != nil {
-// return err
-// }
-//
-// Additional Resources
-//
-// Configuring the AWS CLI to use AWS Single Sign-On: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html
-//
-// AWS Single Sign-On User Guide: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html
-package ssocreds
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go
deleted file mode 100644
index d4df39a7a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go
+++ /dev/null
@@ -1,10 +0,0 @@
-//go:build !windows
-// +build !windows
-
-package ssocreds
-
-import "os"
-
-func getHomeDirectory() string {
- return os.Getenv("HOME")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go
deleted file mode 100644
index eb48f61e5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package ssocreds
-
-import "os"
-
-func getHomeDirectory() string {
- return os.Getenv("USERPROFILE")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go
deleted file mode 100644
index 6eda2a555..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go
+++ /dev/null
@@ -1,180 +0,0 @@
-package ssocreds
-
-import (
- "crypto/sha1"
- "encoding/hex"
- "encoding/json"
- "fmt"
- "io/ioutil"
- "path/filepath"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/service/sso"
- "github.com/aws/aws-sdk-go/service/sso/ssoiface"
-)
-
-// ErrCodeSSOProviderInvalidToken is the code type that is returned if loaded token has expired or is otherwise invalid.
-// To refresh the SSO session run aws sso login with the corresponding profile.
-const ErrCodeSSOProviderInvalidToken = "SSOProviderInvalidToken"
-
-const invalidTokenMessage = "the SSO session has expired or is invalid"
-
-func init() {
- nowTime = time.Now
- defaultCacheLocation = defaultCacheLocationImpl
-}
-
-var nowTime func() time.Time
-
-// ProviderName is the name of the provider used to specify the source of credentials.
-const ProviderName = "SSOProvider"
-
-var defaultCacheLocation func() string
-
-func defaultCacheLocationImpl() string {
- return filepath.Join(getHomeDirectory(), ".aws", "sso", "cache")
-}
-
-// Provider is an AWS credential provider that retrieves temporary AWS credentials by exchanging an SSO login token.
-type Provider struct {
- credentials.Expiry
-
- // The Client which is configured for the AWS Region where the AWS SSO user portal is located.
- Client ssoiface.SSOAPI
-
- // The AWS account that is assigned to the user.
- AccountID string
-
- // The role name that is assigned to the user.
- RoleName string
-
- // The URL that points to the organization's AWS Single Sign-On (AWS SSO) user portal.
- StartURL string
-}
-
-// NewCredentials returns a new AWS Single Sign-On (AWS SSO) credential provider. The ConfigProvider is expected to be configured
-// for the AWS Region where the AWS SSO user portal is located.
-func NewCredentials(configProvider client.ConfigProvider, accountID, roleName, startURL string, optFns ...func(provider *Provider)) *credentials.Credentials {
- return NewCredentialsWithClient(sso.New(configProvider), accountID, roleName, startURL, optFns...)
-}
-
-// NewCredentialsWithClient returns a new AWS Single Sign-On (AWS SSO) credential provider. The provided client is expected to be configured
-// for the AWS Region where the AWS SSO user portal is located.
-func NewCredentialsWithClient(client ssoiface.SSOAPI, accountID, roleName, startURL string, optFns ...func(provider *Provider)) *credentials.Credentials {
- p := &Provider{
- Client: client,
- AccountID: accountID,
- RoleName: roleName,
- StartURL: startURL,
- }
-
- for _, fn := range optFns {
- fn(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// Retrieve retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal
-// by exchanging the accessToken present in ~/.aws/sso/cache.
-func (p *Provider) Retrieve() (credentials.Value, error) {
- return p.RetrieveWithContext(aws.BackgroundContext())
-}
-
-// RetrieveWithContext retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal
-// by exchanging the accessToken present in ~/.aws/sso/cache.
-func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
- tokenFile, err := loadTokenFile(p.StartURL)
- if err != nil {
- return credentials.Value{}, err
- }
-
- output, err := p.Client.GetRoleCredentialsWithContext(ctx, &sso.GetRoleCredentialsInput{
- AccessToken: &tokenFile.AccessToken,
- AccountId: &p.AccountID,
- RoleName: &p.RoleName,
- })
- if err != nil {
- return credentials.Value{}, err
- }
-
- expireTime := time.Unix(0, aws.Int64Value(output.RoleCredentials.Expiration)*int64(time.Millisecond)).UTC()
- p.SetExpiration(expireTime, 0)
-
- return credentials.Value{
- AccessKeyID: aws.StringValue(output.RoleCredentials.AccessKeyId),
- SecretAccessKey: aws.StringValue(output.RoleCredentials.SecretAccessKey),
- SessionToken: aws.StringValue(output.RoleCredentials.SessionToken),
- ProviderName: ProviderName,
- }, nil
-}
-
-func getCacheFileName(url string) (string, error) {
- hash := sha1.New()
- _, err := hash.Write([]byte(url))
- if err != nil {
- return "", err
- }
- return strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json", nil
-}
-
-type rfc3339 time.Time
-
-func (r *rfc3339) UnmarshalJSON(bytes []byte) error {
- var value string
-
- if err := json.Unmarshal(bytes, &value); err != nil {
- return err
- }
-
- parse, err := time.Parse(time.RFC3339, value)
- if err != nil {
- return fmt.Errorf("expected RFC3339 timestamp: %v", err)
- }
-
- *r = rfc3339(parse)
-
- return nil
-}
-
-type token struct {
- AccessToken string `json:"accessToken"`
- ExpiresAt rfc3339 `json:"expiresAt"`
- Region string `json:"region,omitempty"`
- StartURL string `json:"startUrl,omitempty"`
-}
-
-func (t token) Expired() bool {
- return nowTime().Round(0).After(time.Time(t.ExpiresAt))
-}
-
-func loadTokenFile(startURL string) (t token, err error) {
- key, err := getCacheFileName(startURL)
- if err != nil {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err)
- }
-
- fileBytes, err := ioutil.ReadFile(filepath.Join(defaultCacheLocation(), key))
- if err != nil {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err)
- }
-
- if err := json.Unmarshal(fileBytes, &t); err != nil {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err)
- }
-
- if len(t.AccessToken) == 0 {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, nil)
- }
-
- if t.Expired() {
- return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, nil)
- }
-
- return t, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go
deleted file mode 100644
index cbba1e3d5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/static_provider.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package credentials
-
-import (
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// StaticProviderName provides a name of Static provider
-const StaticProviderName = "StaticProvider"
-
-var (
- // ErrStaticCredentialsEmpty is emitted when static credentials are empty.
- ErrStaticCredentialsEmpty = awserr.New("EmptyStaticCreds", "static credentials are empty", nil)
-)
-
-// A StaticProvider is a set of credentials which are set programmatically,
-// and will never expire.
-type StaticProvider struct {
- Value
-}
-
-// NewStaticCredentials returns a pointer to a new Credentials object
-// wrapping a static credentials value provider. Token is only required
-// for temporary security credentials retrieved via STS, otherwise an empty
-// string can be passed for this parameter.
-func NewStaticCredentials(id, secret, token string) *Credentials {
- return NewCredentials(&StaticProvider{Value: Value{
- AccessKeyID: id,
- SecretAccessKey: secret,
- SessionToken: token,
- }})
-}
-
-// NewStaticCredentialsFromCreds returns a pointer to a new Credentials object
-// wrapping the static credentials value provide. Same as NewStaticCredentials
-// but takes the creds Value instead of individual fields
-func NewStaticCredentialsFromCreds(creds Value) *Credentials {
- return NewCredentials(&StaticProvider{Value: creds})
-}
-
-// Retrieve returns the credentials or error if the credentials are invalid.
-func (s *StaticProvider) Retrieve() (Value, error) {
- if s.AccessKeyID == "" || s.SecretAccessKey == "" {
- return Value{ProviderName: StaticProviderName}, ErrStaticCredentialsEmpty
- }
-
- if len(s.Value.ProviderName) == 0 {
- s.Value.ProviderName = StaticProviderName
- }
- return s.Value, nil
-}
-
-// IsExpired returns if the credentials are expired.
-//
-// For StaticProvider, the credentials never expired.
-func (s *StaticProvider) IsExpired() bool {
- return false
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
deleted file mode 100644
index 260a37cbb..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
-Package stscreds are credential Providers to retrieve STS AWS credentials.
-
-STS provides multiple ways to retrieve credentials which can be used when making
-future AWS service API operation calls.
-
-The SDK will ensure that per instance of credentials.Credentials all requests
-to refresh the credentials will be synchronized. But, the SDK is unable to
-ensure synchronous usage of the AssumeRoleProvider if the value is shared
-between multiple Credentials, Sessions or service clients.
-
-Assume Role
-
-To assume an IAM role using STS with the SDK you can create a new Credentials
-with the SDKs's stscreds package.
-
- // Initial credentials loaded from SDK's default credential chain. Such as
- // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
- // Role. These credentials will be used to to make the STS Assume Role API.
- sess := session.Must(session.NewSession())
-
- // Create the credentials from AssumeRoleProvider to assume the role
- // referenced by the "myRoleARN" ARN.
- creds := stscreds.NewCredentials(sess, "myRoleArn")
-
- // Create service client value configured for credentials
- // from assumed role.
- svc := s3.New(sess, &aws.Config{Credentials: creds})
-
-Assume Role with static MFA Token
-
-To assume an IAM role with a MFA token you can either specify a MFA token code
-directly or provide a function to prompt the user each time the credentials
-need to refresh the role's credentials. Specifying the TokenCode should be used
-for short lived operations that will not need to be refreshed, and when you do
-not want to have direct control over the user provides their MFA token.
-
-With TokenCode the AssumeRoleProvider will be not be able to refresh the role's
-credentials.
-
- // Create the credentials from AssumeRoleProvider to assume the role
- // referenced by the "myRoleARN" ARN using the MFA token code provided.
- creds := stscreds.NewCredentials(sess, "myRoleArn", func(p *stscreds.AssumeRoleProvider) {
- p.SerialNumber = aws.String("myTokenSerialNumber")
- p.TokenCode = aws.String("00000000")
- })
-
- // Create service client value configured for credentials
- // from assumed role.
- svc := s3.New(sess, &aws.Config{Credentials: creds})
-
-Assume Role with MFA Token Provider
-
-To assume an IAM role with MFA for longer running tasks where the credentials
-may need to be refreshed setting the TokenProvider field of AssumeRoleProvider
-will allow the credential provider to prompt for new MFA token code when the
-role's credentials need to be refreshed.
-
-The StdinTokenProvider function is available to prompt on stdin to retrieve
-the MFA token code from the user. You can also implement custom prompts by
-satisfing the TokenProvider function signature.
-
-Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will
-have undesirable results as the StdinTokenProvider will not be synchronized. A
-single Credentials with an AssumeRoleProvider can be shared safely.
-
- // Create the credentials from AssumeRoleProvider to assume the role
- // referenced by the "myRoleARN" ARN. Prompting for MFA token from stdin.
- creds := stscreds.NewCredentials(sess, "myRoleArn", func(p *stscreds.AssumeRoleProvider) {
- p.SerialNumber = aws.String("myTokenSerialNumber")
- p.TokenProvider = stscreds.StdinTokenProvider
- })
-
- // Create service client value configured for credentials
- // from assumed role.
- svc := s3.New(sess, &aws.Config{Credentials: creds})
-
-*/
-package stscreds
-
-import (
- "fmt"
- "os"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkrand"
- "github.com/aws/aws-sdk-go/service/sts"
-)
-
-// StdinTokenProvider will prompt on stderr and read from stdin for a string value.
-// An error is returned if reading from stdin fails.
-//
-// Use this function to read MFA tokens from stdin. The function makes no attempt
-// to make atomic prompts from stdin across multiple gorouties.
-//
-// Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will
-// have undesirable results as the StdinTokenProvider will not be synchronized. A
-// single Credentials with an AssumeRoleProvider can be shared safely
-//
-// Will wait forever until something is provided on the stdin.
-func StdinTokenProvider() (string, error) {
- var v string
- fmt.Fprintf(os.Stderr, "Assume Role MFA token code: ")
- _, err := fmt.Scanln(&v)
-
- return v, err
-}
-
-// ProviderName provides a name of AssumeRole provider
-const ProviderName = "AssumeRoleProvider"
-
-// AssumeRoler represents the minimal subset of the STS client API used by this provider.
-type AssumeRoler interface {
- AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)
-}
-
-type assumeRolerWithContext interface {
- AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error)
-}
-
-// DefaultDuration is the default amount of time in minutes that the credentials
-// will be valid for.
-var DefaultDuration = time.Duration(15) * time.Minute
-
-// AssumeRoleProvider retrieves temporary credentials from the STS service, and
-// keeps track of their expiration time.
-//
-// This credential provider will be used by the SDKs default credential change
-// when shared configuration is enabled, and the shared config or shared credentials
-// file configure assume role. See Session docs for how to do this.
-//
-// AssumeRoleProvider does not provide any synchronization and it is not safe
-// to share this value across multiple Credentials, Sessions, or service clients
-// without also sharing the same Credentials instance.
-type AssumeRoleProvider struct {
- credentials.Expiry
-
- // STS client to make assume role request with.
- Client AssumeRoler
-
- // Role to be assumed.
- RoleARN string
-
- // Session name, if you wish to reuse the credentials elsewhere.
- RoleSessionName string
-
- // Optional, you can pass tag key-value pairs to your session. These tags are called session tags.
- Tags []*sts.Tag
-
- // A list of keys for session tags that you want to set as transitive.
- // If you set a tag key as transitive, the corresponding key and value passes to subsequent sessions in a role chain.
- TransitiveTagKeys []*string
-
- // Expiry duration of the STS credentials. Defaults to 15 minutes if not set.
- Duration time.Duration
-
- // Optional ExternalID to pass along, defaults to nil if not set.
- ExternalID *string
-
- // The policy plain text must be 2048 bytes or shorter. However, an internal
- // conversion compresses it into a packed binary format with a separate limit.
- // The PackedPolicySize response element indicates by percentage how close to
- // the upper size limit the policy is, with 100% equaling the maximum allowed
- // size.
- Policy *string
-
- // The ARNs of IAM managed policies you want to use as managed session policies.
- // The policies must exist in the same account as the role.
- //
- // This parameter is optional. You can provide up to 10 managed policy ARNs.
- // However, the plain text that you use for both inline and managed session
- // policies can't exceed 2,048 characters.
- //
- // An AWS conversion compresses the passed session policies and session tags
- // into a packed binary format that has a separate limit. Your request can fail
- // for this limit even if your plain text meets the other requirements. The
- // PackedPolicySize response element indicates by percentage how close the policies
- // and tags for your request are to the upper size limit.
- //
- // Passing policies to this operation returns new temporary credentials. The
- // resulting session's permissions are the intersection of the role's identity-based
- // policy and the session policies. You can use the role's temporary credentials
- // in subsequent AWS API calls to access resources in the account that owns
- // the role. You cannot use session policies to grant more permissions than
- // those allowed by the identity-based policy of the role that is being assumed.
- // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // in the IAM User Guide.
- PolicyArns []*sts.PolicyDescriptorType
-
- // The identification number of the MFA device that is associated with the user
- // who is making the AssumeRole call. Specify this value if the trust policy
- // of the role being assumed includes a condition that requires MFA authentication.
- // The value is either the serial number for a hardware device (such as GAHT12345678)
- // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
- SerialNumber *string
-
- // The value provided by the MFA device, if the trust policy of the role being
- // assumed requires MFA (that is, if the policy includes a condition that tests
- // for MFA). If the role being assumed requires MFA and if the TokenCode value
- // is missing or expired, the AssumeRole call returns an "access denied" error.
- //
- // If SerialNumber is set and neither TokenCode nor TokenProvider are also
- // set an error will be returned.
- TokenCode *string
-
- // Async method of providing MFA token code for assuming an IAM role with MFA.
- // The value returned by the function will be used as the TokenCode in the Retrieve
- // call. See StdinTokenProvider for a provider that prompts and reads from stdin.
- //
- // This token provider will be called when ever the assumed role's
- // credentials need to be refreshed when SerialNumber is also set and
- // TokenCode is not set.
- //
- // If both TokenCode and TokenProvider is set, TokenProvider will be used and
- // TokenCode is ignored.
- TokenProvider func() (string, error)
-
- // ExpiryWindow will allow the credentials to trigger refreshing prior to
- // the credentials actually expiring. This is beneficial so race conditions
- // with expiring credentials do not cause request to fail unexpectedly
- // due to ExpiredTokenException exceptions.
- //
- // So a ExpiryWindow of 10s would cause calls to IsExpired() to return true
- // 10 seconds before the credentials are actually expired.
- //
- // If ExpiryWindow is 0 or less it will be ignored.
- ExpiryWindow time.Duration
-
- // MaxJitterFrac reduces the effective Duration of each credential requested
- // by a random percentage between 0 and MaxJitterFraction. MaxJitterFrac must
- // have a value between 0 and 1. Any other value may lead to expected behavior.
- // With a MaxJitterFrac value of 0, default) will no jitter will be used.
- //
- // For example, with a Duration of 30m and a MaxJitterFrac of 0.1, the
- // AssumeRole call will be made with an arbitrary Duration between 27m and
- // 30m.
- //
- // MaxJitterFrac should not be negative.
- MaxJitterFrac float64
-}
-
-// NewCredentials returns a pointer to a new Credentials value wrapping the
-// AssumeRoleProvider. The credentials will expire every 15 minutes and the
-// role will be named after a nanosecond timestamp of this operation. The
-// Credentials value will attempt to refresh the credentials using the provider
-// when Credentials.Get is called, if the cached credentials are expiring.
-//
-// Takes a Config provider to create the STS client. The ConfigProvider is
-// satisfied by the session.Session type.
-//
-// It is safe to share the returned Credentials with multiple Sessions and
-// service clients. All access to the credentials and refreshing them
-// will be synchronized.
-func NewCredentials(c client.ConfigProvider, roleARN string, options ...func(*AssumeRoleProvider)) *credentials.Credentials {
- p := &AssumeRoleProvider{
- Client: sts.New(c),
- RoleARN: roleARN,
- Duration: DefaultDuration,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// NewCredentialsWithClient returns a pointer to a new Credentials value wrapping the
-// AssumeRoleProvider. The credentials will expire every 15 minutes and the
-// role will be named after a nanosecond timestamp of this operation. The
-// Credentials value will attempt to refresh the credentials using the provider
-// when Credentials.Get is called, if the cached credentials are expiring.
-//
-// Takes an AssumeRoler which can be satisfied by the STS client.
-//
-// It is safe to share the returned Credentials with multiple Sessions and
-// service clients. All access to the credentials and refreshing them
-// will be synchronized.
-func NewCredentialsWithClient(svc AssumeRoler, roleARN string, options ...func(*AssumeRoleProvider)) *credentials.Credentials {
- p := &AssumeRoleProvider{
- Client: svc,
- RoleARN: roleARN,
- Duration: DefaultDuration,
- }
-
- for _, option := range options {
- option(p)
- }
-
- return credentials.NewCredentials(p)
-}
-
-// Retrieve generates a new set of temporary credentials using STS.
-func (p *AssumeRoleProvider) Retrieve() (credentials.Value, error) {
- return p.RetrieveWithContext(aws.BackgroundContext())
-}
-
-// RetrieveWithContext generates a new set of temporary credentials using STS.
-func (p *AssumeRoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
- // Apply defaults where parameters are not set.
- if p.RoleSessionName == "" {
- // Try to work out a role name that will hopefully end up unique.
- p.RoleSessionName = fmt.Sprintf("%d", time.Now().UTC().UnixNano())
- }
- if p.Duration == 0 {
- // Expire as often as AWS permits.
- p.Duration = DefaultDuration
- }
- jitter := time.Duration(sdkrand.SeededRand.Float64() * p.MaxJitterFrac * float64(p.Duration))
- input := &sts.AssumeRoleInput{
- DurationSeconds: aws.Int64(int64((p.Duration - jitter) / time.Second)),
- RoleArn: aws.String(p.RoleARN),
- RoleSessionName: aws.String(p.RoleSessionName),
- ExternalId: p.ExternalID,
- Tags: p.Tags,
- PolicyArns: p.PolicyArns,
- TransitiveTagKeys: p.TransitiveTagKeys,
- }
- if p.Policy != nil {
- input.Policy = p.Policy
- }
- if p.SerialNumber != nil {
- if p.TokenCode != nil {
- input.SerialNumber = p.SerialNumber
- input.TokenCode = p.TokenCode
- } else if p.TokenProvider != nil {
- input.SerialNumber = p.SerialNumber
- code, err := p.TokenProvider()
- if err != nil {
- return credentials.Value{ProviderName: ProviderName}, err
- }
- input.TokenCode = aws.String(code)
- } else {
- return credentials.Value{ProviderName: ProviderName},
- awserr.New("AssumeRoleTokenNotAvailable",
- "assume role with MFA enabled, but neither TokenCode nor TokenProvider are set", nil)
- }
- }
-
- var roleOutput *sts.AssumeRoleOutput
- var err error
-
- if c, ok := p.Client.(assumeRolerWithContext); ok {
- roleOutput, err = c.AssumeRoleWithContext(ctx, input)
- } else {
- roleOutput, err = p.Client.AssumeRole(input)
- }
-
- if err != nil {
- return credentials.Value{ProviderName: ProviderName}, err
- }
-
- // We will proactively generate new credentials before they expire.
- p.SetExpiration(*roleOutput.Credentials.Expiration, p.ExpiryWindow)
-
- return credentials.Value{
- AccessKeyID: *roleOutput.Credentials.AccessKeyId,
- SecretAccessKey: *roleOutput.Credentials.SecretAccessKey,
- SessionToken: *roleOutput.Credentials.SessionToken,
- ProviderName: ProviderName,
- }, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go
deleted file mode 100644
index cefe2a76d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/web_identity_provider.go
+++ /dev/null
@@ -1,154 +0,0 @@
-package stscreds
-
-import (
- "fmt"
- "io/ioutil"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/service/sts"
- "github.com/aws/aws-sdk-go/service/sts/stsiface"
-)
-
-const (
- // ErrCodeWebIdentity will be used as an error code when constructing
- // a new error to be returned during session creation or retrieval.
- ErrCodeWebIdentity = "WebIdentityErr"
-
- // WebIdentityProviderName is the web identity provider name
- WebIdentityProviderName = "WebIdentityCredentials"
-)
-
-// now is used to return a time.Time object representing
-// the current time. This can be used to easily test and
-// compare test values.
-var now = time.Now
-
-// TokenFetcher shuold return WebIdentity token bytes or an error
-type TokenFetcher interface {
- FetchToken(credentials.Context) ([]byte, error)
-}
-
-// FetchTokenPath is a path to a WebIdentity token file
-type FetchTokenPath string
-
-// FetchToken returns a token by reading from the filesystem
-func (f FetchTokenPath) FetchToken(ctx credentials.Context) ([]byte, error) {
- data, err := ioutil.ReadFile(string(f))
- if err != nil {
- errMsg := fmt.Sprintf("unable to read file at %s", f)
- return nil, awserr.New(ErrCodeWebIdentity, errMsg, err)
- }
- return data, nil
-}
-
-// WebIdentityRoleProvider is used to retrieve credentials using
-// an OIDC token.
-type WebIdentityRoleProvider struct {
- credentials.Expiry
- PolicyArns []*sts.PolicyDescriptorType
-
- // Duration the STS credentials will be valid for. Truncated to seconds.
- // If unset, the assumed role will use AssumeRoleWithWebIdentity's default
- // expiry duration. See
- // https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#STS.AssumeRoleWithWebIdentity
- // for more information.
- Duration time.Duration
-
- // The amount of time the credentials will be refreshed before they expire.
- // This is useful refresh credentials before they expire to reduce risk of
- // using credentials as they expire. If unset, will default to no expiry
- // window.
- ExpiryWindow time.Duration
-
- client stsiface.STSAPI
-
- tokenFetcher TokenFetcher
- roleARN string
- roleSessionName string
-}
-
-// NewWebIdentityCredentials will return a new set of credentials with a given
-// configuration, role arn, and token file path.
-func NewWebIdentityCredentials(c client.ConfigProvider, roleARN, roleSessionName, path string) *credentials.Credentials {
- svc := sts.New(c)
- p := NewWebIdentityRoleProvider(svc, roleARN, roleSessionName, path)
- return credentials.NewCredentials(p)
-}
-
-// NewWebIdentityRoleProvider will return a new WebIdentityRoleProvider with the
-// provided stsiface.STSAPI
-func NewWebIdentityRoleProvider(svc stsiface.STSAPI, roleARN, roleSessionName, path string) *WebIdentityRoleProvider {
- return NewWebIdentityRoleProviderWithToken(svc, roleARN, roleSessionName, FetchTokenPath(path))
-}
-
-// NewWebIdentityRoleProviderWithToken will return a new WebIdentityRoleProvider with the
-// provided stsiface.STSAPI and a TokenFetcher
-func NewWebIdentityRoleProviderWithToken(svc stsiface.STSAPI, roleARN, roleSessionName string, tokenFetcher TokenFetcher) *WebIdentityRoleProvider {
- return &WebIdentityRoleProvider{
- client: svc,
- tokenFetcher: tokenFetcher,
- roleARN: roleARN,
- roleSessionName: roleSessionName,
- }
-}
-
-// Retrieve will attempt to assume a role from a token which is located at
-// 'WebIdentityTokenFilePath' specified destination and if that is empty an
-// error will be returned.
-func (p *WebIdentityRoleProvider) Retrieve() (credentials.Value, error) {
- return p.RetrieveWithContext(aws.BackgroundContext())
-}
-
-// RetrieveWithContext will attempt to assume a role from a token which is located at
-// 'WebIdentityTokenFilePath' specified destination and if that is empty an
-// error will be returned.
-func (p *WebIdentityRoleProvider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) {
- b, err := p.tokenFetcher.FetchToken(ctx)
- if err != nil {
- return credentials.Value{}, awserr.New(ErrCodeWebIdentity, "failed fetching WebIdentity token: ", err)
- }
-
- sessionName := p.roleSessionName
- if len(sessionName) == 0 {
- // session name is used to uniquely identify a session. This simply
- // uses unix time in nanoseconds to uniquely identify sessions.
- sessionName = strconv.FormatInt(now().UnixNano(), 10)
- }
-
- var duration *int64
- if p.Duration != 0 {
- duration = aws.Int64(int64(p.Duration / time.Second))
- }
-
- req, resp := p.client.AssumeRoleWithWebIdentityRequest(&sts.AssumeRoleWithWebIdentityInput{
- PolicyArns: p.PolicyArns,
- RoleArn: &p.roleARN,
- RoleSessionName: &sessionName,
- WebIdentityToken: aws.String(string(b)),
- DurationSeconds: duration,
- })
-
- req.SetContext(ctx)
-
- // InvalidIdentityToken error is a temporary error that can occur
- // when assuming an Role with a JWT web identity token.
- req.RetryErrorCodes = append(req.RetryErrorCodes, sts.ErrCodeInvalidIdentityTokenException)
- if err := req.Send(); err != nil {
- return credentials.Value{}, awserr.New(ErrCodeWebIdentity, "failed to retrieve credentials", err)
- }
-
- p.SetExpiration(aws.TimeValue(resp.Credentials.Expiration), p.ExpiryWindow)
-
- value := credentials.Value{
- AccessKeyID: aws.StringValue(resp.Credentials.AccessKeyId),
- SecretAccessKey: aws.StringValue(resp.Credentials.SecretAccessKey),
- SessionToken: aws.StringValue(resp.Credentials.SessionToken),
- ProviderName: WebIdentityProviderName,
- }
- return value, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go
deleted file mode 100644
index 25a66d1dd..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/doc.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Package csm provides the Client Side Monitoring (CSM) client which enables
-// sending metrics via UDP connection to the CSM agent. This package provides
-// control options, and configuration for the CSM client. The client can be
-// controlled manually, or automatically via the SDK's Session configuration.
-//
-// Enabling CSM client via SDK's Session configuration
-//
-// The CSM client can be enabled automatically via SDK's Session configuration.
-// The SDK's session configuration enables the CSM client if the AWS_CSM_PORT
-// environment variable is set to a non-empty value.
-//
-// The configuration options for the CSM client via the SDK's session
-// configuration are:
-//
-// * AWS_CSM_PORT=
-// The port number the CSM agent will receive metrics on.
-//
-// * AWS_CSM_HOST=
-// The hostname, or IP address the CSM agent will receive metrics on.
-// Without port number.
-//
-// Manually enabling the CSM client
-//
-// The CSM client can be started, paused, and resumed manually. The Start
-// function will enable the CSM client to publish metrics to the CSM agent. It
-// is safe to call Start concurrently, but if Start is called additional times
-// with different ClientID or address it will panic.
-//
-// r, err := csm.Start("clientID", ":31000")
-// if err != nil {
-// panic(fmt.Errorf("failed starting CSM: %v", err))
-// }
-//
-// When controlling the CSM client manually, you must also inject its request
-// handlers into the SDK's Session configuration for the SDK's API clients to
-// publish metrics.
-//
-// sess, err := session.NewSession(&aws.Config{})
-// if err != nil {
-// panic(fmt.Errorf("failed loading session: %v", err))
-// }
-//
-// // Add CSM client's metric publishing request handlers to the SDK's
-// // Session Configuration.
-// r.InjectHandlers(&sess.Handlers)
-//
-// Controlling CSM client
-//
-// Once the CSM client has been enabled the Get function will return a Reporter
-// value that you can use to pause and resume the metrics published to the CSM
-// agent. If Get function is called before the reporter is enabled with the
-// Start function or via SDK's Session configuration nil will be returned.
-//
-// The Pause method can be called to stop the CSM client publishing metrics to
-// the CSM agent. The Continue method will resume metric publishing.
-//
-// // Get the CSM client Reporter.
-// r := csm.Get()
-//
-// // Will pause monitoring
-// r.Pause()
-// resp, err = client.GetObject(&s3.GetObjectInput{
-// Bucket: aws.String("bucket"),
-// Key: aws.String("key"),
-// })
-//
-// // Resume monitoring
-// r.Continue()
-package csm
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go
deleted file mode 100644
index 4b19e2800..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/enable.go
+++ /dev/null
@@ -1,89 +0,0 @@
-package csm
-
-import (
- "fmt"
- "strings"
- "sync"
-)
-
-var (
- lock sync.Mutex
-)
-
-const (
- // DefaultPort is used when no port is specified.
- DefaultPort = "31000"
-
- // DefaultHost is the host that will be used when none is specified.
- DefaultHost = "127.0.0.1"
-)
-
-// AddressWithDefaults returns a CSM address built from the host and port
-// values. If the host or port is not set, default values will be used
-// instead. If host is "localhost" it will be replaced with "127.0.0.1".
-func AddressWithDefaults(host, port string) string {
- if len(host) == 0 || strings.EqualFold(host, "localhost") {
- host = DefaultHost
- }
-
- if len(port) == 0 {
- port = DefaultPort
- }
-
- // Only IP6 host can contain a colon
- if strings.Contains(host, ":") {
- return "[" + host + "]:" + port
- }
-
- return host + ":" + port
-}
-
-// Start will start a long running go routine to capture
-// client side metrics. Calling start multiple time will only
-// start the metric listener once and will panic if a different
-// client ID or port is passed in.
-//
-// r, err := csm.Start("clientID", "127.0.0.1:31000")
-// if err != nil {
-// panic(fmt.Errorf("expected no error, but received %v", err))
-// }
-// sess := session.NewSession()
-// r.InjectHandlers(sess.Handlers)
-//
-// svc := s3.New(sess)
-// out, err := svc.GetObject(&s3.GetObjectInput{
-// Bucket: aws.String("bucket"),
-// Key: aws.String("key"),
-// })
-func Start(clientID string, url string) (*Reporter, error) {
- lock.Lock()
- defer lock.Unlock()
-
- if sender == nil {
- sender = newReporter(clientID, url)
- } else {
- if sender.clientID != clientID {
- panic(fmt.Errorf("inconsistent client IDs. %q was expected, but received %q", sender.clientID, clientID))
- }
-
- if sender.url != url {
- panic(fmt.Errorf("inconsistent URLs. %q was expected, but received %q", sender.url, url))
- }
- }
-
- if err := connect(url); err != nil {
- sender = nil
- return nil, err
- }
-
- return sender, nil
-}
-
-// Get will return a reporter if one exists, if one does not exist, nil will
-// be returned.
-func Get() *Reporter {
- lock.Lock()
- defer lock.Unlock()
-
- return sender
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go
deleted file mode 100644
index 5bacc791a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric.go
+++ /dev/null
@@ -1,109 +0,0 @@
-package csm
-
-import (
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-type metricTime time.Time
-
-func (t metricTime) MarshalJSON() ([]byte, error) {
- ns := time.Duration(time.Time(t).UnixNano())
- return []byte(strconv.FormatInt(int64(ns/time.Millisecond), 10)), nil
-}
-
-type metric struct {
- ClientID *string `json:"ClientId,omitempty"`
- API *string `json:"Api,omitempty"`
- Service *string `json:"Service,omitempty"`
- Timestamp *metricTime `json:"Timestamp,omitempty"`
- Type *string `json:"Type,omitempty"`
- Version *int `json:"Version,omitempty"`
-
- AttemptCount *int `json:"AttemptCount,omitempty"`
- Latency *int `json:"Latency,omitempty"`
-
- Fqdn *string `json:"Fqdn,omitempty"`
- UserAgent *string `json:"UserAgent,omitempty"`
- AttemptLatency *int `json:"AttemptLatency,omitempty"`
-
- SessionToken *string `json:"SessionToken,omitempty"`
- Region *string `json:"Region,omitempty"`
- AccessKey *string `json:"AccessKey,omitempty"`
- HTTPStatusCode *int `json:"HttpStatusCode,omitempty"`
- XAmzID2 *string `json:"XAmzId2,omitempty"`
- XAmzRequestID *string `json:"XAmznRequestId,omitempty"`
-
- AWSException *string `json:"AwsException,omitempty"`
- AWSExceptionMessage *string `json:"AwsExceptionMessage,omitempty"`
- SDKException *string `json:"SdkException,omitempty"`
- SDKExceptionMessage *string `json:"SdkExceptionMessage,omitempty"`
-
- FinalHTTPStatusCode *int `json:"FinalHttpStatusCode,omitempty"`
- FinalAWSException *string `json:"FinalAwsException,omitempty"`
- FinalAWSExceptionMessage *string `json:"FinalAwsExceptionMessage,omitempty"`
- FinalSDKException *string `json:"FinalSdkException,omitempty"`
- FinalSDKExceptionMessage *string `json:"FinalSdkExceptionMessage,omitempty"`
-
- DestinationIP *string `json:"DestinationIp,omitempty"`
- ConnectionReused *int `json:"ConnectionReused,omitempty"`
-
- AcquireConnectionLatency *int `json:"AcquireConnectionLatency,omitempty"`
- ConnectLatency *int `json:"ConnectLatency,omitempty"`
- RequestLatency *int `json:"RequestLatency,omitempty"`
- DNSLatency *int `json:"DnsLatency,omitempty"`
- TCPLatency *int `json:"TcpLatency,omitempty"`
- SSLLatency *int `json:"SslLatency,omitempty"`
-
- MaxRetriesExceeded *int `json:"MaxRetriesExceeded,omitempty"`
-}
-
-func (m *metric) TruncateFields() {
- m.ClientID = truncateString(m.ClientID, 255)
- m.UserAgent = truncateString(m.UserAgent, 256)
-
- m.AWSException = truncateString(m.AWSException, 128)
- m.AWSExceptionMessage = truncateString(m.AWSExceptionMessage, 512)
-
- m.SDKException = truncateString(m.SDKException, 128)
- m.SDKExceptionMessage = truncateString(m.SDKExceptionMessage, 512)
-
- m.FinalAWSException = truncateString(m.FinalAWSException, 128)
- m.FinalAWSExceptionMessage = truncateString(m.FinalAWSExceptionMessage, 512)
-
- m.FinalSDKException = truncateString(m.FinalSDKException, 128)
- m.FinalSDKExceptionMessage = truncateString(m.FinalSDKExceptionMessage, 512)
-}
-
-func truncateString(v *string, l int) *string {
- if v != nil && len(*v) > l {
- nv := (*v)[:l]
- return &nv
- }
-
- return v
-}
-
-func (m *metric) SetException(e metricException) {
- switch te := e.(type) {
- case awsException:
- m.AWSException = aws.String(te.exception)
- m.AWSExceptionMessage = aws.String(te.message)
- case sdkException:
- m.SDKException = aws.String(te.exception)
- m.SDKExceptionMessage = aws.String(te.message)
- }
-}
-
-func (m *metric) SetFinalException(e metricException) {
- switch te := e.(type) {
- case awsException:
- m.FinalAWSException = aws.String(te.exception)
- m.FinalAWSExceptionMessage = aws.String(te.message)
- case sdkException:
- m.FinalSDKException = aws.String(te.exception)
- m.FinalSDKExceptionMessage = aws.String(te.message)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go
deleted file mode 100644
index 82a3e345e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_chan.go
+++ /dev/null
@@ -1,55 +0,0 @@
-package csm
-
-import (
- "sync/atomic"
-)
-
-const (
- runningEnum = iota
- pausedEnum
-)
-
-var (
- // MetricsChannelSize of metrics to hold in the channel
- MetricsChannelSize = 100
-)
-
-type metricChan struct {
- ch chan metric
- paused *int64
-}
-
-func newMetricChan(size int) metricChan {
- return metricChan{
- ch: make(chan metric, size),
- paused: new(int64),
- }
-}
-
-func (ch *metricChan) Pause() {
- atomic.StoreInt64(ch.paused, pausedEnum)
-}
-
-func (ch *metricChan) Continue() {
- atomic.StoreInt64(ch.paused, runningEnum)
-}
-
-func (ch *metricChan) IsPaused() bool {
- v := atomic.LoadInt64(ch.paused)
- return v == pausedEnum
-}
-
-// Push will push metrics to the metric channel if the channel
-// is not paused
-func (ch *metricChan) Push(m metric) bool {
- if ch.IsPaused() {
- return false
- }
-
- select {
- case ch.ch <- m:
- return true
- default:
- return false
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go
deleted file mode 100644
index 54a99280c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/metric_exception.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package csm
-
-type metricException interface {
- Exception() string
- Message() string
-}
-
-type requestException struct {
- exception string
- message string
-}
-
-func (e requestException) Exception() string {
- return e.exception
-}
-func (e requestException) Message() string {
- return e.message
-}
-
-type awsException struct {
- requestException
-}
-
-type sdkException struct {
- requestException
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go b/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
deleted file mode 100644
index 835bcd49c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/csm/reporter.go
+++ /dev/null
@@ -1,264 +0,0 @@
-package csm
-
-import (
- "encoding/json"
- "net"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// Reporter will gather metrics of API requests made and
-// send those metrics to the CSM endpoint.
-type Reporter struct {
- clientID string
- url string
- conn net.Conn
- metricsCh metricChan
- done chan struct{}
-}
-
-var (
- sender *Reporter
-)
-
-func connect(url string) error {
- const network = "udp"
- if err := sender.connect(network, url); err != nil {
- return err
- }
-
- if sender.done == nil {
- sender.done = make(chan struct{})
- go sender.start()
- }
-
- return nil
-}
-
-func newReporter(clientID, url string) *Reporter {
- return &Reporter{
- clientID: clientID,
- url: url,
- metricsCh: newMetricChan(MetricsChannelSize),
- }
-}
-
-func (rep *Reporter) sendAPICallAttemptMetric(r *request.Request) {
- if rep == nil {
- return
- }
-
- now := time.Now()
- creds, _ := r.Config.Credentials.Get()
-
- m := metric{
- ClientID: aws.String(rep.clientID),
- API: aws.String(r.Operation.Name),
- Service: aws.String(r.ClientInfo.ServiceID),
- Timestamp: (*metricTime)(&now),
- UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")),
- Region: r.Config.Region,
- Type: aws.String("ApiCallAttempt"),
- Version: aws.Int(1),
-
- XAmzRequestID: aws.String(r.RequestID),
-
- AttemptLatency: aws.Int(int(now.Sub(r.AttemptTime).Nanoseconds() / int64(time.Millisecond))),
- AccessKey: aws.String(creds.AccessKeyID),
- }
-
- if r.HTTPResponse != nil {
- m.HTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode)
- }
-
- if r.Error != nil {
- if awserr, ok := r.Error.(awserr.Error); ok {
- m.SetException(getMetricException(awserr))
- }
- }
-
- m.TruncateFields()
- rep.metricsCh.Push(m)
-}
-
-func getMetricException(err awserr.Error) metricException {
- msg := err.Error()
- code := err.Code()
-
- switch code {
- case request.ErrCodeRequestError,
- request.ErrCodeSerialization,
- request.CanceledErrorCode:
- return sdkException{
- requestException{exception: code, message: msg},
- }
- default:
- return awsException{
- requestException{exception: code, message: msg},
- }
- }
-}
-
-func (rep *Reporter) sendAPICallMetric(r *request.Request) {
- if rep == nil {
- return
- }
-
- now := time.Now()
- m := metric{
- ClientID: aws.String(rep.clientID),
- API: aws.String(r.Operation.Name),
- Service: aws.String(r.ClientInfo.ServiceID),
- Timestamp: (*metricTime)(&now),
- UserAgent: aws.String(r.HTTPRequest.Header.Get("User-Agent")),
- Type: aws.String("ApiCall"),
- AttemptCount: aws.Int(r.RetryCount + 1),
- Region: r.Config.Region,
- Latency: aws.Int(int(time.Since(r.Time) / time.Millisecond)),
- XAmzRequestID: aws.String(r.RequestID),
- MaxRetriesExceeded: aws.Int(boolIntValue(r.RetryCount >= r.MaxRetries())),
- }
-
- if r.HTTPResponse != nil {
- m.FinalHTTPStatusCode = aws.Int(r.HTTPResponse.StatusCode)
- }
-
- if r.Error != nil {
- if awserr, ok := r.Error.(awserr.Error); ok {
- m.SetFinalException(getMetricException(awserr))
- }
- }
-
- m.TruncateFields()
-
- // TODO: Probably want to figure something out for logging dropped
- // metrics
- rep.metricsCh.Push(m)
-}
-
-func (rep *Reporter) connect(network, url string) error {
- if rep.conn != nil {
- rep.conn.Close()
- }
-
- conn, err := net.Dial(network, url)
- if err != nil {
- return awserr.New("UDPError", "Could not connect", err)
- }
-
- rep.conn = conn
-
- return nil
-}
-
-func (rep *Reporter) close() {
- if rep.done != nil {
- close(rep.done)
- }
-
- rep.metricsCh.Pause()
-}
-
-func (rep *Reporter) start() {
- defer func() {
- rep.metricsCh.Pause()
- }()
-
- for {
- select {
- case <-rep.done:
- rep.done = nil
- return
- case m := <-rep.metricsCh.ch:
- // TODO: What to do with this error? Probably should just log
- b, err := json.Marshal(m)
- if err != nil {
- continue
- }
-
- rep.conn.Write(b)
- }
- }
-}
-
-// Pause will pause the metric channel preventing any new metrics from being
-// added. It is safe to call concurrently with other calls to Pause, but if
-// called concurently with Continue can lead to unexpected state.
-func (rep *Reporter) Pause() {
- lock.Lock()
- defer lock.Unlock()
-
- if rep == nil {
- return
- }
-
- rep.close()
-}
-
-// Continue will reopen the metric channel and allow for monitoring to be
-// resumed. It is safe to call concurrently with other calls to Continue, but
-// if called concurently with Pause can lead to unexpected state.
-func (rep *Reporter) Continue() {
- lock.Lock()
- defer lock.Unlock()
- if rep == nil {
- return
- }
-
- if !rep.metricsCh.IsPaused() {
- return
- }
-
- rep.metricsCh.Continue()
-}
-
-// Client side metric handler names
-const (
- APICallMetricHandlerName = "awscsm.SendAPICallMetric"
- APICallAttemptMetricHandlerName = "awscsm.SendAPICallAttemptMetric"
-)
-
-// InjectHandlers will will enable client side metrics and inject the proper
-// handlers to handle how metrics are sent.
-//
-// InjectHandlers is NOT safe to call concurrently. Calling InjectHandlers
-// multiple times may lead to unexpected behavior, (e.g. duplicate metrics).
-//
-// // Start must be called in order to inject the correct handlers
-// r, err := csm.Start("clientID", "127.0.0.1:8094")
-// if err != nil {
-// panic(fmt.Errorf("expected no error, but received %v", err))
-// }
-//
-// sess := session.NewSession()
-// r.InjectHandlers(&sess.Handlers)
-//
-// // create a new service client with our client side metric session
-// svc := s3.New(sess)
-func (rep *Reporter) InjectHandlers(handlers *request.Handlers) {
- if rep == nil {
- return
- }
-
- handlers.Complete.PushFrontNamed(request.NamedHandler{
- Name: APICallMetricHandlerName,
- Fn: rep.sendAPICallMetric,
- })
-
- handlers.CompleteAttempt.PushFrontNamed(request.NamedHandler{
- Name: APICallAttemptMetricHandlerName,
- Fn: rep.sendAPICallAttemptMetric,
- })
-}
-
-// boolIntValue return 1 for true and 0 for false.
-func boolIntValue(b bool) int {
- if b {
- return 1
- }
-
- return 0
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
deleted file mode 100644
index 23bb639e0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/defaults.go
+++ /dev/null
@@ -1,207 +0,0 @@
-// Package defaults is a collection of helpers to retrieve the SDK's default
-// configuration and handlers.
-//
-// Generally this package shouldn't be used directly, but session.Session
-// instead. This package is useful when you need to reset the defaults
-// of a session or service client to the SDK defaults before setting
-// additional parameters.
-package defaults
-
-import (
- "fmt"
- "net"
- "net/http"
- "net/url"
- "os"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds"
- "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds"
- "github.com/aws/aws-sdk-go/aws/ec2metadata"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/shareddefaults"
-)
-
-// A Defaults provides a collection of default values for SDK clients.
-type Defaults struct {
- Config *aws.Config
- Handlers request.Handlers
-}
-
-// Get returns the SDK's default values with Config and handlers pre-configured.
-func Get() Defaults {
- cfg := Config()
- handlers := Handlers()
- cfg.Credentials = CredChain(cfg, handlers)
-
- return Defaults{
- Config: cfg,
- Handlers: handlers,
- }
-}
-
-// Config returns the default configuration without credentials.
-// To retrieve a config with credentials also included use
-// `defaults.Get().Config` instead.
-//
-// Generally you shouldn't need to use this method directly, but
-// is available if you need to reset the configuration of an
-// existing service client or session.
-func Config() *aws.Config {
- return aws.NewConfig().
- WithCredentials(credentials.AnonymousCredentials).
- WithRegion(os.Getenv("AWS_REGION")).
- WithHTTPClient(http.DefaultClient).
- WithMaxRetries(aws.UseServiceDefaultRetries).
- WithLogger(aws.NewDefaultLogger()).
- WithLogLevel(aws.LogOff).
- WithEndpointResolver(endpoints.DefaultResolver())
-}
-
-// Handlers returns the default request handlers.
-//
-// Generally you shouldn't need to use this method directly, but
-// is available if you need to reset the request handlers of an
-// existing service client or session.
-func Handlers() request.Handlers {
- var handlers request.Handlers
-
- handlers.Validate.PushBackNamed(corehandlers.ValidateEndpointHandler)
- handlers.Validate.AfterEachFn = request.HandlerListStopOnError
- handlers.Build.PushBackNamed(corehandlers.SDKVersionUserAgentHandler)
- handlers.Build.PushBackNamed(corehandlers.AddHostExecEnvUserAgentHander)
- handlers.Build.AfterEachFn = request.HandlerListStopOnError
- handlers.Sign.PushBackNamed(corehandlers.BuildContentLengthHandler)
- handlers.Send.PushBackNamed(corehandlers.ValidateReqSigHandler)
- handlers.Send.PushBackNamed(corehandlers.SendHandler)
- handlers.AfterRetry.PushBackNamed(corehandlers.AfterRetryHandler)
- handlers.ValidateResponse.PushBackNamed(corehandlers.ValidateResponseHandler)
-
- return handlers
-}
-
-// CredChain returns the default credential chain.
-//
-// Generally you shouldn't need to use this method directly, but
-// is available if you need to reset the credentials of an
-// existing service client or session's Config.
-func CredChain(cfg *aws.Config, handlers request.Handlers) *credentials.Credentials {
- return credentials.NewCredentials(&credentials.ChainProvider{
- VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors),
- Providers: CredProviders(cfg, handlers),
- })
-}
-
-// CredProviders returns the slice of providers used in
-// the default credential chain.
-//
-// For applications that need to use some other provider (for example use
-// different environment variables for legacy reasons) but still fall back
-// on the default chain of providers. This allows that default chaint to be
-// automatically updated
-func CredProviders(cfg *aws.Config, handlers request.Handlers) []credentials.Provider {
- return []credentials.Provider{
- &credentials.EnvProvider{},
- &credentials.SharedCredentialsProvider{Filename: "", Profile: ""},
- RemoteCredProvider(*cfg, handlers),
- }
-}
-
-const (
- httpProviderAuthorizationEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN"
- httpProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
-)
-
-// RemoteCredProvider returns a credentials provider for the default remote
-// endpoints such as EC2 or ECS Roles.
-func RemoteCredProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider {
- if u := os.Getenv(httpProviderEnvVar); len(u) > 0 {
- return localHTTPCredProvider(cfg, handlers, u)
- }
-
- if uri := os.Getenv(shareddefaults.ECSCredsProviderEnvVar); len(uri) > 0 {
- u := fmt.Sprintf("%s%s", shareddefaults.ECSContainerCredentialsURI, uri)
- return httpCredProvider(cfg, handlers, u)
- }
-
- return ec2RoleProvider(cfg, handlers)
-}
-
-var lookupHostFn = net.LookupHost
-
-func isLoopbackHost(host string) (bool, error) {
- ip := net.ParseIP(host)
- if ip != nil {
- return ip.IsLoopback(), nil
- }
-
- // Host is not an ip, perform lookup
- addrs, err := lookupHostFn(host)
- if err != nil {
- return false, err
- }
- for _, addr := range addrs {
- if !net.ParseIP(addr).IsLoopback() {
- return false, nil
- }
- }
-
- return true, nil
-}
-
-func localHTTPCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
- var errMsg string
-
- parsed, err := url.Parse(u)
- if err != nil {
- errMsg = fmt.Sprintf("invalid URL, %v", err)
- } else {
- host := aws.URLHostname(parsed)
- if len(host) == 0 {
- errMsg = "unable to parse host from local HTTP cred provider URL"
- } else if isLoopback, loopbackErr := isLoopbackHost(host); loopbackErr != nil {
- errMsg = fmt.Sprintf("failed to resolve host %q, %v", host, loopbackErr)
- } else if !isLoopback {
- errMsg = fmt.Sprintf("invalid endpoint host, %q, only loopback hosts are allowed.", host)
- }
- }
-
- if len(errMsg) > 0 {
- if cfg.Logger != nil {
- cfg.Logger.Log("Ignoring, HTTP credential provider", errMsg, err)
- }
- return credentials.ErrorProvider{
- Err: awserr.New("CredentialsEndpointError", errMsg, err),
- ProviderName: endpointcreds.ProviderName,
- }
- }
-
- return httpCredProvider(cfg, handlers, u)
-}
-
-func httpCredProvider(cfg aws.Config, handlers request.Handlers, u string) credentials.Provider {
- return endpointcreds.NewProviderClient(cfg, handlers, u,
- func(p *endpointcreds.Provider) {
- p.ExpiryWindow = 5 * time.Minute
- p.AuthorizationToken = os.Getenv(httpProviderAuthorizationEnvVar)
- },
- )
-}
-
-func ec2RoleProvider(cfg aws.Config, handlers request.Handlers) credentials.Provider {
- resolver := cfg.EndpointResolver
- if resolver == nil {
- resolver = endpoints.DefaultResolver()
- }
-
- e, _ := resolver.EndpointFor(endpoints.Ec2metadataServiceID, "")
- return &ec2rolecreds.EC2RoleProvider{
- Client: ec2metadata.NewClient(cfg, handlers, e.URL, e.SigningRegion),
- ExpiryWindow: 5 * time.Minute,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
deleted file mode 100644
index ca0ee1dcc..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/defaults/shared_config.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package defaults
-
-import (
- "github.com/aws/aws-sdk-go/internal/shareddefaults"
-)
-
-// SharedCredentialsFilename returns the SDK's default file path
-// for the shared credentials file.
-//
-// Builds the shared config file path based on the OS's platform.
-//
-// - Linux/Unix: $HOME/.aws/credentials
-// - Windows: %USERPROFILE%\.aws\credentials
-func SharedCredentialsFilename() string {
- return shareddefaults.SharedCredentialsFilename()
-}
-
-// SharedConfigFilename returns the SDK's default file path for
-// the shared config file.
-//
-// Builds the shared config file path based on the OS's platform.
-//
-// - Linux/Unix: $HOME/.aws/config
-// - Windows: %USERPROFILE%\.aws\config
-func SharedConfigFilename() string {
- return shareddefaults.SharedConfigFilename()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/doc.go
deleted file mode 100644
index 4fcb61618..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/doc.go
+++ /dev/null
@@ -1,56 +0,0 @@
-// Package aws provides the core SDK's utilities and shared types. Use this package's
-// utilities to simplify setting and reading API operations parameters.
-//
-// Value and Pointer Conversion Utilities
-//
-// This package includes a helper conversion utility for each scalar type the SDK's
-// API use. These utilities make getting a pointer of the scalar, and dereferencing
-// a pointer easier.
-//
-// Each conversion utility comes in two forms. Value to Pointer and Pointer to Value.
-// The Pointer to value will safely dereference the pointer and return its value.
-// If the pointer was nil, the scalar's zero value will be returned.
-//
-// The value to pointer functions will be named after the scalar type. So get a
-// *string from a string value use the "String" function. This makes it easy to
-// to get pointer of a literal string value, because getting the address of a
-// literal requires assigning the value to a variable first.
-//
-// var strPtr *string
-//
-// // Without the SDK's conversion functions
-// str := "my string"
-// strPtr = &str
-//
-// // With the SDK's conversion functions
-// strPtr = aws.String("my string")
-//
-// // Convert *string to string value
-// str = aws.StringValue(strPtr)
-//
-// In addition to scalars the aws package also includes conversion utilities for
-// map and slice for commonly types used in API parameters. The map and slice
-// conversion functions use similar naming pattern as the scalar conversion
-// functions.
-//
-// var strPtrs []*string
-// var strs []string = []string{"Go", "Gophers", "Go"}
-//
-// // Convert []string to []*string
-// strPtrs = aws.StringSlice(strs)
-//
-// // Convert []*string to []string
-// strs = aws.StringValueSlice(strPtrs)
-//
-// SDK Default HTTP Client
-//
-// The SDK will use the http.DefaultClient if a HTTP client is not provided to
-// the SDK's Session, or service client constructor. This means that if the
-// http.DefaultClient is modified by other components of your application the
-// modifications will be picked up by the SDK as well.
-//
-// In some cases this might be intended, but it is a better practice to create
-// a custom HTTP Client to share explicitly through your application. You can
-// configure the SDK to use the custom HTTP Client by setting the HTTPClient
-// value of the SDK's Config type when creating a Session or service client.
-package aws
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
deleted file mode 100644
index 69fa63dc0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/api.go
+++ /dev/null
@@ -1,250 +0,0 @@
-package ec2metadata
-
-import (
- "encoding/json"
- "fmt"
- "net/http"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkuri"
-)
-
-// getToken uses the duration to return a token for EC2 metadata service,
-// or an error if the request failed.
-func (c *EC2Metadata) getToken(ctx aws.Context, duration time.Duration) (tokenOutput, error) {
- op := &request.Operation{
- Name: "GetToken",
- HTTPMethod: "PUT",
- HTTPPath: "/latest/api/token",
- }
-
- var output tokenOutput
- req := c.NewRequest(op, nil, &output)
- req.SetContext(ctx)
-
- // remove the fetch token handler from the request handlers to avoid infinite recursion
- req.Handlers.Sign.RemoveByName(fetchTokenHandlerName)
-
- // Swap the unmarshalMetadataHandler with unmarshalTokenHandler on this request.
- req.Handlers.Unmarshal.Swap(unmarshalMetadataHandlerName, unmarshalTokenHandler)
-
- ttl := strconv.FormatInt(int64(duration/time.Second), 10)
- req.HTTPRequest.Header.Set(ttlHeader, ttl)
-
- err := req.Send()
-
- // Errors with bad request status should be returned.
- if err != nil {
- err = awserr.NewRequestFailure(
- awserr.New(req.HTTPResponse.Status, http.StatusText(req.HTTPResponse.StatusCode), err),
- req.HTTPResponse.StatusCode, req.RequestID)
- }
-
- return output, err
-}
-
-// GetMetadata uses the path provided to request information from the EC2
-// instance metadata service. The content will be returned as a string, or
-// error if the request failed.
-func (c *EC2Metadata) GetMetadata(p string) (string, error) {
- return c.GetMetadataWithContext(aws.BackgroundContext(), p)
-}
-
-// GetMetadataWithContext uses the path provided to request information from the EC2
-// instance metadata service. The content will be returned as a string, or
-// error if the request failed.
-func (c *EC2Metadata) GetMetadataWithContext(ctx aws.Context, p string) (string, error) {
- op := &request.Operation{
- Name: "GetMetadata",
- HTTPMethod: "GET",
- HTTPPath: sdkuri.PathJoin("/latest/meta-data", p),
- }
- output := &metadataOutput{}
-
- req := c.NewRequest(op, nil, output)
-
- req.SetContext(ctx)
-
- err := req.Send()
- return output.Content, err
-}
-
-// GetUserData returns the userdata that was configured for the service. If
-// there is no user-data setup for the EC2 instance a "NotFoundError" error
-// code will be returned.
-func (c *EC2Metadata) GetUserData() (string, error) {
- return c.GetUserDataWithContext(aws.BackgroundContext())
-}
-
-// GetUserDataWithContext returns the userdata that was configured for the service. If
-// there is no user-data setup for the EC2 instance a "NotFoundError" error
-// code will be returned.
-func (c *EC2Metadata) GetUserDataWithContext(ctx aws.Context) (string, error) {
- op := &request.Operation{
- Name: "GetUserData",
- HTTPMethod: "GET",
- HTTPPath: "/latest/user-data",
- }
-
- output := &metadataOutput{}
- req := c.NewRequest(op, nil, output)
- req.SetContext(ctx)
-
- err := req.Send()
- return output.Content, err
-}
-
-// GetDynamicData uses the path provided to request information from the EC2
-// instance metadata service for dynamic data. The content will be returned
-// as a string, or error if the request failed.
-func (c *EC2Metadata) GetDynamicData(p string) (string, error) {
- return c.GetDynamicDataWithContext(aws.BackgroundContext(), p)
-}
-
-// GetDynamicDataWithContext uses the path provided to request information from the EC2
-// instance metadata service for dynamic data. The content will be returned
-// as a string, or error if the request failed.
-func (c *EC2Metadata) GetDynamicDataWithContext(ctx aws.Context, p string) (string, error) {
- op := &request.Operation{
- Name: "GetDynamicData",
- HTTPMethod: "GET",
- HTTPPath: sdkuri.PathJoin("/latest/dynamic", p),
- }
-
- output := &metadataOutput{}
- req := c.NewRequest(op, nil, output)
- req.SetContext(ctx)
-
- err := req.Send()
- return output.Content, err
-}
-
-// GetInstanceIdentityDocument retrieves an identity document describing an
-// instance. Error is returned if the request fails or is unable to parse
-// the response.
-func (c *EC2Metadata) GetInstanceIdentityDocument() (EC2InstanceIdentityDocument, error) {
- return c.GetInstanceIdentityDocumentWithContext(aws.BackgroundContext())
-}
-
-// GetInstanceIdentityDocumentWithContext retrieves an identity document describing an
-// instance. Error is returned if the request fails or is unable to parse
-// the response.
-func (c *EC2Metadata) GetInstanceIdentityDocumentWithContext(ctx aws.Context) (EC2InstanceIdentityDocument, error) {
- resp, err := c.GetDynamicDataWithContext(ctx, "instance-identity/document")
- if err != nil {
- return EC2InstanceIdentityDocument{},
- awserr.New("EC2MetadataRequestError",
- "failed to get EC2 instance identity document", err)
- }
-
- doc := EC2InstanceIdentityDocument{}
- if err := json.NewDecoder(strings.NewReader(resp)).Decode(&doc); err != nil {
- return EC2InstanceIdentityDocument{},
- awserr.New(request.ErrCodeSerialization,
- "failed to decode EC2 instance identity document", err)
- }
-
- return doc, nil
-}
-
-// IAMInfo retrieves IAM info from the metadata API
-func (c *EC2Metadata) IAMInfo() (EC2IAMInfo, error) {
- return c.IAMInfoWithContext(aws.BackgroundContext())
-}
-
-// IAMInfoWithContext retrieves IAM info from the metadata API
-func (c *EC2Metadata) IAMInfoWithContext(ctx aws.Context) (EC2IAMInfo, error) {
- resp, err := c.GetMetadataWithContext(ctx, "iam/info")
- if err != nil {
- return EC2IAMInfo{},
- awserr.New("EC2MetadataRequestError",
- "failed to get EC2 IAM info", err)
- }
-
- info := EC2IAMInfo{}
- if err := json.NewDecoder(strings.NewReader(resp)).Decode(&info); err != nil {
- return EC2IAMInfo{},
- awserr.New(request.ErrCodeSerialization,
- "failed to decode EC2 IAM info", err)
- }
-
- if info.Code != "Success" {
- errMsg := fmt.Sprintf("failed to get EC2 IAM Info (%s)", info.Code)
- return EC2IAMInfo{},
- awserr.New("EC2MetadataError", errMsg, nil)
- }
-
- return info, nil
-}
-
-// Region returns the region the instance is running in.
-func (c *EC2Metadata) Region() (string, error) {
- return c.RegionWithContext(aws.BackgroundContext())
-}
-
-// RegionWithContext returns the region the instance is running in.
-func (c *EC2Metadata) RegionWithContext(ctx aws.Context) (string, error) {
- ec2InstanceIdentityDocument, err := c.GetInstanceIdentityDocumentWithContext(ctx)
- if err != nil {
- return "", err
- }
- // extract region from the ec2InstanceIdentityDocument
- region := ec2InstanceIdentityDocument.Region
- if len(region) == 0 {
- return "", awserr.New("EC2MetadataError", "invalid region received for ec2metadata instance", nil)
- }
- // returns region
- return region, nil
-}
-
-// Available returns if the application has access to the EC2 Metadata service.
-// Can be used to determine if application is running within an EC2 Instance and
-// the metadata service is available.
-func (c *EC2Metadata) Available() bool {
- return c.AvailableWithContext(aws.BackgroundContext())
-}
-
-// AvailableWithContext returns if the application has access to the EC2 Metadata service.
-// Can be used to determine if application is running within an EC2 Instance and
-// the metadata service is available.
-func (c *EC2Metadata) AvailableWithContext(ctx aws.Context) bool {
- if _, err := c.GetMetadataWithContext(ctx, "instance-id"); err != nil {
- return false
- }
-
- return true
-}
-
-// An EC2IAMInfo provides the shape for unmarshaling
-// an IAM info from the metadata API
-type EC2IAMInfo struct {
- Code string
- LastUpdated time.Time
- InstanceProfileArn string
- InstanceProfileID string
-}
-
-// An EC2InstanceIdentityDocument provides the shape for unmarshaling
-// an instance identity document
-type EC2InstanceIdentityDocument struct {
- DevpayProductCodes []string `json:"devpayProductCodes"`
- MarketplaceProductCodes []string `json:"marketplaceProductCodes"`
- AvailabilityZone string `json:"availabilityZone"`
- PrivateIP string `json:"privateIp"`
- Version string `json:"version"`
- Region string `json:"region"`
- InstanceID string `json:"instanceId"`
- BillingProducts []string `json:"billingProducts"`
- InstanceType string `json:"instanceType"`
- AccountID string `json:"accountId"`
- PendingTime time.Time `json:"pendingTime"`
- ImageID string `json:"imageId"`
- KernelID string `json:"kernelId"`
- RamdiskID string `json:"ramdiskId"`
- Architecture string `json:"architecture"`
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
deleted file mode 100644
index df63bade1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go
+++ /dev/null
@@ -1,245 +0,0 @@
-// Package ec2metadata provides the client for making API calls to the
-// EC2 Metadata service.
-//
-// This package's client can be disabled completely by setting the environment
-// variable "AWS_EC2_METADATA_DISABLED=true". This environment variable set to
-// true instructs the SDK to disable the EC2 Metadata client. The client cannot
-// be used while the environment variable is set to true, (case insensitive).
-//
-// The endpoint of the EC2 IMDS client can be configured via the environment
-// variable, AWS_EC2_METADATA_SERVICE_ENDPOINT when creating the client with a
-// Session. See aws/session#Options.EC2IMDSEndpoint for more details.
-package ec2metadata
-
-import (
- "bytes"
- "io"
- "net/http"
- "net/url"
- "os"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const (
- // ServiceName is the name of the service.
- ServiceName = "ec2metadata"
- disableServiceEnvVar = "AWS_EC2_METADATA_DISABLED"
-
- // Headers for Token and TTL
- ttlHeader = "x-aws-ec2-metadata-token-ttl-seconds"
- tokenHeader = "x-aws-ec2-metadata-token"
-
- // Named Handler constants
- fetchTokenHandlerName = "FetchTokenHandler"
- unmarshalMetadataHandlerName = "unmarshalMetadataHandler"
- unmarshalTokenHandlerName = "unmarshalTokenHandler"
- enableTokenProviderHandlerName = "enableTokenProviderHandler"
-
- // TTL constants
- defaultTTL = 21600 * time.Second
- ttlExpirationWindow = 30 * time.Second
-)
-
-// A EC2Metadata is an EC2 Metadata service Client.
-type EC2Metadata struct {
- *client.Client
-}
-
-// New creates a new instance of the EC2Metadata client with a session.
-// This client is safe to use across multiple goroutines.
-//
-//
-// Example:
-// // Create a EC2Metadata client from just a session.
-// svc := ec2metadata.New(mySession)
-//
-// // Create a EC2Metadata client with additional configuration
-// svc := ec2metadata.New(mySession, aws.NewConfig().WithLogLevel(aws.LogDebugHTTPBody))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *EC2Metadata {
- c := p.ClientConfig(ServiceName, cfgs...)
- return NewClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion)
-}
-
-// NewClient returns a new EC2Metadata client. Should be used to create
-// a client when not using a session. Generally using just New with a session
-// is preferred.
-//
-// Will remove the URL path from the endpoint provided to ensure the EC2 IMDS
-// client is able to communicate with the EC2 IMDS API.
-//
-// If an unmodified HTTP client is provided from the stdlib default, or no client
-// the EC2RoleProvider's EC2Metadata HTTP client's timeout will be shortened.
-// To disable this set Config.EC2MetadataDisableTimeoutOverride to false. Enabled by default.
-func NewClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion string, opts ...func(*client.Client)) *EC2Metadata {
- if !aws.BoolValue(cfg.EC2MetadataDisableTimeoutOverride) && httpClientZero(cfg.HTTPClient) {
- // If the http client is unmodified and this feature is not disabled
- // set custom timeouts for EC2Metadata requests.
- cfg.HTTPClient = &http.Client{
- // use a shorter timeout than default because the metadata
- // service is local if it is running, and to fail faster
- // if not running on an ec2 instance.
- Timeout: 1 * time.Second,
- }
- // max number of retries on the client operation
- cfg.MaxRetries = aws.Int(2)
- }
-
- if u, err := url.Parse(endpoint); err == nil {
- // Remove path from the endpoint since it will be added by requests.
- // This is an artifact of the SDK adding `/latest` to the endpoint for
- // EC2 IMDS, but this is now moved to the operation definition.
- u.Path = ""
- u.RawPath = ""
- endpoint = u.String()
- }
-
- svc := &EC2Metadata{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceName,
- Endpoint: endpoint,
- APIVersion: "latest",
- },
- handlers,
- ),
- }
-
- // token provider instance
- tp := newTokenProvider(svc, defaultTTL)
-
- // NamedHandler for fetching token
- svc.Handlers.Sign.PushBackNamed(request.NamedHandler{
- Name: fetchTokenHandlerName,
- Fn: tp.fetchTokenHandler,
- })
- // NamedHandler for enabling token provider
- svc.Handlers.Complete.PushBackNamed(request.NamedHandler{
- Name: enableTokenProviderHandlerName,
- Fn: tp.enableTokenProviderHandler,
- })
-
- svc.Handlers.Unmarshal.PushBackNamed(unmarshalHandler)
- svc.Handlers.UnmarshalError.PushBack(unmarshalError)
- svc.Handlers.Validate.Clear()
- svc.Handlers.Validate.PushBack(validateEndpointHandler)
-
- // Disable the EC2 Metadata service if the environment variable is set.
- // This short-circuits the service's functionality to always fail to send
- // requests.
- if strings.ToLower(os.Getenv(disableServiceEnvVar)) == "true" {
- svc.Handlers.Send.SwapNamed(request.NamedHandler{
- Name: corehandlers.SendHandler.Name,
- Fn: func(r *request.Request) {
- r.HTTPResponse = &http.Response{
- Header: http.Header{},
- }
- r.Error = awserr.New(
- request.CanceledErrorCode,
- "EC2 IMDS access disabled via "+disableServiceEnvVar+" env var",
- nil)
- },
- })
- }
-
- // Add additional options to the service config
- for _, option := range opts {
- option(svc.Client)
- }
- return svc
-}
-
-func httpClientZero(c *http.Client) bool {
- return c == nil || (c.Transport == nil && c.CheckRedirect == nil && c.Jar == nil && c.Timeout == 0)
-}
-
-type metadataOutput struct {
- Content string
-}
-
-type tokenOutput struct {
- Token string
- TTL time.Duration
-}
-
-// unmarshal token handler is used to parse the response of a getToken operation
-var unmarshalTokenHandler = request.NamedHandler{
- Name: unmarshalTokenHandlerName,
- Fn: func(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
- var b bytes.Buffer
- if _, err := io.Copy(&b, r.HTTPResponse.Body); err != nil {
- r.Error = awserr.NewRequestFailure(awserr.New(request.ErrCodeSerialization,
- "unable to unmarshal EC2 metadata response", err), r.HTTPResponse.StatusCode, r.RequestID)
- return
- }
-
- v := r.HTTPResponse.Header.Get(ttlHeader)
- data, ok := r.Data.(*tokenOutput)
- if !ok {
- return
- }
-
- data.Token = b.String()
- // TTL is in seconds
- i, err := strconv.ParseInt(v, 10, 64)
- if err != nil {
- r.Error = awserr.NewRequestFailure(awserr.New(request.ParamFormatErrCode,
- "unable to parse EC2 token TTL response", err), r.HTTPResponse.StatusCode, r.RequestID)
- return
- }
- t := time.Duration(i) * time.Second
- data.TTL = t
- },
-}
-
-var unmarshalHandler = request.NamedHandler{
- Name: unmarshalMetadataHandlerName,
- Fn: func(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
- var b bytes.Buffer
- if _, err := io.Copy(&b, r.HTTPResponse.Body); err != nil {
- r.Error = awserr.NewRequestFailure(awserr.New(request.ErrCodeSerialization,
- "unable to unmarshal EC2 metadata response", err), r.HTTPResponse.StatusCode, r.RequestID)
- return
- }
-
- if data, ok := r.Data.(*metadataOutput); ok {
- data.Content = b.String()
- }
- },
-}
-
-func unmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
- var b bytes.Buffer
-
- if _, err := io.Copy(&b, r.HTTPResponse.Body); err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization, "unable to unmarshal EC2 metadata error response", err),
- r.HTTPResponse.StatusCode, r.RequestID)
- return
- }
-
- // Response body format is not consistent between metadata endpoints.
- // Grab the error message as a string and include that as the source error
- r.Error = awserr.NewRequestFailure(
- awserr.New("EC2MetadataError", "failed to make EC2Metadata request\n"+b.String(), nil),
- r.HTTPResponse.StatusCode, r.RequestID)
-}
-
-func validateEndpointHandler(r *request.Request) {
- if r.ClientInfo.Endpoint == "" {
- r.Error = aws.ErrMissingEndpoint
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go
deleted file mode 100644
index 4b29f190b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/token_provider.go
+++ /dev/null
@@ -1,93 +0,0 @@
-package ec2metadata
-
-import (
- "net/http"
- "sync/atomic"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// A tokenProvider struct provides access to EC2Metadata client
-// and atomic instance of a token, along with configuredTTL for it.
-// tokenProvider also provides an atomic flag to disable the
-// fetch token operation.
-// The disabled member will use 0 as false, and 1 as true.
-type tokenProvider struct {
- client *EC2Metadata
- token atomic.Value
- configuredTTL time.Duration
- disabled uint32
-}
-
-// A ec2Token struct helps use of token in EC2 Metadata service ops
-type ec2Token struct {
- token string
- credentials.Expiry
-}
-
-// newTokenProvider provides a pointer to a tokenProvider instance
-func newTokenProvider(c *EC2Metadata, duration time.Duration) *tokenProvider {
- return &tokenProvider{client: c, configuredTTL: duration}
-}
-
-// fetchTokenHandler fetches token for EC2Metadata service client by default.
-func (t *tokenProvider) fetchTokenHandler(r *request.Request) {
-
- // short-circuits to insecure data flow if tokenProvider is disabled.
- if v := atomic.LoadUint32(&t.disabled); v == 1 {
- return
- }
-
- if ec2Token, ok := t.token.Load().(ec2Token); ok && !ec2Token.IsExpired() {
- r.HTTPRequest.Header.Set(tokenHeader, ec2Token.token)
- return
- }
-
- output, err := t.client.getToken(r.Context(), t.configuredTTL)
-
- if err != nil {
-
- // change the disabled flag on token provider to true,
- // when error is request timeout error.
- if requestFailureError, ok := err.(awserr.RequestFailure); ok {
- switch requestFailureError.StatusCode() {
- case http.StatusForbidden, http.StatusNotFound, http.StatusMethodNotAllowed:
- atomic.StoreUint32(&t.disabled, 1)
- case http.StatusBadRequest:
- r.Error = requestFailureError
- }
-
- // Check if request timed out while waiting for response
- if e, ok := requestFailureError.OrigErr().(awserr.Error); ok {
- if e.Code() == request.ErrCodeRequestError {
- atomic.StoreUint32(&t.disabled, 1)
- }
- }
- }
- return
- }
-
- newToken := ec2Token{
- token: output.Token,
- }
- newToken.SetExpiration(time.Now().Add(output.TTL), ttlExpirationWindow)
- t.token.Store(newToken)
-
- // Inject token header to the request.
- if ec2Token, ok := t.token.Load().(ec2Token); ok {
- r.HTTPRequest.Header.Set(tokenHeader, ec2Token.token)
- }
-}
-
-// enableTokenProviderHandler enables the token provider
-func (t *tokenProvider) enableTokenProviderHandler(r *request.Request) {
- // If the error code status is 401, we enable the token provider
- if e, ok := r.Error.(awserr.RequestFailure); ok && e != nil &&
- e.StatusCode() == http.StatusUnauthorized {
- t.token.Store(ec2Token{})
- atomic.StoreUint32(&t.disabled, 0)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
deleted file mode 100644
index 8d65ca1d6..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package endpoints
-
-import (
- "encoding/json"
- "fmt"
- "io"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-type modelDefinition map[string]json.RawMessage
-
-// A DecodeModelOptions are the options for how the endpoints model definition
-// are decoded.
-type DecodeModelOptions struct {
- SkipCustomizations bool
-}
-
-// Set combines all of the option functions together.
-func (d *DecodeModelOptions) Set(optFns ...func(*DecodeModelOptions)) {
- for _, fn := range optFns {
- fn(d)
- }
-}
-
-// DecodeModel unmarshals a Regions and Endpoint model definition file into
-// a endpoint Resolver. If the file format is not supported, or an error occurs
-// when unmarshaling the model an error will be returned.
-//
-// Casting the return value of this func to a EnumPartitions will
-// allow you to get a list of the partitions in the order the endpoints
-// will be resolved in.
-//
-// resolver, err := endpoints.DecodeModel(reader)
-//
-// partitions := resolver.(endpoints.EnumPartitions).Partitions()
-// for _, p := range partitions {
-// // ... inspect partitions
-// }
-func DecodeModel(r io.Reader, optFns ...func(*DecodeModelOptions)) (Resolver, error) {
- var opts DecodeModelOptions
- opts.Set(optFns...)
-
- // Get the version of the partition file to determine what
- // unmarshaling model to use.
- modelDef := modelDefinition{}
- if err := json.NewDecoder(r).Decode(&modelDef); err != nil {
- return nil, newDecodeModelError("failed to decode endpoints model", err)
- }
-
- var version string
- if b, ok := modelDef["version"]; ok {
- version = string(b)
- } else {
- return nil, newDecodeModelError("endpoints version not found in model", nil)
- }
-
- if version == "3" {
- return decodeV3Endpoints(modelDef, opts)
- }
-
- return nil, newDecodeModelError(
- fmt.Sprintf("endpoints version %s, not supported", version), nil)
-}
-
-func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resolver, error) {
- b, ok := modelDef["partitions"]
- if !ok {
- return nil, newDecodeModelError("endpoints model missing partitions", nil)
- }
-
- ps := partitions{}
- if err := json.Unmarshal(b, &ps); err != nil {
- return nil, newDecodeModelError("failed to decode endpoints model", err)
- }
-
- if opts.SkipCustomizations {
- return ps, nil
- }
-
- // Customization
- for i := 0; i < len(ps); i++ {
- p := &ps[i]
- custRegionalS3(p)
- custRmIotDataService(p)
- custFixAppAutoscalingChina(p)
- custFixAppAutoscalingUsGov(p)
- }
-
- return ps, nil
-}
-
-func custRegionalS3(p *partition) {
- if p.ID != "aws" {
- return
- }
-
- service, ok := p.Services["s3"]
- if !ok {
- return
- }
-
- const awsGlobal = "aws-global"
- const usEast1 = "us-east-1"
-
- // If global endpoint already exists no customization needed.
- if _, ok := service.Endpoints[endpointKey{Region: awsGlobal}]; ok {
- return
- }
-
- service.PartitionEndpoint = awsGlobal
- if _, ok := service.Endpoints[endpointKey{Region: usEast1}]; !ok {
- service.Endpoints[endpointKey{Region: usEast1}] = endpoint{}
- }
- service.Endpoints[endpointKey{Region: awsGlobal}] = endpoint{
- Hostname: "s3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: usEast1,
- },
- }
-
- p.Services["s3"] = service
-}
-
-func custRmIotDataService(p *partition) {
- delete(p.Services, "data.iot")
-}
-
-func custFixAppAutoscalingChina(p *partition) {
- if p.ID != "aws-cn" {
- return
- }
-
- const serviceName = "application-autoscaling"
- s, ok := p.Services[serviceName]
- if !ok {
- return
- }
-
- const expectHostname = `autoscaling.{region}.amazonaws.com`
- serviceDefault := s.Defaults[defaultKey{}]
- if e, a := expectHostname, serviceDefault.Hostname; e != a {
- fmt.Printf("custFixAppAutoscalingChina: ignoring customization, expected %s, got %s\n", e, a)
- return
- }
- serviceDefault.Hostname = expectHostname + ".cn"
- s.Defaults[defaultKey{}] = serviceDefault
- p.Services[serviceName] = s
-}
-
-func custFixAppAutoscalingUsGov(p *partition) {
- if p.ID != "aws-us-gov" {
- return
- }
-
- const serviceName = "application-autoscaling"
- s, ok := p.Services[serviceName]
- if !ok {
- return
- }
-
- serviceDefault := s.Defaults[defaultKey{}]
- if a := serviceDefault.CredentialScope.Service; a != "" {
- fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty credential scope service, got %s\n", a)
- return
- }
-
- if a := serviceDefault.Hostname; a != "" {
- fmt.Printf("custFixAppAutoscalingUsGov: ignoring customization, expected empty hostname, got %s\n", a)
- return
- }
-
- serviceDefault.CredentialScope.Service = "application-autoscaling"
- serviceDefault.Hostname = "autoscaling.{region}.amazonaws.com"
-
- if s.Defaults == nil {
- s.Defaults = make(endpointDefaults)
- }
-
- s.Defaults[defaultKey{}] = serviceDefault
-
- p.Services[serviceName] = s
-}
-
-type decodeModelError struct {
- awsError
-}
-
-func newDecodeModelError(msg string, err error) decodeModelError {
- return decodeModelError{
- awsError: awserr.New("DecodeEndpointsModelError", msg, err),
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
deleted file mode 100644
index b9f4a26de..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go
+++ /dev/null
@@ -1,28166 +0,0 @@
-// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
-
-package endpoints
-
-import (
- "regexp"
-)
-
-// Partition identifiers
-const (
- AwsPartitionID = "aws" // AWS Standard partition.
- AwsCnPartitionID = "aws-cn" // AWS China partition.
- AwsUsGovPartitionID = "aws-us-gov" // AWS GovCloud (US) partition.
- AwsIsoPartitionID = "aws-iso" // AWS ISO (US) partition.
- AwsIsoBPartitionID = "aws-iso-b" // AWS ISOB (US) partition.
-)
-
-// AWS Standard partition's regions.
-const (
- AfSouth1RegionID = "af-south-1" // Africa (Cape Town).
- ApEast1RegionID = "ap-east-1" // Asia Pacific (Hong Kong).
- ApNortheast1RegionID = "ap-northeast-1" // Asia Pacific (Tokyo).
- ApNortheast2RegionID = "ap-northeast-2" // Asia Pacific (Seoul).
- ApNortheast3RegionID = "ap-northeast-3" // Asia Pacific (Osaka).
- ApSouth1RegionID = "ap-south-1" // Asia Pacific (Mumbai).
- ApSoutheast1RegionID = "ap-southeast-1" // Asia Pacific (Singapore).
- ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney).
- CaCentral1RegionID = "ca-central-1" // Canada (Central).
- EuCentral1RegionID = "eu-central-1" // Europe (Frankfurt).
- EuNorth1RegionID = "eu-north-1" // Europe (Stockholm).
- EuSouth1RegionID = "eu-south-1" // Europe (Milan).
- EuWest1RegionID = "eu-west-1" // Europe (Ireland).
- EuWest2RegionID = "eu-west-2" // Europe (London).
- EuWest3RegionID = "eu-west-3" // Europe (Paris).
- MeSouth1RegionID = "me-south-1" // Middle East (Bahrain).
- SaEast1RegionID = "sa-east-1" // South America (Sao Paulo).
- UsEast1RegionID = "us-east-1" // US East (N. Virginia).
- UsEast2RegionID = "us-east-2" // US East (Ohio).
- UsWest1RegionID = "us-west-1" // US West (N. California).
- UsWest2RegionID = "us-west-2" // US West (Oregon).
-)
-
-// AWS China partition's regions.
-const (
- CnNorth1RegionID = "cn-north-1" // China (Beijing).
- CnNorthwest1RegionID = "cn-northwest-1" // China (Ningxia).
-)
-
-// AWS GovCloud (US) partition's regions.
-const (
- UsGovEast1RegionID = "us-gov-east-1" // AWS GovCloud (US-East).
- UsGovWest1RegionID = "us-gov-west-1" // AWS GovCloud (US-West).
-)
-
-// AWS ISO (US) partition's regions.
-const (
- UsIsoEast1RegionID = "us-iso-east-1" // US ISO East.
- UsIsoWest1RegionID = "us-iso-west-1" // US ISO WEST.
-)
-
-// AWS ISOB (US) partition's regions.
-const (
- UsIsobEast1RegionID = "us-isob-east-1" // US ISOB East (Ohio).
-)
-
-// DefaultResolver returns an Endpoint resolver that will be able
-// to resolve endpoints for: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), and AWS ISOB (US).
-//
-// Use DefaultPartitions() to get the list of the default partitions.
-func DefaultResolver() Resolver {
- return defaultPartitions
-}
-
-// DefaultPartitions returns a list of the partitions the SDK is bundled
-// with. The available partitions are: AWS Standard, AWS China, AWS GovCloud (US), AWS ISO (US), and AWS ISOB (US).
-//
-// partitions := endpoints.DefaultPartitions
-// for _, p := range partitions {
-// // ... inspect partitions
-// }
-func DefaultPartitions() []Partition {
- return defaultPartitions.Partitions()
-}
-
-var defaultPartitions = partitions{
- awsPartition,
- awscnPartition,
- awsusgovPartition,
- awsisoPartition,
- awsisobPartition,
-}
-
-// AwsPartition returns the Resolver for AWS Standard.
-func AwsPartition() Partition {
- return awsPartition.Partition()
-}
-
-var awsPartition = partition{
- ID: "aws",
- Name: "AWS Standard",
- DNSSuffix: "amazonaws.com",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- DNSSuffix: "api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "af-south-1": region{
- Description: "Africa (Cape Town)",
- },
- "ap-east-1": region{
- Description: "Asia Pacific (Hong Kong)",
- },
- "ap-northeast-1": region{
- Description: "Asia Pacific (Tokyo)",
- },
- "ap-northeast-2": region{
- Description: "Asia Pacific (Seoul)",
- },
- "ap-northeast-3": region{
- Description: "Asia Pacific (Osaka)",
- },
- "ap-south-1": region{
- Description: "Asia Pacific (Mumbai)",
- },
- "ap-southeast-1": region{
- Description: "Asia Pacific (Singapore)",
- },
- "ap-southeast-2": region{
- Description: "Asia Pacific (Sydney)",
- },
- "ca-central-1": region{
- Description: "Canada (Central)",
- },
- "eu-central-1": region{
- Description: "Europe (Frankfurt)",
- },
- "eu-north-1": region{
- Description: "Europe (Stockholm)",
- },
- "eu-south-1": region{
- Description: "Europe (Milan)",
- },
- "eu-west-1": region{
- Description: "Europe (Ireland)",
- },
- "eu-west-2": region{
- Description: "Europe (London)",
- },
- "eu-west-3": region{
- Description: "Europe (Paris)",
- },
- "me-south-1": region{
- Description: "Middle East (Bahrain)",
- },
- "sa-east-1": region{
- Description: "South America (Sao Paulo)",
- },
- "us-east-1": region{
- Description: "US East (N. Virginia)",
- },
- "us-east-2": region{
- Description: "US East (Ohio)",
- },
- "us-west-1": region{
- Description: "US West (N. California)",
- },
- "us-west-2": region{
- Description: "US West (Oregon)",
- },
- },
- Services: services{
- "a4b": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "access-analyzer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "access-analyzer-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "access-analyzer-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "account": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "account.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "acm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "acm-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "acm-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "acm-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "acm-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "acm-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "acm-pca": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "acm-pca-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "acm-pca-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "acm-pca-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "acm-pca-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "acm-pca-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "airflow": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "amplify": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "amplifybackend": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "api.detective": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "api.ecr": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{
- Hostname: "api.ecr.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "api.ecr.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "api.ecr.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "api.ecr.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "api.ecr.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "api.ecr.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "api.ecr.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "api.ecr.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "api.ecr.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "dkr-us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "api.ecr.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "api.ecr.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{
- Hostname: "api.ecr.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "api.ecr.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "api.ecr.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "api.ecr.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "fips-dkr-us-east-1",
- }: endpoint{
- Hostname: "ecr-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-east-2",
- }: endpoint{
- Hostname: "ecr-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-west-1",
- }: endpoint{
- Hostname: "ecr-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-west-2",
- }: endpoint{
- Hostname: "ecr-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ecr-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ecr-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ecr-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ecr-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "api.ecr.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "api.ecr.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "api.ecr.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "api.ecr.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "api.ecr.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "api.ecr.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "api.elastic-inference": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "api.elastic-inference.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "api.elastic-inference.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "api.elastic-inference.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "api.elastic-inference.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "api.elastic-inference.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "api.elastic-inference.us-west-2.amazonaws.com",
- },
- },
- },
- "api.fleethub.iot": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "api.iotwireless": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "api.iotwireless.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "api.iotwireless.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "api.iotwireless.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "api.mediatailor": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "api.pricing": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "pricing",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "api.sagemaker": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "apigateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "app-integrations": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "appconfigdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "appflow": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "applicationinsights": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "appmesh": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "apprunner": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "appstream2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Service: "appstream",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "appstream2-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "appstream2-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "appsync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "aps": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "athena": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "athena-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "athena-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "athena-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "athena-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "auditmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "autoscaling-plans": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "backup": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "batch": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fips.batch.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fips.batch.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "fips.batch.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fips.batch.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.batch.us-west-2.amazonaws.com",
- },
- },
- },
- "braket": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "budgets": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "budgets.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "ce": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "ce.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "chime": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "chime.us-east-1.amazonaws.com",
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "cloud9": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cloudcontrolapi": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "clouddirectory": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudformation-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "cloudformation-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudformation-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "cloudformation-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudformation-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "cloudformation-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudformation-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "cloudformation-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "cloudfront": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "cloudfront.amazonaws.com",
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "cloudhsm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cloudhsmv2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "cloudhsm",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cloudsearch": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "cloudtrail-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "cloudtrail-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "cloudtrail-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "cloudtrail-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudtrail-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "codeartifact": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "codebuild": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codecommit": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "codecommit-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codeguru-reviewer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "codepipeline": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "codepipeline-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "codepipeline-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "codepipeline-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "codepipeline-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "codepipeline-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "codestar": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "codestar-connections": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cognito-identity": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "cognito-identity-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "cognito-identity-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "cognito-identity-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-identity-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-identity-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-identity-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "cognito-idp": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "cognito-sync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "comprehend": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "comprehend-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "comprehend-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "comprehend-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehend-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehend-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehend-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "comprehendmedical": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "compute-optimizer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "compute-optimizer.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "compute-optimizer.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "compute-optimizer.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "compute-optimizer.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "compute-optimizer.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "compute-optimizer.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "compute-optimizer.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "compute-optimizer.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "compute-optimizer.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "compute-optimizer.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "compute-optimizer.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "compute-optimizer.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "compute-optimizer.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "compute-optimizer.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "compute-optimizer.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "compute-optimizer.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "config-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "config-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "config-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "config-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "connect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "contact-lens": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "cur": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "data.jobs.iot": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "data.mediastore": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "databrew": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "dataexchange": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "datapipeline": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "datasync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "datasync-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "datasync-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "datasync-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "datasync-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "datasync-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "dax": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "devicefarm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "directconnect-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "directconnect-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "directconnect-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "directconnect-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "directconnect-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "directconnect-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "directconnect-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "directconnect-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "discovery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "dms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "dms",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms-fips",
- }: endpoint{
- Hostname: "dms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "dms-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "dms-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "dms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "dms-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "docdb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "rds.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "rds.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "rds.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "rds.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "rds.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "rds.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "rds.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "rds.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "rds.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "rds.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "rds.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "rds.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "rds.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "rds.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "drs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ds-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ds-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ds-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ds-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ds-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "local",
- }: endpoint{
- Hostname: "localhost:8000",
- Protocols: []string{"http"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "dynamodb-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ebs-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ebs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ebs-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ebs-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ebs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ebs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "ec2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "api.ec2.ap-south-1.aws",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "api.ec2.eu-west-1.aws",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ec2-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ec2-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ec2-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ec2-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ec2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "api.ec2.sa-east-1.aws",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "api.ec2.us-east-1.aws",
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "api.ec2.us-east-2.aws",
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "api.ec2.us-west-2.aws",
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ec2-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ecs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ecs-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ecs-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ecs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "eks": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.{region}.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fips.eks.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fips.eks.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "fips.eks.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fips.eks.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.eks.us-west-2.amazonaws.com",
- },
- },
- },
- "elasticache": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "elasticache-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "elasticbeanstalk": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticbeanstalk-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "elasticfilesystem": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "fips-af-south-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-3",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-south-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-central-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-north-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-south-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-3",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-me-south-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-sa-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "elasticloadbalancing": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "elasticmapreduce": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "{region}.{service}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- SSLCommonName: "{service}.{region}.{dnsSuffix}",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- SSLCommonName: "{service}.{region}.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-east-1.amazonaws.com",
- SSLCommonName: "{service}.{region}.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "elastictranscoder": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "email": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "emr-containers": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "emr-containers-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "emr-containers-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "emr-containers-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "emr-containers-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "emr-containers-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "emr-containers-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "entitlement.marketplace": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "aws-marketplace",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "es-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "es-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "es-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "es-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "es-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "events-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "events-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "events-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "events-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "events-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "finspace": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "finspace-api": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "firehose": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "firehose-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "firehose-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "firehose-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "firehose-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "fms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.af-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-southeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ap-southeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "fips-af-south-1",
- }: endpoint{
- Hostname: "fms-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-east-1",
- }: endpoint{
- Hostname: "fms-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-1",
- }: endpoint{
- Hostname: "fms-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-2",
- }: endpoint{
- Hostname: "fms-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-south-1",
- }: endpoint{
- Hostname: "fms-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-1",
- }: endpoint{
- Hostname: "fms-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-2",
- }: endpoint{
- Hostname: "fms-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "fms-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-central-1",
- }: endpoint{
- Hostname: "fms-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-south-1",
- }: endpoint{
- Hostname: "fms-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-1",
- }: endpoint{
- Hostname: "fms-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-2",
- }: endpoint{
- Hostname: "fms-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-3",
- }: endpoint{
- Hostname: "fms-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-me-south-1",
- }: endpoint{
- Hostname: "fms-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-sa-east-1",
- }: endpoint{
- Hostname: "fms-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fms-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fms-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "fms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fms-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.me-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.sa-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "forecast": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "forecast-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "forecast-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "forecast-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecast-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecast-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecast-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "forecastquery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "forecastquery-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "forecastquery-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "forecastquery-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecastquery-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecastquery-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "forecastquery-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "frauddetector": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "fsx": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "fsx-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-ca-central-1",
- }: endpoint{
- Hostname: "fsx-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-us-east-1",
- }: endpoint{
- Hostname: "fsx-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-us-east-2",
- }: endpoint{
- Hostname: "fsx-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-us-west-1",
- }: endpoint{
- Hostname: "fsx-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-us-west-2",
- }: endpoint{
- Hostname: "fsx-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fsx-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fsx-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "fsx-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fsx-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "prod-ca-central-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "gamelift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "glacier": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "glacier-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "glacier-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "glacier-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "glacier-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "glacier-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glacier-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "glue": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "glue-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "glue-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "glue-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "glue-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "grafana": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "grafana.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "grafana.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "grafana.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "grafana.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "grafana.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "grafana.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "grafana.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "grafana.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "grafana.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "grafana.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "greengrass": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "groundstation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "groundstation-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "groundstation-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "groundstation-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "groundstation-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "groundstation-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "groundstation-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "guardduty": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "guardduty-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "guardduty-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "guardduty-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "guardduty-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "health": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "health-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "health-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "healthlake": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "honeycode": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "iam.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iam-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global-fips",
- }: endpoint{
- Hostname: "iam-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iam-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam-fips",
- }: endpoint{
- Hostname: "iam-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "identity-chime": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "identity-chime-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "identity-chime-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "identitystore": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "importexport": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "importexport.amazonaws.com",
- SignatureVersions: []string{"v2", "v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- Service: "IngestionService",
- },
- },
- },
- },
- "inspector": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "inspector-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "inspector-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "inspector-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "inspector-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "iot-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "iotanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "iotevents": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "ioteventsdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "data.iotevents.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "data.iotevents.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "data.iotevents.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "data.iotevents.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "data.iotevents.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "data.iotevents.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "data.iotevents.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "data.iotevents.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "data.iotevents.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "data.iotevents.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "data.iotevents.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "iotsecuredtunneling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "iotsitewise": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "iotthingsgraph": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "iotthingsgraph",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "iotwireless": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "api.iotwireless.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "api.iotwireless.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "api.iotwireless.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "ivs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kafka": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kafkaconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kendra": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "kendra-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "kendra-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "kendra-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kendra-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kendra-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kendra-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "kinesis-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "kinesis-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "kinesis-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "kinesis-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kinesis-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kinesis-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kinesis-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kinesis-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "kinesisanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kinesisvideo": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.af-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "af-south-1-fips",
- }: endpoint{
- Hostname: "kms-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-south-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-2-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ap-southeast-3-fips",
- }: endpoint{
- Hostname: "kms-fips.ap-southeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "kms-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-north-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-south-1-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-2-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3-fips",
- }: endpoint{
- Hostname: "kms-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.me-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "me-south-1-fips",
- }: endpoint{
- Hostname: "kms-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.sa-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "sa-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "kms-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "kms-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "lakeformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "lakeformation-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "lakeformation-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "lakeformation-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "lakeformation-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "lambda-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "lambda-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "lambda-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "lambda-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "license-manager-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "license-manager-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "license-manager-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "license-manager-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "lightsail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "logs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "logs-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "logs-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "logs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "logs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "lookoutequipment": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "lookoutvision": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "machinelearning": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "macie": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "macie-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "macie-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "macie2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "macie2-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "macie2-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "macie2-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "macie2-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie2-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie2-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie2-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "macie2-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "managedblockchain": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "marketplacecommerceanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "mediaconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mediaconvert": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "mediaconvert-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "mediaconvert-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "mediaconvert-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "mediaconvert-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "mediaconvert-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mediaconvert-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "medialive": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "medialive-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "medialive-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "medialive-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "medialive-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "medialive-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "medialive-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "mediapackage": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mediapackage-vod": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mediastore": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "messaging-chime": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "messaging-chime-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "messaging-chime-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "metering.marketplace": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "aws-marketplace",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mgh": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mgn": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "migrationhub-strategy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "mobileanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "models-v2-lex": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "models.lex": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "models-fips.lex.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "models-fips.lex.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "monitoring": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "monitoring-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "monitoring-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "monitoring-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "monitoring-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "mq": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "mq-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "mq-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "mq-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "mq-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "mturk-requester": service{
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "sandbox",
- }: endpoint{
- Hostname: "mturk-requester-sandbox.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "neptune": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "rds.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "rds.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "rds.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "rds.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "rds.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "rds.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "rds.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "rds.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "rds.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "rds.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "rds.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "rds.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "rds.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "rds.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "rds.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "rds.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "rds.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "rds.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "network-firewall": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "network-firewall-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "network-firewall-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "network-firewall-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "network-firewall-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "network-firewall-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "networkmanager": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "networkmanager.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "nimble": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "oidc": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "oidc.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "oidc.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "oidc.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "oidc.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "oidc.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "oidc.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "oidc.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "oidc.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "oidc.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "oidc.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "oidc.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "oidc.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "oidc.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "oidc.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "oidc.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "opsworks": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "opsworks-cm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "organizations": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "organizations.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "organizations-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "fips-aws-global",
- }: endpoint{
- Hostname: "organizations-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "outposts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "outposts-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "outposts-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "outposts-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "outposts-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "outposts-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "outposts-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "personalize": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "pinpoint": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "mobiletargeting",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "pinpoint-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "pinpoint-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "pinpoint.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "pinpoint-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "pinpoint.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "pinpoint-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "polly": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "polly-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "polly-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "polly-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "polly-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "portal.sso": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "portal.sso.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "portal.sso.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "portal.sso.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "portal.sso.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "portal.sso.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "portal.sso.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "portal.sso.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "portal.sso.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "portal.sso.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "portal.sso.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "portal.sso.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "portal.sso.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "portal.sso.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "portal.sso.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "portal.sso.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "profile": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "projects.iot1click": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "qldb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "qldb-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "qldb-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "qldb-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "qldb-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "qldb-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "qldb-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "quicksight": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "api",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "ram": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ram-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ram-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ram-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ram-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ram-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ram-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "rds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "rds-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "rds-fips.ca-central-1",
- }: endpoint{
- Hostname: "rds-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds-fips.us-east-1",
- }: endpoint{
- Hostname: "rds-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds-fips.us-east-2",
- }: endpoint{
- Hostname: "rds-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds-fips.us-west-1",
- }: endpoint{
- Hostname: "rds-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds-fips.us-west-2",
- }: endpoint{
- Hostname: "rds-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.ca-central-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- SSLCommonName: "{service}.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-east-1.amazonaws.com",
- SSLCommonName: "{service}.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "rds-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "rds-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "rds-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "rds-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "redshift-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "redshift-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "redshift-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "redshift-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "redshift-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "redshift-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "rekognition": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "rekognition-fips.ca-central-1",
- }: endpoint{
- Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition-fips.us-east-1",
- }: endpoint{
- Hostname: "rekognition-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition-fips.us-east-2",
- }: endpoint{
- Hostname: "rekognition-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition-fips.us-west-1",
- }: endpoint{
- Hostname: "rekognition-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition-fips.us-west-2",
- }: endpoint{
- Hostname: "rekognition-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.ca-central-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "resource-groups": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "resource-groups-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "resource-groups-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "resource-groups-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "resource-groups-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "robomaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "route53.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "route53-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "fips-aws-global",
- }: endpoint{
- Hostname: "route53-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "route53-recovery-control-config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "route53-recovery-control-config.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "route53domains": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- },
- },
- "route53resolver": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "runtime-v2-lex": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "runtime.lex": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "runtime-fips.lex.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "runtime-fips.lex.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "runtime.sagemaker": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "runtime-fips.sagemaker.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "s3": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "af-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.af-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "s3.ap-northeast-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-northeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-northeast-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-northeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "s3.ap-southeast-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-southeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-southeast-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "s3.ap-southeast-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "ap-southeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ap-southeast-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "s3.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-north-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "s3.eu-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "eu-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "s3-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "s3-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "s3-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "s3-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "s3-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.me-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "s3-external-1",
- }: endpoint{
- Hostname: "s3-external-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "s3.sa-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "sa-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.sa-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "s3.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "s3.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "s3.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-fips.dualstack.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- },
- },
- "s3-control": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "s3-control.ap-northeast-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-northeast-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "s3-control.ap-northeast-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-northeast-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "s3-control.ap-northeast-3.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-northeast-3.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "s3-control.ap-south-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-south-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "s3-control.ap-southeast-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-southeast-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "s3-control.ap-southeast-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ap-southeast-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "s3-control.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.ca-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "s3-control.eu-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-central-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "s3-control.eu-north-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-north-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "s3-control.eu-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "s3-control.eu-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "s3-control.eu-west-3.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.eu-west-3.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "s3-control.sa-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.sa-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "s3-control.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "s3-control.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-east-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "s3-control.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "s3-control.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-west-2.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "savingsplans": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "savingsplans.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "schemas": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "sdb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"v2"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "sdb.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "secretsmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "securityhub": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "securityhub-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "securityhub-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "securityhub-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "securityhub-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "serverlessrepo": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Protocols: []string{"https"},
- },
- },
- },
- "servicecatalog": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "servicecatalog-appregistry": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "servicediscovery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "servicediscovery",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "servicediscovery",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "servicediscovery-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "servicequotas": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "session.qldb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "session.qldb-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "session.qldb-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "session.qldb-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "session.qldb-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "session.qldb-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "session.qldb-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "shield": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "shield.us-east-1.amazonaws.com",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "shield.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "shield-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "fips-aws-global",
- }: endpoint{
- Hostname: "shield-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "sms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "sms-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "sms-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "sms-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "sms-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-3.amazonaws.com",
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-south-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-southeast-1.amazonaws.com",
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ap-southeast-2.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.eu-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.eu-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.eu-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.eu-west-3.amazonaws.com",
- },
- endpointKey{
- Region: "fips-ap-northeast-1",
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-2",
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-3",
- }: endpoint{
- Hostname: "snowball-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-south-1",
- }: endpoint{
- Hostname: "snowball-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-1",
- }: endpoint{
- Hostname: "snowball-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-2",
- }: endpoint{
- Hostname: "snowball-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "snowball-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-central-1",
- }: endpoint{
- Hostname: "snowball-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-1",
- }: endpoint{
- Hostname: "snowball-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-2",
- }: endpoint{
- Hostname: "snowball-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-3",
- }: endpoint{
- Hostname: "snowball-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-sa-east-1",
- }: endpoint{
- Hostname: "snowball-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "snowball-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "snowball-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "snowball-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "snowball-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.sa-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "sns": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "sns-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "sns-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "sns-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "sns-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sns-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "sqs": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "{region}.queue.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "sqs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "sqs-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "sqs-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "sqs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- SSLCommonName: "queue.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sqs-fips.us-east-1.amazonaws.com",
- SSLCommonName: "queue.{dnsSuffix}",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sqs-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sqs-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sqs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "ssm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "ssm-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "ssm-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "ssm-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "ssm-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "ssm-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "ssm-incidents": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "states-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "states-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "states-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "states-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "storagegateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "ca-central-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "storagegateway-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "local",
- }: endpoint{
- Hostname: "localhost:8000",
- Protocols: []string{"http"},
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "sts": service{
- PartitionEndpoint: "aws-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "sts.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "sts-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "sts-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1-fips",
- }: endpoint{
- Hostname: "sts-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "sts-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "support": service{
- PartitionEndpoint: "aws-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "support.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "swf-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "swf-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "swf-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "swf-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "swf-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "swf-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "swf-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "swf-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "tagging": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "textract": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "textract-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "textract-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "textract-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "textract-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "textract-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "transcribe": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "fips.transcribe.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "fips.transcribe.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "fips.transcribe.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "fips.transcribe.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "fips.transcribe.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-west-2.amazonaws.com",
- },
- },
- },
- "transcribestreaming": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "transcribestreaming-ca-central-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-fips-ca-central-1",
- }: endpoint{
- Hostname: "transcribestreaming-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-fips-us-east-1",
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-fips-us-east-2",
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-fips-us-west-2",
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-east-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-west-2",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "transcribestreaming-us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transcribestreaming-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "transfer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.ca-central-1.amazonaws.com",
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "transfer-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "transfer-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "transfer-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "transfer-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "transfer-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "translate": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "translate-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-1-fips",
- }: endpoint{
- Hostname: "translate-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "translate-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2-fips",
- }: endpoint{
- Hostname: "translate-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "translate-fips.us-west-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2-fips",
- }: endpoint{
- Hostname: "translate-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "voiceid": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "waf": service{
- PartitionEndpoint: "aws-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "aws",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "aws-fips",
- }: endpoint{
- Hostname: "waf-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "aws-global",
- }: endpoint{
- Hostname: "waf.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "aws-global-fips",
- }: endpoint{
- Hostname: "waf-fips.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "waf-regional": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{
- Hostname: "waf-regional.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- },
- endpointKey{
- Region: "af-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- },
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{
- Hostname: "waf-regional.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{
- Hostname: "waf-regional.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{
- Hostname: "waf-regional.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{
- Hostname: "waf-regional.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-northeast-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{
- Hostname: "waf-regional.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{
- Hostname: "waf-regional.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{
- Hostname: "waf-regional.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ap-southeast-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{
- Hostname: "waf-regional.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "ca-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{
- Hostname: "waf-regional.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-central-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{
- Hostname: "waf-regional.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{
- Hostname: "waf-regional.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{
- Hostname: "waf-regional.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{
- Hostname: "waf-regional.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{
- Hostname: "waf-regional.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "eu-west-3",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- },
- endpointKey{
- Region: "fips-af-south-1",
- }: endpoint{
- Hostname: "waf-regional-fips.af-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "af-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-east-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-2",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-northeast-3",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-northeast-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-south-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ap-southeast-2",
- }: endpoint{
- Hostname: "waf-regional-fips.ap-southeast-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ap-southeast-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-ca-central-1",
- }: endpoint{
- Hostname: "waf-regional-fips.ca-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "ca-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-central-1",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-central-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-central-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-north-1",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-north-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-south-1",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-1",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-2",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-eu-west-3",
- }: endpoint{
- Hostname: "waf-regional-fips.eu-west-3.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "eu-west-3",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-me-south-1",
- }: endpoint{
- Hostname: "waf-regional-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-sa-east-1",
- }: endpoint{
- Hostname: "waf-regional-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "waf-regional-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "waf-regional-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "waf-regional-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "waf-regional-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{
- Hostname: "waf-regional.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "me-south-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.me-south-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "me-south-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{
- Hostname: "waf-regional.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "sa-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.sa-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "sa-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{
- Hostname: "waf-regional.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{
- Hostname: "waf-regional.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{
- Hostname: "waf-regional.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{
- Hostname: "waf-regional.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- },
- },
- },
- "wisdom": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "workdocs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "workdocs-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "workdocs-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workdocs-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workdocs-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "workmail": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- },
- },
- "workspaces": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "workspaces-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "workspaces-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workspaces-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workspaces-fips.us-west-2.amazonaws.com",
- },
- },
- },
- "xray": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "af-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-east-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ap-northeast-3",
- }: endpoint{},
- endpointKey{
- Region: "ap-south-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-1",
- }: endpoint{},
- endpointKey{
- Region: "ap-southeast-2",
- }: endpoint{},
- endpointKey{
- Region: "ca-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-central-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-north-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-south-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-1",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-2",
- }: endpoint{},
- endpointKey{
- Region: "eu-west-3",
- }: endpoint{},
- endpointKey{
- Region: "fips-us-east-1",
- }: endpoint{
- Hostname: "xray-fips.us-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-east-2",
- }: endpoint{
- Hostname: "xray-fips.us-east-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-east-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-1",
- }: endpoint{
- Hostname: "xray-fips.us-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-west-2",
- }: endpoint{
- Hostname: "xray-fips.us-west-2.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-west-2",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "me-south-1",
- }: endpoint{},
- endpointKey{
- Region: "sa-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-east-2",
- }: endpoint{},
- endpointKey{
- Region: "us-east-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-east-2.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-west-2",
- }: endpoint{},
- endpointKey{
- Region: "us-west-2",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-west-2.amazonaws.com",
- },
- },
- },
- },
-}
-
-// AwsCnPartition returns the Resolver for AWS China.
-func AwsCnPartition() Partition {
- return awscnPartition.Partition()
-}
-
-var awscnPartition = partition{
- ID: "aws-cn",
- Name: "AWS China",
- DNSSuffix: "amazonaws.com.cn",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^cn\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- DNSSuffix: "api.amazonwebservices.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "api.amazonwebservices.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "cn-north-1": region{
- Description: "China (Beijing)",
- },
- "cn-northwest-1": region{
- Description: "China (Ningxia)",
- },
- },
- Services: services{
- "access-analyzer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "account": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "account.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "acm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "api.ecr": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "api.ecr.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "api.ecr.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "api.sagemaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "apigateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "appconfigdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "applicationinsights": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "appmesh": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "appsync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "athena": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "autoscaling-plans": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "backup": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "batch": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "budgets": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "budgets.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "ce": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "ce.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "cloudfront": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "cloudfront.cn-northwest-1.amazonaws.com.cn",
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "codebuild": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "codecommit": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "cognito-identity": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "compute-optimizer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "compute-optimizer.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "compute-optimizer.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "cur": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "data.jobs.iot": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "databrew": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "dax": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "dms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "docdb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "rds.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ec2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "eks": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "elasticache": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "elasticbeanstalk": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "elasticfilesystem": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "fips-cn-north-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-cn-northwest-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "elasticloadbalancing": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "elasticmapreduce": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "emr-containers": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "firehose": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "fms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "fsx": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "gamelift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "glacier": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "glue": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "greengrass": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "guardduty": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "health": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "iam.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- },
- },
- "iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "iotanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "iotevents": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "ioteventsdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "data.iotevents.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- },
- },
- "iotsecuredtunneling": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "iotsitewise": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "kafka": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "kinesisanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "lakeformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "mediaconvert": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "subscribe.mediaconvert.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "monitoring": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "mq": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "neptune": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "rds.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "rds.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "organizations": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "organizations.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "personalize": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- },
- },
- "polly": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ram": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "rds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "resource-groups": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-cn-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "route53.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "route53resolver": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "runtime.sagemaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "s3": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com.cn",
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.cn-north-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.cn-northwest-1.amazonaws.com.cn",
- },
- },
- },
- "s3-control": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com.cn",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "s3-control.cn-north-1.amazonaws.com.cn",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-north-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.cn-north-1.amazonaws.com.cn",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "s3-control.cn-northwest-1.amazonaws.com.cn",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.cn-northwest-1.amazonaws.com.cn",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "secretsmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "securityhub": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "serverlessrepo": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- },
- },
- "servicecatalog": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "servicediscovery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "sms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn",
- },
- endpointKey{
- Region: "fips-cn-north-1",
- }: endpoint{
- Hostname: "snowball-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-cn-northwest-1",
- }: endpoint{
- Hostname: "snowball-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "sns": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "sqs": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "{region}.queue.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "ssm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "storagegateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "sts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "support": service{
- PartitionEndpoint: "aws-cn-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-cn-global",
- }: endpoint{
- Hostname: "support.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "tagging": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "transcribe": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "cn.transcribe.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "cn.transcribe.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- },
- },
- "transcribestreaming": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "transfer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "waf-regional": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{
- Hostname: "waf-regional.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-north-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{
- Hostname: "waf-regional.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- endpointKey{
- Region: "cn-northwest-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- },
- endpointKey{
- Region: "fips-cn-north-1",
- }: endpoint{
- Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-north-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-cn-northwest-1",
- }: endpoint{
- Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn",
- CredentialScope: credentialScope{
- Region: "cn-northwest-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "workspaces": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- "xray": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "cn-north-1",
- }: endpoint{},
- endpointKey{
- Region: "cn-northwest-1",
- }: endpoint{},
- },
- },
- },
-}
-
-// AwsUsGovPartition returns the Resolver for AWS GovCloud (US).
-func AwsUsGovPartition() Partition {
- return awsusgovPartition.Partition()
-}
-
-var awsusgovPartition = partition{
- ID: "aws-us-gov",
- Name: "AWS GovCloud (US)",
- DNSSuffix: "amazonaws.com",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^us\\-gov\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- DNSSuffix: "api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "api.aws",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "us-gov-east-1": region{
- Description: "AWS GovCloud (US-East)",
- },
- "us-gov-west-1": region{
- Description: "AWS GovCloud (US-West)",
- },
- },
- Services: services{
- "access-analyzer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "access-analyzer.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "access-analyzer.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "acm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "acm.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "acm.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "acm-pca": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "acm-pca.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "acm-pca.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "acm-pca.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "api.detective": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "api.ecr": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dkr-us-gov-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dkr-us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-gov-east-1",
- }: endpoint{
- Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-dkr-us-gov-west-1",
- }: endpoint{
- Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "api.ecr.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "api.ecr.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecr-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "api.sagemaker": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "api-fips.sagemaker.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1-fips-secondary",
- }: endpoint{
- Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1-secondary",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1-secondary",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.sagemaker.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "apigateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "appconfigdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "autoscaling.{region}.amazonaws.com",
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "application-autoscaling",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- },
- "applicationinsights": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "applicationinsights.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "applicationinsights.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "appstream2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Service: "appstream",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "appstream2-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "athena": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "athena-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "athena-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "athena-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "autoscaling": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- },
- "autoscaling-plans": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- },
- "backup": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "batch": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "batch.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "batch.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "batch.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "batch.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "batch.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "cloudcontrolapi": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cloudcontrolapi-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "clouddirectory": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "cloudformation.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "cloudformation.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "cloudhsm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "cloudhsmv2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "cloudhsm",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "cloudtrail.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "cloudtrail.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "codebuild": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "codebuild-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codecommit": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "codecommit-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "codedeploy-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "codepipeline": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "codepipeline-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "cognito-identity": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-identity-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "cognito-idp": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "cognito-idp-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "comprehend": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehend-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "comprehendmedical": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "comprehendmedical-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "config": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "config.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "config.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "config.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "connect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "data.jobs.iot": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "data.jobs.iot-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "databrew": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "datasync": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "datasync-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "datasync-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "datasync-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "directconnect.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "directconnect.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "dms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dms",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms-fips",
- }: endpoint{
- Hostname: "dms.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "dms.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "dms.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "docdb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "ds-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "ds-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ds-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "dynamodb.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "dynamodb.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "ec2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "ec2.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "ec2.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "ecs-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "ecs-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ecs-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "eks": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "eks.{region}.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "eks.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "eks.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "eks.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "eks.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "elasticache": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "elasticache.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticache.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "elasticache.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "elasticbeanstalk": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "elasticbeanstalk.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "elasticbeanstalk.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "elasticfilesystem": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "elasticloadbalancing": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticloadbalancing.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- },
- },
- "elasticmapreduce": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticmapreduce.us-gov-west-1.amazonaws.com",
- Protocols: []string{"https"},
- },
- },
- },
- "email": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "email-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "email-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "es-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "es-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "es-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "es-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "events.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "events.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "firehose": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "firehose-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "firehose-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "firehose-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "fms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "fms-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "fms-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fms-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "fsx": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-prod-us-gov-east-1",
- }: endpoint{
- Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-prod-us-gov-west-1",
- }: endpoint{
- Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-gov-east-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "prod-us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fsx-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "glacier": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "glacier.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "glacier.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "glue": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "glue-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "glue-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "glue-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "greengrass": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dataplane-us-gov-east-1",
- }: endpoint{
- Hostname: "greengrass-ats.iot.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "dataplane-us-gov-west-1",
- }: endpoint{
- Hostname: "greengrass-ats.iot.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "greengrass-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "greengrass.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "greengrass-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "greengrass.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "guardduty": service{
- IsRegionalized: boxedTrue,
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "guardduty.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "guardduty.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "guardduty.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "health": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "health-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "health-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-us-gov-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "aws-us-gov-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "aws-us-gov-global-fips",
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam-govcloud",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam-govcloud",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "iam-govcloud-fips",
- }: endpoint{
- Hostname: "iam.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "identitystore": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "identitystore.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "identitystore.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "identitystore.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "inspector": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "inspector-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "inspector-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "inspector-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "iot": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Service: "execute-api",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "iot-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "iotevents": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "ioteventsdata": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "data.iotevents.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "iotsecuredtunneling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "iotsitewise": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "kafka": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "kendra": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "kendra-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kendra-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "kinesis.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "kinesis.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "kinesisanalytics": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ProdFips",
- }: endpoint{
- Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "lakeformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lakeformation-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "lambda-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "license-manager-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "logs.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "logs.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "mediaconvert": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "mediaconvert.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "metering.marketplace": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "aws-marketplace",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "models.lex": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "monitoring": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "monitoring.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "monitoring.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "monitoring.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "mq": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "mq-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "mq-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "mq-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "neptune": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "rds.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "network-firewall": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "network-firewall-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "networkmanager": service{
- PartitionEndpoint: "aws-us-gov-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "networkmanager.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "oidc": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "oidc.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "organizations": service{
- PartitionEndpoint: "aws-us-gov-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "organizations.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "aws-us-gov-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "organizations.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "fips-aws-us-gov-global",
- }: endpoint{
- Hostname: "organizations.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "outposts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "outposts.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "outposts.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "pinpoint": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "mobiletargeting",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "pinpoint.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "pinpoint-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "polly": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "polly-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "polly-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "portal.sso": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "portal.sso.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "quicksight": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "api",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "ram": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "ram.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "ram.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "rds": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "rds.us-gov-east-1",
- }: endpoint{
- Hostname: "rds.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rds.us-gov-west-1",
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "rds.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "rds.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "redshift.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "redshift.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "rekognition": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "rekognition-fips.us-gov-west-1",
- }: endpoint{
- Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "rekognition.us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "rekognition-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "resource-groups": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "resource-groups.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "resource-groups.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "resource-groups.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-us-gov-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "route53.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "aws-us-gov-global",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "route53.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "fips-aws-us-gov-global",
- }: endpoint{
- Hostname: "route53.us-gov.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "route53resolver": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "runtime.lex": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "lex",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "runtime.sagemaker": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime.sagemaker.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "s3": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SignatureVersions: []string{"s3", "s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- SignatureVersions: []string{"s3", "s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "s3.us-gov-east-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-gov-east-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-gov-east-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "s3.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3.dualstack.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-fips.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- },
- },
- },
- "s3-control": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "{service}.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- defaultKey{
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "{service}-fips.dualstack.{region}.{dnsSuffix}",
- DNSSuffix: "amazonaws.com",
- Protocols: []string{"https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "s3-control.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-gov-east-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "s3-control.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: dualStackVariant,
- }: endpoint{
- Hostname: "s3-control.dualstack.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant | dualStackVariant,
- }: endpoint{
- Hostname: "s3-control-fips.dualstack.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "s3-control-fips.us-gov-west-1.amazonaws.com",
- SignatureVersions: []string{"s3v4"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "secretsmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "secretsmanager-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "securityhub": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "securityhub-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "serverlessrepo": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "serverlessrepo.us-gov-east-1.amazonaws.com",
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "serverlessrepo.us-gov-west-1.amazonaws.com",
- Protocols: []string{"https"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "servicecatalog": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "servicecatalog-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "servicecatalog-appregistry": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "servicecatalog-appregistry.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "servicecatalog-appregistry.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicecatalog-appregistry.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "servicediscovery": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "servicediscovery",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "servicediscovery",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "servicediscovery-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "servicediscovery-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "servicequotas": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicequotas.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "servicequotas.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "servicequotas.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicequotas.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "servicequotas.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "sms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "sms-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "sms-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sms-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "snowball-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "snowball-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "snowball-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "sns": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "sns.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "sns.us-gov-west-1.amazonaws.com",
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "sqs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "sqs.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "sqs.us-gov-west-1.amazonaws.com",
- SSLCommonName: "{region}.queue.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "ssm": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "ssm.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "ssm.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "ssm.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "states-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "states.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "states.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "storagegateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "storagegateway-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "streams.dynamodb.{region}.{dnsSuffix}",
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "streams.dynamodb.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "streams.dynamodb.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "sts": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-east-1-fips",
- }: endpoint{
- Hostname: "sts.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "sts.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "sts.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "support": service{
- PartitionEndpoint: "aws-us-gov-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-us-gov-global",
- }: endpoint{
- Hostname: "support.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "support.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "support.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "swf.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "swf.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "tagging": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- },
- },
- "textract": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "textract-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "textract-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "textract-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "transcribe": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "fips.transcribe.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "transfer": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "transfer-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "transfer-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "transfer-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "translate": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "translate-fips.us-gov-west-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1-fips",
- }: endpoint{
- Hostname: "translate-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "waf-regional": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{
- Hostname: "waf-regional.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{
- Hostname: "waf-regional.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- },
- },
- },
- "workspaces": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "workspaces-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- "xray": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-gov-east-1",
- }: endpoint{
- Hostname: "xray-fips.us-gov-east-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "fips-us-gov-west-1",
- }: endpoint{
- Hostname: "xray-fips.us-gov-west-1.amazonaws.com",
- CredentialScope: credentialScope{
- Region: "us-gov-west-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-gov-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-gov-east-1.amazonaws.com",
- },
- endpointKey{
- Region: "us-gov-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-gov-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "xray-fips.us-gov-west-1.amazonaws.com",
- },
- },
- },
- },
-}
-
-// AwsIsoPartition returns the Resolver for AWS ISO (US).
-func AwsIsoPartition() Partition {
- return awsisoPartition.Partition()
-}
-
-var awsisoPartition = partition{
- ID: "aws-iso",
- Name: "AWS ISO (US)",
- DNSSuffix: "c2s.ic.gov",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^us\\-iso\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "c2s.ic.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "us-iso-east-1": region{
- Description: "US ISO East",
- },
- "us-iso-west-1": region{
- Description: "US ISO WEST",
- },
- },
- Services: services{
- "api.ecr": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Hostname: "api.ecr.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{
- Hostname: "api.ecr.us-iso-west-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-west-1",
- },
- },
- },
- },
- "api.sagemaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "apigateway": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "autoscaling": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "comprehend": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "datapipeline": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "dms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dms",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms-fips",
- }: endpoint{
- Hostname: "dms.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-iso-east-1.c2s.ic.gov",
- },
- endpointKey{
- Region: "us-iso-east-1-fips",
- }: endpoint{
- Hostname: "dms.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "dynamodb": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "ec2": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "elasticache": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "elasticfilesystem": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "fips-us-iso-east-1",
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov",
- },
- },
- },
- "elasticloadbalancing": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "elasticmapreduce": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "firehose": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "glacier": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "health": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-iso-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-global",
- }: endpoint{
- Hostname: "iam.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- },
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ProdFips",
- }: endpoint{
- Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
- },
- endpointKey{
- Region: "us-iso-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
- },
- endpointKey{
- Region: "us-iso-west-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-iso-west-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-west-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "medialive": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "mediapackage": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "monitoring": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "outposts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "ram": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "rds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-iso-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-global",
- }: endpoint{
- Hostname: "route53.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- },
- },
- },
- "route53resolver": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "runtime.sagemaker": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "s3": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "secretsmanager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "sns": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "sqs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{
- Protocols: []string{"http", "https"},
- },
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "ssm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "sts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "support": service{
- PartitionEndpoint: "aws-iso-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-global",
- }: endpoint{
- Hostname: "support.us-iso-east-1.c2s.ic.gov",
- CredentialScope: credentialScope{
- Region: "us-iso-east-1",
- },
- },
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-iso-west-1",
- }: endpoint{},
- },
- },
- "transcribe": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "transcribestreaming": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "translate": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- "workspaces": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-iso-east-1",
- }: endpoint{},
- },
- },
- },
-}
-
-// AwsIsoBPartition returns the Resolver for AWS ISOB (US).
-func AwsIsoBPartition() Partition {
- return awsisobPartition.Partition()
-}
-
-var awsisobPartition = partition{
- ID: "aws-iso-b",
- Name: "AWS ISOB (US)",
- DNSSuffix: "sc2s.sgov.gov",
- RegionRegex: regionRegex{
- Regexp: func() *regexp.Regexp {
- reg, _ := regexp.Compile("^us\\-isob\\-\\w+\\-\\d+$")
- return reg
- }(),
- },
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Hostname: "{service}.{region}.{dnsSuffix}",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "{service}-fips.{region}.{dnsSuffix}",
- DNSSuffix: "sc2s.sgov.gov",
- Protocols: []string{"https"},
- SignatureVersions: []string{"v4"},
- },
- },
- Regions: regions{
- "us-isob-east-1": region{
- Description: "US ISOB East (Ohio)",
- },
- },
- Services: services{
- "api.ecr": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{
- Hostname: "api.ecr.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- },
- },
- },
- "application-autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "autoscaling": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "cloudformation": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "cloudtrail": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "codedeploy": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "config": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "directconnect": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "dms": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{},
- defaultKey{
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.{region}.{dnsSuffix}",
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "dms",
- }: endpoint{
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "dms-fips",
- }: endpoint{
- Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-isob-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
- },
- endpointKey{
- Region: "us-isob-east-1-fips",
- }: endpoint{
- Hostname: "dms.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "ds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "ebs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "ec2": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "ecs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "elasticache": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "elasticloadbalancing": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{
- Protocols: []string{"https"},
- },
- },
- },
- "elasticmapreduce": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "es": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "events": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "glacier": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "health": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "iam": service{
- PartitionEndpoint: "aws-iso-b-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-b-global",
- }: endpoint{
- Hostname: "iam.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- },
- },
- },
- "kinesis": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "kms": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "ProdFips",
- }: endpoint{
- Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- endpointKey{
- Region: "us-isob-east-1",
- Variant: fipsVariant,
- }: endpoint{
- Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
- },
- endpointKey{
- Region: "us-isob-east-1-fips",
- }: endpoint{
- Hostname: "kms-fips.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- Deprecated: boxedTrue,
- },
- },
- },
- "lambda": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "license-manager": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "logs": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "monitoring": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "rds": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "redshift": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "route53": service{
- PartitionEndpoint: "aws-iso-b-global",
- IsRegionalized: boxedFalse,
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-b-global",
- }: endpoint{
- Hostname: "route53.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- },
- },
- },
- "s3": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- SignatureVersions: []string{"s3v4"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "snowball": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "sns": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "sqs": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- SSLCommonName: "{region}.queue.{dnsSuffix}",
- Protocols: []string{"http", "https"},
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "ssm": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "states": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "streams.dynamodb": service{
- Defaults: endpointDefaults{
- defaultKey{}: endpoint{
- Protocols: []string{"http", "https"},
- CredentialScope: credentialScope{
- Service: "dynamodb",
- },
- },
- },
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "sts": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "support": service{
- PartitionEndpoint: "aws-iso-b-global",
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "aws-iso-b-global",
- }: endpoint{
- Hostname: "support.us-isob-east-1.sc2s.sgov.gov",
- CredentialScope: credentialScope{
- Region: "us-isob-east-1",
- },
- },
- },
- },
- "swf": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- "tagging": service{
- Endpoints: serviceEndpoints{
- endpointKey{
- Region: "us-isob-east-1",
- }: endpoint{},
- },
- },
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go
deleted file mode 100644
index ca8fc828e..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/dep_service_ids.go
+++ /dev/null
@@ -1,141 +0,0 @@
-package endpoints
-
-// Service identifiers
-//
-// Deprecated: Use client package's EndpointsID value instead of these
-// ServiceIDs. These IDs are not maintained, and are out of date.
-const (
- A4bServiceID = "a4b" // A4b.
- AcmServiceID = "acm" // Acm.
- AcmPcaServiceID = "acm-pca" // AcmPca.
- ApiMediatailorServiceID = "api.mediatailor" // ApiMediatailor.
- ApiPricingServiceID = "api.pricing" // ApiPricing.
- ApiSagemakerServiceID = "api.sagemaker" // ApiSagemaker.
- ApigatewayServiceID = "apigateway" // Apigateway.
- ApplicationAutoscalingServiceID = "application-autoscaling" // ApplicationAutoscaling.
- Appstream2ServiceID = "appstream2" // Appstream2.
- AppsyncServiceID = "appsync" // Appsync.
- AthenaServiceID = "athena" // Athena.
- AutoscalingServiceID = "autoscaling" // Autoscaling.
- AutoscalingPlansServiceID = "autoscaling-plans" // AutoscalingPlans.
- BatchServiceID = "batch" // Batch.
- BudgetsServiceID = "budgets" // Budgets.
- CeServiceID = "ce" // Ce.
- ChimeServiceID = "chime" // Chime.
- Cloud9ServiceID = "cloud9" // Cloud9.
- ClouddirectoryServiceID = "clouddirectory" // Clouddirectory.
- CloudformationServiceID = "cloudformation" // Cloudformation.
- CloudfrontServiceID = "cloudfront" // Cloudfront.
- CloudhsmServiceID = "cloudhsm" // Cloudhsm.
- Cloudhsmv2ServiceID = "cloudhsmv2" // Cloudhsmv2.
- CloudsearchServiceID = "cloudsearch" // Cloudsearch.
- CloudtrailServiceID = "cloudtrail" // Cloudtrail.
- CodebuildServiceID = "codebuild" // Codebuild.
- CodecommitServiceID = "codecommit" // Codecommit.
- CodedeployServiceID = "codedeploy" // Codedeploy.
- CodepipelineServiceID = "codepipeline" // Codepipeline.
- CodestarServiceID = "codestar" // Codestar.
- CognitoIdentityServiceID = "cognito-identity" // CognitoIdentity.
- CognitoIdpServiceID = "cognito-idp" // CognitoIdp.
- CognitoSyncServiceID = "cognito-sync" // CognitoSync.
- ComprehendServiceID = "comprehend" // Comprehend.
- ConfigServiceID = "config" // Config.
- CurServiceID = "cur" // Cur.
- DatapipelineServiceID = "datapipeline" // Datapipeline.
- DaxServiceID = "dax" // Dax.
- DevicefarmServiceID = "devicefarm" // Devicefarm.
- DirectconnectServiceID = "directconnect" // Directconnect.
- DiscoveryServiceID = "discovery" // Discovery.
- DmsServiceID = "dms" // Dms.
- DsServiceID = "ds" // Ds.
- DynamodbServiceID = "dynamodb" // Dynamodb.
- Ec2ServiceID = "ec2" // Ec2.
- Ec2metadataServiceID = "ec2metadata" // Ec2metadata.
- EcrServiceID = "ecr" // Ecr.
- EcsServiceID = "ecs" // Ecs.
- ElasticacheServiceID = "elasticache" // Elasticache.
- ElasticbeanstalkServiceID = "elasticbeanstalk" // Elasticbeanstalk.
- ElasticfilesystemServiceID = "elasticfilesystem" // Elasticfilesystem.
- ElasticloadbalancingServiceID = "elasticloadbalancing" // Elasticloadbalancing.
- ElasticmapreduceServiceID = "elasticmapreduce" // Elasticmapreduce.
- ElastictranscoderServiceID = "elastictranscoder" // Elastictranscoder.
- EmailServiceID = "email" // Email.
- EntitlementMarketplaceServiceID = "entitlement.marketplace" // EntitlementMarketplace.
- EsServiceID = "es" // Es.
- EventsServiceID = "events" // Events.
- FirehoseServiceID = "firehose" // Firehose.
- FmsServiceID = "fms" // Fms.
- GameliftServiceID = "gamelift" // Gamelift.
- GlacierServiceID = "glacier" // Glacier.
- GlueServiceID = "glue" // Glue.
- GreengrassServiceID = "greengrass" // Greengrass.
- GuarddutyServiceID = "guardduty" // Guardduty.
- HealthServiceID = "health" // Health.
- IamServiceID = "iam" // Iam.
- ImportexportServiceID = "importexport" // Importexport.
- InspectorServiceID = "inspector" // Inspector.
- IotServiceID = "iot" // Iot.
- IotanalyticsServiceID = "iotanalytics" // Iotanalytics.
- KinesisServiceID = "kinesis" // Kinesis.
- KinesisanalyticsServiceID = "kinesisanalytics" // Kinesisanalytics.
- KinesisvideoServiceID = "kinesisvideo" // Kinesisvideo.
- KmsServiceID = "kms" // Kms.
- LambdaServiceID = "lambda" // Lambda.
- LightsailServiceID = "lightsail" // Lightsail.
- LogsServiceID = "logs" // Logs.
- MachinelearningServiceID = "machinelearning" // Machinelearning.
- MarketplacecommerceanalyticsServiceID = "marketplacecommerceanalytics" // Marketplacecommerceanalytics.
- MediaconvertServiceID = "mediaconvert" // Mediaconvert.
- MedialiveServiceID = "medialive" // Medialive.
- MediapackageServiceID = "mediapackage" // Mediapackage.
- MediastoreServiceID = "mediastore" // Mediastore.
- MeteringMarketplaceServiceID = "metering.marketplace" // MeteringMarketplace.
- MghServiceID = "mgh" // Mgh.
- MobileanalyticsServiceID = "mobileanalytics" // Mobileanalytics.
- ModelsLexServiceID = "models.lex" // ModelsLex.
- MonitoringServiceID = "monitoring" // Monitoring.
- MturkRequesterServiceID = "mturk-requester" // MturkRequester.
- NeptuneServiceID = "neptune" // Neptune.
- OpsworksServiceID = "opsworks" // Opsworks.
- OpsworksCmServiceID = "opsworks-cm" // OpsworksCm.
- OrganizationsServiceID = "organizations" // Organizations.
- PinpointServiceID = "pinpoint" // Pinpoint.
- PollyServiceID = "polly" // Polly.
- RdsServiceID = "rds" // Rds.
- RedshiftServiceID = "redshift" // Redshift.
- RekognitionServiceID = "rekognition" // Rekognition.
- ResourceGroupsServiceID = "resource-groups" // ResourceGroups.
- Route53ServiceID = "route53" // Route53.
- Route53domainsServiceID = "route53domains" // Route53domains.
- RuntimeLexServiceID = "runtime.lex" // RuntimeLex.
- RuntimeSagemakerServiceID = "runtime.sagemaker" // RuntimeSagemaker.
- S3ServiceID = "s3" // S3.
- S3ControlServiceID = "s3-control" // S3Control.
- SagemakerServiceID = "api.sagemaker" // Sagemaker.
- SdbServiceID = "sdb" // Sdb.
- SecretsmanagerServiceID = "secretsmanager" // Secretsmanager.
- ServerlessrepoServiceID = "serverlessrepo" // Serverlessrepo.
- ServicecatalogServiceID = "servicecatalog" // Servicecatalog.
- ServicediscoveryServiceID = "servicediscovery" // Servicediscovery.
- ShieldServiceID = "shield" // Shield.
- SmsServiceID = "sms" // Sms.
- SnowballServiceID = "snowball" // Snowball.
- SnsServiceID = "sns" // Sns.
- SqsServiceID = "sqs" // Sqs.
- SsmServiceID = "ssm" // Ssm.
- StatesServiceID = "states" // States.
- StoragegatewayServiceID = "storagegateway" // Storagegateway.
- StreamsDynamodbServiceID = "streams.dynamodb" // StreamsDynamodb.
- StsServiceID = "sts" // Sts.
- SupportServiceID = "support" // Support.
- SwfServiceID = "swf" // Swf.
- TaggingServiceID = "tagging" // Tagging.
- TransferServiceID = "transfer" // Transfer.
- TranslateServiceID = "translate" // Translate.
- WafServiceID = "waf" // Waf.
- WafRegionalServiceID = "waf-regional" // WafRegional.
- WorkdocsServiceID = "workdocs" // Workdocs.
- WorkmailServiceID = "workmail" // Workmail.
- WorkspacesServiceID = "workspaces" // Workspaces.
- XrayServiceID = "xray" // Xray.
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
deleted file mode 100644
index 84316b92c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/doc.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Package endpoints provides the types and functionality for defining regions
-// and endpoints, as well as querying those definitions.
-//
-// The SDK's Regions and Endpoints metadata is code generated into the endpoints
-// package, and is accessible via the DefaultResolver function. This function
-// returns a endpoint Resolver will search the metadata and build an associated
-// endpoint if one is found. The default resolver will search all partitions
-// known by the SDK. e.g AWS Standard (aws), AWS China (aws-cn), and
-// AWS GovCloud (US) (aws-us-gov).
-// .
-//
-// Enumerating Regions and Endpoint Metadata
-//
-// Casting the Resolver returned by DefaultResolver to a EnumPartitions interface
-// will allow you to get access to the list of underlying Partitions with the
-// Partitions method. This is helpful if you want to limit the SDK's endpoint
-// resolving to a single partition, or enumerate regions, services, and endpoints
-// in the partition.
-//
-// resolver := endpoints.DefaultResolver()
-// partitions := resolver.(endpoints.EnumPartitions).Partitions()
-//
-// for _, p := range partitions {
-// fmt.Println("Regions for", p.ID())
-// for id, _ := range p.Regions() {
-// fmt.Println("*", id)
-// }
-//
-// fmt.Println("Services for", p.ID())
-// for id, _ := range p.Services() {
-// fmt.Println("*", id)
-// }
-// }
-//
-// Using Custom Endpoints
-//
-// The endpoints package also gives you the ability to use your own logic how
-// endpoints are resolved. This is a great way to define a custom endpoint
-// for select services, without passing that logic down through your code.
-//
-// If a type implements the Resolver interface it can be used to resolve
-// endpoints. To use this with the SDK's Session and Config set the value
-// of the type to the EndpointsResolver field of aws.Config when initializing
-// the session, or service client.
-//
-// In addition the ResolverFunc is a wrapper for a func matching the signature
-// of Resolver.EndpointFor, converting it to a type that satisfies the
-// Resolver interface.
-//
-//
-// myCustomResolver := func(service, region string, optFns ...func(*endpoints.Options)) (endpoints.ResolvedEndpoint, error) {
-// if service == endpoints.S3ServiceID {
-// return endpoints.ResolvedEndpoint{
-// URL: "s3.custom.endpoint.com",
-// SigningRegion: "custom-signing-region",
-// }, nil
-// }
-//
-// return endpoints.DefaultResolver().EndpointFor(service, region, optFns...)
-// }
-//
-// sess := session.Must(session.NewSession(&aws.Config{
-// Region: aws.String("us-west-2"),
-// EndpointResolver: endpoints.ResolverFunc(myCustomResolver),
-// }))
-package endpoints
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
deleted file mode 100644
index 880986157..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go
+++ /dev/null
@@ -1,706 +0,0 @@
-package endpoints
-
-import (
- "fmt"
- "regexp"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// A Logger is a minimalistic interface for the SDK to log messages to.
-type Logger interface {
- Log(...interface{})
-}
-
-// DualStackEndpointState is a constant to describe the dual-stack endpoint resolution
-// behavior.
-type DualStackEndpointState uint
-
-const (
- // DualStackEndpointStateUnset is the default value behavior for dual-stack endpoint
- // resolution.
- DualStackEndpointStateUnset DualStackEndpointState = iota
-
- // DualStackEndpointStateEnabled enable dual-stack endpoint resolution for endpoints.
- DualStackEndpointStateEnabled
-
- // DualStackEndpointStateDisabled disables dual-stack endpoint resolution for endpoints.
- DualStackEndpointStateDisabled
-)
-
-// FIPSEndpointState is a constant to describe the FIPS endpoint resolution behavior.
-type FIPSEndpointState uint
-
-const (
- // FIPSEndpointStateUnset is the default value behavior for FIPS endpoint resolution.
- FIPSEndpointStateUnset FIPSEndpointState = iota
-
- // FIPSEndpointStateEnabled enables FIPS endpoint resolution for service endpoints.
- FIPSEndpointStateEnabled
-
- // FIPSEndpointStateDisabled disables FIPS endpoint resolution for endpoints.
- FIPSEndpointStateDisabled
-)
-
-// Options provide the configuration needed to direct how the
-// endpoints will be resolved.
-type Options struct {
- // DisableSSL forces the endpoint to be resolved as HTTP.
- // instead of HTTPS if the service supports it.
- DisableSSL bool
-
- // Sets the resolver to resolve the endpoint as a dualstack endpoint
- // for the service. If dualstack support for a service is not known and
- // StrictMatching is not enabled a dualstack endpoint for the service will
- // be returned. This endpoint may not be valid. If StrictMatching is
- // enabled only services that are known to support dualstack will return
- // dualstack endpoints.
- //
- // Deprecated: This option will continue to function for S3 and S3 Control for backwards compatibility.
- // UseDualStackEndpoint should be used to enable usage of a service's dual-stack endpoint for all service clients
- // moving forward. For S3 and S3 Control, when UseDualStackEndpoint is set to a non-zero value it takes higher
- // precedence then this option.
- UseDualStack bool
-
- // Sets the resolver to resolve a dual-stack endpoint for the service.
- UseDualStackEndpoint DualStackEndpointState
-
- // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint.
- UseFIPSEndpoint FIPSEndpointState
-
- // Enables strict matching of services and regions resolved endpoints.
- // If the partition doesn't enumerate the exact service and region an
- // error will be returned. This option will prevent returning endpoints
- // that look valid, but may not resolve to any real endpoint.
- StrictMatching bool
-
- // Enables resolving a service endpoint based on the region provided if the
- // service does not exist. The service endpoint ID will be used as the service
- // domain name prefix. By default the endpoint resolver requires the service
- // to be known when resolving endpoints.
- //
- // If resolving an endpoint on the partition list the provided region will
- // be used to determine which partition's domain name pattern to the service
- // endpoint ID with. If both the service and region are unknown and resolving
- // the endpoint on partition list an UnknownEndpointError error will be returned.
- //
- // If resolving and endpoint on a partition specific resolver that partition's
- // domain name pattern will be used with the service endpoint ID. If both
- // region and service do not exist when resolving an endpoint on a specific
- // partition the partition's domain pattern will be used to combine the
- // endpoint and region together.
- //
- // This option is ignored if StrictMatching is enabled.
- ResolveUnknownService bool
-
- // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
- EC2MetadataEndpointMode EC2IMDSEndpointModeState
-
- // STS Regional Endpoint flag helps with resolving the STS endpoint
- STSRegionalEndpoint STSRegionalEndpoint
-
- // S3 Regional Endpoint flag helps with resolving the S3 endpoint
- S3UsEast1RegionalEndpoint S3UsEast1RegionalEndpoint
-
- // ResolvedRegion is the resolved region string. If provided (non-zero length) it takes priority
- // over the region name passed to the ResolveEndpoint call.
- ResolvedRegion string
-
- // Logger is the logger that will be used to log messages.
- Logger Logger
-
- // Determines whether logging of deprecated endpoints usage is enabled.
- LogDeprecated bool
-}
-
-func (o Options) getEndpointVariant(service string) (v endpointVariant) {
- const s3 = "s3"
- const s3Control = "s3-control"
-
- if (o.UseDualStackEndpoint == DualStackEndpointStateEnabled) ||
- ((service == s3 || service == s3Control) && (o.UseDualStackEndpoint == DualStackEndpointStateUnset && o.UseDualStack)) {
- v |= dualStackVariant
- }
- if o.UseFIPSEndpoint == FIPSEndpointStateEnabled {
- v |= fipsVariant
- }
- return v
-}
-
-// EC2IMDSEndpointModeState is an enum configuration variable describing the client endpoint mode.
-type EC2IMDSEndpointModeState uint
-
-// Enumeration values for EC2IMDSEndpointModeState
-const (
- EC2IMDSEndpointModeStateUnset EC2IMDSEndpointModeState = iota
- EC2IMDSEndpointModeStateIPv4
- EC2IMDSEndpointModeStateIPv6
-)
-
-// SetFromString sets the EC2IMDSEndpointModeState based on the provided string value. Unknown values will default to EC2IMDSEndpointModeStateUnset
-func (e *EC2IMDSEndpointModeState) SetFromString(v string) error {
- v = strings.TrimSpace(v)
-
- switch {
- case len(v) == 0:
- *e = EC2IMDSEndpointModeStateUnset
- case strings.EqualFold(v, "IPv6"):
- *e = EC2IMDSEndpointModeStateIPv6
- case strings.EqualFold(v, "IPv4"):
- *e = EC2IMDSEndpointModeStateIPv4
- default:
- return fmt.Errorf("unknown EC2 IMDS endpoint mode, must be either IPv6 or IPv4")
- }
- return nil
-}
-
-// STSRegionalEndpoint is an enum for the states of the STS Regional Endpoint
-// options.
-type STSRegionalEndpoint int
-
-func (e STSRegionalEndpoint) String() string {
- switch e {
- case LegacySTSEndpoint:
- return "legacy"
- case RegionalSTSEndpoint:
- return "regional"
- case UnsetSTSEndpoint:
- return ""
- default:
- return "unknown"
- }
-}
-
-const (
-
- // UnsetSTSEndpoint represents that STS Regional Endpoint flag is not specified.
- UnsetSTSEndpoint STSRegionalEndpoint = iota
-
- // LegacySTSEndpoint represents when STS Regional Endpoint flag is specified
- // to use legacy endpoints.
- LegacySTSEndpoint
-
- // RegionalSTSEndpoint represents when STS Regional Endpoint flag is specified
- // to use regional endpoints.
- RegionalSTSEndpoint
-)
-
-// GetSTSRegionalEndpoint function returns the STSRegionalEndpointFlag based
-// on the input string provided in env config or shared config by the user.
-//
-// `legacy`, `regional` are the only case-insensitive valid strings for
-// resolving the STS regional Endpoint flag.
-func GetSTSRegionalEndpoint(s string) (STSRegionalEndpoint, error) {
- switch {
- case strings.EqualFold(s, "legacy"):
- return LegacySTSEndpoint, nil
- case strings.EqualFold(s, "regional"):
- return RegionalSTSEndpoint, nil
- default:
- return UnsetSTSEndpoint, fmt.Errorf("unable to resolve the value of STSRegionalEndpoint for %v", s)
- }
-}
-
-// S3UsEast1RegionalEndpoint is an enum for the states of the S3 us-east-1
-// Regional Endpoint options.
-type S3UsEast1RegionalEndpoint int
-
-func (e S3UsEast1RegionalEndpoint) String() string {
- switch e {
- case LegacyS3UsEast1Endpoint:
- return "legacy"
- case RegionalS3UsEast1Endpoint:
- return "regional"
- case UnsetS3UsEast1Endpoint:
- return ""
- default:
- return "unknown"
- }
-}
-
-const (
-
- // UnsetS3UsEast1Endpoint represents that S3 Regional Endpoint flag is not
- // specified.
- UnsetS3UsEast1Endpoint S3UsEast1RegionalEndpoint = iota
-
- // LegacyS3UsEast1Endpoint represents when S3 Regional Endpoint flag is
- // specified to use legacy endpoints.
- LegacyS3UsEast1Endpoint
-
- // RegionalS3UsEast1Endpoint represents when S3 Regional Endpoint flag is
- // specified to use regional endpoints.
- RegionalS3UsEast1Endpoint
-)
-
-// GetS3UsEast1RegionalEndpoint function returns the S3UsEast1RegionalEndpointFlag based
-// on the input string provided in env config or shared config by the user.
-//
-// `legacy`, `regional` are the only case-insensitive valid strings for
-// resolving the S3 regional Endpoint flag.
-func GetS3UsEast1RegionalEndpoint(s string) (S3UsEast1RegionalEndpoint, error) {
- switch {
- case strings.EqualFold(s, "legacy"):
- return LegacyS3UsEast1Endpoint, nil
- case strings.EqualFold(s, "regional"):
- return RegionalS3UsEast1Endpoint, nil
- default:
- return UnsetS3UsEast1Endpoint,
- fmt.Errorf("unable to resolve the value of S3UsEast1RegionalEndpoint for %v", s)
- }
-}
-
-// Set combines all of the option functions together.
-func (o *Options) Set(optFns ...func(*Options)) {
- for _, fn := range optFns {
- fn(o)
- }
-}
-
-// DisableSSLOption sets the DisableSSL options. Can be used as a functional
-// option when resolving endpoints.
-func DisableSSLOption(o *Options) {
- o.DisableSSL = true
-}
-
-// UseDualStackOption sets the UseDualStack option. Can be used as a functional
-// option when resolving endpoints.
-//
-// Deprecated: UseDualStackEndpointOption should be used to enable usage of a service's dual-stack endpoint.
-// When DualStackEndpointState is set to a non-zero value it takes higher precedence then this option.
-func UseDualStackOption(o *Options) {
- o.UseDualStack = true
-}
-
-// UseDualStackEndpointOption sets the UseDualStackEndpoint option to enabled. Can be used as a functional
-// option when resolving endpoints.
-func UseDualStackEndpointOption(o *Options) {
- o.UseDualStackEndpoint = DualStackEndpointStateEnabled
-}
-
-// UseFIPSEndpointOption sets the UseFIPSEndpoint option to enabled. Can be used as a functional
-// option when resolving endpoints.
-func UseFIPSEndpointOption(o *Options) {
- o.UseFIPSEndpoint = FIPSEndpointStateEnabled
-}
-
-// StrictMatchingOption sets the StrictMatching option. Can be used as a functional
-// option when resolving endpoints.
-func StrictMatchingOption(o *Options) {
- o.StrictMatching = true
-}
-
-// ResolveUnknownServiceOption sets the ResolveUnknownService option. Can be used
-// as a functional option when resolving endpoints.
-func ResolveUnknownServiceOption(o *Options) {
- o.ResolveUnknownService = true
-}
-
-// STSRegionalEndpointOption enables the STS endpoint resolver behavior to resolve
-// STS endpoint to their regional endpoint, instead of the global endpoint.
-func STSRegionalEndpointOption(o *Options) {
- o.STSRegionalEndpoint = RegionalSTSEndpoint
-}
-
-// A Resolver provides the interface for functionality to resolve endpoints.
-// The build in Partition and DefaultResolver return value satisfy this interface.
-type Resolver interface {
- EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error)
-}
-
-// ResolverFunc is a helper utility that wraps a function so it satisfies the
-// Resolver interface. This is useful when you want to add additional endpoint
-// resolving logic, or stub out specific endpoints with custom values.
-type ResolverFunc func(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error)
-
-// EndpointFor wraps the ResolverFunc function to satisfy the Resolver interface.
-func (fn ResolverFunc) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- return fn(service, region, opts...)
-}
-
-var schemeRE = regexp.MustCompile("^([^:]+)://")
-
-// AddScheme adds the HTTP or HTTPS schemes to a endpoint URL if there is no
-// scheme. If disableSSL is true HTTP will set HTTP instead of the default HTTPS.
-//
-// If disableSSL is set, it will only set the URL's scheme if the URL does not
-// contain a scheme.
-func AddScheme(endpoint string, disableSSL bool) string {
- if !schemeRE.MatchString(endpoint) {
- scheme := "https"
- if disableSSL {
- scheme = "http"
- }
- endpoint = fmt.Sprintf("%s://%s", scheme, endpoint)
- }
-
- return endpoint
-}
-
-// EnumPartitions a provides a way to retrieve the underlying partitions that
-// make up the SDK's default Resolver, or any resolver decoded from a model
-// file.
-//
-// Use this interface with DefaultResolver and DecodeModels to get the list of
-// Partitions.
-type EnumPartitions interface {
- Partitions() []Partition
-}
-
-// RegionsForService returns a map of regions for the partition and service.
-// If either the partition or service does not exist false will be returned
-// as the second parameter.
-//
-// This example shows how to get the regions for DynamoDB in the AWS partition.
-// rs, exists := endpoints.RegionsForService(endpoints.DefaultPartitions(), endpoints.AwsPartitionID, endpoints.DynamodbServiceID)
-//
-// This is equivalent to using the partition directly.
-// rs := endpoints.AwsPartition().Services()[endpoints.DynamodbServiceID].Regions()
-func RegionsForService(ps []Partition, partitionID, serviceID string) (map[string]Region, bool) {
- for _, p := range ps {
- if p.ID() != partitionID {
- continue
- }
- if _, ok := p.p.Services[serviceID]; !(ok || serviceID == Ec2metadataServiceID) {
- break
- }
-
- s := Service{
- id: serviceID,
- p: p.p,
- }
- return s.Regions(), true
- }
-
- return map[string]Region{}, false
-}
-
-// PartitionForRegion returns the first partition which includes the region
-// passed in. This includes both known regions and regions which match
-// a pattern supported by the partition which may include regions that are
-// not explicitly known by the partition. Use the Regions method of the
-// returned Partition if explicit support is needed.
-func PartitionForRegion(ps []Partition, regionID string) (Partition, bool) {
- for _, p := range ps {
- if _, ok := p.p.Regions[regionID]; ok || p.p.RegionRegex.MatchString(regionID) {
- return p, true
- }
- }
-
- return Partition{}, false
-}
-
-// A Partition provides the ability to enumerate the partition's regions
-// and services.
-type Partition struct {
- id, dnsSuffix string
- p *partition
-}
-
-// DNSSuffix returns the base domain name of the partition.
-func (p Partition) DNSSuffix() string { return p.dnsSuffix }
-
-// ID returns the identifier of the partition.
-func (p Partition) ID() string { return p.id }
-
-// EndpointFor attempts to resolve the endpoint based on service and region.
-// See Options for information on configuring how the endpoint is resolved.
-//
-// If the service cannot be found in the metadata the UnknownServiceError
-// error will be returned. This validation will occur regardless if
-// StrictMatching is enabled. To enable resolving unknown services set the
-// "ResolveUnknownService" option to true. When StrictMatching is disabled
-// this option allows the partition resolver to resolve a endpoint based on
-// the service endpoint ID provided.
-//
-// When resolving endpoints you can choose to enable StrictMatching. This will
-// require the provided service and region to be known by the partition.
-// If the endpoint cannot be strictly resolved an error will be returned. This
-// mode is useful to ensure the endpoint resolved is valid. Without
-// StrictMatching enabled the endpoint returned may look valid but may not work.
-// StrictMatching requires the SDK to be updated if you want to take advantage
-// of new regions and services expansions.
-//
-// Errors that can be returned.
-// * UnknownServiceError
-// * UnknownEndpointError
-func (p Partition) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- return p.p.EndpointFor(service, region, opts...)
-}
-
-// Regions returns a map of Regions indexed by their ID. This is useful for
-// enumerating over the regions in a partition.
-func (p Partition) Regions() map[string]Region {
- rs := make(map[string]Region, len(p.p.Regions))
- for id, r := range p.p.Regions {
- rs[id] = Region{
- id: id,
- desc: r.Description,
- p: p.p,
- }
- }
-
- return rs
-}
-
-// Services returns a map of Service indexed by their ID. This is useful for
-// enumerating over the services in a partition.
-func (p Partition) Services() map[string]Service {
- ss := make(map[string]Service, len(p.p.Services))
-
- for id := range p.p.Services {
- ss[id] = Service{
- id: id,
- p: p.p,
- }
- }
-
- // Since we have removed the customization that injected this into the model
- // we still need to pretend that this is a modeled service.
- if _, ok := ss[Ec2metadataServiceID]; !ok {
- ss[Ec2metadataServiceID] = Service{
- id: Ec2metadataServiceID,
- p: p.p,
- }
- }
-
- return ss
-}
-
-// A Region provides information about a region, and ability to resolve an
-// endpoint from the context of a region, given a service.
-type Region struct {
- id, desc string
- p *partition
-}
-
-// ID returns the region's identifier.
-func (r Region) ID() string { return r.id }
-
-// Description returns the region's description. The region description
-// is free text, it can be empty, and it may change between SDK releases.
-func (r Region) Description() string { return r.desc }
-
-// ResolveEndpoint resolves an endpoint from the context of the region given
-// a service. See Partition.EndpointFor for usage and errors that can be returned.
-func (r Region) ResolveEndpoint(service string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- return r.p.EndpointFor(service, r.id, opts...)
-}
-
-// Services returns a list of all services that are known to be in this region.
-func (r Region) Services() map[string]Service {
- ss := map[string]Service{}
- for id, s := range r.p.Services {
- if _, ok := s.Endpoints[endpointKey{Region: r.id}]; ok {
- ss[id] = Service{
- id: id,
- p: r.p,
- }
- }
- }
-
- return ss
-}
-
-// A Service provides information about a service, and ability to resolve an
-// endpoint from the context of a service, given a region.
-type Service struct {
- id string
- p *partition
-}
-
-// ID returns the identifier for the service.
-func (s Service) ID() string { return s.id }
-
-// ResolveEndpoint resolves an endpoint from the context of a service given
-// a region. See Partition.EndpointFor for usage and errors that can be returned.
-func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- return s.p.EndpointFor(s.id, region, opts...)
-}
-
-// Regions returns a map of Regions that the service is present in.
-//
-// A region is the AWS region the service exists in. Whereas a Endpoint is
-// an URL that can be resolved to a instance of a service.
-func (s Service) Regions() map[string]Region {
- rs := map[string]Region{}
-
- service, ok := s.p.Services[s.id]
-
- // Since ec2metadata customization has been removed we need to check
- // if it was defined in non-standard endpoints.json file. If it's not
- // then we can return the empty map as there is no regional-endpoints for IMDS.
- // Otherwise, we iterate need to iterate the non-standard model.
- if s.id == Ec2metadataServiceID && !ok {
- return rs
- }
-
- for id := range service.Endpoints {
- if id.Variant != 0 {
- continue
- }
- if r, ok := s.p.Regions[id.Region]; ok {
- rs[id.Region] = Region{
- id: id.Region,
- desc: r.Description,
- p: s.p,
- }
- }
- }
-
- return rs
-}
-
-// Endpoints returns a map of Endpoints indexed by their ID for all known
-// endpoints for a service.
-//
-// A region is the AWS region the service exists in. Whereas a Endpoint is
-// an URL that can be resolved to a instance of a service.
-func (s Service) Endpoints() map[string]Endpoint {
- es := make(map[string]Endpoint, len(s.p.Services[s.id].Endpoints))
- for id := range s.p.Services[s.id].Endpoints {
- if id.Variant != 0 {
- continue
- }
- es[id.Region] = Endpoint{
- id: id.Region,
- serviceID: s.id,
- p: s.p,
- }
- }
-
- return es
-}
-
-// A Endpoint provides information about endpoints, and provides the ability
-// to resolve that endpoint for the service, and the region the endpoint
-// represents.
-type Endpoint struct {
- id string
- serviceID string
- p *partition
-}
-
-// ID returns the identifier for an endpoint.
-func (e Endpoint) ID() string { return e.id }
-
-// ServiceID returns the identifier the endpoint belongs to.
-func (e Endpoint) ServiceID() string { return e.serviceID }
-
-// ResolveEndpoint resolves an endpoint from the context of a service and
-// region the endpoint represents. See Partition.EndpointFor for usage and
-// errors that can be returned.
-func (e Endpoint) ResolveEndpoint(opts ...func(*Options)) (ResolvedEndpoint, error) {
- return e.p.EndpointFor(e.serviceID, e.id, opts...)
-}
-
-// A ResolvedEndpoint is an endpoint that has been resolved based on a partition
-// service, and region.
-type ResolvedEndpoint struct {
- // The endpoint URL
- URL string
-
- // The endpoint partition
- PartitionID string
-
- // The region that should be used for signing requests.
- SigningRegion string
-
- // The service name that should be used for signing requests.
- SigningName string
-
- // States that the signing name for this endpoint was derived from metadata
- // passed in, but was not explicitly modeled.
- SigningNameDerived bool
-
- // The signing method that should be used for signing requests.
- SigningMethod string
-}
-
-// So that the Error interface type can be included as an anonymous field
-// in the requestError struct and not conflict with the error.Error() method.
-type awsError awserr.Error
-
-// A EndpointNotFoundError is returned when in StrictMatching mode, and the
-// endpoint for the service and region cannot be found in any of the partitions.
-type EndpointNotFoundError struct {
- awsError
- Partition string
- Service string
- Region string
-}
-
-// A UnknownServiceError is returned when the service does not resolve to an
-// endpoint. Includes a list of all known services for the partition. Returned
-// when a partition does not support the service.
-type UnknownServiceError struct {
- awsError
- Partition string
- Service string
- Known []string
-}
-
-// NewUnknownServiceError builds and returns UnknownServiceError.
-func NewUnknownServiceError(p, s string, known []string) UnknownServiceError {
- return UnknownServiceError{
- awsError: awserr.New("UnknownServiceError",
- "could not resolve endpoint for unknown service", nil),
- Partition: p,
- Service: s,
- Known: known,
- }
-}
-
-// String returns the string representation of the error.
-func (e UnknownServiceError) Error() string {
- extra := fmt.Sprintf("partition: %q, service: %q",
- e.Partition, e.Service)
- if len(e.Known) > 0 {
- extra += fmt.Sprintf(", known: %v", e.Known)
- }
- return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
-}
-
-// String returns the string representation of the error.
-func (e UnknownServiceError) String() string {
- return e.Error()
-}
-
-// A UnknownEndpointError is returned when in StrictMatching mode and the
-// service is valid, but the region does not resolve to an endpoint. Includes
-// a list of all known endpoints for the service.
-type UnknownEndpointError struct {
- awsError
- Partition string
- Service string
- Region string
- Known []string
-}
-
-// NewUnknownEndpointError builds and returns UnknownEndpointError.
-func NewUnknownEndpointError(p, s, r string, known []string) UnknownEndpointError {
- return UnknownEndpointError{
- awsError: awserr.New("UnknownEndpointError",
- "could not resolve endpoint", nil),
- Partition: p,
- Service: s,
- Region: r,
- Known: known,
- }
-}
-
-// String returns the string representation of the error.
-func (e UnknownEndpointError) Error() string {
- extra := fmt.Sprintf("partition: %q, service: %q, region: %q",
- e.Partition, e.Service, e.Region)
- if len(e.Known) > 0 {
- extra += fmt.Sprintf(", known: %v", e.Known)
- }
- return awserr.SprintError(e.Code(), e.Message(), extra, e.OrigErr())
-}
-
-// String returns the string representation of the error.
-func (e UnknownEndpointError) String() string {
- return e.Error()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go
deleted file mode 100644
index df75e899a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/legacy_regions.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package endpoints
-
-var legacyGlobalRegions = map[string]map[string]struct{}{
- "sts": {
- "ap-northeast-1": {},
- "ap-south-1": {},
- "ap-southeast-1": {},
- "ap-southeast-2": {},
- "ca-central-1": {},
- "eu-central-1": {},
- "eu-north-1": {},
- "eu-west-1": {},
- "eu-west-2": {},
- "eu-west-3": {},
- "sa-east-1": {},
- "us-east-1": {},
- "us-east-2": {},
- "us-west-1": {},
- "us-west-2": {},
- },
- "s3": {
- "us-east-1": {},
- },
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
deleted file mode 100644
index 89f6627dc..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go
+++ /dev/null
@@ -1,594 +0,0 @@
-package endpoints
-
-import (
- "encoding/json"
- "fmt"
- "regexp"
- "strconv"
- "strings"
-)
-
-const (
- ec2MetadataEndpointIPv6 = "http://[fd00:ec2::254]/latest"
- ec2MetadataEndpointIPv4 = "http://169.254.169.254/latest"
-)
-
-const dnsSuffixTemplateKey = "{dnsSuffix}"
-
-// defaultKey is a compound map key of a variant and other values.
-type defaultKey struct {
- Variant endpointVariant
- ServiceVariant serviceVariant
-}
-
-// endpointKey is a compound map key of a region and associated variant value.
-type endpointKey struct {
- Region string
- Variant endpointVariant
-}
-
-// endpointVariant is a bit field to describe the endpoints attributes.
-type endpointVariant uint64
-
-// serviceVariant is a bit field to describe the service endpoint attributes.
-type serviceVariant uint64
-
-const (
- // fipsVariant indicates that the endpoint is FIPS capable.
- fipsVariant endpointVariant = 1 << (64 - 1 - iota)
-
- // dualStackVariant indicates that the endpoint is DualStack capable.
- dualStackVariant
-)
-
-var regionValidationRegex = regexp.MustCompile(`^[[:alnum:]]([[:alnum:]\-]*[[:alnum:]])?$`)
-
-type partitions []partition
-
-func (ps partitions) EndpointFor(service, region string, opts ...func(*Options)) (ResolvedEndpoint, error) {
- var opt Options
- opt.Set(opts...)
-
- if len(opt.ResolvedRegion) > 0 {
- region = opt.ResolvedRegion
- }
-
- for i := 0; i < len(ps); i++ {
- if !ps[i].canResolveEndpoint(service, region, opt) {
- continue
- }
-
- return ps[i].EndpointFor(service, region, opts...)
- }
-
- // If loose matching fallback to first partition format to use
- // when resolving the endpoint.
- if !opt.StrictMatching && len(ps) > 0 {
- return ps[0].EndpointFor(service, region, opts...)
- }
-
- return ResolvedEndpoint{}, NewUnknownEndpointError("all partitions", service, region, []string{})
-}
-
-// Partitions satisfies the EnumPartitions interface and returns a list
-// of Partitions representing each partition represented in the SDK's
-// endpoints model.
-func (ps partitions) Partitions() []Partition {
- parts := make([]Partition, 0, len(ps))
- for i := 0; i < len(ps); i++ {
- parts = append(parts, ps[i].Partition())
- }
-
- return parts
-}
-
-type endpointWithVariants struct {
- endpoint
- Variants []endpointWithTags `json:"variants"`
-}
-
-type endpointWithTags struct {
- endpoint
- Tags []string `json:"tags"`
-}
-
-type endpointDefaults map[defaultKey]endpoint
-
-func (p *endpointDefaults) UnmarshalJSON(data []byte) error {
- if *p == nil {
- *p = make(endpointDefaults)
- }
-
- var e endpointWithVariants
- if err := json.Unmarshal(data, &e); err != nil {
- return err
- }
-
- (*p)[defaultKey{Variant: 0}] = e.endpoint
-
- e.Hostname = ""
- e.DNSSuffix = ""
-
- for _, variant := range e.Variants {
- endpointVariant, unknown := parseVariantTags(variant.Tags)
- if unknown {
- continue
- }
-
- var ve endpoint
- ve.mergeIn(e.endpoint)
- ve.mergeIn(variant.endpoint)
-
- (*p)[defaultKey{Variant: endpointVariant}] = ve
- }
-
- return nil
-}
-
-func parseVariantTags(tags []string) (ev endpointVariant, unknown bool) {
- if len(tags) == 0 {
- unknown = true
- return
- }
-
- for _, tag := range tags {
- switch {
- case strings.EqualFold("fips", tag):
- ev |= fipsVariant
- case strings.EqualFold("dualstack", tag):
- ev |= dualStackVariant
- default:
- unknown = true
- }
- }
- return ev, unknown
-}
-
-type partition struct {
- ID string `json:"partition"`
- Name string `json:"partitionName"`
- DNSSuffix string `json:"dnsSuffix"`
- RegionRegex regionRegex `json:"regionRegex"`
- Defaults endpointDefaults `json:"defaults"`
- Regions regions `json:"regions"`
- Services services `json:"services"`
-}
-
-func (p partition) Partition() Partition {
- return Partition{
- dnsSuffix: p.DNSSuffix,
- id: p.ID,
- p: &p,
- }
-}
-
-func (p partition) canResolveEndpoint(service, region string, options Options) bool {
- s, hasService := p.Services[service]
- _, hasEndpoint := s.Endpoints[endpointKey{
- Region: region,
- Variant: options.getEndpointVariant(service),
- }]
-
- if hasEndpoint && hasService {
- return true
- }
-
- if options.StrictMatching {
- return false
- }
-
- return p.RegionRegex.MatchString(region)
-}
-
-func allowLegacyEmptyRegion(service string) bool {
- legacy := map[string]struct{}{
- "budgets": {},
- "ce": {},
- "chime": {},
- "cloudfront": {},
- "ec2metadata": {},
- "iam": {},
- "importexport": {},
- "organizations": {},
- "route53": {},
- "sts": {},
- "support": {},
- "waf": {},
- }
-
- _, allowed := legacy[service]
- return allowed
-}
-
-func (p partition) EndpointFor(service, region string, opts ...func(*Options)) (resolved ResolvedEndpoint, err error) {
- var opt Options
- opt.Set(opts...)
-
- if len(opt.ResolvedRegion) > 0 {
- region = opt.ResolvedRegion
- }
-
- s, hasService := p.Services[service]
-
- if service == Ec2metadataServiceID && !hasService {
- endpoint := getEC2MetadataEndpoint(p.ID, service, opt.EC2MetadataEndpointMode)
- return endpoint, nil
- }
-
- if len(service) == 0 || !(hasService || opt.ResolveUnknownService) {
- // Only return error if the resolver will not fallback to creating
- // endpoint based on service endpoint ID passed in.
- return resolved, NewUnknownServiceError(p.ID, service, serviceList(p.Services))
- }
-
- if len(region) == 0 && allowLegacyEmptyRegion(service) && len(s.PartitionEndpoint) != 0 {
- region = s.PartitionEndpoint
- }
-
- if r, ok := isLegacyGlobalRegion(service, region, opt); ok {
- region = r
- }
-
- variant := opt.getEndpointVariant(service)
-
- endpoints := s.Endpoints
-
- serviceDefaults, hasServiceDefault := s.Defaults[defaultKey{Variant: variant}]
- // If we searched for a variant which may have no explicit service defaults,
- // then we need to inherit the standard service defaults except the hostname and dnsSuffix
- if variant != 0 && !hasServiceDefault {
- serviceDefaults = s.Defaults[defaultKey{}]
- serviceDefaults.Hostname = ""
- serviceDefaults.DNSSuffix = ""
- }
-
- partitionDefaults, hasPartitionDefault := p.Defaults[defaultKey{Variant: variant}]
-
- var dnsSuffix string
- if len(serviceDefaults.DNSSuffix) > 0 {
- dnsSuffix = serviceDefaults.DNSSuffix
- } else if variant == 0 {
- // For legacy reasons the partition dnsSuffix is not in the defaults, so if we looked for
- // a non-variant endpoint then we need to set the dnsSuffix.
- dnsSuffix = p.DNSSuffix
- }
-
- noDefaults := !hasServiceDefault && !hasPartitionDefault
-
- e, hasEndpoint := s.endpointForRegion(region, endpoints, variant)
- if len(region) == 0 || (!hasEndpoint && (opt.StrictMatching || noDefaults)) {
- return resolved, NewUnknownEndpointError(p.ID, service, region, endpointList(endpoints, variant))
- }
-
- defs := []endpoint{partitionDefaults, serviceDefaults}
-
- return e.resolve(service, p.ID, region, dnsSuffixTemplateKey, dnsSuffix, defs, opt)
-}
-
-func getEC2MetadataEndpoint(partitionID, service string, mode EC2IMDSEndpointModeState) ResolvedEndpoint {
- switch mode {
- case EC2IMDSEndpointModeStateIPv6:
- return ResolvedEndpoint{
- URL: ec2MetadataEndpointIPv6,
- PartitionID: partitionID,
- SigningRegion: "aws-global",
- SigningName: service,
- SigningNameDerived: true,
- SigningMethod: "v4",
- }
- case EC2IMDSEndpointModeStateIPv4:
- fallthrough
- default:
- return ResolvedEndpoint{
- URL: ec2MetadataEndpointIPv4,
- PartitionID: partitionID,
- SigningRegion: "aws-global",
- SigningName: service,
- SigningNameDerived: true,
- SigningMethod: "v4",
- }
- }
-}
-
-func isLegacyGlobalRegion(service string, region string, opt Options) (string, bool) {
- if opt.getEndpointVariant(service) != 0 {
- return "", false
- }
-
- const (
- sts = "sts"
- s3 = "s3"
- awsGlobal = "aws-global"
- )
-
- switch {
- case service == sts && opt.STSRegionalEndpoint == RegionalSTSEndpoint:
- return region, false
- case service == s3 && opt.S3UsEast1RegionalEndpoint == RegionalS3UsEast1Endpoint:
- return region, false
- default:
- if _, ok := legacyGlobalRegions[service][region]; ok {
- return awsGlobal, true
- }
- }
-
- return region, false
-}
-
-func serviceList(ss services) []string {
- list := make([]string, 0, len(ss))
- for k := range ss {
- list = append(list, k)
- }
- return list
-}
-func endpointList(es serviceEndpoints, variant endpointVariant) []string {
- list := make([]string, 0, len(es))
- for k := range es {
- if k.Variant != variant {
- continue
- }
- list = append(list, k.Region)
- }
- return list
-}
-
-type regionRegex struct {
- *regexp.Regexp
-}
-
-func (rr *regionRegex) UnmarshalJSON(b []byte) (err error) {
- // Strip leading and trailing quotes
- regex, err := strconv.Unquote(string(b))
- if err != nil {
- return fmt.Errorf("unable to strip quotes from regex, %v", err)
- }
-
- rr.Regexp, err = regexp.Compile(regex)
- if err != nil {
- return fmt.Errorf("unable to unmarshal region regex, %v", err)
- }
- return nil
-}
-
-type regions map[string]region
-
-type region struct {
- Description string `json:"description"`
-}
-
-type services map[string]service
-
-type service struct {
- PartitionEndpoint string `json:"partitionEndpoint"`
- IsRegionalized boxedBool `json:"isRegionalized,omitempty"`
- Defaults endpointDefaults `json:"defaults"`
- Endpoints serviceEndpoints `json:"endpoints"`
-}
-
-func (s *service) endpointForRegion(region string, endpoints serviceEndpoints, variant endpointVariant) (endpoint, bool) {
- if e, ok := endpoints[endpointKey{Region: region, Variant: variant}]; ok {
- return e, true
- }
-
- if s.IsRegionalized == boxedFalse {
- return endpoints[endpointKey{Region: s.PartitionEndpoint, Variant: variant}], region == s.PartitionEndpoint
- }
-
- // Unable to find any matching endpoint, return
- // blank that will be used for generic endpoint creation.
- return endpoint{}, false
-}
-
-type serviceEndpoints map[endpointKey]endpoint
-
-func (s *serviceEndpoints) UnmarshalJSON(data []byte) error {
- if *s == nil {
- *s = make(serviceEndpoints)
- }
-
- var regionToEndpoint map[string]endpointWithVariants
-
- if err := json.Unmarshal(data, ®ionToEndpoint); err != nil {
- return err
- }
-
- for region, e := range regionToEndpoint {
- (*s)[endpointKey{Region: region}] = e.endpoint
-
- e.Hostname = ""
- e.DNSSuffix = ""
-
- for _, variant := range e.Variants {
- endpointVariant, unknown := parseVariantTags(variant.Tags)
- if unknown {
- continue
- }
-
- var ve endpoint
- ve.mergeIn(e.endpoint)
- ve.mergeIn(variant.endpoint)
-
- (*s)[endpointKey{Region: region, Variant: endpointVariant}] = ve
- }
- }
-
- return nil
-}
-
-type endpoint struct {
- Hostname string `json:"hostname"`
- Protocols []string `json:"protocols"`
- CredentialScope credentialScope `json:"credentialScope"`
-
- DNSSuffix string `json:"dnsSuffix"`
-
- // Signature Version not used
- SignatureVersions []string `json:"signatureVersions"`
-
- // SSLCommonName not used.
- SSLCommonName string `json:"sslCommonName"`
-
- Deprecated boxedBool `json:"deprecated"`
-}
-
-// isZero returns whether the endpoint structure is an empty (zero) value.
-func (e endpoint) isZero() bool {
- switch {
- case len(e.Hostname) != 0:
- return false
- case len(e.Protocols) != 0:
- return false
- case e.CredentialScope != (credentialScope{}):
- return false
- case len(e.SignatureVersions) != 0:
- return false
- case len(e.SSLCommonName) != 0:
- return false
- }
- return true
-}
-
-const (
- defaultProtocol = "https"
- defaultSigner = "v4"
-)
-
-var (
- protocolPriority = []string{"https", "http"}
- signerPriority = []string{"v4", "v2"}
-)
-
-func getByPriority(s []string, p []string, def string) string {
- if len(s) == 0 {
- return def
- }
-
- for i := 0; i < len(p); i++ {
- for j := 0; j < len(s); j++ {
- if s[j] == p[i] {
- return s[j]
- }
- }
- }
-
- return s[0]
-}
-
-func (e endpoint) resolve(service, partitionID, region, dnsSuffixTemplateVariable, dnsSuffix string, defs []endpoint, opts Options) (ResolvedEndpoint, error) {
- var merged endpoint
- for _, def := range defs {
- merged.mergeIn(def)
- }
- merged.mergeIn(e)
- e = merged
-
- signingRegion := e.CredentialScope.Region
- if len(signingRegion) == 0 {
- signingRegion = region
- }
-
- signingName := e.CredentialScope.Service
- var signingNameDerived bool
- if len(signingName) == 0 {
- signingName = service
- signingNameDerived = true
- }
-
- hostname := e.Hostname
-
- if !validateInputRegion(region) {
- return ResolvedEndpoint{}, fmt.Errorf("invalid region identifier format provided")
- }
-
- if len(merged.DNSSuffix) > 0 {
- dnsSuffix = merged.DNSSuffix
- }
-
- u := strings.Replace(hostname, "{service}", service, 1)
- u = strings.Replace(u, "{region}", region, 1)
- u = strings.Replace(u, dnsSuffixTemplateVariable, dnsSuffix, 1)
-
- scheme := getEndpointScheme(e.Protocols, opts.DisableSSL)
- u = fmt.Sprintf("%s://%s", scheme, u)
-
- if e.Deprecated == boxedTrue && opts.LogDeprecated && opts.Logger != nil {
- opts.Logger.Log(fmt.Sprintf("endpoint identifier %q, url %q marked as deprecated", region, u))
- }
-
- return ResolvedEndpoint{
- URL: u,
- PartitionID: partitionID,
- SigningRegion: signingRegion,
- SigningName: signingName,
- SigningNameDerived: signingNameDerived,
- SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner),
- }, nil
-}
-
-func getEndpointScheme(protocols []string, disableSSL bool) string {
- if disableSSL {
- return "http"
- }
-
- return getByPriority(protocols, protocolPriority, defaultProtocol)
-}
-
-func (e *endpoint) mergeIn(other endpoint) {
- if len(other.Hostname) > 0 {
- e.Hostname = other.Hostname
- }
- if len(other.Protocols) > 0 {
- e.Protocols = other.Protocols
- }
- if len(other.SignatureVersions) > 0 {
- e.SignatureVersions = other.SignatureVersions
- }
- if len(other.CredentialScope.Region) > 0 {
- e.CredentialScope.Region = other.CredentialScope.Region
- }
- if len(other.CredentialScope.Service) > 0 {
- e.CredentialScope.Service = other.CredentialScope.Service
- }
- if len(other.SSLCommonName) > 0 {
- e.SSLCommonName = other.SSLCommonName
- }
- if len(other.DNSSuffix) > 0 {
- e.DNSSuffix = other.DNSSuffix
- }
- if other.Deprecated != boxedBoolUnset {
- e.Deprecated = other.Deprecated
- }
-}
-
-type credentialScope struct {
- Region string `json:"region"`
- Service string `json:"service"`
-}
-
-type boxedBool int
-
-func (b *boxedBool) UnmarshalJSON(buf []byte) error {
- v, err := strconv.ParseBool(string(buf))
- if err != nil {
- return err
- }
-
- if v {
- *b = boxedTrue
- } else {
- *b = boxedFalse
- }
-
- return nil
-}
-
-const (
- boxedBoolUnset boxedBool = iota
- boxedFalse
- boxedTrue
-)
-
-func validateInputRegion(region string) bool {
- return regionValidationRegex.MatchString(region)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
deleted file mode 100644
index 84922bca8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model_codegen.go
+++ /dev/null
@@ -1,412 +0,0 @@
-//go:build codegen
-// +build codegen
-
-package endpoints
-
-import (
- "fmt"
- "io"
- "reflect"
- "strings"
- "text/template"
- "unicode"
-)
-
-// A CodeGenOptions are the options for code generating the endpoints into
-// Go code from the endpoints model definition.
-type CodeGenOptions struct {
- // Options for how the model will be decoded.
- DecodeModelOptions DecodeModelOptions
-
- // Disables code generation of the service endpoint prefix IDs defined in
- // the model.
- DisableGenerateServiceIDs bool
-}
-
-// Set combines all of the option functions together
-func (d *CodeGenOptions) Set(optFns ...func(*CodeGenOptions)) {
- for _, fn := range optFns {
- fn(d)
- }
-}
-
-// CodeGenModel given a endpoints model file will decode it and attempt to
-// generate Go code from the model definition. Error will be returned if
-// the code is unable to be generated, or decoded.
-func CodeGenModel(modelFile io.Reader, outFile io.Writer, optFns ...func(*CodeGenOptions)) error {
- var opts CodeGenOptions
- opts.Set(optFns...)
-
- resolver, err := DecodeModel(modelFile, func(d *DecodeModelOptions) {
- *d = opts.DecodeModelOptions
- })
- if err != nil {
- return err
- }
-
- v := struct {
- Resolver
- CodeGenOptions
- }{
- Resolver: resolver,
- CodeGenOptions: opts,
- }
-
- tmpl := template.Must(template.New("tmpl").Funcs(funcMap).Parse(v3Tmpl))
- if err := tmpl.ExecuteTemplate(outFile, "defaults", v); err != nil {
- return fmt.Errorf("failed to execute template, %v", err)
- }
-
- return nil
-}
-
-func toSymbol(v string) string {
- out := []rune{}
- for _, c := range strings.Title(v) {
- if !(unicode.IsNumber(c) || unicode.IsLetter(c)) {
- continue
- }
-
- out = append(out, c)
- }
-
- return string(out)
-}
-
-func quoteString(v string) string {
- return fmt.Sprintf("%q", v)
-}
-
-func regionConstName(p, r string) string {
- return toSymbol(p) + toSymbol(r)
-}
-
-func partitionGetter(id string) string {
- return fmt.Sprintf("%sPartition", toSymbol(id))
-}
-
-func partitionVarName(id string) string {
- return fmt.Sprintf("%sPartition", strings.ToLower(toSymbol(id)))
-}
-
-func listPartitionNames(ps partitions) string {
- names := []string{}
- switch len(ps) {
- case 1:
- return ps[0].Name
- case 2:
- return fmt.Sprintf("%s and %s", ps[0].Name, ps[1].Name)
- default:
- for i, p := range ps {
- if i == len(ps)-1 {
- names = append(names, "and "+p.Name)
- } else {
- names = append(names, p.Name)
- }
- }
- return strings.Join(names, ", ")
- }
-}
-
-func boxedBoolIfSet(msg string, v boxedBool) string {
- switch v {
- case boxedTrue:
- return fmt.Sprintf(msg, "boxedTrue")
- case boxedFalse:
- return fmt.Sprintf(msg, "boxedFalse")
- default:
- return ""
- }
-}
-
-func stringIfSet(msg, v string) string {
- if len(v) == 0 {
- return ""
- }
-
- return fmt.Sprintf(msg, v)
-}
-
-func stringSliceIfSet(msg string, vs []string) string {
- if len(vs) == 0 {
- return ""
- }
-
- names := []string{}
- for _, v := range vs {
- names = append(names, `"`+v+`"`)
- }
-
- return fmt.Sprintf(msg, strings.Join(names, ","))
-}
-
-func endpointIsSet(v endpoint) bool {
- return !reflect.DeepEqual(v, endpoint{})
-}
-
-func serviceSet(ps partitions) map[string]struct{} {
- set := map[string]struct{}{}
- for _, p := range ps {
- for id := range p.Services {
- set[id] = struct{}{}
- }
- }
-
- return set
-}
-
-func endpointVariantSetter(variant endpointVariant) (string, error) {
- if variant == 0 {
- return "0", nil
- }
-
- if variant > (fipsVariant | dualStackVariant) {
- return "", fmt.Errorf("unknown endpoint variant")
- }
-
- var symbols []string
- if variant&fipsVariant != 0 {
- symbols = append(symbols, "fipsVariant")
- }
- if variant&dualStackVariant != 0 {
- symbols = append(symbols, "dualStackVariant")
- }
- v := strings.Join(symbols, "|")
-
- return v, nil
-}
-
-func endpointKeySetter(e endpointKey) (string, error) {
- var sb strings.Builder
- sb.WriteString("endpointKey{\n")
- sb.WriteString(fmt.Sprintf("Region: %q,\n", e.Region))
- if e.Variant != 0 {
- variantSetter, err := endpointVariantSetter(e.Variant)
- if err != nil {
- return "", err
- }
- sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter))
- }
- sb.WriteString("}")
- return sb.String(), nil
-}
-
-func defaultKeySetter(e defaultKey) (string, error) {
- var sb strings.Builder
- sb.WriteString("defaultKey{\n")
- if e.Variant != 0 {
- variantSetter, err := endpointVariantSetter(e.Variant)
- if err != nil {
- return "", err
- }
- sb.WriteString(fmt.Sprintf("Variant: %s,\n", variantSetter))
- }
- sb.WriteString("}")
- return sb.String(), nil
-}
-
-var funcMap = template.FuncMap{
- "ToSymbol": toSymbol,
- "QuoteString": quoteString,
- "RegionConst": regionConstName,
- "PartitionGetter": partitionGetter,
- "PartitionVarName": partitionVarName,
- "ListPartitionNames": listPartitionNames,
- "BoxedBoolIfSet": boxedBoolIfSet,
- "StringIfSet": stringIfSet,
- "StringSliceIfSet": stringSliceIfSet,
- "EndpointIsSet": endpointIsSet,
- "ServicesSet": serviceSet,
- "EndpointVariantSetter": endpointVariantSetter,
- "EndpointKeySetter": endpointKeySetter,
- "DefaultKeySetter": defaultKeySetter,
-}
-
-const v3Tmpl = `
-{{ define "defaults" -}}
-// Code generated by aws/endpoints/v3model_codegen.go. DO NOT EDIT.
-
-package endpoints
-
-import (
- "regexp"
-)
-
- {{ template "partition consts" $.Resolver }}
-
- {{ range $_, $partition := $.Resolver }}
- {{ template "partition region consts" $partition }}
- {{ end }}
-
- {{ if not $.DisableGenerateServiceIDs -}}
- {{ template "service consts" $.Resolver }}
- {{- end }}
-
- {{ template "endpoint resolvers" $.Resolver }}
-{{- end }}
-
-{{ define "partition consts" }}
- // Partition identifiers
- const (
- {{ range $_, $p := . -}}
- {{ ToSymbol $p.ID }}PartitionID = {{ QuoteString $p.ID }} // {{ $p.Name }} partition.
- {{ end -}}
- )
-{{- end }}
-
-{{ define "partition region consts" }}
- // {{ .Name }} partition's regions.
- const (
- {{ range $id, $region := .Regions -}}
- {{ ToSymbol $id }}RegionID = {{ QuoteString $id }} // {{ $region.Description }}.
- {{ end -}}
- )
-{{- end }}
-
-{{ define "service consts" }}
- // Service identifiers
- const (
- {{ $serviceSet := ServicesSet . -}}
- {{ range $id, $_ := $serviceSet -}}
- {{ ToSymbol $id }}ServiceID = {{ QuoteString $id }} // {{ ToSymbol $id }}.
- {{ end -}}
- )
-{{- end }}
-
-{{ define "endpoint resolvers" }}
- // DefaultResolver returns an Endpoint resolver that will be able
- // to resolve endpoints for: {{ ListPartitionNames . }}.
- //
- // Use DefaultPartitions() to get the list of the default partitions.
- func DefaultResolver() Resolver {
- return defaultPartitions
- }
-
- // DefaultPartitions returns a list of the partitions the SDK is bundled
- // with. The available partitions are: {{ ListPartitionNames . }}.
- //
- // partitions := endpoints.DefaultPartitions
- // for _, p := range partitions {
- // // ... inspect partitions
- // }
- func DefaultPartitions() []Partition {
- return defaultPartitions.Partitions()
- }
-
- var defaultPartitions = partitions{
- {{ range $_, $partition := . -}}
- {{ PartitionVarName $partition.ID }},
- {{ end }}
- }
-
- {{ range $_, $partition := . -}}
- {{ $name := PartitionGetter $partition.ID -}}
- // {{ $name }} returns the Resolver for {{ $partition.Name }}.
- func {{ $name }}() Partition {
- return {{ PartitionVarName $partition.ID }}.Partition()
- }
- var {{ PartitionVarName $partition.ID }} = {{ template "gocode Partition" $partition }}
- {{ end }}
-{{ end }}
-
-{{ define "default partitions" }}
- func DefaultPartitions() []Partition {
- return []partition{
- {{ range $_, $partition := . -}}
- // {{ ToSymbol $partition.ID}}Partition(),
- {{ end }}
- }
- }
-{{ end }}
-
-{{ define "gocode Partition" -}}
-partition{
- {{ StringIfSet "ID: %q,\n" .ID -}}
- {{ StringIfSet "Name: %q,\n" .Name -}}
- {{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}}
- RegionRegex: {{ template "gocode RegionRegex" .RegionRegex }},
- {{ if (gt (len .Defaults) 0) -}}
- Defaults: {{ template "gocode Defaults" .Defaults -}},
- {{ end -}}
- Regions: {{ template "gocode Regions" .Regions }},
- Services: {{ template "gocode Services" .Services }},
-}
-{{- end }}
-
-{{ define "gocode RegionRegex" -}}
-regionRegex{
- Regexp: func() *regexp.Regexp{
- reg, _ := regexp.Compile({{ QuoteString .Regexp.String }})
- return reg
- }(),
-}
-{{- end }}
-
-{{ define "gocode Regions" -}}
-regions{
- {{ range $id, $region := . -}}
- "{{ $id }}": {{ template "gocode Region" $region }},
- {{ end -}}
-}
-{{- end }}
-
-{{ define "gocode Region" -}}
-region{
- {{ StringIfSet "Description: %q,\n" .Description -}}
-}
-{{- end }}
-
-{{ define "gocode Services" -}}
-services{
- {{ range $id, $service := . -}}
- "{{ $id }}": {{ template "gocode Service" $service }},
- {{ end }}
-}
-{{- end }}
-
-{{ define "gocode Service" -}}
-service{
- {{ StringIfSet "PartitionEndpoint: %q,\n" .PartitionEndpoint -}}
- {{ BoxedBoolIfSet "IsRegionalized: %s,\n" .IsRegionalized -}}
- {{ if (gt (len .Defaults) 0) -}}
- Defaults: {{ template "gocode Defaults" .Defaults -}},
- {{ end -}}
- {{ if .Endpoints -}}
- Endpoints: {{ template "gocode Endpoints" .Endpoints }},
- {{- end }}
-}
-{{- end }}
-
-{{ define "gocode Defaults" -}}
-endpointDefaults{
- {{ range $id, $endpoint := . -}}
- {{ DefaultKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }},
- {{ end }}
-}
-{{- end }}
-
-{{ define "gocode Endpoints" -}}
-serviceEndpoints{
- {{ range $id, $endpoint := . -}}
- {{ EndpointKeySetter $id }}: {{ template "gocode Endpoint" $endpoint }},
- {{ end }}
-}
-{{- end }}
-
-{{ define "gocode Endpoint" -}}
-endpoint{
- {{ StringIfSet "Hostname: %q,\n" .Hostname -}}
- {{ StringIfSet "DNSSuffix: %q,\n" .DNSSuffix -}}
- {{ StringIfSet "SSLCommonName: %q,\n" .SSLCommonName -}}
- {{ StringSliceIfSet "Protocols: []string{%s},\n" .Protocols -}}
- {{ StringSliceIfSet "SignatureVersions: []string{%s},\n" .SignatureVersions -}}
- {{ if or .CredentialScope.Region .CredentialScope.Service -}}
- CredentialScope: credentialScope{
- {{ StringIfSet "Region: %q,\n" .CredentialScope.Region -}}
- {{ StringIfSet "Service: %q,\n" .CredentialScope.Service -}}
- },
- {{- end }}
- {{ BoxedBoolIfSet "Deprecated: %s,\n" .Deprecated -}}
-}
-{{- end }}
-`
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/errors.go b/vendor/github.com/aws/aws-sdk-go/aws/errors.go
deleted file mode 100644
index fa06f7a8f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/errors.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package aws
-
-import "github.com/aws/aws-sdk-go/aws/awserr"
-
-var (
- // ErrMissingRegion is an error that is returned if region configuration is
- // not found.
- ErrMissingRegion = awserr.New("MissingRegion", "could not find region configuration", nil)
-
- // ErrMissingEndpoint is an error that is returned if an endpoint cannot be
- // resolved for a service.
- ErrMissingEndpoint = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil)
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go b/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
deleted file mode 100644
index 91a6f277a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/jsonvalue.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package aws
-
-// JSONValue is a representation of a grab bag type that will be marshaled
-// into a json string. This type can be used just like any other map.
-//
-// Example:
-//
-// values := aws.JSONValue{
-// "Foo": "Bar",
-// }
-// values["Baz"] = "Qux"
-type JSONValue map[string]interface{}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/logger.go
deleted file mode 100644
index 49674cc79..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/logger.go
+++ /dev/null
@@ -1,121 +0,0 @@
-package aws
-
-import (
- "log"
- "os"
-)
-
-// A LogLevelType defines the level logging should be performed at. Used to instruct
-// the SDK which statements should be logged.
-type LogLevelType uint
-
-// LogLevel returns the pointer to a LogLevel. Should be used to workaround
-// not being able to take the address of a non-composite literal.
-func LogLevel(l LogLevelType) *LogLevelType {
- return &l
-}
-
-// Value returns the LogLevel value or the default value LogOff if the LogLevel
-// is nil. Safe to use on nil value LogLevelTypes.
-func (l *LogLevelType) Value() LogLevelType {
- if l != nil {
- return *l
- }
- return LogOff
-}
-
-// Matches returns true if the v LogLevel is enabled by this LogLevel. Should be
-// used with logging sub levels. Is safe to use on nil value LogLevelTypes. If
-// LogLevel is nil, will default to LogOff comparison.
-func (l *LogLevelType) Matches(v LogLevelType) bool {
- c := l.Value()
- return c&v == v
-}
-
-// AtLeast returns true if this LogLevel is at least high enough to satisfies v.
-// Is safe to use on nil value LogLevelTypes. If LogLevel is nil, will default
-// to LogOff comparison.
-func (l *LogLevelType) AtLeast(v LogLevelType) bool {
- c := l.Value()
- return c >= v
-}
-
-const (
- // LogOff states that no logging should be performed by the SDK. This is the
- // default state of the SDK, and should be use to disable all logging.
- LogOff LogLevelType = iota * 0x1000
-
- // LogDebug state that debug output should be logged by the SDK. This should
- // be used to inspect request made and responses received.
- LogDebug
-)
-
-// Debug Logging Sub Levels
-const (
- // LogDebugWithSigning states that the SDK should log request signing and
- // presigning events. This should be used to log the signing details of
- // requests for debugging. Will also enable LogDebug.
- LogDebugWithSigning LogLevelType = LogDebug | (1 << iota)
-
- // LogDebugWithHTTPBody states the SDK should log HTTP request and response
- // HTTP bodys in addition to the headers and path. This should be used to
- // see the body content of requests and responses made while using the SDK
- // Will also enable LogDebug.
- LogDebugWithHTTPBody
-
- // LogDebugWithRequestRetries states the SDK should log when service requests will
- // be retried. This should be used to log when you want to log when service
- // requests are being retried. Will also enable LogDebug.
- LogDebugWithRequestRetries
-
- // LogDebugWithRequestErrors states the SDK should log when service requests fail
- // to build, send, validate, or unmarshal.
- LogDebugWithRequestErrors
-
- // LogDebugWithEventStreamBody states the SDK should log EventStream
- // request and response bodys. This should be used to log the EventStream
- // wire unmarshaled message content of requests and responses made while
- // using the SDK Will also enable LogDebug.
- LogDebugWithEventStreamBody
-
- // LogDebugWithDeprecated states the SDK should log details about deprecated functionality.
- LogDebugWithDeprecated
-)
-
-// A Logger is a minimalistic interface for the SDK to log messages to. Should
-// be used to provide custom logging writers for the SDK to use.
-type Logger interface {
- Log(...interface{})
-}
-
-// A LoggerFunc is a convenience type to convert a function taking a variadic
-// list of arguments and wrap it so the Logger interface can be used.
-//
-// Example:
-// s3.New(sess, &aws.Config{Logger: aws.LoggerFunc(func(args ...interface{}) {
-// fmt.Fprintln(os.Stdout, args...)
-// })})
-type LoggerFunc func(...interface{})
-
-// Log calls the wrapped function with the arguments provided
-func (f LoggerFunc) Log(args ...interface{}) {
- f(args...)
-}
-
-// NewDefaultLogger returns a Logger which will write log messages to stdout, and
-// use same formatting runes as the stdlib log.Logger
-func NewDefaultLogger() Logger {
- return &defaultLogger{
- logger: log.New(os.Stdout, "", log.LstdFlags),
- }
-}
-
-// A defaultLogger provides a minimalistic logger satisfying the Logger interface.
-type defaultLogger struct {
- logger *log.Logger
-}
-
-// Log logs the parameters to the stdlib logger. See log.Println.
-func (l defaultLogger) Log(args ...interface{}) {
- l.logger.Println(args...)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go b/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go
deleted file mode 100644
index 2ba3c56c1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/connection_reset_error.go
+++ /dev/null
@@ -1,19 +0,0 @@
-package request
-
-import (
- "strings"
-)
-
-func isErrConnectionReset(err error) bool {
- if strings.Contains(err.Error(), "read: connection reset") {
- return false
- }
-
- if strings.Contains(err.Error(), "use of closed network connection") ||
- strings.Contains(err.Error(), "connection reset") ||
- strings.Contains(err.Error(), "broken pipe") {
- return true
- }
-
- return false
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
deleted file mode 100644
index e819ab6c0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/handlers.go
+++ /dev/null
@@ -1,343 +0,0 @@
-package request
-
-import (
- "fmt"
- "strings"
-)
-
-// A Handlers provides a collection of request handlers for various
-// stages of handling requests.
-type Handlers struct {
- Validate HandlerList
- Build HandlerList
- BuildStream HandlerList
- Sign HandlerList
- Send HandlerList
- ValidateResponse HandlerList
- Unmarshal HandlerList
- UnmarshalStream HandlerList
- UnmarshalMeta HandlerList
- UnmarshalError HandlerList
- Retry HandlerList
- AfterRetry HandlerList
- CompleteAttempt HandlerList
- Complete HandlerList
-}
-
-// Copy returns a copy of this handler's lists.
-func (h *Handlers) Copy() Handlers {
- return Handlers{
- Validate: h.Validate.copy(),
- Build: h.Build.copy(),
- BuildStream: h.BuildStream.copy(),
- Sign: h.Sign.copy(),
- Send: h.Send.copy(),
- ValidateResponse: h.ValidateResponse.copy(),
- Unmarshal: h.Unmarshal.copy(),
- UnmarshalStream: h.UnmarshalStream.copy(),
- UnmarshalError: h.UnmarshalError.copy(),
- UnmarshalMeta: h.UnmarshalMeta.copy(),
- Retry: h.Retry.copy(),
- AfterRetry: h.AfterRetry.copy(),
- CompleteAttempt: h.CompleteAttempt.copy(),
- Complete: h.Complete.copy(),
- }
-}
-
-// Clear removes callback functions for all handlers.
-func (h *Handlers) Clear() {
- h.Validate.Clear()
- h.Build.Clear()
- h.BuildStream.Clear()
- h.Send.Clear()
- h.Sign.Clear()
- h.Unmarshal.Clear()
- h.UnmarshalStream.Clear()
- h.UnmarshalMeta.Clear()
- h.UnmarshalError.Clear()
- h.ValidateResponse.Clear()
- h.Retry.Clear()
- h.AfterRetry.Clear()
- h.CompleteAttempt.Clear()
- h.Complete.Clear()
-}
-
-// IsEmpty returns if there are no handlers in any of the handlerlists.
-func (h *Handlers) IsEmpty() bool {
- if h.Validate.Len() != 0 {
- return false
- }
- if h.Build.Len() != 0 {
- return false
- }
- if h.BuildStream.Len() != 0 {
- return false
- }
- if h.Send.Len() != 0 {
- return false
- }
- if h.Sign.Len() != 0 {
- return false
- }
- if h.Unmarshal.Len() != 0 {
- return false
- }
- if h.UnmarshalStream.Len() != 0 {
- return false
- }
- if h.UnmarshalMeta.Len() != 0 {
- return false
- }
- if h.UnmarshalError.Len() != 0 {
- return false
- }
- if h.ValidateResponse.Len() != 0 {
- return false
- }
- if h.Retry.Len() != 0 {
- return false
- }
- if h.AfterRetry.Len() != 0 {
- return false
- }
- if h.CompleteAttempt.Len() != 0 {
- return false
- }
- if h.Complete.Len() != 0 {
- return false
- }
-
- return true
-}
-
-// A HandlerListRunItem represents an entry in the HandlerList which
-// is being run.
-type HandlerListRunItem struct {
- Index int
- Handler NamedHandler
- Request *Request
-}
-
-// A HandlerList manages zero or more handlers in a list.
-type HandlerList struct {
- list []NamedHandler
-
- // Called after each request handler in the list is called. If set
- // and the func returns true the HandlerList will continue to iterate
- // over the request handlers. If false is returned the HandlerList
- // will stop iterating.
- //
- // Should be used if extra logic to be performed between each handler
- // in the list. This can be used to terminate a list's iteration
- // based on a condition such as error like, HandlerListStopOnError.
- // Or for logging like HandlerListLogItem.
- AfterEachFn func(item HandlerListRunItem) bool
-}
-
-// A NamedHandler is a struct that contains a name and function callback.
-type NamedHandler struct {
- Name string
- Fn func(*Request)
-}
-
-// copy creates a copy of the handler list.
-func (l *HandlerList) copy() HandlerList {
- n := HandlerList{
- AfterEachFn: l.AfterEachFn,
- }
- if len(l.list) == 0 {
- return n
- }
-
- n.list = append(make([]NamedHandler, 0, len(l.list)), l.list...)
- return n
-}
-
-// Clear clears the handler list.
-func (l *HandlerList) Clear() {
- l.list = l.list[0:0]
-}
-
-// Len returns the number of handlers in the list.
-func (l *HandlerList) Len() int {
- return len(l.list)
-}
-
-// PushBack pushes handler f to the back of the handler list.
-func (l *HandlerList) PushBack(f func(*Request)) {
- l.PushBackNamed(NamedHandler{"__anonymous", f})
-}
-
-// PushBackNamed pushes named handler f to the back of the handler list.
-func (l *HandlerList) PushBackNamed(n NamedHandler) {
- if cap(l.list) == 0 {
- l.list = make([]NamedHandler, 0, 5)
- }
- l.list = append(l.list, n)
-}
-
-// PushFront pushes handler f to the front of the handler list.
-func (l *HandlerList) PushFront(f func(*Request)) {
- l.PushFrontNamed(NamedHandler{"__anonymous", f})
-}
-
-// PushFrontNamed pushes named handler f to the front of the handler list.
-func (l *HandlerList) PushFrontNamed(n NamedHandler) {
- if cap(l.list) == len(l.list) {
- // Allocating new list required
- l.list = append([]NamedHandler{n}, l.list...)
- } else {
- // Enough room to prepend into list.
- l.list = append(l.list, NamedHandler{})
- copy(l.list[1:], l.list)
- l.list[0] = n
- }
-}
-
-// Remove removes a NamedHandler n
-func (l *HandlerList) Remove(n NamedHandler) {
- l.RemoveByName(n.Name)
-}
-
-// RemoveByName removes a NamedHandler by name.
-func (l *HandlerList) RemoveByName(name string) {
- for i := 0; i < len(l.list); i++ {
- m := l.list[i]
- if m.Name == name {
- // Shift array preventing creating new arrays
- copy(l.list[i:], l.list[i+1:])
- l.list[len(l.list)-1] = NamedHandler{}
- l.list = l.list[:len(l.list)-1]
-
- // decrement list so next check to length is correct
- i--
- }
- }
-}
-
-// SwapNamed will swap out any existing handlers with the same name as the
-// passed in NamedHandler returning true if handlers were swapped. False is
-// returned otherwise.
-func (l *HandlerList) SwapNamed(n NamedHandler) (swapped bool) {
- for i := 0; i < len(l.list); i++ {
- if l.list[i].Name == n.Name {
- l.list[i].Fn = n.Fn
- swapped = true
- }
- }
-
- return swapped
-}
-
-// Swap will swap out all handlers matching the name passed in. The matched
-// handlers will be swapped in. True is returned if the handlers were swapped.
-func (l *HandlerList) Swap(name string, replace NamedHandler) bool {
- var swapped bool
-
- for i := 0; i < len(l.list); i++ {
- if l.list[i].Name == name {
- l.list[i] = replace
- swapped = true
- }
- }
-
- return swapped
-}
-
-// SetBackNamed will replace the named handler if it exists in the handler list.
-// If the handler does not exist the handler will be added to the end of the list.
-func (l *HandlerList) SetBackNamed(n NamedHandler) {
- if !l.SwapNamed(n) {
- l.PushBackNamed(n)
- }
-}
-
-// SetFrontNamed will replace the named handler if it exists in the handler list.
-// If the handler does not exist the handler will be added to the beginning of
-// the list.
-func (l *HandlerList) SetFrontNamed(n NamedHandler) {
- if !l.SwapNamed(n) {
- l.PushFrontNamed(n)
- }
-}
-
-// Run executes all handlers in the list with a given request object.
-func (l *HandlerList) Run(r *Request) {
- for i, h := range l.list {
- h.Fn(r)
- item := HandlerListRunItem{
- Index: i, Handler: h, Request: r,
- }
- if l.AfterEachFn != nil && !l.AfterEachFn(item) {
- return
- }
- }
-}
-
-// HandlerListLogItem logs the request handler and the state of the
-// request's Error value. Always returns true to continue iterating
-// request handlers in a HandlerList.
-func HandlerListLogItem(item HandlerListRunItem) bool {
- if item.Request.Config.Logger == nil {
- return true
- }
- item.Request.Config.Logger.Log("DEBUG: RequestHandler",
- item.Index, item.Handler.Name, item.Request.Error)
-
- return true
-}
-
-// HandlerListStopOnError returns false to stop the HandlerList iterating
-// over request handlers if Request.Error is not nil. True otherwise
-// to continue iterating.
-func HandlerListStopOnError(item HandlerListRunItem) bool {
- return item.Request.Error == nil
-}
-
-// WithAppendUserAgent will add a string to the user agent prefixed with a
-// single white space.
-func WithAppendUserAgent(s string) Option {
- return func(r *Request) {
- r.Handlers.Build.PushBack(func(r2 *Request) {
- AddToUserAgent(r, s)
- })
- }
-}
-
-// MakeAddToUserAgentHandler will add the name/version pair to the User-Agent request
-// header. If the extra parameters are provided they will be added as metadata to the
-// name/version pair resulting in the following format.
-// "name/version (extra0; extra1; ...)"
-// The user agent part will be concatenated with this current request's user agent string.
-func MakeAddToUserAgentHandler(name, version string, extra ...string) func(*Request) {
- ua := fmt.Sprintf("%s/%s", name, version)
- if len(extra) > 0 {
- ua += fmt.Sprintf(" (%s)", strings.Join(extra, "; "))
- }
- return func(r *Request) {
- AddToUserAgent(r, ua)
- }
-}
-
-// MakeAddToUserAgentFreeFormHandler adds the input to the User-Agent request header.
-// The input string will be concatenated with the current request's user agent string.
-func MakeAddToUserAgentFreeFormHandler(s string) func(*Request) {
- return func(r *Request) {
- AddToUserAgent(r, s)
- }
-}
-
-// WithSetRequestHeaders updates the operation request's HTTP header to contain
-// the header key value pairs provided. If the header key already exists in the
-// request's HTTP header set, the existing value(s) will be replaced.
-func WithSetRequestHeaders(h map[string]string) Option {
- return withRequestHeader(h).SetRequestHeaders
-}
-
-type withRequestHeader map[string]string
-
-func (h withRequestHeader) SetRequestHeaders(r *Request) {
- for k, v := range h {
- r.HTTPRequest.Header[k] = []string{v}
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go
deleted file mode 100644
index 79f79602b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/http_request.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package request
-
-import (
- "io"
- "net/http"
- "net/url"
-)
-
-func copyHTTPRequest(r *http.Request, body io.ReadCloser) *http.Request {
- req := new(http.Request)
- *req = *r
- req.URL = &url.URL{}
- *req.URL = *r.URL
- req.Body = body
-
- req.Header = http.Header{}
- for k, v := range r.Header {
- for _, vv := range v {
- req.Header.Add(k, vv)
- }
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go b/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go
deleted file mode 100644
index 9370fa50c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/offset_reader.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package request
-
-import (
- "io"
- "sync"
-
- "github.com/aws/aws-sdk-go/internal/sdkio"
-)
-
-// offsetReader is a thread-safe io.ReadCloser to prevent racing
-// with retrying requests
-type offsetReader struct {
- buf io.ReadSeeker
- lock sync.Mutex
- closed bool
-}
-
-func newOffsetReader(buf io.ReadSeeker, offset int64) (*offsetReader, error) {
- reader := &offsetReader{}
- _, err := buf.Seek(offset, sdkio.SeekStart)
- if err != nil {
- return nil, err
- }
-
- reader.buf = buf
- return reader, nil
-}
-
-// Close will close the instance of the offset reader's access to
-// the underlying io.ReadSeeker.
-func (o *offsetReader) Close() error {
- o.lock.Lock()
- defer o.lock.Unlock()
- o.closed = true
- return nil
-}
-
-// Read is a thread-safe read of the underlying io.ReadSeeker
-func (o *offsetReader) Read(p []byte) (int, error) {
- o.lock.Lock()
- defer o.lock.Unlock()
-
- if o.closed {
- return 0, io.EOF
- }
-
- return o.buf.Read(p)
-}
-
-// Seek is a thread-safe seeking operation.
-func (o *offsetReader) Seek(offset int64, whence int) (int64, error) {
- o.lock.Lock()
- defer o.lock.Unlock()
-
- return o.buf.Seek(offset, whence)
-}
-
-// CloseAndCopy will return a new offsetReader with a copy of the old buffer
-// and close the old buffer.
-func (o *offsetReader) CloseAndCopy(offset int64) (*offsetReader, error) {
- if err := o.Close(); err != nil {
- return nil, err
- }
- return newOffsetReader(o.buf, offset)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
deleted file mode 100644
index fb0a68fce..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go
+++ /dev/null
@@ -1,713 +0,0 @@
-package request
-
-import (
- "bytes"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "reflect"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/internal/sdkio"
-)
-
-const (
- // ErrCodeSerialization is the serialization error code that is received
- // during protocol unmarshaling.
- ErrCodeSerialization = "SerializationError"
-
- // ErrCodeRead is an error that is returned during HTTP reads.
- ErrCodeRead = "ReadError"
-
- // ErrCodeResponseTimeout is the connection timeout error that is received
- // during body reads.
- ErrCodeResponseTimeout = "ResponseTimeout"
-
- // ErrCodeInvalidPresignExpire is returned when the expire time provided to
- // presign is invalid
- ErrCodeInvalidPresignExpire = "InvalidPresignExpireError"
-
- // CanceledErrorCode is the error code that will be returned by an
- // API request that was canceled. Requests given a aws.Context may
- // return this error when canceled.
- CanceledErrorCode = "RequestCanceled"
-
- // ErrCodeRequestError is an error preventing the SDK from continuing to
- // process the request.
- ErrCodeRequestError = "RequestError"
-)
-
-// A Request is the service request to be made.
-type Request struct {
- Config aws.Config
- ClientInfo metadata.ClientInfo
- Handlers Handlers
-
- Retryer
- AttemptTime time.Time
- Time time.Time
- Operation *Operation
- HTTPRequest *http.Request
- HTTPResponse *http.Response
- Body io.ReadSeeker
- streamingBody io.ReadCloser
- BodyStart int64 // offset from beginning of Body that the request body starts
- Params interface{}
- Error error
- Data interface{}
- RequestID string
- RetryCount int
- Retryable *bool
- RetryDelay time.Duration
- NotHoist bool
- SignedHeaderVals http.Header
- LastSignedAt time.Time
- DisableFollowRedirects bool
-
- // Additional API error codes that should be retried. IsErrorRetryable
- // will consider these codes in addition to its built in cases.
- RetryErrorCodes []string
-
- // Additional API error codes that should be retried with throttle backoff
- // delay. IsErrorThrottle will consider these codes in addition to its
- // built in cases.
- ThrottleErrorCodes []string
-
- // A value greater than 0 instructs the request to be signed as Presigned URL
- // You should not set this field directly. Instead use Request's
- // Presign or PresignRequest methods.
- ExpireTime time.Duration
-
- context aws.Context
-
- built bool
-
- // Need to persist an intermediate body between the input Body and HTTP
- // request body because the HTTP Client's transport can maintain a reference
- // to the HTTP request's body after the client has returned. This value is
- // safe to use concurrently and wrap the input Body for each HTTP request.
- safeBody *offsetReader
-}
-
-// An Operation is the service API operation to be made.
-type Operation struct {
- Name string
- HTTPMethod string
- HTTPPath string
- *Paginator
-
- BeforePresignFn func(r *Request) error
-}
-
-// New returns a new Request pointer for the service API operation and
-// parameters.
-//
-// A Retryer should be provided to direct how the request is retried. If
-// Retryer is nil, a default no retry value will be used. You can use
-// NoOpRetryer in the Client package to disable retry behavior directly.
-//
-// Params is any value of input parameters to be the request payload.
-// Data is pointer value to an object which the request's response
-// payload will be deserialized to.
-func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers,
- retryer Retryer, operation *Operation, params interface{}, data interface{}) *Request {
-
- if retryer == nil {
- retryer = noOpRetryer{}
- }
-
- method := operation.HTTPMethod
- if method == "" {
- method = "POST"
- }
-
- httpReq, _ := http.NewRequest(method, "", nil)
-
- var err error
- httpReq.URL, err = url.Parse(clientInfo.Endpoint)
- if err != nil {
- httpReq.URL = &url.URL{}
- err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err)
- }
-
- if len(operation.HTTPPath) != 0 {
- opHTTPPath := operation.HTTPPath
- var opQueryString string
- if idx := strings.Index(opHTTPPath, "?"); idx >= 0 {
- opQueryString = opHTTPPath[idx+1:]
- opHTTPPath = opHTTPPath[:idx]
- }
-
- if strings.HasSuffix(httpReq.URL.Path, "/") && strings.HasPrefix(opHTTPPath, "/") {
- opHTTPPath = opHTTPPath[1:]
- }
- httpReq.URL.Path += opHTTPPath
- httpReq.URL.RawQuery = opQueryString
- }
-
- r := &Request{
- Config: cfg,
- ClientInfo: clientInfo,
- Handlers: handlers.Copy(),
-
- Retryer: retryer,
- Time: time.Now(),
- ExpireTime: 0,
- Operation: operation,
- HTTPRequest: httpReq,
- Body: nil,
- Params: params,
- Error: err,
- Data: data,
- }
- r.SetBufferBody([]byte{})
-
- return r
-}
-
-// A Option is a functional option that can augment or modify a request when
-// using a WithContext API operation method.
-type Option func(*Request)
-
-// WithGetResponseHeader builds a request Option which will retrieve a single
-// header value from the HTTP Response. If there are multiple values for the
-// header key use WithGetResponseHeaders instead to access the http.Header
-// map directly. The passed in val pointer must be non-nil.
-//
-// This Option can be used multiple times with a single API operation.
-//
-// var id2, versionID string
-// svc.PutObjectWithContext(ctx, params,
-// request.WithGetResponseHeader("x-amz-id-2", &id2),
-// request.WithGetResponseHeader("x-amz-version-id", &versionID),
-// )
-func WithGetResponseHeader(key string, val *string) Option {
- return func(r *Request) {
- r.Handlers.Complete.PushBack(func(req *Request) {
- *val = req.HTTPResponse.Header.Get(key)
- })
- }
-}
-
-// WithGetResponseHeaders builds a request Option which will retrieve the
-// headers from the HTTP response and assign them to the passed in headers
-// variable. The passed in headers pointer must be non-nil.
-//
-// var headers http.Header
-// svc.PutObjectWithContext(ctx, params, request.WithGetResponseHeaders(&headers))
-func WithGetResponseHeaders(headers *http.Header) Option {
- return func(r *Request) {
- r.Handlers.Complete.PushBack(func(req *Request) {
- *headers = req.HTTPResponse.Header
- })
- }
-}
-
-// WithLogLevel is a request option that will set the request to use a specific
-// log level when the request is made.
-//
-// svc.PutObjectWithContext(ctx, params, request.WithLogLevel(aws.LogDebugWithHTTPBody)
-func WithLogLevel(l aws.LogLevelType) Option {
- return func(r *Request) {
- r.Config.LogLevel = aws.LogLevel(l)
- }
-}
-
-// ApplyOptions will apply each option to the request calling them in the order
-// the were provided.
-func (r *Request) ApplyOptions(opts ...Option) {
- for _, opt := range opts {
- opt(r)
- }
-}
-
-// Context will always returns a non-nil context. If Request does not have a
-// context aws.BackgroundContext will be returned.
-func (r *Request) Context() aws.Context {
- if r.context != nil {
- return r.context
- }
- return aws.BackgroundContext()
-}
-
-// SetContext adds a Context to the current request that can be used to cancel
-// a in-flight request. The Context value must not be nil, or this method will
-// panic.
-//
-// Unlike http.Request.WithContext, SetContext does not return a copy of the
-// Request. It is not safe to use use a single Request value for multiple
-// requests. A new Request should be created for each API operation request.
-//
-// Go 1.6 and below:
-// The http.Request's Cancel field will be set to the Done() value of
-// the context. This will overwrite the Cancel field's value.
-//
-// Go 1.7 and above:
-// The http.Request.WithContext will be used to set the context on the underlying
-// http.Request. This will create a shallow copy of the http.Request. The SDK
-// may create sub contexts in the future for nested requests such as retries.
-func (r *Request) SetContext(ctx aws.Context) {
- if ctx == nil {
- panic("context cannot be nil")
- }
- setRequestContext(r, ctx)
-}
-
-// WillRetry returns if the request's can be retried.
-func (r *Request) WillRetry() bool {
- if !aws.IsReaderSeekable(r.Body) && r.HTTPRequest.Body != NoBody {
- return false
- }
- return r.Error != nil && aws.BoolValue(r.Retryable) && r.RetryCount < r.MaxRetries()
-}
-
-func fmtAttemptCount(retryCount, maxRetries int) string {
- return fmt.Sprintf("attempt %v/%v", retryCount, maxRetries)
-}
-
-// ParamsFilled returns if the request's parameters have been populated
-// and the parameters are valid. False is returned if no parameters are
-// provided or invalid.
-func (r *Request) ParamsFilled() bool {
- return r.Params != nil && reflect.ValueOf(r.Params).Elem().IsValid()
-}
-
-// DataFilled returns true if the request's data for response deserialization
-// target has been set and is a valid. False is returned if data is not
-// set, or is invalid.
-func (r *Request) DataFilled() bool {
- return r.Data != nil && reflect.ValueOf(r.Data).Elem().IsValid()
-}
-
-// SetBufferBody will set the request's body bytes that will be sent to
-// the service API.
-func (r *Request) SetBufferBody(buf []byte) {
- r.SetReaderBody(bytes.NewReader(buf))
-}
-
-// SetStringBody sets the body of the request to be backed by a string.
-func (r *Request) SetStringBody(s string) {
- r.SetReaderBody(strings.NewReader(s))
-}
-
-// SetReaderBody will set the request's body reader.
-func (r *Request) SetReaderBody(reader io.ReadSeeker) {
- r.Body = reader
-
- if aws.IsReaderSeekable(reader) {
- var err error
- // Get the Bodies current offset so retries will start from the same
- // initial position.
- r.BodyStart, err = reader.Seek(0, sdkio.SeekCurrent)
- if err != nil {
- r.Error = awserr.New(ErrCodeSerialization,
- "failed to determine start of request body", err)
- return
- }
- }
- r.ResetBody()
-}
-
-// SetStreamingBody set the reader to be used for the request that will stream
-// bytes to the server. Request's Body must not be set to any reader.
-func (r *Request) SetStreamingBody(reader io.ReadCloser) {
- r.streamingBody = reader
- r.SetReaderBody(aws.ReadSeekCloser(reader))
-}
-
-// Presign returns the request's signed URL. Error will be returned
-// if the signing fails. The expire parameter is only used for presigned Amazon
-// S3 API requests. All other AWS services will use a fixed expiration
-// time of 15 minutes.
-//
-// It is invalid to create a presigned URL with a expire duration 0 or less. An
-// error is returned if expire duration is 0 or less.
-func (r *Request) Presign(expire time.Duration) (string, error) {
- r = r.copy()
-
- // Presign requires all headers be hoisted. There is no way to retrieve
- // the signed headers not hoisted without this. Making the presigned URL
- // useless.
- r.NotHoist = false
-
- u, _, err := getPresignedURL(r, expire)
- return u, err
-}
-
-// PresignRequest behaves just like presign, with the addition of returning a
-// set of headers that were signed. The expire parameter is only used for
-// presigned Amazon S3 API requests. All other AWS services will use a fixed
-// expiration time of 15 minutes.
-//
-// It is invalid to create a presigned URL with a expire duration 0 or less. An
-// error is returned if expire duration is 0 or less.
-//
-// Returns the URL string for the API operation with signature in the query string,
-// and the HTTP headers that were included in the signature. These headers must
-// be included in any HTTP request made with the presigned URL.
-//
-// To prevent hoisting any headers to the query string set NotHoist to true on
-// this Request value prior to calling PresignRequest.
-func (r *Request) PresignRequest(expire time.Duration) (string, http.Header, error) {
- r = r.copy()
- return getPresignedURL(r, expire)
-}
-
-// IsPresigned returns true if the request represents a presigned API url.
-func (r *Request) IsPresigned() bool {
- return r.ExpireTime != 0
-}
-
-func getPresignedURL(r *Request, expire time.Duration) (string, http.Header, error) {
- if expire <= 0 {
- return "", nil, awserr.New(
- ErrCodeInvalidPresignExpire,
- "presigned URL requires an expire duration greater than 0",
- nil,
- )
- }
-
- r.ExpireTime = expire
-
- if r.Operation.BeforePresignFn != nil {
- if err := r.Operation.BeforePresignFn(r); err != nil {
- return "", nil, err
- }
- }
-
- if err := r.Sign(); err != nil {
- return "", nil, err
- }
-
- return r.HTTPRequest.URL.String(), r.SignedHeaderVals, nil
-}
-
-const (
- notRetrying = "not retrying"
-)
-
-func debugLogReqError(r *Request, stage, retryStr string, err error) {
- if !r.Config.LogLevel.Matches(aws.LogDebugWithRequestErrors) {
- return
- }
-
- r.Config.Logger.Log(fmt.Sprintf("DEBUG: %s %s/%s failed, %s, error %v",
- stage, r.ClientInfo.ServiceName, r.Operation.Name, retryStr, err))
-}
-
-// Build will build the request's object so it can be signed and sent
-// to the service. Build will also validate all the request's parameters.
-// Any additional build Handlers set on this request will be run
-// in the order they were set.
-//
-// The request will only be built once. Multiple calls to build will have
-// no effect.
-//
-// If any Validate or Build errors occur the build will stop and the error
-// which occurred will be returned.
-func (r *Request) Build() error {
- if !r.built {
- r.Handlers.Validate.Run(r)
- if r.Error != nil {
- debugLogReqError(r, "Validate Request", notRetrying, r.Error)
- return r.Error
- }
- r.Handlers.Build.Run(r)
- if r.Error != nil {
- debugLogReqError(r, "Build Request", notRetrying, r.Error)
- return r.Error
- }
- r.built = true
- }
-
- return r.Error
-}
-
-// Sign will sign the request, returning error if errors are encountered.
-//
-// Sign will build the request prior to signing. All Sign Handlers will
-// be executed in the order they were set.
-func (r *Request) Sign() error {
- r.Build()
- if r.Error != nil {
- debugLogReqError(r, "Build Request", notRetrying, r.Error)
- return r.Error
- }
-
- SanitizeHostForHeader(r.HTTPRequest)
-
- r.Handlers.Sign.Run(r)
- return r.Error
-}
-
-func (r *Request) getNextRequestBody() (body io.ReadCloser, err error) {
- if r.streamingBody != nil {
- return r.streamingBody, nil
- }
-
- if r.safeBody != nil {
- r.safeBody.Close()
- }
-
- r.safeBody, err = newOffsetReader(r.Body, r.BodyStart)
- if err != nil {
- return nil, awserr.New(ErrCodeSerialization,
- "failed to get next request body reader", err)
- }
-
- // Go 1.8 tightened and clarified the rules code needs to use when building
- // requests with the http package. Go 1.8 removed the automatic detection
- // of if the Request.Body was empty, or actually had bytes in it. The SDK
- // always sets the Request.Body even if it is empty and should not actually
- // be sent. This is incorrect.
- //
- // Go 1.8 did add a http.NoBody value that the SDK can use to tell the http
- // client that the request really should be sent without a body. The
- // Request.Body cannot be set to nil, which is preferable, because the
- // field is exported and could introduce nil pointer dereferences for users
- // of the SDK if they used that field.
- //
- // Related golang/go#18257
- l, err := aws.SeekerLen(r.Body)
- if err != nil {
- return nil, awserr.New(ErrCodeSerialization,
- "failed to compute request body size", err)
- }
-
- if l == 0 {
- body = NoBody
- } else if l > 0 {
- body = r.safeBody
- } else {
- // Hack to prevent sending bodies for methods where the body
- // should be ignored by the server. Sending bodies on these
- // methods without an associated ContentLength will cause the
- // request to socket timeout because the server does not handle
- // Transfer-Encoding: chunked bodies for these methods.
- //
- // This would only happen if a aws.ReaderSeekerCloser was used with
- // a io.Reader that was not also an io.Seeker, or did not implement
- // Len() method.
- switch r.Operation.HTTPMethod {
- case "GET", "HEAD", "DELETE":
- body = NoBody
- default:
- body = r.safeBody
- }
- }
-
- return body, nil
-}
-
-// GetBody will return an io.ReadSeeker of the Request's underlying
-// input body with a concurrency safe wrapper.
-func (r *Request) GetBody() io.ReadSeeker {
- return r.safeBody
-}
-
-// Send will send the request, returning error if errors are encountered.
-//
-// Send will sign the request prior to sending. All Send Handlers will
-// be executed in the order they were set.
-//
-// Canceling a request is non-deterministic. If a request has been canceled,
-// then the transport will choose, randomly, one of the state channels during
-// reads or getting the connection.
-//
-// readLoop() and getConn(req *Request, cm connectMethod)
-// https://github.com/golang/go/blob/master/src/net/http/transport.go
-//
-// Send will not close the request.Request's body.
-func (r *Request) Send() error {
- defer func() {
- // Regardless of success or failure of the request trigger the Complete
- // request handlers.
- r.Handlers.Complete.Run(r)
- }()
-
- if err := r.Error; err != nil {
- return err
- }
-
- for {
- r.Error = nil
- r.AttemptTime = time.Now()
-
- if err := r.Sign(); err != nil {
- debugLogReqError(r, "Sign Request", notRetrying, err)
- return err
- }
-
- if err := r.sendRequest(); err == nil {
- return nil
- }
- r.Handlers.Retry.Run(r)
- r.Handlers.AfterRetry.Run(r)
-
- if r.Error != nil || !aws.BoolValue(r.Retryable) {
- return r.Error
- }
-
- if err := r.prepareRetry(); err != nil {
- r.Error = err
- return err
- }
- }
-}
-
-func (r *Request) prepareRetry() error {
- if r.Config.LogLevel.Matches(aws.LogDebugWithRequestRetries) {
- r.Config.Logger.Log(fmt.Sprintf("DEBUG: Retrying Request %s/%s, attempt %d",
- r.ClientInfo.ServiceName, r.Operation.Name, r.RetryCount))
- }
-
- // The previous http.Request will have a reference to the r.Body
- // and the HTTP Client's Transport may still be reading from
- // the request's body even though the Client's Do returned.
- r.HTTPRequest = copyHTTPRequest(r.HTTPRequest, nil)
- r.ResetBody()
- if err := r.Error; err != nil {
- return awserr.New(ErrCodeSerialization,
- "failed to prepare body for retry", err)
-
- }
-
- // Closing response body to ensure that no response body is leaked
- // between retry attempts.
- if r.HTTPResponse != nil && r.HTTPResponse.Body != nil {
- r.HTTPResponse.Body.Close()
- }
-
- return nil
-}
-
-func (r *Request) sendRequest() (sendErr error) {
- defer r.Handlers.CompleteAttempt.Run(r)
-
- r.Retryable = nil
- r.Handlers.Send.Run(r)
- if r.Error != nil {
- debugLogReqError(r, "Send Request",
- fmtAttemptCount(r.RetryCount, r.MaxRetries()),
- r.Error)
- return r.Error
- }
-
- r.Handlers.UnmarshalMeta.Run(r)
- r.Handlers.ValidateResponse.Run(r)
- if r.Error != nil {
- r.Handlers.UnmarshalError.Run(r)
- debugLogReqError(r, "Validate Response",
- fmtAttemptCount(r.RetryCount, r.MaxRetries()),
- r.Error)
- return r.Error
- }
-
- r.Handlers.Unmarshal.Run(r)
- if r.Error != nil {
- debugLogReqError(r, "Unmarshal Response",
- fmtAttemptCount(r.RetryCount, r.MaxRetries()),
- r.Error)
- return r.Error
- }
-
- return nil
-}
-
-// copy will copy a request which will allow for local manipulation of the
-// request.
-func (r *Request) copy() *Request {
- req := &Request{}
- *req = *r
- req.Handlers = r.Handlers.Copy()
- op := *r.Operation
- req.Operation = &op
- return req
-}
-
-// AddToUserAgent adds the string to the end of the request's current user agent.
-func AddToUserAgent(r *Request, s string) {
- curUA := r.HTTPRequest.Header.Get("User-Agent")
- if len(curUA) > 0 {
- s = curUA + " " + s
- }
- r.HTTPRequest.Header.Set("User-Agent", s)
-}
-
-// SanitizeHostForHeader removes default port from host and updates request.Host
-func SanitizeHostForHeader(r *http.Request) {
- host := getHost(r)
- port := portOnly(host)
- if port != "" && isDefaultPort(r.URL.Scheme, port) {
- r.Host = stripPort(host)
- }
-}
-
-// Returns host from request
-func getHost(r *http.Request) string {
- if r.Host != "" {
- return r.Host
- }
-
- if r.URL == nil {
- return ""
- }
-
- return r.URL.Host
-}
-
-// Hostname returns u.Host, without any port number.
-//
-// If Host is an IPv6 literal with a port number, Hostname returns the
-// IPv6 literal without the square brackets. IPv6 literals may include
-// a zone identifier.
-//
-// Copied from the Go 1.8 standard library (net/url)
-func stripPort(hostport string) string {
- colon := strings.IndexByte(hostport, ':')
- if colon == -1 {
- return hostport
- }
- if i := strings.IndexByte(hostport, ']'); i != -1 {
- return strings.TrimPrefix(hostport[:i], "[")
- }
- return hostport[:colon]
-}
-
-// Port returns the port part of u.Host, without the leading colon.
-// If u.Host doesn't contain a port, Port returns an empty string.
-//
-// Copied from the Go 1.8 standard library (net/url)
-func portOnly(hostport string) string {
- colon := strings.IndexByte(hostport, ':')
- if colon == -1 {
- return ""
- }
- if i := strings.Index(hostport, "]:"); i != -1 {
- return hostport[i+len("]:"):]
- }
- if strings.Contains(hostport, "]") {
- return ""
- }
- return hostport[colon+len(":"):]
-}
-
-// Returns true if the specified URI is using the standard port
-// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs)
-func isDefaultPort(scheme, port string) bool {
- if port == "" {
- return true
- }
-
- lowerCaseScheme := strings.ToLower(scheme)
- if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") {
- return true
- }
-
- return false
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
deleted file mode 100644
index 5921b8ff2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
+++ /dev/null
@@ -1,40 +0,0 @@
-//go:build !go1.8
-// +build !go1.8
-
-package request
-
-import "io"
-
-// NoBody is an io.ReadCloser with no bytes. Read always returns EOF
-// and Close always returns nil. It can be used in an outgoing client
-// request to explicitly signal that a request has zero bytes.
-// An alternative, however, is to simply set Request.Body to nil.
-//
-// Copy of Go 1.8 NoBody type from net/http/http.go
-type noBody struct{}
-
-func (noBody) Read([]byte) (int, error) { return 0, io.EOF }
-func (noBody) Close() error { return nil }
-func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil }
-
-// NoBody is an empty reader that will trigger the Go HTTP client to not include
-// and body in the HTTP request.
-var NoBody = noBody{}
-
-// ResetBody rewinds the request body back to its starting position, and
-// sets the HTTP Request body reference. When the body is read prior
-// to being sent in the HTTP request it will need to be rewound.
-//
-// ResetBody will automatically be called by the SDK's build handler, but if
-// the request is being used directly ResetBody must be called before the request
-// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
-// call ResetBody.
-func (r *Request) ResetBody() {
- body, err := r.getNextRequestBody()
- if err != nil {
- r.Error = err
- return
- }
-
- r.HTTPRequest.Body = body
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
deleted file mode 100644
index ea643c9c4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_8.go
+++ /dev/null
@@ -1,37 +0,0 @@
-//go:build go1.8
-// +build go1.8
-
-package request
-
-import (
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// NoBody is a http.NoBody reader instructing Go HTTP client to not include
-// and body in the HTTP request.
-var NoBody = http.NoBody
-
-// ResetBody rewinds the request body back to its starting position, and
-// sets the HTTP Request body reference. When the body is read prior
-// to being sent in the HTTP request it will need to be rewound.
-//
-// ResetBody will automatically be called by the SDK's build handler, but if
-// the request is being used directly ResetBody must be called before the request
-// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
-// call ResetBody.
-//
-// Will also set the Go 1.8's http.Request.GetBody member to allow retrying
-// PUT/POST redirects.
-func (r *Request) ResetBody() {
- body, err := r.getNextRequestBody()
- if err != nil {
- r.Error = awserr.New(ErrCodeSerialization,
- "failed to reset request body", err)
- return
- }
-
- r.HTTPRequest.Body = body
- r.HTTPRequest.GetBody = r.getNextRequestBody
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
deleted file mode 100644
index d8c505302..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context.go
+++ /dev/null
@@ -1,15 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package request
-
-import "github.com/aws/aws-sdk-go/aws"
-
-// setContext updates the Request to use the passed in context for cancellation.
-// Context will also be used for request retry delay.
-//
-// Creates shallow copy of the http.Request with the WithContext method.
-func setRequestContext(r *Request, ctx aws.Context) {
- r.context = ctx
- r.HTTPRequest = r.HTTPRequest.WithContext(ctx)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
deleted file mode 100644
index 49a243ef2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_context_1_6.go
+++ /dev/null
@@ -1,15 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package request
-
-import "github.com/aws/aws-sdk-go/aws"
-
-// setContext updates the Request to use the passed in context for cancellation.
-// Context will also be used for request retry delay.
-//
-// Creates shallow copy of the http.Request with the WithContext method.
-func setRequestContext(r *Request, ctx aws.Context) {
- r.context = ctx
- r.HTTPRequest.Cancel = ctx.Done()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
deleted file mode 100644
index 64784e16f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_pagination.go
+++ /dev/null
@@ -1,266 +0,0 @@
-package request
-
-import (
- "reflect"
- "sync/atomic"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
-)
-
-// A Pagination provides paginating of SDK API operations which are paginatable.
-// Generally you should not use this type directly, but use the "Pages" API
-// operations method to automatically perform pagination for you. Such as,
-// "S3.ListObjectsPages", and "S3.ListObjectsPagesWithContext" methods.
-//
-// Pagination differs from a Paginator type in that pagination is the type that
-// does the pagination between API operations, and Paginator defines the
-// configuration that will be used per page request.
-//
-// for p.Next() {
-// data := p.Page().(*s3.ListObjectsOutput)
-// // process the page's data
-// // ...
-// // break out of loop to stop fetching additional pages
-// }
-//
-// return p.Err()
-//
-// See service client API operation Pages methods for examples how the SDK will
-// use the Pagination type.
-type Pagination struct {
- // Function to return a Request value for each pagination request.
- // Any configuration or handlers that need to be applied to the request
- // prior to getting the next page should be done here before the request
- // returned.
- //
- // NewRequest should always be built from the same API operations. It is
- // undefined if different API operations are returned on subsequent calls.
- NewRequest func() (*Request, error)
- // EndPageOnSameToken, when enabled, will allow the paginator to stop on
- // token that are the same as its previous tokens.
- EndPageOnSameToken bool
-
- started bool
- prevTokens []interface{}
- nextTokens []interface{}
-
- err error
- curPage interface{}
-}
-
-// HasNextPage will return true if Pagination is able to determine that the API
-// operation has additional pages. False will be returned if there are no more
-// pages remaining.
-//
-// Will always return true if Next has not been called yet.
-func (p *Pagination) HasNextPage() bool {
- if !p.started {
- return true
- }
-
- hasNextPage := len(p.nextTokens) != 0
- if p.EndPageOnSameToken {
- return hasNextPage && !awsutil.DeepEqual(p.nextTokens, p.prevTokens)
- }
- return hasNextPage
-}
-
-// Err returns the error Pagination encountered when retrieving the next page.
-func (p *Pagination) Err() error {
- return p.err
-}
-
-// Page returns the current page. Page should only be called after a successful
-// call to Next. It is undefined what Page will return if Page is called after
-// Next returns false.
-func (p *Pagination) Page() interface{} {
- return p.curPage
-}
-
-// Next will attempt to retrieve the next page for the API operation. When a page
-// is retrieved true will be returned. If the page cannot be retrieved, or there
-// are no more pages false will be returned.
-//
-// Use the Page method to retrieve the current page data. The data will need
-// to be cast to the API operation's output type.
-//
-// Use the Err method to determine if an error occurred if Page returns false.
-func (p *Pagination) Next() bool {
- if !p.HasNextPage() {
- return false
- }
-
- req, err := p.NewRequest()
- if err != nil {
- p.err = err
- return false
- }
-
- if p.started {
- for i, intok := range req.Operation.InputTokens {
- awsutil.SetValueAtPath(req.Params, intok, p.nextTokens[i])
- }
- }
- p.started = true
-
- err = req.Send()
- if err != nil {
- p.err = err
- return false
- }
-
- p.prevTokens = p.nextTokens
- p.nextTokens = req.nextPageTokens()
- p.curPage = req.Data
-
- return true
-}
-
-// A Paginator is the configuration data that defines how an API operation
-// should be paginated. This type is used by the API service models to define
-// the generated pagination config for service APIs.
-//
-// The Pagination type is what provides iterating between pages of an API. It
-// is only used to store the token metadata the SDK should use for performing
-// pagination.
-type Paginator struct {
- InputTokens []string
- OutputTokens []string
- LimitToken string
- TruncationToken string
-}
-
-// nextPageTokens returns the tokens to use when asking for the next page of data.
-func (r *Request) nextPageTokens() []interface{} {
- if r.Operation.Paginator == nil {
- return nil
- }
- if r.Operation.TruncationToken != "" {
- tr, _ := awsutil.ValuesAtPath(r.Data, r.Operation.TruncationToken)
- if len(tr) == 0 {
- return nil
- }
-
- switch v := tr[0].(type) {
- case *bool:
- if !aws.BoolValue(v) {
- return nil
- }
- case bool:
- if !v {
- return nil
- }
- }
- }
-
- tokens := []interface{}{}
- tokenAdded := false
- for _, outToken := range r.Operation.OutputTokens {
- vs, _ := awsutil.ValuesAtPath(r.Data, outToken)
- if len(vs) == 0 {
- tokens = append(tokens, nil)
- continue
- }
- v := vs[0]
-
- switch tv := v.(type) {
- case *string:
- if len(aws.StringValue(tv)) == 0 {
- tokens = append(tokens, nil)
- continue
- }
- case string:
- if len(tv) == 0 {
- tokens = append(tokens, nil)
- continue
- }
- }
-
- tokenAdded = true
- tokens = append(tokens, v)
- }
- if !tokenAdded {
- return nil
- }
-
- return tokens
-}
-
-// Ensure a deprecated item is only logged once instead of each time its used.
-func logDeprecatedf(logger aws.Logger, flag *int32, msg string) {
- if logger == nil {
- return
- }
- if atomic.CompareAndSwapInt32(flag, 0, 1) {
- logger.Log(msg)
- }
-}
-
-var (
- logDeprecatedHasNextPage int32
- logDeprecatedNextPage int32
- logDeprecatedEachPage int32
-)
-
-// HasNextPage returns true if this request has more pages of data available.
-//
-// Deprecated Use Pagination type for configurable pagination of API operations
-func (r *Request) HasNextPage() bool {
- logDeprecatedf(r.Config.Logger, &logDeprecatedHasNextPage,
- "Request.HasNextPage deprecated. Use Pagination type for configurable pagination of API operations")
-
- return len(r.nextPageTokens()) > 0
-}
-
-// NextPage returns a new Request that can be executed to return the next
-// page of result data. Call .Send() on this request to execute it.
-//
-// Deprecated Use Pagination type for configurable pagination of API operations
-func (r *Request) NextPage() *Request {
- logDeprecatedf(r.Config.Logger, &logDeprecatedNextPage,
- "Request.NextPage deprecated. Use Pagination type for configurable pagination of API operations")
-
- tokens := r.nextPageTokens()
- if len(tokens) == 0 {
- return nil
- }
-
- data := reflect.New(reflect.TypeOf(r.Data).Elem()).Interface()
- nr := New(r.Config, r.ClientInfo, r.Handlers, r.Retryer, r.Operation, awsutil.CopyOf(r.Params), data)
- for i, intok := range nr.Operation.InputTokens {
- awsutil.SetValueAtPath(nr.Params, intok, tokens[i])
- }
- return nr
-}
-
-// EachPage iterates over each page of a paginated request object. The fn
-// parameter should be a function with the following sample signature:
-//
-// func(page *T, lastPage bool) bool {
-// return true // return false to stop iterating
-// }
-//
-// Where "T" is the structure type matching the output structure of the given
-// operation. For example, a request object generated by
-// DynamoDB.ListTablesRequest() would expect to see dynamodb.ListTablesOutput
-// as the structure "T". The lastPage value represents whether the page is
-// the last page of data or not. The return value of this function should
-// return true to keep iterating or false to stop.
-//
-// Deprecated Use Pagination type for configurable pagination of API operations
-func (r *Request) EachPage(fn func(data interface{}, isLastPage bool) (shouldContinue bool)) error {
- logDeprecatedf(r.Config.Logger, &logDeprecatedEachPage,
- "Request.EachPage deprecated. Use Pagination type for configurable pagination of API operations")
-
- for page := r; page != nil; page = page.NextPage() {
- if err := page.Send(); err != nil {
- return err
- }
- if getNextPage := fn(page.Data, !page.HasNextPage()); !getNextPage {
- return page.Error
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
deleted file mode 100644
index 752ae47f8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/retryer.go
+++ /dev/null
@@ -1,309 +0,0 @@
-package request
-
-import (
- "net"
- "net/url"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// Retryer provides the interface drive the SDK's request retry behavior. The
-// Retryer implementation is responsible for implementing exponential backoff,
-// and determine if a request API error should be retried.
-//
-// client.DefaultRetryer is the SDK's default implementation of the Retryer. It
-// uses the which uses the Request.IsErrorRetryable and Request.IsErrorThrottle
-// methods to determine if the request is retried.
-type Retryer interface {
- // RetryRules return the retry delay that should be used by the SDK before
- // making another request attempt for the failed request.
- RetryRules(*Request) time.Duration
-
- // ShouldRetry returns if the failed request is retryable.
- //
- // Implementations may consider request attempt count when determining if a
- // request is retryable, but the SDK will use MaxRetries to limit the
- // number of attempts a request are made.
- ShouldRetry(*Request) bool
-
- // MaxRetries is the number of times a request may be retried before
- // failing.
- MaxRetries() int
-}
-
-// WithRetryer sets a Retryer value to the given Config returning the Config
-// value for chaining. The value must not be nil.
-func WithRetryer(cfg *aws.Config, retryer Retryer) *aws.Config {
- if retryer == nil {
- if cfg.Logger != nil {
- cfg.Logger.Log("ERROR: Request.WithRetryer called with nil retryer. Replacing with retry disabled Retryer.")
- }
- retryer = noOpRetryer{}
- }
- cfg.Retryer = retryer
- return cfg
-
-}
-
-// noOpRetryer is a internal no op retryer used when a request is created
-// without a retryer.
-//
-// Provides a retryer that performs no retries.
-// It should be used when we do not want retries to be performed.
-type noOpRetryer struct{}
-
-// MaxRetries returns the number of maximum returns the service will use to make
-// an individual API; For NoOpRetryer the MaxRetries will always be zero.
-func (d noOpRetryer) MaxRetries() int {
- return 0
-}
-
-// ShouldRetry will always return false for NoOpRetryer, as it should never retry.
-func (d noOpRetryer) ShouldRetry(_ *Request) bool {
- return false
-}
-
-// RetryRules returns the delay duration before retrying this request again;
-// since NoOpRetryer does not retry, RetryRules always returns 0.
-func (d noOpRetryer) RetryRules(_ *Request) time.Duration {
- return 0
-}
-
-// retryableCodes is a collection of service response codes which are retry-able
-// without any further action.
-var retryableCodes = map[string]struct{}{
- ErrCodeRequestError: {},
- "RequestTimeout": {},
- ErrCodeResponseTimeout: {},
- "RequestTimeoutException": {}, // Glacier's flavor of RequestTimeout
-}
-
-var throttleCodes = map[string]struct{}{
- "ProvisionedThroughputExceededException": {},
- "ThrottledException": {}, // SNS, XRay, ResourceGroupsTagging API
- "Throttling": {},
- "ThrottlingException": {},
- "RequestLimitExceeded": {},
- "RequestThrottled": {},
- "RequestThrottledException": {},
- "TooManyRequestsException": {}, // Lambda functions
- "PriorRequestNotComplete": {}, // Route53
- "TransactionInProgressException": {},
- "EC2ThrottledException": {}, // EC2
-}
-
-// credsExpiredCodes is a collection of error codes which signify the credentials
-// need to be refreshed. Expired tokens require refreshing of credentials, and
-// resigning before the request can be retried.
-var credsExpiredCodes = map[string]struct{}{
- "ExpiredToken": {},
- "ExpiredTokenException": {},
- "RequestExpired": {}, // EC2 Only
-}
-
-func isCodeThrottle(code string) bool {
- _, ok := throttleCodes[code]
- return ok
-}
-
-func isCodeRetryable(code string) bool {
- if _, ok := retryableCodes[code]; ok {
- return true
- }
-
- return isCodeExpiredCreds(code)
-}
-
-func isCodeExpiredCreds(code string) bool {
- _, ok := credsExpiredCodes[code]
- return ok
-}
-
-var validParentCodes = map[string]struct{}{
- ErrCodeSerialization: {},
- ErrCodeRead: {},
-}
-
-func isNestedErrorRetryable(parentErr awserr.Error) bool {
- if parentErr == nil {
- return false
- }
-
- if _, ok := validParentCodes[parentErr.Code()]; !ok {
- return false
- }
-
- err := parentErr.OrigErr()
- if err == nil {
- return false
- }
-
- if aerr, ok := err.(awserr.Error); ok {
- return isCodeRetryable(aerr.Code())
- }
-
- if t, ok := err.(temporary); ok {
- return t.Temporary() || isErrConnectionReset(err)
- }
-
- return isErrConnectionReset(err)
-}
-
-// IsErrorRetryable returns whether the error is retryable, based on its Code.
-// Returns false if error is nil.
-func IsErrorRetryable(err error) bool {
- if err == nil {
- return false
- }
- return shouldRetryError(err)
-}
-
-type temporary interface {
- Temporary() bool
-}
-
-func shouldRetryError(origErr error) bool {
- switch err := origErr.(type) {
- case awserr.Error:
- if err.Code() == CanceledErrorCode {
- return false
- }
- if isNestedErrorRetryable(err) {
- return true
- }
-
- origErr := err.OrigErr()
- var shouldRetry bool
- if origErr != nil {
- shouldRetry = shouldRetryError(origErr)
- if err.Code() == ErrCodeRequestError && !shouldRetry {
- return false
- }
- }
- if isCodeRetryable(err.Code()) {
- return true
- }
- return shouldRetry
-
- case *url.Error:
- if strings.Contains(err.Error(), "connection refused") {
- // Refused connections should be retried as the service may not yet
- // be running on the port. Go TCP dial considers refused
- // connections as not temporary.
- return true
- }
- // *url.Error only implements Temporary after golang 1.6 but since
- // url.Error only wraps the error:
- return shouldRetryError(err.Err)
-
- case temporary:
- if netErr, ok := err.(*net.OpError); ok && netErr.Op == "dial" {
- return true
- }
- // If the error is temporary, we want to allow continuation of the
- // retry process
- return err.Temporary() || isErrConnectionReset(origErr)
-
- case nil:
- // `awserr.Error.OrigErr()` can be nil, meaning there was an error but
- // because we don't know the cause, it is marked as retryable. See
- // TestRequest4xxUnretryable for an example.
- return true
-
- default:
- switch err.Error() {
- case "net/http: request canceled",
- "net/http: request canceled while waiting for connection":
- // known 1.5 error case when an http request is cancelled
- return false
- }
- // here we don't know the error; so we allow a retry.
- return true
- }
-}
-
-// IsErrorThrottle returns whether the error is to be throttled based on its code.
-// Returns false if error is nil.
-func IsErrorThrottle(err error) bool {
- if aerr, ok := err.(awserr.Error); ok && aerr != nil {
- return isCodeThrottle(aerr.Code())
- }
- return false
-}
-
-// IsErrorExpiredCreds returns whether the error code is a credential expiry
-// error. Returns false if error is nil.
-func IsErrorExpiredCreds(err error) bool {
- if aerr, ok := err.(awserr.Error); ok && aerr != nil {
- return isCodeExpiredCreds(aerr.Code())
- }
- return false
-}
-
-// IsErrorRetryable returns whether the error is retryable, based on its Code.
-// Returns false if the request has no Error set.
-//
-// Alias for the utility function IsErrorRetryable
-func (r *Request) IsErrorRetryable() bool {
- if isErrCode(r.Error, r.RetryErrorCodes) {
- return true
- }
-
- // HTTP response status code 501 should not be retried.
- // 501 represents Not Implemented which means the request method is not
- // supported by the server and cannot be handled.
- if r.HTTPResponse != nil {
- // HTTP response status code 500 represents internal server error and
- // should be retried without any throttle.
- if r.HTTPResponse.StatusCode == 500 {
- return true
- }
- }
- return IsErrorRetryable(r.Error)
-}
-
-// IsErrorThrottle returns whether the error is to be throttled based on its
-// code. Returns false if the request has no Error set.
-//
-// Alias for the utility function IsErrorThrottle
-func (r *Request) IsErrorThrottle() bool {
- if isErrCode(r.Error, r.ThrottleErrorCodes) {
- return true
- }
-
- if r.HTTPResponse != nil {
- switch r.HTTPResponse.StatusCode {
- case
- 429, // error caused due to too many requests
- 502, // Bad Gateway error should be throttled
- 503, // caused when service is unavailable
- 504: // error occurred due to gateway timeout
- return true
- }
- }
-
- return IsErrorThrottle(r.Error)
-}
-
-func isErrCode(err error, codes []string) bool {
- if aerr, ok := err.(awserr.Error); ok && aerr != nil {
- for _, code := range codes {
- if code == aerr.Code() {
- return true
- }
- }
- }
-
- return false
-}
-
-// IsErrorExpired returns whether the error code is a credential expiry error.
-// Returns false if the request has no Error set.
-//
-// Alias for the utility function IsErrorExpiredCreds
-func (r *Request) IsErrorExpired() bool {
- return IsErrorExpiredCreds(r.Error)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
deleted file mode 100644
index 09a44eb98..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/timeout_read_closer.go
+++ /dev/null
@@ -1,94 +0,0 @@
-package request
-
-import (
- "io"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-var timeoutErr = awserr.New(
- ErrCodeResponseTimeout,
- "read on body has reached the timeout limit",
- nil,
-)
-
-type readResult struct {
- n int
- err error
-}
-
-// timeoutReadCloser will handle body reads that take too long.
-// We will return a ErrReadTimeout error if a timeout occurs.
-type timeoutReadCloser struct {
- reader io.ReadCloser
- duration time.Duration
-}
-
-// Read will spin off a goroutine to call the reader's Read method. We will
-// select on the timer's channel or the read's channel. Whoever completes first
-// will be returned.
-func (r *timeoutReadCloser) Read(b []byte) (int, error) {
- timer := time.NewTimer(r.duration)
- c := make(chan readResult, 1)
-
- go func() {
- n, err := r.reader.Read(b)
- timer.Stop()
- c <- readResult{n: n, err: err}
- }()
-
- select {
- case data := <-c:
- return data.n, data.err
- case <-timer.C:
- return 0, timeoutErr
- }
-}
-
-func (r *timeoutReadCloser) Close() error {
- return r.reader.Close()
-}
-
-const (
- // HandlerResponseTimeout is what we use to signify the name of the
- // response timeout handler.
- HandlerResponseTimeout = "ResponseTimeoutHandler"
-)
-
-// adaptToResponseTimeoutError is a handler that will replace any top level error
-// to a ErrCodeResponseTimeout, if its child is that.
-func adaptToResponseTimeoutError(req *Request) {
- if err, ok := req.Error.(awserr.Error); ok {
- aerr, ok := err.OrigErr().(awserr.Error)
- if ok && aerr.Code() == ErrCodeResponseTimeout {
- req.Error = aerr
- }
- }
-}
-
-// WithResponseReadTimeout is a request option that will wrap the body in a timeout read closer.
-// This will allow for per read timeouts. If a timeout occurred, we will return the
-// ErrCodeResponseTimeout.
-//
-// svc.PutObjectWithContext(ctx, params, request.WithTimeoutReadCloser(30 * time.Second)
-func WithResponseReadTimeout(duration time.Duration) Option {
- return func(r *Request) {
-
- var timeoutHandler = NamedHandler{
- HandlerResponseTimeout,
- func(req *Request) {
- req.HTTPResponse.Body = &timeoutReadCloser{
- reader: req.HTTPResponse.Body,
- duration: duration,
- }
- }}
-
- // remove the handler so we are not stomping over any new durations.
- r.Handlers.Send.RemoveByName(HandlerResponseTimeout)
- r.Handlers.Send.PushBackNamed(timeoutHandler)
-
- r.Handlers.Unmarshal.PushBack(adaptToResponseTimeoutError)
- r.Handlers.UnmarshalError.PushBack(adaptToResponseTimeoutError)
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go b/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
deleted file mode 100644
index 8630683f3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/validation.go
+++ /dev/null
@@ -1,286 +0,0 @@
-package request
-
-import (
- "bytes"
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-const (
- // InvalidParameterErrCode is the error code for invalid parameters errors
- InvalidParameterErrCode = "InvalidParameter"
- // ParamRequiredErrCode is the error code for required parameter errors
- ParamRequiredErrCode = "ParamRequiredError"
- // ParamMinValueErrCode is the error code for fields with too low of a
- // number value.
- ParamMinValueErrCode = "ParamMinValueError"
- // ParamMinLenErrCode is the error code for fields without enough elements.
- ParamMinLenErrCode = "ParamMinLenError"
- // ParamMaxLenErrCode is the error code for value being too long.
- ParamMaxLenErrCode = "ParamMaxLenError"
-
- // ParamFormatErrCode is the error code for a field with invalid
- // format or characters.
- ParamFormatErrCode = "ParamFormatInvalidError"
-)
-
-// Validator provides a way for types to perform validation logic on their
-// input values that external code can use to determine if a type's values
-// are valid.
-type Validator interface {
- Validate() error
-}
-
-// An ErrInvalidParams provides wrapping of invalid parameter errors found when
-// validating API operation input parameters.
-type ErrInvalidParams struct {
- // Context is the base context of the invalid parameter group.
- Context string
- errs []ErrInvalidParam
-}
-
-// Add adds a new invalid parameter error to the collection of invalid
-// parameters. The context of the invalid parameter will be updated to reflect
-// this collection.
-func (e *ErrInvalidParams) Add(err ErrInvalidParam) {
- err.SetContext(e.Context)
- e.errs = append(e.errs, err)
-}
-
-// AddNested adds the invalid parameter errors from another ErrInvalidParams
-// value into this collection. The nested errors will have their nested context
-// updated and base context to reflect the merging.
-//
-// Use for nested validations errors.
-func (e *ErrInvalidParams) AddNested(nestedCtx string, nested ErrInvalidParams) {
- for _, err := range nested.errs {
- err.SetContext(e.Context)
- err.AddNestedContext(nestedCtx)
- e.errs = append(e.errs, err)
- }
-}
-
-// Len returns the number of invalid parameter errors
-func (e ErrInvalidParams) Len() int {
- return len(e.errs)
-}
-
-// Code returns the code of the error
-func (e ErrInvalidParams) Code() string {
- return InvalidParameterErrCode
-}
-
-// Message returns the message of the error
-func (e ErrInvalidParams) Message() string {
- return fmt.Sprintf("%d validation error(s) found.", len(e.errs))
-}
-
-// Error returns the string formatted form of the invalid parameters.
-func (e ErrInvalidParams) Error() string {
- w := &bytes.Buffer{}
- fmt.Fprintf(w, "%s: %s\n", e.Code(), e.Message())
-
- for _, err := range e.errs {
- fmt.Fprintf(w, "- %s\n", err.Message())
- }
-
- return w.String()
-}
-
-// OrigErr returns the invalid parameters as a awserr.BatchedErrors value
-func (e ErrInvalidParams) OrigErr() error {
- return awserr.NewBatchError(
- InvalidParameterErrCode, e.Message(), e.OrigErrs())
-}
-
-// OrigErrs returns a slice of the invalid parameters
-func (e ErrInvalidParams) OrigErrs() []error {
- errs := make([]error, len(e.errs))
- for i := 0; i < len(errs); i++ {
- errs[i] = e.errs[i]
- }
-
- return errs
-}
-
-// An ErrInvalidParam represents an invalid parameter error type.
-type ErrInvalidParam interface {
- awserr.Error
-
- // Field name the error occurred on.
- Field() string
-
- // SetContext updates the context of the error.
- SetContext(string)
-
- // AddNestedContext updates the error's context to include a nested level.
- AddNestedContext(string)
-}
-
-type errInvalidParam struct {
- context string
- nestedContext string
- field string
- code string
- msg string
-}
-
-// Code returns the error code for the type of invalid parameter.
-func (e *errInvalidParam) Code() string {
- return e.code
-}
-
-// Message returns the reason the parameter was invalid, and its context.
-func (e *errInvalidParam) Message() string {
- return fmt.Sprintf("%s, %s.", e.msg, e.Field())
-}
-
-// Error returns the string version of the invalid parameter error.
-func (e *errInvalidParam) Error() string {
- return fmt.Sprintf("%s: %s", e.code, e.Message())
-}
-
-// OrigErr returns nil, Implemented for awserr.Error interface.
-func (e *errInvalidParam) OrigErr() error {
- return nil
-}
-
-// Field Returns the field and context the error occurred.
-func (e *errInvalidParam) Field() string {
- field := e.context
- if len(field) > 0 {
- field += "."
- }
- if len(e.nestedContext) > 0 {
- field += fmt.Sprintf("%s.", e.nestedContext)
- }
- field += e.field
-
- return field
-}
-
-// SetContext updates the base context of the error.
-func (e *errInvalidParam) SetContext(ctx string) {
- e.context = ctx
-}
-
-// AddNestedContext prepends a context to the field's path.
-func (e *errInvalidParam) AddNestedContext(ctx string) {
- if len(e.nestedContext) == 0 {
- e.nestedContext = ctx
- } else {
- e.nestedContext = fmt.Sprintf("%s.%s", ctx, e.nestedContext)
- }
-
-}
-
-// An ErrParamRequired represents an required parameter error.
-type ErrParamRequired struct {
- errInvalidParam
-}
-
-// NewErrParamRequired creates a new required parameter error.
-func NewErrParamRequired(field string) *ErrParamRequired {
- return &ErrParamRequired{
- errInvalidParam{
- code: ParamRequiredErrCode,
- field: field,
- msg: fmt.Sprintf("missing required field"),
- },
- }
-}
-
-// An ErrParamMinValue represents a minimum value parameter error.
-type ErrParamMinValue struct {
- errInvalidParam
- min float64
-}
-
-// NewErrParamMinValue creates a new minimum value parameter error.
-func NewErrParamMinValue(field string, min float64) *ErrParamMinValue {
- return &ErrParamMinValue{
- errInvalidParam: errInvalidParam{
- code: ParamMinValueErrCode,
- field: field,
- msg: fmt.Sprintf("minimum field value of %v", min),
- },
- min: min,
- }
-}
-
-// MinValue returns the field's require minimum value.
-//
-// float64 is returned for both int and float min values.
-func (e *ErrParamMinValue) MinValue() float64 {
- return e.min
-}
-
-// An ErrParamMinLen represents a minimum length parameter error.
-type ErrParamMinLen struct {
- errInvalidParam
- min int
-}
-
-// NewErrParamMinLen creates a new minimum length parameter error.
-func NewErrParamMinLen(field string, min int) *ErrParamMinLen {
- return &ErrParamMinLen{
- errInvalidParam: errInvalidParam{
- code: ParamMinLenErrCode,
- field: field,
- msg: fmt.Sprintf("minimum field size of %v", min),
- },
- min: min,
- }
-}
-
-// MinLen returns the field's required minimum length.
-func (e *ErrParamMinLen) MinLen() int {
- return e.min
-}
-
-// An ErrParamMaxLen represents a maximum length parameter error.
-type ErrParamMaxLen struct {
- errInvalidParam
- max int
-}
-
-// NewErrParamMaxLen creates a new maximum length parameter error.
-func NewErrParamMaxLen(field string, max int, value string) *ErrParamMaxLen {
- return &ErrParamMaxLen{
- errInvalidParam: errInvalidParam{
- code: ParamMaxLenErrCode,
- field: field,
- msg: fmt.Sprintf("maximum size of %v, %v", max, value),
- },
- max: max,
- }
-}
-
-// MaxLen returns the field's required minimum length.
-func (e *ErrParamMaxLen) MaxLen() int {
- return e.max
-}
-
-// An ErrParamFormat represents a invalid format parameter error.
-type ErrParamFormat struct {
- errInvalidParam
- format string
-}
-
-// NewErrParamFormat creates a new invalid format parameter error.
-func NewErrParamFormat(field string, format, value string) *ErrParamFormat {
- return &ErrParamFormat{
- errInvalidParam: errInvalidParam{
- code: ParamFormatErrCode,
- field: field,
- msg: fmt.Sprintf("format %v, %v", format, value),
- },
- format: format,
- }
-}
-
-// Format returns the field's required format.
-func (e *ErrParamFormat) Format() string {
- return e.format
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go b/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
deleted file mode 100644
index 4601f883c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/waiter.go
+++ /dev/null
@@ -1,295 +0,0 @@
-package request
-
-import (
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/awsutil"
-)
-
-// WaiterResourceNotReadyErrorCode is the error code returned by a waiter when
-// the waiter's max attempts have been exhausted.
-const WaiterResourceNotReadyErrorCode = "ResourceNotReady"
-
-// A WaiterOption is a function that will update the Waiter value's fields to
-// configure the waiter.
-type WaiterOption func(*Waiter)
-
-// WithWaiterMaxAttempts returns the maximum number of times the waiter should
-// attempt to check the resource for the target state.
-func WithWaiterMaxAttempts(max int) WaiterOption {
- return func(w *Waiter) {
- w.MaxAttempts = max
- }
-}
-
-// WaiterDelay will return a delay the waiter should pause between attempts to
-// check the resource state. The passed in attempt is the number of times the
-// Waiter has checked the resource state.
-//
-// Attempt is the number of attempts the Waiter has made checking the resource
-// state.
-type WaiterDelay func(attempt int) time.Duration
-
-// ConstantWaiterDelay returns a WaiterDelay that will always return a constant
-// delay the waiter should use between attempts. It ignores the number of
-// attempts made.
-func ConstantWaiterDelay(delay time.Duration) WaiterDelay {
- return func(attempt int) time.Duration {
- return delay
- }
-}
-
-// WithWaiterDelay will set the Waiter to use the WaiterDelay passed in.
-func WithWaiterDelay(delayer WaiterDelay) WaiterOption {
- return func(w *Waiter) {
- w.Delay = delayer
- }
-}
-
-// WithWaiterLogger returns a waiter option to set the logger a waiter
-// should use to log warnings and errors to.
-func WithWaiterLogger(logger aws.Logger) WaiterOption {
- return func(w *Waiter) {
- w.Logger = logger
- }
-}
-
-// WithWaiterRequestOptions returns a waiter option setting the request
-// options for each request the waiter makes. Appends to waiter's request
-// options already set.
-func WithWaiterRequestOptions(opts ...Option) WaiterOption {
- return func(w *Waiter) {
- w.RequestOptions = append(w.RequestOptions, opts...)
- }
-}
-
-// A Waiter provides the functionality to perform a blocking call which will
-// wait for a resource state to be satisfied by a service.
-//
-// This type should not be used directly. The API operations provided in the
-// service packages prefixed with "WaitUntil" should be used instead.
-type Waiter struct {
- Name string
- Acceptors []WaiterAcceptor
- Logger aws.Logger
-
- MaxAttempts int
- Delay WaiterDelay
-
- RequestOptions []Option
- NewRequest func([]Option) (*Request, error)
- SleepWithContext func(aws.Context, time.Duration) error
-}
-
-// ApplyOptions updates the waiter with the list of waiter options provided.
-func (w *Waiter) ApplyOptions(opts ...WaiterOption) {
- for _, fn := range opts {
- fn(w)
- }
-}
-
-// WaiterState are states the waiter uses based on WaiterAcceptor definitions
-// to identify if the resource state the waiter is waiting on has occurred.
-type WaiterState int
-
-// String returns the string representation of the waiter state.
-func (s WaiterState) String() string {
- switch s {
- case SuccessWaiterState:
- return "success"
- case FailureWaiterState:
- return "failure"
- case RetryWaiterState:
- return "retry"
- default:
- return "unknown waiter state"
- }
-}
-
-// States the waiter acceptors will use to identify target resource states.
-const (
- SuccessWaiterState WaiterState = iota // waiter successful
- FailureWaiterState // waiter failed
- RetryWaiterState // waiter needs to be retried
-)
-
-// WaiterMatchMode is the mode that the waiter will use to match the WaiterAcceptor
-// definition's Expected attribute.
-type WaiterMatchMode int
-
-// Modes the waiter will use when inspecting API response to identify target
-// resource states.
-const (
- PathAllWaiterMatch WaiterMatchMode = iota // match on all paths
- PathWaiterMatch // match on specific path
- PathAnyWaiterMatch // match on any path
- PathListWaiterMatch // match on list of paths
- StatusWaiterMatch // match on status code
- ErrorWaiterMatch // match on error
-)
-
-// String returns the string representation of the waiter match mode.
-func (m WaiterMatchMode) String() string {
- switch m {
- case PathAllWaiterMatch:
- return "pathAll"
- case PathWaiterMatch:
- return "path"
- case PathAnyWaiterMatch:
- return "pathAny"
- case PathListWaiterMatch:
- return "pathList"
- case StatusWaiterMatch:
- return "status"
- case ErrorWaiterMatch:
- return "error"
- default:
- return "unknown waiter match mode"
- }
-}
-
-// WaitWithContext will make requests for the API operation using NewRequest to
-// build API requests. The request's response will be compared against the
-// Waiter's Acceptors to determine the successful state of the resource the
-// waiter is inspecting.
-//
-// The passed in context must not be nil. If it is nil a panic will occur. The
-// Context will be used to cancel the waiter's pending requests and retry delays.
-// Use aws.BackgroundContext if no context is available.
-//
-// The waiter will continue until the target state defined by the Acceptors,
-// or the max attempts expires.
-//
-// Will return the WaiterResourceNotReadyErrorCode error code if the waiter's
-// retryer ShouldRetry returns false. This normally will happen when the max
-// wait attempts expires.
-func (w Waiter) WaitWithContext(ctx aws.Context) error {
-
- for attempt := 1; ; attempt++ {
- req, err := w.NewRequest(w.RequestOptions)
- if err != nil {
- waiterLogf(w.Logger, "unable to create request %v", err)
- return err
- }
- req.Handlers.Build.PushBack(MakeAddToUserAgentFreeFormHandler("Waiter"))
- err = req.Send()
-
- // See if any of the acceptors match the request's response, or error
- for _, a := range w.Acceptors {
- if matched, matchErr := a.match(w.Name, w.Logger, req, err); matched {
- return matchErr
- }
- }
-
- // The Waiter should only check the resource state MaxAttempts times
- // This is here instead of in the for loop above to prevent delaying
- // unnecessary when the waiter will not retry.
- if attempt == w.MaxAttempts {
- break
- }
-
- // Delay to wait before inspecting the resource again
- delay := w.Delay(attempt)
- if sleepFn := req.Config.SleepDelay; sleepFn != nil {
- // Support SleepDelay for backwards compatibility and testing
- sleepFn(delay)
- } else {
- sleepCtxFn := w.SleepWithContext
- if sleepCtxFn == nil {
- sleepCtxFn = aws.SleepWithContext
- }
-
- if err := sleepCtxFn(ctx, delay); err != nil {
- return awserr.New(CanceledErrorCode, "waiter context canceled", err)
- }
- }
- }
-
- return awserr.New(WaiterResourceNotReadyErrorCode, "exceeded wait attempts", nil)
-}
-
-// A WaiterAcceptor provides the information needed to wait for an API operation
-// to complete.
-type WaiterAcceptor struct {
- State WaiterState
- Matcher WaiterMatchMode
- Argument string
- Expected interface{}
-}
-
-// match returns if the acceptor found a match with the passed in request
-// or error. True is returned if the acceptor made a match, error is returned
-// if there was an error attempting to perform the match.
-func (a *WaiterAcceptor) match(name string, l aws.Logger, req *Request, err error) (bool, error) {
- result := false
- var vals []interface{}
-
- switch a.Matcher {
- case PathAllWaiterMatch, PathWaiterMatch:
- // Require all matches to be equal for result to match
- vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
- if len(vals) == 0 {
- break
- }
- result = true
- for _, val := range vals {
- if !awsutil.DeepEqual(val, a.Expected) {
- result = false
- break
- }
- }
- case PathAnyWaiterMatch:
- // Only a single match needs to equal for the result to match
- vals, _ = awsutil.ValuesAtPath(req.Data, a.Argument)
- for _, val := range vals {
- if awsutil.DeepEqual(val, a.Expected) {
- result = true
- break
- }
- }
- case PathListWaiterMatch:
- // ignored matcher
- case StatusWaiterMatch:
- s := a.Expected.(int)
- result = s == req.HTTPResponse.StatusCode
- case ErrorWaiterMatch:
- if aerr, ok := err.(awserr.Error); ok {
- result = aerr.Code() == a.Expected.(string)
- }
- default:
- waiterLogf(l, "WARNING: Waiter %s encountered unexpected matcher: %s",
- name, a.Matcher)
- }
-
- if !result {
- // If there was no matching result found there is nothing more to do
- // for this response, retry the request.
- return false, nil
- }
-
- switch a.State {
- case SuccessWaiterState:
- // waiter completed
- return true, nil
- case FailureWaiterState:
- // Waiter failure state triggered
- return true, awserr.New(WaiterResourceNotReadyErrorCode,
- "failed waiting for successful resource state", err)
- case RetryWaiterState:
- // clear the error and retry the operation
- return false, nil
- default:
- waiterLogf(l, "WARNING: Waiter %s encountered unexpected state: %s",
- name, a.State)
- return false, nil
- }
-}
-
-func waiterLogf(logger aws.Logger, msg string, args ...interface{}) {
- if logger != nil {
- logger.Log(fmt.Sprintf(msg, args...))
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go
deleted file mode 100644
index 3efdac29f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go
+++ /dev/null
@@ -1,290 +0,0 @@
-package session
-
-import (
- "fmt"
- "os"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/credentials/processcreds"
- "github.com/aws/aws-sdk-go/aws/credentials/ssocreds"
- "github.com/aws/aws-sdk-go/aws/credentials/stscreds"
- "github.com/aws/aws-sdk-go/aws/defaults"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/shareddefaults"
-)
-
-func resolveCredentials(cfg *aws.Config,
- envCfg envConfig, sharedCfg sharedConfig,
- handlers request.Handlers,
- sessOpts Options,
-) (*credentials.Credentials, error) {
-
- switch {
- case len(sessOpts.Profile) != 0:
- // User explicitly provided an Profile in the session's configuration
- // so load that profile from shared config first.
- // Github(aws/aws-sdk-go#2727)
- return resolveCredsFromProfile(cfg, envCfg, sharedCfg, handlers, sessOpts)
-
- case envCfg.Creds.HasKeys():
- // Environment credentials
- return credentials.NewStaticCredentialsFromCreds(envCfg.Creds), nil
-
- case len(envCfg.WebIdentityTokenFilePath) != 0:
- // Web identity token from environment, RoleARN required to also be
- // set.
- return assumeWebIdentity(cfg, handlers,
- envCfg.WebIdentityTokenFilePath,
- envCfg.RoleARN,
- envCfg.RoleSessionName,
- )
-
- default:
- // Fallback to the "default" credential resolution chain.
- return resolveCredsFromProfile(cfg, envCfg, sharedCfg, handlers, sessOpts)
- }
-}
-
-// WebIdentityEmptyRoleARNErr will occur if 'AWS_WEB_IDENTITY_TOKEN_FILE' was set but
-// 'AWS_ROLE_ARN' was not set.
-var WebIdentityEmptyRoleARNErr = awserr.New(stscreds.ErrCodeWebIdentity, "role ARN is not set", nil)
-
-// WebIdentityEmptyTokenFilePathErr will occur if 'AWS_ROLE_ARN' was set but
-// 'AWS_WEB_IDENTITY_TOKEN_FILE' was not set.
-var WebIdentityEmptyTokenFilePathErr = awserr.New(stscreds.ErrCodeWebIdentity, "token file path is not set", nil)
-
-func assumeWebIdentity(cfg *aws.Config, handlers request.Handlers,
- filepath string,
- roleARN, sessionName string,
-) (*credentials.Credentials, error) {
-
- if len(filepath) == 0 {
- return nil, WebIdentityEmptyTokenFilePathErr
- }
-
- if len(roleARN) == 0 {
- return nil, WebIdentityEmptyRoleARNErr
- }
-
- creds := stscreds.NewWebIdentityCredentials(
- &Session{
- Config: cfg,
- Handlers: handlers.Copy(),
- },
- roleARN,
- sessionName,
- filepath,
- )
-
- return creds, nil
-}
-
-func resolveCredsFromProfile(cfg *aws.Config,
- envCfg envConfig, sharedCfg sharedConfig,
- handlers request.Handlers,
- sessOpts Options,
-) (creds *credentials.Credentials, err error) {
-
- switch {
- case sharedCfg.SourceProfile != nil:
- // Assume IAM role with credentials source from a different profile.
- creds, err = resolveCredsFromProfile(cfg, envCfg,
- *sharedCfg.SourceProfile, handlers, sessOpts,
- )
-
- case sharedCfg.Creds.HasKeys():
- // Static Credentials from Shared Config/Credentials file.
- creds = credentials.NewStaticCredentialsFromCreds(
- sharedCfg.Creds,
- )
-
- case len(sharedCfg.CredentialSource) != 0:
- creds, err = resolveCredsFromSource(cfg, envCfg,
- sharedCfg, handlers, sessOpts,
- )
-
- case len(sharedCfg.WebIdentityTokenFile) != 0:
- // Credentials from Assume Web Identity token require an IAM Role, and
- // that roll will be assumed. May be wrapped with another assume role
- // via SourceProfile.
- return assumeWebIdentity(cfg, handlers,
- sharedCfg.WebIdentityTokenFile,
- sharedCfg.RoleARN,
- sharedCfg.RoleSessionName,
- )
-
- case sharedCfg.hasSSOConfiguration():
- creds, err = resolveSSOCredentials(cfg, sharedCfg, handlers)
-
- case len(sharedCfg.CredentialProcess) != 0:
- // Get credentials from CredentialProcess
- creds = processcreds.NewCredentials(sharedCfg.CredentialProcess)
-
- default:
- // Fallback to default credentials provider, include mock errors for
- // the credential chain so user can identify why credentials failed to
- // be retrieved.
- creds = credentials.NewCredentials(&credentials.ChainProvider{
- VerboseErrors: aws.BoolValue(cfg.CredentialsChainVerboseErrors),
- Providers: []credentials.Provider{
- &credProviderError{
- Err: awserr.New("EnvAccessKeyNotFound",
- "failed to find credentials in the environment.", nil),
- },
- &credProviderError{
- Err: awserr.New("SharedCredsLoad",
- fmt.Sprintf("failed to load profile, %s.", envCfg.Profile), nil),
- },
- defaults.RemoteCredProvider(*cfg, handlers),
- },
- })
- }
- if err != nil {
- return nil, err
- }
-
- if len(sharedCfg.RoleARN) > 0 {
- cfgCp := *cfg
- cfgCp.Credentials = creds
- return credsFromAssumeRole(cfgCp, handlers, sharedCfg, sessOpts)
- }
-
- return creds, nil
-}
-
-func resolveSSOCredentials(cfg *aws.Config, sharedCfg sharedConfig, handlers request.Handlers) (*credentials.Credentials, error) {
- if err := sharedCfg.validateSSOConfiguration(); err != nil {
- return nil, err
- }
-
- cfgCopy := cfg.Copy()
- cfgCopy.Region = &sharedCfg.SSORegion
-
- return ssocreds.NewCredentials(
- &Session{
- Config: cfgCopy,
- Handlers: handlers.Copy(),
- },
- sharedCfg.SSOAccountID,
- sharedCfg.SSORoleName,
- sharedCfg.SSOStartURL,
- ), nil
-}
-
-// valid credential source values
-const (
- credSourceEc2Metadata = "Ec2InstanceMetadata"
- credSourceEnvironment = "Environment"
- credSourceECSContainer = "EcsContainer"
-)
-
-func resolveCredsFromSource(cfg *aws.Config,
- envCfg envConfig, sharedCfg sharedConfig,
- handlers request.Handlers,
- sessOpts Options,
-) (creds *credentials.Credentials, err error) {
-
- switch sharedCfg.CredentialSource {
- case credSourceEc2Metadata:
- p := defaults.RemoteCredProvider(*cfg, handlers)
- creds = credentials.NewCredentials(p)
-
- case credSourceEnvironment:
- creds = credentials.NewStaticCredentialsFromCreds(envCfg.Creds)
-
- case credSourceECSContainer:
- if len(os.Getenv(shareddefaults.ECSCredsProviderEnvVar)) == 0 {
- return nil, ErrSharedConfigECSContainerEnvVarEmpty
- }
-
- p := defaults.RemoteCredProvider(*cfg, handlers)
- creds = credentials.NewCredentials(p)
-
- default:
- return nil, ErrSharedConfigInvalidCredSource
- }
-
- return creds, nil
-}
-
-func credsFromAssumeRole(cfg aws.Config,
- handlers request.Handlers,
- sharedCfg sharedConfig,
- sessOpts Options,
-) (*credentials.Credentials, error) {
-
- if len(sharedCfg.MFASerial) != 0 && sessOpts.AssumeRoleTokenProvider == nil {
- // AssumeRole Token provider is required if doing Assume Role
- // with MFA.
- return nil, AssumeRoleTokenProviderNotSetError{}
- }
-
- return stscreds.NewCredentials(
- &Session{
- Config: &cfg,
- Handlers: handlers.Copy(),
- },
- sharedCfg.RoleARN,
- func(opt *stscreds.AssumeRoleProvider) {
- opt.RoleSessionName = sharedCfg.RoleSessionName
-
- if sessOpts.AssumeRoleDuration == 0 &&
- sharedCfg.AssumeRoleDuration != nil &&
- *sharedCfg.AssumeRoleDuration/time.Minute > 15 {
- opt.Duration = *sharedCfg.AssumeRoleDuration
- } else if sessOpts.AssumeRoleDuration != 0 {
- opt.Duration = sessOpts.AssumeRoleDuration
- }
-
- // Assume role with external ID
- if len(sharedCfg.ExternalID) > 0 {
- opt.ExternalID = aws.String(sharedCfg.ExternalID)
- }
-
- // Assume role with MFA
- if len(sharedCfg.MFASerial) > 0 {
- opt.SerialNumber = aws.String(sharedCfg.MFASerial)
- opt.TokenProvider = sessOpts.AssumeRoleTokenProvider
- }
- },
- ), nil
-}
-
-// AssumeRoleTokenProviderNotSetError is an error returned when creating a
-// session when the MFAToken option is not set when shared config is configured
-// load assume a role with an MFA token.
-type AssumeRoleTokenProviderNotSetError struct{}
-
-// Code is the short id of the error.
-func (e AssumeRoleTokenProviderNotSetError) Code() string {
- return "AssumeRoleTokenProviderNotSetError"
-}
-
-// Message is the description of the error
-func (e AssumeRoleTokenProviderNotSetError) Message() string {
- return fmt.Sprintf("assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.")
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e AssumeRoleTokenProviderNotSetError) OrigErr() error {
- return nil
-}
-
-// Error satisfies the error interface.
-func (e AssumeRoleTokenProviderNotSetError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", nil)
-}
-
-type credProviderError struct {
- Err error
-}
-
-func (c credProviderError) Retrieve() (credentials.Value, error) {
- return credentials.Value{}, c.Err
-}
-func (c credProviderError) IsExpired() bool {
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go
deleted file mode 100644
index 4390ad52f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go
+++ /dev/null
@@ -1,28 +0,0 @@
-//go:build go1.13
-// +build go1.13
-
-package session
-
-import (
- "net"
- "net/http"
- "time"
-)
-
-// Transport that should be used when a custom CA bundle is specified with the
-// SDK.
-func getCustomTransport() *http.Transport {
- return &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- DialContext: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- DualStack: true,
- }).DialContext,
- ForceAttemptHTTP2: true,
- MaxIdleConns: 100,
- IdleConnTimeout: 90 * time.Second,
- TLSHandshakeTimeout: 10 * time.Second,
- ExpectContinueTimeout: 1 * time.Second,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go
deleted file mode 100644
index 668565bea..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go
+++ /dev/null
@@ -1,27 +0,0 @@
-//go:build !go1.13 && go1.7
-// +build !go1.13,go1.7
-
-package session
-
-import (
- "net"
- "net/http"
- "time"
-)
-
-// Transport that should be used when a custom CA bundle is specified with the
-// SDK.
-func getCustomTransport() *http.Transport {
- return &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- DialContext: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- DualStack: true,
- }).DialContext,
- MaxIdleConns: 100,
- IdleConnTimeout: 90 * time.Second,
- TLSHandshakeTimeout: 10 * time.Second,
- ExpectContinueTimeout: 1 * time.Second,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go
deleted file mode 100644
index e101aa6b6..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build !go1.6 && go1.5
-// +build !go1.6,go1.5
-
-package session
-
-import (
- "net"
- "net/http"
- "time"
-)
-
-// Transport that should be used when a custom CA bundle is specified with the
-// SDK.
-func getCustomTransport() *http.Transport {
- return &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- Dial: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- }).Dial,
- TLSHandshakeTimeout: 10 * time.Second,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go
deleted file mode 100644
index b5fcbe0d1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go
+++ /dev/null
@@ -1,24 +0,0 @@
-//go:build !go1.7 && go1.6
-// +build !go1.7,go1.6
-
-package session
-
-import (
- "net"
- "net/http"
- "time"
-)
-
-// Transport that should be used when a custom CA bundle is specified with the
-// SDK.
-func getCustomTransport() *http.Transport {
- return &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- Dial: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- }).Dial,
- TLSHandshakeTimeout: 10 * time.Second,
- ExpectContinueTimeout: 1 * time.Second,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
deleted file mode 100644
index ff3cc012a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go
+++ /dev/null
@@ -1,367 +0,0 @@
-/*
-Package session provides configuration for the SDK's service clients. Sessions
-can be shared across service clients that share the same base configuration.
-
-Sessions are safe to use concurrently as long as the Session is not being
-modified. Sessions should be cached when possible, because creating a new
-Session will load all configuration values from the environment, and config
-files each time the Session is created. Sharing the Session value across all of
-your service clients will ensure the configuration is loaded the fewest number
-of times possible.
-
-Sessions options from Shared Config
-
-By default NewSession will only load credentials from the shared credentials
-file (~/.aws/credentials). If the AWS_SDK_LOAD_CONFIG environment variable is
-set to a truthy value the Session will be created from the configuration
-values from the shared config (~/.aws/config) and shared credentials
-(~/.aws/credentials) files. Using the NewSessionWithOptions with
-SharedConfigState set to SharedConfigEnable will create the session as if the
-AWS_SDK_LOAD_CONFIG environment variable was set.
-
-Credential and config loading order
-
-The Session will attempt to load configuration and credentials from the
-environment, configuration files, and other credential sources. The order
-configuration is loaded in is:
-
- * Environment Variables
- * Shared Credentials file
- * Shared Configuration file (if SharedConfig is enabled)
- * EC2 Instance Metadata (credentials only)
-
-The Environment variables for credentials will have precedence over shared
-config even if SharedConfig is enabled. To override this behavior, and use
-shared config credentials instead specify the session.Options.Profile, (e.g.
-when using credential_source=Environment to assume a role).
-
- sess, err := session.NewSessionWithOptions(session.Options{
- Profile: "myProfile",
- })
-
-Creating Sessions
-
-Creating a Session without additional options will load credentials region, and
-profile loaded from the environment and shared config automatically. See,
-"Environment Variables" section for information on environment variables used
-by Session.
-
- // Create Session
- sess, err := session.NewSession()
-
-
-When creating Sessions optional aws.Config values can be passed in that will
-override the default, or loaded, config values the Session is being created
-with. This allows you to provide additional, or case based, configuration
-as needed.
-
- // Create a Session with a custom region
- sess, err := session.NewSession(&aws.Config{
- Region: aws.String("us-west-2"),
- })
-
-Use NewSessionWithOptions to provide additional configuration driving how the
-Session's configuration will be loaded. Such as, specifying shared config
-profile, or override the shared config state, (AWS_SDK_LOAD_CONFIG).
-
- // Equivalent to session.NewSession()
- sess, err := session.NewSessionWithOptions(session.Options{
- // Options
- })
-
- sess, err := session.NewSessionWithOptions(session.Options{
- // Specify profile to load for the session's config
- Profile: "profile_name",
-
- // Provide SDK Config options, such as Region.
- Config: aws.Config{
- Region: aws.String("us-west-2"),
- },
-
- // Force enable Shared Config support
- SharedConfigState: session.SharedConfigEnable,
- })
-
-Adding Handlers
-
-You can add handlers to a session to decorate API operation, (e.g. adding HTTP
-headers). All clients that use the Session receive a copy of the Session's
-handlers. For example, the following request handler added to the Session logs
-every requests made.
-
- // Create a session, and add additional handlers for all service
- // clients created with the Session to inherit. Adds logging handler.
- sess := session.Must(session.NewSession())
-
- sess.Handlers.Send.PushFront(func(r *request.Request) {
- // Log every request made and its payload
- logger.Printf("Request: %s/%s, Params: %s",
- r.ClientInfo.ServiceName, r.Operation, r.Params)
- })
-
-Shared Config Fields
-
-By default the SDK will only load the shared credentials file's
-(~/.aws/credentials) credentials values, and all other config is provided by
-the environment variables, SDK defaults, and user provided aws.Config values.
-
-If the AWS_SDK_LOAD_CONFIG environment variable is set, or SharedConfigEnable
-option is used to create the Session the full shared config values will be
-loaded. This includes credentials, region, and support for assume role. In
-addition the Session will load its configuration from both the shared config
-file (~/.aws/config) and shared credentials file (~/.aws/credentials). Both
-files have the same format.
-
-If both config files are present the configuration from both files will be
-read. The Session will be created from configuration values from the shared
-credentials file (~/.aws/credentials) over those in the shared config file
-(~/.aws/config).
-
-Credentials are the values the SDK uses to authenticating requests with AWS
-Services. When specified in a file, both aws_access_key_id and
-aws_secret_access_key must be provided together in the same file to be
-considered valid. They will be ignored if both are not present.
-aws_session_token is an optional field that can be provided in addition to the
-other two fields.
-
- aws_access_key_id = AKID
- aws_secret_access_key = SECRET
- aws_session_token = TOKEN
-
- ; region only supported if SharedConfigEnabled.
- region = us-east-1
-
-Assume Role configuration
-
-The role_arn field allows you to configure the SDK to assume an IAM role using
-a set of credentials from another source. Such as when paired with static
-credentials, "profile_source", "credential_process", or "credential_source"
-fields. If "role_arn" is provided, a source of credentials must also be
-specified, such as "source_profile", "credential_source", or
-"credential_process".
-
- role_arn = arn:aws:iam:::role/
- source_profile = profile_with_creds
- external_id = 1234
- mfa_serial =
- role_session_name = session_name
-
-
-The SDK supports assuming a role with MFA token. If "mfa_serial" is set, you
-must also set the Session Option.AssumeRoleTokenProvider. The Session will fail
-to load if the AssumeRoleTokenProvider is not specified.
-
- sess := session.Must(session.NewSessionWithOptions(session.Options{
- AssumeRoleTokenProvider: stscreds.StdinTokenProvider,
- }))
-
-To setup Assume Role outside of a session see the stscreds.AssumeRoleProvider
-documentation.
-
-Environment Variables
-
-When a Session is created several environment variables can be set to adjust
-how the SDK functions, and what configuration data it loads when creating
-Sessions. All environment values are optional, but some values like credentials
-require multiple of the values to set or the partial values will be ignored.
-All environment variable values are strings unless otherwise noted.
-
-Environment configuration values. If set both Access Key ID and Secret Access
-Key must be provided. Session Token and optionally also be provided, but is
-not required.
-
- # Access Key ID
- AWS_ACCESS_KEY_ID=AKID
- AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set.
-
- # Secret Access Key
- AWS_SECRET_ACCESS_KEY=SECRET
- AWS_SECRET_KEY=SECRET=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set.
-
- # Session Token
- AWS_SESSION_TOKEN=TOKEN
-
-Region value will instruct the SDK where to make service API requests to. If is
-not provided in the environment the region must be provided before a service
-client request is made.
-
- AWS_REGION=us-east-1
-
- # AWS_DEFAULT_REGION is only read if AWS_SDK_LOAD_CONFIG is also set,
- # and AWS_REGION is not also set.
- AWS_DEFAULT_REGION=us-east-1
-
-Profile name the SDK should load use when loading shared config from the
-configuration files. If not provided "default" will be used as the profile name.
-
- AWS_PROFILE=my_profile
-
- # AWS_DEFAULT_PROFILE is only read if AWS_SDK_LOAD_CONFIG is also set,
- # and AWS_PROFILE is not also set.
- AWS_DEFAULT_PROFILE=my_profile
-
-SDK load config instructs the SDK to load the shared config in addition to
-shared credentials. This also expands the configuration loaded so the shared
-credentials will have parity with the shared config file. This also enables
-Region and Profile support for the AWS_DEFAULT_REGION and AWS_DEFAULT_PROFILE
-env values as well.
-
- AWS_SDK_LOAD_CONFIG=1
-
-Custom Shared Config and Credential Files
-
-Shared credentials file path can be set to instruct the SDK to use an alternative
-file for the shared credentials. If not set the file will be loaded from
-$HOME/.aws/credentials on Linux/Unix based systems, and
-%USERPROFILE%\.aws\credentials on Windows.
-
- AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials
-
-Shared config file path can be set to instruct the SDK to use an alternative
-file for the shared config. If not set the file will be loaded from
-$HOME/.aws/config on Linux/Unix based systems, and
-%USERPROFILE%\.aws\config on Windows.
-
- AWS_CONFIG_FILE=$HOME/my_shared_config
-
-Custom CA Bundle
-
-Path to a custom Credentials Authority (CA) bundle PEM file that the SDK
-will use instead of the default system's root CA bundle. Use this only
-if you want to replace the CA bundle the SDK uses for TLS requests.
-
- AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
-
-Enabling this option will attempt to merge the Transport into the SDK's HTTP
-client. If the client's Transport is not a http.Transport an error will be
-returned. If the Transport's TLS config is set this option will cause the SDK
-to overwrite the Transport's TLS config's RootCAs value. If the CA bundle file
-contains multiple certificates all of them will be loaded.
-
-The Session option CustomCABundle is also available when creating sessions
-to also enable this feature. CustomCABundle session option field has priority
-over the AWS_CA_BUNDLE environment variable, and will be used if both are set.
-
-Setting a custom HTTPClient in the aws.Config options will override this setting.
-To use this option and custom HTTP client, the HTTP client needs to be provided
-when creating the session. Not the service client.
-
-Custom Client TLS Certificate
-
-The SDK supports the environment and session option being configured with
-Client TLS certificates that are sent as a part of the client's TLS handshake
-for client authentication. If used, both Cert and Key values are required. If
-one is missing, or either fail to load the contents of the file an error will
-be returned.
-
-HTTP Client's Transport concrete implementation must be a http.Transport
-or creating the session will fail.
-
- AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key
- AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert
-
-This can also be configured via the session.Options ClientTLSCert and ClientTLSKey.
-
- sess, err := session.NewSessionWithOptions(session.Options{
- ClientTLSCert: myCertFile,
- ClientTLSKey: myKeyFile,
- })
-
-Custom EC2 IMDS Endpoint
-
-The endpoint of the EC2 IMDS client can be configured via the environment
-variable, AWS_EC2_METADATA_SERVICE_ENDPOINT when creating the client with a
-Session. See Options.EC2IMDSEndpoint for more details.
-
- AWS_EC2_METADATA_SERVICE_ENDPOINT=http://169.254.169.254
-
-If using an URL with an IPv6 address literal, the IPv6 address
-component must be enclosed in square brackets.
-
- AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1]
-
-The custom EC2 IMDS endpoint can also be specified via the Session options.
-
- sess, err := session.NewSessionWithOptions(session.Options{
- EC2MetadataEndpoint: "http://[::1]",
- })
-
-FIPS and DualStack Endpoints
-
-The SDK can be configured to resolve an endpoint with certain capabilities such as FIPS and DualStack.
-
-You can configure a FIPS endpoint using an environment variable, shared config ($HOME/.aws/config),
-or programmatically.
-
-To configure a FIPS endpoint set the environment variable set the AWS_USE_FIPS_ENDPOINT to true or false to enable
-or disable FIPS endpoint resolution.
-
- AWS_USE_FIPS_ENDPOINT=true
-
-To configure a FIPS endpoint using shared config, set use_fips_endpoint to true or false to enable
-or disable FIPS endpoint resolution.
-
- [profile myprofile]
- region=us-west-2
- use_fips_endpoint=true
-
-To configure a FIPS endpoint programmatically
-
- // Option 1: Configure it on a session for all clients
- sess, err := session.NewSessionWithOptions(session.Options{
- UseFIPSEndpoint: endpoints.FIPSEndpointStateEnabled,
- })
- if err != nil {
- // handle error
- }
-
- client := s3.New(sess)
-
- // Option 2: Configure it per client
- sess, err := session.NewSession()
- if err != nil {
- // handle error
- }
-
- client := s3.New(sess, &aws.Config{
- UseFIPSEndpoint: endpoints.FIPSEndpointStateEnabled,
- })
-
-You can configure a DualStack endpoint using an environment variable, shared config ($HOME/.aws/config),
-or programmatically.
-
-To configure a DualStack endpoint set the environment variable set the AWS_USE_DUALSTACK_ENDPOINT to true or false to
-enable or disable DualStack endpoint resolution.
-
- AWS_USE_DUALSTACK_ENDPOINT=true
-
-To configure a DualStack endpoint using shared config, set use_dualstack_endpoint to true or false to enable
-or disable DualStack endpoint resolution.
-
- [profile myprofile]
- region=us-west-2
- use_dualstack_endpoint=true
-
-To configure a DualStack endpoint programmatically
-
- // Option 1: Configure it on a session for all clients
- sess, err := session.NewSessionWithOptions(session.Options{
- UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled,
- })
- if err != nil {
- // handle error
- }
-
- client := s3.New(sess)
-
- // Option 2: Configure it per client
- sess, err := session.NewSession()
- if err != nil {
- // handle error
- }
-
- client := s3.New(sess, &aws.Config{
- UseDualStackEndpoint: endpoints.DualStackEndpointStateEnabled,
- })
-*/
-package session
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
deleted file mode 100644
index d6fa24776..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go
+++ /dev/null
@@ -1,471 +0,0 @@
-package session
-
-import (
- "fmt"
- "os"
- "strconv"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/defaults"
- "github.com/aws/aws-sdk-go/aws/endpoints"
-)
-
-// EnvProviderName provides a name of the provider when config is loaded from environment.
-const EnvProviderName = "EnvConfigCredentials"
-
-// envConfig is a collection of environment values the SDK will read
-// setup config from. All environment values are optional. But some values
-// such as credentials require multiple values to be complete or the values
-// will be ignored.
-type envConfig struct {
- // Environment configuration values. If set both Access Key ID and Secret Access
- // Key must be provided. Session Token and optionally also be provided, but is
- // not required.
- //
- // # Access Key ID
- // AWS_ACCESS_KEY_ID=AKID
- // AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set.
- //
- // # Secret Access Key
- // AWS_SECRET_ACCESS_KEY=SECRET
- // AWS_SECRET_KEY=SECRET=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set.
- //
- // # Session Token
- // AWS_SESSION_TOKEN=TOKEN
- Creds credentials.Value
-
- // Region value will instruct the SDK where to make service API requests to. If is
- // not provided in the environment the region must be provided before a service
- // client request is made.
- //
- // AWS_REGION=us-east-1
- //
- // # AWS_DEFAULT_REGION is only read if AWS_SDK_LOAD_CONFIG is also set,
- // # and AWS_REGION is not also set.
- // AWS_DEFAULT_REGION=us-east-1
- Region string
-
- // Profile name the SDK should load use when loading shared configuration from the
- // shared configuration files. If not provided "default" will be used as the
- // profile name.
- //
- // AWS_PROFILE=my_profile
- //
- // # AWS_DEFAULT_PROFILE is only read if AWS_SDK_LOAD_CONFIG is also set,
- // # and AWS_PROFILE is not also set.
- // AWS_DEFAULT_PROFILE=my_profile
- Profile string
-
- // SDK load config instructs the SDK to load the shared config in addition to
- // shared credentials. This also expands the configuration loaded from the shared
- // credentials to have parity with the shared config file. This also enables
- // Region and Profile support for the AWS_DEFAULT_REGION and AWS_DEFAULT_PROFILE
- // env values as well.
- //
- // AWS_SDK_LOAD_CONFIG=1
- EnableSharedConfig bool
-
- // Shared credentials file path can be set to instruct the SDK to use an alternate
- // file for the shared credentials. If not set the file will be loaded from
- // $HOME/.aws/credentials on Linux/Unix based systems, and
- // %USERPROFILE%\.aws\credentials on Windows.
- //
- // AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials
- SharedCredentialsFile string
-
- // Shared config file path can be set to instruct the SDK to use an alternate
- // file for the shared config. If not set the file will be loaded from
- // $HOME/.aws/config on Linux/Unix based systems, and
- // %USERPROFILE%\.aws\config on Windows.
- //
- // AWS_CONFIG_FILE=$HOME/my_shared_config
- SharedConfigFile string
-
- // Sets the path to a custom Credentials Authority (CA) Bundle PEM file
- // that the SDK will use instead of the system's root CA bundle.
- // Only use this if you want to configure the SDK to use a custom set
- // of CAs.
- //
- // Enabling this option will attempt to merge the Transport
- // into the SDK's HTTP client. If the client's Transport is
- // not a http.Transport an error will be returned. If the
- // Transport's TLS config is set this option will cause the
- // SDK to overwrite the Transport's TLS config's RootCAs value.
- //
- // Setting a custom HTTPClient in the aws.Config options will override this setting.
- // To use this option and custom HTTP client, the HTTP client needs to be provided
- // when creating the session. Not the service client.
- //
- // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle
- CustomCABundle string
-
- // Sets the TLC client certificate that should be used by the SDK's HTTP transport
- // when making requests. The certificate must be paired with a TLS client key file.
- //
- // AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert
- ClientTLSCert string
-
- // Sets the TLC client key that should be used by the SDK's HTTP transport
- // when making requests. The key must be paired with a TLS client certificate file.
- //
- // AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key
- ClientTLSKey string
-
- csmEnabled string
- CSMEnabled *bool
- CSMPort string
- CSMHost string
- CSMClientID string
-
- // Enables endpoint discovery via environment variables.
- //
- // AWS_ENABLE_ENDPOINT_DISCOVERY=true
- EnableEndpointDiscovery *bool
- enableEndpointDiscovery string
-
- // Specifies the WebIdentity token the SDK should use to assume a role
- // with.
- //
- // AWS_WEB_IDENTITY_TOKEN_FILE=file_path
- WebIdentityTokenFilePath string
-
- // Specifies the IAM role arn to use when assuming an role.
- //
- // AWS_ROLE_ARN=role_arn
- RoleARN string
-
- // Specifies the IAM role session name to use when assuming a role.
- //
- // AWS_ROLE_SESSION_NAME=session_name
- RoleSessionName string
-
- // Specifies the STS Regional Endpoint flag for the SDK to resolve the endpoint
- // for a service.
- //
- // AWS_STS_REGIONAL_ENDPOINTS=regional
- // This can take value as `regional` or `legacy`
- STSRegionalEndpoint endpoints.STSRegionalEndpoint
-
- // Specifies the S3 Regional Endpoint flag for the SDK to resolve the
- // endpoint for a service.
- //
- // AWS_S3_US_EAST_1_REGIONAL_ENDPOINT=regional
- // This can take value as `regional` or `legacy`
- S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint
-
- // Specifies if the S3 service should allow ARNs to direct the region
- // the client's requests are sent to.
- //
- // AWS_S3_USE_ARN_REGION=true
- S3UseARNRegion bool
-
- // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1]
- EC2IMDSEndpoint string
-
- // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6
- EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState
-
- // Specifies that SDK clients must resolve a dual-stack endpoint for
- // services.
- //
- // AWS_USE_DUALSTACK_ENDPOINT=true
- UseDualStackEndpoint endpoints.DualStackEndpointState
-
- // Specifies that SDK clients must resolve a FIPS endpoint for
- // services.
- //
- // AWS_USE_FIPS_ENDPOINT=true
- UseFIPSEndpoint endpoints.FIPSEndpointState
-}
-
-var (
- csmEnabledEnvKey = []string{
- "AWS_CSM_ENABLED",
- }
- csmHostEnvKey = []string{
- "AWS_CSM_HOST",
- }
- csmPortEnvKey = []string{
- "AWS_CSM_PORT",
- }
- csmClientIDEnvKey = []string{
- "AWS_CSM_CLIENT_ID",
- }
- credAccessEnvKey = []string{
- "AWS_ACCESS_KEY_ID",
- "AWS_ACCESS_KEY",
- }
- credSecretEnvKey = []string{
- "AWS_SECRET_ACCESS_KEY",
- "AWS_SECRET_KEY",
- }
- credSessionEnvKey = []string{
- "AWS_SESSION_TOKEN",
- }
-
- enableEndpointDiscoveryEnvKey = []string{
- "AWS_ENABLE_ENDPOINT_DISCOVERY",
- }
-
- regionEnvKeys = []string{
- "AWS_REGION",
- "AWS_DEFAULT_REGION", // Only read if AWS_SDK_LOAD_CONFIG is also set
- }
- profileEnvKeys = []string{
- "AWS_PROFILE",
- "AWS_DEFAULT_PROFILE", // Only read if AWS_SDK_LOAD_CONFIG is also set
- }
- sharedCredsFileEnvKey = []string{
- "AWS_SHARED_CREDENTIALS_FILE",
- }
- sharedConfigFileEnvKey = []string{
- "AWS_CONFIG_FILE",
- }
- webIdentityTokenFilePathEnvKey = []string{
- "AWS_WEB_IDENTITY_TOKEN_FILE",
- }
- roleARNEnvKey = []string{
- "AWS_ROLE_ARN",
- }
- roleSessionNameEnvKey = []string{
- "AWS_ROLE_SESSION_NAME",
- }
- stsRegionalEndpointKey = []string{
- "AWS_STS_REGIONAL_ENDPOINTS",
- }
- s3UsEast1RegionalEndpoint = []string{
- "AWS_S3_US_EAST_1_REGIONAL_ENDPOINT",
- }
- s3UseARNRegionEnvKey = []string{
- "AWS_S3_USE_ARN_REGION",
- }
- ec2IMDSEndpointEnvKey = []string{
- "AWS_EC2_METADATA_SERVICE_ENDPOINT",
- }
- ec2IMDSEndpointModeEnvKey = []string{
- "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",
- }
- useCABundleKey = []string{
- "AWS_CA_BUNDLE",
- }
- useClientTLSCert = []string{
- "AWS_SDK_GO_CLIENT_TLS_CERT",
- }
- useClientTLSKey = []string{
- "AWS_SDK_GO_CLIENT_TLS_KEY",
- }
- awsUseDualStackEndpoint = []string{
- "AWS_USE_DUALSTACK_ENDPOINT",
- }
- awsUseFIPSEndpoint = []string{
- "AWS_USE_FIPS_ENDPOINT",
- }
-)
-
-// loadEnvConfig retrieves the SDK's environment configuration.
-// See `envConfig` for the values that will be retrieved.
-//
-// If the environment variable `AWS_SDK_LOAD_CONFIG` is set to a truthy value
-// the shared SDK config will be loaded in addition to the SDK's specific
-// configuration values.
-func loadEnvConfig() (envConfig, error) {
- enableSharedConfig, _ := strconv.ParseBool(os.Getenv("AWS_SDK_LOAD_CONFIG"))
- return envConfigLoad(enableSharedConfig)
-}
-
-// loadEnvSharedConfig retrieves the SDK's environment configuration, and the
-// SDK shared config. See `envConfig` for the values that will be retrieved.
-//
-// Loads the shared configuration in addition to the SDK's specific configuration.
-// This will load the same values as `loadEnvConfig` if the `AWS_SDK_LOAD_CONFIG`
-// environment variable is set.
-func loadSharedEnvConfig() (envConfig, error) {
- return envConfigLoad(true)
-}
-
-func envConfigLoad(enableSharedConfig bool) (envConfig, error) {
- cfg := envConfig{}
-
- cfg.EnableSharedConfig = enableSharedConfig
-
- // Static environment credentials
- var creds credentials.Value
- setFromEnvVal(&creds.AccessKeyID, credAccessEnvKey)
- setFromEnvVal(&creds.SecretAccessKey, credSecretEnvKey)
- setFromEnvVal(&creds.SessionToken, credSessionEnvKey)
- if creds.HasKeys() {
- // Require logical grouping of credentials
- creds.ProviderName = EnvProviderName
- cfg.Creds = creds
- }
-
- // Role Metadata
- setFromEnvVal(&cfg.RoleARN, roleARNEnvKey)
- setFromEnvVal(&cfg.RoleSessionName, roleSessionNameEnvKey)
-
- // Web identity environment variables
- setFromEnvVal(&cfg.WebIdentityTokenFilePath, webIdentityTokenFilePathEnvKey)
-
- // CSM environment variables
- setFromEnvVal(&cfg.csmEnabled, csmEnabledEnvKey)
- setFromEnvVal(&cfg.CSMHost, csmHostEnvKey)
- setFromEnvVal(&cfg.CSMPort, csmPortEnvKey)
- setFromEnvVal(&cfg.CSMClientID, csmClientIDEnvKey)
-
- if len(cfg.csmEnabled) != 0 {
- v, _ := strconv.ParseBool(cfg.csmEnabled)
- cfg.CSMEnabled = &v
- }
-
- regionKeys := regionEnvKeys
- profileKeys := profileEnvKeys
- if !cfg.EnableSharedConfig {
- regionKeys = regionKeys[:1]
- profileKeys = profileKeys[:1]
- }
-
- setFromEnvVal(&cfg.Region, regionKeys)
- setFromEnvVal(&cfg.Profile, profileKeys)
-
- // endpoint discovery is in reference to it being enabled.
- setFromEnvVal(&cfg.enableEndpointDiscovery, enableEndpointDiscoveryEnvKey)
- if len(cfg.enableEndpointDiscovery) > 0 {
- cfg.EnableEndpointDiscovery = aws.Bool(cfg.enableEndpointDiscovery != "false")
- }
-
- setFromEnvVal(&cfg.SharedCredentialsFile, sharedCredsFileEnvKey)
- setFromEnvVal(&cfg.SharedConfigFile, sharedConfigFileEnvKey)
-
- if len(cfg.SharedCredentialsFile) == 0 {
- cfg.SharedCredentialsFile = defaults.SharedCredentialsFilename()
- }
- if len(cfg.SharedConfigFile) == 0 {
- cfg.SharedConfigFile = defaults.SharedConfigFilename()
- }
-
- setFromEnvVal(&cfg.CustomCABundle, useCABundleKey)
- setFromEnvVal(&cfg.ClientTLSCert, useClientTLSCert)
- setFromEnvVal(&cfg.ClientTLSKey, useClientTLSKey)
-
- var err error
- // STS Regional Endpoint variable
- for _, k := range stsRegionalEndpointKey {
- if v := os.Getenv(k); len(v) != 0 {
- cfg.STSRegionalEndpoint, err = endpoints.GetSTSRegionalEndpoint(v)
- if err != nil {
- return cfg, fmt.Errorf("failed to load, %v from env config, %v", k, err)
- }
- }
- }
-
- // S3 Regional Endpoint variable
- for _, k := range s3UsEast1RegionalEndpoint {
- if v := os.Getenv(k); len(v) != 0 {
- cfg.S3UsEast1RegionalEndpoint, err = endpoints.GetS3UsEast1RegionalEndpoint(v)
- if err != nil {
- return cfg, fmt.Errorf("failed to load, %v from env config, %v", k, err)
- }
- }
- }
-
- var s3UseARNRegion string
- setFromEnvVal(&s3UseARNRegion, s3UseARNRegionEnvKey)
- if len(s3UseARNRegion) != 0 {
- switch {
- case strings.EqualFold(s3UseARNRegion, "false"):
- cfg.S3UseARNRegion = false
- case strings.EqualFold(s3UseARNRegion, "true"):
- cfg.S3UseARNRegion = true
- default:
- return envConfig{}, fmt.Errorf(
- "invalid value for environment variable, %s=%s, need true or false",
- s3UseARNRegionEnvKey[0], s3UseARNRegion)
- }
- }
-
- setFromEnvVal(&cfg.EC2IMDSEndpoint, ec2IMDSEndpointEnvKey)
- if err := setEC2IMDSEndpointMode(&cfg.EC2IMDSEndpointMode, ec2IMDSEndpointModeEnvKey); err != nil {
- return envConfig{}, err
- }
-
- if err := setUseDualStackEndpointFromEnvVal(&cfg.UseDualStackEndpoint, awsUseDualStackEndpoint); err != nil {
- return cfg, err
- }
-
- if err := setUseFIPSEndpointFromEnvVal(&cfg.UseFIPSEndpoint, awsUseFIPSEndpoint); err != nil {
- return cfg, err
- }
-
- return cfg, nil
-}
-
-func setFromEnvVal(dst *string, keys []string) {
- for _, k := range keys {
- if v := os.Getenv(k); len(v) != 0 {
- *dst = v
- break
- }
- }
-}
-
-func setEC2IMDSEndpointMode(mode *endpoints.EC2IMDSEndpointModeState, keys []string) error {
- for _, k := range keys {
- value := os.Getenv(k)
- if len(value) == 0 {
- continue
- }
- if err := mode.SetFromString(value); err != nil {
- return fmt.Errorf("invalid value for environment variable, %s=%s, %v", k, value, err)
- }
- return nil
- }
- return nil
-}
-
-func setUseDualStackEndpointFromEnvVal(dst *endpoints.DualStackEndpointState, keys []string) error {
- for _, k := range keys {
- value := os.Getenv(k)
- if len(value) == 0 {
- continue // skip if empty
- }
-
- switch {
- case strings.EqualFold(value, "true"):
- *dst = endpoints.DualStackEndpointStateEnabled
- case strings.EqualFold(value, "false"):
- *dst = endpoints.DualStackEndpointStateDisabled
- default:
- return fmt.Errorf(
- "invalid value for environment variable, %s=%s, need true, false",
- k, value)
- }
- }
- return nil
-}
-
-func setUseFIPSEndpointFromEnvVal(dst *endpoints.FIPSEndpointState, keys []string) error {
- for _, k := range keys {
- value := os.Getenv(k)
- if len(value) == 0 {
- continue // skip if empty
- }
-
- switch {
- case strings.EqualFold(value, "true"):
- *dst = endpoints.FIPSEndpointStateEnabled
- case strings.EqualFold(value, "false"):
- *dst = endpoints.FIPSEndpointStateDisabled
- default:
- return fmt.Errorf(
- "invalid value for environment variable, %s=%s, need true, false",
- k, value)
- }
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
deleted file mode 100644
index ebace4bb7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go
+++ /dev/null
@@ -1,992 +0,0 @@
-package session
-
-import (
- "crypto/tls"
- "crypto/x509"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "os"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/corehandlers"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/csm"
- "github.com/aws/aws-sdk-go/aws/defaults"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const (
- // ErrCodeSharedConfig represents an error that occurs in the shared
- // configuration logic
- ErrCodeSharedConfig = "SharedConfigErr"
-
- // ErrCodeLoadCustomCABundle error code for unable to load custom CA bundle.
- ErrCodeLoadCustomCABundle = "LoadCustomCABundleError"
-
- // ErrCodeLoadClientTLSCert error code for unable to load client TLS
- // certificate or key
- ErrCodeLoadClientTLSCert = "LoadClientTLSCertError"
-)
-
-// ErrSharedConfigSourceCollision will be returned if a section contains both
-// source_profile and credential_source
-var ErrSharedConfigSourceCollision = awserr.New(ErrCodeSharedConfig, "only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso", nil)
-
-// ErrSharedConfigECSContainerEnvVarEmpty will be returned if the environment
-// variables are empty and Environment was set as the credential source
-var ErrSharedConfigECSContainerEnvVarEmpty = awserr.New(ErrCodeSharedConfig, "EcsContainer was specified as the credential_source, but 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' was not set", nil)
-
-// ErrSharedConfigInvalidCredSource will be returned if an invalid credential source was provided
-var ErrSharedConfigInvalidCredSource = awserr.New(ErrCodeSharedConfig, "credential source values must be EcsContainer, Ec2InstanceMetadata, or Environment", nil)
-
-// A Session provides a central location to create service clients from and
-// store configurations and request handlers for those services.
-//
-// Sessions are safe to create service clients concurrently, but it is not safe
-// to mutate the Session concurrently.
-//
-// The Session satisfies the service client's client.ConfigProvider.
-type Session struct {
- Config *aws.Config
- Handlers request.Handlers
-
- options Options
-}
-
-// New creates a new instance of the handlers merging in the provided configs
-// on top of the SDK's default configurations. Once the Session is created it
-// can be mutated to modify the Config or Handlers. The Session is safe to be
-// read concurrently, but it should not be written to concurrently.
-//
-// If the AWS_SDK_LOAD_CONFIG environment is set to a truthy value, the New
-// method could now encounter an error when loading the configuration. When
-// The environment variable is set, and an error occurs, New will return a
-// session that will fail all requests reporting the error that occurred while
-// loading the session. Use NewSession to get the error when creating the
-// session.
-//
-// If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value
-// the shared config file (~/.aws/config) will also be loaded, in addition to
-// the shared credentials file (~/.aws/credentials). Values set in both the
-// shared config, and shared credentials will be taken from the shared
-// credentials file.
-//
-// Deprecated: Use NewSession functions to create sessions instead. NewSession
-// has the same functionality as New except an error can be returned when the
-// func is called instead of waiting to receive an error until a request is made.
-func New(cfgs ...*aws.Config) *Session {
- // load initial config from environment
- envCfg, envErr := loadEnvConfig()
-
- if envCfg.EnableSharedConfig {
- var cfg aws.Config
- cfg.MergeIn(cfgs...)
- s, err := NewSessionWithOptions(Options{
- Config: cfg,
- SharedConfigState: SharedConfigEnable,
- })
- if err != nil {
- // Old session.New expected all errors to be discovered when
- // a request is made, and would report the errors then. This
- // needs to be replicated if an error occurs while creating
- // the session.
- msg := "failed to create session with AWS_SDK_LOAD_CONFIG enabled. " +
- "Use session.NewSession to handle errors occurring during session creation."
-
- // Session creation failed, need to report the error and prevent
- // any requests from succeeding.
- s = &Session{Config: defaults.Config()}
- s.logDeprecatedNewSessionError(msg, err, cfgs)
- }
-
- return s
- }
-
- s := deprecatedNewSession(envCfg, cfgs...)
- if envErr != nil {
- msg := "failed to load env config"
- s.logDeprecatedNewSessionError(msg, envErr, cfgs)
- }
-
- if csmCfg, err := loadCSMConfig(envCfg, []string{}); err != nil {
- if l := s.Config.Logger; l != nil {
- l.Log(fmt.Sprintf("ERROR: failed to load CSM configuration, %v", err))
- }
- } else if csmCfg.Enabled {
- err := enableCSM(&s.Handlers, csmCfg, s.Config.Logger)
- if err != nil {
- msg := "failed to enable CSM"
- s.logDeprecatedNewSessionError(msg, err, cfgs)
- }
- }
-
- return s
-}
-
-// NewSession returns a new Session created from SDK defaults, config files,
-// environment, and user provided config files. Once the Session is created
-// it can be mutated to modify the Config or Handlers. The Session is safe to
-// be read concurrently, but it should not be written to concurrently.
-//
-// If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value
-// the shared config file (~/.aws/config) will also be loaded in addition to
-// the shared credentials file (~/.aws/credentials). Values set in both the
-// shared config, and shared credentials will be taken from the shared
-// credentials file. Enabling the Shared Config will also allow the Session
-// to be built with retrieving credentials with AssumeRole set in the config.
-//
-// See the NewSessionWithOptions func for information on how to override or
-// control through code how the Session will be created, such as specifying the
-// config profile, and controlling if shared config is enabled or not.
-func NewSession(cfgs ...*aws.Config) (*Session, error) {
- opts := Options{}
- opts.Config.MergeIn(cfgs...)
-
- return NewSessionWithOptions(opts)
-}
-
-// SharedConfigState provides the ability to optionally override the state
-// of the session's creation based on the shared config being enabled or
-// disabled.
-type SharedConfigState int
-
-const (
- // SharedConfigStateFromEnv does not override any state of the
- // AWS_SDK_LOAD_CONFIG env var. It is the default value of the
- // SharedConfigState type.
- SharedConfigStateFromEnv SharedConfigState = iota
-
- // SharedConfigDisable overrides the AWS_SDK_LOAD_CONFIG env var value
- // and disables the shared config functionality.
- SharedConfigDisable
-
- // SharedConfigEnable overrides the AWS_SDK_LOAD_CONFIG env var value
- // and enables the shared config functionality.
- SharedConfigEnable
-)
-
-// Options provides the means to control how a Session is created and what
-// configuration values will be loaded.
-//
-type Options struct {
- // Provides config values for the SDK to use when creating service clients
- // and making API requests to services. Any value set in with this field
- // will override the associated value provided by the SDK defaults,
- // environment or config files where relevant.
- //
- // If not set, configuration values from from SDK defaults, environment,
- // config will be used.
- Config aws.Config
-
- // Overrides the config profile the Session should be created from. If not
- // set the value of the environment variable will be loaded (AWS_PROFILE,
- // or AWS_DEFAULT_PROFILE if the Shared Config is enabled).
- //
- // If not set and environment variables are not set the "default"
- // (DefaultSharedConfigProfile) will be used as the profile to load the
- // session config from.
- Profile string
-
- // Instructs how the Session will be created based on the AWS_SDK_LOAD_CONFIG
- // environment variable. By default a Session will be created using the
- // value provided by the AWS_SDK_LOAD_CONFIG environment variable.
- //
- // Setting this value to SharedConfigEnable or SharedConfigDisable
- // will allow you to override the AWS_SDK_LOAD_CONFIG environment variable
- // and enable or disable the shared config functionality.
- SharedConfigState SharedConfigState
-
- // Ordered list of files the session will load configuration from.
- // It will override environment variable AWS_SHARED_CREDENTIALS_FILE, AWS_CONFIG_FILE.
- SharedConfigFiles []string
-
- // When the SDK's shared config is configured to assume a role with MFA
- // this option is required in order to provide the mechanism that will
- // retrieve the MFA token. There is no default value for this field. If
- // it is not set an error will be returned when creating the session.
- //
- // This token provider will be called when ever the assumed role's
- // credentials need to be refreshed. Within the context of service clients
- // all sharing the same session the SDK will ensure calls to the token
- // provider are atomic. When sharing a token provider across multiple
- // sessions additional synchronization logic is needed to ensure the
- // token providers do not introduce race conditions. It is recommend to
- // share the session where possible.
- //
- // stscreds.StdinTokenProvider is a basic implementation that will prompt
- // from stdin for the MFA token code.
- //
- // This field is only used if the shared configuration is enabled, and
- // the config enables assume role wit MFA via the mfa_serial field.
- AssumeRoleTokenProvider func() (string, error)
-
- // When the SDK's shared config is configured to assume a role this option
- // may be provided to set the expiry duration of the STS credentials.
- // Defaults to 15 minutes if not set as documented in the
- // stscreds.AssumeRoleProvider.
- AssumeRoleDuration time.Duration
-
- // Reader for a custom Credentials Authority (CA) bundle in PEM format that
- // the SDK will use instead of the default system's root CA bundle. Use this
- // only if you want to replace the CA bundle the SDK uses for TLS requests.
- //
- // HTTP Client's Transport concrete implementation must be a http.Transport
- // or creating the session will fail.
- //
- // If the Transport's TLS config is set this option will cause the SDK
- // to overwrite the Transport's TLS config's RootCAs value. If the CA
- // bundle reader contains multiple certificates all of them will be loaded.
- //
- // Can also be specified via the environment variable:
- //
- // AWS_CA_BUNDLE=$HOME/ca_bundle
- //
- // Can also be specified via the shared config field:
- //
- // ca_bundle = $HOME/ca_bundle
- CustomCABundle io.Reader
-
- // Reader for the TLC client certificate that should be used by the SDK's
- // HTTP transport when making requests. The certificate must be paired with
- // a TLS client key file. Will be ignored if both are not provided.
- //
- // HTTP Client's Transport concrete implementation must be a http.Transport
- // or creating the session will fail.
- //
- // Can also be specified via the environment variable:
- //
- // AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert
- ClientTLSCert io.Reader
-
- // Reader for the TLC client key that should be used by the SDK's HTTP
- // transport when making requests. The key must be paired with a TLS client
- // certificate file. Will be ignored if both are not provided.
- //
- // HTTP Client's Transport concrete implementation must be a http.Transport
- // or creating the session will fail.
- //
- // Can also be specified via the environment variable:
- //
- // AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key
- ClientTLSKey io.Reader
-
- // The handlers that the session and all API clients will be created with.
- // This must be a complete set of handlers. Use the defaults.Handlers()
- // function to initialize this value before changing the handlers to be
- // used by the SDK.
- Handlers request.Handlers
-
- // Allows specifying a custom endpoint to be used by the EC2 IMDS client
- // when making requests to the EC2 IMDS API. The endpoint value should
- // include the URI scheme. If the scheme is not present it will be defaulted to http.
- //
- // If unset, will the EC2 IMDS client will use its default endpoint.
- //
- // Can also be specified via the environment variable,
- // AWS_EC2_METADATA_SERVICE_ENDPOINT.
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://169.254.169.254
- //
- // If using an URL with an IPv6 address literal, the IPv6 address
- // component must be enclosed in square brackets.
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1]
- EC2IMDSEndpoint string
-
- // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
- //
- // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6
- EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState
-}
-
-// NewSessionWithOptions returns a new Session created from SDK defaults, config files,
-// environment, and user provided config files. This func uses the Options
-// values to configure how the Session is created.
-//
-// If the AWS_SDK_LOAD_CONFIG environment variable is set to a truthy value
-// the shared config file (~/.aws/config) will also be loaded in addition to
-// the shared credentials file (~/.aws/credentials). Values set in both the
-// shared config, and shared credentials will be taken from the shared
-// credentials file. Enabling the Shared Config will also allow the Session
-// to be built with retrieving credentials with AssumeRole set in the config.
-//
-// // Equivalent to session.New
-// sess := session.Must(session.NewSessionWithOptions(session.Options{}))
-//
-// // Specify profile to load for the session's config
-// sess := session.Must(session.NewSessionWithOptions(session.Options{
-// Profile: "profile_name",
-// }))
-//
-// // Specify profile for config and region for requests
-// sess := session.Must(session.NewSessionWithOptions(session.Options{
-// Config: aws.Config{Region: aws.String("us-east-1")},
-// Profile: "profile_name",
-// }))
-//
-// // Force enable Shared Config support
-// sess := session.Must(session.NewSessionWithOptions(session.Options{
-// SharedConfigState: session.SharedConfigEnable,
-// }))
-func NewSessionWithOptions(opts Options) (*Session, error) {
- var envCfg envConfig
- var err error
- if opts.SharedConfigState == SharedConfigEnable {
- envCfg, err = loadSharedEnvConfig()
- if err != nil {
- return nil, fmt.Errorf("failed to load shared config, %v", err)
- }
- } else {
- envCfg, err = loadEnvConfig()
- if err != nil {
- return nil, fmt.Errorf("failed to load environment config, %v", err)
- }
- }
-
- if len(opts.Profile) != 0 {
- envCfg.Profile = opts.Profile
- }
-
- switch opts.SharedConfigState {
- case SharedConfigDisable:
- envCfg.EnableSharedConfig = false
- case SharedConfigEnable:
- envCfg.EnableSharedConfig = true
- }
-
- return newSession(opts, envCfg, &opts.Config)
-}
-
-// Must is a helper function to ensure the Session is valid and there was no
-// error when calling a NewSession function.
-//
-// This helper is intended to be used in variable initialization to load the
-// Session and configuration at startup. Such as:
-//
-// var sess = session.Must(session.NewSession())
-func Must(sess *Session, err error) *Session {
- if err != nil {
- panic(err)
- }
-
- return sess
-}
-
-// Wraps the endpoint resolver with a resolver that will return a custom
-// endpoint for EC2 IMDS.
-func wrapEC2IMDSEndpoint(resolver endpoints.Resolver, endpoint string, mode endpoints.EC2IMDSEndpointModeState) endpoints.Resolver {
- return endpoints.ResolverFunc(
- func(service, region string, opts ...func(*endpoints.Options)) (
- endpoints.ResolvedEndpoint, error,
- ) {
- if service == ec2MetadataServiceID && len(endpoint) > 0 {
- return endpoints.ResolvedEndpoint{
- URL: endpoint,
- SigningName: ec2MetadataServiceID,
- SigningRegion: region,
- }, nil
- } else if service == ec2MetadataServiceID {
- opts = append(opts, func(o *endpoints.Options) {
- o.EC2MetadataEndpointMode = mode
- })
- }
- return resolver.EndpointFor(service, region, opts...)
- })
-}
-
-func deprecatedNewSession(envCfg envConfig, cfgs ...*aws.Config) *Session {
- cfg := defaults.Config()
- handlers := defaults.Handlers()
-
- // Apply the passed in configs so the configuration can be applied to the
- // default credential chain
- cfg.MergeIn(cfgs...)
- if cfg.EndpointResolver == nil {
- // An endpoint resolver is required for a session to be able to provide
- // endpoints for service client configurations.
- cfg.EndpointResolver = endpoints.DefaultResolver()
- }
-
- if !(len(envCfg.EC2IMDSEndpoint) == 0 && envCfg.EC2IMDSEndpointMode == endpoints.EC2IMDSEndpointModeStateUnset) {
- cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, envCfg.EC2IMDSEndpoint, envCfg.EC2IMDSEndpointMode)
- }
-
- cfg.Credentials = defaults.CredChain(cfg, handlers)
-
- // Reapply any passed in configs to override credentials if set
- cfg.MergeIn(cfgs...)
-
- s := &Session{
- Config: cfg,
- Handlers: handlers,
- options: Options{
- EC2IMDSEndpoint: envCfg.EC2IMDSEndpoint,
- },
- }
-
- initHandlers(s)
- return s
-}
-
-func enableCSM(handlers *request.Handlers, cfg csmConfig, logger aws.Logger) error {
- if logger != nil {
- logger.Log("Enabling CSM")
- }
-
- r, err := csm.Start(cfg.ClientID, csm.AddressWithDefaults(cfg.Host, cfg.Port))
- if err != nil {
- return err
- }
- r.InjectHandlers(handlers)
-
- return nil
-}
-
-func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, error) {
- cfg := defaults.Config()
-
- handlers := opts.Handlers
- if handlers.IsEmpty() {
- handlers = defaults.Handlers()
- }
-
- // Get a merged version of the user provided config to determine if
- // credentials were.
- userCfg := &aws.Config{}
- userCfg.MergeIn(cfgs...)
- cfg.MergeIn(userCfg)
-
- // Ordered config files will be loaded in with later files overwriting
- // previous config file values.
- var cfgFiles []string
- if opts.SharedConfigFiles != nil {
- cfgFiles = opts.SharedConfigFiles
- } else {
- cfgFiles = []string{envCfg.SharedConfigFile, envCfg.SharedCredentialsFile}
- if !envCfg.EnableSharedConfig {
- // The shared config file (~/.aws/config) is only loaded if instructed
- // to load via the envConfig.EnableSharedConfig (AWS_SDK_LOAD_CONFIG).
- cfgFiles = cfgFiles[1:]
- }
- }
-
- // Load additional config from file(s)
- sharedCfg, err := loadSharedConfig(envCfg.Profile, cfgFiles, envCfg.EnableSharedConfig)
- if err != nil {
- if len(envCfg.Profile) == 0 && !envCfg.EnableSharedConfig && (envCfg.Creds.HasKeys() || userCfg.Credentials != nil) {
- // Special case where the user has not explicitly specified an AWS_PROFILE,
- // or session.Options.profile, shared config is not enabled, and the
- // environment has credentials, allow the shared config file to fail to
- // load since the user has already provided credentials, and nothing else
- // is required to be read file. Github(aws/aws-sdk-go#2455)
- } else if _, ok := err.(SharedConfigProfileNotExistsError); !ok {
- return nil, err
- }
- }
-
- if err := mergeConfigSrcs(cfg, userCfg, envCfg, sharedCfg, handlers, opts); err != nil {
- return nil, err
- }
-
- if err := setTLSOptions(&opts, cfg, envCfg, sharedCfg); err != nil {
- return nil, err
- }
-
- s := &Session{
- Config: cfg,
- Handlers: handlers,
- options: opts,
- }
-
- initHandlers(s)
-
- if csmCfg, err := loadCSMConfig(envCfg, cfgFiles); err != nil {
- if l := s.Config.Logger; l != nil {
- l.Log(fmt.Sprintf("ERROR: failed to load CSM configuration, %v", err))
- }
- } else if csmCfg.Enabled {
- err = enableCSM(&s.Handlers, csmCfg, s.Config.Logger)
- if err != nil {
- return nil, err
- }
- }
-
- return s, nil
-}
-
-type csmConfig struct {
- Enabled bool
- Host string
- Port string
- ClientID string
-}
-
-var csmProfileName = "aws_csm"
-
-func loadCSMConfig(envCfg envConfig, cfgFiles []string) (csmConfig, error) {
- if envCfg.CSMEnabled != nil {
- if *envCfg.CSMEnabled {
- return csmConfig{
- Enabled: true,
- ClientID: envCfg.CSMClientID,
- Host: envCfg.CSMHost,
- Port: envCfg.CSMPort,
- }, nil
- }
- return csmConfig{}, nil
- }
-
- sharedCfg, err := loadSharedConfig(csmProfileName, cfgFiles, false)
- if err != nil {
- if _, ok := err.(SharedConfigProfileNotExistsError); !ok {
- return csmConfig{}, err
- }
- }
- if sharedCfg.CSMEnabled != nil && *sharedCfg.CSMEnabled == true {
- return csmConfig{
- Enabled: true,
- ClientID: sharedCfg.CSMClientID,
- Host: sharedCfg.CSMHost,
- Port: sharedCfg.CSMPort,
- }, nil
- }
-
- return csmConfig{}, nil
-}
-
-func setTLSOptions(opts *Options, cfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig) error {
- // CA Bundle can be specified in both environment variable shared config file.
- var caBundleFilename = envCfg.CustomCABundle
- if len(caBundleFilename) == 0 {
- caBundleFilename = sharedCfg.CustomCABundle
- }
-
- // Only use environment value if session option is not provided.
- customTLSOptions := map[string]struct {
- filename string
- field *io.Reader
- errCode string
- }{
- "custom CA bundle PEM": {filename: caBundleFilename, field: &opts.CustomCABundle, errCode: ErrCodeLoadCustomCABundle},
- "custom client TLS cert": {filename: envCfg.ClientTLSCert, field: &opts.ClientTLSCert, errCode: ErrCodeLoadClientTLSCert},
- "custom client TLS key": {filename: envCfg.ClientTLSKey, field: &opts.ClientTLSKey, errCode: ErrCodeLoadClientTLSCert},
- }
- for name, v := range customTLSOptions {
- if len(v.filename) != 0 && *v.field == nil {
- f, err := os.Open(v.filename)
- if err != nil {
- return awserr.New(v.errCode, fmt.Sprintf("failed to open %s file", name), err)
- }
- defer f.Close()
- *v.field = f
- }
- }
-
- // Setup HTTP client with custom cert bundle if enabled
- if opts.CustomCABundle != nil {
- if err := loadCustomCABundle(cfg.HTTPClient, opts.CustomCABundle); err != nil {
- return err
- }
- }
-
- // Setup HTTP client TLS certificate and key for client TLS authentication.
- if opts.ClientTLSCert != nil && opts.ClientTLSKey != nil {
- if err := loadClientTLSCert(cfg.HTTPClient, opts.ClientTLSCert, opts.ClientTLSKey); err != nil {
- return err
- }
- } else if opts.ClientTLSCert == nil && opts.ClientTLSKey == nil {
- // Do nothing if neither values are available.
-
- } else {
- return awserr.New(ErrCodeLoadClientTLSCert,
- fmt.Sprintf("client TLS cert(%t) and key(%t) must both be provided",
- opts.ClientTLSCert != nil, opts.ClientTLSKey != nil), nil)
- }
-
- return nil
-}
-
-func getHTTPTransport(client *http.Client) (*http.Transport, error) {
- var t *http.Transport
- switch v := client.Transport.(type) {
- case *http.Transport:
- t = v
- default:
- if client.Transport != nil {
- return nil, fmt.Errorf("unsupported transport, %T", client.Transport)
- }
- }
- if t == nil {
- // Nil transport implies `http.DefaultTransport` should be used. Since
- // the SDK cannot modify, nor copy the `DefaultTransport` specifying
- // the values the next closest behavior.
- t = getCustomTransport()
- }
-
- return t, nil
-}
-
-func loadCustomCABundle(client *http.Client, bundle io.Reader) error {
- t, err := getHTTPTransport(client)
- if err != nil {
- return awserr.New(ErrCodeLoadCustomCABundle,
- "unable to load custom CA bundle, HTTPClient's transport unsupported type", err)
- }
-
- p, err := loadCertPool(bundle)
- if err != nil {
- return err
- }
- if t.TLSClientConfig == nil {
- t.TLSClientConfig = &tls.Config{}
- }
- t.TLSClientConfig.RootCAs = p
-
- client.Transport = t
-
- return nil
-}
-
-func loadCertPool(r io.Reader) (*x509.CertPool, error) {
- b, err := ioutil.ReadAll(r)
- if err != nil {
- return nil, awserr.New(ErrCodeLoadCustomCABundle,
- "failed to read custom CA bundle PEM file", err)
- }
-
- p := x509.NewCertPool()
- if !p.AppendCertsFromPEM(b) {
- return nil, awserr.New(ErrCodeLoadCustomCABundle,
- "failed to load custom CA bundle PEM file", err)
- }
-
- return p, nil
-}
-
-func loadClientTLSCert(client *http.Client, certFile, keyFile io.Reader) error {
- t, err := getHTTPTransport(client)
- if err != nil {
- return awserr.New(ErrCodeLoadClientTLSCert,
- "unable to get usable HTTP transport from client", err)
- }
-
- cert, err := ioutil.ReadAll(certFile)
- if err != nil {
- return awserr.New(ErrCodeLoadClientTLSCert,
- "unable to get read client TLS cert file", err)
- }
-
- key, err := ioutil.ReadAll(keyFile)
- if err != nil {
- return awserr.New(ErrCodeLoadClientTLSCert,
- "unable to get read client TLS key file", err)
- }
-
- clientCert, err := tls.X509KeyPair(cert, key)
- if err != nil {
- return awserr.New(ErrCodeLoadClientTLSCert,
- "unable to load x509 key pair from client cert", err)
- }
-
- tlsCfg := t.TLSClientConfig
- if tlsCfg == nil {
- tlsCfg = &tls.Config{}
- }
-
- tlsCfg.Certificates = append(tlsCfg.Certificates, clientCert)
-
- t.TLSClientConfig = tlsCfg
- client.Transport = t
-
- return nil
-}
-
-func mergeConfigSrcs(cfg, userCfg *aws.Config,
- envCfg envConfig, sharedCfg sharedConfig,
- handlers request.Handlers,
- sessOpts Options,
-) error {
-
- // Region if not already set by user
- if len(aws.StringValue(cfg.Region)) == 0 {
- if len(envCfg.Region) > 0 {
- cfg.WithRegion(envCfg.Region)
- } else if envCfg.EnableSharedConfig && len(sharedCfg.Region) > 0 {
- cfg.WithRegion(sharedCfg.Region)
- }
- }
-
- if cfg.EnableEndpointDiscovery == nil {
- if envCfg.EnableEndpointDiscovery != nil {
- cfg.WithEndpointDiscovery(*envCfg.EnableEndpointDiscovery)
- } else if envCfg.EnableSharedConfig && sharedCfg.EnableEndpointDiscovery != nil {
- cfg.WithEndpointDiscovery(*sharedCfg.EnableEndpointDiscovery)
- }
- }
-
- // Regional Endpoint flag for STS endpoint resolving
- mergeSTSRegionalEndpointConfig(cfg, []endpoints.STSRegionalEndpoint{
- userCfg.STSRegionalEndpoint,
- envCfg.STSRegionalEndpoint,
- sharedCfg.STSRegionalEndpoint,
- endpoints.LegacySTSEndpoint,
- })
-
- // Regional Endpoint flag for S3 endpoint resolving
- mergeS3UsEast1RegionalEndpointConfig(cfg, []endpoints.S3UsEast1RegionalEndpoint{
- userCfg.S3UsEast1RegionalEndpoint,
- envCfg.S3UsEast1RegionalEndpoint,
- sharedCfg.S3UsEast1RegionalEndpoint,
- endpoints.LegacyS3UsEast1Endpoint,
- })
-
- var ec2IMDSEndpoint string
- for _, v := range []string{
- sessOpts.EC2IMDSEndpoint,
- envCfg.EC2IMDSEndpoint,
- sharedCfg.EC2IMDSEndpoint,
- } {
- if len(v) != 0 {
- ec2IMDSEndpoint = v
- break
- }
- }
-
- var endpointMode endpoints.EC2IMDSEndpointModeState
- for _, v := range []endpoints.EC2IMDSEndpointModeState{
- sessOpts.EC2IMDSEndpointMode,
- envCfg.EC2IMDSEndpointMode,
- sharedCfg.EC2IMDSEndpointMode,
- } {
- if v != endpoints.EC2IMDSEndpointModeStateUnset {
- endpointMode = v
- break
- }
- }
-
- if len(ec2IMDSEndpoint) != 0 || endpointMode != endpoints.EC2IMDSEndpointModeStateUnset {
- cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, ec2IMDSEndpoint, endpointMode)
- }
-
- // Configure credentials if not already set by the user when creating the
- // Session.
- if cfg.Credentials == credentials.AnonymousCredentials && userCfg.Credentials == nil {
- creds, err := resolveCredentials(cfg, envCfg, sharedCfg, handlers, sessOpts)
- if err != nil {
- return err
- }
- cfg.Credentials = creds
- }
-
- cfg.S3UseARNRegion = userCfg.S3UseARNRegion
- if cfg.S3UseARNRegion == nil {
- cfg.S3UseARNRegion = &envCfg.S3UseARNRegion
- }
- if cfg.S3UseARNRegion == nil {
- cfg.S3UseARNRegion = &sharedCfg.S3UseARNRegion
- }
-
- for _, v := range []endpoints.DualStackEndpointState{userCfg.UseDualStackEndpoint, envCfg.UseDualStackEndpoint, sharedCfg.UseDualStackEndpoint} {
- if v != endpoints.DualStackEndpointStateUnset {
- cfg.UseDualStackEndpoint = v
- break
- }
- }
-
- for _, v := range []endpoints.FIPSEndpointState{userCfg.UseFIPSEndpoint, envCfg.UseFIPSEndpoint, sharedCfg.UseFIPSEndpoint} {
- if v != endpoints.FIPSEndpointStateUnset {
- cfg.UseFIPSEndpoint = v
- break
- }
- }
-
- return nil
-}
-
-func mergeSTSRegionalEndpointConfig(cfg *aws.Config, values []endpoints.STSRegionalEndpoint) {
- for _, v := range values {
- if v != endpoints.UnsetSTSEndpoint {
- cfg.STSRegionalEndpoint = v
- break
- }
- }
-}
-
-func mergeS3UsEast1RegionalEndpointConfig(cfg *aws.Config, values []endpoints.S3UsEast1RegionalEndpoint) {
- for _, v := range values {
- if v != endpoints.UnsetS3UsEast1Endpoint {
- cfg.S3UsEast1RegionalEndpoint = v
- break
- }
- }
-}
-
-func initHandlers(s *Session) {
- // Add the Validate parameter handler if it is not disabled.
- s.Handlers.Validate.Remove(corehandlers.ValidateParametersHandler)
- if !aws.BoolValue(s.Config.DisableParamValidation) {
- s.Handlers.Validate.PushBackNamed(corehandlers.ValidateParametersHandler)
- }
-}
-
-// Copy creates and returns a copy of the current Session, copying the config
-// and handlers. If any additional configs are provided they will be merged
-// on top of the Session's copied config.
-//
-// // Create a copy of the current Session, configured for the us-west-2 region.
-// sess.Copy(&aws.Config{Region: aws.String("us-west-2")})
-func (s *Session) Copy(cfgs ...*aws.Config) *Session {
- newSession := &Session{
- Config: s.Config.Copy(cfgs...),
- Handlers: s.Handlers.Copy(),
- options: s.options,
- }
-
- initHandlers(newSession)
-
- return newSession
-}
-
-// ClientConfig satisfies the client.ConfigProvider interface and is used to
-// configure the service client instances. Passing the Session to the service
-// client's constructor (New) will use this method to configure the client.
-func (s *Session) ClientConfig(service string, cfgs ...*aws.Config) client.Config {
- s = s.Copy(cfgs...)
-
- resolvedRegion := normalizeRegion(s.Config)
-
- region := aws.StringValue(s.Config.Region)
- resolved, err := s.resolveEndpoint(service, region, resolvedRegion, s.Config)
- if err != nil {
- s.Handlers.Validate.PushBack(func(r *request.Request) {
- if len(r.ClientInfo.Endpoint) != 0 {
- // Error occurred while resolving endpoint, but the request
- // being invoked has had an endpoint specified after the client
- // was created.
- return
- }
- r.Error = err
- })
- }
-
- return client.Config{
- Config: s.Config,
- Handlers: s.Handlers,
- PartitionID: resolved.PartitionID,
- Endpoint: resolved.URL,
- SigningRegion: resolved.SigningRegion,
- SigningNameDerived: resolved.SigningNameDerived,
- SigningName: resolved.SigningName,
- ResolvedRegion: resolvedRegion,
- }
-}
-
-const ec2MetadataServiceID = "ec2metadata"
-
-func (s *Session) resolveEndpoint(service, region, resolvedRegion string, cfg *aws.Config) (endpoints.ResolvedEndpoint, error) {
-
- if ep := aws.StringValue(cfg.Endpoint); len(ep) != 0 {
- return endpoints.ResolvedEndpoint{
- URL: endpoints.AddScheme(ep, aws.BoolValue(cfg.DisableSSL)),
- SigningRegion: region,
- }, nil
- }
-
- resolved, err := cfg.EndpointResolver.EndpointFor(service, region,
- func(opt *endpoints.Options) {
- opt.DisableSSL = aws.BoolValue(cfg.DisableSSL)
-
- opt.UseDualStack = aws.BoolValue(cfg.UseDualStack)
- opt.UseDualStackEndpoint = cfg.UseDualStackEndpoint
-
- opt.UseFIPSEndpoint = cfg.UseFIPSEndpoint
-
- // Support for STSRegionalEndpoint where the STSRegionalEndpoint is
- // provided in envConfig or sharedConfig with envConfig getting
- // precedence.
- opt.STSRegionalEndpoint = cfg.STSRegionalEndpoint
-
- // Support for S3UsEast1RegionalEndpoint where the S3UsEast1RegionalEndpoint is
- // provided in envConfig or sharedConfig with envConfig getting
- // precedence.
- opt.S3UsEast1RegionalEndpoint = cfg.S3UsEast1RegionalEndpoint
-
- // Support the condition where the service is modeled but its
- // endpoint metadata is not available.
- opt.ResolveUnknownService = true
-
- opt.ResolvedRegion = resolvedRegion
-
- opt.Logger = cfg.Logger
- opt.LogDeprecated = cfg.LogLevel.Matches(aws.LogDebugWithDeprecated)
- },
- )
- if err != nil {
- return endpoints.ResolvedEndpoint{}, err
- }
-
- return resolved, nil
-}
-
-// ClientConfigNoResolveEndpoint is the same as ClientConfig with the exception
-// that the EndpointResolver will not be used to resolve the endpoint. The only
-// endpoint set must come from the aws.Config.Endpoint field.
-func (s *Session) ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) client.Config {
- s = s.Copy(cfgs...)
-
- resolvedRegion := normalizeRegion(s.Config)
-
- var resolved endpoints.ResolvedEndpoint
- if ep := aws.StringValue(s.Config.Endpoint); len(ep) > 0 {
- resolved.URL = endpoints.AddScheme(ep, aws.BoolValue(s.Config.DisableSSL))
- resolved.SigningRegion = aws.StringValue(s.Config.Region)
- }
-
- return client.Config{
- Config: s.Config,
- Handlers: s.Handlers,
- Endpoint: resolved.URL,
- SigningRegion: resolved.SigningRegion,
- SigningNameDerived: resolved.SigningNameDerived,
- SigningName: resolved.SigningName,
- ResolvedRegion: resolvedRegion,
- }
-}
-
-// logDeprecatedNewSessionError function enables error handling for session
-func (s *Session) logDeprecatedNewSessionError(msg string, err error, cfgs []*aws.Config) {
- // Session creation failed, need to report the error and prevent
- // any requests from succeeding.
- s.Config.MergeIn(cfgs...)
- s.Config.Logger.Log("ERROR:", msg, "Error:", err)
- s.Handlers.Validate.PushBack(func(r *request.Request) {
- r.Error = err
- })
-}
-
-// normalizeRegion resolves / normalizes the configured region (converts pseudo fips regions), and modifies the provided
-// config to have the equivalent options for resolution and returns the resolved region name.
-func normalizeRegion(cfg *aws.Config) (resolved string) {
- const fipsInfix = "-fips-"
- const fipsPrefix = "-fips"
- const fipsSuffix = "fips-"
-
- region := aws.StringValue(cfg.Region)
-
- if strings.Contains(region, fipsInfix) ||
- strings.Contains(region, fipsPrefix) ||
- strings.Contains(region, fipsSuffix) {
- resolved = strings.Replace(strings.Replace(strings.Replace(
- region, fipsInfix, "-", -1), fipsPrefix, "", -1), fipsSuffix, "", -1)
- cfg.UseFIPSEndpoint = endpoints.FIPSEndpointStateEnabled
- }
-
- return resolved
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
deleted file mode 100644
index 424c82b4d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go
+++ /dev/null
@@ -1,729 +0,0 @@
-package session
-
-import (
- "fmt"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/endpoints"
- "github.com/aws/aws-sdk-go/internal/ini"
-)
-
-const (
- // Static Credentials group
- accessKeyIDKey = `aws_access_key_id` // group required
- secretAccessKey = `aws_secret_access_key` // group required
- sessionTokenKey = `aws_session_token` // optional
-
- // Assume Role Credentials group
- roleArnKey = `role_arn` // group required
- sourceProfileKey = `source_profile` // group required (or credential_source)
- credentialSourceKey = `credential_source` // group required (or source_profile)
- externalIDKey = `external_id` // optional
- mfaSerialKey = `mfa_serial` // optional
- roleSessionNameKey = `role_session_name` // optional
- roleDurationSecondsKey = "duration_seconds" // optional
-
- // AWS Single Sign-On (AWS SSO) group
- ssoAccountIDKey = "sso_account_id"
- ssoRegionKey = "sso_region"
- ssoRoleNameKey = "sso_role_name"
- ssoStartURL = "sso_start_url"
-
- // CSM options
- csmEnabledKey = `csm_enabled`
- csmHostKey = `csm_host`
- csmPortKey = `csm_port`
- csmClientIDKey = `csm_client_id`
-
- // Additional Config fields
- regionKey = `region`
-
- // custom CA Bundle filename
- customCABundleKey = `ca_bundle`
-
- // endpoint discovery group
- enableEndpointDiscoveryKey = `endpoint_discovery_enabled` // optional
-
- // External Credential Process
- credentialProcessKey = `credential_process` // optional
-
- // Web Identity Token File
- webIdentityTokenFileKey = `web_identity_token_file` // optional
-
- // Additional config fields for regional or legacy endpoints
- stsRegionalEndpointSharedKey = `sts_regional_endpoints`
-
- // Additional config fields for regional or legacy endpoints
- s3UsEast1RegionalSharedKey = `s3_us_east_1_regional_endpoint`
-
- // DefaultSharedConfigProfile is the default profile to be used when
- // loading configuration from the config files if another profile name
- // is not provided.
- DefaultSharedConfigProfile = `default`
-
- // S3 ARN Region Usage
- s3UseARNRegionKey = "s3_use_arn_region"
-
- // EC2 IMDS Endpoint Mode
- ec2MetadataServiceEndpointModeKey = "ec2_metadata_service_endpoint_mode"
-
- // EC2 IMDS Endpoint
- ec2MetadataServiceEndpointKey = "ec2_metadata_service_endpoint"
-
- // Use DualStack Endpoint Resolution
- useDualStackEndpoint = "use_dualstack_endpoint"
-
- // Use FIPS Endpoint Resolution
- useFIPSEndpointKey = "use_fips_endpoint"
-)
-
-// sharedConfig represents the configuration fields of the SDK config files.
-type sharedConfig struct {
- Profile string
-
- // Credentials values from the config file. Both aws_access_key_id and
- // aws_secret_access_key must be provided together in the same file to be
- // considered valid. The values will be ignored if not a complete group.
- // aws_session_token is an optional field that can be provided if both of
- // the other two fields are also provided.
- //
- // aws_access_key_id
- // aws_secret_access_key
- // aws_session_token
- Creds credentials.Value
-
- CredentialSource string
- CredentialProcess string
- WebIdentityTokenFile string
-
- SSOAccountID string
- SSORegion string
- SSORoleName string
- SSOStartURL string
-
- RoleARN string
- RoleSessionName string
- ExternalID string
- MFASerial string
- AssumeRoleDuration *time.Duration
-
- SourceProfileName string
- SourceProfile *sharedConfig
-
- // Region is the region the SDK should use for looking up AWS service
- // endpoints and signing requests.
- //
- // region
- Region string
-
- // CustomCABundle is the file path to a PEM file the SDK will read and
- // use to configure the HTTP transport with additional CA certs that are
- // not present in the platforms default CA store.
- //
- // This value will be ignored if the file does not exist.
- //
- // ca_bundle
- CustomCABundle string
-
- // EnableEndpointDiscovery can be enabled in the shared config by setting
- // endpoint_discovery_enabled to true
- //
- // endpoint_discovery_enabled = true
- EnableEndpointDiscovery *bool
-
- // CSM Options
- CSMEnabled *bool
- CSMHost string
- CSMPort string
- CSMClientID string
-
- // Specifies the Regional Endpoint flag for the SDK to resolve the endpoint for a service
- //
- // sts_regional_endpoints = regional
- // This can take value as `LegacySTSEndpoint` or `RegionalSTSEndpoint`
- STSRegionalEndpoint endpoints.STSRegionalEndpoint
-
- // Specifies the Regional Endpoint flag for the SDK to resolve the endpoint for a service
- //
- // s3_us_east_1_regional_endpoint = regional
- // This can take value as `LegacyS3UsEast1Endpoint` or `RegionalS3UsEast1Endpoint`
- S3UsEast1RegionalEndpoint endpoints.S3UsEast1RegionalEndpoint
-
- // Specifies if the S3 service should allow ARNs to direct the region
- // the client's requests are sent to.
- //
- // s3_use_arn_region=true
- S3UseARNRegion bool
-
- // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6)
- //
- // ec2_metadata_service_endpoint_mode=IPv6
- EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState
-
- // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode.
- //
- // ec2_metadata_service_endpoint=http://fd00:ec2::254
- EC2IMDSEndpoint string
-
- // Specifies that SDK clients must resolve a dual-stack endpoint for
- // services.
- //
- // use_dualstack_endpoint=true
- UseDualStackEndpoint endpoints.DualStackEndpointState
-
- // Specifies that SDK clients must resolve a FIPS endpoint for
- // services.
- //
- // use_fips_endpoint=true
- UseFIPSEndpoint endpoints.FIPSEndpointState
-}
-
-type sharedConfigFile struct {
- Filename string
- IniData ini.Sections
-}
-
-// loadSharedConfig retrieves the configuration from the list of files using
-// the profile provided. The order the files are listed will determine
-// precedence. Values in subsequent files will overwrite values defined in
-// earlier files.
-//
-// For example, given two files A and B. Both define credentials. If the order
-// of the files are A then B, B's credential values will be used instead of
-// A's.
-//
-// See sharedConfig.setFromFile for information how the config files
-// will be loaded.
-func loadSharedConfig(profile string, filenames []string, exOpts bool) (sharedConfig, error) {
- if len(profile) == 0 {
- profile = DefaultSharedConfigProfile
- }
-
- files, err := loadSharedConfigIniFiles(filenames)
- if err != nil {
- return sharedConfig{}, err
- }
-
- cfg := sharedConfig{}
- profiles := map[string]struct{}{}
- if err = cfg.setFromIniFiles(profiles, profile, files, exOpts); err != nil {
- return sharedConfig{}, err
- }
-
- return cfg, nil
-}
-
-func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) {
- files := make([]sharedConfigFile, 0, len(filenames))
-
- for _, filename := range filenames {
- sections, err := ini.OpenFile(filename)
- if aerr, ok := err.(awserr.Error); ok && aerr.Code() == ini.ErrCodeUnableToReadFile {
- // Skip files which can't be opened and read for whatever reason
- continue
- } else if err != nil {
- return nil, SharedConfigLoadError{Filename: filename, Err: err}
- }
-
- files = append(files, sharedConfigFile{
- Filename: filename, IniData: sections,
- })
- }
-
- return files, nil
-}
-
-func (cfg *sharedConfig) setFromIniFiles(profiles map[string]struct{}, profile string, files []sharedConfigFile, exOpts bool) error {
- cfg.Profile = profile
-
- // Trim files from the list that don't exist.
- var skippedFiles int
- var profileNotFoundErr error
- for _, f := range files {
- if err := cfg.setFromIniFile(profile, f, exOpts); err != nil {
- if _, ok := err.(SharedConfigProfileNotExistsError); ok {
- // Ignore profiles not defined in individual files.
- profileNotFoundErr = err
- skippedFiles++
- continue
- }
- return err
- }
- }
- if skippedFiles == len(files) {
- // If all files were skipped because the profile is not found, return
- // the original profile not found error.
- return profileNotFoundErr
- }
-
- if _, ok := profiles[profile]; ok {
- // if this is the second instance of the profile the Assume Role
- // options must be cleared because they are only valid for the
- // first reference of a profile. The self linked instance of the
- // profile only have credential provider options.
- cfg.clearAssumeRoleOptions()
- } else {
- // First time a profile has been seen, It must either be a assume role
- // credentials, or SSO. Assert if the credential type requires a role ARN,
- // the ARN is also set, or validate that the SSO configuration is complete.
- if err := cfg.validateCredentialsConfig(profile); err != nil {
- return err
- }
- }
- profiles[profile] = struct{}{}
-
- if err := cfg.validateCredentialType(); err != nil {
- return err
- }
-
- // Link source profiles for assume roles
- if len(cfg.SourceProfileName) != 0 {
- // Linked profile via source_profile ignore credential provider
- // options, the source profile must provide the credentials.
- cfg.clearCredentialOptions()
-
- srcCfg := &sharedConfig{}
- err := srcCfg.setFromIniFiles(profiles, cfg.SourceProfileName, files, exOpts)
- if err != nil {
- // SourceProfile that doesn't exist is an error in configuration.
- if _, ok := err.(SharedConfigProfileNotExistsError); ok {
- err = SharedConfigAssumeRoleError{
- RoleARN: cfg.RoleARN,
- SourceProfile: cfg.SourceProfileName,
- }
- }
- return err
- }
-
- if !srcCfg.hasCredentials() {
- return SharedConfigAssumeRoleError{
- RoleARN: cfg.RoleARN,
- SourceProfile: cfg.SourceProfileName,
- }
- }
-
- cfg.SourceProfile = srcCfg
- }
-
- return nil
-}
-
-// setFromFile loads the configuration from the file using the profile
-// provided. A sharedConfig pointer type value is used so that multiple config
-// file loadings can be chained.
-//
-// Only loads complete logically grouped values, and will not set fields in cfg
-// for incomplete grouped values in the config. Such as credentials. For
-// example if a config file only includes aws_access_key_id but no
-// aws_secret_access_key the aws_access_key_id will be ignored.
-func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, exOpts bool) error {
- section, ok := file.IniData.GetSection(profile)
- if !ok {
- // Fallback to to alternate profile name: profile
- section, ok = file.IniData.GetSection(fmt.Sprintf("profile %s", profile))
- if !ok {
- return SharedConfigProfileNotExistsError{Profile: profile, Err: nil}
- }
- }
-
- if exOpts {
- // Assume Role Parameters
- updateString(&cfg.RoleARN, section, roleArnKey)
- updateString(&cfg.ExternalID, section, externalIDKey)
- updateString(&cfg.MFASerial, section, mfaSerialKey)
- updateString(&cfg.RoleSessionName, section, roleSessionNameKey)
- updateString(&cfg.SourceProfileName, section, sourceProfileKey)
- updateString(&cfg.CredentialSource, section, credentialSourceKey)
- updateString(&cfg.Region, section, regionKey)
- updateString(&cfg.CustomCABundle, section, customCABundleKey)
-
- if section.Has(roleDurationSecondsKey) {
- d := time.Duration(section.Int(roleDurationSecondsKey)) * time.Second
- cfg.AssumeRoleDuration = &d
- }
-
- if v := section.String(stsRegionalEndpointSharedKey); len(v) != 0 {
- sre, err := endpoints.GetSTSRegionalEndpoint(v)
- if err != nil {
- return fmt.Errorf("failed to load %s from shared config, %s, %v",
- stsRegionalEndpointSharedKey, file.Filename, err)
- }
- cfg.STSRegionalEndpoint = sre
- }
-
- if v := section.String(s3UsEast1RegionalSharedKey); len(v) != 0 {
- sre, err := endpoints.GetS3UsEast1RegionalEndpoint(v)
- if err != nil {
- return fmt.Errorf("failed to load %s from shared config, %s, %v",
- s3UsEast1RegionalSharedKey, file.Filename, err)
- }
- cfg.S3UsEast1RegionalEndpoint = sre
- }
-
- // AWS Single Sign-On (AWS SSO)
- updateString(&cfg.SSOAccountID, section, ssoAccountIDKey)
- updateString(&cfg.SSORegion, section, ssoRegionKey)
- updateString(&cfg.SSORoleName, section, ssoRoleNameKey)
- updateString(&cfg.SSOStartURL, section, ssoStartURL)
-
- if err := updateEC2MetadataServiceEndpointMode(&cfg.EC2IMDSEndpointMode, section, ec2MetadataServiceEndpointModeKey); err != nil {
- return fmt.Errorf("failed to load %s from shared config, %s, %v",
- ec2MetadataServiceEndpointModeKey, file.Filename, err)
- }
- updateString(&cfg.EC2IMDSEndpoint, section, ec2MetadataServiceEndpointKey)
-
- updateUseDualStackEndpoint(&cfg.UseDualStackEndpoint, section, useDualStackEndpoint)
-
- updateUseFIPSEndpoint(&cfg.UseFIPSEndpoint, section, useFIPSEndpointKey)
- }
-
- updateString(&cfg.CredentialProcess, section, credentialProcessKey)
- updateString(&cfg.WebIdentityTokenFile, section, webIdentityTokenFileKey)
-
- // Shared Credentials
- creds := credentials.Value{
- AccessKeyID: section.String(accessKeyIDKey),
- SecretAccessKey: section.String(secretAccessKey),
- SessionToken: section.String(sessionTokenKey),
- ProviderName: fmt.Sprintf("SharedConfigCredentials: %s", file.Filename),
- }
- if creds.HasKeys() {
- cfg.Creds = creds
- }
-
- // Endpoint discovery
- updateBoolPtr(&cfg.EnableEndpointDiscovery, section, enableEndpointDiscoveryKey)
-
- // CSM options
- updateBoolPtr(&cfg.CSMEnabled, section, csmEnabledKey)
- updateString(&cfg.CSMHost, section, csmHostKey)
- updateString(&cfg.CSMPort, section, csmPortKey)
- updateString(&cfg.CSMClientID, section, csmClientIDKey)
-
- updateBool(&cfg.S3UseARNRegion, section, s3UseARNRegionKey)
-
- return nil
-}
-
-func updateEC2MetadataServiceEndpointMode(endpointMode *endpoints.EC2IMDSEndpointModeState, section ini.Section, key string) error {
- if !section.Has(key) {
- return nil
- }
- value := section.String(key)
- return endpointMode.SetFromString(value)
-}
-
-func (cfg *sharedConfig) validateCredentialsConfig(profile string) error {
- if err := cfg.validateCredentialsRequireARN(profile); err != nil {
- return err
- }
-
- return nil
-}
-
-func (cfg *sharedConfig) validateCredentialsRequireARN(profile string) error {
- var credSource string
-
- switch {
- case len(cfg.SourceProfileName) != 0:
- credSource = sourceProfileKey
- case len(cfg.CredentialSource) != 0:
- credSource = credentialSourceKey
- case len(cfg.WebIdentityTokenFile) != 0:
- credSource = webIdentityTokenFileKey
- }
-
- if len(credSource) != 0 && len(cfg.RoleARN) == 0 {
- return CredentialRequiresARNError{
- Type: credSource,
- Profile: profile,
- }
- }
-
- return nil
-}
-
-func (cfg *sharedConfig) validateCredentialType() error {
- // Only one or no credential type can be defined.
- if !oneOrNone(
- len(cfg.SourceProfileName) != 0,
- len(cfg.CredentialSource) != 0,
- len(cfg.CredentialProcess) != 0,
- len(cfg.WebIdentityTokenFile) != 0,
- ) {
- return ErrSharedConfigSourceCollision
- }
-
- return nil
-}
-
-func (cfg *sharedConfig) validateSSOConfiguration() error {
- if !cfg.hasSSOConfiguration() {
- return nil
- }
-
- var missing []string
- if len(cfg.SSOAccountID) == 0 {
- missing = append(missing, ssoAccountIDKey)
- }
-
- if len(cfg.SSORegion) == 0 {
- missing = append(missing, ssoRegionKey)
- }
-
- if len(cfg.SSORoleName) == 0 {
- missing = append(missing, ssoRoleNameKey)
- }
-
- if len(cfg.SSOStartURL) == 0 {
- missing = append(missing, ssoStartURL)
- }
-
- if len(missing) > 0 {
- return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s",
- cfg.Profile, strings.Join(missing, ", "))
- }
-
- return nil
-}
-
-func (cfg *sharedConfig) hasCredentials() bool {
- switch {
- case len(cfg.SourceProfileName) != 0:
- case len(cfg.CredentialSource) != 0:
- case len(cfg.CredentialProcess) != 0:
- case len(cfg.WebIdentityTokenFile) != 0:
- case cfg.hasSSOConfiguration():
- case cfg.Creds.HasKeys():
- default:
- return false
- }
-
- return true
-}
-
-func (cfg *sharedConfig) clearCredentialOptions() {
- cfg.CredentialSource = ""
- cfg.CredentialProcess = ""
- cfg.WebIdentityTokenFile = ""
- cfg.Creds = credentials.Value{}
- cfg.SSOAccountID = ""
- cfg.SSORegion = ""
- cfg.SSORoleName = ""
- cfg.SSOStartURL = ""
-}
-
-func (cfg *sharedConfig) clearAssumeRoleOptions() {
- cfg.RoleARN = ""
- cfg.ExternalID = ""
- cfg.MFASerial = ""
- cfg.RoleSessionName = ""
- cfg.SourceProfileName = ""
-}
-
-func (cfg *sharedConfig) hasSSOConfiguration() bool {
- switch {
- case len(cfg.SSOAccountID) != 0:
- case len(cfg.SSORegion) != 0:
- case len(cfg.SSORoleName) != 0:
- case len(cfg.SSOStartURL) != 0:
- default:
- return false
- }
- return true
-}
-
-func oneOrNone(bs ...bool) bool {
- var count int
-
- for _, b := range bs {
- if b {
- count++
- if count > 1 {
- return false
- }
- }
- }
-
- return true
-}
-
-// updateString will only update the dst with the value in the section key, key
-// is present in the section.
-func updateString(dst *string, section ini.Section, key string) {
- if !section.Has(key) {
- return
- }
- *dst = section.String(key)
-}
-
-// updateBool will only update the dst with the value in the section key, key
-// is present in the section.
-func updateBool(dst *bool, section ini.Section, key string) {
- if !section.Has(key) {
- return
- }
- *dst = section.Bool(key)
-}
-
-// updateBoolPtr will only update the dst with the value in the section key,
-// key is present in the section.
-func updateBoolPtr(dst **bool, section ini.Section, key string) {
- if !section.Has(key) {
- return
- }
- *dst = new(bool)
- **dst = section.Bool(key)
-}
-
-// SharedConfigLoadError is an error for the shared config file failed to load.
-type SharedConfigLoadError struct {
- Filename string
- Err error
-}
-
-// Code is the short id of the error.
-func (e SharedConfigLoadError) Code() string {
- return "SharedConfigLoadError"
-}
-
-// Message is the description of the error
-func (e SharedConfigLoadError) Message() string {
- return fmt.Sprintf("failed to load config file, %s", e.Filename)
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e SharedConfigLoadError) OrigErr() error {
- return e.Err
-}
-
-// Error satisfies the error interface.
-func (e SharedConfigLoadError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", e.Err)
-}
-
-// SharedConfigProfileNotExistsError is an error for the shared config when
-// the profile was not find in the config file.
-type SharedConfigProfileNotExistsError struct {
- Profile string
- Err error
-}
-
-// Code is the short id of the error.
-func (e SharedConfigProfileNotExistsError) Code() string {
- return "SharedConfigProfileNotExistsError"
-}
-
-// Message is the description of the error
-func (e SharedConfigProfileNotExistsError) Message() string {
- return fmt.Sprintf("failed to get profile, %s", e.Profile)
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e SharedConfigProfileNotExistsError) OrigErr() error {
- return e.Err
-}
-
-// Error satisfies the error interface.
-func (e SharedConfigProfileNotExistsError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", e.Err)
-}
-
-// SharedConfigAssumeRoleError is an error for the shared config when the
-// profile contains assume role information, but that information is invalid
-// or not complete.
-type SharedConfigAssumeRoleError struct {
- RoleARN string
- SourceProfile string
-}
-
-// Code is the short id of the error.
-func (e SharedConfigAssumeRoleError) Code() string {
- return "SharedConfigAssumeRoleError"
-}
-
-// Message is the description of the error
-func (e SharedConfigAssumeRoleError) Message() string {
- return fmt.Sprintf(
- "failed to load assume role for %s, source profile %s has no shared credentials",
- e.RoleARN, e.SourceProfile,
- )
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e SharedConfigAssumeRoleError) OrigErr() error {
- return nil
-}
-
-// Error satisfies the error interface.
-func (e SharedConfigAssumeRoleError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", nil)
-}
-
-// CredentialRequiresARNError provides the error for shared config credentials
-// that are incorrectly configured in the shared config or credentials file.
-type CredentialRequiresARNError struct {
- // type of credentials that were configured.
- Type string
-
- // Profile name the credentials were in.
- Profile string
-}
-
-// Code is the short id of the error.
-func (e CredentialRequiresARNError) Code() string {
- return "CredentialRequiresARNError"
-}
-
-// Message is the description of the error
-func (e CredentialRequiresARNError) Message() string {
- return fmt.Sprintf(
- "credential type %s requires role_arn, profile %s",
- e.Type, e.Profile,
- )
-}
-
-// OrigErr is the underlying error that caused the failure.
-func (e CredentialRequiresARNError) OrigErr() error {
- return nil
-}
-
-// Error satisfies the error interface.
-func (e CredentialRequiresARNError) Error() string {
- return awserr.SprintError(e.Code(), e.Message(), "", nil)
-}
-
-// updateEndpointDiscoveryType will only update the dst with the value in the section, if
-// a valid key and corresponding EndpointDiscoveryType is found.
-func updateUseDualStackEndpoint(dst *endpoints.DualStackEndpointState, section ini.Section, key string) {
- if !section.Has(key) {
- return
- }
-
- if section.Bool(key) {
- *dst = endpoints.DualStackEndpointStateEnabled
- } else {
- *dst = endpoints.DualStackEndpointStateDisabled
- }
-
- return
-}
-
-// updateEndpointDiscoveryType will only update the dst with the value in the section, if
-// a valid key and corresponding EndpointDiscoveryType is found.
-func updateUseFIPSEndpoint(dst *endpoints.FIPSEndpointState, section ini.Section, key string) {
- if !section.Has(key) {
- return
- }
-
- if section.Bool(key) {
- *dst = endpoints.FIPSEndpointStateEnabled
- } else {
- *dst = endpoints.FIPSEndpointStateDisabled
- }
-
- return
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go
deleted file mode 100644
index 993753831..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package v4
-
-import (
- "github.com/aws/aws-sdk-go/internal/strings"
-)
-
-// validator houses a set of rule needed for validation of a
-// string value
-type rules []rule
-
-// rule interface allows for more flexible rules and just simply
-// checks whether or not a value adheres to that rule
-type rule interface {
- IsValid(value string) bool
-}
-
-// IsValid will iterate through all rules and see if any rules
-// apply to the value and supports nested rules
-func (r rules) IsValid(value string) bool {
- for _, rule := range r {
- if rule.IsValid(value) {
- return true
- }
- }
- return false
-}
-
-// mapRule generic rule for maps
-type mapRule map[string]struct{}
-
-// IsValid for the map rule satisfies whether it exists in the map
-func (m mapRule) IsValid(value string) bool {
- _, ok := m[value]
- return ok
-}
-
-// allowList is a generic rule for allow listing
-type allowList struct {
- rule
-}
-
-// IsValid for allow list checks if the value is within the allow list
-func (w allowList) IsValid(value string) bool {
- return w.rule.IsValid(value)
-}
-
-// excludeList is a generic rule for exclude listing
-type excludeList struct {
- rule
-}
-
-// IsValid for exclude list checks if the value is within the exclude list
-func (b excludeList) IsValid(value string) bool {
- return !b.rule.IsValid(value)
-}
-
-type patterns []string
-
-// IsValid for patterns checks each pattern and returns if a match has
-// been found
-func (p patterns) IsValid(value string) bool {
- for _, pattern := range p {
- if strings.HasPrefixFold(value, pattern) {
- return true
- }
- }
- return false
-}
-
-// inclusiveRules rules allow for rules to depend on one another
-type inclusiveRules []rule
-
-// IsValid will return true if all rules are true
-func (r inclusiveRules) IsValid(value string) bool {
- for _, rule := range r {
- if !rule.IsValid(value) {
- return false
- }
- }
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
deleted file mode 100644
index 6aa2ed241..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/options.go
+++ /dev/null
@@ -1,7 +0,0 @@
-package v4
-
-// WithUnsignedPayload will enable and set the UnsignedPayload field to
-// true of the signer.
-func WithUnsignedPayload(v4 *Signer) {
- v4.UnsignedPayload = true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.5.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.5.go
deleted file mode 100644
index cf672b6ac..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.5.go
+++ /dev/null
@@ -1,14 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package v4
-
-import (
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-func requestContext(r *http.Request) aws.Context {
- return aws.BackgroundContext()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.7.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.7.go
deleted file mode 100644
index 21fe74e6f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/request_context_go1.7.go
+++ /dev/null
@@ -1,14 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package v4
-
-import (
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-func requestContext(r *http.Request) aws.Context {
- return r.Context()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/stream.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/stream.go
deleted file mode 100644
index 02cbd97e2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/stream.go
+++ /dev/null
@@ -1,63 +0,0 @@
-package v4
-
-import (
- "encoding/hex"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/credentials"
-)
-
-type credentialValueProvider interface {
- Get() (credentials.Value, error)
-}
-
-// StreamSigner implements signing of event stream encoded payloads
-type StreamSigner struct {
- region string
- service string
-
- credentials credentialValueProvider
-
- prevSig []byte
-}
-
-// NewStreamSigner creates a SigV4 signer used to sign Event Stream encoded messages
-func NewStreamSigner(region, service string, seedSignature []byte, credentials *credentials.Credentials) *StreamSigner {
- return &StreamSigner{
- region: region,
- service: service,
- credentials: credentials,
- prevSig: seedSignature,
- }
-}
-
-// GetSignature takes an event stream encoded headers and payload and returns a signature
-func (s *StreamSigner) GetSignature(headers, payload []byte, date time.Time) ([]byte, error) {
- credValue, err := s.credentials.Get()
- if err != nil {
- return nil, err
- }
-
- sigKey := deriveSigningKey(s.region, s.service, credValue.SecretAccessKey, date)
-
- keyPath := buildSigningScope(s.region, s.service, date)
-
- stringToSign := buildEventStreamStringToSign(headers, payload, s.prevSig, keyPath, date)
-
- signature := hmacSHA256(sigKey, []byte(stringToSign))
- s.prevSig = signature
-
- return signature, nil
-}
-
-func buildEventStreamStringToSign(headers, payload, prevSig []byte, scope string, date time.Time) string {
- return strings.Join([]string{
- "AWS4-HMAC-SHA256-PAYLOAD",
- formatTime(date),
- scope,
- hex.EncodeToString(prevSig),
- hex.EncodeToString(hashSHA256(headers)),
- hex.EncodeToString(hashSHA256(payload)),
- }, "\n")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go
deleted file mode 100644
index 7711ec737..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/uri_path.go
+++ /dev/null
@@ -1,25 +0,0 @@
-//go:build go1.5
-// +build go1.5
-
-package v4
-
-import (
- "net/url"
- "strings"
-)
-
-func getURIPath(u *url.URL) string {
- var uri string
-
- if len(u.Opaque) > 0 {
- uri = "/" + strings.Join(strings.Split(u.Opaque, "/")[3:], "/")
- } else {
- uri = u.EscapedPath()
- }
-
- if len(uri) == 0 {
- uri = "/"
- }
-
- return uri
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
deleted file mode 100644
index 4d78162c0..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go
+++ /dev/null
@@ -1,854 +0,0 @@
-// Package v4 implements signing for AWS V4 signer
-//
-// Provides request signing for request that need to be signed with
-// AWS V4 Signatures.
-//
-// Standalone Signer
-//
-// Generally using the signer outside of the SDK should not require any additional
-// logic when using Go v1.5 or higher. The signer does this by taking advantage
-// of the URL.EscapedPath method. If your request URI requires additional escaping
-// you many need to use the URL.Opaque to define what the raw URI should be sent
-// to the service as.
-//
-// The signer will first check the URL.Opaque field, and use its value if set.
-// The signer does require the URL.Opaque field to be set in the form of:
-//
-// "///"
-//
-// // e.g.
-// "//example.com/some/path"
-//
-// The leading "//" and hostname are required or the URL.Opaque escaping will
-// not work correctly.
-//
-// If URL.Opaque is not set the signer will fallback to the URL.EscapedPath()
-// method and using the returned value. If you're using Go v1.4 you must set
-// URL.Opaque if the URI path needs escaping. If URL.Opaque is not set with
-// Go v1.5 the signer will fallback to URL.Path.
-//
-// AWS v4 signature validation requires that the canonical string's URI path
-// element must be the URI escaped form of the HTTP request's path.
-// http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
-//
-// The Go HTTP client will perform escaping automatically on the request. Some
-// of these escaping may cause signature validation errors because the HTTP
-// request differs from the URI path or query that the signature was generated.
-// https://golang.org/pkg/net/url/#URL.EscapedPath
-//
-// Because of this, it is recommended that when using the signer outside of the
-// SDK that explicitly escaping the request prior to being signed is preferable,
-// and will help prevent signature validation errors. This can be done by setting
-// the URL.Opaque or URL.RawPath. The SDK will use URL.Opaque first and then
-// call URL.EscapedPath() if Opaque is not set.
-//
-// If signing a request intended for HTTP2 server, and you're using Go 1.6.2
-// through 1.7.4 you should use the URL.RawPath as the pre-escaped form of the
-// request URL. https://github.com/golang/go/issues/16847 points to a bug in
-// Go pre 1.8 that fails to make HTTP2 requests using absolute URL in the HTTP
-// message. URL.Opaque generally will force Go to make requests with absolute URL.
-// URL.RawPath does not do this, but RawPath must be a valid escaping of Path
-// or url.EscapedPath will ignore the RawPath escaping.
-//
-// Test `TestStandaloneSign` provides a complete example of using the signer
-// outside of the SDK and pre-escaping the URI path.
-package v4
-
-import (
- "crypto/hmac"
- "crypto/sha256"
- "encoding/hex"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "net/url"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/internal/sdkio"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-const (
- authorizationHeader = "Authorization"
- authHeaderSignatureElem = "Signature="
- signatureQueryKey = "X-Amz-Signature"
-
- authHeaderPrefix = "AWS4-HMAC-SHA256"
- timeFormat = "20060102T150405Z"
- shortTimeFormat = "20060102"
- awsV4Request = "aws4_request"
-
- // emptyStringSHA256 is a SHA256 of an empty string
- emptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855`
-)
-
-var ignoredHeaders = rules{
- excludeList{
- mapRule{
- authorizationHeader: struct{}{},
- "User-Agent": struct{}{},
- "X-Amzn-Trace-Id": struct{}{},
- },
- },
-}
-
-// requiredSignedHeaders is a allow list for build canonical headers.
-var requiredSignedHeaders = rules{
- allowList{
- mapRule{
- "Cache-Control": struct{}{},
- "Content-Disposition": struct{}{},
- "Content-Encoding": struct{}{},
- "Content-Language": struct{}{},
- "Content-Md5": struct{}{},
- "Content-Type": struct{}{},
- "Expires": struct{}{},
- "If-Match": struct{}{},
- "If-Modified-Since": struct{}{},
- "If-None-Match": struct{}{},
- "If-Unmodified-Since": struct{}{},
- "Range": struct{}{},
- "X-Amz-Acl": struct{}{},
- "X-Amz-Copy-Source": struct{}{},
- "X-Amz-Copy-Source-If-Match": struct{}{},
- "X-Amz-Copy-Source-If-Modified-Since": struct{}{},
- "X-Amz-Copy-Source-If-None-Match": struct{}{},
- "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{},
- "X-Amz-Copy-Source-Range": struct{}{},
- "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{},
- "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{},
- "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
- "X-Amz-Grant-Full-control": struct{}{},
- "X-Amz-Grant-Read": struct{}{},
- "X-Amz-Grant-Read-Acp": struct{}{},
- "X-Amz-Grant-Write": struct{}{},
- "X-Amz-Grant-Write-Acp": struct{}{},
- "X-Amz-Metadata-Directive": struct{}{},
- "X-Amz-Mfa": struct{}{},
- "X-Amz-Request-Payer": struct{}{},
- "X-Amz-Server-Side-Encryption": struct{}{},
- "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{},
- "X-Amz-Server-Side-Encryption-Customer-Algorithm": struct{}{},
- "X-Amz-Server-Side-Encryption-Customer-Key": struct{}{},
- "X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{},
- "X-Amz-Storage-Class": struct{}{},
- "X-Amz-Tagging": struct{}{},
- "X-Amz-Website-Redirect-Location": struct{}{},
- "X-Amz-Content-Sha256": struct{}{},
- },
- },
- patterns{"X-Amz-Meta-"},
- patterns{"X-Amz-Object-Lock-"},
-}
-
-// allowedHoisting is a allow list for build query headers. The boolean value
-// represents whether or not it is a pattern.
-var allowedQueryHoisting = inclusiveRules{
- excludeList{requiredSignedHeaders},
- patterns{"X-Amz-"},
-}
-
-// Signer applies AWS v4 signing to given request. Use this to sign requests
-// that need to be signed with AWS V4 Signatures.
-type Signer struct {
- // The authentication credentials the request will be signed against.
- // This value must be set to sign requests.
- Credentials *credentials.Credentials
-
- // Sets the log level the signer should use when reporting information to
- // the logger. If the logger is nil nothing will be logged. See
- // aws.LogLevelType for more information on available logging levels
- //
- // By default nothing will be logged.
- Debug aws.LogLevelType
-
- // The logger loging information will be written to. If there the logger
- // is nil, nothing will be logged.
- Logger aws.Logger
-
- // Disables the Signer's moving HTTP header key/value pairs from the HTTP
- // request header to the request's query string. This is most commonly used
- // with pre-signed requests preventing headers from being added to the
- // request's query string.
- DisableHeaderHoisting bool
-
- // Disables the automatic escaping of the URI path of the request for the
- // siganture's canonical string's path. For services that do not need additional
- // escaping then use this to disable the signer escaping the path.
- //
- // S3 is an example of a service that does not need additional escaping.
- //
- // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
- DisableURIPathEscaping bool
-
- // Disables the automatical setting of the HTTP request's Body field with the
- // io.ReadSeeker passed in to the signer. This is useful if you're using a
- // custom wrapper around the body for the io.ReadSeeker and want to preserve
- // the Body value on the Request.Body.
- //
- // This does run the risk of signing a request with a body that will not be
- // sent in the request. Need to ensure that the underlying data of the Body
- // values are the same.
- DisableRequestBodyOverwrite bool
-
- // currentTimeFn returns the time value which represents the current time.
- // This value should only be used for testing. If it is nil the default
- // time.Now will be used.
- currentTimeFn func() time.Time
-
- // UnsignedPayload will prevent signing of the payload. This will only
- // work for services that have support for this.
- UnsignedPayload bool
-}
-
-// NewSigner returns a Signer pointer configured with the credentials and optional
-// option values provided. If not options are provided the Signer will use its
-// default configuration.
-func NewSigner(credentials *credentials.Credentials, options ...func(*Signer)) *Signer {
- v4 := &Signer{
- Credentials: credentials,
- }
-
- for _, option := range options {
- option(v4)
- }
-
- return v4
-}
-
-type signingCtx struct {
- ServiceName string
- Region string
- Request *http.Request
- Body io.ReadSeeker
- Query url.Values
- Time time.Time
- ExpireTime time.Duration
- SignedHeaderVals http.Header
-
- DisableURIPathEscaping bool
-
- credValues credentials.Value
- isPresign bool
- unsignedPayload bool
-
- bodyDigest string
- signedHeaders string
- canonicalHeaders string
- canonicalString string
- credentialString string
- stringToSign string
- signature string
- authorization string
-}
-
-// Sign signs AWS v4 requests with the provided body, service name, region the
-// request is made to, and time the request is signed at. The signTime allows
-// you to specify that a request is signed for the future, and cannot be
-// used until then.
-//
-// Returns a list of HTTP headers that were included in the signature or an
-// error if signing the request failed. Generally for signed requests this value
-// is not needed as the full request context will be captured by the http.Request
-// value. It is included for reference though.
-//
-// Sign will set the request's Body to be the `body` parameter passed in. If
-// the body is not already an io.ReadCloser, it will be wrapped within one. If
-// a `nil` body parameter passed to Sign, the request's Body field will be
-// also set to nil. Its important to note that this functionality will not
-// change the request's ContentLength of the request.
-//
-// Sign differs from Presign in that it will sign the request using HTTP
-// header values. This type of signing is intended for http.Request values that
-// will not be shared, or are shared in a way the header values on the request
-// will not be lost.
-//
-// The requests body is an io.ReadSeeker so the SHA256 of the body can be
-// generated. To bypass the signer computing the hash you can set the
-// "X-Amz-Content-Sha256" header with a precomputed value. The signer will
-// only compute the hash if the request header value is empty.
-func (v4 Signer) Sign(r *http.Request, body io.ReadSeeker, service, region string, signTime time.Time) (http.Header, error) {
- return v4.signWithBody(r, body, service, region, 0, false, signTime)
-}
-
-// Presign signs AWS v4 requests with the provided body, service name, region
-// the request is made to, and time the request is signed at. The signTime
-// allows you to specify that a request is signed for the future, and cannot
-// be used until then.
-//
-// Returns a list of HTTP headers that were included in the signature or an
-// error if signing the request failed. For presigned requests these headers
-// and their values must be included on the HTTP request when it is made. This
-// is helpful to know what header values need to be shared with the party the
-// presigned request will be distributed to.
-//
-// Presign differs from Sign in that it will sign the request using query string
-// instead of header values. This allows you to share the Presigned Request's
-// URL with third parties, or distribute it throughout your system with minimal
-// dependencies.
-//
-// Presign also takes an exp value which is the duration the
-// signed request will be valid after the signing time. This is allows you to
-// set when the request will expire.
-//
-// The requests body is an io.ReadSeeker so the SHA256 of the body can be
-// generated. To bypass the signer computing the hash you can set the
-// "X-Amz-Content-Sha256" header with a precomputed value. The signer will
-// only compute the hash if the request header value is empty.
-//
-// Presigning a S3 request will not compute the body's SHA256 hash by default.
-// This is done due to the general use case for S3 presigned URLs is to share
-// PUT/GET capabilities. If you would like to include the body's SHA256 in the
-// presigned request's signature you can set the "X-Amz-Content-Sha256"
-// HTTP header and that will be included in the request's signature.
-func (v4 Signer) Presign(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, signTime time.Time) (http.Header, error) {
- return v4.signWithBody(r, body, service, region, exp, true, signTime)
-}
-
-func (v4 Signer) signWithBody(r *http.Request, body io.ReadSeeker, service, region string, exp time.Duration, isPresign bool, signTime time.Time) (http.Header, error) {
- currentTimeFn := v4.currentTimeFn
- if currentTimeFn == nil {
- currentTimeFn = time.Now
- }
-
- ctx := &signingCtx{
- Request: r,
- Body: body,
- Query: r.URL.Query(),
- Time: signTime,
- ExpireTime: exp,
- isPresign: isPresign,
- ServiceName: service,
- Region: region,
- DisableURIPathEscaping: v4.DisableURIPathEscaping,
- unsignedPayload: v4.UnsignedPayload,
- }
-
- for key := range ctx.Query {
- sort.Strings(ctx.Query[key])
- }
-
- if ctx.isRequestSigned() {
- ctx.Time = currentTimeFn()
- ctx.handlePresignRemoval()
- }
-
- var err error
- ctx.credValues, err = v4.Credentials.GetWithContext(requestContext(r))
- if err != nil {
- return http.Header{}, err
- }
-
- ctx.sanitizeHostForHeader()
- ctx.assignAmzQueryValues()
- if err := ctx.build(v4.DisableHeaderHoisting); err != nil {
- return nil, err
- }
-
- // If the request is not presigned the body should be attached to it. This
- // prevents the confusion of wanting to send a signed request without
- // the body the request was signed for attached.
- if !(v4.DisableRequestBodyOverwrite || ctx.isPresign) {
- var reader io.ReadCloser
- if body != nil {
- var ok bool
- if reader, ok = body.(io.ReadCloser); !ok {
- reader = ioutil.NopCloser(body)
- }
- }
- r.Body = reader
- }
-
- if v4.Debug.Matches(aws.LogDebugWithSigning) {
- v4.logSigningInfo(ctx)
- }
-
- return ctx.SignedHeaderVals, nil
-}
-
-func (ctx *signingCtx) sanitizeHostForHeader() {
- request.SanitizeHostForHeader(ctx.Request)
-}
-
-func (ctx *signingCtx) handlePresignRemoval() {
- if !ctx.isPresign {
- return
- }
-
- // The credentials have expired for this request. The current signing
- // is invalid, and needs to be request because the request will fail.
- ctx.removePresign()
-
- // Update the request's query string to ensure the values stays in
- // sync in the case retrieving the new credentials fails.
- ctx.Request.URL.RawQuery = ctx.Query.Encode()
-}
-
-func (ctx *signingCtx) assignAmzQueryValues() {
- if ctx.isPresign {
- ctx.Query.Set("X-Amz-Algorithm", authHeaderPrefix)
- if ctx.credValues.SessionToken != "" {
- ctx.Query.Set("X-Amz-Security-Token", ctx.credValues.SessionToken)
- } else {
- ctx.Query.Del("X-Amz-Security-Token")
- }
-
- return
- }
-
- if ctx.credValues.SessionToken != "" {
- ctx.Request.Header.Set("X-Amz-Security-Token", ctx.credValues.SessionToken)
- }
-}
-
-// SignRequestHandler is a named request handler the SDK will use to sign
-// service client request with using the V4 signature.
-var SignRequestHandler = request.NamedHandler{
- Name: "v4.SignRequestHandler", Fn: SignSDKRequest,
-}
-
-// SignSDKRequest signs an AWS request with the V4 signature. This
-// request handler should only be used with the SDK's built in service client's
-// API operation requests.
-//
-// This function should not be used on its own, but in conjunction with
-// an AWS service client's API operation call. To sign a standalone request
-// not created by a service client's API operation method use the "Sign" or
-// "Presign" functions of the "Signer" type.
-//
-// If the credentials of the request's config are set to
-// credentials.AnonymousCredentials the request will not be signed.
-func SignSDKRequest(req *request.Request) {
- SignSDKRequestWithCurrentTime(req, time.Now)
-}
-
-// BuildNamedHandler will build a generic handler for signing.
-func BuildNamedHandler(name string, opts ...func(*Signer)) request.NamedHandler {
- return request.NamedHandler{
- Name: name,
- Fn: func(req *request.Request) {
- SignSDKRequestWithCurrentTime(req, time.Now, opts...)
- },
- }
-}
-
-// SignSDKRequestWithCurrentTime will sign the SDK's request using the time
-// function passed in. Behaves the same as SignSDKRequest with the exception
-// the request is signed with the value returned by the current time function.
-func SignSDKRequestWithCurrentTime(req *request.Request, curTimeFn func() time.Time, opts ...func(*Signer)) {
- // If the request does not need to be signed ignore the signing of the
- // request if the AnonymousCredentials object is used.
- if req.Config.Credentials == credentials.AnonymousCredentials {
- return
- }
-
- region := req.ClientInfo.SigningRegion
- if region == "" {
- region = aws.StringValue(req.Config.Region)
- }
-
- name := req.ClientInfo.SigningName
- if name == "" {
- name = req.ClientInfo.ServiceName
- }
-
- v4 := NewSigner(req.Config.Credentials, func(v4 *Signer) {
- v4.Debug = req.Config.LogLevel.Value()
- v4.Logger = req.Config.Logger
- v4.DisableHeaderHoisting = req.NotHoist
- v4.currentTimeFn = curTimeFn
- if name == "s3" {
- // S3 service should not have any escaping applied
- v4.DisableURIPathEscaping = true
- }
- // Prevents setting the HTTPRequest's Body. Since the Body could be
- // wrapped in a custom io.Closer that we do not want to be stompped
- // on top of by the signer.
- v4.DisableRequestBodyOverwrite = true
- })
-
- for _, opt := range opts {
- opt(v4)
- }
-
- curTime := curTimeFn()
- signedHeaders, err := v4.signWithBody(req.HTTPRequest, req.GetBody(),
- name, region, req.ExpireTime, req.ExpireTime > 0, curTime,
- )
- if err != nil {
- req.Error = err
- req.SignedHeaderVals = nil
- return
- }
-
- req.SignedHeaderVals = signedHeaders
- req.LastSignedAt = curTime
-}
-
-const logSignInfoMsg = `DEBUG: Request Signature:
----[ CANONICAL STRING ]-----------------------------
-%s
----[ STRING TO SIGN ]--------------------------------
-%s%s
------------------------------------------------------`
-const logSignedURLMsg = `
----[ SIGNED URL ]------------------------------------
-%s`
-
-func (v4 *Signer) logSigningInfo(ctx *signingCtx) {
- signedURLMsg := ""
- if ctx.isPresign {
- signedURLMsg = fmt.Sprintf(logSignedURLMsg, ctx.Request.URL.String())
- }
- msg := fmt.Sprintf(logSignInfoMsg, ctx.canonicalString, ctx.stringToSign, signedURLMsg)
- v4.Logger.Log(msg)
-}
-
-func (ctx *signingCtx) build(disableHeaderHoisting bool) error {
- ctx.buildTime() // no depends
- ctx.buildCredentialString() // no depends
-
- if err := ctx.buildBodyDigest(); err != nil {
- return err
- }
-
- unsignedHeaders := ctx.Request.Header
- if ctx.isPresign {
- if !disableHeaderHoisting {
- urlValues := url.Values{}
- urlValues, unsignedHeaders = buildQuery(allowedQueryHoisting, unsignedHeaders) // no depends
- for k := range urlValues {
- ctx.Query[k] = urlValues[k]
- }
- }
- }
-
- ctx.buildCanonicalHeaders(ignoredHeaders, unsignedHeaders)
- ctx.buildCanonicalString() // depends on canon headers / signed headers
- ctx.buildStringToSign() // depends on canon string
- ctx.buildSignature() // depends on string to sign
-
- if ctx.isPresign {
- ctx.Request.URL.RawQuery += "&" + signatureQueryKey + "=" + ctx.signature
- } else {
- parts := []string{
- authHeaderPrefix + " Credential=" + ctx.credValues.AccessKeyID + "/" + ctx.credentialString,
- "SignedHeaders=" + ctx.signedHeaders,
- authHeaderSignatureElem + ctx.signature,
- }
- ctx.Request.Header.Set(authorizationHeader, strings.Join(parts, ", "))
- }
-
- return nil
-}
-
-// GetSignedRequestSignature attempts to extract the signature of the request.
-// Returning an error if the request is unsigned, or unable to extract the
-// signature.
-func GetSignedRequestSignature(r *http.Request) ([]byte, error) {
-
- if auth := r.Header.Get(authorizationHeader); len(auth) != 0 {
- ps := strings.Split(auth, ", ")
- for _, p := range ps {
- if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 {
- sig := p[len(authHeaderSignatureElem):]
- if len(sig) == 0 {
- return nil, fmt.Errorf("invalid request signature authorization header")
- }
- return hex.DecodeString(sig)
- }
- }
- }
-
- if sig := r.URL.Query().Get("X-Amz-Signature"); len(sig) != 0 {
- return hex.DecodeString(sig)
- }
-
- return nil, fmt.Errorf("request not signed")
-}
-
-func (ctx *signingCtx) buildTime() {
- if ctx.isPresign {
- duration := int64(ctx.ExpireTime / time.Second)
- ctx.Query.Set("X-Amz-Date", formatTime(ctx.Time))
- ctx.Query.Set("X-Amz-Expires", strconv.FormatInt(duration, 10))
- } else {
- ctx.Request.Header.Set("X-Amz-Date", formatTime(ctx.Time))
- }
-}
-
-func (ctx *signingCtx) buildCredentialString() {
- ctx.credentialString = buildSigningScope(ctx.Region, ctx.ServiceName, ctx.Time)
-
- if ctx.isPresign {
- ctx.Query.Set("X-Amz-Credential", ctx.credValues.AccessKeyID+"/"+ctx.credentialString)
- }
-}
-
-func buildQuery(r rule, header http.Header) (url.Values, http.Header) {
- query := url.Values{}
- unsignedHeaders := http.Header{}
- for k, h := range header {
- if r.IsValid(k) {
- query[k] = h
- } else {
- unsignedHeaders[k] = h
- }
- }
-
- return query, unsignedHeaders
-}
-func (ctx *signingCtx) buildCanonicalHeaders(r rule, header http.Header) {
- var headers []string
- headers = append(headers, "host")
- for k, v := range header {
- if !r.IsValid(k) {
- continue // ignored header
- }
- if ctx.SignedHeaderVals == nil {
- ctx.SignedHeaderVals = make(http.Header)
- }
-
- lowerCaseKey := strings.ToLower(k)
- if _, ok := ctx.SignedHeaderVals[lowerCaseKey]; ok {
- // include additional values
- ctx.SignedHeaderVals[lowerCaseKey] = append(ctx.SignedHeaderVals[lowerCaseKey], v...)
- continue
- }
-
- headers = append(headers, lowerCaseKey)
- ctx.SignedHeaderVals[lowerCaseKey] = v
- }
- sort.Strings(headers)
-
- ctx.signedHeaders = strings.Join(headers, ";")
-
- if ctx.isPresign {
- ctx.Query.Set("X-Amz-SignedHeaders", ctx.signedHeaders)
- }
-
- headerItems := make([]string, len(headers))
- for i, k := range headers {
- if k == "host" {
- if ctx.Request.Host != "" {
- headerItems[i] = "host:" + ctx.Request.Host
- } else {
- headerItems[i] = "host:" + ctx.Request.URL.Host
- }
- } else {
- headerValues := make([]string, len(ctx.SignedHeaderVals[k]))
- for i, v := range ctx.SignedHeaderVals[k] {
- headerValues[i] = strings.TrimSpace(v)
- }
- headerItems[i] = k + ":" +
- strings.Join(headerValues, ",")
- }
- }
- stripExcessSpaces(headerItems)
- ctx.canonicalHeaders = strings.Join(headerItems, "\n")
-}
-
-func (ctx *signingCtx) buildCanonicalString() {
- ctx.Request.URL.RawQuery = strings.Replace(ctx.Query.Encode(), "+", "%20", -1)
-
- uri := getURIPath(ctx.Request.URL)
-
- if !ctx.DisableURIPathEscaping {
- uri = rest.EscapePath(uri, false)
- }
-
- ctx.canonicalString = strings.Join([]string{
- ctx.Request.Method,
- uri,
- ctx.Request.URL.RawQuery,
- ctx.canonicalHeaders + "\n",
- ctx.signedHeaders,
- ctx.bodyDigest,
- }, "\n")
-}
-
-func (ctx *signingCtx) buildStringToSign() {
- ctx.stringToSign = strings.Join([]string{
- authHeaderPrefix,
- formatTime(ctx.Time),
- ctx.credentialString,
- hex.EncodeToString(hashSHA256([]byte(ctx.canonicalString))),
- }, "\n")
-}
-
-func (ctx *signingCtx) buildSignature() {
- creds := deriveSigningKey(ctx.Region, ctx.ServiceName, ctx.credValues.SecretAccessKey, ctx.Time)
- signature := hmacSHA256(creds, []byte(ctx.stringToSign))
- ctx.signature = hex.EncodeToString(signature)
-}
-
-func (ctx *signingCtx) buildBodyDigest() error {
- hash := ctx.Request.Header.Get("X-Amz-Content-Sha256")
- if hash == "" {
- includeSHA256Header := ctx.unsignedPayload ||
- ctx.ServiceName == "s3" ||
- ctx.ServiceName == "s3-object-lambda" ||
- ctx.ServiceName == "glacier"
-
- s3Presign := ctx.isPresign &&
- (ctx.ServiceName == "s3" ||
- ctx.ServiceName == "s3-object-lambda")
-
- if ctx.unsignedPayload || s3Presign {
- hash = "UNSIGNED-PAYLOAD"
- includeSHA256Header = !s3Presign
- } else if ctx.Body == nil {
- hash = emptyStringSHA256
- } else {
- if !aws.IsReaderSeekable(ctx.Body) {
- return fmt.Errorf("cannot use unseekable request body %T, for signed request with body", ctx.Body)
- }
- hashBytes, err := makeSha256Reader(ctx.Body)
- if err != nil {
- return err
- }
- hash = hex.EncodeToString(hashBytes)
- }
-
- if includeSHA256Header {
- ctx.Request.Header.Set("X-Amz-Content-Sha256", hash)
- }
- }
- ctx.bodyDigest = hash
-
- return nil
-}
-
-// isRequestSigned returns if the request is currently signed or presigned
-func (ctx *signingCtx) isRequestSigned() bool {
- if ctx.isPresign && ctx.Query.Get("X-Amz-Signature") != "" {
- return true
- }
- if ctx.Request.Header.Get("Authorization") != "" {
- return true
- }
-
- return false
-}
-
-// unsign removes signing flags for both signed and presigned requests.
-func (ctx *signingCtx) removePresign() {
- ctx.Query.Del("X-Amz-Algorithm")
- ctx.Query.Del("X-Amz-Signature")
- ctx.Query.Del("X-Amz-Security-Token")
- ctx.Query.Del("X-Amz-Date")
- ctx.Query.Del("X-Amz-Expires")
- ctx.Query.Del("X-Amz-Credential")
- ctx.Query.Del("X-Amz-SignedHeaders")
-}
-
-func hmacSHA256(key []byte, data []byte) []byte {
- hash := hmac.New(sha256.New, key)
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func hashSHA256(data []byte) []byte {
- hash := sha256.New()
- hash.Write(data)
- return hash.Sum(nil)
-}
-
-func makeSha256Reader(reader io.ReadSeeker) (hashBytes []byte, err error) {
- hash := sha256.New()
- start, err := reader.Seek(0, sdkio.SeekCurrent)
- if err != nil {
- return nil, err
- }
- defer func() {
- // ensure error is return if unable to seek back to start of payload.
- _, err = reader.Seek(start, sdkio.SeekStart)
- }()
-
- // Use CopyN to avoid allocating the 32KB buffer in io.Copy for bodies
- // smaller than 32KB. Fall back to io.Copy if we fail to determine the size.
- size, err := aws.SeekerLen(reader)
- if err != nil {
- io.Copy(hash, reader)
- } else {
- io.CopyN(hash, reader, size)
- }
-
- return hash.Sum(nil), nil
-}
-
-const doubleSpace = " "
-
-// stripExcessSpaces will rewrite the passed in slice's string values to not
-// contain multiple side-by-side spaces.
-func stripExcessSpaces(vals []string) {
- var j, k, l, m, spaces int
- for i, str := range vals {
- // Trim trailing spaces
- for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- {
- }
-
- // Trim leading spaces
- for k = 0; k < j && str[k] == ' '; k++ {
- }
- str = str[k : j+1]
-
- // Strip multiple spaces.
- j = strings.Index(str, doubleSpace)
- if j < 0 {
- vals[i] = str
- continue
- }
-
- buf := []byte(str)
- for k, m, l = j, j, len(buf); k < l; k++ {
- if buf[k] == ' ' {
- if spaces == 0 {
- // First space.
- buf[m] = buf[k]
- m++
- }
- spaces++
- } else {
- // End of multiple spaces.
- spaces = 0
- buf[m] = buf[k]
- m++
- }
- }
-
- vals[i] = string(buf[:m])
- }
-}
-
-func buildSigningScope(region, service string, dt time.Time) string {
- return strings.Join([]string{
- formatShortTime(dt),
- region,
- service,
- awsV4Request,
- }, "/")
-}
-
-func deriveSigningKey(region, service, secretKey string, dt time.Time) []byte {
- kDate := hmacSHA256([]byte("AWS4"+secretKey), []byte(formatShortTime(dt)))
- kRegion := hmacSHA256(kDate, []byte(region))
- kService := hmacSHA256(kRegion, []byte(service))
- signingKey := hmacSHA256(kService, []byte(awsV4Request))
- return signingKey
-}
-
-func formatShortTime(dt time.Time) string {
- return dt.UTC().Format(shortTimeFormat)
-}
-
-func formatTime(dt time.Time) string {
- return dt.UTC().Format(timeFormat)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/types.go b/vendor/github.com/aws/aws-sdk-go/aws/types.go
deleted file mode 100644
index 98751ee84..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/types.go
+++ /dev/null
@@ -1,264 +0,0 @@
-package aws
-
-import (
- "io"
- "strings"
- "sync"
-
- "github.com/aws/aws-sdk-go/internal/sdkio"
-)
-
-// ReadSeekCloser wraps a io.Reader returning a ReaderSeekerCloser. Allows the
-// SDK to accept an io.Reader that is not also an io.Seeker for unsigned
-// streaming payload API operations.
-//
-// A ReadSeekCloser wrapping an nonseekable io.Reader used in an API
-// operation's input will prevent that operation being retried in the case of
-// network errors, and cause operation requests to fail if the operation
-// requires payload signing.
-//
-// Note: If using With S3 PutObject to stream an object upload The SDK's S3
-// Upload manager (s3manager.Uploader) provides support for streaming with the
-// ability to retry network errors.
-func ReadSeekCloser(r io.Reader) ReaderSeekerCloser {
- return ReaderSeekerCloser{r}
-}
-
-// ReaderSeekerCloser represents a reader that can also delegate io.Seeker and
-// io.Closer interfaces to the underlying object if they are available.
-type ReaderSeekerCloser struct {
- r io.Reader
-}
-
-// IsReaderSeekable returns if the underlying reader type can be seeked. A
-// io.Reader might not actually be seekable if it is the ReaderSeekerCloser
-// type.
-func IsReaderSeekable(r io.Reader) bool {
- switch v := r.(type) {
- case ReaderSeekerCloser:
- return v.IsSeeker()
- case *ReaderSeekerCloser:
- return v.IsSeeker()
- case io.ReadSeeker:
- return true
- default:
- return false
- }
-}
-
-// Read reads from the reader up to size of p. The number of bytes read, and
-// error if it occurred will be returned.
-//
-// If the reader is not an io.Reader zero bytes read, and nil error will be
-// returned.
-//
-// Performs the same functionality as io.Reader Read
-func (r ReaderSeekerCloser) Read(p []byte) (int, error) {
- switch t := r.r.(type) {
- case io.Reader:
- return t.Read(p)
- }
- return 0, nil
-}
-
-// Seek sets the offset for the next Read to offset, interpreted according to
-// whence: 0 means relative to the origin of the file, 1 means relative to the
-// current offset, and 2 means relative to the end. Seek returns the new offset
-// and an error, if any.
-//
-// If the ReaderSeekerCloser is not an io.Seeker nothing will be done.
-func (r ReaderSeekerCloser) Seek(offset int64, whence int) (int64, error) {
- switch t := r.r.(type) {
- case io.Seeker:
- return t.Seek(offset, whence)
- }
- return int64(0), nil
-}
-
-// IsSeeker returns if the underlying reader is also a seeker.
-func (r ReaderSeekerCloser) IsSeeker() bool {
- _, ok := r.r.(io.Seeker)
- return ok
-}
-
-// HasLen returns the length of the underlying reader if the value implements
-// the Len() int method.
-func (r ReaderSeekerCloser) HasLen() (int, bool) {
- type lenner interface {
- Len() int
- }
-
- if lr, ok := r.r.(lenner); ok {
- return lr.Len(), true
- }
-
- return 0, false
-}
-
-// GetLen returns the length of the bytes remaining in the underlying reader.
-// Checks first for Len(), then io.Seeker to determine the size of the
-// underlying reader.
-//
-// Will return -1 if the length cannot be determined.
-func (r ReaderSeekerCloser) GetLen() (int64, error) {
- if l, ok := r.HasLen(); ok {
- return int64(l), nil
- }
-
- if s, ok := r.r.(io.Seeker); ok {
- return seekerLen(s)
- }
-
- return -1, nil
-}
-
-// SeekerLen attempts to get the number of bytes remaining at the seeker's
-// current position. Returns the number of bytes remaining or error.
-func SeekerLen(s io.Seeker) (int64, error) {
- // Determine if the seeker is actually seekable. ReaderSeekerCloser
- // hides the fact that a io.Readers might not actually be seekable.
- switch v := s.(type) {
- case ReaderSeekerCloser:
- return v.GetLen()
- case *ReaderSeekerCloser:
- return v.GetLen()
- }
-
- return seekerLen(s)
-}
-
-func seekerLen(s io.Seeker) (int64, error) {
- curOffset, err := s.Seek(0, sdkio.SeekCurrent)
- if err != nil {
- return 0, err
- }
-
- endOffset, err := s.Seek(0, sdkio.SeekEnd)
- if err != nil {
- return 0, err
- }
-
- _, err = s.Seek(curOffset, sdkio.SeekStart)
- if err != nil {
- return 0, err
- }
-
- return endOffset - curOffset, nil
-}
-
-// Close closes the ReaderSeekerCloser.
-//
-// If the ReaderSeekerCloser is not an io.Closer nothing will be done.
-func (r ReaderSeekerCloser) Close() error {
- switch t := r.r.(type) {
- case io.Closer:
- return t.Close()
- }
- return nil
-}
-
-// A WriteAtBuffer provides a in memory buffer supporting the io.WriterAt interface
-// Can be used with the s3manager.Downloader to download content to a buffer
-// in memory. Safe to use concurrently.
-type WriteAtBuffer struct {
- buf []byte
- m sync.Mutex
-
- // GrowthCoeff defines the growth rate of the internal buffer. By
- // default, the growth rate is 1, where expanding the internal
- // buffer will allocate only enough capacity to fit the new expected
- // length.
- GrowthCoeff float64
-}
-
-// NewWriteAtBuffer creates a WriteAtBuffer with an internal buffer
-// provided by buf.
-func NewWriteAtBuffer(buf []byte) *WriteAtBuffer {
- return &WriteAtBuffer{buf: buf}
-}
-
-// WriteAt writes a slice of bytes to a buffer starting at the position provided
-// The number of bytes written will be returned, or error. Can overwrite previous
-// written slices if the write ats overlap.
-func (b *WriteAtBuffer) WriteAt(p []byte, pos int64) (n int, err error) {
- pLen := len(p)
- expLen := pos + int64(pLen)
- b.m.Lock()
- defer b.m.Unlock()
- if int64(len(b.buf)) < expLen {
- if int64(cap(b.buf)) < expLen {
- if b.GrowthCoeff < 1 {
- b.GrowthCoeff = 1
- }
- newBuf := make([]byte, expLen, int64(b.GrowthCoeff*float64(expLen)))
- copy(newBuf, b.buf)
- b.buf = newBuf
- }
- b.buf = b.buf[:expLen]
- }
- copy(b.buf[pos:], p)
- return pLen, nil
-}
-
-// Bytes returns a slice of bytes written to the buffer.
-func (b *WriteAtBuffer) Bytes() []byte {
- b.m.Lock()
- defer b.m.Unlock()
- return b.buf
-}
-
-// MultiCloser is a utility to close multiple io.Closers within a single
-// statement.
-type MultiCloser []io.Closer
-
-// Close closes all of the io.Closers making up the MultiClosers. Any
-// errors that occur while closing will be returned in the order they
-// occur.
-func (m MultiCloser) Close() error {
- var errs errors
- for _, c := range m {
- err := c.Close()
- if err != nil {
- errs = append(errs, err)
- }
- }
- if len(errs) != 0 {
- return errs
- }
-
- return nil
-}
-
-type errors []error
-
-func (es errors) Error() string {
- var parts []string
- for _, e := range es {
- parts = append(parts, e.Error())
- }
-
- return strings.Join(parts, "\n")
-}
-
-// CopySeekableBody copies the seekable body to an io.Writer
-func CopySeekableBody(dst io.Writer, src io.ReadSeeker) (int64, error) {
- curPos, err := src.Seek(0, sdkio.SeekCurrent)
- if err != nil {
- return 0, err
- }
-
- // copy errors may be assumed to be from the body.
- n, err := io.Copy(dst, src)
- if err != nil {
- return n, err
- }
-
- // seek back to the first position after reading to reset
- // the body for transmission.
- _, err = src.Seek(curPos, sdkio.SeekStart)
- if err != nil {
- return n, err
- }
-
- return n, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/url.go b/vendor/github.com/aws/aws-sdk-go/aws/url.go
deleted file mode 100644
index fed561bd5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/url.go
+++ /dev/null
@@ -1,13 +0,0 @@
-//go:build go1.8
-// +build go1.8
-
-package aws
-
-import "net/url"
-
-// URLHostname will extract the Hostname without port from the URL value.
-//
-// Wrapper of net/url#URL.Hostname for backwards Go version compatibility.
-func URLHostname(url *url.URL) string {
- return url.Hostname()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
deleted file mode 100644
index 95282db03..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/url_1_7.go
+++ /dev/null
@@ -1,30 +0,0 @@
-//go:build !go1.8
-// +build !go1.8
-
-package aws
-
-import (
- "net/url"
- "strings"
-)
-
-// URLHostname will extract the Hostname without port from the URL value.
-//
-// Copy of Go 1.8's net/url#URL.Hostname functionality.
-func URLHostname(url *url.URL) string {
- return stripPort(url.Host)
-
-}
-
-// stripPort is copy of Go 1.8 url#URL.Hostname functionality.
-// https://golang.org/src/net/url/url.go
-func stripPort(hostport string) string {
- colon := strings.IndexByte(hostport, ':')
- if colon == -1 {
- return hostport
- }
- if i := strings.IndexByte(hostport, ']'); i != -1 {
- return strings.TrimPrefix(hostport[:i], "[")
- }
- return hostport[:colon]
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go
deleted file mode 100644
index c8b88d2e4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// Package aws provides core functionality for making requests to AWS services.
-package aws
-
-// SDKName is the name of this AWS SDK
-const SDKName = "aws-sdk-go"
-
-// SDKVersion is the version of this SDK
-const SDKVersion = "1.42.15"
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/context/background_go1.5.go b/vendor/github.com/aws/aws-sdk-go/internal/context/background_go1.5.go
deleted file mode 100644
index 365345353..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/context/background_go1.5.go
+++ /dev/null
@@ -1,41 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package context
-
-import "time"
-
-// An emptyCtx is a copy of the Go 1.7 context.emptyCtx type. This is copied to
-// provide a 1.6 and 1.5 safe version of context that is compatible with Go
-// 1.7's Context.
-//
-// An emptyCtx is never canceled, has no values, and has no deadline. It is not
-// struct{}, since vars of this type must have distinct addresses.
-type emptyCtx int
-
-func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
- return
-}
-
-func (*emptyCtx) Done() <-chan struct{} {
- return nil
-}
-
-func (*emptyCtx) Err() error {
- return nil
-}
-
-func (*emptyCtx) Value(key interface{}) interface{} {
- return nil
-}
-
-func (e *emptyCtx) String() string {
- switch e {
- case BackgroundCtx:
- return "aws.BackgroundContext"
- }
- return "unknown empty Context"
-}
-
-// BackgroundCtx is the common base context.
-var BackgroundCtx = new(emptyCtx)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go
deleted file mode 100644
index e83a99886..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ast.go
+++ /dev/null
@@ -1,120 +0,0 @@
-package ini
-
-// ASTKind represents different states in the parse table
-// and the type of AST that is being constructed
-type ASTKind int
-
-// ASTKind* is used in the parse table to transition between
-// the different states
-const (
- ASTKindNone = ASTKind(iota)
- ASTKindStart
- ASTKindExpr
- ASTKindEqualExpr
- ASTKindStatement
- ASTKindSkipStatement
- ASTKindExprStatement
- ASTKindSectionStatement
- ASTKindNestedSectionStatement
- ASTKindCompletedNestedSectionStatement
- ASTKindCommentStatement
- ASTKindCompletedSectionStatement
-)
-
-func (k ASTKind) String() string {
- switch k {
- case ASTKindNone:
- return "none"
- case ASTKindStart:
- return "start"
- case ASTKindExpr:
- return "expr"
- case ASTKindStatement:
- return "stmt"
- case ASTKindSectionStatement:
- return "section_stmt"
- case ASTKindExprStatement:
- return "expr_stmt"
- case ASTKindCommentStatement:
- return "comment"
- case ASTKindNestedSectionStatement:
- return "nested_section_stmt"
- case ASTKindCompletedSectionStatement:
- return "completed_stmt"
- case ASTKindSkipStatement:
- return "skip"
- default:
- return ""
- }
-}
-
-// AST interface allows us to determine what kind of node we
-// are on and casting may not need to be necessary.
-//
-// The root is always the first node in Children
-type AST struct {
- Kind ASTKind
- Root Token
- RootToken bool
- Children []AST
-}
-
-func newAST(kind ASTKind, root AST, children ...AST) AST {
- return AST{
- Kind: kind,
- Children: append([]AST{root}, children...),
- }
-}
-
-func newASTWithRootToken(kind ASTKind, root Token, children ...AST) AST {
- return AST{
- Kind: kind,
- Root: root,
- RootToken: true,
- Children: children,
- }
-}
-
-// AppendChild will append to the list of children an AST has.
-func (a *AST) AppendChild(child AST) {
- a.Children = append(a.Children, child)
-}
-
-// GetRoot will return the root AST which can be the first entry
-// in the children list or a token.
-func (a *AST) GetRoot() AST {
- if a.RootToken {
- return *a
- }
-
- if len(a.Children) == 0 {
- return AST{}
- }
-
- return a.Children[0]
-}
-
-// GetChildren will return the current AST's list of children
-func (a *AST) GetChildren() []AST {
- if len(a.Children) == 0 {
- return []AST{}
- }
-
- if a.RootToken {
- return a.Children
- }
-
- return a.Children[1:]
-}
-
-// SetChildren will set and override all children of the AST.
-func (a *AST) SetChildren(children []AST) {
- if a.RootToken {
- a.Children = children
- } else {
- a.Children = append(a.Children[:1], children...)
- }
-}
-
-// Start is used to indicate the starting state of the parse table.
-var Start = newAST(ASTKindStart, AST{})
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go
deleted file mode 100644
index 0895d53cb..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/comma_token.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package ini
-
-var commaRunes = []rune(",")
-
-func isComma(b rune) bool {
- return b == ','
-}
-
-func newCommaToken() Token {
- return newToken(TokenComma, commaRunes, NoneType)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go
deleted file mode 100644
index 0b76999ba..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/comment_token.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package ini
-
-// isComment will return whether or not the next byte(s) is a
-// comment.
-func isComment(b []rune) bool {
- if len(b) == 0 {
- return false
- }
-
- switch b[0] {
- case ';':
- return true
- case '#':
- return true
- }
-
- return false
-}
-
-// newCommentToken will create a comment token and
-// return how many bytes were read.
-func newCommentToken(b []rune) (Token, int, error) {
- i := 0
- for ; i < len(b); i++ {
- if b[i] == '\n' {
- break
- }
-
- if len(b)-i > 2 && b[i] == '\r' && b[i+1] == '\n' {
- break
- }
- }
-
- return newToken(TokenComment, b[:i], NoneType), i, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go
deleted file mode 100644
index 1e55bbd07..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Package ini is an LL(1) parser for configuration files.
-//
-// Example:
-// sections, err := ini.OpenFile("/path/to/file")
-// if err != nil {
-// panic(err)
-// }
-//
-// profile := "foo"
-// section, ok := sections.GetSection(profile)
-// if !ok {
-// fmt.Printf("section %q could not be found", profile)
-// }
-//
-// Below is the BNF that describes this parser
-// Grammar:
-// stmt -> section | stmt'
-// stmt' -> epsilon | expr
-// expr -> value (stmt)* | equal_expr (stmt)*
-// equal_expr -> value ( ':' | '=' ) equal_expr'
-// equal_expr' -> number | string | quoted_string
-// quoted_string -> " quoted_string'
-// quoted_string' -> string quoted_string_end
-// quoted_string_end -> "
-//
-// section -> [ section'
-// section' -> section_value section_close
-// section_value -> number | string_subset | boolean | quoted_string_subset
-// quoted_string_subset -> " quoted_string_subset'
-// quoted_string_subset' -> string_subset quoted_string_end
-// quoted_string_subset -> "
-// section_close -> ]
-//
-// value -> number | string_subset | boolean
-// string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ?
-// string_subset -> ? Code-points excepted by grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ?
-//
-// SkipState will skip (NL WS)+
-//
-// comment -> # comment' | ; comment'
-// comment' -> epsilon | value
-package ini
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go
deleted file mode 100644
index 04345a54c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/empty_token.go
+++ /dev/null
@@ -1,4 +0,0 @@
-package ini
-
-// emptyToken is used to satisfy the Token interface
-var emptyToken = newToken(TokenNone, []rune{}, NoneType)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go
deleted file mode 100644
index 91ba2a59d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/expression.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package ini
-
-// newExpression will return an expression AST.
-// Expr represents an expression
-//
-// grammar:
-// expr -> string | number
-func newExpression(tok Token) AST {
- return newASTWithRootToken(ASTKindExpr, tok)
-}
-
-func newEqualExpr(left AST, tok Token) AST {
- return newASTWithRootToken(ASTKindEqualExpr, tok, left)
-}
-
-// EqualExprKey will return a LHS value in the equal expr
-func EqualExprKey(ast AST) string {
- children := ast.GetChildren()
- if len(children) == 0 || ast.Kind != ASTKindEqualExpr {
- return ""
- }
-
- return string(children[0].Root.Raw())
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go
deleted file mode 100644
index 6e545b63b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/fuzz.go
+++ /dev/null
@@ -1,18 +0,0 @@
-//go:build gofuzz
-// +build gofuzz
-
-package ini
-
-import (
- "bytes"
-)
-
-func Fuzz(data []byte) int {
- b := bytes.NewReader(data)
-
- if _, err := Parse(b); err != nil {
- return 0
- }
-
- return 1
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go
deleted file mode 100644
index 3b0ca7afe..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini.go
+++ /dev/null
@@ -1,51 +0,0 @@
-package ini
-
-import (
- "io"
- "os"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-// OpenFile takes a path to a given file, and will open and parse
-// that file.
-func OpenFile(path string) (Sections, error) {
- f, err := os.Open(path)
- if err != nil {
- return Sections{}, awserr.New(ErrCodeUnableToReadFile, "unable to open file", err)
- }
- defer f.Close()
-
- return Parse(f)
-}
-
-// Parse will parse the given file using the shared config
-// visitor.
-func Parse(f io.Reader) (Sections, error) {
- tree, err := ParseAST(f)
- if err != nil {
- return Sections{}, err
- }
-
- v := NewDefaultVisitor()
- if err = Walk(tree, v); err != nil {
- return Sections{}, err
- }
-
- return v.Sections, nil
-}
-
-// ParseBytes will parse the given bytes and return the parsed sections.
-func ParseBytes(b []byte) (Sections, error) {
- tree, err := ParseASTBytes(b)
- if err != nil {
- return Sections{}, err
- }
-
- v := NewDefaultVisitor()
- if err = Walk(tree, v); err != nil {
- return Sections{}, err
- }
-
- return v.Sections, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go
deleted file mode 100644
index 582c024ad..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_lexer.go
+++ /dev/null
@@ -1,165 +0,0 @@
-package ini
-
-import (
- "bytes"
- "io"
- "io/ioutil"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
-)
-
-const (
- // ErrCodeUnableToReadFile is used when a file is failed to be
- // opened or read from.
- ErrCodeUnableToReadFile = "FailedRead"
-)
-
-// TokenType represents the various different tokens types
-type TokenType int
-
-func (t TokenType) String() string {
- switch t {
- case TokenNone:
- return "none"
- case TokenLit:
- return "literal"
- case TokenSep:
- return "sep"
- case TokenOp:
- return "op"
- case TokenWS:
- return "ws"
- case TokenNL:
- return "newline"
- case TokenComment:
- return "comment"
- case TokenComma:
- return "comma"
- default:
- return ""
- }
-}
-
-// TokenType enums
-const (
- TokenNone = TokenType(iota)
- TokenLit
- TokenSep
- TokenComma
- TokenOp
- TokenWS
- TokenNL
- TokenComment
-)
-
-type iniLexer struct{}
-
-// Tokenize will return a list of tokens during lexical analysis of the
-// io.Reader.
-func (l *iniLexer) Tokenize(r io.Reader) ([]Token, error) {
- b, err := ioutil.ReadAll(r)
- if err != nil {
- return nil, awserr.New(ErrCodeUnableToReadFile, "unable to read file", err)
- }
-
- return l.tokenize(b)
-}
-
-func (l *iniLexer) tokenize(b []byte) ([]Token, error) {
- runes := bytes.Runes(b)
- var err error
- n := 0
- tokenAmount := countTokens(runes)
- tokens := make([]Token, tokenAmount)
- count := 0
-
- for len(runes) > 0 && count < tokenAmount {
- switch {
- case isWhitespace(runes[0]):
- tokens[count], n, err = newWSToken(runes)
- case isComma(runes[0]):
- tokens[count], n = newCommaToken(), 1
- case isComment(runes):
- tokens[count], n, err = newCommentToken(runes)
- case isNewline(runes):
- tokens[count], n, err = newNewlineToken(runes)
- case isSep(runes):
- tokens[count], n, err = newSepToken(runes)
- case isOp(runes):
- tokens[count], n, err = newOpToken(runes)
- default:
- tokens[count], n, err = newLitToken(runes)
- }
-
- if err != nil {
- return nil, err
- }
-
- count++
-
- runes = runes[n:]
- }
-
- return tokens[:count], nil
-}
-
-func countTokens(runes []rune) int {
- count, n := 0, 0
- var err error
-
- for len(runes) > 0 {
- switch {
- case isWhitespace(runes[0]):
- _, n, err = newWSToken(runes)
- case isComma(runes[0]):
- _, n = newCommaToken(), 1
- case isComment(runes):
- _, n, err = newCommentToken(runes)
- case isNewline(runes):
- _, n, err = newNewlineToken(runes)
- case isSep(runes):
- _, n, err = newSepToken(runes)
- case isOp(runes):
- _, n, err = newOpToken(runes)
- default:
- _, n, err = newLitToken(runes)
- }
-
- if err != nil {
- return 0
- }
-
- count++
- runes = runes[n:]
- }
-
- return count + 1
-}
-
-// Token indicates a metadata about a given value.
-type Token struct {
- t TokenType
- ValueType ValueType
- base int
- raw []rune
-}
-
-var emptyValue = Value{}
-
-func newToken(t TokenType, raw []rune, v ValueType) Token {
- return Token{
- t: t,
- raw: raw,
- ValueType: v,
- }
-}
-
-// Raw return the raw runes that were consumed
-func (tok Token) Raw() []rune {
- return tok.raw
-}
-
-// Type returns the token type
-func (tok Token) Type() TokenType {
- return tok.t
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go
deleted file mode 100644
index 0ba319491..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go
+++ /dev/null
@@ -1,350 +0,0 @@
-package ini
-
-import (
- "fmt"
- "io"
-)
-
-// ParseState represents the current state of the parser.
-type ParseState uint
-
-// State enums for the parse table
-const (
- InvalidState ParseState = iota
- // stmt -> value stmt'
- StatementState
- // stmt' -> MarkComplete | op stmt
- StatementPrimeState
- // value -> number | string | boolean | quoted_string
- ValueState
- // section -> [ section'
- OpenScopeState
- // section' -> value section_close
- SectionState
- // section_close -> ]
- CloseScopeState
- // SkipState will skip (NL WS)+
- SkipState
- // SkipTokenState will skip any token and push the previous
- // state onto the stack.
- SkipTokenState
- // comment -> # comment' | ; comment'
- // comment' -> MarkComplete | value
- CommentState
- // MarkComplete state will complete statements and move that
- // to the completed AST list
- MarkCompleteState
- // TerminalState signifies that the tokens have been fully parsed
- TerminalState
-)
-
-// parseTable is a state machine to dictate the grammar above.
-var parseTable = map[ASTKind]map[TokenType]ParseState{
- ASTKindStart: {
- TokenLit: StatementState,
- TokenSep: OpenScopeState,
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenComment: CommentState,
- TokenNone: TerminalState,
- },
- ASTKindCommentStatement: {
- TokenLit: StatementState,
- TokenSep: OpenScopeState,
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenComment: CommentState,
- TokenNone: MarkCompleteState,
- },
- ASTKindExpr: {
- TokenOp: StatementPrimeState,
- TokenLit: ValueState,
- TokenSep: OpenScopeState,
- TokenWS: ValueState,
- TokenNL: SkipState,
- TokenComment: CommentState,
- TokenNone: MarkCompleteState,
- },
- ASTKindEqualExpr: {
- TokenLit: ValueState,
- TokenSep: ValueState,
- TokenOp: ValueState,
- TokenWS: SkipTokenState,
- TokenNL: SkipState,
- TokenNone: SkipState,
- },
- ASTKindStatement: {
- TokenLit: SectionState,
- TokenSep: CloseScopeState,
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenComment: CommentState,
- TokenNone: MarkCompleteState,
- },
- ASTKindExprStatement: {
- TokenLit: ValueState,
- TokenSep: ValueState,
- TokenOp: ValueState,
- TokenWS: ValueState,
- TokenNL: MarkCompleteState,
- TokenComment: CommentState,
- TokenNone: TerminalState,
- TokenComma: SkipState,
- },
- ASTKindSectionStatement: {
- TokenLit: SectionState,
- TokenOp: SectionState,
- TokenSep: CloseScopeState,
- TokenWS: SectionState,
- TokenNL: SkipTokenState,
- },
- ASTKindCompletedSectionStatement: {
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenLit: StatementState,
- TokenSep: OpenScopeState,
- TokenComment: CommentState,
- TokenNone: MarkCompleteState,
- },
- ASTKindSkipStatement: {
- TokenLit: StatementState,
- TokenSep: OpenScopeState,
- TokenWS: SkipTokenState,
- TokenNL: SkipTokenState,
- TokenComment: CommentState,
- TokenNone: TerminalState,
- },
-}
-
-// ParseAST will parse input from an io.Reader using
-// an LL(1) parser.
-func ParseAST(r io.Reader) ([]AST, error) {
- lexer := iniLexer{}
- tokens, err := lexer.Tokenize(r)
- if err != nil {
- return []AST{}, err
- }
-
- return parse(tokens)
-}
-
-// ParseASTBytes will parse input from a byte slice using
-// an LL(1) parser.
-func ParseASTBytes(b []byte) ([]AST, error) {
- lexer := iniLexer{}
- tokens, err := lexer.tokenize(b)
- if err != nil {
- return []AST{}, err
- }
-
- return parse(tokens)
-}
-
-func parse(tokens []Token) ([]AST, error) {
- start := Start
- stack := newParseStack(3, len(tokens))
-
- stack.Push(start)
- s := newSkipper()
-
-loop:
- for stack.Len() > 0 {
- k := stack.Pop()
-
- var tok Token
- if len(tokens) == 0 {
- // this occurs when all the tokens have been processed
- // but reduction of what's left on the stack needs to
- // occur.
- tok = emptyToken
- } else {
- tok = tokens[0]
- }
-
- step := parseTable[k.Kind][tok.Type()]
- if s.ShouldSkip(tok) {
- // being in a skip state with no tokens will break out of
- // the parse loop since there is nothing left to process.
- if len(tokens) == 0 {
- break loop
- }
- // if should skip is true, we skip the tokens until should skip is set to false.
- step = SkipTokenState
- }
-
- switch step {
- case TerminalState:
- // Finished parsing. Push what should be the last
- // statement to the stack. If there is anything left
- // on the stack, an error in parsing has occurred.
- if k.Kind != ASTKindStart {
- stack.MarkComplete(k)
- }
- break loop
- case SkipTokenState:
- // When skipping a token, the previous state was popped off the stack.
- // To maintain the correct state, the previous state will be pushed
- // onto the stack.
- stack.Push(k)
- case StatementState:
- if k.Kind != ASTKindStart {
- stack.MarkComplete(k)
- }
- expr := newExpression(tok)
- stack.Push(expr)
- case StatementPrimeState:
- if tok.Type() != TokenOp {
- stack.MarkComplete(k)
- continue
- }
-
- if k.Kind != ASTKindExpr {
- return nil, NewParseError(
- fmt.Sprintf("invalid expression: expected Expr type, but found %T type", k),
- )
- }
-
- k = trimSpaces(k)
- expr := newEqualExpr(k, tok)
- stack.Push(expr)
- case ValueState:
- // ValueState requires the previous state to either be an equal expression
- // or an expression statement.
- switch k.Kind {
- case ASTKindEqualExpr:
- // assigning a value to some key
- k.AppendChild(newExpression(tok))
- stack.Push(newExprStatement(k))
- case ASTKindExpr:
- k.Root.raw = append(k.Root.raw, tok.Raw()...)
- stack.Push(k)
- case ASTKindExprStatement:
- root := k.GetRoot()
- children := root.GetChildren()
- if len(children) == 0 {
- return nil, NewParseError(
- fmt.Sprintf("invalid expression: AST contains no children %s", k.Kind),
- )
- }
-
- rhs := children[len(children)-1]
-
- if rhs.Root.ValueType != QuotedStringType {
- rhs.Root.ValueType = StringType
- rhs.Root.raw = append(rhs.Root.raw, tok.Raw()...)
-
- }
-
- children[len(children)-1] = rhs
- root.SetChildren(children)
-
- stack.Push(k)
- }
- case OpenScopeState:
- if !runeCompare(tok.Raw(), openBrace) {
- return nil, NewParseError("expected '['")
- }
- // If OpenScopeState is not at the start, we must mark the previous ast as complete
- //
- // for example: if previous ast was a skip statement;
- // we should mark it as complete before we create a new statement
- if k.Kind != ASTKindStart {
- stack.MarkComplete(k)
- }
-
- stmt := newStatement()
- stack.Push(stmt)
- case CloseScopeState:
- if !runeCompare(tok.Raw(), closeBrace) {
- return nil, NewParseError("expected ']'")
- }
-
- k = trimSpaces(k)
- stack.Push(newCompletedSectionStatement(k))
- case SectionState:
- var stmt AST
-
- switch k.Kind {
- case ASTKindStatement:
- // If there are multiple literals inside of a scope declaration,
- // then the current token's raw value will be appended to the Name.
- //
- // This handles cases like [ profile default ]
- //
- // k will represent a SectionStatement with the children representing
- // the label of the section
- stmt = newSectionStatement(tok)
- case ASTKindSectionStatement:
- k.Root.raw = append(k.Root.raw, tok.Raw()...)
- stmt = k
- default:
- return nil, NewParseError(
- fmt.Sprintf("invalid statement: expected statement: %v", k.Kind),
- )
- }
-
- stack.Push(stmt)
- case MarkCompleteState:
- if k.Kind != ASTKindStart {
- stack.MarkComplete(k)
- }
-
- if stack.Len() == 0 {
- stack.Push(start)
- }
- case SkipState:
- stack.Push(newSkipStatement(k))
- s.Skip()
- case CommentState:
- if k.Kind == ASTKindStart {
- stack.Push(k)
- } else {
- stack.MarkComplete(k)
- }
-
- stmt := newCommentStatement(tok)
- stack.Push(stmt)
- default:
- return nil, NewParseError(
- fmt.Sprintf("invalid state with ASTKind %v and TokenType %v",
- k, tok.Type()))
- }
-
- if len(tokens) > 0 {
- tokens = tokens[1:]
- }
- }
-
- // this occurs when a statement has not been completed
- if stack.top > 1 {
- return nil, NewParseError(fmt.Sprintf("incomplete ini expression"))
- }
-
- // returns a sublist which excludes the start symbol
- return stack.List(), nil
-}
-
-// trimSpaces will trim spaces on the left and right hand side of
-// the literal.
-func trimSpaces(k AST) AST {
- // trim left hand side of spaces
- for i := 0; i < len(k.Root.raw); i++ {
- if !isWhitespace(k.Root.raw[i]) {
- break
- }
-
- k.Root.raw = k.Root.raw[1:]
- i--
- }
-
- // trim right hand side of spaces
- for i := len(k.Root.raw) - 1; i >= 0; i-- {
- if !isWhitespace(k.Root.raw[i]) {
- break
- }
-
- k.Root.raw = k.Root.raw[:len(k.Root.raw)-1]
- }
-
- return k
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
deleted file mode 100644
index 34a481afb..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/literal_tokens.go
+++ /dev/null
@@ -1,340 +0,0 @@
-package ini
-
-import (
- "fmt"
- "strconv"
- "strings"
- "unicode"
-)
-
-var (
- runesTrue = []rune("true")
- runesFalse = []rune("false")
-)
-
-var literalValues = [][]rune{
- runesTrue,
- runesFalse,
-}
-
-func isBoolValue(b []rune) bool {
- for _, lv := range literalValues {
- if isCaselessLitValue(lv, b) {
- return true
- }
- }
- return false
-}
-
-func isLitValue(want, have []rune) bool {
- if len(have) < len(want) {
- return false
- }
-
- for i := 0; i < len(want); i++ {
- if want[i] != have[i] {
- return false
- }
- }
-
- return true
-}
-
-// isCaselessLitValue is a caseless value comparison, assumes want is already lower-cased for efficiency.
-func isCaselessLitValue(want, have []rune) bool {
- if len(have) < len(want) {
- return false
- }
-
- for i := 0; i < len(want); i++ {
- if want[i] != unicode.ToLower(have[i]) {
- return false
- }
- }
-
- return true
-}
-
-// isNumberValue will return whether not the leading characters in
-// a byte slice is a number. A number is delimited by whitespace or
-// the newline token.
-//
-// A number is defined to be in a binary, octal, decimal (int | float), hex format,
-// or in scientific notation.
-func isNumberValue(b []rune) bool {
- negativeIndex := 0
- helper := numberHelper{}
- needDigit := false
-
- for i := 0; i < len(b); i++ {
- negativeIndex++
-
- switch b[i] {
- case '-':
- if helper.IsNegative() || negativeIndex != 1 {
- return false
- }
- helper.Determine(b[i])
- needDigit = true
- continue
- case 'e', 'E':
- if err := helper.Determine(b[i]); err != nil {
- return false
- }
- negativeIndex = 0
- needDigit = true
- continue
- case 'b':
- if helper.numberFormat == hex {
- break
- }
- fallthrough
- case 'o', 'x':
- needDigit = true
- if i == 0 {
- return false
- }
-
- fallthrough
- case '.':
- if err := helper.Determine(b[i]); err != nil {
- return false
- }
- needDigit = true
- continue
- }
-
- if i > 0 && (isNewline(b[i:]) || isWhitespace(b[i])) {
- return !needDigit
- }
-
- if !helper.CorrectByte(b[i]) {
- return false
- }
- needDigit = false
- }
-
- return !needDigit
-}
-
-func isValid(b []rune) (bool, int, error) {
- if len(b) == 0 {
- // TODO: should probably return an error
- return false, 0, nil
- }
-
- return isValidRune(b[0]), 1, nil
-}
-
-func isValidRune(r rune) bool {
- return r != ':' && r != '=' && r != '[' && r != ']' && r != ' ' && r != '\n'
-}
-
-// ValueType is an enum that will signify what type
-// the Value is
-type ValueType int
-
-func (v ValueType) String() string {
- switch v {
- case NoneType:
- return "NONE"
- case DecimalType:
- return "FLOAT"
- case IntegerType:
- return "INT"
- case StringType:
- return "STRING"
- case BoolType:
- return "BOOL"
- }
-
- return ""
-}
-
-// ValueType enums
-const (
- NoneType = ValueType(iota)
- DecimalType
- IntegerType
- StringType
- QuotedStringType
- BoolType
-)
-
-// Value is a union container
-type Value struct {
- Type ValueType
- raw []rune
-
- integer int64
- decimal float64
- boolean bool
- str string
-}
-
-func newValue(t ValueType, base int, raw []rune) (Value, error) {
- v := Value{
- Type: t,
- raw: raw,
- }
- var err error
-
- switch t {
- case DecimalType:
- v.decimal, err = strconv.ParseFloat(string(raw), 64)
- case IntegerType:
- if base != 10 {
- raw = raw[2:]
- }
-
- v.integer, err = strconv.ParseInt(string(raw), base, 64)
- case StringType:
- v.str = string(raw)
- case QuotedStringType:
- v.str = string(raw[1 : len(raw)-1])
- case BoolType:
- v.boolean = isCaselessLitValue(runesTrue, v.raw)
- }
-
- // issue 2253
- //
- // if the value trying to be parsed is too large, then we will use
- // the 'StringType' and raw value instead.
- if nerr, ok := err.(*strconv.NumError); ok && nerr.Err == strconv.ErrRange {
- v.Type = StringType
- v.str = string(raw)
- err = nil
- }
-
- return v, err
-}
-
-// Append will append values and change the type to a string
-// type.
-func (v *Value) Append(tok Token) {
- r := tok.Raw()
- if v.Type != QuotedStringType {
- v.Type = StringType
- r = tok.raw[1 : len(tok.raw)-1]
- }
- if tok.Type() != TokenLit {
- v.raw = append(v.raw, tok.Raw()...)
- } else {
- v.raw = append(v.raw, r...)
- }
-}
-
-func (v Value) String() string {
- switch v.Type {
- case DecimalType:
- return fmt.Sprintf("decimal: %f", v.decimal)
- case IntegerType:
- return fmt.Sprintf("integer: %d", v.integer)
- case StringType:
- return fmt.Sprintf("string: %s", string(v.raw))
- case QuotedStringType:
- return fmt.Sprintf("quoted string: %s", string(v.raw))
- case BoolType:
- return fmt.Sprintf("bool: %t", v.boolean)
- default:
- return "union not set"
- }
-}
-
-func newLitToken(b []rune) (Token, int, error) {
- n := 0
- var err error
-
- token := Token{}
- if b[0] == '"' {
- n, err = getStringValue(b)
- if err != nil {
- return token, n, err
- }
-
- token = newToken(TokenLit, b[:n], QuotedStringType)
- } else if isNumberValue(b) {
- var base int
- base, n, err = getNumericalValue(b)
- if err != nil {
- return token, 0, err
- }
-
- value := b[:n]
- vType := IntegerType
- if contains(value, '.') || hasExponent(value) {
- vType = DecimalType
- }
- token = newToken(TokenLit, value, vType)
- token.base = base
- } else if isBoolValue(b) {
- n, err = getBoolValue(b)
-
- token = newToken(TokenLit, b[:n], BoolType)
- } else {
- n, err = getValue(b)
- token = newToken(TokenLit, b[:n], StringType)
- }
-
- return token, n, err
-}
-
-// IntValue returns an integer value
-func (v Value) IntValue() int64 {
- return v.integer
-}
-
-// FloatValue returns a float value
-func (v Value) FloatValue() float64 {
- return v.decimal
-}
-
-// BoolValue returns a bool value
-func (v Value) BoolValue() bool {
- return v.boolean
-}
-
-func isTrimmable(r rune) bool {
- switch r {
- case '\n', ' ':
- return true
- }
- return false
-}
-
-// StringValue returns the string value
-func (v Value) StringValue() string {
- switch v.Type {
- case StringType:
- return strings.TrimFunc(string(v.raw), isTrimmable)
- case QuotedStringType:
- // preserve all characters in the quotes
- return string(removeEscapedCharacters(v.raw[1 : len(v.raw)-1]))
- default:
- return strings.TrimFunc(string(v.raw), isTrimmable)
- }
-}
-
-func contains(runes []rune, c rune) bool {
- for i := 0; i < len(runes); i++ {
- if runes[i] == c {
- return true
- }
- }
-
- return false
-}
-
-func runeCompare(v1 []rune, v2 []rune) bool {
- if len(v1) != len(v2) {
- return false
- }
-
- for i := 0; i < len(v1); i++ {
- if v1[i] != v2[i] {
- return false
- }
- }
-
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go
deleted file mode 100644
index e52ac399f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/newline_token.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package ini
-
-func isNewline(b []rune) bool {
- if len(b) == 0 {
- return false
- }
-
- if b[0] == '\n' {
- return true
- }
-
- if len(b) < 2 {
- return false
- }
-
- return b[0] == '\r' && b[1] == '\n'
-}
-
-func newNewlineToken(b []rune) (Token, int, error) {
- i := 1
- if b[0] == '\r' && isNewline(b[1:]) {
- i++
- }
-
- if !isNewline([]rune(b[:i])) {
- return emptyToken, 0, NewParseError("invalid new line token")
- }
-
- return newToken(TokenNL, b[:i], NoneType), i, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go
deleted file mode 100644
index a45c0bc56..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/number_helper.go
+++ /dev/null
@@ -1,152 +0,0 @@
-package ini
-
-import (
- "bytes"
- "fmt"
- "strconv"
-)
-
-const (
- none = numberFormat(iota)
- binary
- octal
- decimal
- hex
- exponent
-)
-
-type numberFormat int
-
-// numberHelper is used to dictate what format a number is in
-// and what to do for negative values. Since -1e-4 is a valid
-// number, we cannot just simply check for duplicate negatives.
-type numberHelper struct {
- numberFormat numberFormat
-
- negative bool
- negativeExponent bool
-}
-
-func (b numberHelper) Exists() bool {
- return b.numberFormat != none
-}
-
-func (b numberHelper) IsNegative() bool {
- return b.negative || b.negativeExponent
-}
-
-func (b *numberHelper) Determine(c rune) error {
- if b.Exists() {
- return NewParseError(fmt.Sprintf("multiple number formats: 0%v", string(c)))
- }
-
- switch c {
- case 'b':
- b.numberFormat = binary
- case 'o':
- b.numberFormat = octal
- case 'x':
- b.numberFormat = hex
- case 'e', 'E':
- b.numberFormat = exponent
- case '-':
- if b.numberFormat != exponent {
- b.negative = true
- } else {
- b.negativeExponent = true
- }
- case '.':
- b.numberFormat = decimal
- default:
- return NewParseError(fmt.Sprintf("invalid number character: %v", string(c)))
- }
-
- return nil
-}
-
-func (b numberHelper) CorrectByte(c rune) bool {
- switch {
- case b.numberFormat == binary:
- if !isBinaryByte(c) {
- return false
- }
- case b.numberFormat == octal:
- if !isOctalByte(c) {
- return false
- }
- case b.numberFormat == hex:
- if !isHexByte(c) {
- return false
- }
- case b.numberFormat == decimal:
- if !isDigit(c) {
- return false
- }
- case b.numberFormat == exponent:
- if !isDigit(c) {
- return false
- }
- case b.negativeExponent:
- if !isDigit(c) {
- return false
- }
- case b.negative:
- if !isDigit(c) {
- return false
- }
- default:
- if !isDigit(c) {
- return false
- }
- }
-
- return true
-}
-
-func (b numberHelper) Base() int {
- switch b.numberFormat {
- case binary:
- return 2
- case octal:
- return 8
- case hex:
- return 16
- default:
- return 10
- }
-}
-
-func (b numberHelper) String() string {
- buf := bytes.Buffer{}
- i := 0
-
- switch b.numberFormat {
- case binary:
- i++
- buf.WriteString(strconv.Itoa(i) + ": binary format\n")
- case octal:
- i++
- buf.WriteString(strconv.Itoa(i) + ": octal format\n")
- case hex:
- i++
- buf.WriteString(strconv.Itoa(i) + ": hex format\n")
- case exponent:
- i++
- buf.WriteString(strconv.Itoa(i) + ": exponent format\n")
- default:
- i++
- buf.WriteString(strconv.Itoa(i) + ": integer format\n")
- }
-
- if b.negative {
- i++
- buf.WriteString(strconv.Itoa(i) + ": negative format\n")
- }
-
- if b.negativeExponent {
- i++
- buf.WriteString(strconv.Itoa(i) + ": negative exponent format\n")
- }
-
- return buf.String()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go
deleted file mode 100644
index 8a84c7cbe..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/op_tokens.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package ini
-
-import (
- "fmt"
-)
-
-var (
- equalOp = []rune("=")
- equalColonOp = []rune(":")
-)
-
-func isOp(b []rune) bool {
- if len(b) == 0 {
- return false
- }
-
- switch b[0] {
- case '=':
- return true
- case ':':
- return true
- default:
- return false
- }
-}
-
-func newOpToken(b []rune) (Token, int, error) {
- tok := Token{}
-
- switch b[0] {
- case '=':
- tok = newToken(TokenOp, equalOp, NoneType)
- case ':':
- tok = newToken(TokenOp, equalColonOp, NoneType)
- default:
- return tok, 0, NewParseError(fmt.Sprintf("unexpected op type, %v", b[0]))
- }
- return tok, 1, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go
deleted file mode 100644
index 457287019..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_error.go
+++ /dev/null
@@ -1,43 +0,0 @@
-package ini
-
-import "fmt"
-
-const (
- // ErrCodeParseError is returned when a parsing error
- // has occurred.
- ErrCodeParseError = "INIParseError"
-)
-
-// ParseError is an error which is returned during any part of
-// the parsing process.
-type ParseError struct {
- msg string
-}
-
-// NewParseError will return a new ParseError where message
-// is the description of the error.
-func NewParseError(message string) *ParseError {
- return &ParseError{
- msg: message,
- }
-}
-
-// Code will return the ErrCodeParseError
-func (err *ParseError) Code() string {
- return ErrCodeParseError
-}
-
-// Message returns the error's message
-func (err *ParseError) Message() string {
- return err.msg
-}
-
-// OrigError return nothing since there will never be any
-// original error.
-func (err *ParseError) OrigError() error {
- return nil
-}
-
-func (err *ParseError) Error() string {
- return fmt.Sprintf("%s: %s", err.Code(), err.Message())
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go
deleted file mode 100644
index 7f01cf7c7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/parse_stack.go
+++ /dev/null
@@ -1,60 +0,0 @@
-package ini
-
-import (
- "bytes"
- "fmt"
-)
-
-// ParseStack is a stack that contains a container, the stack portion,
-// and the list which is the list of ASTs that have been successfully
-// parsed.
-type ParseStack struct {
- top int
- container []AST
- list []AST
- index int
-}
-
-func newParseStack(sizeContainer, sizeList int) ParseStack {
- return ParseStack{
- container: make([]AST, sizeContainer),
- list: make([]AST, sizeList),
- }
-}
-
-// Pop will return and truncate the last container element.
-func (s *ParseStack) Pop() AST {
- s.top--
- return s.container[s.top]
-}
-
-// Push will add the new AST to the container
-func (s *ParseStack) Push(ast AST) {
- s.container[s.top] = ast
- s.top++
-}
-
-// MarkComplete will append the AST to the list of completed statements
-func (s *ParseStack) MarkComplete(ast AST) {
- s.list[s.index] = ast
- s.index++
-}
-
-// List will return the completed statements
-func (s ParseStack) List() []AST {
- return s.list[:s.index]
-}
-
-// Len will return the length of the container
-func (s *ParseStack) Len() int {
- return s.top
-}
-
-func (s ParseStack) String() string {
- buf := bytes.Buffer{}
- for i, node := range s.list {
- buf.WriteString(fmt.Sprintf("%d: %v\n", i+1, node))
- }
-
- return buf.String()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go
deleted file mode 100644
index f82095ba2..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/sep_tokens.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package ini
-
-import (
- "fmt"
-)
-
-var (
- emptyRunes = []rune{}
-)
-
-func isSep(b []rune) bool {
- if len(b) == 0 {
- return false
- }
-
- switch b[0] {
- case '[', ']':
- return true
- default:
- return false
- }
-}
-
-var (
- openBrace = []rune("[")
- closeBrace = []rune("]")
-)
-
-func newSepToken(b []rune) (Token, int, error) {
- tok := Token{}
-
- switch b[0] {
- case '[':
- tok = newToken(TokenSep, openBrace, NoneType)
- case ']':
- tok = newToken(TokenSep, closeBrace, NoneType)
- default:
- return tok, 0, NewParseError(fmt.Sprintf("unexpected sep type, %v", b[0]))
- }
- return tok, 1, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go
deleted file mode 100644
index da7a4049c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/skipper.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package ini
-
-// skipper is used to skip certain blocks of an ini file.
-// Currently skipper is used to skip nested blocks of ini
-// files. See example below
-//
-// [ foo ]
-// nested = ; this section will be skipped
-// a=b
-// c=d
-// bar=baz ; this will be included
-type skipper struct {
- shouldSkip bool
- TokenSet bool
- prevTok Token
-}
-
-func newSkipper() skipper {
- return skipper{
- prevTok: emptyToken,
- }
-}
-
-func (s *skipper) ShouldSkip(tok Token) bool {
- // should skip state will be modified only if previous token was new line (NL);
- // and the current token is not WhiteSpace (WS).
- if s.shouldSkip &&
- s.prevTok.Type() == TokenNL &&
- tok.Type() != TokenWS {
- s.Continue()
- return false
- }
- s.prevTok = tok
- return s.shouldSkip
-}
-
-func (s *skipper) Skip() {
- s.shouldSkip = true
-}
-
-func (s *skipper) Continue() {
- s.shouldSkip = false
- // empty token is assigned as we return to default state, when should skip is false
- s.prevTok = emptyToken
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go
deleted file mode 100644
index 18f3fe893..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/statement.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package ini
-
-// Statement is an empty AST mostly used for transitioning states.
-func newStatement() AST {
- return newAST(ASTKindStatement, AST{})
-}
-
-// SectionStatement represents a section AST
-func newSectionStatement(tok Token) AST {
- return newASTWithRootToken(ASTKindSectionStatement, tok)
-}
-
-// ExprStatement represents a completed expression AST
-func newExprStatement(ast AST) AST {
- return newAST(ASTKindExprStatement, ast)
-}
-
-// CommentStatement represents a comment in the ini definition.
-//
-// grammar:
-// comment -> #comment' | ;comment'
-// comment' -> epsilon | value
-func newCommentStatement(tok Token) AST {
- return newAST(ASTKindCommentStatement, newExpression(tok))
-}
-
-// CompletedSectionStatement represents a completed section
-func newCompletedSectionStatement(ast AST) AST {
- return newAST(ASTKindCompletedSectionStatement, ast)
-}
-
-// SkipStatement is used to skip whole statements
-func newSkipStatement(ast AST) AST {
- return newAST(ASTKindSkipStatement, ast)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go
deleted file mode 100644
index b5480fdeb..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/value_util.go
+++ /dev/null
@@ -1,284 +0,0 @@
-package ini
-
-import (
- "fmt"
-)
-
-// getStringValue will return a quoted string and the amount
-// of bytes read
-//
-// an error will be returned if the string is not properly formatted
-func getStringValue(b []rune) (int, error) {
- if b[0] != '"' {
- return 0, NewParseError("strings must start with '\"'")
- }
-
- endQuote := false
- i := 1
-
- for ; i < len(b) && !endQuote; i++ {
- if escaped := isEscaped(b[:i], b[i]); b[i] == '"' && !escaped {
- endQuote = true
- break
- } else if escaped {
- /*c, err := getEscapedByte(b[i])
- if err != nil {
- return 0, err
- }
-
- b[i-1] = c
- b = append(b[:i], b[i+1:]...)
- i--*/
-
- continue
- }
- }
-
- if !endQuote {
- return 0, NewParseError("missing '\"' in string value")
- }
-
- return i + 1, nil
-}
-
-// getBoolValue will return a boolean and the amount
-// of bytes read
-//
-// an error will be returned if the boolean is not of a correct
-// value
-func getBoolValue(b []rune) (int, error) {
- if len(b) < 4 {
- return 0, NewParseError("invalid boolean value")
- }
-
- n := 0
- for _, lv := range literalValues {
- if len(lv) > len(b) {
- continue
- }
-
- if isCaselessLitValue(lv, b) {
- n = len(lv)
- }
- }
-
- if n == 0 {
- return 0, NewParseError("invalid boolean value")
- }
-
- return n, nil
-}
-
-// getNumericalValue will return a numerical string, the amount
-// of bytes read, and the base of the number
-//
-// an error will be returned if the number is not of a correct
-// value
-func getNumericalValue(b []rune) (int, int, error) {
- if !isDigit(b[0]) {
- return 0, 0, NewParseError("invalid digit value")
- }
-
- i := 0
- helper := numberHelper{}
-
-loop:
- for negativeIndex := 0; i < len(b); i++ {
- negativeIndex++
-
- if !isDigit(b[i]) {
- switch b[i] {
- case '-':
- if helper.IsNegative() || negativeIndex != 1 {
- return 0, 0, NewParseError("parse error '-'")
- }
-
- n := getNegativeNumber(b[i:])
- i += (n - 1)
- helper.Determine(b[i])
- continue
- case '.':
- if err := helper.Determine(b[i]); err != nil {
- return 0, 0, err
- }
- case 'e', 'E':
- if err := helper.Determine(b[i]); err != nil {
- return 0, 0, err
- }
-
- negativeIndex = 0
- case 'b':
- if helper.numberFormat == hex {
- break
- }
- fallthrough
- case 'o', 'x':
- if i == 0 && b[i] != '0' {
- return 0, 0, NewParseError("incorrect base format, expected leading '0'")
- }
-
- if i != 1 {
- return 0, 0, NewParseError(fmt.Sprintf("incorrect base format found %s at %d index", string(b[i]), i))
- }
-
- if err := helper.Determine(b[i]); err != nil {
- return 0, 0, err
- }
- default:
- if isWhitespace(b[i]) {
- break loop
- }
-
- if isNewline(b[i:]) {
- break loop
- }
-
- if !(helper.numberFormat == hex && isHexByte(b[i])) {
- if i+2 < len(b) && !isNewline(b[i:i+2]) {
- return 0, 0, NewParseError("invalid numerical character")
- } else if !isNewline([]rune{b[i]}) {
- return 0, 0, NewParseError("invalid numerical character")
- }
-
- break loop
- }
- }
- }
- }
-
- return helper.Base(), i, nil
-}
-
-// isDigit will return whether or not something is an integer
-func isDigit(b rune) bool {
- return b >= '0' && b <= '9'
-}
-
-func hasExponent(v []rune) bool {
- return contains(v, 'e') || contains(v, 'E')
-}
-
-func isBinaryByte(b rune) bool {
- switch b {
- case '0', '1':
- return true
- default:
- return false
- }
-}
-
-func isOctalByte(b rune) bool {
- switch b {
- case '0', '1', '2', '3', '4', '5', '6', '7':
- return true
- default:
- return false
- }
-}
-
-func isHexByte(b rune) bool {
- if isDigit(b) {
- return true
- }
- return (b >= 'A' && b <= 'F') ||
- (b >= 'a' && b <= 'f')
-}
-
-func getValue(b []rune) (int, error) {
- i := 0
-
- for i < len(b) {
- if isNewline(b[i:]) {
- break
- }
-
- if isOp(b[i:]) {
- break
- }
-
- valid, n, err := isValid(b[i:])
- if err != nil {
- return 0, err
- }
-
- if !valid {
- break
- }
-
- i += n
- }
-
- return i, nil
-}
-
-// getNegativeNumber will return a negative number from a
-// byte slice. This will iterate through all characters until
-// a non-digit has been found.
-func getNegativeNumber(b []rune) int {
- if b[0] != '-' {
- return 0
- }
-
- i := 1
- for ; i < len(b); i++ {
- if !isDigit(b[i]) {
- return i
- }
- }
-
- return i
-}
-
-// isEscaped will return whether or not the character is an escaped
-// character.
-func isEscaped(value []rune, b rune) bool {
- if len(value) == 0 {
- return false
- }
-
- switch b {
- case '\'': // single quote
- case '"': // quote
- case 'n': // newline
- case 't': // tab
- case '\\': // backslash
- default:
- return false
- }
-
- return value[len(value)-1] == '\\'
-}
-
-func getEscapedByte(b rune) (rune, error) {
- switch b {
- case '\'': // single quote
- return '\'', nil
- case '"': // quote
- return '"', nil
- case 'n': // newline
- return '\n', nil
- case 't': // table
- return '\t', nil
- case '\\': // backslash
- return '\\', nil
- default:
- return b, NewParseError(fmt.Sprintf("invalid escaped character %c", b))
- }
-}
-
-func removeEscapedCharacters(b []rune) []rune {
- for i := 0; i < len(b); i++ {
- if isEscaped(b[:i], b[i]) {
- c, err := getEscapedByte(b[i])
- if err != nil {
- return b
- }
-
- b[i-1] = c
- b = append(b[:i], b[i+1:]...)
- i--
- }
- }
-
- return b
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go
deleted file mode 100644
index 081cf4334..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go
+++ /dev/null
@@ -1,169 +0,0 @@
-package ini
-
-import (
- "fmt"
- "sort"
-)
-
-// Visitor is an interface used by walkers that will
-// traverse an array of ASTs.
-type Visitor interface {
- VisitExpr(AST) error
- VisitStatement(AST) error
-}
-
-// DefaultVisitor is used to visit statements and expressions
-// and ensure that they are both of the correct format.
-// In addition, upon visiting this will build sections and populate
-// the Sections field which can be used to retrieve profile
-// configuration.
-type DefaultVisitor struct {
- scope string
- Sections Sections
-}
-
-// NewDefaultVisitor return a DefaultVisitor
-func NewDefaultVisitor() *DefaultVisitor {
- return &DefaultVisitor{
- Sections: Sections{
- container: map[string]Section{},
- },
- }
-}
-
-// VisitExpr visits expressions...
-func (v *DefaultVisitor) VisitExpr(expr AST) error {
- t := v.Sections.container[v.scope]
- if t.values == nil {
- t.values = values{}
- }
-
- switch expr.Kind {
- case ASTKindExprStatement:
- opExpr := expr.GetRoot()
- switch opExpr.Kind {
- case ASTKindEqualExpr:
- children := opExpr.GetChildren()
- if len(children) <= 1 {
- return NewParseError("unexpected token type")
- }
-
- rhs := children[1]
-
- // The right-hand value side the equality expression is allowed to contain '[', ']', ':', '=' in the values.
- // If the token is not either a literal or one of the token types that identifies those four additional
- // tokens then error.
- if !(rhs.Root.Type() == TokenLit || rhs.Root.Type() == TokenOp || rhs.Root.Type() == TokenSep) {
- return NewParseError("unexpected token type")
- }
-
- key := EqualExprKey(opExpr)
- v, err := newValue(rhs.Root.ValueType, rhs.Root.base, rhs.Root.Raw())
- if err != nil {
- return err
- }
-
- t.values[key] = v
- default:
- return NewParseError(fmt.Sprintf("unsupported expression %v", expr))
- }
- default:
- return NewParseError(fmt.Sprintf("unsupported expression %v", expr))
- }
-
- v.Sections.container[v.scope] = t
- return nil
-}
-
-// VisitStatement visits statements...
-func (v *DefaultVisitor) VisitStatement(stmt AST) error {
- switch stmt.Kind {
- case ASTKindCompletedSectionStatement:
- child := stmt.GetRoot()
- if child.Kind != ASTKindSectionStatement {
- return NewParseError(fmt.Sprintf("unsupported child statement: %T", child))
- }
-
- name := string(child.Root.Raw())
- v.Sections.container[name] = Section{}
- v.scope = name
- default:
- return NewParseError(fmt.Sprintf("unsupported statement: %s", stmt.Kind))
- }
-
- return nil
-}
-
-// Sections is a map of Section structures that represent
-// a configuration.
-type Sections struct {
- container map[string]Section
-}
-
-// GetSection will return section p. If section p does not exist,
-// false will be returned in the second parameter.
-func (t Sections) GetSection(p string) (Section, bool) {
- v, ok := t.container[p]
- return v, ok
-}
-
-// values represents a map of union values.
-type values map[string]Value
-
-// List will return a list of all sections that were successfully
-// parsed.
-func (t Sections) List() []string {
- keys := make([]string, len(t.container))
- i := 0
- for k := range t.container {
- keys[i] = k
- i++
- }
-
- sort.Strings(keys)
- return keys
-}
-
-// Section contains a name and values. This represent
-// a sectioned entry in a configuration file.
-type Section struct {
- Name string
- values values
-}
-
-// Has will return whether or not an entry exists in a given section
-func (t Section) Has(k string) bool {
- _, ok := t.values[k]
- return ok
-}
-
-// ValueType will returned what type the union is set to. If
-// k was not found, the NoneType will be returned.
-func (t Section) ValueType(k string) (ValueType, bool) {
- v, ok := t.values[k]
- return v.Type, ok
-}
-
-// Bool returns a bool value at k
-func (t Section) Bool(k string) bool {
- return t.values[k].BoolValue()
-}
-
-// Int returns an integer value at k
-func (t Section) Int(k string) int64 {
- return t.values[k].IntValue()
-}
-
-// Float64 returns a float value at k
-func (t Section) Float64(k string) float64 {
- return t.values[k].FloatValue()
-}
-
-// String returns the string value at k
-func (t Section) String(k string) string {
- _, ok := t.values[k]
- if !ok {
- return ""
- }
- return t.values[k].StringValue()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go
deleted file mode 100644
index 99915f7f7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/walker.go
+++ /dev/null
@@ -1,25 +0,0 @@
-package ini
-
-// Walk will traverse the AST using the v, the Visitor.
-func Walk(tree []AST, v Visitor) error {
- for _, node := range tree {
- switch node.Kind {
- case ASTKindExpr,
- ASTKindExprStatement:
-
- if err := v.VisitExpr(node); err != nil {
- return err
- }
- case ASTKindStatement,
- ASTKindCompletedSectionStatement,
- ASTKindNestedSectionStatement,
- ASTKindCompletedNestedSectionStatement:
-
- if err := v.VisitStatement(node); err != nil {
- return err
- }
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go
deleted file mode 100644
index 7ffb4ae06..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ws_token.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package ini
-
-import (
- "unicode"
-)
-
-// isWhitespace will return whether or not the character is
-// a whitespace character.
-//
-// Whitespace is defined as a space or tab.
-func isWhitespace(c rune) bool {
- return unicode.IsSpace(c) && c != '\n' && c != '\r'
-}
-
-func newWSToken(b []rune) (Token, int, error) {
- i := 0
- for ; i < len(b); i++ {
- if !isWhitespace(b[i]) {
- break
- }
- }
-
- return newToken(TokenWS, b[:i], NoneType), i, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go
deleted file mode 100644
index 6c443988b..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/byte.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package sdkio
-
-const (
- // Byte is 8 bits
- Byte int64 = 1
- // KibiByte (KiB) is 1024 Bytes
- KibiByte = Byte * 1024
- // MebiByte (MiB) is 1024 KiB
- MebiByte = KibiByte * 1024
- // GibiByte (GiB) is 1024 MiB
- GibiByte = MebiByte * 1024
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go
deleted file mode 100644
index 037a998c4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.6.go
+++ /dev/null
@@ -1,11 +0,0 @@
-//go:build !go1.7
-// +build !go1.7
-
-package sdkio
-
-// Copy of Go 1.7 io package's Seeker constants.
-const (
- SeekStart = 0 // seek relative to the origin of the file
- SeekCurrent = 1 // seek relative to the current offset
- SeekEnd = 2 // seek relative to the end
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go
deleted file mode 100644
index 65e7c60c4..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkio/io_go1.7.go
+++ /dev/null
@@ -1,13 +0,0 @@
-//go:build go1.7
-// +build go1.7
-
-package sdkio
-
-import "io"
-
-// Alias for Go 1.7 io package Seeker constants
-const (
- SeekStart = io.SeekStart // seek relative to the origin of the file
- SeekCurrent = io.SeekCurrent // seek relative to the current offset
- SeekEnd = io.SeekEnd // seek relative to the end
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go
deleted file mode 100644
index a84528783..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor.go
+++ /dev/null
@@ -1,16 +0,0 @@
-//go:build go1.10
-// +build go1.10
-
-package sdkmath
-
-import "math"
-
-// Round returns the nearest integer, rounding half away from zero.
-//
-// Special cases are:
-// Round(±0) = ±0
-// Round(±Inf) = ±Inf
-// Round(NaN) = NaN
-func Round(x float64) float64 {
- return math.Round(x)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go
deleted file mode 100644
index a3ae3e5db..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkmath/floor_go1.9.go
+++ /dev/null
@@ -1,57 +0,0 @@
-//go:build !go1.10
-// +build !go1.10
-
-package sdkmath
-
-import "math"
-
-// Copied from the Go standard library's (Go 1.12) math/floor.go for use in
-// Go version prior to Go 1.10.
-const (
- uvone = 0x3FF0000000000000
- mask = 0x7FF
- shift = 64 - 11 - 1
- bias = 1023
- signMask = 1 << 63
- fracMask = 1<= 0.5 {
- // return t + Copysign(1, x)
- // }
- // return t
- // }
- bits := math.Float64bits(x)
- e := uint(bits>>shift) & mask
- if e < bias {
- // Round abs(x) < 1 including denormals.
- bits &= signMask // +-0
- if e == bias-1 {
- bits |= uvone // +-1
- }
- } else if e < bias+shift {
- // Round any abs(x) >= 1 containing a fractional component [0,1).
- //
- // Numbers with larger exponents are returned unchanged since they
- // must be either an integer, infinity, or NaN.
- const half = 1 << (shift - 1)
- e -= bias
- bits += half >> e
- bits &^= fracMask >> e
- }
- return math.Float64frombits(bits)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go
deleted file mode 100644
index 0c9802d87..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/locked_source.go
+++ /dev/null
@@ -1,29 +0,0 @@
-package sdkrand
-
-import (
- "math/rand"
- "sync"
- "time"
-)
-
-// lockedSource is a thread-safe implementation of rand.Source
-type lockedSource struct {
- lk sync.Mutex
- src rand.Source
-}
-
-func (r *lockedSource) Int63() (n int64) {
- r.lk.Lock()
- n = r.src.Int63()
- r.lk.Unlock()
- return
-}
-
-func (r *lockedSource) Seed(seed int64) {
- r.lk.Lock()
- r.src.Seed(seed)
- r.lk.Unlock()
-}
-
-// SeededRand is a new RNG using a thread safe implementation of rand.Source
-var SeededRand = rand.New(&lockedSource{src: rand.NewSource(time.Now().UnixNano())})
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go
deleted file mode 100644
index 4bae66cee..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read.go
+++ /dev/null
@@ -1,12 +0,0 @@
-//go:build go1.6
-// +build go1.6
-
-package sdkrand
-
-import "math/rand"
-
-// Read provides the stub for math.Rand.Read method support for go version's
-// 1.6 and greater.
-func Read(r *rand.Rand, p []byte) (int, error) {
- return r.Read(p)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go
deleted file mode 100644
index 3a6ab8825..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkrand/read_1_5.go
+++ /dev/null
@@ -1,25 +0,0 @@
-//go:build !go1.6
-// +build !go1.6
-
-package sdkrand
-
-import "math/rand"
-
-// Read backfills Go 1.6's math.Rand.Reader for Go 1.5
-func Read(r *rand.Rand, p []byte) (n int, err error) {
- // Copy of Go standard libraries math package's read function not added to
- // standard library until Go 1.6.
- var pos int8
- var val int64
- for n = 0; n < len(p); n++ {
- if pos == 0 {
- val = r.Int63()
- pos = 7
- }
- p[n] = byte(val)
- val >>= 8
- pos--
- }
-
- return n, err
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go b/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go
deleted file mode 100644
index 38ea61afe..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sdkuri/path.go
+++ /dev/null
@@ -1,23 +0,0 @@
-package sdkuri
-
-import (
- "path"
- "strings"
-)
-
-// PathJoin will join the elements of the path delimited by the "/"
-// character. Similar to path.Join with the exception the trailing "/"
-// character is preserved if present.
-func PathJoin(elems ...string) string {
- if len(elems) == 0 {
- return ""
- }
-
- hasTrailing := strings.HasSuffix(elems[len(elems)-1], "/")
- str := path.Join(elems...)
- if hasTrailing && str != "/" {
- str += "/"
- }
-
- return str
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go
deleted file mode 100644
index 7da8a49ce..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/ecs_container.go
+++ /dev/null
@@ -1,12 +0,0 @@
-package shareddefaults
-
-const (
- // ECSCredsProviderEnvVar is an environmental variable key used to
- // determine which path needs to be hit.
- ECSCredsProviderEnvVar = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
-)
-
-// ECSContainerCredentialsURI is the endpoint to retrieve container
-// credentials. This can be overridden to test to ensure the credential process
-// is behaving correctly.
-var ECSContainerCredentialsURI = "http://169.254.170.2"
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
deleted file mode 100644
index ebcbc2b40..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/shareddefaults/shared_config.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package shareddefaults
-
-import (
- "os"
- "path/filepath"
- "runtime"
-)
-
-// SharedCredentialsFilename returns the SDK's default file path
-// for the shared credentials file.
-//
-// Builds the shared config file path based on the OS's platform.
-//
-// - Linux/Unix: $HOME/.aws/credentials
-// - Windows: %USERPROFILE%\.aws\credentials
-func SharedCredentialsFilename() string {
- return filepath.Join(UserHomeDir(), ".aws", "credentials")
-}
-
-// SharedConfigFilename returns the SDK's default file path for
-// the shared config file.
-//
-// Builds the shared config file path based on the OS's platform.
-//
-// - Linux/Unix: $HOME/.aws/config
-// - Windows: %USERPROFILE%\.aws\config
-func SharedConfigFilename() string {
- return filepath.Join(UserHomeDir(), ".aws", "config")
-}
-
-// UserHomeDir returns the home directory for the user the process is
-// running under.
-func UserHomeDir() string {
- if runtime.GOOS == "windows" { // Windows
- return os.Getenv("USERPROFILE")
- }
-
- // *nix
- return os.Getenv("HOME")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/strings/strings.go b/vendor/github.com/aws/aws-sdk-go/internal/strings/strings.go
deleted file mode 100644
index d008ae27c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/strings/strings.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package strings
-
-import (
- "strings"
-)
-
-// HasPrefixFold tests whether the string s begins with prefix, interpreted as UTF-8 strings,
-// under Unicode case-folding.
-func HasPrefixFold(s, prefix string) bool {
- return len(s) >= len(prefix) && strings.EqualFold(s[0:len(prefix)], prefix)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/singleflight.go
deleted file mode 100644
index 14ad0c589..000000000
--- a/vendor/github.com/aws/aws-sdk-go/internal/sync/singleflight/singleflight.go
+++ /dev/null
@@ -1,120 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package singleflight provides a duplicate function call suppression
-// mechanism.
-package singleflight
-
-import "sync"
-
-// call is an in-flight or completed singleflight.Do call
-type call struct {
- wg sync.WaitGroup
-
- // These fields are written once before the WaitGroup is done
- // and are only read after the WaitGroup is done.
- val interface{}
- err error
-
- // forgotten indicates whether Forget was called with this call's key
- // while the call was still in flight.
- forgotten bool
-
- // These fields are read and written with the singleflight
- // mutex held before the WaitGroup is done, and are read but
- // not written after the WaitGroup is done.
- dups int
- chans []chan<- Result
-}
-
-// Group represents a class of work and forms a namespace in
-// which units of work can be executed with duplicate suppression.
-type Group struct {
- mu sync.Mutex // protects m
- m map[string]*call // lazily initialized
-}
-
-// Result holds the results of Do, so they can be passed
-// on a channel.
-type Result struct {
- Val interface{}
- Err error
- Shared bool
-}
-
-// Do executes and returns the results of the given function, making
-// sure that only one execution is in-flight for a given key at a
-// time. If a duplicate comes in, the duplicate caller waits for the
-// original to complete and receives the same results.
-// The return value shared indicates whether v was given to multiple callers.
-func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) {
- g.mu.Lock()
- if g.m == nil {
- g.m = make(map[string]*call)
- }
- if c, ok := g.m[key]; ok {
- c.dups++
- g.mu.Unlock()
- c.wg.Wait()
- return c.val, c.err, true
- }
- c := new(call)
- c.wg.Add(1)
- g.m[key] = c
- g.mu.Unlock()
-
- g.doCall(c, key, fn)
- return c.val, c.err, c.dups > 0
-}
-
-// DoChan is like Do but returns a channel that will receive the
-// results when they are ready.
-func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result {
- ch := make(chan Result, 1)
- g.mu.Lock()
- if g.m == nil {
- g.m = make(map[string]*call)
- }
- if c, ok := g.m[key]; ok {
- c.dups++
- c.chans = append(c.chans, ch)
- g.mu.Unlock()
- return ch
- }
- c := &call{chans: []chan<- Result{ch}}
- c.wg.Add(1)
- g.m[key] = c
- g.mu.Unlock()
-
- go g.doCall(c, key, fn)
-
- return ch
-}
-
-// doCall handles the single call for a key.
-func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) {
- c.val, c.err = fn()
- c.wg.Done()
-
- g.mu.Lock()
- if !c.forgotten {
- delete(g.m, key)
- }
- for _, ch := range c.chans {
- ch <- Result{c.val, c.err, c.dups > 0}
- }
- g.mu.Unlock()
-}
-
-// Forget tells the singleflight to forget about a key. Future calls
-// to Do for this key will call the function rather than waiting for
-// an earlier call to complete.
-func (g *Group) Forget(key string) {
- g.mu.Lock()
- if c, ok := g.m[key]; ok {
- c.forgotten = true
- }
- delete(g.m, key)
- g.mu.Unlock()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go
deleted file mode 100644
index 1f1d27aea..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go
+++ /dev/null
@@ -1,104 +0,0 @@
-package protocol
-
-import (
- "github.com/aws/aws-sdk-go/aws/request"
- "net"
- "strconv"
- "strings"
-)
-
-// ValidateEndpointHostHandler is a request handler that will validate the
-// request endpoint's hosts is a valid RFC 3986 host.
-var ValidateEndpointHostHandler = request.NamedHandler{
- Name: "awssdk.protocol.ValidateEndpointHostHandler",
- Fn: func(r *request.Request) {
- err := ValidateEndpointHost(r.Operation.Name, r.HTTPRequest.URL.Host)
- if err != nil {
- r.Error = err
- }
- },
-}
-
-// ValidateEndpointHost validates that the host string passed in is a valid RFC
-// 3986 host. Returns error if the host is not valid.
-func ValidateEndpointHost(opName, host string) error {
- paramErrs := request.ErrInvalidParams{Context: opName}
-
- var hostname string
- var port string
- var err error
-
- if strings.Contains(host, ":") {
- hostname, port, err = net.SplitHostPort(host)
-
- if err != nil {
- paramErrs.Add(request.NewErrParamFormat("endpoint", err.Error(), host))
- }
-
- if !ValidPortNumber(port) {
- paramErrs.Add(request.NewErrParamFormat("endpoint port number", "[0-65535]", port))
- }
- } else {
- hostname = host
- }
-
- labels := strings.Split(hostname, ".")
- for i, label := range labels {
- if i == len(labels)-1 && len(label) == 0 {
- // Allow trailing dot for FQDN hosts.
- continue
- }
-
- if !ValidHostLabel(label) {
- paramErrs.Add(request.NewErrParamFormat(
- "endpoint host label", "[a-zA-Z0-9-]{1,63}", label))
- }
- }
-
- if len(hostname) == 0 {
- paramErrs.Add(request.NewErrParamMinLen("endpoint host", 1))
- }
-
- if len(hostname) > 255 {
- paramErrs.Add(request.NewErrParamMaxLen(
- "endpoint host", 255, host,
- ))
- }
-
- if paramErrs.Len() > 0 {
- return paramErrs
- }
- return nil
-}
-
-// ValidHostLabel returns if the label is a valid RFC 3986 host label.
-func ValidHostLabel(label string) bool {
- if l := len(label); l == 0 || l > 63 {
- return false
- }
- for _, r := range label {
- switch {
- case r >= '0' && r <= '9':
- case r >= 'A' && r <= 'Z':
- case r >= 'a' && r <= 'z':
- case r == '-':
- default:
- return false
- }
- }
-
- return true
-}
-
-// ValidPortNumber return if the port is valid RFC 3986 port
-func ValidPortNumber(port string) bool {
- i, err := strconv.Atoi(port)
- if err != nil {
- return false
- }
-
- if i < 0 || i > 65535 {
- return false
- }
- return true
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go
deleted file mode 100644
index 915b0fcaf..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/host_prefix.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package protocol
-
-import (
- "strings"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// HostPrefixHandlerName is the handler name for the host prefix request
-// handler.
-const HostPrefixHandlerName = "awssdk.endpoint.HostPrefixHandler"
-
-// NewHostPrefixHandler constructs a build handler
-func NewHostPrefixHandler(prefix string, labelsFn func() map[string]string) request.NamedHandler {
- builder := HostPrefixBuilder{
- Prefix: prefix,
- LabelsFn: labelsFn,
- }
-
- return request.NamedHandler{
- Name: HostPrefixHandlerName,
- Fn: builder.Build,
- }
-}
-
-// HostPrefixBuilder provides the request handler to expand and prepend
-// the host prefix into the operation's request endpoint host.
-type HostPrefixBuilder struct {
- Prefix string
- LabelsFn func() map[string]string
-}
-
-// Build updates the passed in Request with the HostPrefix template expanded.
-func (h HostPrefixBuilder) Build(r *request.Request) {
- if aws.BoolValue(r.Config.DisableEndpointHostPrefix) {
- return
- }
-
- var labels map[string]string
- if h.LabelsFn != nil {
- labels = h.LabelsFn()
- }
-
- prefix := h.Prefix
- for name, value := range labels {
- prefix = strings.Replace(prefix, "{"+name+"}", value, -1)
- }
-
- r.HTTPRequest.URL.Host = prefix + r.HTTPRequest.URL.Host
- if len(r.HTTPRequest.Host) > 0 {
- r.HTTPRequest.Host = prefix + r.HTTPRequest.Host
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/idempotency.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/idempotency.go
deleted file mode 100644
index 53831dff9..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/idempotency.go
+++ /dev/null
@@ -1,75 +0,0 @@
-package protocol
-
-import (
- "crypto/rand"
- "fmt"
- "reflect"
-)
-
-// RandReader is the random reader the protocol package will use to read
-// random bytes from. This is exported for testing, and should not be used.
-var RandReader = rand.Reader
-
-const idempotencyTokenFillTag = `idempotencyToken`
-
-// CanSetIdempotencyToken returns true if the struct field should be
-// automatically populated with a Idempotency token.
-//
-// Only *string and string type fields that are tagged with idempotencyToken
-// which are not already set can be auto filled.
-func CanSetIdempotencyToken(v reflect.Value, f reflect.StructField) bool {
- switch u := v.Interface().(type) {
- // To auto fill an Idempotency token the field must be a string,
- // tagged for auto fill, and have a zero value.
- case *string:
- return u == nil && len(f.Tag.Get(idempotencyTokenFillTag)) != 0
- case string:
- return len(u) == 0 && len(f.Tag.Get(idempotencyTokenFillTag)) != 0
- }
-
- return false
-}
-
-// GetIdempotencyToken returns a randomly generated idempotency token.
-func GetIdempotencyToken() string {
- b := make([]byte, 16)
- RandReader.Read(b)
-
- return UUIDVersion4(b)
-}
-
-// SetIdempotencyToken will set the value provided with a Idempotency Token.
-// Given that the value can be set. Will panic if value is not setable.
-func SetIdempotencyToken(v reflect.Value) {
- if v.Kind() == reflect.Ptr {
- if v.IsNil() && v.CanSet() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- v = v.Elem()
- }
- v = reflect.Indirect(v)
-
- if !v.CanSet() {
- panic(fmt.Sprintf("unable to set idempotnecy token %v", v))
- }
-
- b := make([]byte, 16)
- _, err := rand.Read(b)
- if err != nil {
- // TODO handle error
- return
- }
-
- v.Set(reflect.ValueOf(UUIDVersion4(b)))
-}
-
-// UUIDVersion4 returns a Version 4 random UUID from the byte slice provided
-func UUIDVersion4(u []byte) string {
- // https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29
- // 13th character is "4"
- u[6] = (u[6] | 0x40) & 0x4F
- // 17th character is "8", "9", "a", or "b"
- u[8] = (u[8] | 0x80) & 0xBF
-
- return fmt.Sprintf(`%X-%X-%X-%X-%X`, u[0:4], u[4:6], u[6:8], u[8:10], u[10:])
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go
deleted file mode 100644
index 2aec80661..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/build.go
+++ /dev/null
@@ -1,298 +0,0 @@
-// Package jsonutil provides JSON serialization of AWS requests and responses.
-package jsonutil
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/json"
- "fmt"
- "math"
- "reflect"
- "sort"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-var timeType = reflect.ValueOf(time.Time{}).Type()
-var byteSliceType = reflect.ValueOf([]byte{}).Type()
-
-// BuildJSON builds a JSON string for a given object v.
-func BuildJSON(v interface{}) ([]byte, error) {
- var buf bytes.Buffer
-
- err := buildAny(reflect.ValueOf(v), &buf, "")
- return buf.Bytes(), err
-}
-
-func buildAny(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- origVal := value
- value = reflect.Indirect(value)
- if !value.IsValid() {
- return nil
- }
-
- vtype := value.Type()
-
- t := tag.Get("type")
- if t == "" {
- switch vtype.Kind() {
- case reflect.Struct:
- // also it can't be a time object
- if value.Type() != timeType {
- t = "structure"
- }
- case reflect.Slice:
- // also it can't be a byte slice
- if _, ok := value.Interface().([]byte); !ok {
- t = "list"
- }
- case reflect.Map:
- // cannot be a JSONValue map
- if _, ok := value.Interface().(aws.JSONValue); !ok {
- t = "map"
- }
- }
- }
-
- switch t {
- case "structure":
- if field, ok := vtype.FieldByName("_"); ok {
- tag = field.Tag
- }
- return buildStruct(value, buf, tag)
- case "list":
- return buildList(value, buf, tag)
- case "map":
- return buildMap(value, buf, tag)
- default:
- return buildScalar(origVal, buf, tag)
- }
-}
-
-func buildStruct(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- if !value.IsValid() {
- return nil
- }
-
- // unwrap payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := value.Type().FieldByName(payload)
- tag = field.Tag
- value = elemOf(value.FieldByName(payload))
- if !value.IsValid() && tag.Get("type") != "structure" {
- return nil
- }
- }
-
- buf.WriteByte('{')
- defer buf.WriteString("}")
-
- if !value.IsValid() {
- return nil
- }
-
- t := value.Type()
- first := true
- for i := 0; i < t.NumField(); i++ {
- member := value.Field(i)
-
- // This allocates the most memory.
- // Additionally, we cannot skip nil fields due to
- // idempotency auto filling.
- field := t.Field(i)
-
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
- if field.Tag.Get("json") == "-" {
- continue
- }
- if field.Tag.Get("location") != "" {
- continue // ignore non-body elements
- }
- if field.Tag.Get("ignore") != "" {
- continue
- }
-
- if protocol.CanSetIdempotencyToken(member, field) {
- token := protocol.GetIdempotencyToken()
- member = reflect.ValueOf(&token)
- }
-
- if (member.Kind() == reflect.Ptr || member.Kind() == reflect.Slice || member.Kind() == reflect.Map) && member.IsNil() {
- continue // ignore unset fields
- }
-
- if first {
- first = false
- } else {
- buf.WriteByte(',')
- }
-
- // figure out what this field is called
- name := field.Name
- if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
-
- writeString(name, buf)
- buf.WriteString(`:`)
-
- err := buildAny(member, buf, field.Tag)
- if err != nil {
- return err
- }
-
- }
-
- return nil
-}
-
-func buildList(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- buf.WriteString("[")
-
- for i := 0; i < value.Len(); i++ {
- buildAny(value.Index(i), buf, "")
-
- if i < value.Len()-1 {
- buf.WriteString(",")
- }
- }
-
- buf.WriteString("]")
-
- return nil
-}
-
-type sortedValues []reflect.Value
-
-func (sv sortedValues) Len() int { return len(sv) }
-func (sv sortedValues) Swap(i, j int) { sv[i], sv[j] = sv[j], sv[i] }
-func (sv sortedValues) Less(i, j int) bool { return sv[i].String() < sv[j].String() }
-
-func buildMap(value reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- buf.WriteString("{")
-
- sv := sortedValues(value.MapKeys())
- sort.Sort(sv)
-
- for i, k := range sv {
- if i > 0 {
- buf.WriteByte(',')
- }
-
- writeString(k.String(), buf)
- buf.WriteString(`:`)
-
- buildAny(value.MapIndex(k), buf, "")
- }
-
- buf.WriteString("}")
-
- return nil
-}
-
-func buildScalar(v reflect.Value, buf *bytes.Buffer, tag reflect.StructTag) error {
- // prevents allocation on the heap.
- scratch := [64]byte{}
- switch value := reflect.Indirect(v); value.Kind() {
- case reflect.String:
- writeString(value.String(), buf)
- case reflect.Bool:
- if value.Bool() {
- buf.WriteString("true")
- } else {
- buf.WriteString("false")
- }
- case reflect.Int64:
- buf.Write(strconv.AppendInt(scratch[:0], value.Int(), 10))
- case reflect.Float64:
- f := value.Float()
- if math.IsInf(f, 0) || math.IsNaN(f) {
- return &json.UnsupportedValueError{Value: v, Str: strconv.FormatFloat(f, 'f', -1, 64)}
- }
- buf.Write(strconv.AppendFloat(scratch[:0], f, 'f', -1, 64))
- default:
- switch converted := value.Interface().(type) {
- case time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.UnixTimeFormatName
- }
-
- ts := protocol.FormatTime(format, converted)
- if format != protocol.UnixTimeFormatName {
- ts = `"` + ts + `"`
- }
-
- buf.WriteString(ts)
- case []byte:
- if !value.IsNil() {
- buf.WriteByte('"')
- if len(converted) < 1024 {
- // for small buffers, using Encode directly is much faster.
- dst := make([]byte, base64.StdEncoding.EncodedLen(len(converted)))
- base64.StdEncoding.Encode(dst, converted)
- buf.Write(dst)
- } else {
- // for large buffers, avoid unnecessary extra temporary
- // buffer space.
- enc := base64.NewEncoder(base64.StdEncoding, buf)
- enc.Write(converted)
- enc.Close()
- }
- buf.WriteByte('"')
- }
- case aws.JSONValue:
- str, err := protocol.EncodeJSONValue(converted, protocol.QuotedEscape)
- if err != nil {
- return fmt.Errorf("unable to encode JSONValue, %v", err)
- }
- buf.WriteString(str)
- default:
- return fmt.Errorf("unsupported JSON value %v (%s)", value.Interface(), value.Type())
- }
- }
- return nil
-}
-
-var hex = "0123456789abcdef"
-
-func writeString(s string, buf *bytes.Buffer) {
- buf.WriteByte('"')
- for i := 0; i < len(s); i++ {
- if s[i] == '"' {
- buf.WriteString(`\"`)
- } else if s[i] == '\\' {
- buf.WriteString(`\\`)
- } else if s[i] == '\b' {
- buf.WriteString(`\b`)
- } else if s[i] == '\f' {
- buf.WriteString(`\f`)
- } else if s[i] == '\r' {
- buf.WriteString(`\r`)
- } else if s[i] == '\t' {
- buf.WriteString(`\t`)
- } else if s[i] == '\n' {
- buf.WriteString(`\n`)
- } else if s[i] < 32 {
- buf.WriteString("\\u00")
- buf.WriteByte(hex[s[i]>>4])
- buf.WriteByte(hex[s[i]&0xF])
- } else {
- buf.WriteByte(s[i])
- }
- }
- buf.WriteByte('"')
-}
-
-// Returns the reflection element of a value, if it is a pointer.
-func elemOf(value reflect.Value) reflect.Value {
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- return value
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go
deleted file mode 100644
index 8b2c9bbeb..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/json/jsonutil/unmarshal.go
+++ /dev/null
@@ -1,304 +0,0 @@
-package jsonutil
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/json"
- "fmt"
- "io"
- "math/big"
- "reflect"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-var millisecondsFloat = new(big.Float).SetInt64(1e3)
-
-// UnmarshalJSONError unmarshal's the reader's JSON document into the passed in
-// type. The value to unmarshal the json document into must be a pointer to the
-// type.
-func UnmarshalJSONError(v interface{}, stream io.Reader) error {
- var errBuf bytes.Buffer
- body := io.TeeReader(stream, &errBuf)
-
- err := json.NewDecoder(body).Decode(v)
- if err != nil {
- msg := "failed decoding error message"
- if err == io.EOF {
- msg = "error message missing"
- err = nil
- }
- return awserr.NewUnmarshalError(err, msg, errBuf.Bytes())
- }
-
- return nil
-}
-
-// UnmarshalJSON reads a stream and unmarshals the results in object v.
-func UnmarshalJSON(v interface{}, stream io.Reader) error {
- var out interface{}
-
- decoder := json.NewDecoder(stream)
- decoder.UseNumber()
- err := decoder.Decode(&out)
- if err == io.EOF {
- return nil
- } else if err != nil {
- return err
- }
-
- return unmarshaler{}.unmarshalAny(reflect.ValueOf(v), out, "")
-}
-
-// UnmarshalJSONCaseInsensitive reads a stream and unmarshals the result into the
-// object v. Ignores casing for structure members.
-func UnmarshalJSONCaseInsensitive(v interface{}, stream io.Reader) error {
- var out interface{}
-
- decoder := json.NewDecoder(stream)
- decoder.UseNumber()
- err := decoder.Decode(&out)
- if err == io.EOF {
- return nil
- } else if err != nil {
- return err
- }
-
- return unmarshaler{
- caseInsensitive: true,
- }.unmarshalAny(reflect.ValueOf(v), out, "")
-}
-
-type unmarshaler struct {
- caseInsensitive bool
-}
-
-func (u unmarshaler) unmarshalAny(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- vtype := value.Type()
- if vtype.Kind() == reflect.Ptr {
- vtype = vtype.Elem() // check kind of actual element type
- }
-
- t := tag.Get("type")
- if t == "" {
- switch vtype.Kind() {
- case reflect.Struct:
- // also it can't be a time object
- if _, ok := value.Interface().(*time.Time); !ok {
- t = "structure"
- }
- case reflect.Slice:
- // also it can't be a byte slice
- if _, ok := value.Interface().([]byte); !ok {
- t = "list"
- }
- case reflect.Map:
- // cannot be a JSONValue map
- if _, ok := value.Interface().(aws.JSONValue); !ok {
- t = "map"
- }
- }
- }
-
- switch t {
- case "structure":
- if field, ok := vtype.FieldByName("_"); ok {
- tag = field.Tag
- }
- return u.unmarshalStruct(value, data, tag)
- case "list":
- return u.unmarshalList(value, data, tag)
- case "map":
- return u.unmarshalMap(value, data, tag)
- default:
- return u.unmarshalScalar(value, data, tag)
- }
-}
-
-func (u unmarshaler) unmarshalStruct(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- if data == nil {
- return nil
- }
- mapData, ok := data.(map[string]interface{})
- if !ok {
- return fmt.Errorf("JSON value is not a structure (%#v)", data)
- }
-
- t := value.Type()
- if value.Kind() == reflect.Ptr {
- if value.IsNil() { // create the structure if it's nil
- s := reflect.New(value.Type().Elem())
- value.Set(s)
- value = s
- }
-
- value = value.Elem()
- t = t.Elem()
- }
-
- // unwrap any payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := t.FieldByName(payload)
- return u.unmarshalAny(value.FieldByName(payload), data, field.Tag)
- }
-
- for i := 0; i < t.NumField(); i++ {
- field := t.Field(i)
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
-
- // figure out what this field is called
- name := field.Name
- if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
- if u.caseInsensitive {
- if _, ok := mapData[name]; !ok {
- // Fallback to uncased name search if the exact name didn't match.
- for kn, v := range mapData {
- if strings.EqualFold(kn, name) {
- mapData[name] = v
- }
- }
- }
- }
-
- member := value.FieldByIndex(field.Index)
- err := u.unmarshalAny(member, mapData[name], field.Tag)
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-func (u unmarshaler) unmarshalList(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- if data == nil {
- return nil
- }
- listData, ok := data.([]interface{})
- if !ok {
- return fmt.Errorf("JSON value is not a list (%#v)", data)
- }
-
- if value.IsNil() {
- l := len(listData)
- value.Set(reflect.MakeSlice(value.Type(), l, l))
- }
-
- for i, c := range listData {
- err := u.unmarshalAny(value.Index(i), c, "")
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (u unmarshaler) unmarshalMap(value reflect.Value, data interface{}, tag reflect.StructTag) error {
- if data == nil {
- return nil
- }
- mapData, ok := data.(map[string]interface{})
- if !ok {
- return fmt.Errorf("JSON value is not a map (%#v)", data)
- }
-
- if value.IsNil() {
- value.Set(reflect.MakeMap(value.Type()))
- }
-
- for k, v := range mapData {
- kvalue := reflect.ValueOf(k)
- vvalue := reflect.New(value.Type().Elem()).Elem()
-
- u.unmarshalAny(vvalue, v, "")
- value.SetMapIndex(kvalue, vvalue)
- }
-
- return nil
-}
-
-func (u unmarshaler) unmarshalScalar(value reflect.Value, data interface{}, tag reflect.StructTag) error {
-
- switch d := data.(type) {
- case nil:
- return nil // nothing to do here
- case string:
- switch value.Interface().(type) {
- case *string:
- value.Set(reflect.ValueOf(&d))
- case []byte:
- b, err := base64.StdEncoding.DecodeString(d)
- if err != nil {
- return err
- }
- value.Set(reflect.ValueOf(b))
- case *time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.ISO8601TimeFormatName
- }
-
- t, err := protocol.ParseTime(format, d)
- if err != nil {
- return err
- }
- value.Set(reflect.ValueOf(&t))
- case aws.JSONValue:
- // No need to use escaping as the value is a non-quoted string.
- v, err := protocol.DecodeJSONValue(d, protocol.NoEscape)
- if err != nil {
- return err
- }
- value.Set(reflect.ValueOf(v))
- default:
- return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type())
- }
- case json.Number:
- switch value.Interface().(type) {
- case *int64:
- // Retain the old behavior where we would just truncate the float64
- // calling d.Int64() here could cause an invalid syntax error due to the usage of strconv.ParseInt
- f, err := d.Float64()
- if err != nil {
- return err
- }
- di := int64(f)
- value.Set(reflect.ValueOf(&di))
- case *float64:
- f, err := d.Float64()
- if err != nil {
- return err
- }
- value.Set(reflect.ValueOf(&f))
- case *time.Time:
- float, ok := new(big.Float).SetString(d.String())
- if !ok {
- return fmt.Errorf("unsupported float time representation: %v", d.String())
- }
- float = float.Mul(float, millisecondsFloat)
- ms, _ := float.Int64()
- t := time.Unix(0, ms*1e6).UTC()
- value.Set(reflect.ValueOf(&t))
- default:
- return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type())
- }
- case bool:
- switch value.Interface().(type) {
- case *bool:
- value.Set(reflect.ValueOf(&d))
- default:
- return fmt.Errorf("unsupported value: %v (%s)", value.Interface(), value.Type())
- }
- default:
- return fmt.Errorf("unsupported JSON value (%v)", data)
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
deleted file mode 100644
index d9aa27114..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/jsonrpc.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Package jsonrpc provides JSON RPC utilities for serialization of AWS
-// requests and responses.
-package jsonrpc
-
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/json.json build_test.go
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/json.json unmarshal_test.go
-
-import (
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-var emptyJSON = []byte("{}")
-
-// BuildHandler is a named request handler for building jsonrpc protocol
-// requests
-var BuildHandler = request.NamedHandler{
- Name: "awssdk.jsonrpc.Build",
- Fn: Build,
-}
-
-// UnmarshalHandler is a named request handler for unmarshaling jsonrpc
-// protocol requests
-var UnmarshalHandler = request.NamedHandler{
- Name: "awssdk.jsonrpc.Unmarshal",
- Fn: Unmarshal,
-}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling jsonrpc
-// protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{
- Name: "awssdk.jsonrpc.UnmarshalMeta",
- Fn: UnmarshalMeta,
-}
-
-// Build builds a JSON payload for a JSON RPC request.
-func Build(req *request.Request) {
- var buf []byte
- var err error
- if req.ParamsFilled() {
- buf, err = jsonutil.BuildJSON(req.Params)
- if err != nil {
- req.Error = awserr.New(request.ErrCodeSerialization, "failed encoding JSON RPC request", err)
- return
- }
- } else {
- buf = emptyJSON
- }
-
- // Always serialize the body, don't suppress it.
- req.SetBufferBody(buf)
-
- if req.ClientInfo.TargetPrefix != "" {
- target := req.ClientInfo.TargetPrefix + "." + req.Operation.Name
- req.HTTPRequest.Header.Add("X-Amz-Target", target)
- }
-
- // Only set the content type if one is not already specified and an
- // JSONVersion is specified.
- if ct, v := req.HTTPRequest.Header.Get("Content-Type"), req.ClientInfo.JSONVersion; len(ct) == 0 && len(v) != 0 {
- jsonVersion := req.ClientInfo.JSONVersion
- req.HTTPRequest.Header.Set("Content-Type", "application/x-amz-json-"+jsonVersion)
- }
-}
-
-// Unmarshal unmarshals a response for a JSON RPC service.
-func Unmarshal(req *request.Request) {
- defer req.HTTPResponse.Body.Close()
- if req.DataFilled() {
- err := jsonutil.UnmarshalJSON(req.Data, req.HTTPResponse.Body)
- if err != nil {
- req.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization, "failed decoding JSON RPC response", err),
- req.HTTPResponse.StatusCode,
- req.RequestID,
- )
- }
- }
- return
-}
-
-// UnmarshalMeta unmarshals headers from a response for a JSON RPC service.
-func UnmarshalMeta(req *request.Request) {
- rest.UnmarshalMeta(req)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_error.go
deleted file mode 100644
index c0c52e2db..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonrpc/unmarshal_error.go
+++ /dev/null
@@ -1,107 +0,0 @@
-package jsonrpc
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "net/http"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
-)
-
-// UnmarshalTypedError provides unmarshaling errors API response errors
-// for both typed and untyped errors.
-type UnmarshalTypedError struct {
- exceptions map[string]func(protocol.ResponseMetadata) error
-}
-
-// NewUnmarshalTypedError returns an UnmarshalTypedError initialized for the
-// set of exception names to the error unmarshalers
-func NewUnmarshalTypedError(exceptions map[string]func(protocol.ResponseMetadata) error) *UnmarshalTypedError {
- return &UnmarshalTypedError{
- exceptions: exceptions,
- }
-}
-
-// UnmarshalError attempts to unmarshal the HTTP response error as a known
-// error type. If unable to unmarshal the error type, the generic SDK error
-// type will be used.
-func (u *UnmarshalTypedError) UnmarshalError(
- resp *http.Response,
- respMeta protocol.ResponseMetadata,
-) (error, error) {
-
- var buf bytes.Buffer
- var jsonErr jsonErrorResponse
- teeReader := io.TeeReader(resp.Body, &buf)
- err := jsonutil.UnmarshalJSONError(&jsonErr, teeReader)
- if err != nil {
- return nil, err
- }
- body := ioutil.NopCloser(&buf)
-
- // Code may be separated by hash(#), with the last element being the code
- // used by the SDK.
- codeParts := strings.SplitN(jsonErr.Code, "#", 2)
- code := codeParts[len(codeParts)-1]
- msg := jsonErr.Message
-
- if fn, ok := u.exceptions[code]; ok {
- // If exception code is know, use associated constructor to get a value
- // for the exception that the JSON body can be unmarshaled into.
- v := fn(respMeta)
- err := jsonutil.UnmarshalJSONCaseInsensitive(v, body)
- if err != nil {
- return nil, err
- }
-
- return v, nil
- }
-
- // fallback to unmodeled generic exceptions
- return awserr.NewRequestFailure(
- awserr.New(code, msg, nil),
- respMeta.StatusCode,
- respMeta.RequestID,
- ), nil
-}
-
-// UnmarshalErrorHandler is a named request handler for unmarshaling jsonrpc
-// protocol request errors
-var UnmarshalErrorHandler = request.NamedHandler{
- Name: "awssdk.jsonrpc.UnmarshalError",
- Fn: UnmarshalError,
-}
-
-// UnmarshalError unmarshals an error response for a JSON RPC service.
-func UnmarshalError(req *request.Request) {
- defer req.HTTPResponse.Body.Close()
-
- var jsonErr jsonErrorResponse
- err := jsonutil.UnmarshalJSONError(&jsonErr, req.HTTPResponse.Body)
- if err != nil {
- req.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to unmarshal error message", err),
- req.HTTPResponse.StatusCode,
- req.RequestID,
- )
- return
- }
-
- codes := strings.SplitN(jsonErr.Code, "#", 2)
- req.Error = awserr.NewRequestFailure(
- awserr.New(codes[len(codes)-1], jsonErr.Message, nil),
- req.HTTPResponse.StatusCode,
- req.RequestID,
- )
-}
-
-type jsonErrorResponse struct {
- Code string `json:"__type"`
- Message string `json:"message"`
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go
deleted file mode 100644
index 776d11018..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/jsonvalue.go
+++ /dev/null
@@ -1,76 +0,0 @@
-package protocol
-
-import (
- "encoding/base64"
- "encoding/json"
- "fmt"
- "strconv"
-
- "github.com/aws/aws-sdk-go/aws"
-)
-
-// EscapeMode is the mode that should be use for escaping a value
-type EscapeMode uint
-
-// The modes for escaping a value before it is marshaled, and unmarshaled.
-const (
- NoEscape EscapeMode = iota
- Base64Escape
- QuotedEscape
-)
-
-// EncodeJSONValue marshals the value into a JSON string, and optionally base64
-// encodes the string before returning it.
-//
-// Will panic if the escape mode is unknown.
-func EncodeJSONValue(v aws.JSONValue, escape EscapeMode) (string, error) {
- b, err := json.Marshal(v)
- if err != nil {
- return "", err
- }
-
- switch escape {
- case NoEscape:
- return string(b), nil
- case Base64Escape:
- return base64.StdEncoding.EncodeToString(b), nil
- case QuotedEscape:
- return strconv.Quote(string(b)), nil
- }
-
- panic(fmt.Sprintf("EncodeJSONValue called with unknown EscapeMode, %v", escape))
-}
-
-// DecodeJSONValue will attempt to decode the string input as a JSONValue.
-// Optionally decoding base64 the value first before JSON unmarshaling.
-//
-// Will panic if the escape mode is unknown.
-func DecodeJSONValue(v string, escape EscapeMode) (aws.JSONValue, error) {
- var b []byte
- var err error
-
- switch escape {
- case NoEscape:
- b = []byte(v)
- case Base64Escape:
- b, err = base64.StdEncoding.DecodeString(v)
- case QuotedEscape:
- var u string
- u, err = strconv.Unquote(v)
- b = []byte(u)
- default:
- panic(fmt.Sprintf("DecodeJSONValue called with unknown EscapeMode, %v", escape))
- }
-
- if err != nil {
- return nil, err
- }
-
- m := aws.JSONValue{}
- err = json.Unmarshal(b, &m)
- if err != nil {
- return nil, err
- }
-
- return m, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go
deleted file mode 100644
index 0ea0647a5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/payload.go
+++ /dev/null
@@ -1,81 +0,0 @@
-package protocol
-
-import (
- "io"
- "io/ioutil"
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// PayloadUnmarshaler provides the interface for unmarshaling a payload's
-// reader into a SDK shape.
-type PayloadUnmarshaler interface {
- UnmarshalPayload(io.Reader, interface{}) error
-}
-
-// HandlerPayloadUnmarshal implements the PayloadUnmarshaler from a
-// HandlerList. This provides the support for unmarshaling a payload reader to
-// a shape without needing a SDK request first.
-type HandlerPayloadUnmarshal struct {
- Unmarshalers request.HandlerList
-}
-
-// UnmarshalPayload unmarshals the io.Reader payload into the SDK shape using
-// the Unmarshalers HandlerList provided. Returns an error if unable
-// unmarshaling fails.
-func (h HandlerPayloadUnmarshal) UnmarshalPayload(r io.Reader, v interface{}) error {
- req := &request.Request{
- HTTPRequest: &http.Request{},
- HTTPResponse: &http.Response{
- StatusCode: 200,
- Header: http.Header{},
- Body: ioutil.NopCloser(r),
- },
- Data: v,
- }
-
- h.Unmarshalers.Run(req)
-
- return req.Error
-}
-
-// PayloadMarshaler provides the interface for marshaling a SDK shape into and
-// io.Writer.
-type PayloadMarshaler interface {
- MarshalPayload(io.Writer, interface{}) error
-}
-
-// HandlerPayloadMarshal implements the PayloadMarshaler from a HandlerList.
-// This provides support for marshaling a SDK shape into an io.Writer without
-// needing a SDK request first.
-type HandlerPayloadMarshal struct {
- Marshalers request.HandlerList
-}
-
-// MarshalPayload marshals the SDK shape into the io.Writer using the
-// Marshalers HandlerList provided. Returns an error if unable if marshal
-// fails.
-func (h HandlerPayloadMarshal) MarshalPayload(w io.Writer, v interface{}) error {
- req := request.New(
- aws.Config{},
- metadata.ClientInfo{},
- request.Handlers{},
- nil,
- &request.Operation{HTTPMethod: "PUT"},
- v,
- nil,
- )
-
- h.Marshalers.Run(req)
-
- if req.Error != nil {
- return req.Error
- }
-
- io.Copy(w, req.GetBody())
-
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/protocol.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/protocol.go
deleted file mode 100644
index 9d521dcb9..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/protocol.go
+++ /dev/null
@@ -1,49 +0,0 @@
-package protocol
-
-import (
- "fmt"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// RequireHTTPMinProtocol request handler is used to enforce that
-// the target endpoint supports the given major and minor HTTP protocol version.
-type RequireHTTPMinProtocol struct {
- Major, Minor int
-}
-
-// Handler will mark the request.Request with an error if the
-// target endpoint did not connect with the required HTTP protocol
-// major and minor version.
-func (p RequireHTTPMinProtocol) Handler(r *request.Request) {
- if r.Error != nil || r.HTTPResponse == nil {
- return
- }
-
- if !strings.HasPrefix(r.HTTPResponse.Proto, "HTTP") {
- r.Error = newMinHTTPProtoError(p.Major, p.Minor, r)
- }
-
- if r.HTTPResponse.ProtoMajor < p.Major || r.HTTPResponse.ProtoMinor < p.Minor {
- r.Error = newMinHTTPProtoError(p.Major, p.Minor, r)
- }
-}
-
-// ErrCodeMinimumHTTPProtocolError error code is returned when the target endpoint
-// did not match the required HTTP major and minor protocol version.
-const ErrCodeMinimumHTTPProtocolError = "MinimumHTTPProtocolError"
-
-func newMinHTTPProtoError(major, minor int, r *request.Request) error {
- return awserr.NewRequestFailure(
- awserr.New("MinimumHTTPProtocolError",
- fmt.Sprintf(
- "operation requires minimum HTTP protocol of HTTP/%d.%d, but was %s",
- major, minor, r.HTTPResponse.Proto,
- ),
- nil,
- ),
- r.HTTPResponse.StatusCode, r.RequestID,
- )
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go
deleted file mode 100644
index d40346a77..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/build.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Package query provides serialization of AWS query requests, and responses.
-package query
-
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/query.json build_test.go
-
-import (
- "net/url"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/query/queryutil"
-)
-
-// BuildHandler is a named request handler for building query protocol requests
-var BuildHandler = request.NamedHandler{Name: "awssdk.query.Build", Fn: Build}
-
-// Build builds a request for an AWS Query service.
-func Build(r *request.Request) {
- body := url.Values{
- "Action": {r.Operation.Name},
- "Version": {r.ClientInfo.APIVersion},
- }
- if err := queryutil.Parse(body, r.Params, false); err != nil {
- r.Error = awserr.New(request.ErrCodeSerialization, "failed encoding Query request", err)
- return
- }
-
- if !r.IsPresigned() {
- r.HTTPRequest.Method = "POST"
- r.HTTPRequest.Header.Set("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")
- r.SetBufferBody([]byte(body.Encode()))
- } else { // This is a pre-signed request
- r.HTTPRequest.Method = "GET"
- r.HTTPRequest.URL.RawQuery = body.Encode()
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
deleted file mode 100644
index 75866d012..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/queryutil/queryutil.go
+++ /dev/null
@@ -1,246 +0,0 @@
-package queryutil
-
-import (
- "encoding/base64"
- "fmt"
- "net/url"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-// Parse parses an object i and fills a url.Values object. The isEC2 flag
-// indicates if this is the EC2 Query sub-protocol.
-func Parse(body url.Values, i interface{}, isEC2 bool) error {
- q := queryParser{isEC2: isEC2}
- return q.parseValue(body, reflect.ValueOf(i), "", "")
-}
-
-func elemOf(value reflect.Value) reflect.Value {
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- return value
-}
-
-type queryParser struct {
- isEC2 bool
-}
-
-func (q *queryParser) parseValue(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
- value = elemOf(value)
-
- // no need to handle zero values
- if !value.IsValid() {
- return nil
- }
-
- t := tag.Get("type")
- if t == "" {
- switch value.Kind() {
- case reflect.Struct:
- t = "structure"
- case reflect.Slice:
- t = "list"
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- return q.parseStruct(v, value, prefix)
- case "list":
- return q.parseList(v, value, prefix, tag)
- case "map":
- return q.parseMap(v, value, prefix, tag)
- default:
- return q.parseScalar(v, value, prefix, tag)
- }
-}
-
-func (q *queryParser) parseStruct(v url.Values, value reflect.Value, prefix string) error {
- if !value.IsValid() {
- return nil
- }
-
- t := value.Type()
- for i := 0; i < value.NumField(); i++ {
- elemValue := elemOf(value.Field(i))
- field := t.Field(i)
-
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
- if field.Tag.Get("ignore") != "" {
- continue
- }
-
- if protocol.CanSetIdempotencyToken(value.Field(i), field) {
- token := protocol.GetIdempotencyToken()
- elemValue = reflect.ValueOf(token)
- }
-
- var name string
- if q.isEC2 {
- name = field.Tag.Get("queryName")
- }
- if name == "" {
- if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
- name = field.Tag.Get("locationNameList")
- } else if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
- if name != "" && q.isEC2 {
- name = strings.ToUpper(name[0:1]) + name[1:]
- }
- }
- if name == "" {
- name = field.Name
- }
-
- if prefix != "" {
- name = prefix + "." + name
- }
-
- if err := q.parseValue(v, elemValue, name, field.Tag); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (q *queryParser) parseList(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
- // If it's empty, generate an empty value
- if !value.IsNil() && value.Len() == 0 {
- v.Set(prefix, "")
- return nil
- }
-
- if _, ok := value.Interface().([]byte); ok {
- return q.parseScalar(v, value, prefix, tag)
- }
-
- // check for unflattened list member
- if !q.isEC2 && tag.Get("flattened") == "" {
- if listName := tag.Get("locationNameList"); listName == "" {
- prefix += ".member"
- } else {
- prefix += "." + listName
- }
- }
-
- for i := 0; i < value.Len(); i++ {
- slicePrefix := prefix
- if slicePrefix == "" {
- slicePrefix = strconv.Itoa(i + 1)
- } else {
- slicePrefix = slicePrefix + "." + strconv.Itoa(i+1)
- }
- if err := q.parseValue(v, value.Index(i), slicePrefix, ""); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (q *queryParser) parseMap(v url.Values, value reflect.Value, prefix string, tag reflect.StructTag) error {
- // If it's empty, generate an empty value
- if !value.IsNil() && value.Len() == 0 {
- v.Set(prefix, "")
- return nil
- }
-
- // check for unflattened list member
- if !q.isEC2 && tag.Get("flattened") == "" {
- prefix += ".entry"
- }
-
- // sort keys for improved serialization consistency.
- // this is not strictly necessary for protocol support.
- mapKeyValues := value.MapKeys()
- mapKeys := map[string]reflect.Value{}
- mapKeyNames := make([]string, len(mapKeyValues))
- for i, mapKey := range mapKeyValues {
- name := mapKey.String()
- mapKeys[name] = mapKey
- mapKeyNames[i] = name
- }
- sort.Strings(mapKeyNames)
-
- for i, mapKeyName := range mapKeyNames {
- mapKey := mapKeys[mapKeyName]
- mapValue := value.MapIndex(mapKey)
-
- kname := tag.Get("locationNameKey")
- if kname == "" {
- kname = "key"
- }
- vname := tag.Get("locationNameValue")
- if vname == "" {
- vname = "value"
- }
-
- // serialize key
- var keyName string
- if prefix == "" {
- keyName = strconv.Itoa(i+1) + "." + kname
- } else {
- keyName = prefix + "." + strconv.Itoa(i+1) + "." + kname
- }
-
- if err := q.parseValue(v, mapKey, keyName, ""); err != nil {
- return err
- }
-
- // serialize value
- var valueName string
- if prefix == "" {
- valueName = strconv.Itoa(i+1) + "." + vname
- } else {
- valueName = prefix + "." + strconv.Itoa(i+1) + "." + vname
- }
-
- if err := q.parseValue(v, mapValue, valueName, ""); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-func (q *queryParser) parseScalar(v url.Values, r reflect.Value, name string, tag reflect.StructTag) error {
- switch value := r.Interface().(type) {
- case string:
- v.Set(name, value)
- case []byte:
- if !r.IsNil() {
- v.Set(name, base64.StdEncoding.EncodeToString(value))
- }
- case bool:
- v.Set(name, strconv.FormatBool(value))
- case int64:
- v.Set(name, strconv.FormatInt(value, 10))
- case int:
- v.Set(name, strconv.Itoa(value))
- case float64:
- v.Set(name, strconv.FormatFloat(value, 'f', -1, 64))
- case float32:
- v.Set(name, strconv.FormatFloat(float64(value), 'f', -1, 32))
- case time.Time:
- const ISO8601UTC = "2006-01-02T15:04:05Z"
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.ISO8601TimeFormatName
- }
-
- v.Set(name, protocol.FormatTime(format, value))
- default:
- return fmt.Errorf("unsupported value for param %s: %v (%s)", name, r.Interface(), r.Type().Name())
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go
deleted file mode 100644
index 9231e95d1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package query
-
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/query.json unmarshal_test.go
-
-import (
- "encoding/xml"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
-)
-
-// UnmarshalHandler is a named request handler for unmarshaling query protocol requests
-var UnmarshalHandler = request.NamedHandler{Name: "awssdk.query.Unmarshal", Fn: Unmarshal}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling query protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.query.UnmarshalMeta", Fn: UnmarshalMeta}
-
-// Unmarshal unmarshals a response for an AWS Query service.
-func Unmarshal(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
- if r.DataFilled() {
- decoder := xml.NewDecoder(r.HTTPResponse.Body)
- err := xmlutil.UnmarshalXML(r.Data, decoder, r.Operation.Name+"Result")
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization, "failed decoding Query response", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
- }
-}
-
-// UnmarshalMeta unmarshals header response values for an AWS Query service.
-func UnmarshalMeta(r *request.Request) {
- r.RequestID = r.HTTPResponse.Header.Get("X-Amzn-Requestid")
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go
deleted file mode 100644
index 831b0110c..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/query/unmarshal_error.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package query
-
-import (
- "encoding/xml"
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil"
-)
-
-// UnmarshalErrorHandler is a name request handler to unmarshal request errors
-var UnmarshalErrorHandler = request.NamedHandler{Name: "awssdk.query.UnmarshalError", Fn: UnmarshalError}
-
-type xmlErrorResponse struct {
- Code string `xml:"Error>Code"`
- Message string `xml:"Error>Message"`
- RequestID string `xml:"RequestId"`
-}
-
-type xmlResponseError struct {
- xmlErrorResponse
-}
-
-func (e *xmlResponseError) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
- const svcUnavailableTagName = "ServiceUnavailableException"
- const errorResponseTagName = "ErrorResponse"
-
- switch start.Name.Local {
- case svcUnavailableTagName:
- e.Code = svcUnavailableTagName
- e.Message = "service is unavailable"
- return d.Skip()
-
- case errorResponseTagName:
- return d.DecodeElement(&e.xmlErrorResponse, &start)
-
- default:
- return fmt.Errorf("unknown error response tag, %v", start)
- }
-}
-
-// UnmarshalError unmarshals an error response for an AWS Query service.
-func UnmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- var respErr xmlResponseError
- err := xmlutil.UnmarshalXMLError(&respErr, r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to unmarshal error message", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
-
- reqID := respErr.RequestID
- if len(reqID) == 0 {
- reqID = r.RequestID
- }
-
- r.Error = awserr.NewRequestFailure(
- awserr.New(respErr.Code, respErr.Message, nil),
- r.HTTPResponse.StatusCode,
- reqID,
- )
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
deleted file mode 100644
index fb35fee5f..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go
+++ /dev/null
@@ -1,310 +0,0 @@
-// Package rest provides RESTful serialization of AWS requests and responses.
-package rest
-
-import (
- "bytes"
- "encoding/base64"
- "fmt"
- "io"
- "net/http"
- "net/url"
- "path"
- "reflect"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-// Whether the byte value can be sent without escaping in AWS URLs
-var noEscape [256]bool
-
-var errValueNotSet = fmt.Errorf("value not set")
-
-var byteSliceType = reflect.TypeOf([]byte{})
-
-func init() {
- for i := 0; i < len(noEscape); i++ {
- // AWS expects every character except these to be escaped
- noEscape[i] = (i >= 'A' && i <= 'Z') ||
- (i >= 'a' && i <= 'z') ||
- (i >= '0' && i <= '9') ||
- i == '-' ||
- i == '.' ||
- i == '_' ||
- i == '~'
- }
-}
-
-// BuildHandler is a named request handler for building rest protocol requests
-var BuildHandler = request.NamedHandler{Name: "awssdk.rest.Build", Fn: Build}
-
-// Build builds the REST component of a service request.
-func Build(r *request.Request) {
- if r.ParamsFilled() {
- v := reflect.ValueOf(r.Params).Elem()
- buildLocationElements(r, v, false)
- buildBody(r, v)
- }
-}
-
-// BuildAsGET builds the REST component of a service request with the ability to hoist
-// data from the body.
-func BuildAsGET(r *request.Request) {
- if r.ParamsFilled() {
- v := reflect.ValueOf(r.Params).Elem()
- buildLocationElements(r, v, true)
- buildBody(r, v)
- }
-}
-
-func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bool) {
- query := r.HTTPRequest.URL.Query()
-
- // Setup the raw path to match the base path pattern. This is needed
- // so that when the path is mutated a custom escaped version can be
- // stored in RawPath that will be used by the Go client.
- r.HTTPRequest.URL.RawPath = r.HTTPRequest.URL.Path
-
- for i := 0; i < v.NumField(); i++ {
- m := v.Field(i)
- if n := v.Type().Field(i).Name; n[0:1] == strings.ToLower(n[0:1]) {
- continue
- }
-
- if m.IsValid() {
- field := v.Type().Field(i)
- name := field.Tag.Get("locationName")
- if name == "" {
- name = field.Name
- }
- if kind := m.Kind(); kind == reflect.Ptr {
- m = m.Elem()
- } else if kind == reflect.Interface {
- if !m.Elem().IsValid() {
- continue
- }
- }
- if !m.IsValid() {
- continue
- }
- if field.Tag.Get("ignore") != "" {
- continue
- }
-
- // Support the ability to customize values to be marshaled as a
- // blob even though they were modeled as a string. Required for S3
- // API operations like SSECustomerKey is modeled as string but
- // required to be base64 encoded in request.
- if field.Tag.Get("marshal-as") == "blob" {
- m = m.Convert(byteSliceType)
- }
-
- var err error
- switch field.Tag.Get("location") {
- case "headers": // header maps
- err = buildHeaderMap(&r.HTTPRequest.Header, m, field.Tag)
- case "header":
- err = buildHeader(&r.HTTPRequest.Header, m, name, field.Tag)
- case "uri":
- err = buildURI(r.HTTPRequest.URL, m, name, field.Tag)
- case "querystring":
- err = buildQueryString(query, m, name, field.Tag)
- default:
- if buildGETQuery {
- err = buildQueryString(query, m, name, field.Tag)
- }
- }
- r.Error = err
- }
- if r.Error != nil {
- return
- }
- }
-
- r.HTTPRequest.URL.RawQuery = query.Encode()
- if !aws.BoolValue(r.Config.DisableRestProtocolURICleaning) {
- cleanPath(r.HTTPRequest.URL)
- }
-}
-
-func buildBody(r *request.Request, v reflect.Value) {
- if field, ok := v.Type().FieldByName("_"); ok {
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- pfield, _ := v.Type().FieldByName(payloadName)
- if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" {
- payload := reflect.Indirect(v.FieldByName(payloadName))
- if payload.IsValid() && payload.Interface() != nil {
- switch reader := payload.Interface().(type) {
- case io.ReadSeeker:
- r.SetReaderBody(reader)
- case []byte:
- r.SetBufferBody(reader)
- case string:
- r.SetStringBody(reader)
- default:
- r.Error = awserr.New(request.ErrCodeSerialization,
- "failed to encode REST request",
- fmt.Errorf("unknown payload type %s", payload.Type()))
- }
- }
- }
- }
- }
-}
-
-func buildHeader(header *http.Header, v reflect.Value, name string, tag reflect.StructTag) error {
- str, err := convertType(v, tag)
- if err == errValueNotSet {
- return nil
- } else if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err)
- }
-
- name = strings.TrimSpace(name)
- str = strings.TrimSpace(str)
-
- header.Add(name, str)
-
- return nil
-}
-
-func buildHeaderMap(header *http.Header, v reflect.Value, tag reflect.StructTag) error {
- prefix := tag.Get("locationName")
- for _, key := range v.MapKeys() {
- str, err := convertType(v.MapIndex(key), tag)
- if err == errValueNotSet {
- continue
- } else if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err)
-
- }
- keyStr := strings.TrimSpace(key.String())
- str = strings.TrimSpace(str)
-
- header.Add(prefix+keyStr, str)
- }
- return nil
-}
-
-func buildURI(u *url.URL, v reflect.Value, name string, tag reflect.StructTag) error {
- value, err := convertType(v, tag)
- if err == errValueNotSet {
- return nil
- } else if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err)
- }
-
- u.Path = strings.Replace(u.Path, "{"+name+"}", value, -1)
- u.Path = strings.Replace(u.Path, "{"+name+"+}", value, -1)
-
- u.RawPath = strings.Replace(u.RawPath, "{"+name+"}", EscapePath(value, true), -1)
- u.RawPath = strings.Replace(u.RawPath, "{"+name+"+}", EscapePath(value, false), -1)
-
- return nil
-}
-
-func buildQueryString(query url.Values, v reflect.Value, name string, tag reflect.StructTag) error {
- switch value := v.Interface().(type) {
- case []*string:
- for _, item := range value {
- query.Add(name, *item)
- }
- case map[string]*string:
- for key, item := range value {
- query.Add(key, *item)
- }
- case map[string][]*string:
- for key, items := range value {
- for _, item := range items {
- query.Add(key, *item)
- }
- }
- default:
- str, err := convertType(v, tag)
- if err == errValueNotSet {
- return nil
- } else if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to encode REST request", err)
- }
- query.Set(name, str)
- }
-
- return nil
-}
-
-func cleanPath(u *url.URL) {
- hasSlash := strings.HasSuffix(u.Path, "/")
-
- // clean up path, removing duplicate `/`
- u.Path = path.Clean(u.Path)
- u.RawPath = path.Clean(u.RawPath)
-
- if hasSlash && !strings.HasSuffix(u.Path, "/") {
- u.Path += "/"
- u.RawPath += "/"
- }
-}
-
-// EscapePath escapes part of a URL path in Amazon style
-func EscapePath(path string, encodeSep bool) string {
- var buf bytes.Buffer
- for i := 0; i < len(path); i++ {
- c := path[i]
- if noEscape[c] || (c == '/' && !encodeSep) {
- buf.WriteByte(c)
- } else {
- fmt.Fprintf(&buf, "%%%02X", c)
- }
- }
- return buf.String()
-}
-
-func convertType(v reflect.Value, tag reflect.StructTag) (str string, err error) {
- v = reflect.Indirect(v)
- if !v.IsValid() {
- return "", errValueNotSet
- }
-
- switch value := v.Interface().(type) {
- case string:
- str = value
- case []byte:
- str = base64.StdEncoding.EncodeToString(value)
- case bool:
- str = strconv.FormatBool(value)
- case int64:
- str = strconv.FormatInt(value, 10)
- case float64:
- str = strconv.FormatFloat(value, 'f', -1, 64)
- case time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.RFC822TimeFormatName
- if tag.Get("location") == "querystring" {
- format = protocol.ISO8601TimeFormatName
- }
- }
- str = protocol.FormatTime(format, value)
- case aws.JSONValue:
- if len(value) == 0 {
- return "", errValueNotSet
- }
- escaping := protocol.NoEscape
- if tag.Get("location") == "header" {
- escaping = protocol.Base64Escape
- }
- str, err = protocol.EncodeJSONValue(value, escaping)
- if err != nil {
- return "", fmt.Errorf("unable to encode JSONValue, %v", err)
- }
- default:
- err := fmt.Errorf("unsupported value for param %v (%s)", v.Interface(), v.Type())
- return "", err
- }
- return str, nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go
deleted file mode 100644
index b54c99eda..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/payload.go
+++ /dev/null
@@ -1,54 +0,0 @@
-package rest
-
-import "reflect"
-
-// PayloadMember returns the payload field member of i if there is one, or nil.
-func PayloadMember(i interface{}) interface{} {
- if i == nil {
- return nil
- }
-
- v := reflect.ValueOf(i).Elem()
- if !v.IsValid() {
- return nil
- }
- if field, ok := v.Type().FieldByName("_"); ok {
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- field, _ := v.Type().FieldByName(payloadName)
- if field.Tag.Get("type") != "structure" {
- return nil
- }
-
- payload := v.FieldByName(payloadName)
- if payload.IsValid() || (payload.Kind() == reflect.Ptr && !payload.IsNil()) {
- return payload.Interface()
- }
- }
- }
- return nil
-}
-
-const nopayloadPayloadType = "nopayload"
-
-// PayloadType returns the type of a payload field member of i if there is one,
-// or "".
-func PayloadType(i interface{}) string {
- v := reflect.Indirect(reflect.ValueOf(i))
- if !v.IsValid() {
- return ""
- }
-
- if field, ok := v.Type().FieldByName("_"); ok {
- if noPayload := field.Tag.Get(nopayloadPayloadType); noPayload != "" {
- return nopayloadPayloadType
- }
-
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- if member, ok := v.Type().FieldByName(payloadName); ok {
- return member.Tag.Get("type")
- }
- }
- }
-
- return ""
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
deleted file mode 100644
index 92f8b4d9a..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/unmarshal.go
+++ /dev/null
@@ -1,257 +0,0 @@
-package rest
-
-import (
- "bytes"
- "encoding/base64"
- "fmt"
- "io"
- "io/ioutil"
- "net/http"
- "reflect"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- awsStrings "github.com/aws/aws-sdk-go/internal/strings"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-// UnmarshalHandler is a named request handler for unmarshaling rest protocol requests
-var UnmarshalHandler = request.NamedHandler{Name: "awssdk.rest.Unmarshal", Fn: Unmarshal}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling rest protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{Name: "awssdk.rest.UnmarshalMeta", Fn: UnmarshalMeta}
-
-// Unmarshal unmarshals the REST component of a response in a REST service.
-func Unmarshal(r *request.Request) {
- if r.DataFilled() {
- v := reflect.Indirect(reflect.ValueOf(r.Data))
- if err := unmarshalBody(r, v); err != nil {
- r.Error = err
- }
- }
-}
-
-// UnmarshalMeta unmarshals the REST metadata of a response in a REST service
-func UnmarshalMeta(r *request.Request) {
- r.RequestID = r.HTTPResponse.Header.Get("X-Amzn-Requestid")
- if r.RequestID == "" {
- // Alternative version of request id in the header
- r.RequestID = r.HTTPResponse.Header.Get("X-Amz-Request-Id")
- }
- if r.DataFilled() {
- if err := UnmarshalResponse(r.HTTPResponse, r.Data, aws.BoolValue(r.Config.LowerCaseHeaderMaps)); err != nil {
- r.Error = err
- }
- }
-}
-
-// UnmarshalResponse attempts to unmarshal the REST response headers to
-// the data type passed in. The type must be a pointer. An error is returned
-// with any error unmarshaling the response into the target datatype.
-func UnmarshalResponse(resp *http.Response, data interface{}, lowerCaseHeaderMaps bool) error {
- v := reflect.Indirect(reflect.ValueOf(data))
- return unmarshalLocationElements(resp, v, lowerCaseHeaderMaps)
-}
-
-func unmarshalBody(r *request.Request, v reflect.Value) error {
- if field, ok := v.Type().FieldByName("_"); ok {
- if payloadName := field.Tag.Get("payload"); payloadName != "" {
- pfield, _ := v.Type().FieldByName(payloadName)
- if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" {
- payload := v.FieldByName(payloadName)
- if payload.IsValid() {
- switch payload.Interface().(type) {
- case []byte:
- defer r.HTTPResponse.Body.Close()
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- }
-
- payload.Set(reflect.ValueOf(b))
-
- case *string:
- defer r.HTTPResponse.Body.Close()
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- }
-
- str := string(b)
- payload.Set(reflect.ValueOf(&str))
-
- default:
- switch payload.Type().String() {
- case "io.ReadCloser":
- payload.Set(reflect.ValueOf(r.HTTPResponse.Body))
-
- case "io.ReadSeeker":
- b, err := ioutil.ReadAll(r.HTTPResponse.Body)
- if err != nil {
- return awserr.New(request.ErrCodeSerialization,
- "failed to read response body", err)
- }
- payload.Set(reflect.ValueOf(ioutil.NopCloser(bytes.NewReader(b))))
-
- default:
- io.Copy(ioutil.Discard, r.HTTPResponse.Body)
- r.HTTPResponse.Body.Close()
- return awserr.New(request.ErrCodeSerialization,
- "failed to decode REST response",
- fmt.Errorf("unknown payload type %s", payload.Type()))
- }
- }
- }
- }
- }
- }
-
- return nil
-}
-
-func unmarshalLocationElements(resp *http.Response, v reflect.Value, lowerCaseHeaderMaps bool) error {
- for i := 0; i < v.NumField(); i++ {
- m, field := v.Field(i), v.Type().Field(i)
- if n := field.Name; n[0:1] == strings.ToLower(n[0:1]) {
- continue
- }
-
- if m.IsValid() {
- name := field.Tag.Get("locationName")
- if name == "" {
- name = field.Name
- }
-
- switch field.Tag.Get("location") {
- case "statusCode":
- unmarshalStatusCode(m, resp.StatusCode)
-
- case "header":
- err := unmarshalHeader(m, resp.Header.Get(name), field.Tag)
- if err != nil {
- return awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- }
-
- case "headers":
- prefix := field.Tag.Get("locationName")
- err := unmarshalHeaderMap(m, resp.Header, prefix, lowerCaseHeaderMaps)
- if err != nil {
- awserr.New(request.ErrCodeSerialization, "failed to decode REST response", err)
- }
- }
- }
- }
-
- return nil
-}
-
-func unmarshalStatusCode(v reflect.Value, statusCode int) {
- if !v.IsValid() {
- return
- }
-
- switch v.Interface().(type) {
- case *int64:
- s := int64(statusCode)
- v.Set(reflect.ValueOf(&s))
- }
-}
-
-func unmarshalHeaderMap(r reflect.Value, headers http.Header, prefix string, normalize bool) error {
- if len(headers) == 0 {
- return nil
- }
- switch r.Interface().(type) {
- case map[string]*string: // we only support string map value types
- out := map[string]*string{}
- for k, v := range headers {
- if awsStrings.HasPrefixFold(k, prefix) {
- if normalize == true {
- k = strings.ToLower(k)
- } else {
- k = http.CanonicalHeaderKey(k)
- }
- out[k[len(prefix):]] = &v[0]
- }
- }
- if len(out) != 0 {
- r.Set(reflect.ValueOf(out))
- }
-
- }
- return nil
-}
-
-func unmarshalHeader(v reflect.Value, header string, tag reflect.StructTag) error {
- switch tag.Get("type") {
- case "jsonvalue":
- if len(header) == 0 {
- return nil
- }
- case "blob":
- if len(header) == 0 {
- return nil
- }
- default:
- if !v.IsValid() || (header == "" && v.Elem().Kind() != reflect.String) {
- return nil
- }
- }
-
- switch v.Interface().(type) {
- case *string:
- v.Set(reflect.ValueOf(&header))
- case []byte:
- b, err := base64.StdEncoding.DecodeString(header)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(b))
- case *bool:
- b, err := strconv.ParseBool(header)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&b))
- case *int64:
- i, err := strconv.ParseInt(header, 10, 64)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&i))
- case *float64:
- f, err := strconv.ParseFloat(header, 64)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&f))
- case *time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.RFC822TimeFormatName
- }
- t, err := protocol.ParseTime(format, header)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(&t))
- case aws.JSONValue:
- escaping := protocol.NoEscape
- if tag.Get("location") == "header" {
- escaping = protocol.Base64Escape
- }
- m, err := protocol.DecodeJSONValue(header, escaping)
- if err != nil {
- return err
- }
- v.Set(reflect.ValueOf(m))
- default:
- err := fmt.Errorf("Unsupported value for param %v (%s)", v.Interface(), v.Type())
- return err
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go
deleted file mode 100644
index 2e0e205af..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Package restjson provides RESTful JSON serialization of AWS
-// requests and responses.
-package restjson
-
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/rest-json.json build_test.go
-//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/rest-json.json unmarshal_test.go
-
-import (
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-// BuildHandler is a named request handler for building restjson protocol
-// requests
-var BuildHandler = request.NamedHandler{
- Name: "awssdk.restjson.Build",
- Fn: Build,
-}
-
-// UnmarshalHandler is a named request handler for unmarshaling restjson
-// protocol requests
-var UnmarshalHandler = request.NamedHandler{
- Name: "awssdk.restjson.Unmarshal",
- Fn: Unmarshal,
-}
-
-// UnmarshalMetaHandler is a named request handler for unmarshaling restjson
-// protocol request metadata
-var UnmarshalMetaHandler = request.NamedHandler{
- Name: "awssdk.restjson.UnmarshalMeta",
- Fn: UnmarshalMeta,
-}
-
-// Build builds a request for the REST JSON protocol.
-func Build(r *request.Request) {
- rest.Build(r)
-
- if t := rest.PayloadType(r.Params); t == "structure" || t == "" {
- if v := r.HTTPRequest.Header.Get("Content-Type"); len(v) == 0 {
- r.HTTPRequest.Header.Set("Content-Type", "application/json")
- }
- jsonrpc.Build(r)
- }
-}
-
-// Unmarshal unmarshals a response body for the REST JSON protocol.
-func Unmarshal(r *request.Request) {
- if t := rest.PayloadType(r.Data); t == "structure" || t == "" {
- jsonrpc.Unmarshal(r)
- } else {
- rest.Unmarshal(r)
- }
-}
-
-// UnmarshalMeta unmarshals response headers for the REST JSON protocol.
-func UnmarshalMeta(r *request.Request) {
- rest.UnmarshalMeta(r)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go
deleted file mode 100644
index d756d8cc5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package restjson
-
-import (
- "bytes"
- "io"
- "io/ioutil"
- "net/http"
- "strings"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
- "github.com/aws/aws-sdk-go/private/protocol/rest"
-)
-
-const (
- errorTypeHeader = "X-Amzn-Errortype"
- errorMessageHeader = "X-Amzn-Errormessage"
-)
-
-// UnmarshalTypedError provides unmarshaling errors API response errors
-// for both typed and untyped errors.
-type UnmarshalTypedError struct {
- exceptions map[string]func(protocol.ResponseMetadata) error
-}
-
-// NewUnmarshalTypedError returns an UnmarshalTypedError initialized for the
-// set of exception names to the error unmarshalers
-func NewUnmarshalTypedError(exceptions map[string]func(protocol.ResponseMetadata) error) *UnmarshalTypedError {
- return &UnmarshalTypedError{
- exceptions: exceptions,
- }
-}
-
-// UnmarshalError attempts to unmarshal the HTTP response error as a known
-// error type. If unable to unmarshal the error type, the generic SDK error
-// type will be used.
-func (u *UnmarshalTypedError) UnmarshalError(
- resp *http.Response,
- respMeta protocol.ResponseMetadata,
-) (error, error) {
-
- code := resp.Header.Get(errorTypeHeader)
- msg := resp.Header.Get(errorMessageHeader)
-
- body := resp.Body
- if len(code) == 0 {
- // If unable to get code from HTTP headers have to parse JSON message
- // to determine what kind of exception this will be.
- var buf bytes.Buffer
- var jsonErr jsonErrorResponse
- teeReader := io.TeeReader(resp.Body, &buf)
- err := jsonutil.UnmarshalJSONError(&jsonErr, teeReader)
- if err != nil {
- return nil, err
- }
-
- body = ioutil.NopCloser(&buf)
- code = jsonErr.Code
- msg = jsonErr.Message
- }
-
- // If code has colon separators remove them so can compare against modeled
- // exception names.
- code = strings.SplitN(code, ":", 2)[0]
-
- if fn, ok := u.exceptions[code]; ok {
- // If exception code is know, use associated constructor to get a value
- // for the exception that the JSON body can be unmarshaled into.
- v := fn(respMeta)
- if err := jsonutil.UnmarshalJSONCaseInsensitive(v, body); err != nil {
- return nil, err
- }
-
- if err := rest.UnmarshalResponse(resp, v, true); err != nil {
- return nil, err
- }
-
- return v, nil
- }
-
- // fallback to unmodeled generic exceptions
- return awserr.NewRequestFailure(
- awserr.New(code, msg, nil),
- respMeta.StatusCode,
- respMeta.RequestID,
- ), nil
-}
-
-// UnmarshalErrorHandler is a named request handler for unmarshaling restjson
-// protocol request errors
-var UnmarshalErrorHandler = request.NamedHandler{
- Name: "awssdk.restjson.UnmarshalError",
- Fn: UnmarshalError,
-}
-
-// UnmarshalError unmarshals a response error for the REST JSON protocol.
-func UnmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- var jsonErr jsonErrorResponse
- err := jsonutil.UnmarshalJSONError(&jsonErr, r.HTTPResponse.Body)
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to unmarshal response error", err),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
- return
- }
-
- code := r.HTTPResponse.Header.Get(errorTypeHeader)
- if code == "" {
- code = jsonErr.Code
- }
- msg := r.HTTPResponse.Header.Get(errorMessageHeader)
- if msg == "" {
- msg = jsonErr.Message
- }
-
- code = strings.SplitN(code, ":", 2)[0]
- r.Error = awserr.NewRequestFailure(
- awserr.New(code, jsonErr.Message, nil),
- r.HTTPResponse.StatusCode,
- r.RequestID,
- )
-}
-
-type jsonErrorResponse struct {
- Code string `json:"code"`
- Message string `json:"message"`
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go
deleted file mode 100644
index d9a4e7649..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go
+++ /dev/null
@@ -1,134 +0,0 @@
-package protocol
-
-import (
- "bytes"
- "fmt"
- "math"
- "strconv"
- "time"
-
- "github.com/aws/aws-sdk-go/internal/sdkmath"
-)
-
-// Names of time formats supported by the SDK
-const (
- RFC822TimeFormatName = "rfc822"
- ISO8601TimeFormatName = "iso8601"
- UnixTimeFormatName = "unixTimestamp"
-)
-
-// Time formats supported by the SDK
-// Output time is intended to not contain decimals
-const (
- // RFC 7231#section-7.1.1.1 timetamp format. e.g Tue, 29 Apr 2014 18:30:38 GMT
- RFC822TimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT"
- rfc822TimeFormatSingleDigitDay = "Mon, _2 Jan 2006 15:04:05 GMT"
- rfc822TimeFormatSingleDigitDayTwoDigitYear = "Mon, _2 Jan 06 15:04:05 GMT"
-
- // This format is used for output time without seconds precision
- RFC822OutputTimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT"
-
- // RFC3339 a subset of the ISO8601 timestamp format. e.g 2014-04-29T18:30:38Z
- ISO8601TimeFormat = "2006-01-02T15:04:05.999999999Z"
- iso8601TimeFormatNoZ = "2006-01-02T15:04:05.999999999"
-
- // This format is used for output time with fractional second precision up to milliseconds
- ISO8601OutputTimeFormat = "2006-01-02T15:04:05.999999999Z"
-)
-
-// IsKnownTimestampFormat returns if the timestamp format name
-// is know to the SDK's protocols.
-func IsKnownTimestampFormat(name string) bool {
- switch name {
- case RFC822TimeFormatName:
- fallthrough
- case ISO8601TimeFormatName:
- fallthrough
- case UnixTimeFormatName:
- return true
- default:
- return false
- }
-}
-
-// FormatTime returns a string value of the time.
-func FormatTime(name string, t time.Time) string {
- t = t.UTC().Truncate(time.Millisecond)
-
- switch name {
- case RFC822TimeFormatName:
- return t.Format(RFC822OutputTimeFormat)
- case ISO8601TimeFormatName:
- return t.Format(ISO8601OutputTimeFormat)
- case UnixTimeFormatName:
- ms := t.UnixNano() / int64(time.Millisecond)
- return strconv.FormatFloat(float64(ms)/1e3, 'f', -1, 64)
- default:
- panic("unknown timestamp format name, " + name)
- }
-}
-
-// ParseTime attempts to parse the time given the format. Returns
-// the time if it was able to be parsed, and fails otherwise.
-func ParseTime(formatName, value string) (time.Time, error) {
- switch formatName {
- case RFC822TimeFormatName: // Smithy HTTPDate format
- return tryParse(value,
- RFC822TimeFormat,
- rfc822TimeFormatSingleDigitDay,
- rfc822TimeFormatSingleDigitDayTwoDigitYear,
- time.RFC850,
- time.ANSIC,
- )
- case ISO8601TimeFormatName: // Smithy DateTime format
- return tryParse(value,
- ISO8601TimeFormat,
- iso8601TimeFormatNoZ,
- time.RFC3339Nano,
- time.RFC3339,
- )
- case UnixTimeFormatName:
- v, err := strconv.ParseFloat(value, 64)
- _, dec := math.Modf(v)
- dec = sdkmath.Round(dec*1e3) / 1e3 //Rounds 0.1229999 to 0.123
- if err != nil {
- return time.Time{}, err
- }
- return time.Unix(int64(v), int64(dec*(1e9))), nil
- default:
- panic("unknown timestamp format name, " + formatName)
- }
-}
-
-func tryParse(v string, formats ...string) (time.Time, error) {
- var errs parseErrors
- for _, f := range formats {
- t, err := time.Parse(f, v)
- if err != nil {
- errs = append(errs, parseError{
- Format: f,
- Err: err,
- })
- continue
- }
- return t, nil
- }
-
- return time.Time{}, fmt.Errorf("unable to parse time string, %v", errs)
-}
-
-type parseErrors []parseError
-
-func (es parseErrors) Error() string {
- var s bytes.Buffer
- for _, e := range es {
- fmt.Fprintf(&s, "\n * %q: %v", e.Format, e.Err)
- }
-
- return "parse errors:" + s.String()
-}
-
-type parseError struct {
- Format string
- Err error
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go
deleted file mode 100644
index f614ef898..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package protocol
-
-import (
- "io"
- "io/ioutil"
-
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// UnmarshalDiscardBodyHandler is a named request handler to empty and close a response's body
-var UnmarshalDiscardBodyHandler = request.NamedHandler{Name: "awssdk.shared.UnmarshalDiscardBody", Fn: UnmarshalDiscardBody}
-
-// UnmarshalDiscardBody is a request handler to empty a response's body and closing it.
-func UnmarshalDiscardBody(r *request.Request) {
- if r.HTTPResponse == nil || r.HTTPResponse.Body == nil {
- return
- }
-
- io.Copy(ioutil.Discard, r.HTTPResponse.Body)
- r.HTTPResponse.Body.Close()
-}
-
-// ResponseMetadata provides the SDK response metadata attributes.
-type ResponseMetadata struct {
- StatusCode int
- RequestID string
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal_error.go
deleted file mode 100644
index cc857f136..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/unmarshal_error.go
+++ /dev/null
@@ -1,65 +0,0 @@
-package protocol
-
-import (
- "net/http"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-// UnmarshalErrorHandler provides unmarshaling errors API response errors for
-// both typed and untyped errors.
-type UnmarshalErrorHandler struct {
- unmarshaler ErrorUnmarshaler
-}
-
-// ErrorUnmarshaler is an abstract interface for concrete implementations to
-// unmarshal protocol specific response errors.
-type ErrorUnmarshaler interface {
- UnmarshalError(*http.Response, ResponseMetadata) (error, error)
-}
-
-// NewUnmarshalErrorHandler returns an UnmarshalErrorHandler
-// initialized for the set of exception names to the error unmarshalers
-func NewUnmarshalErrorHandler(unmarshaler ErrorUnmarshaler) *UnmarshalErrorHandler {
- return &UnmarshalErrorHandler{
- unmarshaler: unmarshaler,
- }
-}
-
-// UnmarshalErrorHandlerName is the name of the named handler.
-const UnmarshalErrorHandlerName = "awssdk.protocol.UnmarshalError"
-
-// NamedHandler returns a NamedHandler for the unmarshaler using the set of
-// errors the unmarshaler was initialized for.
-func (u *UnmarshalErrorHandler) NamedHandler() request.NamedHandler {
- return request.NamedHandler{
- Name: UnmarshalErrorHandlerName,
- Fn: u.UnmarshalError,
- }
-}
-
-// UnmarshalError will attempt to unmarshal the API response's error message
-// into either a generic SDK error type, or a typed error corresponding to the
-// errors exception name.
-func (u *UnmarshalErrorHandler) UnmarshalError(r *request.Request) {
- defer r.HTTPResponse.Body.Close()
-
- respMeta := ResponseMetadata{
- StatusCode: r.HTTPResponse.StatusCode,
- RequestID: r.RequestID,
- }
-
- v, err := u.unmarshaler.UnmarshalError(r.HTTPResponse, respMeta)
- if err != nil {
- r.Error = awserr.NewRequestFailure(
- awserr.New(request.ErrCodeSerialization,
- "failed to unmarshal response error", err),
- respMeta.StatusCode,
- respMeta.RequestID,
- )
- return
- }
-
- r.Error = v
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
deleted file mode 100644
index 2fbb93ae7..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go
+++ /dev/null
@@ -1,317 +0,0 @@
-// Package xmlutil provides XML serialization of AWS requests and responses.
-package xmlutil
-
-import (
- "encoding/base64"
- "encoding/xml"
- "fmt"
- "reflect"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-// BuildXML will serialize params into an xml.Encoder. Error will be returned
-// if the serialization of any of the params or nested values fails.
-func BuildXML(params interface{}, e *xml.Encoder) error {
- return buildXML(params, e, false)
-}
-
-func buildXML(params interface{}, e *xml.Encoder, sorted bool) error {
- b := xmlBuilder{encoder: e, namespaces: map[string]string{}}
- root := NewXMLElement(xml.Name{})
- if err := b.buildValue(reflect.ValueOf(params), root, ""); err != nil {
- return err
- }
- for _, c := range root.Children {
- for _, v := range c {
- return StructToXML(e, v, sorted)
- }
- }
- return nil
-}
-
-// Returns the reflection element of a value, if it is a pointer.
-func elemOf(value reflect.Value) reflect.Value {
- for value.Kind() == reflect.Ptr {
- value = value.Elem()
- }
- return value
-}
-
-// A xmlBuilder serializes values from Go code to XML
-type xmlBuilder struct {
- encoder *xml.Encoder
- namespaces map[string]string
-}
-
-// buildValue generic XMLNode builder for any type. Will build value for their specific type
-// struct, list, map, scalar.
-//
-// Also takes a "type" tag value to set what type a value should be converted to XMLNode as. If
-// type is not provided reflect will be used to determine the value's type.
-func (b *xmlBuilder) buildValue(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- value = elemOf(value)
- if !value.IsValid() { // no need to handle zero values
- return nil
- } else if tag.Get("location") != "" { // don't handle non-body location values
- return nil
- }
-
- xml := tag.Get("xml")
- if len(xml) != 0 {
- name := strings.SplitAfterN(xml, ",", 2)[0]
- if name == "-" {
- return nil
- }
- }
-
- t := tag.Get("type")
- if t == "" {
- switch value.Kind() {
- case reflect.Struct:
- t = "structure"
- case reflect.Slice:
- t = "list"
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- if field, ok := value.Type().FieldByName("_"); ok {
- tag = tag + reflect.StructTag(" ") + field.Tag
- }
- return b.buildStruct(value, current, tag)
- case "list":
- return b.buildList(value, current, tag)
- case "map":
- return b.buildMap(value, current, tag)
- default:
- return b.buildScalar(value, current, tag)
- }
-}
-
-// buildStruct adds a struct and its fields to the current XMLNode. All fields and any nested
-// types are converted to XMLNodes also.
-func (b *xmlBuilder) buildStruct(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- if !value.IsValid() {
- return nil
- }
-
- // unwrap payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := value.Type().FieldByName(payload)
- tag = field.Tag
- value = elemOf(value.FieldByName(payload))
-
- if !value.IsValid() {
- return nil
- }
- }
-
- child := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
-
- // there is an xmlNamespace associated with this struct
- if prefix, uri := tag.Get("xmlPrefix"), tag.Get("xmlURI"); uri != "" {
- ns := xml.Attr{
- Name: xml.Name{Local: "xmlns"},
- Value: uri,
- }
- if prefix != "" {
- b.namespaces[prefix] = uri // register the namespace
- ns.Name.Local = "xmlns:" + prefix
- }
-
- child.Attr = append(child.Attr, ns)
- }
-
- var payloadFields, nonPayloadFields int
-
- t := value.Type()
- for i := 0; i < value.NumField(); i++ {
- member := elemOf(value.Field(i))
- field := t.Field(i)
-
- if field.PkgPath != "" {
- continue // ignore unexported fields
- }
- if field.Tag.Get("ignore") != "" {
- continue
- }
-
- mTag := field.Tag
- if mTag.Get("location") != "" { // skip non-body members
- nonPayloadFields++
- continue
- }
- payloadFields++
-
- if protocol.CanSetIdempotencyToken(value.Field(i), field) {
- token := protocol.GetIdempotencyToken()
- member = reflect.ValueOf(token)
- }
-
- memberName := mTag.Get("locationName")
- if memberName == "" {
- memberName = field.Name
- mTag = reflect.StructTag(string(mTag) + ` locationName:"` + memberName + `"`)
- }
- if err := b.buildValue(member, child, mTag); err != nil {
- return err
- }
- }
-
- // Only case where the child shape is not added is if the shape only contains
- // non-payload fields, e.g headers/query.
- if !(payloadFields == 0 && nonPayloadFields > 0) {
- current.AddChild(child)
- }
-
- return nil
-}
-
-// buildList adds the value's list items to the current XMLNode as children nodes. All
-// nested values in the list are converted to XMLNodes also.
-func (b *xmlBuilder) buildList(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- if value.IsNil() { // don't build omitted lists
- return nil
- }
-
- // check for unflattened list member
- flattened := tag.Get("flattened") != ""
-
- xname := xml.Name{Local: tag.Get("locationName")}
- if flattened {
- for i := 0; i < value.Len(); i++ {
- child := NewXMLElement(xname)
- current.AddChild(child)
- if err := b.buildValue(value.Index(i), child, ""); err != nil {
- return err
- }
- }
- } else {
- list := NewXMLElement(xname)
- current.AddChild(list)
-
- for i := 0; i < value.Len(); i++ {
- iname := tag.Get("locationNameList")
- if iname == "" {
- iname = "member"
- }
-
- child := NewXMLElement(xml.Name{Local: iname})
- list.AddChild(child)
- if err := b.buildValue(value.Index(i), child, ""); err != nil {
- return err
- }
- }
- }
-
- return nil
-}
-
-// buildMap adds the value's key/value pairs to the current XMLNode as children nodes. All
-// nested values in the map are converted to XMLNodes also.
-//
-// Error will be returned if it is unable to build the map's values into XMLNodes
-func (b *xmlBuilder) buildMap(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- if value.IsNil() { // don't build omitted maps
- return nil
- }
-
- maproot := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
- current.AddChild(maproot)
- current = maproot
-
- kname, vname := "key", "value"
- if n := tag.Get("locationNameKey"); n != "" {
- kname = n
- }
- if n := tag.Get("locationNameValue"); n != "" {
- vname = n
- }
-
- // sorting is not required for compliance, but it makes testing easier
- keys := make([]string, value.Len())
- for i, k := range value.MapKeys() {
- keys[i] = k.String()
- }
- sort.Strings(keys)
-
- for _, k := range keys {
- v := value.MapIndex(reflect.ValueOf(k))
-
- mapcur := current
- if tag.Get("flattened") == "" { // add "entry" tag to non-flat maps
- child := NewXMLElement(xml.Name{Local: "entry"})
- mapcur.AddChild(child)
- mapcur = child
- }
-
- kchild := NewXMLElement(xml.Name{Local: kname})
- kchild.Text = k
- vchild := NewXMLElement(xml.Name{Local: vname})
- mapcur.AddChild(kchild)
- mapcur.AddChild(vchild)
-
- if err := b.buildValue(v, vchild, ""); err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// buildScalar will convert the value into a string and append it as a attribute or child
-// of the current XMLNode.
-//
-// The value will be added as an attribute if tag contains a "xmlAttribute" attribute value.
-//
-// Error will be returned if the value type is unsupported.
-func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag reflect.StructTag) error {
- var str string
- switch converted := value.Interface().(type) {
- case string:
- str = converted
- case []byte:
- if !value.IsNil() {
- str = base64.StdEncoding.EncodeToString(converted)
- }
- case bool:
- str = strconv.FormatBool(converted)
- case int64:
- str = strconv.FormatInt(converted, 10)
- case int:
- str = strconv.Itoa(converted)
- case float64:
- str = strconv.FormatFloat(converted, 'f', -1, 64)
- case float32:
- str = strconv.FormatFloat(float64(converted), 'f', -1, 32)
- case time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.ISO8601TimeFormatName
- }
-
- str = protocol.FormatTime(format, converted)
- default:
- return fmt.Errorf("unsupported value for param %s: %v (%s)",
- tag.Get("locationName"), value.Interface(), value.Type().Name())
- }
-
- xname := xml.Name{Local: tag.Get("locationName")}
- if tag.Get("xmlAttribute") != "" { // put into current node's attribute list
- attr := xml.Attr{Name: xname, Value: str}
- current.Attr = append(current.Attr, attr)
- } else if len(xname.Local) == 0 {
- current.Text = str
- } else { // regular text node
- current.AddChild(&XMLNode{Name: xname, Text: str})
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go
deleted file mode 100644
index c1a511851..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/sort.go
+++ /dev/null
@@ -1,32 +0,0 @@
-package xmlutil
-
-import (
- "encoding/xml"
- "strings"
-)
-
-type xmlAttrSlice []xml.Attr
-
-func (x xmlAttrSlice) Len() int {
- return len(x)
-}
-
-func (x xmlAttrSlice) Less(i, j int) bool {
- spaceI, spaceJ := x[i].Name.Space, x[j].Name.Space
- localI, localJ := x[i].Name.Local, x[j].Name.Local
- valueI, valueJ := x[i].Value, x[j].Value
-
- spaceCmp := strings.Compare(spaceI, spaceJ)
- localCmp := strings.Compare(localI, localJ)
- valueCmp := strings.Compare(valueI, valueJ)
-
- if spaceCmp == -1 || (spaceCmp == 0 && (localCmp == -1 || (localCmp == 0 && valueCmp == -1))) {
- return true
- }
-
- return false
-}
-
-func (x xmlAttrSlice) Swap(i, j int) {
- x[i], x[j] = x[j], x[i]
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
deleted file mode 100644
index 107c053f8..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/unmarshal.go
+++ /dev/null
@@ -1,299 +0,0 @@
-package xmlutil
-
-import (
- "bytes"
- "encoding/base64"
- "encoding/xml"
- "fmt"
- "io"
- "reflect"
- "strconv"
- "strings"
- "time"
-
- "github.com/aws/aws-sdk-go/aws/awserr"
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-// UnmarshalXMLError unmarshals the XML error from the stream into the value
-// type specified. The value must be a pointer. If the message fails to
-// unmarshal, the message content will be included in the returned error as a
-// awserr.UnmarshalError.
-func UnmarshalXMLError(v interface{}, stream io.Reader) error {
- var errBuf bytes.Buffer
- body := io.TeeReader(stream, &errBuf)
-
- err := xml.NewDecoder(body).Decode(v)
- if err != nil && err != io.EOF {
- return awserr.NewUnmarshalError(err,
- "failed to unmarshal error message", errBuf.Bytes())
- }
-
- return nil
-}
-
-// UnmarshalXML deserializes an xml.Decoder into the container v. V
-// needs to match the shape of the XML expected to be decoded.
-// If the shape doesn't match unmarshaling will fail.
-func UnmarshalXML(v interface{}, d *xml.Decoder, wrapper string) error {
- n, err := XMLToStruct(d, nil)
- if err != nil {
- return err
- }
- if n.Children != nil {
- for _, root := range n.Children {
- for _, c := range root {
- if wrappedChild, ok := c.Children[wrapper]; ok {
- c = wrappedChild[0] // pull out wrapped element
- }
-
- err = parse(reflect.ValueOf(v), c, "")
- if err != nil {
- if err == io.EOF {
- return nil
- }
- return err
- }
- }
- }
- return nil
- }
- return nil
-}
-
-// parse deserializes any value from the XMLNode. The type tag is used to infer the type, or reflect
-// will be used to determine the type from r.
-func parse(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- xml := tag.Get("xml")
- if len(xml) != 0 {
- name := strings.SplitAfterN(xml, ",", 2)[0]
- if name == "-" {
- return nil
- }
- }
-
- rtype := r.Type()
- if rtype.Kind() == reflect.Ptr {
- rtype = rtype.Elem() // check kind of actual element type
- }
-
- t := tag.Get("type")
- if t == "" {
- switch rtype.Kind() {
- case reflect.Struct:
- // also it can't be a time object
- if _, ok := r.Interface().(*time.Time); !ok {
- t = "structure"
- }
- case reflect.Slice:
- // also it can't be a byte slice
- if _, ok := r.Interface().([]byte); !ok {
- t = "list"
- }
- case reflect.Map:
- t = "map"
- }
- }
-
- switch t {
- case "structure":
- if field, ok := rtype.FieldByName("_"); ok {
- tag = field.Tag
- }
- return parseStruct(r, node, tag)
- case "list":
- return parseList(r, node, tag)
- case "map":
- return parseMap(r, node, tag)
- default:
- return parseScalar(r, node, tag)
- }
-}
-
-// parseStruct deserializes a structure and its fields from an XMLNode. Any nested
-// types in the structure will also be deserialized.
-func parseStruct(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- t := r.Type()
- if r.Kind() == reflect.Ptr {
- if r.IsNil() { // create the structure if it's nil
- s := reflect.New(r.Type().Elem())
- r.Set(s)
- r = s
- }
-
- r = r.Elem()
- t = t.Elem()
- }
-
- // unwrap any payloads
- if payload := tag.Get("payload"); payload != "" {
- field, _ := t.FieldByName(payload)
- return parseStruct(r.FieldByName(payload), node, field.Tag)
- }
-
- for i := 0; i < t.NumField(); i++ {
- field := t.Field(i)
- if c := field.Name[0:1]; strings.ToLower(c) == c {
- continue // ignore unexported fields
- }
-
- // figure out what this field is called
- name := field.Name
- if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
- name = field.Tag.Get("locationNameList")
- } else if locName := field.Tag.Get("locationName"); locName != "" {
- name = locName
- }
-
- // try to find the field by name in elements
- elems := node.Children[name]
-
- if elems == nil { // try to find the field in attributes
- if val, ok := node.findElem(name); ok {
- elems = []*XMLNode{{Text: val}}
- }
- }
-
- member := r.FieldByName(field.Name)
- for _, elem := range elems {
- err := parse(member, elem, field.Tag)
- if err != nil {
- return err
- }
- }
- }
- return nil
-}
-
-// parseList deserializes a list of values from an XML node. Each list entry
-// will also be deserialized.
-func parseList(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- t := r.Type()
-
- if tag.Get("flattened") == "" { // look at all item entries
- mname := "member"
- if name := tag.Get("locationNameList"); name != "" {
- mname = name
- }
-
- if Children, ok := node.Children[mname]; ok {
- if r.IsNil() {
- r.Set(reflect.MakeSlice(t, len(Children), len(Children)))
- }
-
- for i, c := range Children {
- err := parse(r.Index(i), c, "")
- if err != nil {
- return err
- }
- }
- }
- } else { // flattened list means this is a single element
- if r.IsNil() {
- r.Set(reflect.MakeSlice(t, 0, 0))
- }
-
- childR := reflect.Zero(t.Elem())
- r.Set(reflect.Append(r, childR))
- err := parse(r.Index(r.Len()-1), node, "")
- if err != nil {
- return err
- }
- }
-
- return nil
-}
-
-// parseMap deserializes a map from an XMLNode. The direct children of the XMLNode
-// will also be deserialized as map entries.
-func parseMap(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- if r.IsNil() {
- r.Set(reflect.MakeMap(r.Type()))
- }
-
- if tag.Get("flattened") == "" { // look at all child entries
- for _, entry := range node.Children["entry"] {
- parseMapEntry(r, entry, tag)
- }
- } else { // this element is itself an entry
- parseMapEntry(r, node, tag)
- }
-
- return nil
-}
-
-// parseMapEntry deserializes a map entry from a XML node.
-func parseMapEntry(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- kname, vname := "key", "value"
- if n := tag.Get("locationNameKey"); n != "" {
- kname = n
- }
- if n := tag.Get("locationNameValue"); n != "" {
- vname = n
- }
-
- keys, ok := node.Children[kname]
- values := node.Children[vname]
- if ok {
- for i, key := range keys {
- keyR := reflect.ValueOf(key.Text)
- value := values[i]
- valueR := reflect.New(r.Type().Elem()).Elem()
-
- parse(valueR, value, "")
- r.SetMapIndex(keyR, valueR)
- }
- }
- return nil
-}
-
-// parseScaller deserializes an XMLNode value into a concrete type based on the
-// interface type of r.
-//
-// Error is returned if the deserialization fails due to invalid type conversion,
-// or unsupported interface type.
-func parseScalar(r reflect.Value, node *XMLNode, tag reflect.StructTag) error {
- switch r.Interface().(type) {
- case *string:
- r.Set(reflect.ValueOf(&node.Text))
- return nil
- case []byte:
- b, err := base64.StdEncoding.DecodeString(node.Text)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(b))
- case *bool:
- v, err := strconv.ParseBool(node.Text)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&v))
- case *int64:
- v, err := strconv.ParseInt(node.Text, 10, 64)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&v))
- case *float64:
- v, err := strconv.ParseFloat(node.Text, 64)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&v))
- case *time.Time:
- format := tag.Get("timestampFormat")
- if len(format) == 0 {
- format = protocol.ISO8601TimeFormatName
- }
-
- t, err := protocol.ParseTime(format, node.Text)
- if err != nil {
- return err
- }
- r.Set(reflect.ValueOf(&t))
- default:
- return fmt.Errorf("unsupported value: %v (%s)", r.Interface(), r.Type())
- }
- return nil
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
deleted file mode 100644
index c85b79fdd..000000000
--- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go
+++ /dev/null
@@ -1,173 +0,0 @@
-package xmlutil
-
-import (
- "encoding/xml"
- "fmt"
- "io"
- "sort"
-)
-
-// A XMLNode contains the values to be encoded or decoded.
-type XMLNode struct {
- Name xml.Name `json:",omitempty"`
- Children map[string][]*XMLNode `json:",omitempty"`
- Text string `json:",omitempty"`
- Attr []xml.Attr `json:",omitempty"`
-
- namespaces map[string]string
- parent *XMLNode
-}
-
-// textEncoder is a string type alias that implemnts the TextMarshaler interface.
-// This alias type is used to ensure that the line feed (\n) (U+000A) is escaped.
-type textEncoder string
-
-func (t textEncoder) MarshalText() ([]byte, error) {
- return []byte(t), nil
-}
-
-// NewXMLElement returns a pointer to a new XMLNode initialized to default values.
-func NewXMLElement(name xml.Name) *XMLNode {
- return &XMLNode{
- Name: name,
- Children: map[string][]*XMLNode{},
- Attr: []xml.Attr{},
- }
-}
-
-// AddChild adds child to the XMLNode.
-func (n *XMLNode) AddChild(child *XMLNode) {
- child.parent = n
- if _, ok := n.Children[child.Name.Local]; !ok {
- n.Children[child.Name.Local] = []*XMLNode{}
- }
- n.Children[child.Name.Local] = append(n.Children[child.Name.Local], child)
-}
-
-// XMLToStruct converts a xml.Decoder stream to XMLNode with nested values.
-func XMLToStruct(d *xml.Decoder, s *xml.StartElement) (*XMLNode, error) {
- out := &XMLNode{}
- for {
- tok, err := d.Token()
- if err != nil {
- if err == io.EOF {
- break
- } else {
- return out, err
- }
- }
-
- if tok == nil {
- break
- }
-
- switch typed := tok.(type) {
- case xml.CharData:
- out.Text = string(typed.Copy())
- case xml.StartElement:
- el := typed.Copy()
- out.Attr = el.Attr
- if out.Children == nil {
- out.Children = map[string][]*XMLNode{}
- }
-
- name := typed.Name.Local
- slice := out.Children[name]
- if slice == nil {
- slice = []*XMLNode{}
- }
- node, e := XMLToStruct(d, &el)
- out.findNamespaces()
- if e != nil {
- return out, e
- }
- node.Name = typed.Name
- node.findNamespaces()
- tempOut := *out
- // Save into a temp variable, simply because out gets squashed during
- // loop iterations
- node.parent = &tempOut
- slice = append(slice, node)
- out.Children[name] = slice
- case xml.EndElement:
- if s != nil && s.Name.Local == typed.Name.Local { // matching end token
- return out, nil
- }
- out = &XMLNode{}
- }
- }
- return out, nil
-}
-
-func (n *XMLNode) findNamespaces() {
- ns := map[string]string{}
- for _, a := range n.Attr {
- if a.Name.Space == "xmlns" {
- ns[a.Value] = a.Name.Local
- }
- }
-
- n.namespaces = ns
-}
-
-func (n *XMLNode) findElem(name string) (string, bool) {
- for node := n; node != nil; node = node.parent {
- for _, a := range node.Attr {
- namespace := a.Name.Space
- if v, ok := node.namespaces[namespace]; ok {
- namespace = v
- }
- if name == fmt.Sprintf("%s:%s", namespace, a.Name.Local) {
- return a.Value, true
- }
- }
- }
- return "", false
-}
-
-// StructToXML writes an XMLNode to a xml.Encoder as tokens.
-func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error {
- // Sort Attributes
- attrs := node.Attr
- if sorted {
- sortedAttrs := make([]xml.Attr, len(attrs))
- for _, k := range node.Attr {
- sortedAttrs = append(sortedAttrs, k)
- }
- sort.Sort(xmlAttrSlice(sortedAttrs))
- attrs = sortedAttrs
- }
-
- startElement := xml.StartElement{Name: node.Name, Attr: attrs}
-
- if node.Text != "" {
- e.EncodeElement(textEncoder(node.Text), startElement)
- return e.Flush()
- }
-
- e.EncodeToken(startElement)
-
- if sorted {
- sortedNames := []string{}
- for k := range node.Children {
- sortedNames = append(sortedNames, k)
- }
- sort.Strings(sortedNames)
-
- for _, k := range sortedNames {
- for _, v := range node.Children[k] {
- StructToXML(e, v, sorted)
- }
- }
- } else {
- for _, c := range node.Children {
- for _, v := range c {
- StructToXML(e, v, sorted)
- }
- }
- }
-
- e.EncodeToken(startElement.End())
-
- return e.Flush()
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go
deleted file mode 100644
index a55357d29..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go
+++ /dev/null
@@ -1,18095 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package kms
-
-import (
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
-)
-
-const opCancelKeyDeletion = "CancelKeyDeletion"
-
-// CancelKeyDeletionRequest generates a "aws/request.Request" representing the
-// client's request for the CancelKeyDeletion operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CancelKeyDeletion for more information on using the CancelKeyDeletion
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CancelKeyDeletionRequest method.
-// req, resp := client.CancelKeyDeletionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CancelKeyDeletion
-func (c *KMS) CancelKeyDeletionRequest(input *CancelKeyDeletionInput) (req *request.Request, output *CancelKeyDeletionOutput) {
- op := &request.Operation{
- Name: opCancelKeyDeletion,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CancelKeyDeletionInput{}
- }
-
- output = &CancelKeyDeletionOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CancelKeyDeletion API operation for AWS Key Management Service.
-//
-// Cancels the deletion of a KMS key. When this operation succeeds, the key
-// state of the KMS key is Disabled. To enable the KMS key, use EnableKey.
-//
-// For more information about scheduling and canceling deletion of a KMS key,
-// see Deleting KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html)
-// in the Key Management Service Developer Guide.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:CancelKeyDeletion (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations: ScheduleKeyDeletion
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation CancelKeyDeletion for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CancelKeyDeletion
-func (c *KMS) CancelKeyDeletion(input *CancelKeyDeletionInput) (*CancelKeyDeletionOutput, error) {
- req, out := c.CancelKeyDeletionRequest(input)
- return out, req.Send()
-}
-
-// CancelKeyDeletionWithContext is the same as CancelKeyDeletion with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CancelKeyDeletion for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) CancelKeyDeletionWithContext(ctx aws.Context, input *CancelKeyDeletionInput, opts ...request.Option) (*CancelKeyDeletionOutput, error) {
- req, out := c.CancelKeyDeletionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opConnectCustomKeyStore = "ConnectCustomKeyStore"
-
-// ConnectCustomKeyStoreRequest generates a "aws/request.Request" representing the
-// client's request for the ConnectCustomKeyStore operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ConnectCustomKeyStore for more information on using the ConnectCustomKeyStore
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ConnectCustomKeyStoreRequest method.
-// req, resp := client.ConnectCustomKeyStoreRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ConnectCustomKeyStore
-func (c *KMS) ConnectCustomKeyStoreRequest(input *ConnectCustomKeyStoreInput) (req *request.Request, output *ConnectCustomKeyStoreOutput) {
- op := &request.Operation{
- Name: opConnectCustomKeyStore,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ConnectCustomKeyStoreInput{}
- }
-
- output = &ConnectCustomKeyStoreOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// ConnectCustomKeyStore API operation for AWS Key Management Service.
-//
-// Connects or reconnects a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// to its associated CloudHSM cluster.
-//
-// The custom key store must be connected before you can create KMS keys in
-// the key store or use the KMS keys it contains. You can disconnect and reconnect
-// a custom key store at any time.
-//
-// To connect a custom key store, its associated CloudHSM cluster must have
-// at least one active HSM. To get the number of active HSMs in a cluster, use
-// the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
-// operation. To add HSMs to the cluster, use the CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html)
-// operation. Also, the kmsuser crypto user (https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser)
-// (CU) must not be logged into the cluster. This prevents KMS from using this
-// account to log in.
-//
-// The connection process can take an extended amount of time to complete; up
-// to 20 minutes. This operation starts the connection process, but it does
-// not wait for it to complete. When it succeeds, this operation quickly returns
-// an HTTP 200 response and a JSON object with no properties. However, this
-// response does not indicate that the custom key store is connected. To get
-// the connection state of the custom key store, use the DescribeCustomKeyStores
-// operation.
-//
-// During the connection process, KMS finds the CloudHSM cluster that is associated
-// with the custom key store, creates the connection infrastructure, connects
-// to the cluster, logs into the CloudHSM client as the kmsuser CU, and rotates
-// its password.
-//
-// The ConnectCustomKeyStore operation might fail for various reasons. To find
-// the reason, use the DescribeCustomKeyStores operation and see the ConnectionErrorCode
-// in the response. For help interpreting the ConnectionErrorCode, see CustomKeyStoresListEntry.
-//
-// To fix the failure, use the DisconnectCustomKeyStore operation to disconnect
-// the custom key store, correct the error, use the UpdateCustomKeyStore operation
-// if necessary, and then use ConnectCustomKeyStore again.
-//
-// If you are having trouble connecting or disconnecting a custom key store,
-// see Troubleshooting a Custom Key Store (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a custom key
-// store in a different Amazon Web Services account.
-//
-// Required permissions: kms:ConnectCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy)
-//
-// Related operations
-//
-// * CreateCustomKeyStore
-//
-// * DeleteCustomKeyStore
-//
-// * DescribeCustomKeyStores
-//
-// * DisconnectCustomKeyStore
-//
-// * UpdateCustomKeyStore
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ConnectCustomKeyStore for usage and error information.
-//
-// Returned Error Types:
-// * CloudHsmClusterNotActiveException
-// The request was rejected because the CloudHSM cluster that is associated
-// with the custom key store is not active. Initialize and activate the cluster
-// and try the command again. For detailed instructions, see Getting Started
-// (https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html)
-// in the CloudHSM User Guide.
-//
-// * CustomKeyStoreInvalidStateException
-// The request was rejected because of the ConnectionState of the custom key
-// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores
-// operation.
-//
-// This exception is thrown under the following conditions:
-//
-// * You requested the CreateKey or GenerateRandom operation in a custom
-// key store that is not connected. These operations are valid only when
-// the custom key store ConnectionState is CONNECTED.
-//
-// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
-// on a custom key store that is not disconnected. This operation is valid
-// only when the custom key store ConnectionState is DISCONNECTED.
-//
-// * You requested the ConnectCustomKeyStore operation on a custom key store
-// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
-// for all other ConnectionState values.
-//
-// * CustomKeyStoreNotFoundException
-// The request was rejected because KMS cannot find a custom key store with
-// the specified key store name or ID.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * CloudHsmClusterInvalidConfigurationException
-// The request was rejected because the associated CloudHSM cluster did not
-// meet the configuration requirements for a custom key store.
-//
-// * The cluster must be configured with private subnets in at least two
-// different Availability Zones in the Region.
-//
-// * The security group for the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// (cloudhsm-cluster--sg) must include inbound rules and outbound
-// rules that allow TCP traffic on ports 2223-2225. The Source in the inbound
-// rules and the Destination in the outbound rules must match the security
-// group ID. These rules are set by default when you create the cluster.
-// Do not delete or change them. To get information about a particular security
-// group, use the DescribeSecurityGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
-// operation.
-//
-// * The cluster must contain at least as many HSMs as the operation requires.
-// To add HSMs, use the CloudHSM CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html)
-// operation. For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey
-// operations, the CloudHSM cluster must have at least two active HSMs, each
-// in a different Availability Zone. For the ConnectCustomKeyStore operation,
-// the CloudHSM must contain at least one active HSM.
-//
-// For information about the requirements for an CloudHSM cluster that is associated
-// with a custom key store, see Assemble the Prerequisites (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore)
-// in the Key Management Service Developer Guide. For information about creating
-// a private subnet for an CloudHSM cluster, see Create a Private Subnet (https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html)
-// in the CloudHSM User Guide. For information about cluster security groups,
-// see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// in the CloudHSM User Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ConnectCustomKeyStore
-func (c *KMS) ConnectCustomKeyStore(input *ConnectCustomKeyStoreInput) (*ConnectCustomKeyStoreOutput, error) {
- req, out := c.ConnectCustomKeyStoreRequest(input)
- return out, req.Send()
-}
-
-// ConnectCustomKeyStoreWithContext is the same as ConnectCustomKeyStore with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ConnectCustomKeyStore for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ConnectCustomKeyStoreWithContext(ctx aws.Context, input *ConnectCustomKeyStoreInput, opts ...request.Option) (*ConnectCustomKeyStoreOutput, error) {
- req, out := c.ConnectCustomKeyStoreRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateAlias = "CreateAlias"
-
-// CreateAliasRequest generates a "aws/request.Request" representing the
-// client's request for the CreateAlias operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateAlias for more information on using the CreateAlias
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateAliasRequest method.
-// req, resp := client.CreateAliasRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateAlias
-func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, output *CreateAliasOutput) {
- op := &request.Operation{
- Name: opCreateAlias,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateAliasInput{}
- }
-
- output = &CreateAliasOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// CreateAlias API operation for AWS Key Management Service.
-//
-// Creates a friendly name for a KMS key.
-//
-// Adding, deleting, or updating an alias can allow or deny permission to the
-// KMS key. For details, see Using ABAC in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html)
-// in the Key Management Service Developer Guide.
-//
-// You can use an alias to identify a KMS key in the KMS console, in the DescribeKey
-// operation and in cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations),
-// such as Encrypt and GenerateDataKey. You can also change the KMS key that's
-// associated with the alias (UpdateAlias) or delete the alias (DeleteAlias)
-// at any time. These operations don't affect the underlying KMS key.
-//
-// You can associate the alias with any customer managed key in the same Amazon
-// Web Services Region. Each alias is associated with only one KMS key at a
-// time, but a KMS key can have multiple aliases. A valid KMS key is required.
-// You can't create an alias without a KMS key.
-//
-// The alias must be unique in the account and Region, but you can have aliases
-// with the same name in different Regions. For detailed information about aliases,
-// see Using aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html)
-// in the Key Management Service Developer Guide.
-//
-// This operation does not return a response. To get the alias that you created,
-// use the ListAliases operation.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on an alias in a
-// different Amazon Web Services account.
-//
-// Required permissions
-//
-// * kms:CreateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// on the alias (IAM policy).
-//
-// * kms:CreateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// on the KMS key (key policy).
-//
-// For details, see Controlling access to aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access)
-// in the Key Management Service Developer Guide.
-//
-// Related operations:
-//
-// * DeleteAlias
-//
-// * ListAliases
-//
-// * UpdateAlias
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation CreateAlias for usage and error information.
-//
-// Returned Error Types:
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * AlreadyExistsException
-// The request was rejected because it attempted to create a resource that already
-// exists.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidAliasNameException
-// The request was rejected because the specified alias name is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * LimitExceededException
-// The request was rejected because a quota was exceeded. For more information,
-// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
-// in the Key Management Service Developer Guide.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateAlias
-func (c *KMS) CreateAlias(input *CreateAliasInput) (*CreateAliasOutput, error) {
- req, out := c.CreateAliasRequest(input)
- return out, req.Send()
-}
-
-// CreateAliasWithContext is the same as CreateAlias with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateAlias for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) CreateAliasWithContext(ctx aws.Context, input *CreateAliasInput, opts ...request.Option) (*CreateAliasOutput, error) {
- req, out := c.CreateAliasRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateCustomKeyStore = "CreateCustomKeyStore"
-
-// CreateCustomKeyStoreRequest generates a "aws/request.Request" representing the
-// client's request for the CreateCustomKeyStore operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateCustomKeyStore for more information on using the CreateCustomKeyStore
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateCustomKeyStoreRequest method.
-// req, resp := client.CreateCustomKeyStoreRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateCustomKeyStore
-func (c *KMS) CreateCustomKeyStoreRequest(input *CreateCustomKeyStoreInput) (req *request.Request, output *CreateCustomKeyStoreOutput) {
- op := &request.Operation{
- Name: opCreateCustomKeyStore,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateCustomKeyStoreInput{}
- }
-
- output = &CreateCustomKeyStoreOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateCustomKeyStore API operation for AWS Key Management Service.
-//
-// Creates a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// that is associated with an CloudHSM cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/clusters.html)
-// that you own and manage.
-//
-// This operation is part of the Custom Key Store feature (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// feature in KMS, which combines the convenience and extensive integration
-// of KMS with the isolation and control of a single-tenant key store.
-//
-// Before you create the custom key store, you must assemble the required elements,
-// including an CloudHSM cluster that fulfills the requirements for a custom
-// key store. For details about the required elements, see Assemble the Prerequisites
-// (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore)
-// in the Key Management Service Developer Guide.
-//
-// When the operation completes successfully, it returns the ID of the new custom
-// key store. Before you can use your new custom key store, you need to use
-// the ConnectCustomKeyStore operation to connect the new key store to its CloudHSM
-// cluster. Even if you are not going to use your custom key store immediately,
-// you might want to connect it to verify that all settings are correct and
-// then disconnect it until you are ready to use it.
-//
-// For help with failures, see Troubleshooting a Custom Key Store (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a custom key
-// store in a different Amazon Web Services account.
-//
-// Required permissions: kms:CreateCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy).
-//
-// Related operations:
-//
-// * ConnectCustomKeyStore
-//
-// * DeleteCustomKeyStore
-//
-// * DescribeCustomKeyStores
-//
-// * DisconnectCustomKeyStore
-//
-// * UpdateCustomKeyStore
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation CreateCustomKeyStore for usage and error information.
-//
-// Returned Error Types:
-// * CloudHsmClusterInUseException
-// The request was rejected because the specified CloudHSM cluster is already
-// associated with a custom key store or it shares a backup history with a cluster
-// that is associated with a custom key store. Each custom key store must be
-// associated with a different CloudHSM cluster.
-//
-// Clusters that share a backup history have the same cluster certificate. To
-// view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
-// operation.
-//
-// * CustomKeyStoreNameInUseException
-// The request was rejected because the specified custom key store name is already
-// assigned to another custom key store in the account. Try again with a custom
-// key store name that is unique in the account.
-//
-// * CloudHsmClusterNotFoundException
-// The request was rejected because KMS cannot find the CloudHSM cluster with
-// the specified cluster ID. Retry the request with a different cluster ID.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * CloudHsmClusterNotActiveException
-// The request was rejected because the CloudHSM cluster that is associated
-// with the custom key store is not active. Initialize and activate the cluster
-// and try the command again. For detailed instructions, see Getting Started
-// (https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html)
-// in the CloudHSM User Guide.
-//
-// * IncorrectTrustAnchorException
-// The request was rejected because the trust anchor certificate in the request
-// is not the trust anchor certificate for the specified CloudHSM cluster.
-//
-// When you initialize the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr),
-// you create the trust anchor certificate and save it in the customerCA.crt
-// file.
-//
-// * CloudHsmClusterInvalidConfigurationException
-// The request was rejected because the associated CloudHSM cluster did not
-// meet the configuration requirements for a custom key store.
-//
-// * The cluster must be configured with private subnets in at least two
-// different Availability Zones in the Region.
-//
-// * The security group for the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// (cloudhsm-cluster--sg) must include inbound rules and outbound
-// rules that allow TCP traffic on ports 2223-2225. The Source in the inbound
-// rules and the Destination in the outbound rules must match the security
-// group ID. These rules are set by default when you create the cluster.
-// Do not delete or change them. To get information about a particular security
-// group, use the DescribeSecurityGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
-// operation.
-//
-// * The cluster must contain at least as many HSMs as the operation requires.
-// To add HSMs, use the CloudHSM CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html)
-// operation. For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey
-// operations, the CloudHSM cluster must have at least two active HSMs, each
-// in a different Availability Zone. For the ConnectCustomKeyStore operation,
-// the CloudHSM must contain at least one active HSM.
-//
-// For information about the requirements for an CloudHSM cluster that is associated
-// with a custom key store, see Assemble the Prerequisites (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore)
-// in the Key Management Service Developer Guide. For information about creating
-// a private subnet for an CloudHSM cluster, see Create a Private Subnet (https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html)
-// in the CloudHSM User Guide. For information about cluster security groups,
-// see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// in the CloudHSM User Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateCustomKeyStore
-func (c *KMS) CreateCustomKeyStore(input *CreateCustomKeyStoreInput) (*CreateCustomKeyStoreOutput, error) {
- req, out := c.CreateCustomKeyStoreRequest(input)
- return out, req.Send()
-}
-
-// CreateCustomKeyStoreWithContext is the same as CreateCustomKeyStore with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateCustomKeyStore for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) CreateCustomKeyStoreWithContext(ctx aws.Context, input *CreateCustomKeyStoreInput, opts ...request.Option) (*CreateCustomKeyStoreOutput, error) {
- req, out := c.CreateCustomKeyStoreRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateGrant = "CreateGrant"
-
-// CreateGrantRequest generates a "aws/request.Request" representing the
-// client's request for the CreateGrant operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateGrant for more information on using the CreateGrant
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateGrantRequest method.
-// req, resp := client.CreateGrantRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateGrant
-func (c *KMS) CreateGrantRequest(input *CreateGrantInput) (req *request.Request, output *CreateGrantOutput) {
- op := &request.Operation{
- Name: opCreateGrant,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateGrantInput{}
- }
-
- output = &CreateGrantOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateGrant API operation for AWS Key Management Service.
-//
-// Adds a grant to a KMS key.
-//
-// A grant is a policy instrument that allows Amazon Web Services principals
-// to use KMS keys in cryptographic operations. It also can allow them to view
-// a KMS key (DescribeKey) and create and manage grants. When authorizing access
-// to a KMS key, grants are considered along with key policies and IAM policies.
-// Grants are often used for temporary permissions because you can create one,
-// use its permissions, and delete it without changing your key policies or
-// IAM policies.
-//
-// For detailed information about grants, including grant terminology, see Using
-// grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html)
-// in the Key Management Service Developer Guide . For examples of working with
-// grants in several programming languages, see Programming grants (https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html).
-//
-// The CreateGrant operation returns a GrantToken and a GrantId.
-//
-// * When you create, retire, or revoke a grant, there might be a brief delay,
-// usually less than five minutes, until the grant is available throughout
-// KMS. This state is known as eventual consistency. Once the grant has achieved
-// eventual consistency, the grantee principal can use the permissions in
-// the grant without identifying the grant. However, to use the permissions
-// in the grant immediately, use the GrantToken that CreateGrant returns.
-// For details, see Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
-// in the Key Management Service Developer Guide .
-//
-// * The CreateGrant operation also returns a GrantId. You can use the GrantId
-// and a key identifier to identify the grant in the RetireGrant and RevokeGrant
-// operations. To find the grant ID, use the ListGrants or ListRetirableGrants
-// operations.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. To perform this operation on a KMS key in a different
-// Amazon Web Services account, specify the key ARN in the value of the KeyId
-// parameter.
-//
-// Required permissions: kms:CreateGrant (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * ListGrants
-//
-// * ListRetirableGrants
-//
-// * RetireGrant
-//
-// * RevokeGrant
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation CreateGrant for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * LimitExceededException
-// The request was rejected because a quota was exceeded. For more information,
-// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
-// in the Key Management Service Developer Guide.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateGrant
-func (c *KMS) CreateGrant(input *CreateGrantInput) (*CreateGrantOutput, error) {
- req, out := c.CreateGrantRequest(input)
- return out, req.Send()
-}
-
-// CreateGrantWithContext is the same as CreateGrant with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateGrant for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) CreateGrantWithContext(ctx aws.Context, input *CreateGrantInput, opts ...request.Option) (*CreateGrantOutput, error) {
- req, out := c.CreateGrantRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opCreateKey = "CreateKey"
-
-// CreateKeyRequest generates a "aws/request.Request" representing the
-// client's request for the CreateKey operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See CreateKey for more information on using the CreateKey
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the CreateKeyRequest method.
-// req, resp := client.CreateKeyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKey
-func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, output *CreateKeyOutput) {
- op := &request.Operation{
- Name: opCreateKey,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &CreateKeyInput{}
- }
-
- output = &CreateKeyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// CreateKey API operation for AWS Key Management Service.
-//
-// Creates a unique customer managed KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms-keys)
-// in your Amazon Web Services account and Region.
-//
-// KMS is replacing the term customer master key (CMK) with KMS key and KMS
-// key. The concept has not changed. To prevent breaking changes, KMS is keeping
-// some variations of this term.
-//
-// You can use the CreateKey operation to create symmetric or asymmetric KMS
-// keys.
-//
-// * Symmetric KMS keys contain a 256-bit symmetric key that never leaves
-// KMS unencrypted. To use the KMS key, you must call KMS. You can use a
-// symmetric KMS key to encrypt and decrypt small amounts of data, but they
-// are typically used to generate data keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-keys)
-// and data keys pairs (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#data-key-pairs).
-// For details, see GenerateDataKey and GenerateDataKeyPair.
-//
-// * Asymmetric KMS keys can contain an RSA key pair or an Elliptic Curve
-// (ECC) key pair. The private key in an asymmetric KMS key never leaves
-// KMS unencrypted. However, you can use the GetPublicKey operation to download
-// the public key so it can be used outside of KMS. KMS keys with RSA key
-// pairs can be used to encrypt or decrypt data or sign and verify messages
-// (but not both). KMS keys with ECC key pairs can be used only to sign and
-// verify messages.
-//
-// For information about symmetric and asymmetric KMS keys, see Using Symmetric
-// and Asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
-// in the Key Management Service Developer Guide.
-//
-// To create different types of KMS keys, use the following guidance:
-//
-// Asymmetric KMS keys
-//
-// To create an asymmetric KMS key, use the KeySpec parameter to specify the
-// type of key material in the KMS key. Then, use the KeyUsage parameter to
-// determine whether the KMS key will be used to encrypt and decrypt or sign
-// and verify. You can't change these properties after the KMS key is created.
-//
-// Symmetric KMS keys
-//
-// When creating a symmetric KMS key, you don't need to specify the KeySpec
-// or KeyUsage parameters. The default value for KeySpec, SYMMETRIC_DEFAULT,
-// and the default value for KeyUsage, ENCRYPT_DECRYPT, are the only valid values
-// for symmetric KMS keys.
-//
-// Multi-Region primary keys
-//
-// Imported key material
-//
-// To create a multi-Region primary key in the local Amazon Web Services Region,
-// use the MultiRegion parameter with a value of True. To create a multi-Region
-// replica key, that is, a KMS key with the same key ID and key material as
-// a primary key, but in a different Amazon Web Services Region, use the ReplicateKey
-// operation. To change a replica key to a primary key, and its primary key
-// to a replica key, use the UpdatePrimaryRegion operation.
-//
-// This operation supports multi-Region keys, an KMS feature that lets you create
-// multiple interoperable KMS keys in different Amazon Web Services Regions.
-// Because these KMS keys have the same key ID, key material, and other metadata,
-// you can use them interchangeably to encrypt data in one Amazon Web Services
-// Region and decrypt it in a different Amazon Web Services Region without re-encrypting
-// the data or making a cross-Region call. For more information about multi-Region
-// keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
-// in the Key Management Service Developer Guide.
-//
-// You can create symmetric and asymmetric multi-Region keys and multi-Region
-// keys with imported key material. You cannot create multi-Region keys in a
-// custom key store.
-//
-// To import your own key material, begin by creating a symmetric KMS key with
-// no key material. To do this, use the Origin parameter of CreateKey with a
-// value of EXTERNAL. Next, use GetParametersForImport operation to get a public
-// key and import token, and use the public key to encrypt your key material.
-// Then, use ImportKeyMaterial with your import token to import the key material.
-// For step-by-step instructions, see Importing Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html)
-// in the Key Management Service Developer Guide . You cannot import the key
-// material into an asymmetric KMS key.
-//
-// To create a multi-Region primary key with imported key material, use the
-// Origin parameter of CreateKey with a value of EXTERNAL and the MultiRegion
-// parameter with a value of True. To create replicas of the multi-Region primary
-// key, use the ReplicateKey operation. For more information about multi-Region
-// keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
-// in the Key Management Service Developer Guide.
-//
-// Custom key store
-//
-// To create a symmetric KMS key in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html),
-// use the CustomKeyStoreId parameter to specify the custom key store. You must
-// also use the Origin parameter with a value of AWS_CLOUDHSM. The CloudHSM
-// cluster that is associated with the custom key store must have at least two
-// active HSMs in different Availability Zones in the Amazon Web Services Region.
-//
-// You cannot create an asymmetric KMS key in a custom key store. For information
-// about custom key stores in KMS see Using Custom Key Stores (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// in the Key Management Service Developer Guide .
-//
-// Cross-account use: No. You cannot use this operation to create a KMS key
-// in a different Amazon Web Services account.
-//
-// Required permissions: kms:CreateKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy). To use the Tags parameter, kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy). For examples and information about related permissions, see
-// Allow a user to create KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key)
-// in the Key Management Service Developer Guide.
-//
-// Related operations:
-//
-// * DescribeKey
-//
-// * ListKeys
-//
-// * ScheduleKeyDeletion
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation CreateKey for usage and error information.
-//
-// Returned Error Types:
-// * MalformedPolicyDocumentException
-// The request was rejected because the specified policy is not syntactically
-// or semantically correct.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * LimitExceededException
-// The request was rejected because a quota was exceeded. For more information,
-// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
-// in the Key Management Service Developer Guide.
-//
-// * TagException
-// The request was rejected because one or more tags are not valid.
-//
-// * CustomKeyStoreNotFoundException
-// The request was rejected because KMS cannot find a custom key store with
-// the specified key store name or ID.
-//
-// * CustomKeyStoreInvalidStateException
-// The request was rejected because of the ConnectionState of the custom key
-// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores
-// operation.
-//
-// This exception is thrown under the following conditions:
-//
-// * You requested the CreateKey or GenerateRandom operation in a custom
-// key store that is not connected. These operations are valid only when
-// the custom key store ConnectionState is CONNECTED.
-//
-// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
-// on a custom key store that is not disconnected. This operation is valid
-// only when the custom key store ConnectionState is DISCONNECTED.
-//
-// * You requested the ConnectCustomKeyStore operation on a custom key store
-// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
-// for all other ConnectionState values.
-//
-// * CloudHsmClusterInvalidConfigurationException
-// The request was rejected because the associated CloudHSM cluster did not
-// meet the configuration requirements for a custom key store.
-//
-// * The cluster must be configured with private subnets in at least two
-// different Availability Zones in the Region.
-//
-// * The security group for the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// (cloudhsm-cluster--sg) must include inbound rules and outbound
-// rules that allow TCP traffic on ports 2223-2225. The Source in the inbound
-// rules and the Destination in the outbound rules must match the security
-// group ID. These rules are set by default when you create the cluster.
-// Do not delete or change them. To get information about a particular security
-// group, use the DescribeSecurityGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
-// operation.
-//
-// * The cluster must contain at least as many HSMs as the operation requires.
-// To add HSMs, use the CloudHSM CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html)
-// operation. For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey
-// operations, the CloudHSM cluster must have at least two active HSMs, each
-// in a different Availability Zone. For the ConnectCustomKeyStore operation,
-// the CloudHSM must contain at least one active HSM.
-//
-// For information about the requirements for an CloudHSM cluster that is associated
-// with a custom key store, see Assemble the Prerequisites (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore)
-// in the Key Management Service Developer Guide. For information about creating
-// a private subnet for an CloudHSM cluster, see Create a Private Subnet (https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html)
-// in the CloudHSM User Guide. For information about cluster security groups,
-// see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// in the CloudHSM User Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/CreateKey
-func (c *KMS) CreateKey(input *CreateKeyInput) (*CreateKeyOutput, error) {
- req, out := c.CreateKeyRequest(input)
- return out, req.Send()
-}
-
-// CreateKeyWithContext is the same as CreateKey with the addition of
-// the ability to pass a context and additional request options.
-//
-// See CreateKey for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) CreateKeyWithContext(ctx aws.Context, input *CreateKeyInput, opts ...request.Option) (*CreateKeyOutput, error) {
- req, out := c.CreateKeyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDecrypt = "Decrypt"
-
-// DecryptRequest generates a "aws/request.Request" representing the
-// client's request for the Decrypt operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See Decrypt for more information on using the Decrypt
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DecryptRequest method.
-// req, resp := client.DecryptRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Decrypt
-func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output *DecryptOutput) {
- op := &request.Operation{
- Name: opDecrypt,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DecryptInput{}
- }
-
- output = &DecryptOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// Decrypt API operation for AWS Key Management Service.
-//
-// Decrypts ciphertext that was encrypted by a KMS key using any of the following
-// operations:
-//
-// * Encrypt
-//
-// * GenerateDataKey
-//
-// * GenerateDataKeyPair
-//
-// * GenerateDataKeyWithoutPlaintext
-//
-// * GenerateDataKeyPairWithoutPlaintext
-//
-// You can use this operation to decrypt ciphertext that was encrypted under
-// a symmetric or asymmetric KMS key. When the KMS key is asymmetric, you must
-// specify the KMS key and the encryption algorithm that was used to encrypt
-// the ciphertext. For information about symmetric and asymmetric KMS keys,
-// see Using Symmetric and Asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
-// in the Key Management Service Developer Guide.
-//
-// The Decrypt operation also decrypts ciphertext that was encrypted outside
-// of KMS by the public key in an KMS asymmetric KMS key. However, it cannot
-// decrypt ciphertext produced by other libraries, such as the Amazon Web Services
-// Encryption SDK (https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/)
-// or Amazon S3 client-side encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html).
-// These libraries return a ciphertext format that is incompatible with KMS.
-//
-// If the ciphertext was encrypted under a symmetric KMS key, the KeyId parameter
-// is optional. KMS can get this information from metadata that it adds to the
-// symmetric ciphertext blob. This feature adds durability to your implementation
-// by ensuring that authorized users can decrypt ciphertext decades after it
-// was encrypted, even if they've lost track of the key ID. However, specifying
-// the KMS key is always recommended as a best practice. When you use the KeyId
-// parameter to specify a KMS key, KMS only uses the KMS key you specify. If
-// the ciphertext was encrypted under a different KMS key, the Decrypt operation
-// fails. This practice ensures that you use the KMS key that you intend.
-//
-// Whenever possible, use key policies to give users permission to call the
-// Decrypt operation on a particular KMS key, instead of using IAM policies.
-// Otherwise, you might create an IAM user policy that gives the user Decrypt
-// permission on all KMS keys. This user could decrypt ciphertext that was encrypted
-// by KMS keys in other accounts if the key policy for the cross-account KMS
-// key permits it. If you must use an IAM policy for Decrypt permissions, limit
-// the user to particular KMS keys or particular trusted accounts. For details,
-// see Best practices for IAM policies (https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policies-best-practices)
-// in the Key Management Service Developer Guide.
-//
-// Applications in Amazon Web Services Nitro Enclaves can call this operation
-// by using the Amazon Web Services Nitro Enclaves Development Kit (https://github.com/aws/aws-nitro-enclaves-sdk-c).
-// For information about the supporting parameters, see How Amazon Web Services
-// Nitro Enclaves use KMS (https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html)
-// in the Key Management Service Developer Guide.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:Decrypt (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * Encrypt
-//
-// * GenerateDataKey
-//
-// * GenerateDataKeyPair
-//
-// * ReEncrypt
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation Decrypt for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * InvalidCiphertextException
-// From the Decrypt or ReEncrypt operation, the request was rejected because
-// the specified ciphertext, or additional authenticated data incorporated into
-// the ciphertext, such as the encryption context, is corrupted, missing, or
-// otherwise invalid.
-//
-// From the ImportKeyMaterial operation, the request was rejected because KMS
-// could not decrypt the encrypted (wrapped) key material.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * IncorrectKeyException
-// The request was rejected because the specified KMS key cannot decrypt the
-// data. The KeyId in a Decrypt request and the SourceKeyId in a ReEncrypt request
-// must identify the same KMS key that was used to encrypt the ciphertext.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Decrypt
-func (c *KMS) Decrypt(input *DecryptInput) (*DecryptOutput, error) {
- req, out := c.DecryptRequest(input)
- return out, req.Send()
-}
-
-// DecryptWithContext is the same as Decrypt with the addition of
-// the ability to pass a context and additional request options.
-//
-// See Decrypt for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) DecryptWithContext(ctx aws.Context, input *DecryptInput, opts ...request.Option) (*DecryptOutput, error) {
- req, out := c.DecryptRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteAlias = "DeleteAlias"
-
-// DeleteAliasRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteAlias operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteAlias for more information on using the DeleteAlias
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteAliasRequest method.
-// req, resp := client.DeleteAliasRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteAlias
-func (c *KMS) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, output *DeleteAliasOutput) {
- op := &request.Operation{
- Name: opDeleteAlias,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteAliasInput{}
- }
-
- output = &DeleteAliasOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteAlias API operation for AWS Key Management Service.
-//
-// Deletes the specified alias.
-//
-// Adding, deleting, or updating an alias can allow or deny permission to the
-// KMS key. For details, see Using ABAC in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html)
-// in the Key Management Service Developer Guide.
-//
-// Because an alias is not a property of a KMS key, you can delete and change
-// the aliases of a KMS key without affecting the KMS key. Also, aliases do
-// not appear in the response from the DescribeKey operation. To get the aliases
-// of all KMS keys, use the ListAliases operation.
-//
-// Each KMS key can have multiple aliases. To change the alias of a KMS key,
-// use DeleteAlias to delete the current alias and CreateAlias to create a new
-// alias. To associate an existing alias with a different KMS key, call UpdateAlias.
-//
-// Cross-account use: No. You cannot perform this operation on an alias in a
-// different Amazon Web Services account.
-//
-// Required permissions
-//
-// * kms:DeleteAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// on the alias (IAM policy).
-//
-// * kms:DeleteAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// on the KMS key (key policy).
-//
-// For details, see Controlling access to aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access)
-// in the Key Management Service Developer Guide.
-//
-// Related operations:
-//
-// * CreateAlias
-//
-// * ListAliases
-//
-// * UpdateAlias
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation DeleteAlias for usage and error information.
-//
-// Returned Error Types:
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteAlias
-func (c *KMS) DeleteAlias(input *DeleteAliasInput) (*DeleteAliasOutput, error) {
- req, out := c.DeleteAliasRequest(input)
- return out, req.Send()
-}
-
-// DeleteAliasWithContext is the same as DeleteAlias with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteAlias for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) DeleteAliasWithContext(ctx aws.Context, input *DeleteAliasInput, opts ...request.Option) (*DeleteAliasOutput, error) {
- req, out := c.DeleteAliasRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteCustomKeyStore = "DeleteCustomKeyStore"
-
-// DeleteCustomKeyStoreRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteCustomKeyStore operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteCustomKeyStore for more information on using the DeleteCustomKeyStore
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteCustomKeyStoreRequest method.
-// req, resp := client.DeleteCustomKeyStoreRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteCustomKeyStore
-func (c *KMS) DeleteCustomKeyStoreRequest(input *DeleteCustomKeyStoreInput) (req *request.Request, output *DeleteCustomKeyStoreOutput) {
- op := &request.Operation{
- Name: opDeleteCustomKeyStore,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteCustomKeyStoreInput{}
- }
-
- output = &DeleteCustomKeyStoreOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteCustomKeyStore API operation for AWS Key Management Service.
-//
-// Deletes a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
-// This operation does not delete the CloudHSM cluster that is associated with
-// the custom key store, or affect any users or keys in the cluster.
-//
-// The custom key store that you delete cannot contain any KMS KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys).
-// Before deleting the key store, verify that you will never need to use any
-// of the KMS keys in the key store for any cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations).
-// Then, use ScheduleKeyDeletion to delete the KMS keys from the key store.
-// When the scheduled waiting period expires, the ScheduleKeyDeletion operation
-// deletes the KMS keys. Then it makes a best effort to delete the key material
-// from the associated cluster. However, you might need to manually delete the
-// orphaned key material (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key)
-// from the cluster and its backups.
-//
-// After all KMS keys are deleted from KMS, use DisconnectCustomKeyStore to
-// disconnect the key store from KMS. Then, you can delete the custom key store.
-//
-// Instead of deleting the custom key store, consider using DisconnectCustomKeyStore
-// to disconnect it from KMS. While the key store is disconnected, you cannot
-// create or use the KMS keys in the key store. But, you do not need to delete
-// KMS keys and you can reconnect a disconnected custom key store at any time.
-//
-// If the operation succeeds, it returns a JSON object with no properties.
-//
-// This operation is part of the Custom Key Store feature (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// feature in KMS, which combines the convenience and extensive integration
-// of KMS with the isolation and control of a single-tenant key store.
-//
-// Cross-account use: No. You cannot perform this operation on a custom key
-// store in a different Amazon Web Services account.
-//
-// Required permissions: kms:DeleteCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy)
-//
-// Related operations:
-//
-// * ConnectCustomKeyStore
-//
-// * CreateCustomKeyStore
-//
-// * DescribeCustomKeyStores
-//
-// * DisconnectCustomKeyStore
-//
-// * UpdateCustomKeyStore
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation DeleteCustomKeyStore for usage and error information.
-//
-// Returned Error Types:
-// * CustomKeyStoreHasCMKsException
-// The request was rejected because the custom key store contains KMS keys.
-// After verifying that you do not need to use the KMS keys, use the ScheduleKeyDeletion
-// operation to delete the KMS keys. After they are deleted, you can delete
-// the custom key store.
-//
-// * CustomKeyStoreInvalidStateException
-// The request was rejected because of the ConnectionState of the custom key
-// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores
-// operation.
-//
-// This exception is thrown under the following conditions:
-//
-// * You requested the CreateKey or GenerateRandom operation in a custom
-// key store that is not connected. These operations are valid only when
-// the custom key store ConnectionState is CONNECTED.
-//
-// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
-// on a custom key store that is not disconnected. This operation is valid
-// only when the custom key store ConnectionState is DISCONNECTED.
-//
-// * You requested the ConnectCustomKeyStore operation on a custom key store
-// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
-// for all other ConnectionState values.
-//
-// * CustomKeyStoreNotFoundException
-// The request was rejected because KMS cannot find a custom key store with
-// the specified key store name or ID.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteCustomKeyStore
-func (c *KMS) DeleteCustomKeyStore(input *DeleteCustomKeyStoreInput) (*DeleteCustomKeyStoreOutput, error) {
- req, out := c.DeleteCustomKeyStoreRequest(input)
- return out, req.Send()
-}
-
-// DeleteCustomKeyStoreWithContext is the same as DeleteCustomKeyStore with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteCustomKeyStore for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) DeleteCustomKeyStoreWithContext(ctx aws.Context, input *DeleteCustomKeyStoreInput, opts ...request.Option) (*DeleteCustomKeyStoreOutput, error) {
- req, out := c.DeleteCustomKeyStoreRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDeleteImportedKeyMaterial = "DeleteImportedKeyMaterial"
-
-// DeleteImportedKeyMaterialRequest generates a "aws/request.Request" representing the
-// client's request for the DeleteImportedKeyMaterial operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DeleteImportedKeyMaterial for more information on using the DeleteImportedKeyMaterial
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DeleteImportedKeyMaterialRequest method.
-// req, resp := client.DeleteImportedKeyMaterialRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteImportedKeyMaterial
-func (c *KMS) DeleteImportedKeyMaterialRequest(input *DeleteImportedKeyMaterialInput) (req *request.Request, output *DeleteImportedKeyMaterialOutput) {
- op := &request.Operation{
- Name: opDeleteImportedKeyMaterial,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DeleteImportedKeyMaterialInput{}
- }
-
- output = &DeleteImportedKeyMaterialOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DeleteImportedKeyMaterial API operation for AWS Key Management Service.
-//
-// Deletes key material that you previously imported. This operation makes the
-// specified KMS key unusable. For more information about importing key material
-// into KMS, see Importing Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html)
-// in the Key Management Service Developer Guide.
-//
-// When the specified KMS key is in the PendingDeletion state, this operation
-// does not change the KMS key's state. Otherwise, it changes the KMS key's
-// state to PendingImport.
-//
-// After you delete key material, you can use ImportKeyMaterial to reimport
-// the same key material into the KMS key.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:DeleteImportedKeyMaterial (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * GetParametersForImport
-//
-// * ImportKeyMaterial
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation DeleteImportedKeyMaterial for usage and error information.
-//
-// Returned Error Types:
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeleteImportedKeyMaterial
-func (c *KMS) DeleteImportedKeyMaterial(input *DeleteImportedKeyMaterialInput) (*DeleteImportedKeyMaterialOutput, error) {
- req, out := c.DeleteImportedKeyMaterialRequest(input)
- return out, req.Send()
-}
-
-// DeleteImportedKeyMaterialWithContext is the same as DeleteImportedKeyMaterial with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DeleteImportedKeyMaterial for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) DeleteImportedKeyMaterialWithContext(ctx aws.Context, input *DeleteImportedKeyMaterialInput, opts ...request.Option) (*DeleteImportedKeyMaterialOutput, error) {
- req, out := c.DeleteImportedKeyMaterialRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeCustomKeyStores = "DescribeCustomKeyStores"
-
-// DescribeCustomKeyStoresRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeCustomKeyStores operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeCustomKeyStores for more information on using the DescribeCustomKeyStores
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeCustomKeyStoresRequest method.
-// req, resp := client.DescribeCustomKeyStoresRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeCustomKeyStores
-func (c *KMS) DescribeCustomKeyStoresRequest(input *DescribeCustomKeyStoresInput) (req *request.Request, output *DescribeCustomKeyStoresOutput) {
- op := &request.Operation{
- Name: opDescribeCustomKeyStores,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeCustomKeyStoresInput{}
- }
-
- output = &DescribeCustomKeyStoresOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeCustomKeyStores API operation for AWS Key Management Service.
-//
-// Gets information about custom key stores (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// in the account and Region.
-//
-// This operation is part of the Custom Key Store feature (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// feature in KMS, which combines the convenience and extensive integration
-// of KMS with the isolation and control of a single-tenant key store.
-//
-// By default, this operation returns information about all custom key stores
-// in the account and Region. To get only information about a particular custom
-// key store, use either the CustomKeyStoreName or CustomKeyStoreId parameter
-// (but not both).
-//
-// To determine whether the custom key store is connected to its CloudHSM cluster,
-// use the ConnectionState element in the response. If an attempt to connect
-// the custom key store failed, the ConnectionState value is FAILED and the
-// ConnectionErrorCode element in the response indicates the cause of the failure.
-// For help interpreting the ConnectionErrorCode, see CustomKeyStoresListEntry.
-//
-// Custom key stores have a DISCONNECTED connection state if the key store has
-// never been connected or you use the DisconnectCustomKeyStore operation to
-// disconnect it. If your custom key store state is CONNECTED but you are having
-// trouble using it, make sure that its associated CloudHSM cluster is active
-// and contains the minimum number of HSMs required for the operation, if any.
-//
-// For help repairing your custom key store, see the Troubleshooting Custom
-// Key Stores (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html)
-// topic in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a custom key
-// store in a different Amazon Web Services account.
-//
-// Required permissions: kms:DescribeCustomKeyStores (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy)
-//
-// Related operations:
-//
-// * ConnectCustomKeyStore
-//
-// * CreateCustomKeyStore
-//
-// * DeleteCustomKeyStore
-//
-// * DisconnectCustomKeyStore
-//
-// * UpdateCustomKeyStore
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation DescribeCustomKeyStores for usage and error information.
-//
-// Returned Error Types:
-// * CustomKeyStoreNotFoundException
-// The request was rejected because KMS cannot find a custom key store with
-// the specified key store name or ID.
-//
-// * InvalidMarkerException
-// The request was rejected because the marker that specifies where pagination
-// should next begin is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeCustomKeyStores
-func (c *KMS) DescribeCustomKeyStores(input *DescribeCustomKeyStoresInput) (*DescribeCustomKeyStoresOutput, error) {
- req, out := c.DescribeCustomKeyStoresRequest(input)
- return out, req.Send()
-}
-
-// DescribeCustomKeyStoresWithContext is the same as DescribeCustomKeyStores with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeCustomKeyStores for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) DescribeCustomKeyStoresWithContext(ctx aws.Context, input *DescribeCustomKeyStoresInput, opts ...request.Option) (*DescribeCustomKeyStoresOutput, error) {
- req, out := c.DescribeCustomKeyStoresRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDescribeKey = "DescribeKey"
-
-// DescribeKeyRequest generates a "aws/request.Request" representing the
-// client's request for the DescribeKey operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DescribeKey for more information on using the DescribeKey
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DescribeKeyRequest method.
-// req, resp := client.DescribeKeyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeKey
-func (c *KMS) DescribeKeyRequest(input *DescribeKeyInput) (req *request.Request, output *DescribeKeyOutput) {
- op := &request.Operation{
- Name: opDescribeKey,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DescribeKeyInput{}
- }
-
- output = &DescribeKeyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DescribeKey API operation for AWS Key Management Service.
-//
-// Provides detailed information about a KMS key. You can run DescribeKey on
-// a customer managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk)
-// or an Amazon Web Services managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).
-//
-// This detailed information includes the key ARN, creation date (and deletion
-// date, if applicable), the key state, and the origin and expiration date (if
-// any) of the key material. It includes fields, like KeySpec, that help you
-// distinguish symmetric from asymmetric KMS keys. It also provides information
-// that is particularly important to asymmetric keys, such as the key usage
-// (encryption or signing) and the encryption algorithms or signing algorithms
-// that the KMS key supports. For KMS keys in custom key stores, it includes
-// information about the custom key store, such as the key store ID and the
-// CloudHSM cluster ID. For multi-Region keys, it displays the primary key and
-// all related replica keys.
-//
-// DescribeKey does not return the following information:
-//
-// * Aliases associated with the KMS key. To get this information, use ListAliases.
-//
-// * Whether automatic key rotation is enabled on the KMS key. To get this
-// information, use GetKeyRotationStatus. Also, some key states prevent a
-// KMS key from being automatically rotated. For details, see How Automatic
-// Key Rotation Works (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-how-it-works)
-// in Key Management Service Developer Guide.
-//
-// * Tags on the KMS key. To get this information, use ListResourceTags.
-//
-// * Key policies and grants on the KMS key. To get this information, use
-// GetKeyPolicy and ListGrants.
-//
-// If you call the DescribeKey operation on a predefined Amazon Web Services
-// alias, that is, an Amazon Web Services alias with no key ID, KMS creates
-// an Amazon Web Services managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).
-// Then, it associates the alias with the new KMS key, and returns the KeyId
-// and Arn of the new KMS key in the response.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:DescribeKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * GetKeyPolicy
-//
-// * GetKeyRotationStatus
-//
-// * ListAliases
-//
-// * ListGrants
-//
-// * ListKeys
-//
-// * ListResourceTags
-//
-// * ListRetirableGrants
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation DescribeKey for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DescribeKey
-func (c *KMS) DescribeKey(input *DescribeKeyInput) (*DescribeKeyOutput, error) {
- req, out := c.DescribeKeyRequest(input)
- return out, req.Send()
-}
-
-// DescribeKeyWithContext is the same as DescribeKey with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DescribeKey for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) DescribeKeyWithContext(ctx aws.Context, input *DescribeKeyInput, opts ...request.Option) (*DescribeKeyOutput, error) {
- req, out := c.DescribeKeyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDisableKey = "DisableKey"
-
-// DisableKeyRequest generates a "aws/request.Request" representing the
-// client's request for the DisableKey operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DisableKey for more information on using the DisableKey
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DisableKeyRequest method.
-// req, resp := client.DisableKeyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKey
-func (c *KMS) DisableKeyRequest(input *DisableKeyInput) (req *request.Request, output *DisableKeyOutput) {
- op := &request.Operation{
- Name: opDisableKey,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisableKeyInput{}
- }
-
- output = &DisableKeyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DisableKey API operation for AWS Key Management Service.
-//
-// Sets the state of a KMS key to disabled. This change temporarily prevents
-// use of the KMS key for cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations).
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:DisableKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations: EnableKey
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation DisableKey for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKey
-func (c *KMS) DisableKey(input *DisableKeyInput) (*DisableKeyOutput, error) {
- req, out := c.DisableKeyRequest(input)
- return out, req.Send()
-}
-
-// DisableKeyWithContext is the same as DisableKey with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DisableKey for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) DisableKeyWithContext(ctx aws.Context, input *DisableKeyInput, opts ...request.Option) (*DisableKeyOutput, error) {
- req, out := c.DisableKeyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDisableKeyRotation = "DisableKeyRotation"
-
-// DisableKeyRotationRequest generates a "aws/request.Request" representing the
-// client's request for the DisableKeyRotation operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DisableKeyRotation for more information on using the DisableKeyRotation
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DisableKeyRotationRequest method.
-// req, resp := client.DisableKeyRotationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKeyRotation
-func (c *KMS) DisableKeyRotationRequest(input *DisableKeyRotationInput) (req *request.Request, output *DisableKeyRotationOutput) {
- op := &request.Operation{
- Name: opDisableKeyRotation,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisableKeyRotationInput{}
- }
-
- output = &DisableKeyRotationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DisableKeyRotation API operation for AWS Key Management Service.
-//
-// Disables automatic rotation of the key material (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html)
-// for the specified symmetric KMS key.
-//
-// You cannot enable automatic rotation of asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks),
-// KMS keys with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html),
-// or KMS keys in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
-// To enable or disable automatic rotation of a set of related multi-Region
-// keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key),
-// set the property on the primary key.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:DisableKeyRotation (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * EnableKeyRotation
-//
-// * GetKeyRotationStatus
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation DisableKeyRotation for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisableKeyRotation
-func (c *KMS) DisableKeyRotation(input *DisableKeyRotationInput) (*DisableKeyRotationOutput, error) {
- req, out := c.DisableKeyRotationRequest(input)
- return out, req.Send()
-}
-
-// DisableKeyRotationWithContext is the same as DisableKeyRotation with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DisableKeyRotation for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) DisableKeyRotationWithContext(ctx aws.Context, input *DisableKeyRotationInput, opts ...request.Option) (*DisableKeyRotationOutput, error) {
- req, out := c.DisableKeyRotationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDisconnectCustomKeyStore = "DisconnectCustomKeyStore"
-
-// DisconnectCustomKeyStoreRequest generates a "aws/request.Request" representing the
-// client's request for the DisconnectCustomKeyStore operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DisconnectCustomKeyStore for more information on using the DisconnectCustomKeyStore
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DisconnectCustomKeyStoreRequest method.
-// req, resp := client.DisconnectCustomKeyStoreRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisconnectCustomKeyStore
-func (c *KMS) DisconnectCustomKeyStoreRequest(input *DisconnectCustomKeyStoreInput) (req *request.Request, output *DisconnectCustomKeyStoreOutput) {
- op := &request.Operation{
- Name: opDisconnectCustomKeyStore,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DisconnectCustomKeyStoreInput{}
- }
-
- output = &DisconnectCustomKeyStoreOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// DisconnectCustomKeyStore API operation for AWS Key Management Service.
-//
-// Disconnects the custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// from its associated CloudHSM cluster. While a custom key store is disconnected,
-// you can manage the custom key store and its KMS keys, but you cannot create
-// or use KMS keys in the custom key store. You can reconnect the custom key
-// store at any time.
-//
-// While a custom key store is disconnected, all attempts to create KMS keys
-// in the custom key store or to use existing KMS keys in cryptographic operations
-// (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
-// will fail. This action can prevent users from storing and accessing sensitive
-// data.
-//
-// To find the connection state of a custom key store, use the DescribeCustomKeyStores
-// operation. To reconnect a custom key store, use the ConnectCustomKeyStore
-// operation.
-//
-// If the operation succeeds, it returns a JSON object with no properties.
-//
-// This operation is part of the Custom Key Store feature (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// feature in KMS, which combines the convenience and extensive integration
-// of KMS with the isolation and control of a single-tenant key store.
-//
-// Cross-account use: No. You cannot perform this operation on a custom key
-// store in a different Amazon Web Services account.
-//
-// Required permissions: kms:DisconnectCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy)
-//
-// Related operations:
-//
-// * ConnectCustomKeyStore
-//
-// * CreateCustomKeyStore
-//
-// * DeleteCustomKeyStore
-//
-// * DescribeCustomKeyStores
-//
-// * UpdateCustomKeyStore
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation DisconnectCustomKeyStore for usage and error information.
-//
-// Returned Error Types:
-// * CustomKeyStoreInvalidStateException
-// The request was rejected because of the ConnectionState of the custom key
-// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores
-// operation.
-//
-// This exception is thrown under the following conditions:
-//
-// * You requested the CreateKey or GenerateRandom operation in a custom
-// key store that is not connected. These operations are valid only when
-// the custom key store ConnectionState is CONNECTED.
-//
-// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
-// on a custom key store that is not disconnected. This operation is valid
-// only when the custom key store ConnectionState is DISCONNECTED.
-//
-// * You requested the ConnectCustomKeyStore operation on a custom key store
-// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
-// for all other ConnectionState values.
-//
-// * CustomKeyStoreNotFoundException
-// The request was rejected because KMS cannot find a custom key store with
-// the specified key store name or ID.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DisconnectCustomKeyStore
-func (c *KMS) DisconnectCustomKeyStore(input *DisconnectCustomKeyStoreInput) (*DisconnectCustomKeyStoreOutput, error) {
- req, out := c.DisconnectCustomKeyStoreRequest(input)
- return out, req.Send()
-}
-
-// DisconnectCustomKeyStoreWithContext is the same as DisconnectCustomKeyStore with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DisconnectCustomKeyStore for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) DisconnectCustomKeyStoreWithContext(ctx aws.Context, input *DisconnectCustomKeyStoreInput, opts ...request.Option) (*DisconnectCustomKeyStoreOutput, error) {
- req, out := c.DisconnectCustomKeyStoreRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opEnableKey = "EnableKey"
-
-// EnableKeyRequest generates a "aws/request.Request" representing the
-// client's request for the EnableKey operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See EnableKey for more information on using the EnableKey
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the EnableKeyRequest method.
-// req, resp := client.EnableKeyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKey
-func (c *KMS) EnableKeyRequest(input *EnableKeyInput) (req *request.Request, output *EnableKeyOutput) {
- op := &request.Operation{
- Name: opEnableKey,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EnableKeyInput{}
- }
-
- output = &EnableKeyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// EnableKey API operation for AWS Key Management Service.
-//
-// Sets the key state of a KMS key to enabled. This allows you to use the KMS
-// key for cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations).
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:EnableKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations: DisableKey
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation EnableKey for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * LimitExceededException
-// The request was rejected because a quota was exceeded. For more information,
-// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
-// in the Key Management Service Developer Guide.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKey
-func (c *KMS) EnableKey(input *EnableKeyInput) (*EnableKeyOutput, error) {
- req, out := c.EnableKeyRequest(input)
- return out, req.Send()
-}
-
-// EnableKeyWithContext is the same as EnableKey with the addition of
-// the ability to pass a context and additional request options.
-//
-// See EnableKey for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) EnableKeyWithContext(ctx aws.Context, input *EnableKeyInput, opts ...request.Option) (*EnableKeyOutput, error) {
- req, out := c.EnableKeyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opEnableKeyRotation = "EnableKeyRotation"
-
-// EnableKeyRotationRequest generates a "aws/request.Request" representing the
-// client's request for the EnableKeyRotation operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See EnableKeyRotation for more information on using the EnableKeyRotation
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the EnableKeyRotationRequest method.
-// req, resp := client.EnableKeyRotationRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKeyRotation
-func (c *KMS) EnableKeyRotationRequest(input *EnableKeyRotationInput) (req *request.Request, output *EnableKeyRotationOutput) {
- op := &request.Operation{
- Name: opEnableKeyRotation,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EnableKeyRotationInput{}
- }
-
- output = &EnableKeyRotationOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// EnableKeyRotation API operation for AWS Key Management Service.
-//
-// Enables automatic rotation of the key material (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html)
-// for the specified symmetric KMS key.
-//
-// You cannot enable automatic rotation of asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks),
-// KMS keys with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html),
-// or KMS keys in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
-// To enable or disable automatic rotation of a set of related multi-Region
-// keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key),
-// set the property on the primary key.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:EnableKeyRotation (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * DisableKeyRotation
-//
-// * GetKeyRotationStatus
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation EnableKeyRotation for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/EnableKeyRotation
-func (c *KMS) EnableKeyRotation(input *EnableKeyRotationInput) (*EnableKeyRotationOutput, error) {
- req, out := c.EnableKeyRotationRequest(input)
- return out, req.Send()
-}
-
-// EnableKeyRotationWithContext is the same as EnableKeyRotation with the addition of
-// the ability to pass a context and additional request options.
-//
-// See EnableKeyRotation for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) EnableKeyRotationWithContext(ctx aws.Context, input *EnableKeyRotationInput, opts ...request.Option) (*EnableKeyRotationOutput, error) {
- req, out := c.EnableKeyRotationRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opEncrypt = "Encrypt"
-
-// EncryptRequest generates a "aws/request.Request" representing the
-// client's request for the Encrypt operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See Encrypt for more information on using the Encrypt
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the EncryptRequest method.
-// req, resp := client.EncryptRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Encrypt
-func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output *EncryptOutput) {
- op := &request.Operation{
- Name: opEncrypt,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &EncryptInput{}
- }
-
- output = &EncryptOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// Encrypt API operation for AWS Key Management Service.
-//
-// Encrypts plaintext into ciphertext by using a KMS key. The Encrypt operation
-// has two primary use cases:
-//
-// * You can encrypt small amounts of arbitrary data, such as a personal
-// identifier or database password, or other sensitive information.
-//
-// * You can use the Encrypt operation to move encrypted data from one Amazon
-// Web Services Region to another. For example, in Region A, generate a data
-// key and use the plaintext key to encrypt your data. Then, in Region A,
-// use the Encrypt operation to encrypt the plaintext data key under a KMS
-// key in Region B. Now, you can move the encrypted data and the encrypted
-// data key to Region B. When necessary, you can decrypt the encrypted data
-// key and the encrypted data entirely within in Region B.
-//
-// You don't need to use the Encrypt operation to encrypt a data key. The GenerateDataKey
-// and GenerateDataKeyPair operations return a plaintext data key and an encrypted
-// copy of that data key.
-//
-// When you encrypt data, you must specify a symmetric or asymmetric KMS key
-// to use in the encryption operation. The KMS key must have a KeyUsage value
-// of ENCRYPT_DECRYPT. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// If you use a symmetric KMS key, you can use an encryption context to add
-// additional security to your encryption operation. If you specify an EncryptionContext
-// when encrypting data, you must specify the same encryption context (a case-sensitive
-// exact match) when decrypting the data. Otherwise, the request to decrypt
-// fails with an InvalidCiphertextException. For more information, see Encryption
-// Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
-// in the Key Management Service Developer Guide.
-//
-// If you specify an asymmetric KMS key, you must also specify the encryption
-// algorithm. The algorithm must be compatible with the KMS key type.
-//
-// When you use an asymmetric KMS key to encrypt or reencrypt data, be sure
-// to record the KMS key and encryption algorithm that you choose. You will
-// be required to provide the same KMS key and encryption algorithm when you
-// decrypt the data. If the KMS key and algorithm do not match the values used
-// to encrypt the data, the decrypt operation fails.
-//
-// You are not required to supply the key ID and encryption algorithm when you
-// decrypt with symmetric KMS keys because KMS stores this information in the
-// ciphertext blob. KMS cannot store metadata in ciphertext generated with asymmetric
-// keys. The standard format for asymmetric key ciphertext does not include
-// configurable fields.
-//
-// The maximum size of the data that you can encrypt varies with the type of
-// KMS key and the encryption algorithm that you choose.
-//
-// * Symmetric KMS keys SYMMETRIC_DEFAULT: 4096 bytes
-//
-// * RSA_2048 RSAES_OAEP_SHA_1: 214 bytes RSAES_OAEP_SHA_256: 190 bytes
-//
-// * RSA_3072 RSAES_OAEP_SHA_1: 342 bytes RSAES_OAEP_SHA_256: 318 bytes
-//
-// * RSA_4096 RSAES_OAEP_SHA_1: 470 bytes RSAES_OAEP_SHA_256: 446 bytes
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:Encrypt (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * Decrypt
-//
-// * GenerateDataKey
-//
-// * GenerateDataKeyPair
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation Encrypt for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Encrypt
-func (c *KMS) Encrypt(input *EncryptInput) (*EncryptOutput, error) {
- req, out := c.EncryptRequest(input)
- return out, req.Send()
-}
-
-// EncryptWithContext is the same as Encrypt with the addition of
-// the ability to pass a context and additional request options.
-//
-// See Encrypt for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) EncryptWithContext(ctx aws.Context, input *EncryptInput, opts ...request.Option) (*EncryptOutput, error) {
- req, out := c.EncryptRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGenerateDataKey = "GenerateDataKey"
-
-// GenerateDataKeyRequest generates a "aws/request.Request" representing the
-// client's request for the GenerateDataKey operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GenerateDataKey for more information on using the GenerateDataKey
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GenerateDataKeyRequest method.
-// req, resp := client.GenerateDataKeyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKey
-func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request.Request, output *GenerateDataKeyOutput) {
- op := &request.Operation{
- Name: opGenerateDataKey,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GenerateDataKeyInput{}
- }
-
- output = &GenerateDataKeyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GenerateDataKey API operation for AWS Key Management Service.
-//
-// Generates a unique symmetric data key for client-side encryption. This operation
-// returns a plaintext copy of the data key and a copy that is encrypted under
-// a KMS key that you specify. You can use the plaintext key to encrypt your
-// data outside of KMS and store the encrypted data key with the encrypted data.
-//
-// GenerateDataKey returns a unique data key for each request. The bytes in
-// the plaintext key are not related to the caller or the KMS key.
-//
-// To generate a data key, specify the symmetric KMS key that will be used to
-// encrypt the data key. You cannot use an asymmetric KMS key to generate data
-// keys. To get the type of your KMS key, use the DescribeKey operation. You
-// must also specify the length of the data key. Use either the KeySpec or NumberOfBytes
-// parameters (but not both). For 128-bit and 256-bit data keys, use the KeySpec
-// parameter.
-//
-// To get only an encrypted copy of the data key, use GenerateDataKeyWithoutPlaintext.
-// To generate an asymmetric data key pair, use the GenerateDataKeyPair or GenerateDataKeyPairWithoutPlaintext
-// operation. To get a cryptographically secure random byte string, use GenerateRandom.
-//
-// You can use the optional encryption context to add additional security to
-// the encryption operation. If you specify an EncryptionContext, you must specify
-// the same encryption context (a case-sensitive exact match) when decrypting
-// the encrypted data key. Otherwise, the request to decrypt fails with an InvalidCiphertextException.
-// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
-// in the Key Management Service Developer Guide.
-//
-// Applications in Amazon Web Services Nitro Enclaves can call this operation
-// by using the Amazon Web Services Nitro Enclaves Development Kit (https://github.com/aws/aws-nitro-enclaves-sdk-c).
-// For information about the supporting parameters, see How Amazon Web Services
-// Nitro Enclaves use KMS (https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html)
-// in the Key Management Service Developer Guide.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// How to use your data key
-//
-// We recommend that you use the following pattern to encrypt data locally in
-// your application. You can write your own code or use a client-side encryption
-// library, such as the Amazon Web Services Encryption SDK (https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/),
-// the Amazon DynamoDB Encryption Client (https://docs.aws.amazon.com/dynamodb-encryption-client/latest/devguide/),
-// or Amazon S3 client-side encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html)
-// to do these tasks for you.
-//
-// To encrypt data outside of KMS:
-//
-// Use the GenerateDataKey operation to get a data key.
-//
-// Use the plaintext data key (in the Plaintext field of the response) to encrypt
-// your data outside of KMS. Then erase the plaintext data key from memory.
-//
-// Store the encrypted data key (in the CiphertextBlob field of the response)
-// with the encrypted data.
-//
-// To decrypt data outside of KMS:
-//
-// Use the Decrypt operation to decrypt the encrypted data key. The operation
-// returns a plaintext copy of the data key.
-//
-// Use the plaintext data key to decrypt data outside of KMS, then erase the
-// plaintext data key from memory.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:GenerateDataKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * Decrypt
-//
-// * Encrypt
-//
-// * GenerateDataKeyPair
-//
-// * GenerateDataKeyPairWithoutPlaintext
-//
-// * GenerateDataKeyWithoutPlaintext
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation GenerateDataKey for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKey
-func (c *KMS) GenerateDataKey(input *GenerateDataKeyInput) (*GenerateDataKeyOutput, error) {
- req, out := c.GenerateDataKeyRequest(input)
- return out, req.Send()
-}
-
-// GenerateDataKeyWithContext is the same as GenerateDataKey with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GenerateDataKey for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) GenerateDataKeyWithContext(ctx aws.Context, input *GenerateDataKeyInput, opts ...request.Option) (*GenerateDataKeyOutput, error) {
- req, out := c.GenerateDataKeyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGenerateDataKeyPair = "GenerateDataKeyPair"
-
-// GenerateDataKeyPairRequest generates a "aws/request.Request" representing the
-// client's request for the GenerateDataKeyPair operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GenerateDataKeyPair for more information on using the GenerateDataKeyPair
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GenerateDataKeyPairRequest method.
-// req, resp := client.GenerateDataKeyPairRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPair
-func (c *KMS) GenerateDataKeyPairRequest(input *GenerateDataKeyPairInput) (req *request.Request, output *GenerateDataKeyPairOutput) {
- op := &request.Operation{
- Name: opGenerateDataKeyPair,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GenerateDataKeyPairInput{}
- }
-
- output = &GenerateDataKeyPairOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GenerateDataKeyPair API operation for AWS Key Management Service.
-//
-// Generates a unique asymmetric data key pair. The GenerateDataKeyPair operation
-// returns a plaintext public key, a plaintext private key, and a copy of the
-// private key that is encrypted under the symmetric KMS key you specify. You
-// can use the data key pair to perform asymmetric cryptography and implement
-// digital signatures outside of KMS.
-//
-// You can use the public key that GenerateDataKeyPair returns to encrypt data
-// or verify a signature outside of KMS. Then, store the encrypted private key
-// with the data. When you are ready to decrypt data or sign a message, you
-// can use the Decrypt operation to decrypt the encrypted private key.
-//
-// To generate a data key pair, you must specify a symmetric KMS key to encrypt
-// the private key in a data key pair. You cannot use an asymmetric KMS key
-// or a KMS key in a custom key store. To get the type and origin of your KMS
-// key, use the DescribeKey operation.
-//
-// Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data
-// key pair. KMS recommends that your use ECC key pairs for signing, and use
-// RSA key pairs for either encryption or signing, but not both. However, KMS
-// cannot enforce any restrictions on the use of data key pairs outside of KMS.
-//
-// If you are using the data key pair to encrypt data, or for any operation
-// where you don't immediately need a private key, consider using the GenerateDataKeyPairWithoutPlaintext
-// operation. GenerateDataKeyPairWithoutPlaintext returns a plaintext public
-// key and an encrypted private key, but omits the plaintext private key that
-// you need only to decrypt ciphertext or sign a message. Later, when you need
-// to decrypt the data or sign a message, use the Decrypt operation to decrypt
-// the encrypted private key in the data key pair.
-//
-// GenerateDataKeyPair returns a unique data key pair for each request. The
-// bytes in the keys are not related to the caller or the KMS key that is used
-// to encrypt the private key. The public key is a DER-encoded X.509 SubjectPublicKeyInfo,
-// as specified in RFC 5280 (https://tools.ietf.org/html/rfc5280). The private
-// key is a DER-encoded PKCS8 PrivateKeyInfo, as specified in RFC 5958 (https://tools.ietf.org/html/rfc5958).
-//
-// You can use the optional encryption context to add additional security to
-// the encryption operation. If you specify an EncryptionContext, you must specify
-// the same encryption context (a case-sensitive exact match) when decrypting
-// the encrypted data key. Otherwise, the request to decrypt fails with an InvalidCiphertextException.
-// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
-// in the Key Management Service Developer Guide.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:GenerateDataKeyPair (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * Decrypt
-//
-// * Encrypt
-//
-// * GenerateDataKey
-//
-// * GenerateDataKeyPairWithoutPlaintext
-//
-// * GenerateDataKeyWithoutPlaintext
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation GenerateDataKeyPair for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPair
-func (c *KMS) GenerateDataKeyPair(input *GenerateDataKeyPairInput) (*GenerateDataKeyPairOutput, error) {
- req, out := c.GenerateDataKeyPairRequest(input)
- return out, req.Send()
-}
-
-// GenerateDataKeyPairWithContext is the same as GenerateDataKeyPair with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GenerateDataKeyPair for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) GenerateDataKeyPairWithContext(ctx aws.Context, input *GenerateDataKeyPairInput, opts ...request.Option) (*GenerateDataKeyPairOutput, error) {
- req, out := c.GenerateDataKeyPairRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGenerateDataKeyPairWithoutPlaintext = "GenerateDataKeyPairWithoutPlaintext"
-
-// GenerateDataKeyPairWithoutPlaintextRequest generates a "aws/request.Request" representing the
-// client's request for the GenerateDataKeyPairWithoutPlaintext operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GenerateDataKeyPairWithoutPlaintext for more information on using the GenerateDataKeyPairWithoutPlaintext
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GenerateDataKeyPairWithoutPlaintextRequest method.
-// req, resp := client.GenerateDataKeyPairWithoutPlaintextRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairWithoutPlaintext
-func (c *KMS) GenerateDataKeyPairWithoutPlaintextRequest(input *GenerateDataKeyPairWithoutPlaintextInput) (req *request.Request, output *GenerateDataKeyPairWithoutPlaintextOutput) {
- op := &request.Operation{
- Name: opGenerateDataKeyPairWithoutPlaintext,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GenerateDataKeyPairWithoutPlaintextInput{}
- }
-
- output = &GenerateDataKeyPairWithoutPlaintextOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GenerateDataKeyPairWithoutPlaintext API operation for AWS Key Management Service.
-//
-// Generates a unique asymmetric data key pair. The GenerateDataKeyPairWithoutPlaintext
-// operation returns a plaintext public key and a copy of the private key that
-// is encrypted under the symmetric KMS key you specify. Unlike GenerateDataKeyPair,
-// this operation does not return a plaintext private key.
-//
-// You can use the public key that GenerateDataKeyPairWithoutPlaintext returns
-// to encrypt data or verify a signature outside of KMS. Then, store the encrypted
-// private key with the data. When you are ready to decrypt data or sign a message,
-// you can use the Decrypt operation to decrypt the encrypted private key.
-//
-// To generate a data key pair, you must specify a symmetric KMS key to encrypt
-// the private key in a data key pair. You cannot use an asymmetric KMS key
-// or a KMS key in a custom key store. To get the type and origin of your KMS
-// key, use the DescribeKey operation.
-//
-// Use the KeyPairSpec parameter to choose an RSA or Elliptic Curve (ECC) data
-// key pair. KMS recommends that your use ECC key pairs for signing, and use
-// RSA key pairs for either encryption or signing, but not both. However, KMS
-// cannot enforce any restrictions on the use of data key pairs outside of KMS.
-//
-// GenerateDataKeyPairWithoutPlaintext returns a unique data key pair for each
-// request. The bytes in the key are not related to the caller or KMS key that
-// is used to encrypt the private key. The public key is a DER-encoded X.509
-// SubjectPublicKeyInfo, as specified in RFC 5280 (https://tools.ietf.org/html/rfc5280).
-//
-// You can use the optional encryption context to add additional security to
-// the encryption operation. If you specify an EncryptionContext, you must specify
-// the same encryption context (a case-sensitive exact match) when decrypting
-// the encrypted data key. Otherwise, the request to decrypt fails with an InvalidCiphertextException.
-// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
-// in the Key Management Service Developer Guide.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:GenerateDataKeyPairWithoutPlaintext (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * Decrypt
-//
-// * Encrypt
-//
-// * GenerateDataKey
-//
-// * GenerateDataKeyPair
-//
-// * GenerateDataKeyWithoutPlaintext
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation GenerateDataKeyPairWithoutPlaintext for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyPairWithoutPlaintext
-func (c *KMS) GenerateDataKeyPairWithoutPlaintext(input *GenerateDataKeyPairWithoutPlaintextInput) (*GenerateDataKeyPairWithoutPlaintextOutput, error) {
- req, out := c.GenerateDataKeyPairWithoutPlaintextRequest(input)
- return out, req.Send()
-}
-
-// GenerateDataKeyPairWithoutPlaintextWithContext is the same as GenerateDataKeyPairWithoutPlaintext with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GenerateDataKeyPairWithoutPlaintext for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) GenerateDataKeyPairWithoutPlaintextWithContext(ctx aws.Context, input *GenerateDataKeyPairWithoutPlaintextInput, opts ...request.Option) (*GenerateDataKeyPairWithoutPlaintextOutput, error) {
- req, out := c.GenerateDataKeyPairWithoutPlaintextRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext"
-
-// GenerateDataKeyWithoutPlaintextRequest generates a "aws/request.Request" representing the
-// client's request for the GenerateDataKeyWithoutPlaintext operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GenerateDataKeyWithoutPlaintext for more information on using the GenerateDataKeyWithoutPlaintext
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GenerateDataKeyWithoutPlaintextRequest method.
-// req, resp := client.GenerateDataKeyWithoutPlaintextRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyWithoutPlaintext
-func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWithoutPlaintextInput) (req *request.Request, output *GenerateDataKeyWithoutPlaintextOutput) {
- op := &request.Operation{
- Name: opGenerateDataKeyWithoutPlaintext,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GenerateDataKeyWithoutPlaintextInput{}
- }
-
- output = &GenerateDataKeyWithoutPlaintextOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GenerateDataKeyWithoutPlaintext API operation for AWS Key Management Service.
-//
-// Generates a unique symmetric data key. This operation returns a data key
-// that is encrypted under a KMS key that you specify. To request an asymmetric
-// data key pair, use the GenerateDataKeyPair or GenerateDataKeyPairWithoutPlaintext
-// operations.
-//
-// GenerateDataKeyWithoutPlaintext is identical to the GenerateDataKey operation
-// except that returns only the encrypted copy of the data key. This operation
-// is useful for systems that need to encrypt data at some point, but not immediately.
-// When you need to encrypt the data, you call the Decrypt operation on the
-// encrypted copy of the key.
-//
-// It's also useful in distributed systems with different levels of trust. For
-// example, you might store encrypted data in containers. One component of your
-// system creates new containers and stores an encrypted data key with each
-// container. Then, a different component puts the data into the containers.
-// That component first decrypts the data key, uses the plaintext data key to
-// encrypt data, puts the encrypted data into the container, and then destroys
-// the plaintext data key. In this system, the component that creates the containers
-// never sees the plaintext data key.
-//
-// GenerateDataKeyWithoutPlaintext returns a unique data key for each request.
-// The bytes in the keys are not related to the caller or KMS key that is used
-// to encrypt the private key.
-//
-// To generate a data key, you must specify the symmetric KMS key that is used
-// to encrypt the data key. You cannot use an asymmetric KMS key to generate
-// a data key. To get the type of your KMS key, use the DescribeKey operation.
-//
-// If the operation succeeds, you will find the encrypted copy of the data key
-// in the CiphertextBlob field.
-//
-// You can use the optional encryption context to add additional security to
-// the encryption operation. If you specify an EncryptionContext, you must specify
-// the same encryption context (a case-sensitive exact match) when decrypting
-// the encrypted data key. Otherwise, the request to decrypt fails with an InvalidCiphertextException.
-// For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
-// in the Key Management Service Developer Guide.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:GenerateDataKeyWithoutPlaintext (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * Decrypt
-//
-// * Encrypt
-//
-// * GenerateDataKey
-//
-// * GenerateDataKeyPair
-//
-// * GenerateDataKeyPairWithoutPlaintext
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation GenerateDataKeyWithoutPlaintext for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateDataKeyWithoutPlaintext
-func (c *KMS) GenerateDataKeyWithoutPlaintext(input *GenerateDataKeyWithoutPlaintextInput) (*GenerateDataKeyWithoutPlaintextOutput, error) {
- req, out := c.GenerateDataKeyWithoutPlaintextRequest(input)
- return out, req.Send()
-}
-
-// GenerateDataKeyWithoutPlaintextWithContext is the same as GenerateDataKeyWithoutPlaintext with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GenerateDataKeyWithoutPlaintext for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) GenerateDataKeyWithoutPlaintextWithContext(ctx aws.Context, input *GenerateDataKeyWithoutPlaintextInput, opts ...request.Option) (*GenerateDataKeyWithoutPlaintextOutput, error) {
- req, out := c.GenerateDataKeyWithoutPlaintextRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGenerateRandom = "GenerateRandom"
-
-// GenerateRandomRequest generates a "aws/request.Request" representing the
-// client's request for the GenerateRandom operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GenerateRandom for more information on using the GenerateRandom
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GenerateRandomRequest method.
-// req, resp := client.GenerateRandomRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateRandom
-func (c *KMS) GenerateRandomRequest(input *GenerateRandomInput) (req *request.Request, output *GenerateRandomOutput) {
- op := &request.Operation{
- Name: opGenerateRandom,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GenerateRandomInput{}
- }
-
- output = &GenerateRandomOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GenerateRandom API operation for AWS Key Management Service.
-//
-// Returns a random byte string that is cryptographically secure.
-//
-// By default, the random byte string is generated in KMS. To generate the byte
-// string in the CloudHSM cluster that is associated with a custom key store
-// (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html),
-// specify the custom key store ID.
-//
-// Applications in Amazon Web Services Nitro Enclaves can call this operation
-// by using the Amazon Web Services Nitro Enclaves Development Kit (https://github.com/aws/aws-nitro-enclaves-sdk-c).
-// For information about the supporting parameters, see How Amazon Web Services
-// Nitro Enclaves use KMS (https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html)
-// in the Key Management Service Developer Guide.
-//
-// For more information about entropy and random number generation, see Key
-// Management Service Cryptographic Details (https://docs.aws.amazon.com/kms/latest/cryptographic-details/).
-//
-// Required permissions: kms:GenerateRandom (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy)
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation GenerateRandom for usage and error information.
-//
-// Returned Error Types:
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * CustomKeyStoreNotFoundException
-// The request was rejected because KMS cannot find a custom key store with
-// the specified key store name or ID.
-//
-// * CustomKeyStoreInvalidStateException
-// The request was rejected because of the ConnectionState of the custom key
-// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores
-// operation.
-//
-// This exception is thrown under the following conditions:
-//
-// * You requested the CreateKey or GenerateRandom operation in a custom
-// key store that is not connected. These operations are valid only when
-// the custom key store ConnectionState is CONNECTED.
-//
-// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
-// on a custom key store that is not disconnected. This operation is valid
-// only when the custom key store ConnectionState is DISCONNECTED.
-//
-// * You requested the ConnectCustomKeyStore operation on a custom key store
-// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
-// for all other ConnectionState values.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GenerateRandom
-func (c *KMS) GenerateRandom(input *GenerateRandomInput) (*GenerateRandomOutput, error) {
- req, out := c.GenerateRandomRequest(input)
- return out, req.Send()
-}
-
-// GenerateRandomWithContext is the same as GenerateRandom with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GenerateRandom for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) GenerateRandomWithContext(ctx aws.Context, input *GenerateRandomInput, opts ...request.Option) (*GenerateRandomOutput, error) {
- req, out := c.GenerateRandomRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetKeyPolicy = "GetKeyPolicy"
-
-// GetKeyPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the GetKeyPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetKeyPolicy for more information on using the GetKeyPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetKeyPolicyRequest method.
-// req, resp := client.GetKeyPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyPolicy
-func (c *KMS) GetKeyPolicyRequest(input *GetKeyPolicyInput) (req *request.Request, output *GetKeyPolicyOutput) {
- op := &request.Operation{
- Name: opGetKeyPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetKeyPolicyInput{}
- }
-
- output = &GetKeyPolicyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetKeyPolicy API operation for AWS Key Management Service.
-//
-// Gets a key policy attached to the specified KMS key.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:GetKeyPolicy (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations: PutKeyPolicy
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation GetKeyPolicy for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyPolicy
-func (c *KMS) GetKeyPolicy(input *GetKeyPolicyInput) (*GetKeyPolicyOutput, error) {
- req, out := c.GetKeyPolicyRequest(input)
- return out, req.Send()
-}
-
-// GetKeyPolicyWithContext is the same as GetKeyPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetKeyPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) GetKeyPolicyWithContext(ctx aws.Context, input *GetKeyPolicyInput, opts ...request.Option) (*GetKeyPolicyOutput, error) {
- req, out := c.GetKeyPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetKeyRotationStatus = "GetKeyRotationStatus"
-
-// GetKeyRotationStatusRequest generates a "aws/request.Request" representing the
-// client's request for the GetKeyRotationStatus operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetKeyRotationStatus for more information on using the GetKeyRotationStatus
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetKeyRotationStatusRequest method.
-// req, resp := client.GetKeyRotationStatusRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyRotationStatus
-func (c *KMS) GetKeyRotationStatusRequest(input *GetKeyRotationStatusInput) (req *request.Request, output *GetKeyRotationStatusOutput) {
- op := &request.Operation{
- Name: opGetKeyRotationStatus,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetKeyRotationStatusInput{}
- }
-
- output = &GetKeyRotationStatusOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetKeyRotationStatus API operation for AWS Key Management Service.
-//
-// Gets a Boolean value that indicates whether automatic rotation of the key
-// material (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html)
-// is enabled for the specified KMS key.
-//
-// You cannot enable automatic rotation of asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks),
-// KMS keys with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html),
-// or KMS keys in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
-// To enable or disable automatic rotation of a set of related multi-Region
-// keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key),
-// set the property on the primary key. The key rotation status for these KMS
-// keys is always false.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// * Disabled: The key rotation status does not change when you disable a
-// KMS key. However, while the KMS key is disabled, KMS does not rotate the
-// key material.
-//
-// * Pending deletion: While a KMS key is pending deletion, its key rotation
-// status is false and KMS does not rotate the key material. If you cancel
-// the deletion, the original key rotation status is restored.
-//
-// Cross-account use: Yes. To perform this operation on a KMS key in a different
-// Amazon Web Services account, specify the key ARN in the value of the KeyId
-// parameter.
-//
-// Required permissions: kms:GetKeyRotationStatus (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * DisableKeyRotation
-//
-// * EnableKeyRotation
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation GetKeyRotationStatus for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetKeyRotationStatus
-func (c *KMS) GetKeyRotationStatus(input *GetKeyRotationStatusInput) (*GetKeyRotationStatusOutput, error) {
- req, out := c.GetKeyRotationStatusRequest(input)
- return out, req.Send()
-}
-
-// GetKeyRotationStatusWithContext is the same as GetKeyRotationStatus with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetKeyRotationStatus for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) GetKeyRotationStatusWithContext(ctx aws.Context, input *GetKeyRotationStatusInput, opts ...request.Option) (*GetKeyRotationStatusOutput, error) {
- req, out := c.GetKeyRotationStatusRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetParametersForImport = "GetParametersForImport"
-
-// GetParametersForImportRequest generates a "aws/request.Request" representing the
-// client's request for the GetParametersForImport operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetParametersForImport for more information on using the GetParametersForImport
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetParametersForImportRequest method.
-// req, resp := client.GetParametersForImportRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetParametersForImport
-func (c *KMS) GetParametersForImportRequest(input *GetParametersForImportInput) (req *request.Request, output *GetParametersForImportOutput) {
- op := &request.Operation{
- Name: opGetParametersForImport,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetParametersForImportInput{}
- }
-
- output = &GetParametersForImportOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetParametersForImport API operation for AWS Key Management Service.
-//
-// Returns the items you need to import key material into a symmetric, customer
-// managed KMS key. For more information about importing key material into KMS,
-// see Importing Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html)
-// in the Key Management Service Developer Guide.
-//
-// This operation returns a public key and an import token. Use the public key
-// to encrypt the symmetric key material. Store the import token to send with
-// a subsequent ImportKeyMaterial request.
-//
-// You must specify the key ID of the symmetric KMS key into which you will
-// import key material. This KMS key's Origin must be EXTERNAL. You must also
-// specify the wrapping algorithm and type of wrapping key (public key) that
-// you will use to encrypt the key material. You cannot perform this operation
-// on an asymmetric KMS key or on any KMS key in a different Amazon Web Services
-// account.
-//
-// To import key material, you must use the public key and import token from
-// the same response. These items are valid for 24 hours. The expiration date
-// and time appear in the GetParametersForImport response. You cannot use an
-// expired token in an ImportKeyMaterial request. If your key and token expire,
-// send another GetParametersForImport request.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:GetParametersForImport (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * ImportKeyMaterial
-//
-// * DeleteImportedKeyMaterial
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation GetParametersForImport for usage and error information.
-//
-// Returned Error Types:
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetParametersForImport
-func (c *KMS) GetParametersForImport(input *GetParametersForImportInput) (*GetParametersForImportOutput, error) {
- req, out := c.GetParametersForImportRequest(input)
- return out, req.Send()
-}
-
-// GetParametersForImportWithContext is the same as GetParametersForImport with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetParametersForImport for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) GetParametersForImportWithContext(ctx aws.Context, input *GetParametersForImportInput, opts ...request.Option) (*GetParametersForImportOutput, error) {
- req, out := c.GetParametersForImportRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetPublicKey = "GetPublicKey"
-
-// GetPublicKeyRequest generates a "aws/request.Request" representing the
-// client's request for the GetPublicKey operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetPublicKey for more information on using the GetPublicKey
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetPublicKeyRequest method.
-// req, resp := client.GetPublicKeyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetPublicKey
-func (c *KMS) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Request, output *GetPublicKeyOutput) {
- op := &request.Operation{
- Name: opGetPublicKey,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetPublicKeyInput{}
- }
-
- output = &GetPublicKeyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetPublicKey API operation for AWS Key Management Service.
-//
-// Returns the public key of an asymmetric KMS key. Unlike the private key of
-// a asymmetric KMS key, which never leaves KMS unencrypted, callers with kms:GetPublicKey
-// permission can download the public key of an asymmetric KMS key. You can
-// share the public key to allow others to encrypt messages and verify signatures
-// outside of KMS. For information about symmetric and asymmetric KMS keys,
-// see Using Symmetric and Asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
-// in the Key Management Service Developer Guide.
-//
-// You do not need to download the public key. Instead, you can use the public
-// key within KMS by calling the Encrypt, ReEncrypt, or Verify operations with
-// the identifier of an asymmetric KMS key. When you use the public key within
-// KMS, you benefit from the authentication, authorization, and logging that
-// are part of every KMS operation. You also reduce of risk of encrypting data
-// that cannot be decrypted. These features are not effective outside of KMS.
-// For details, see Special Considerations for Downloading Public Keys (https://docs.aws.amazon.com/kms/latest/developerguide/download-public-key.html#download-public-key-considerations).
-//
-// To help you use the public key safely outside of KMS, GetPublicKey returns
-// important information about the public key in the response, including:
-//
-// * KeySpec (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeySpec):
-// The type of key material in the public key, such as RSA_4096 or ECC_NIST_P521.
-//
-// * KeyUsage (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage):
-// Whether the key is used for encryption or signing.
-//
-// * EncryptionAlgorithms (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-EncryptionAlgorithms)
-// or SigningAlgorithms (https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-SigningAlgorithms):
-// A list of the encryption algorithms or the signing algorithms for the
-// key.
-//
-// Although KMS cannot enforce these restrictions on external operations, it
-// is crucial that you use this information to prevent the public key from being
-// used improperly. For example, you can prevent a public signing key from being
-// used encrypt data, or prevent a public key from being used with an encryption
-// algorithm that is not supported by KMS. You can also avoid errors, such as
-// using the wrong signing algorithm in a verification operation.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:GetPublicKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations: CreateKey
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation GetPublicKey for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetPublicKey
-func (c *KMS) GetPublicKey(input *GetPublicKeyInput) (*GetPublicKeyOutput, error) {
- req, out := c.GetPublicKeyRequest(input)
- return out, req.Send()
-}
-
-// GetPublicKeyWithContext is the same as GetPublicKey with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetPublicKey for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) GetPublicKeyWithContext(ctx aws.Context, input *GetPublicKeyInput, opts ...request.Option) (*GetPublicKeyOutput, error) {
- req, out := c.GetPublicKeyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opImportKeyMaterial = "ImportKeyMaterial"
-
-// ImportKeyMaterialRequest generates a "aws/request.Request" representing the
-// client's request for the ImportKeyMaterial operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ImportKeyMaterial for more information on using the ImportKeyMaterial
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ImportKeyMaterialRequest method.
-// req, resp := client.ImportKeyMaterialRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ImportKeyMaterial
-func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *request.Request, output *ImportKeyMaterialOutput) {
- op := &request.Operation{
- Name: opImportKeyMaterial,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ImportKeyMaterialInput{}
- }
-
- output = &ImportKeyMaterialOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// ImportKeyMaterial API operation for AWS Key Management Service.
-//
-// Imports key material into an existing symmetric KMS KMS key that was created
-// without key material. After you successfully import key material into a KMS
-// key, you can reimport the same key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#reimport-key-material)
-// into that KMS key, but you cannot import different key material.
-//
-// You cannot perform this operation on an asymmetric KMS key or on any KMS
-// key in a different Amazon Web Services account. For more information about
-// creating KMS keys with no key material and then importing key material, see
-// Importing Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html)
-// in the Key Management Service Developer Guide.
-//
-// Before using this operation, call GetParametersForImport. Its response includes
-// a public key and an import token. Use the public key to encrypt the key material.
-// Then, submit the import token from the same GetParametersForImport response.
-//
-// When calling this operation, you must specify the following values:
-//
-// * The key ID or key ARN of a KMS key with no key material. Its Origin
-// must be EXTERNAL. To create a KMS key with no key material, call CreateKey
-// and set the value of its Origin parameter to EXTERNAL. To get the Origin
-// of a KMS key, call DescribeKey.)
-//
-// * The encrypted key material. To get the public key to encrypt the key
-// material, call GetParametersForImport.
-//
-// * The import token that GetParametersForImport returned. You must use
-// a public key and token from the same GetParametersForImport response.
-//
-// * Whether the key material expires and if so, when. If you set an expiration
-// date, KMS deletes the key material from the KMS key on the specified date,
-// and the KMS key becomes unusable. To use the KMS key again, you must reimport
-// the same key material. The only way to change an expiration date is by
-// reimporting the same key material and specifying a new expiration date.
-//
-// When this operation is successful, the key state of the KMS key changes from
-// PendingImport to Enabled, and you can use the KMS key.
-//
-// If this operation fails, use the exception to help determine the problem.
-// If the error is related to the key material, the import token, or wrapping
-// key, use GetParametersForImport to get a new public key and import token
-// for the KMS key and repeat the import procedure. For help, see How To Import
-// Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html#importing-keys-overview)
-// in the Key Management Service Developer Guide.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:ImportKeyMaterial (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * DeleteImportedKeyMaterial
-//
-// * GetParametersForImport
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ImportKeyMaterial for usage and error information.
-//
-// Returned Error Types:
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * InvalidCiphertextException
-// From the Decrypt or ReEncrypt operation, the request was rejected because
-// the specified ciphertext, or additional authenticated data incorporated into
-// the ciphertext, such as the encryption context, is corrupted, missing, or
-// otherwise invalid.
-//
-// From the ImportKeyMaterial operation, the request was rejected because KMS
-// could not decrypt the encrypted (wrapped) key material.
-//
-// * IncorrectKeyMaterialException
-// The request was rejected because the key material in the request is, expired,
-// invalid, or is not the same key material that was previously imported into
-// this KMS key.
-//
-// * ExpiredImportTokenException
-// The request was rejected because the specified import token is expired. Use
-// GetParametersForImport to get a new import token and public key, use the
-// new public key to encrypt the key material, and then try the request again.
-//
-// * InvalidImportTokenException
-// The request was rejected because the provided import token is invalid or
-// is associated with a different KMS key.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ImportKeyMaterial
-func (c *KMS) ImportKeyMaterial(input *ImportKeyMaterialInput) (*ImportKeyMaterialOutput, error) {
- req, out := c.ImportKeyMaterialRequest(input)
- return out, req.Send()
-}
-
-// ImportKeyMaterialWithContext is the same as ImportKeyMaterial with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ImportKeyMaterial for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ImportKeyMaterialWithContext(ctx aws.Context, input *ImportKeyMaterialInput, opts ...request.Option) (*ImportKeyMaterialOutput, error) {
- req, out := c.ImportKeyMaterialRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListAliases = "ListAliases"
-
-// ListAliasesRequest generates a "aws/request.Request" representing the
-// client's request for the ListAliases operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListAliases for more information on using the ListAliases
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListAliasesRequest method.
-// req, resp := client.ListAliasesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListAliases
-func (c *KMS) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, output *ListAliasesOutput) {
- op := &request.Operation{
- Name: opListAliases,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"Marker"},
- OutputTokens: []string{"NextMarker"},
- LimitToken: "Limit",
- TruncationToken: "Truncated",
- },
- }
-
- if input == nil {
- input = &ListAliasesInput{}
- }
-
- output = &ListAliasesOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListAliases API operation for AWS Key Management Service.
-//
-// Gets a list of aliases in the caller's Amazon Web Services account and region.
-// For more information about aliases, see CreateAlias.
-//
-// By default, the ListAliases operation returns all aliases in the account
-// and region. To get only the aliases associated with a particular KMS key,
-// use the KeyId parameter.
-//
-// The ListAliases response can include aliases that you created and associated
-// with your customer managed keys, and aliases that Amazon Web Services created
-// and associated with Amazon Web Services managed keys in your account. You
-// can recognize Amazon Web Services aliases because their names have the format
-// aws/, such as aws/dynamodb.
-//
-// The response might also include aliases that have no TargetKeyId field. These
-// are predefined aliases that Amazon Web Services has created but has not yet
-// associated with a KMS key. Aliases that Amazon Web Services creates in your
-// account, including predefined aliases, do not count against your KMS aliases
-// quota (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit).
-//
-// Cross-account use: No. ListAliases does not return aliases in other Amazon
-// Web Services accounts.
-//
-// Required permissions: kms:ListAliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy)
-//
-// For details, see Controlling access to aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access)
-// in the Key Management Service Developer Guide.
-//
-// Related operations:
-//
-// * CreateAlias
-//
-// * DeleteAlias
-//
-// * UpdateAlias
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ListAliases for usage and error information.
-//
-// Returned Error Types:
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidMarkerException
-// The request was rejected because the marker that specifies where pagination
-// should next begin is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListAliases
-func (c *KMS) ListAliases(input *ListAliasesInput) (*ListAliasesOutput, error) {
- req, out := c.ListAliasesRequest(input)
- return out, req.Send()
-}
-
-// ListAliasesWithContext is the same as ListAliases with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListAliases for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListAliasesWithContext(ctx aws.Context, input *ListAliasesInput, opts ...request.Option) (*ListAliasesOutput, error) {
- req, out := c.ListAliasesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListAliasesPages iterates over the pages of a ListAliases operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListAliases method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListAliases operation.
-// pageNum := 0
-// err := client.ListAliasesPages(params,
-// func(page *kms.ListAliasesOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *KMS) ListAliasesPages(input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool) error {
- return c.ListAliasesPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListAliasesPagesWithContext same as ListAliasesPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListAliasesPagesWithContext(ctx aws.Context, input *ListAliasesInput, fn func(*ListAliasesOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListAliasesInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListAliasesRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListAliasesOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListGrants = "ListGrants"
-
-// ListGrantsRequest generates a "aws/request.Request" representing the
-// client's request for the ListGrants operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListGrants for more information on using the ListGrants
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListGrantsRequest method.
-// req, resp := client.ListGrantsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListGrants
-func (c *KMS) ListGrantsRequest(input *ListGrantsInput) (req *request.Request, output *ListGrantsResponse) {
- op := &request.Operation{
- Name: opListGrants,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"Marker"},
- OutputTokens: []string{"NextMarker"},
- LimitToken: "Limit",
- TruncationToken: "Truncated",
- },
- }
-
- if input == nil {
- input = &ListGrantsInput{}
- }
-
- output = &ListGrantsResponse{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListGrants API operation for AWS Key Management Service.
-//
-// Gets a list of all grants for the specified KMS key.
-//
-// You must specify the KMS key in all requests. You can filter the grant list
-// by grant ID or grantee principal.
-//
-// For detailed information about grants, including grant terminology, see Using
-// grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html)
-// in the Key Management Service Developer Guide . For examples of working with
-// grants in several programming languages, see Programming grants (https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html).
-//
-// The GranteePrincipal field in the ListGrants response usually contains the
-// user or role designated as the grantee principal in the grant. However, when
-// the grantee principal in the grant is an Amazon Web Services service, the
-// GranteePrincipal field contains the service principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services),
-// which might represent several different grantee principals.
-//
-// Cross-account use: Yes. To perform this operation on a KMS key in a different
-// Amazon Web Services account, specify the key ARN in the value of the KeyId
-// parameter.
-//
-// Required permissions: kms:ListGrants (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * CreateGrant
-//
-// * ListRetirableGrants
-//
-// * RetireGrant
-//
-// * RevokeGrant
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ListGrants for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidMarkerException
-// The request was rejected because the marker that specifies where pagination
-// should next begin is not valid.
-//
-// * InvalidGrantIdException
-// The request was rejected because the specified GrantId is not valid.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListGrants
-func (c *KMS) ListGrants(input *ListGrantsInput) (*ListGrantsResponse, error) {
- req, out := c.ListGrantsRequest(input)
- return out, req.Send()
-}
-
-// ListGrantsWithContext is the same as ListGrants with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListGrants for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListGrantsWithContext(ctx aws.Context, input *ListGrantsInput, opts ...request.Option) (*ListGrantsResponse, error) {
- req, out := c.ListGrantsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListGrantsPages iterates over the pages of a ListGrants operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListGrants method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListGrants operation.
-// pageNum := 0
-// err := client.ListGrantsPages(params,
-// func(page *kms.ListGrantsResponse, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *KMS) ListGrantsPages(input *ListGrantsInput, fn func(*ListGrantsResponse, bool) bool) error {
- return c.ListGrantsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListGrantsPagesWithContext same as ListGrantsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListGrantsPagesWithContext(ctx aws.Context, input *ListGrantsInput, fn func(*ListGrantsResponse, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListGrantsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListGrantsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListGrantsResponse), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListKeyPolicies = "ListKeyPolicies"
-
-// ListKeyPoliciesRequest generates a "aws/request.Request" representing the
-// client's request for the ListKeyPolicies operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListKeyPolicies for more information on using the ListKeyPolicies
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListKeyPoliciesRequest method.
-// req, resp := client.ListKeyPoliciesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeyPolicies
-func (c *KMS) ListKeyPoliciesRequest(input *ListKeyPoliciesInput) (req *request.Request, output *ListKeyPoliciesOutput) {
- op := &request.Operation{
- Name: opListKeyPolicies,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"Marker"},
- OutputTokens: []string{"NextMarker"},
- LimitToken: "Limit",
- TruncationToken: "Truncated",
- },
- }
-
- if input == nil {
- input = &ListKeyPoliciesInput{}
- }
-
- output = &ListKeyPoliciesOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListKeyPolicies API operation for AWS Key Management Service.
-//
-// Gets the names of the key policies that are attached to a KMS key. This operation
-// is designed to get policy names that you can use in a GetKeyPolicy operation.
-// However, the only valid policy name is default.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:ListKeyPolicies (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * GetKeyPolicy
-//
-// * PutKeyPolicy
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ListKeyPolicies for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeyPolicies
-func (c *KMS) ListKeyPolicies(input *ListKeyPoliciesInput) (*ListKeyPoliciesOutput, error) {
- req, out := c.ListKeyPoliciesRequest(input)
- return out, req.Send()
-}
-
-// ListKeyPoliciesWithContext is the same as ListKeyPolicies with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListKeyPolicies for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListKeyPoliciesWithContext(ctx aws.Context, input *ListKeyPoliciesInput, opts ...request.Option) (*ListKeyPoliciesOutput, error) {
- req, out := c.ListKeyPoliciesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListKeyPoliciesPages iterates over the pages of a ListKeyPolicies operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListKeyPolicies method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListKeyPolicies operation.
-// pageNum := 0
-// err := client.ListKeyPoliciesPages(params,
-// func(page *kms.ListKeyPoliciesOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *KMS) ListKeyPoliciesPages(input *ListKeyPoliciesInput, fn func(*ListKeyPoliciesOutput, bool) bool) error {
- return c.ListKeyPoliciesPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListKeyPoliciesPagesWithContext same as ListKeyPoliciesPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListKeyPoliciesPagesWithContext(ctx aws.Context, input *ListKeyPoliciesInput, fn func(*ListKeyPoliciesOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListKeyPoliciesInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListKeyPoliciesRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListKeyPoliciesOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListKeys = "ListKeys"
-
-// ListKeysRequest generates a "aws/request.Request" representing the
-// client's request for the ListKeys operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListKeys for more information on using the ListKeys
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListKeysRequest method.
-// req, resp := client.ListKeysRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeys
-func (c *KMS) ListKeysRequest(input *ListKeysInput) (req *request.Request, output *ListKeysOutput) {
- op := &request.Operation{
- Name: opListKeys,
- HTTPMethod: "POST",
- HTTPPath: "/",
- Paginator: &request.Paginator{
- InputTokens: []string{"Marker"},
- OutputTokens: []string{"NextMarker"},
- LimitToken: "Limit",
- TruncationToken: "Truncated",
- },
- }
-
- if input == nil {
- input = &ListKeysInput{}
- }
-
- output = &ListKeysOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListKeys API operation for AWS Key Management Service.
-//
-// Gets a list of all KMS keys in the caller's Amazon Web Services account and
-// Region.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:ListKeys (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy)
-//
-// Related operations:
-//
-// * CreateKey
-//
-// * DescribeKey
-//
-// * ListAliases
-//
-// * ListResourceTags
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ListKeys for usage and error information.
-//
-// Returned Error Types:
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidMarkerException
-// The request was rejected because the marker that specifies where pagination
-// should next begin is not valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListKeys
-func (c *KMS) ListKeys(input *ListKeysInput) (*ListKeysOutput, error) {
- req, out := c.ListKeysRequest(input)
- return out, req.Send()
-}
-
-// ListKeysWithContext is the same as ListKeys with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListKeys for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListKeysWithContext(ctx aws.Context, input *ListKeysInput, opts ...request.Option) (*ListKeysOutput, error) {
- req, out := c.ListKeysRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListKeysPages iterates over the pages of a ListKeys operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListKeys method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListKeys operation.
-// pageNum := 0
-// err := client.ListKeysPages(params,
-// func(page *kms.ListKeysOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *KMS) ListKeysPages(input *ListKeysInput, fn func(*ListKeysOutput, bool) bool) error {
- return c.ListKeysPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListKeysPagesWithContext same as ListKeysPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListKeysPagesWithContext(ctx aws.Context, input *ListKeysInput, fn func(*ListKeysOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListKeysInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListKeysRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListKeysOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListResourceTags = "ListResourceTags"
-
-// ListResourceTagsRequest generates a "aws/request.Request" representing the
-// client's request for the ListResourceTags operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListResourceTags for more information on using the ListResourceTags
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListResourceTagsRequest method.
-// req, resp := client.ListResourceTagsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListResourceTags
-func (c *KMS) ListResourceTagsRequest(input *ListResourceTagsInput) (req *request.Request, output *ListResourceTagsOutput) {
- op := &request.Operation{
- Name: opListResourceTags,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListResourceTagsInput{}
- }
-
- output = &ListResourceTagsOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListResourceTags API operation for AWS Key Management Service.
-//
-// Returns all tags on the specified KMS key.
-//
-// For general information about tags, including the format and syntax, see
-// Tagging Amazon Web Services resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html)
-// in the Amazon Web Services General Reference. For information about using
-// tags in KMS, see Tagging keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html).
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:ListResourceTags (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations:
-//
-// * CreateKey
-//
-// * ReplicateKey
-//
-// * TagResource
-//
-// * UntagResource
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ListResourceTags for usage and error information.
-//
-// Returned Error Types:
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InvalidMarkerException
-// The request was rejected because the marker that specifies where pagination
-// should next begin is not valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListResourceTags
-func (c *KMS) ListResourceTags(input *ListResourceTagsInput) (*ListResourceTagsOutput, error) {
- req, out := c.ListResourceTagsRequest(input)
- return out, req.Send()
-}
-
-// ListResourceTagsWithContext is the same as ListResourceTags with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListResourceTags for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListResourceTagsWithContext(ctx aws.Context, input *ListResourceTagsInput, opts ...request.Option) (*ListResourceTagsOutput, error) {
- req, out := c.ListResourceTagsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListRetirableGrants = "ListRetirableGrants"
-
-// ListRetirableGrantsRequest generates a "aws/request.Request" representing the
-// client's request for the ListRetirableGrants operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListRetirableGrants for more information on using the ListRetirableGrants
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListRetirableGrantsRequest method.
-// req, resp := client.ListRetirableGrantsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListRetirableGrants
-func (c *KMS) ListRetirableGrantsRequest(input *ListRetirableGrantsInput) (req *request.Request, output *ListGrantsResponse) {
- op := &request.Operation{
- Name: opListRetirableGrants,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ListRetirableGrantsInput{}
- }
-
- output = &ListGrantsResponse{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ListRetirableGrants API operation for AWS Key Management Service.
-//
-// Returns information about all grants in the Amazon Web Services account and
-// Region that have the specified retiring principal.
-//
-// You can specify any principal in your Amazon Web Services account. The grants
-// that are returned include grants for KMS keys in your Amazon Web Services
-// account and other Amazon Web Services accounts. You might use this operation
-// to determine which grants you may retire. To retire a grant, use the RetireGrant
-// operation.
-//
-// For detailed information about grants, including grant terminology, see Using
-// grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html)
-// in the Key Management Service Developer Guide . For examples of working with
-// grants in several programming languages, see Programming grants (https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html).
-//
-// Cross-account use: You must specify a principal in your Amazon Web Services
-// account. However, this operation can return grants in any Amazon Web Services
-// account. You do not need kms:ListRetirableGrants permission (or any other
-// additional permission) in any Amazon Web Services account other than your
-// own.
-//
-// Required permissions: kms:ListRetirableGrants (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy) in your Amazon Web Services account.
-//
-// Related operations:
-//
-// * CreateGrant
-//
-// * ListGrants
-//
-// * RetireGrant
-//
-// * RevokeGrant
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ListRetirableGrants for usage and error information.
-//
-// Returned Error Types:
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidMarkerException
-// The request was rejected because the marker that specifies where pagination
-// should next begin is not valid.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ListRetirableGrants
-func (c *KMS) ListRetirableGrants(input *ListRetirableGrantsInput) (*ListGrantsResponse, error) {
- req, out := c.ListRetirableGrantsRequest(input)
- return out, req.Send()
-}
-
-// ListRetirableGrantsWithContext is the same as ListRetirableGrants with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListRetirableGrants for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ListRetirableGrantsWithContext(ctx aws.Context, input *ListRetirableGrantsInput, opts ...request.Option) (*ListGrantsResponse, error) {
- req, out := c.ListRetirableGrantsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opPutKeyPolicy = "PutKeyPolicy"
-
-// PutKeyPolicyRequest generates a "aws/request.Request" representing the
-// client's request for the PutKeyPolicy operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See PutKeyPolicy for more information on using the PutKeyPolicy
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the PutKeyPolicyRequest method.
-// req, resp := client.PutKeyPolicyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/PutKeyPolicy
-func (c *KMS) PutKeyPolicyRequest(input *PutKeyPolicyInput) (req *request.Request, output *PutKeyPolicyOutput) {
- op := &request.Operation{
- Name: opPutKeyPolicy,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &PutKeyPolicyInput{}
- }
-
- output = &PutKeyPolicyOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// PutKeyPolicy API operation for AWS Key Management Service.
-//
-// Attaches a key policy to the specified KMS key.
-//
-// For more information about key policies, see Key Policies (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html)
-// in the Key Management Service Developer Guide. For help writing and formatting
-// a JSON policy document, see the IAM JSON Policy Reference (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html)
-// in the Identity and Access Management User Guide . For examples of adding
-// a key policy in multiple programming languages, see Setting a key policy
-// (https://docs.aws.amazon.com/kms/latest/developerguide/programming-key-policies.html#put-policy)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:PutKeyPolicy (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations: GetKeyPolicy
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation PutKeyPolicy for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * MalformedPolicyDocumentException
-// The request was rejected because the specified policy is not syntactically
-// or semantically correct.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * LimitExceededException
-// The request was rejected because a quota was exceeded. For more information,
-// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
-// in the Key Management Service Developer Guide.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/PutKeyPolicy
-func (c *KMS) PutKeyPolicy(input *PutKeyPolicyInput) (*PutKeyPolicyOutput, error) {
- req, out := c.PutKeyPolicyRequest(input)
- return out, req.Send()
-}
-
-// PutKeyPolicyWithContext is the same as PutKeyPolicy with the addition of
-// the ability to pass a context and additional request options.
-//
-// See PutKeyPolicy for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) PutKeyPolicyWithContext(ctx aws.Context, input *PutKeyPolicyInput, opts ...request.Option) (*PutKeyPolicyOutput, error) {
- req, out := c.PutKeyPolicyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opReEncrypt = "ReEncrypt"
-
-// ReEncryptRequest generates a "aws/request.Request" representing the
-// client's request for the ReEncrypt operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ReEncrypt for more information on using the ReEncrypt
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ReEncryptRequest method.
-// req, resp := client.ReEncryptRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReEncrypt
-func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, output *ReEncryptOutput) {
- op := &request.Operation{
- Name: opReEncrypt,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ReEncryptInput{}
- }
-
- output = &ReEncryptOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ReEncrypt API operation for AWS Key Management Service.
-//
-// Decrypts ciphertext and then reencrypts it entirely within KMS. You can use
-// this operation to change the KMS key under which data is encrypted, such
-// as when you manually rotate (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html#rotate-keys-manually)
-// a KMS key or change the KMS key that protects a ciphertext. You can also
-// use it to reencrypt ciphertext under the same KMS key, such as to change
-// the encryption context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
-// of a ciphertext.
-//
-// The ReEncrypt operation can decrypt ciphertext that was encrypted by using
-// an KMS KMS key in an KMS operation, such as Encrypt or GenerateDataKey. It
-// can also decrypt ciphertext that was encrypted by using the public key of
-// an asymmetric KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks)
-// outside of KMS. However, it cannot decrypt ciphertext produced by other libraries,
-// such as the Amazon Web Services Encryption SDK (https://docs.aws.amazon.com/encryption-sdk/latest/developer-guide/)
-// or Amazon S3 client-side encryption (https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html).
-// These libraries return a ciphertext format that is incompatible with KMS.
-//
-// When you use the ReEncrypt operation, you need to provide information for
-// the decrypt operation and the subsequent encrypt operation.
-//
-// * If your ciphertext was encrypted under an asymmetric KMS key, you must
-// use the SourceKeyId parameter to identify the KMS key that encrypted the
-// ciphertext. You must also supply the encryption algorithm that was used.
-// This information is required to decrypt the data.
-//
-// * If your ciphertext was encrypted under a symmetric KMS key, the SourceKeyId
-// parameter is optional. KMS can get this information from metadata that
-// it adds to the symmetric ciphertext blob. This feature adds durability
-// to your implementation by ensuring that authorized users can decrypt ciphertext
-// decades after it was encrypted, even if they've lost track of the key
-// ID. However, specifying the source KMS key is always recommended as a
-// best practice. When you use the SourceKeyId parameter to specify a KMS
-// key, KMS uses only the KMS key you specify. If the ciphertext was encrypted
-// under a different KMS key, the ReEncrypt operation fails. This practice
-// ensures that you use the KMS key that you intend.
-//
-// * To reencrypt the data, you must use the DestinationKeyId parameter specify
-// the KMS key that re-encrypts the data after it is decrypted. You can select
-// a symmetric or asymmetric KMS key. If the destination KMS key is an asymmetric
-// KMS key, you must also provide the encryption algorithm. The algorithm
-// that you choose must be compatible with the KMS key. When you use an asymmetric
-// KMS key to encrypt or reencrypt data, be sure to record the KMS key and
-// encryption algorithm that you choose. You will be required to provide
-// the same KMS key and encryption algorithm when you decrypt the data. If
-// the KMS key and algorithm do not match the values used to encrypt the
-// data, the decrypt operation fails. You are not required to supply the
-// key ID and encryption algorithm when you decrypt with symmetric KMS keys
-// because KMS stores this information in the ciphertext blob. KMS cannot
-// store metadata in ciphertext generated with asymmetric keys. The standard
-// format for asymmetric key ciphertext does not include configurable fields.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. The source KMS key and destination KMS key can be
-// in different Amazon Web Services accounts. Either or both KMS keys can be
-// in a different account than the caller. To specify a KMS key in a different
-// account, you must use its key ARN or alias ARN.
-//
-// Required permissions:
-//
-// * kms:ReEncryptFrom (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// permission on the source KMS key (key policy)
-//
-// * kms:ReEncryptTo (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// permission on the destination KMS key (key policy)
-//
-// To permit reencryption from or to a KMS key, include the "kms:ReEncrypt*"
-// permission in your key policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html).
-// This permission is automatically included in the key policy when you use
-// the console to create a KMS key. But you must include it manually when you
-// create a KMS key programmatically or when you use the PutKeyPolicy operation
-// to set a key policy.
-//
-// Related operations:
-//
-// * Decrypt
-//
-// * Encrypt
-//
-// * GenerateDataKey
-//
-// * GenerateDataKeyPair
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ReEncrypt for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * InvalidCiphertextException
-// From the Decrypt or ReEncrypt operation, the request was rejected because
-// the specified ciphertext, or additional authenticated data incorporated into
-// the ciphertext, such as the encryption context, is corrupted, missing, or
-// otherwise invalid.
-//
-// From the ImportKeyMaterial operation, the request was rejected because KMS
-// could not decrypt the encrypted (wrapped) key material.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * IncorrectKeyException
-// The request was rejected because the specified KMS key cannot decrypt the
-// data. The KeyId in a Decrypt request and the SourceKeyId in a ReEncrypt request
-// must identify the same KMS key that was used to encrypt the ciphertext.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReEncrypt
-func (c *KMS) ReEncrypt(input *ReEncryptInput) (*ReEncryptOutput, error) {
- req, out := c.ReEncryptRequest(input)
- return out, req.Send()
-}
-
-// ReEncryptWithContext is the same as ReEncrypt with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ReEncrypt for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ReEncryptWithContext(ctx aws.Context, input *ReEncryptInput, opts ...request.Option) (*ReEncryptOutput, error) {
- req, out := c.ReEncryptRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opReplicateKey = "ReplicateKey"
-
-// ReplicateKeyRequest generates a "aws/request.Request" representing the
-// client's request for the ReplicateKey operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ReplicateKey for more information on using the ReplicateKey
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ReplicateKeyRequest method.
-// req, resp := client.ReplicateKeyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReplicateKey
-func (c *KMS) ReplicateKeyRequest(input *ReplicateKeyInput) (req *request.Request, output *ReplicateKeyOutput) {
- op := &request.Operation{
- Name: opReplicateKey,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ReplicateKeyInput{}
- }
-
- output = &ReplicateKeyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ReplicateKey API operation for AWS Key Management Service.
-//
-// Replicates a multi-Region key into the specified Region. This operation creates
-// a multi-Region replica key based on a multi-Region primary key in a different
-// Region of the same Amazon Web Services partition. You can create multiple
-// replicas of a primary key, but each must be in a different Region. To create
-// a multi-Region primary key, use the CreateKey operation.
-//
-// This operation supports multi-Region keys, an KMS feature that lets you create
-// multiple interoperable KMS keys in different Amazon Web Services Regions.
-// Because these KMS keys have the same key ID, key material, and other metadata,
-// you can use them interchangeably to encrypt data in one Amazon Web Services
-// Region and decrypt it in a different Amazon Web Services Region without re-encrypting
-// the data or making a cross-Region call. For more information about multi-Region
-// keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
-// in the Key Management Service Developer Guide.
-//
-// A replica key is a fully-functional KMS key that can be used independently
-// of its primary and peer replica keys. A primary key and its replica keys
-// share properties that make them interoperable. They have the same key ID
-// (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id)
-// and key material. They also have the same key spec (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec),
-// key usage (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage),
-// key material origin (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin),
-// and automatic key rotation status (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html).
-// KMS automatically synchronizes these shared properties among related multi-Region
-// keys. All other properties of a replica key can differ, including its key
-// policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html),
-// tags (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html),
-// aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html),
-// and key state (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html).
-// KMS pricing and quotas for KMS keys apply to each primary key and replica
-// key.
-//
-// When this operation completes, the new replica key has a transient key state
-// of Creating. This key state changes to Enabled (or PendingImport) after a
-// few seconds when the process of creating the new replica key is complete.
-// While the key state is Creating, you can manage key, but you cannot yet use
-// it in cryptographic operations. If you are creating and using the replica
-// key programmatically, retry on KMSInvalidStateException or call DescribeKey
-// to check its KeyState value before using it. For details about the Creating
-// key state, see Key state: Effect on your KMS key (kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// The CloudTrail log of a ReplicateKey operation records a ReplicateKey operation
-// in the primary key's Region and a CreateKey operation in the replica key's
-// Region.
-//
-// If you replicate a multi-Region primary key with imported key material, the
-// replica key is created with no key material. You must import the same key
-// material that you imported into the primary key. For details, see Importing
-// key material into multi-Region keys (kms/latest/developerguide/multi-region-keys-import.html)
-// in the Key Management Service Developer Guide.
-//
-// To convert a replica key to a primary key, use the UpdatePrimaryRegion operation.
-//
-// ReplicateKey uses different default values for the KeyPolicy and Tags parameters
-// than those used in the KMS console. For details, see the parameter descriptions.
-//
-// Cross-account use: No. You cannot use this operation to create a replica
-// key in a different Amazon Web Services account.
-//
-// Required permissions:
-//
-// * kms:ReplicateKey on the primary key (in the primary key's Region). Include
-// this permission in the primary key's key policy.
-//
-// * kms:CreateKey in an IAM policy in the replica Region.
-//
-// * To use the Tags parameter, kms:TagResource in an IAM policy in the replica
-// Region.
-//
-// Related operations
-//
-// * CreateKey
-//
-// * UpdatePrimaryRegion
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ReplicateKey for usage and error information.
-//
-// Returned Error Types:
-// * AlreadyExistsException
-// The request was rejected because it attempted to create a resource that already
-// exists.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * LimitExceededException
-// The request was rejected because a quota was exceeded. For more information,
-// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
-// in the Key Management Service Developer Guide.
-//
-// * MalformedPolicyDocumentException
-// The request was rejected because the specified policy is not syntactically
-// or semantically correct.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * TagException
-// The request was rejected because one or more tags are not valid.
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReplicateKey
-func (c *KMS) ReplicateKey(input *ReplicateKeyInput) (*ReplicateKeyOutput, error) {
- req, out := c.ReplicateKeyRequest(input)
- return out, req.Send()
-}
-
-// ReplicateKeyWithContext is the same as ReplicateKey with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ReplicateKey for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ReplicateKeyWithContext(ctx aws.Context, input *ReplicateKeyInput, opts ...request.Option) (*ReplicateKeyOutput, error) {
- req, out := c.ReplicateKeyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opRetireGrant = "RetireGrant"
-
-// RetireGrantRequest generates a "aws/request.Request" representing the
-// client's request for the RetireGrant operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See RetireGrant for more information on using the RetireGrant
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the RetireGrantRequest method.
-// req, resp := client.RetireGrantRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/RetireGrant
-func (c *KMS) RetireGrantRequest(input *RetireGrantInput) (req *request.Request, output *RetireGrantOutput) {
- op := &request.Operation{
- Name: opRetireGrant,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RetireGrantInput{}
- }
-
- output = &RetireGrantOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// RetireGrant API operation for AWS Key Management Service.
-//
-// Deletes a grant. Typically, you retire a grant when you no longer need its
-// permissions. To identify the grant to retire, use a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token),
-// or both the grant ID and a key identifier (key ID or key ARN) of the KMS
-// key. The CreateGrant operation returns both values.
-//
-// This operation can be called by the retiring principal for a grant, by the
-// grantee principal if the grant allows the RetireGrant operation, and by the
-// Amazon Web Services account (root user) in which the grant is created. It
-// can also be called by principals to whom permission for retiring a grant
-// is delegated. For details, see Retiring and revoking grants (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete)
-// in the Key Management Service Developer Guide.
-//
-// For detailed information about grants, including grant terminology, see Using
-// grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html)
-// in the Key Management Service Developer Guide . For examples of working with
-// grants in several programming languages, see Programming grants (https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html).
-//
-// Cross-account use: Yes. You can retire a grant on a KMS key in a different
-// Amazon Web Services account.
-//
-// Required permissions::Permission to retire a grant is determined primarily
-// by the grant. For details, see Retiring and revoking grants (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete)
-// in the Key Management Service Developer Guide.
-//
-// Related operations:
-//
-// * CreateGrant
-//
-// * ListGrants
-//
-// * ListRetirableGrants
-//
-// * RevokeGrant
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation RetireGrant for usage and error information.
-//
-// Returned Error Types:
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InvalidGrantIdException
-// The request was rejected because the specified GrantId is not valid.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/RetireGrant
-func (c *KMS) RetireGrant(input *RetireGrantInput) (*RetireGrantOutput, error) {
- req, out := c.RetireGrantRequest(input)
- return out, req.Send()
-}
-
-// RetireGrantWithContext is the same as RetireGrant with the addition of
-// the ability to pass a context and additional request options.
-//
-// See RetireGrant for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) RetireGrantWithContext(ctx aws.Context, input *RetireGrantInput, opts ...request.Option) (*RetireGrantOutput, error) {
- req, out := c.RetireGrantRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opRevokeGrant = "RevokeGrant"
-
-// RevokeGrantRequest generates a "aws/request.Request" representing the
-// client's request for the RevokeGrant operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See RevokeGrant for more information on using the RevokeGrant
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the RevokeGrantRequest method.
-// req, resp := client.RevokeGrantRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/RevokeGrant
-func (c *KMS) RevokeGrantRequest(input *RevokeGrantInput) (req *request.Request, output *RevokeGrantOutput) {
- op := &request.Operation{
- Name: opRevokeGrant,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &RevokeGrantInput{}
- }
-
- output = &RevokeGrantOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// RevokeGrant API operation for AWS Key Management Service.
-//
-// Deletes the specified grant. You revoke a grant to terminate the permissions
-// that the grant allows. For more information, see Retiring and revoking grants
-// (https://docs.aws.amazon.com/kms/latest/developerguide/managing-grants.html#grant-delete)
-// in the Key Management Service Developer Guide .
-//
-// When you create, retire, or revoke a grant, there might be a brief delay,
-// usually less than five minutes, until the grant is available throughout KMS.
-// This state is known as eventual consistency. For details, see Eventual consistency
-// (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency)
-// in the Key Management Service Developer Guide .
-//
-// For detailed information about grants, including grant terminology, see Using
-// grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html)
-// in the Key Management Service Developer Guide . For examples of working with
-// grants in several programming languages, see Programming grants (https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html).
-//
-// Cross-account use: Yes. To perform this operation on a KMS key in a different
-// Amazon Web Services account, specify the key ARN in the value of the KeyId
-// parameter.
-//
-// Required permissions: kms:RevokeGrant (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy).
-//
-// Related operations:
-//
-// * CreateGrant
-//
-// * ListGrants
-//
-// * ListRetirableGrants
-//
-// * RetireGrant
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation RevokeGrant for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InvalidGrantIdException
-// The request was rejected because the specified GrantId is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/RevokeGrant
-func (c *KMS) RevokeGrant(input *RevokeGrantInput) (*RevokeGrantOutput, error) {
- req, out := c.RevokeGrantRequest(input)
- return out, req.Send()
-}
-
-// RevokeGrantWithContext is the same as RevokeGrant with the addition of
-// the ability to pass a context and additional request options.
-//
-// See RevokeGrant for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) RevokeGrantWithContext(ctx aws.Context, input *RevokeGrantInput, opts ...request.Option) (*RevokeGrantOutput, error) {
- req, out := c.RevokeGrantRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opScheduleKeyDeletion = "ScheduleKeyDeletion"
-
-// ScheduleKeyDeletionRequest generates a "aws/request.Request" representing the
-// client's request for the ScheduleKeyDeletion operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ScheduleKeyDeletion for more information on using the ScheduleKeyDeletion
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ScheduleKeyDeletionRequest method.
-// req, resp := client.ScheduleKeyDeletionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ScheduleKeyDeletion
-func (c *KMS) ScheduleKeyDeletionRequest(input *ScheduleKeyDeletionInput) (req *request.Request, output *ScheduleKeyDeletionOutput) {
- op := &request.Operation{
- Name: opScheduleKeyDeletion,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &ScheduleKeyDeletionInput{}
- }
-
- output = &ScheduleKeyDeletionOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// ScheduleKeyDeletion API operation for AWS Key Management Service.
-//
-// Schedules the deletion of a KMS key. By default, KMS applies a waiting period
-// of 30 days, but you can specify a waiting period of 7-30 days. When this
-// operation is successful, the key state of the KMS key changes to PendingDeletion
-// and the key can't be used in any cryptographic operations. It remains in
-// this state for the duration of the waiting period. Before the waiting period
-// ends, you can use CancelKeyDeletion to cancel the deletion of the KMS key.
-// After the waiting period ends, KMS deletes the KMS key, its key material,
-// and all KMS data associated with it, including all aliases that refer to
-// it.
-//
-// Deleting a KMS key is a destructive and potentially dangerous operation.
-// When a KMS key is deleted, all data that was encrypted under the KMS key
-// is unrecoverable. (The only exception is a multi-Region replica key.) To
-// prevent the use of a KMS key without deleting it, use DisableKey.
-//
-// If you schedule deletion of a KMS key from a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html),
-// when the waiting period expires, ScheduleKeyDeletion deletes the KMS key
-// from KMS. Then KMS makes a best effort to delete the key material from the
-// associated CloudHSM cluster. However, you might need to manually delete the
-// orphaned key material (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key)
-// from the cluster and its backups.
-//
-// You can schedule the deletion of a multi-Region primary key and its replica
-// keys at any time. However, KMS will not delete a multi-Region primary key
-// with existing replica keys. If you schedule the deletion of a primary key
-// with replicas, its key state changes to PendingReplicaDeletion and it cannot
-// be replicated or used in cryptographic operations. This status can continue
-// indefinitely. When the last of its replicas keys is deleted (not just scheduled),
-// the key state of the primary key changes to PendingDeletion and its waiting
-// period (PendingWindowInDays) begins. For details, see Deleting multi-Region
-// keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html)
-// in the Key Management Service Developer Guide.
-//
-// For more information about scheduling a KMS key for deletion, see Deleting
-// KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html)
-// in the Key Management Service Developer Guide.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:ScheduleKeyDeletion (key policy)
-//
-// Related operations
-//
-// * CancelKeyDeletion
-//
-// * DisableKey
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation ScheduleKeyDeletion for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ScheduleKeyDeletion
-func (c *KMS) ScheduleKeyDeletion(input *ScheduleKeyDeletionInput) (*ScheduleKeyDeletionOutput, error) {
- req, out := c.ScheduleKeyDeletionRequest(input)
- return out, req.Send()
-}
-
-// ScheduleKeyDeletionWithContext is the same as ScheduleKeyDeletion with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ScheduleKeyDeletion for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) ScheduleKeyDeletionWithContext(ctx aws.Context, input *ScheduleKeyDeletionInput, opts ...request.Option) (*ScheduleKeyDeletionOutput, error) {
- req, out := c.ScheduleKeyDeletionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opSign = "Sign"
-
-// SignRequest generates a "aws/request.Request" representing the
-// client's request for the Sign operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See Sign for more information on using the Sign
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the SignRequest method.
-// req, resp := client.SignRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Sign
-func (c *KMS) SignRequest(input *SignInput) (req *request.Request, output *SignOutput) {
- op := &request.Operation{
- Name: opSign,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &SignInput{}
- }
-
- output = &SignOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// Sign API operation for AWS Key Management Service.
-//
-// Creates a digital signature (https://en.wikipedia.org/wiki/Digital_signature)
-// for a message or message digest by using the private key in an asymmetric
-// KMS key. To verify the signature, use the Verify operation, or use the public
-// key in the same asymmetric KMS key outside of KMS. For information about
-// symmetric and asymmetric KMS keys, see Using Symmetric and Asymmetric KMS
-// keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
-// in the Key Management Service Developer Guide.
-//
-// Digital signatures are generated and verified by using asymmetric key pair,
-// such as an RSA or ECC pair that is represented by an asymmetric KMS key.
-// The key owner (or an authorized user) uses their private key to sign a message.
-// Anyone with the public key can verify that the message was signed with that
-// particular private key and that the message hasn't changed since it was signed.
-//
-// To use the Sign operation, provide the following information:
-//
-// * Use the KeyId parameter to identify an asymmetric KMS key with a KeyUsage
-// value of SIGN_VERIFY. To get the KeyUsage value of a KMS key, use the
-// DescribeKey operation. The caller must have kms:Sign permission on the
-// KMS key.
-//
-// * Use the Message parameter to specify the message or message digest to
-// sign. You can submit messages of up to 4096 bytes. To sign a larger message,
-// generate a hash digest of the message, and then provide the hash digest
-// in the Message parameter. To indicate whether the message is a full message
-// or a digest, use the MessageType parameter.
-//
-// * Choose a signing algorithm that is compatible with the KMS key.
-//
-// When signing a message, be sure to record the KMS key and the signing algorithm.
-// This information is required to verify the signature.
-//
-// To verify the signature that this operation generates, use the Verify operation.
-// Or use the GetPublicKey operation to download the public key and then use
-// the public key to verify the signature outside of KMS.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:Sign (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations: Verify
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation Sign for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Sign
-func (c *KMS) Sign(input *SignInput) (*SignOutput, error) {
- req, out := c.SignRequest(input)
- return out, req.Send()
-}
-
-// SignWithContext is the same as Sign with the addition of
-// the ability to pass a context and additional request options.
-//
-// See Sign for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) SignWithContext(ctx aws.Context, input *SignInput, opts ...request.Option) (*SignOutput, error) {
- req, out := c.SignRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opTagResource = "TagResource"
-
-// TagResourceRequest generates a "aws/request.Request" representing the
-// client's request for the TagResource operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See TagResource for more information on using the TagResource
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the TagResourceRequest method.
-// req, resp := client.TagResourceRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/TagResource
-func (c *KMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
- op := &request.Operation{
- Name: opTagResource,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &TagResourceInput{}
- }
-
- output = &TagResourceOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// TagResource API operation for AWS Key Management Service.
-//
-// Adds or edits tags on a customer managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk).
-//
-// Tagging or untagging a KMS key can allow or deny permission to the KMS key.
-// For details, see Using ABAC in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html)
-// in the Key Management Service Developer Guide.
-//
-// Each tag consists of a tag key and a tag value, both of which are case-sensitive
-// strings. The tag value can be an empty (null) string. To add a tag, specify
-// a new tag key and a tag value. To edit a tag, specify an existing tag key
-// and a new tag value.
-//
-// You can use this operation to tag a customer managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk),
-// but you cannot tag an Amazon Web Services managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk),
-// an Amazon Web Services owned key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk),
-// a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#keystore-concept),
-// or an alias (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#alias-concept).
-//
-// You can also add tags to a KMS key while creating it (CreateKey) or replicating
-// it (ReplicateKey).
-//
-// For information about using tags in KMS, see Tagging keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html).
-// For general information about tags, including the format and syntax, see
-// Tagging Amazon Web Services resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html)
-// in the Amazon Web Services General Reference.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations
-//
-// * CreateKey
-//
-// * ListResourceTags
-//
-// * ReplicateKey
-//
-// * UntagResource
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation TagResource for usage and error information.
-//
-// Returned Error Types:
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * LimitExceededException
-// The request was rejected because a quota was exceeded. For more information,
-// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
-// in the Key Management Service Developer Guide.
-//
-// * TagException
-// The request was rejected because one or more tags are not valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/TagResource
-func (c *KMS) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
- req, out := c.TagResourceRequest(input)
- return out, req.Send()
-}
-
-// TagResourceWithContext is the same as TagResource with the addition of
-// the ability to pass a context and additional request options.
-//
-// See TagResource for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
- req, out := c.TagResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUntagResource = "UntagResource"
-
-// UntagResourceRequest generates a "aws/request.Request" representing the
-// client's request for the UntagResource operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UntagResource for more information on using the UntagResource
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UntagResourceRequest method.
-// req, resp := client.UntagResourceRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UntagResource
-func (c *KMS) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
- op := &request.Operation{
- Name: opUntagResource,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UntagResourceInput{}
- }
-
- output = &UntagResourceOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// UntagResource API operation for AWS Key Management Service.
-//
-// Deletes tags from a customer managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk).
-// To delete a tag, specify the tag key and the KMS key.
-//
-// Tagging or untagging a KMS key can allow or deny permission to the KMS key.
-// For details, see Using ABAC in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html)
-// in the Key Management Service Developer Guide.
-//
-// When it succeeds, the UntagResource operation doesn't return any output.
-// Also, if the specified tag key isn't found on the KMS key, it doesn't throw
-// an exception or return a response. To confirm that the operation worked,
-// use the ListResourceTags operation.
-//
-// For information about using tags in KMS, see Tagging keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html).
-// For general information about tags, including the format and syntax, see
-// Tagging Amazon Web Services resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html)
-// in the Amazon Web Services General Reference.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:UntagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations
-//
-// * CreateKey
-//
-// * ListResourceTags
-//
-// * ReplicateKey
-//
-// * TagResource
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation UntagResource for usage and error information.
-//
-// Returned Error Types:
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * TagException
-// The request was rejected because one or more tags are not valid.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UntagResource
-func (c *KMS) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
- req, out := c.UntagResourceRequest(input)
- return out, req.Send()
-}
-
-// UntagResourceWithContext is the same as UntagResource with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UntagResource for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
- req, out := c.UntagResourceRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdateAlias = "UpdateAlias"
-
-// UpdateAliasRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateAlias operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdateAlias for more information on using the UpdateAlias
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdateAliasRequest method.
-// req, resp := client.UpdateAliasRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateAlias
-func (c *KMS) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, output *UpdateAliasOutput) {
- op := &request.Operation{
- Name: opUpdateAlias,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdateAliasInput{}
- }
-
- output = &UpdateAliasOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// UpdateAlias API operation for AWS Key Management Service.
-//
-// Associates an existing KMS alias with a different KMS key. Each alias is
-// associated with only one KMS key at a time, although a KMS key can have multiple
-// aliases. The alias and the KMS key must be in the same Amazon Web Services
-// account and Region.
-//
-// Adding, deleting, or updating an alias can allow or deny permission to the
-// KMS key. For details, see Using ABAC in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html)
-// in the Key Management Service Developer Guide.
-//
-// The current and new KMS key must be the same type (both symmetric or both
-// asymmetric), and they must have the same key usage (ENCRYPT_DECRYPT or SIGN_VERIFY).
-// This restriction prevents errors in code that uses aliases. If you must assign
-// an alias to a different type of KMS key, use DeleteAlias to delete the old
-// alias and CreateAlias to create a new alias.
-//
-// You cannot use UpdateAlias to change an alias name. To change an alias name,
-// use DeleteAlias to delete the old alias and CreateAlias to create a new alias.
-//
-// Because an alias is not a property of a KMS key, you can create, update,
-// and delete the aliases of a KMS key without affecting the KMS key. Also,
-// aliases do not appear in the response from the DescribeKey operation. To
-// get the aliases of all KMS keys in the account, use the ListAliases operation.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions
-//
-// * kms:UpdateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// on the alias (IAM policy).
-//
-// * kms:UpdateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// on the current KMS key (key policy).
-//
-// * kms:UpdateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// on the new KMS key (key policy).
-//
-// For details, see Controlling access to aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access)
-// in the Key Management Service Developer Guide.
-//
-// Related operations:
-//
-// * CreateAlias
-//
-// * DeleteAlias
-//
-// * ListAliases
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation UpdateAlias for usage and error information.
-//
-// Returned Error Types:
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * LimitExceededException
-// The request was rejected because a quota was exceeded. For more information,
-// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
-// in the Key Management Service Developer Guide.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateAlias
-func (c *KMS) UpdateAlias(input *UpdateAliasInput) (*UpdateAliasOutput, error) {
- req, out := c.UpdateAliasRequest(input)
- return out, req.Send()
-}
-
-// UpdateAliasWithContext is the same as UpdateAlias with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdateAlias for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) UpdateAliasWithContext(ctx aws.Context, input *UpdateAliasInput, opts ...request.Option) (*UpdateAliasOutput, error) {
- req, out := c.UpdateAliasRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdateCustomKeyStore = "UpdateCustomKeyStore"
-
-// UpdateCustomKeyStoreRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateCustomKeyStore operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdateCustomKeyStore for more information on using the UpdateCustomKeyStore
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdateCustomKeyStoreRequest method.
-// req, resp := client.UpdateCustomKeyStoreRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateCustomKeyStore
-func (c *KMS) UpdateCustomKeyStoreRequest(input *UpdateCustomKeyStoreInput) (req *request.Request, output *UpdateCustomKeyStoreOutput) {
- op := &request.Operation{
- Name: opUpdateCustomKeyStore,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdateCustomKeyStoreInput{}
- }
-
- output = &UpdateCustomKeyStoreOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// UpdateCustomKeyStore API operation for AWS Key Management Service.
-//
-// Changes the properties of a custom key store. Use the CustomKeyStoreId parameter
-// to identify the custom key store you want to edit. Use the remaining parameters
-// to change the properties of the custom key store.
-//
-// You can only update a custom key store that is disconnected. To disconnect
-// the custom key store, use DisconnectCustomKeyStore. To reconnect the custom
-// key store after the update completes, use ConnectCustomKeyStore. To find
-// the connection state of a custom key store, use the DescribeCustomKeyStores
-// operation.
-//
-// The CustomKeyStoreId parameter is required in all commands. Use the other
-// parameters of UpdateCustomKeyStore to edit your key store settings.
-//
-// * Use the NewCustomKeyStoreName parameter to change the friendly name
-// of the custom key store to the value that you specify.
-//
-// * Use the KeyStorePassword parameter tell KMS the current password of
-// the kmsuser crypto user (CU) (https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser)
-// in the associated CloudHSM cluster. You can use this parameter to fix
-// connection failures (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-password)
-// that occur when KMS cannot log into the associated cluster because the
-// kmsuser password has changed. This value does not change the password
-// in the CloudHSM cluster.
-//
-// * Use the CloudHsmClusterId parameter to associate the custom key store
-// with a different, but related, CloudHSM cluster. You can use this parameter
-// to repair a custom key store if its CloudHSM cluster becomes corrupted
-// or is deleted, or when you need to create or restore a cluster from a
-// backup.
-//
-// If the operation succeeds, it returns a JSON object with no properties.
-//
-// This operation is part of the Custom Key Store feature (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
-// feature in KMS, which combines the convenience and extensive integration
-// of KMS with the isolation and control of a single-tenant key store.
-//
-// Cross-account use: No. You cannot perform this operation on a custom key
-// store in a different Amazon Web Services account.
-//
-// Required permissions: kms:UpdateCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (IAM policy)
-//
-// Related operations:
-//
-// * ConnectCustomKeyStore
-//
-// * CreateCustomKeyStore
-//
-// * DeleteCustomKeyStore
-//
-// * DescribeCustomKeyStores
-//
-// * DisconnectCustomKeyStore
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation UpdateCustomKeyStore for usage and error information.
-//
-// Returned Error Types:
-// * CustomKeyStoreNotFoundException
-// The request was rejected because KMS cannot find a custom key store with
-// the specified key store name or ID.
-//
-// * CustomKeyStoreNameInUseException
-// The request was rejected because the specified custom key store name is already
-// assigned to another custom key store in the account. Try again with a custom
-// key store name that is unique in the account.
-//
-// * CloudHsmClusterNotFoundException
-// The request was rejected because KMS cannot find the CloudHSM cluster with
-// the specified cluster ID. Retry the request with a different cluster ID.
-//
-// * CloudHsmClusterNotRelatedException
-// The request was rejected because the specified CloudHSM cluster has a different
-// cluster certificate than the original cluster. You cannot use the operation
-// to specify an unrelated cluster.
-//
-// Specify a cluster that shares a backup history with the original cluster.
-// This includes clusters that were created from a backup of the current cluster,
-// and clusters that were created from the same backup that produced the current
-// cluster.
-//
-// Clusters that share a backup history have the same cluster certificate. To
-// view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
-// operation.
-//
-// * CustomKeyStoreInvalidStateException
-// The request was rejected because of the ConnectionState of the custom key
-// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores
-// operation.
-//
-// This exception is thrown under the following conditions:
-//
-// * You requested the CreateKey or GenerateRandom operation in a custom
-// key store that is not connected. These operations are valid only when
-// the custom key store ConnectionState is CONNECTED.
-//
-// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
-// on a custom key store that is not disconnected. This operation is valid
-// only when the custom key store ConnectionState is DISCONNECTED.
-//
-// * You requested the ConnectCustomKeyStore operation on a custom key store
-// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
-// for all other ConnectionState values.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * CloudHsmClusterNotActiveException
-// The request was rejected because the CloudHSM cluster that is associated
-// with the custom key store is not active. Initialize and activate the cluster
-// and try the command again. For detailed instructions, see Getting Started
-// (https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html)
-// in the CloudHSM User Guide.
-//
-// * CloudHsmClusterInvalidConfigurationException
-// The request was rejected because the associated CloudHSM cluster did not
-// meet the configuration requirements for a custom key store.
-//
-// * The cluster must be configured with private subnets in at least two
-// different Availability Zones in the Region.
-//
-// * The security group for the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// (cloudhsm-cluster--sg) must include inbound rules and outbound
-// rules that allow TCP traffic on ports 2223-2225. The Source in the inbound
-// rules and the Destination in the outbound rules must match the security
-// group ID. These rules are set by default when you create the cluster.
-// Do not delete or change them. To get information about a particular security
-// group, use the DescribeSecurityGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
-// operation.
-//
-// * The cluster must contain at least as many HSMs as the operation requires.
-// To add HSMs, use the CloudHSM CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html)
-// operation. For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey
-// operations, the CloudHSM cluster must have at least two active HSMs, each
-// in a different Availability Zone. For the ConnectCustomKeyStore operation,
-// the CloudHSM must contain at least one active HSM.
-//
-// For information about the requirements for an CloudHSM cluster that is associated
-// with a custom key store, see Assemble the Prerequisites (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore)
-// in the Key Management Service Developer Guide. For information about creating
-// a private subnet for an CloudHSM cluster, see Create a Private Subnet (https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html)
-// in the CloudHSM User Guide. For information about cluster security groups,
-// see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// in the CloudHSM User Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateCustomKeyStore
-func (c *KMS) UpdateCustomKeyStore(input *UpdateCustomKeyStoreInput) (*UpdateCustomKeyStoreOutput, error) {
- req, out := c.UpdateCustomKeyStoreRequest(input)
- return out, req.Send()
-}
-
-// UpdateCustomKeyStoreWithContext is the same as UpdateCustomKeyStore with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdateCustomKeyStore for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) UpdateCustomKeyStoreWithContext(ctx aws.Context, input *UpdateCustomKeyStoreInput, opts ...request.Option) (*UpdateCustomKeyStoreOutput, error) {
- req, out := c.UpdateCustomKeyStoreRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdateKeyDescription = "UpdateKeyDescription"
-
-// UpdateKeyDescriptionRequest generates a "aws/request.Request" representing the
-// client's request for the UpdateKeyDescription operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdateKeyDescription for more information on using the UpdateKeyDescription
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdateKeyDescriptionRequest method.
-// req, resp := client.UpdateKeyDescriptionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateKeyDescription
-func (c *KMS) UpdateKeyDescriptionRequest(input *UpdateKeyDescriptionInput) (req *request.Request, output *UpdateKeyDescriptionOutput) {
- op := &request.Operation{
- Name: opUpdateKeyDescription,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdateKeyDescriptionInput{}
- }
-
- output = &UpdateKeyDescriptionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// UpdateKeyDescription API operation for AWS Key Management Service.
-//
-// Updates the description of a KMS key. To see the description of a KMS key,
-// use DescribeKey.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: No. You cannot perform this operation on a KMS key in
-// a different Amazon Web Services account.
-//
-// Required permissions: kms:UpdateKeyDescription (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations
-//
-// * CreateKey
-//
-// * DescribeKey
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation UpdateKeyDescription for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdateKeyDescription
-func (c *KMS) UpdateKeyDescription(input *UpdateKeyDescriptionInput) (*UpdateKeyDescriptionOutput, error) {
- req, out := c.UpdateKeyDescriptionRequest(input)
- return out, req.Send()
-}
-
-// UpdateKeyDescriptionWithContext is the same as UpdateKeyDescription with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdateKeyDescription for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) UpdateKeyDescriptionWithContext(ctx aws.Context, input *UpdateKeyDescriptionInput, opts ...request.Option) (*UpdateKeyDescriptionOutput, error) {
- req, out := c.UpdateKeyDescriptionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opUpdatePrimaryRegion = "UpdatePrimaryRegion"
-
-// UpdatePrimaryRegionRequest generates a "aws/request.Request" representing the
-// client's request for the UpdatePrimaryRegion operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See UpdatePrimaryRegion for more information on using the UpdatePrimaryRegion
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the UpdatePrimaryRegionRequest method.
-// req, resp := client.UpdatePrimaryRegionRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdatePrimaryRegion
-func (c *KMS) UpdatePrimaryRegionRequest(input *UpdatePrimaryRegionInput) (req *request.Request, output *UpdatePrimaryRegionOutput) {
- op := &request.Operation{
- Name: opUpdatePrimaryRegion,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &UpdatePrimaryRegionInput{}
- }
-
- output = &UpdatePrimaryRegionOutput{}
- req = c.newRequest(op, input, output)
- req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// UpdatePrimaryRegion API operation for AWS Key Management Service.
-//
-// Changes the primary key of a multi-Region key.
-//
-// This operation changes the replica key in the specified Region to a primary
-// key and changes the former primary key to a replica key. For example, suppose
-// you have a primary key in us-east-1 and a replica key in eu-west-2. If you
-// run UpdatePrimaryRegion with a PrimaryRegion value of eu-west-2, the primary
-// key is now the key in eu-west-2, and the key in us-east-1 becomes a replica
-// key. For details, see Updating the primary Region (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-manage.html#multi-region-update)
-// in the Key Management Service Developer Guide.
-//
-// This operation supports multi-Region keys, an KMS feature that lets you create
-// multiple interoperable KMS keys in different Amazon Web Services Regions.
-// Because these KMS keys have the same key ID, key material, and other metadata,
-// you can use them interchangeably to encrypt data in one Amazon Web Services
-// Region and decrypt it in a different Amazon Web Services Region without re-encrypting
-// the data or making a cross-Region call. For more information about multi-Region
-// keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
-// in the Key Management Service Developer Guide.
-//
-// The primary key of a multi-Region key is the source for properties that are
-// always shared by primary and replica keys, including the key material, key
-// ID (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id),
-// key spec (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec),
-// key usage (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage),
-// key material origin (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin),
-// and automatic key rotation (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html).
-// It's the only key that can be replicated. You cannot delete the primary key
-// (https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html)
-// until all replica keys are deleted.
-//
-// The key ID and primary Region that you specify uniquely identify the replica
-// key that will become the primary key. The primary Region must already have
-// a replica key. This operation does not create a KMS key in the specified
-// Region. To find the replica keys, use the DescribeKey operation on the primary
-// key or any replica key. To create a replica key, use the ReplicateKey operation.
-//
-// You can run this operation while using the affected multi-Region keys in
-// cryptographic operations. This operation should not delay, interrupt, or
-// cause failures in cryptographic operations.
-//
-// Even after this operation completes, the process of updating the primary
-// Region might still be in progress for a few more seconds. Operations such
-// as DescribeKey might display both the old and new primary keys as replicas.
-// The old and new primary keys have a transient key state of Updating. The
-// original key state is restored when the update is complete. While the key
-// state is Updating, you can use the keys in cryptographic operations, but
-// you cannot replicate the new primary key or perform certain management operations,
-// such as enabling or disabling these keys. For details about the Updating
-// key state, see Key state: Effect on your KMS key (kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// This operation does not return any output. To verify that primary key is
-// changed, use the DescribeKey operation.
-//
-// Cross-account use: No. You cannot use this operation in a different Amazon
-// Web Services account.
-//
-// Required permissions:
-//
-// * kms:UpdatePrimaryRegion on the current primary key (in the primary key's
-// Region). Include this permission primary key's key policy.
-//
-// * kms:UpdatePrimaryRegion on the current replica key (in the replica key's
-// Region). Include this permission in the replica key's key policy.
-//
-// Related operations
-//
-// * CreateKey
-//
-// * ReplicateKey
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation UpdatePrimaryRegion for usage and error information.
-//
-// Returned Error Types:
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * InvalidArnException
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * UnsupportedOperationException
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdatePrimaryRegion
-func (c *KMS) UpdatePrimaryRegion(input *UpdatePrimaryRegionInput) (*UpdatePrimaryRegionOutput, error) {
- req, out := c.UpdatePrimaryRegionRequest(input)
- return out, req.Send()
-}
-
-// UpdatePrimaryRegionWithContext is the same as UpdatePrimaryRegion with the addition of
-// the ability to pass a context and additional request options.
-//
-// See UpdatePrimaryRegion for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) UpdatePrimaryRegionWithContext(ctx aws.Context, input *UpdatePrimaryRegionInput, opts ...request.Option) (*UpdatePrimaryRegionOutput, error) {
- req, out := c.UpdatePrimaryRegionRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opVerify = "Verify"
-
-// VerifyRequest generates a "aws/request.Request" representing the
-// client's request for the Verify operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See Verify for more information on using the Verify
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the VerifyRequest method.
-// req, resp := client.VerifyRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Verify
-func (c *KMS) VerifyRequest(input *VerifyInput) (req *request.Request, output *VerifyOutput) {
- op := &request.Operation{
- Name: opVerify,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &VerifyInput{}
- }
-
- output = &VerifyOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// Verify API operation for AWS Key Management Service.
-//
-// Verifies a digital signature that was generated by the Sign operation.
-//
-// Verification confirms that an authorized user signed the message with the
-// specified KMS key and signing algorithm, and the message hasn't changed since
-// it was signed. If the signature is verified, the value of the SignatureValid
-// field in the response is True. If the signature verification fails, the Verify
-// operation fails with an KMSInvalidSignatureException exception.
-//
-// A digital signature is generated by using the private key in an asymmetric
-// KMS key. The signature is verified by using the public key in the same asymmetric
-// KMS key. For information about symmetric and asymmetric KMS keys, see Using
-// Symmetric and Asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html)
-// in the Key Management Service Developer Guide.
-//
-// To verify a digital signature, you can use the Verify operation. Specify
-// the same asymmetric KMS key, message, and signing algorithm that were used
-// to produce the signature.
-//
-// You can also verify the digital signature by using the public key of the
-// KMS key outside of KMS. Use the GetPublicKey operation to download the public
-// key in the asymmetric KMS key and then use the public key to verify the signature
-// outside of KMS. The advantage of using the Verify operation is that it is
-// performed within KMS. As a result, it's easy to call, the operation is performed
-// within the FIPS boundary, it is logged in CloudTrail, and you can use key
-// policy and IAM policy to determine who is authorized to use the KMS key to
-// verify signatures.
-//
-// The KMS key that you use for this operation must be in a compatible key state.
-// For details, see Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide.
-//
-// Cross-account use: Yes. To perform this operation with a KMS key in a different
-// Amazon Web Services account, specify the key ARN or alias ARN in the value
-// of the KeyId parameter.
-//
-// Required permissions: kms:Verify (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
-// (key policy)
-//
-// Related operations: Sign
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Key Management Service's
-// API operation Verify for usage and error information.
-//
-// Returned Error Types:
-// * NotFoundException
-// The request was rejected because the specified entity or resource could not
-// be found.
-//
-// * DisabledException
-// The request was rejected because the specified KMS key is not enabled.
-//
-// * KeyUnavailableException
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-//
-// * DependencyTimeoutException
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-//
-// * InvalidKeyUsageException
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-//
-// * InvalidGrantTokenException
-// The request was rejected because the specified grant token is not valid.
-//
-// * InternalException
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-//
-// * InvalidStateException
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-//
-// * KMSInvalidSignatureException
-// The request was rejected because the signature verification failed. Signature
-// verification fails when it cannot confirm that signature was produced by
-// signing the specified message with the specified KMS key and signing algorithm.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/Verify
-func (c *KMS) Verify(input *VerifyInput) (*VerifyOutput, error) {
- req, out := c.VerifyRequest(input)
- return out, req.Send()
-}
-
-// VerifyWithContext is the same as Verify with the addition of
-// the ability to pass a context and additional request options.
-//
-// See Verify for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *KMS) VerifyWithContext(ctx aws.Context, input *VerifyInput, opts ...request.Option) (*VerifyOutput, error) {
- req, out := c.VerifyRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// Contains information about an alias.
-type AliasListEntry struct {
- _ struct{} `type:"structure"`
-
- // String that contains the key ARN.
- AliasArn *string `min:"20" type:"string"`
-
- // String that contains the alias. This value begins with alias/.
- AliasName *string `min:"1" type:"string"`
-
- // Date and time that the alias was most recently created in the account and
- // Region. Formatted as Unix time.
- CreationDate *time.Time `type:"timestamp"`
-
- // Date and time that the alias was most recently associated with a KMS key
- // in the account and Region. Formatted as Unix time.
- LastUpdatedDate *time.Time `type:"timestamp"`
-
- // String that contains the key identifier of the KMS key associated with the
- // alias.
- TargetKeyId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AliasListEntry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AliasListEntry) GoString() string {
- return s.String()
-}
-
-// SetAliasArn sets the AliasArn field's value.
-func (s *AliasListEntry) SetAliasArn(v string) *AliasListEntry {
- s.AliasArn = &v
- return s
-}
-
-// SetAliasName sets the AliasName field's value.
-func (s *AliasListEntry) SetAliasName(v string) *AliasListEntry {
- s.AliasName = &v
- return s
-}
-
-// SetCreationDate sets the CreationDate field's value.
-func (s *AliasListEntry) SetCreationDate(v time.Time) *AliasListEntry {
- s.CreationDate = &v
- return s
-}
-
-// SetLastUpdatedDate sets the LastUpdatedDate field's value.
-func (s *AliasListEntry) SetLastUpdatedDate(v time.Time) *AliasListEntry {
- s.LastUpdatedDate = &v
- return s
-}
-
-// SetTargetKeyId sets the TargetKeyId field's value.
-func (s *AliasListEntry) SetTargetKeyId(v string) *AliasListEntry {
- s.TargetKeyId = &v
- return s
-}
-
-// The request was rejected because it attempted to create a resource that already
-// exists.
-type AlreadyExistsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AlreadyExistsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AlreadyExistsException) GoString() string {
- return s.String()
-}
-
-func newErrorAlreadyExistsException(v protocol.ResponseMetadata) error {
- return &AlreadyExistsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *AlreadyExistsException) Code() string {
- return "AlreadyExistsException"
-}
-
-// Message returns the exception's message.
-func (s *AlreadyExistsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *AlreadyExistsException) OrigErr() error {
- return nil
-}
-
-func (s *AlreadyExistsException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *AlreadyExistsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *AlreadyExistsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type CancelKeyDeletionInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the KMS key whose deletion is being canceled.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CancelKeyDeletionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CancelKeyDeletionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CancelKeyDeletionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CancelKeyDeletionInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *CancelKeyDeletionInput) SetKeyId(v string) *CancelKeyDeletionInput {
- s.KeyId = &v
- return s
-}
-
-type CancelKeyDeletionOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key whose deletion is canceled.
- KeyId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CancelKeyDeletionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CancelKeyDeletionOutput) GoString() string {
- return s.String()
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *CancelKeyDeletionOutput) SetKeyId(v string) *CancelKeyDeletionOutput {
- s.KeyId = &v
- return s
-}
-
-// The request was rejected because the specified CloudHSM cluster is already
-// associated with a custom key store or it shares a backup history with a cluster
-// that is associated with a custom key store. Each custom key store must be
-// associated with a different CloudHSM cluster.
-//
-// Clusters that share a backup history have the same cluster certificate. To
-// view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
-// operation.
-type CloudHsmClusterInUseException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterInUseException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterInUseException) GoString() string {
- return s.String()
-}
-
-func newErrorCloudHsmClusterInUseException(v protocol.ResponseMetadata) error {
- return &CloudHsmClusterInUseException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CloudHsmClusterInUseException) Code() string {
- return "CloudHsmClusterInUseException"
-}
-
-// Message returns the exception's message.
-func (s *CloudHsmClusterInUseException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CloudHsmClusterInUseException) OrigErr() error {
- return nil
-}
-
-func (s *CloudHsmClusterInUseException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CloudHsmClusterInUseException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CloudHsmClusterInUseException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the associated CloudHSM cluster did not
-// meet the configuration requirements for a custom key store.
-//
-// * The cluster must be configured with private subnets in at least two
-// different Availability Zones in the Region.
-//
-// * The security group for the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// (cloudhsm-cluster--sg) must include inbound rules and outbound
-// rules that allow TCP traffic on ports 2223-2225. The Source in the inbound
-// rules and the Destination in the outbound rules must match the security
-// group ID. These rules are set by default when you create the cluster.
-// Do not delete or change them. To get information about a particular security
-// group, use the DescribeSecurityGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
-// operation.
-//
-// * The cluster must contain at least as many HSMs as the operation requires.
-// To add HSMs, use the CloudHSM CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html)
-// operation. For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey
-// operations, the CloudHSM cluster must have at least two active HSMs, each
-// in a different Availability Zone. For the ConnectCustomKeyStore operation,
-// the CloudHSM must contain at least one active HSM.
-//
-// For information about the requirements for an CloudHSM cluster that is associated
-// with a custom key store, see Assemble the Prerequisites (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore)
-// in the Key Management Service Developer Guide. For information about creating
-// a private subnet for an CloudHSM cluster, see Create a Private Subnet (https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html)
-// in the CloudHSM User Guide. For information about cluster security groups,
-// see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
-// in the CloudHSM User Guide .
-type CloudHsmClusterInvalidConfigurationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterInvalidConfigurationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterInvalidConfigurationException) GoString() string {
- return s.String()
-}
-
-func newErrorCloudHsmClusterInvalidConfigurationException(v protocol.ResponseMetadata) error {
- return &CloudHsmClusterInvalidConfigurationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CloudHsmClusterInvalidConfigurationException) Code() string {
- return "CloudHsmClusterInvalidConfigurationException"
-}
-
-// Message returns the exception's message.
-func (s *CloudHsmClusterInvalidConfigurationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CloudHsmClusterInvalidConfigurationException) OrigErr() error {
- return nil
-}
-
-func (s *CloudHsmClusterInvalidConfigurationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CloudHsmClusterInvalidConfigurationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CloudHsmClusterInvalidConfigurationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the CloudHSM cluster that is associated
-// with the custom key store is not active. Initialize and activate the cluster
-// and try the command again. For detailed instructions, see Getting Started
-// (https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html)
-// in the CloudHSM User Guide.
-type CloudHsmClusterNotActiveException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterNotActiveException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterNotActiveException) GoString() string {
- return s.String()
-}
-
-func newErrorCloudHsmClusterNotActiveException(v protocol.ResponseMetadata) error {
- return &CloudHsmClusterNotActiveException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CloudHsmClusterNotActiveException) Code() string {
- return "CloudHsmClusterNotActiveException"
-}
-
-// Message returns the exception's message.
-func (s *CloudHsmClusterNotActiveException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CloudHsmClusterNotActiveException) OrigErr() error {
- return nil
-}
-
-func (s *CloudHsmClusterNotActiveException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CloudHsmClusterNotActiveException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CloudHsmClusterNotActiveException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because KMS cannot find the CloudHSM cluster with
-// the specified cluster ID. Retry the request with a different cluster ID.
-type CloudHsmClusterNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorCloudHsmClusterNotFoundException(v protocol.ResponseMetadata) error {
- return &CloudHsmClusterNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CloudHsmClusterNotFoundException) Code() string {
- return "CloudHsmClusterNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *CloudHsmClusterNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CloudHsmClusterNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *CloudHsmClusterNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CloudHsmClusterNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CloudHsmClusterNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the specified CloudHSM cluster has a different
-// cluster certificate than the original cluster. You cannot use the operation
-// to specify an unrelated cluster.
-//
-// Specify a cluster that shares a backup history with the original cluster.
-// This includes clusters that were created from a backup of the current cluster,
-// and clusters that were created from the same backup that produced the current
-// cluster.
-//
-// Clusters that share a backup history have the same cluster certificate. To
-// view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
-// operation.
-type CloudHsmClusterNotRelatedException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterNotRelatedException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CloudHsmClusterNotRelatedException) GoString() string {
- return s.String()
-}
-
-func newErrorCloudHsmClusterNotRelatedException(v protocol.ResponseMetadata) error {
- return &CloudHsmClusterNotRelatedException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CloudHsmClusterNotRelatedException) Code() string {
- return "CloudHsmClusterNotRelatedException"
-}
-
-// Message returns the exception's message.
-func (s *CloudHsmClusterNotRelatedException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CloudHsmClusterNotRelatedException) OrigErr() error {
- return nil
-}
-
-func (s *CloudHsmClusterNotRelatedException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CloudHsmClusterNotRelatedException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CloudHsmClusterNotRelatedException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type ConnectCustomKeyStoreInput struct {
- _ struct{} `type:"structure"`
-
- // Enter the key store ID of the custom key store that you want to connect.
- // To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
- //
- // CustomKeyStoreId is a required field
- CustomKeyStoreId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ConnectCustomKeyStoreInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ConnectCustomKeyStoreInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ConnectCustomKeyStoreInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ConnectCustomKeyStoreInput"}
- if s.CustomKeyStoreId == nil {
- invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId"))
- }
- if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *ConnectCustomKeyStoreInput) SetCustomKeyStoreId(v string) *ConnectCustomKeyStoreInput {
- s.CustomKeyStoreId = &v
- return s
-}
-
-type ConnectCustomKeyStoreOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ConnectCustomKeyStoreOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ConnectCustomKeyStoreOutput) GoString() string {
- return s.String()
-}
-
-type CreateAliasInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the alias name. This value must begin with alias/ followed by a
- // name, such as alias/ExampleAlias.
- //
- // The AliasName value must be string of 1-256 characters. It can contain only
- // alphanumeric characters, forward slashes (/), underscores (_), and dashes
- // (-). The alias name cannot begin with alias/aws/. The alias/aws/ prefix is
- // reserved for Amazon Web Services managed keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).
- //
- // AliasName is a required field
- AliasName *string `min:"1" type:"string" required:"true"`
-
- // Associates the alias with the specified customer managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk).
- // The KMS key must be in the same Amazon Web Services Region.
- //
- // A valid key ID is required. If you supply a null or empty string value, this
- // operation returns an error.
- //
- // For help finding the key ID and ARN, see Finding the Key ID and ARN (https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn)
- // in the Key Management Service Developer Guide .
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // TargetKeyId is a required field
- TargetKeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateAliasInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateAliasInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateAliasInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateAliasInput"}
- if s.AliasName == nil {
- invalidParams.Add(request.NewErrParamRequired("AliasName"))
- }
- if s.AliasName != nil && len(*s.AliasName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("AliasName", 1))
- }
- if s.TargetKeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetKeyId"))
- }
- if s.TargetKeyId != nil && len(*s.TargetKeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TargetKeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAliasName sets the AliasName field's value.
-func (s *CreateAliasInput) SetAliasName(v string) *CreateAliasInput {
- s.AliasName = &v
- return s
-}
-
-// SetTargetKeyId sets the TargetKeyId field's value.
-func (s *CreateAliasInput) SetTargetKeyId(v string) *CreateAliasInput {
- s.TargetKeyId = &v
- return s
-}
-
-type CreateAliasOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateAliasOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateAliasOutput) GoString() string {
- return s.String()
-}
-
-type CreateCustomKeyStoreInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the CloudHSM cluster for the custom key store. Enter the cluster
- // ID of any active CloudHSM cluster that is not already associated with a custom
- // key store. To find the cluster ID, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
- // operation.
- //
- // CloudHsmClusterId is a required field
- CloudHsmClusterId *string `min:"19" type:"string" required:"true"`
-
- // Specifies a friendly name for the custom key store. The name must be unique
- // in your Amazon Web Services account.
- //
- // CustomKeyStoreName is a required field
- CustomKeyStoreName *string `min:"1" type:"string" required:"true"`
-
- // Enter the password of the kmsuser crypto user (CU) account (https://docs.aws.amazon.com/kms/latest/developerguide/key-store-concepts.html#concept-kmsuser)
- // in the specified CloudHSM cluster. KMS logs into the cluster as this user
- // to manage key material on your behalf.
- //
- // The password must be a string of 7 to 32 characters. Its value is case sensitive.
- //
- // This parameter tells KMS the kmsuser account password; it does not change
- // the password in the CloudHSM cluster.
- //
- // KeyStorePassword is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by CreateCustomKeyStoreInput's
- // String and GoString methods.
- //
- // KeyStorePassword is a required field
- KeyStorePassword *string `min:"7" type:"string" required:"true" sensitive:"true"`
-
- // Enter the content of the trust anchor certificate for the cluster. This is
- // the content of the customerCA.crt file that you created when you initialized
- // the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html).
- //
- // TrustAnchorCertificate is a required field
- TrustAnchorCertificate *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateCustomKeyStoreInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateCustomKeyStoreInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateCustomKeyStoreInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateCustomKeyStoreInput"}
- if s.CloudHsmClusterId == nil {
- invalidParams.Add(request.NewErrParamRequired("CloudHsmClusterId"))
- }
- if s.CloudHsmClusterId != nil && len(*s.CloudHsmClusterId) < 19 {
- invalidParams.Add(request.NewErrParamMinLen("CloudHsmClusterId", 19))
- }
- if s.CustomKeyStoreName == nil {
- invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreName"))
- }
- if s.CustomKeyStoreName != nil && len(*s.CustomKeyStoreName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreName", 1))
- }
- if s.KeyStorePassword == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyStorePassword"))
- }
- if s.KeyStorePassword != nil && len(*s.KeyStorePassword) < 7 {
- invalidParams.Add(request.NewErrParamMinLen("KeyStorePassword", 7))
- }
- if s.TrustAnchorCertificate == nil {
- invalidParams.Add(request.NewErrParamRequired("TrustAnchorCertificate"))
- }
- if s.TrustAnchorCertificate != nil && len(*s.TrustAnchorCertificate) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TrustAnchorCertificate", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCloudHsmClusterId sets the CloudHsmClusterId field's value.
-func (s *CreateCustomKeyStoreInput) SetCloudHsmClusterId(v string) *CreateCustomKeyStoreInput {
- s.CloudHsmClusterId = &v
- return s
-}
-
-// SetCustomKeyStoreName sets the CustomKeyStoreName field's value.
-func (s *CreateCustomKeyStoreInput) SetCustomKeyStoreName(v string) *CreateCustomKeyStoreInput {
- s.CustomKeyStoreName = &v
- return s
-}
-
-// SetKeyStorePassword sets the KeyStorePassword field's value.
-func (s *CreateCustomKeyStoreInput) SetKeyStorePassword(v string) *CreateCustomKeyStoreInput {
- s.KeyStorePassword = &v
- return s
-}
-
-// SetTrustAnchorCertificate sets the TrustAnchorCertificate field's value.
-func (s *CreateCustomKeyStoreInput) SetTrustAnchorCertificate(v string) *CreateCustomKeyStoreInput {
- s.TrustAnchorCertificate = &v
- return s
-}
-
-type CreateCustomKeyStoreOutput struct {
- _ struct{} `type:"structure"`
-
- // A unique identifier for the new custom key store.
- CustomKeyStoreId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateCustomKeyStoreOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateCustomKeyStoreOutput) GoString() string {
- return s.String()
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *CreateCustomKeyStoreOutput) SetCustomKeyStoreId(v string) *CreateCustomKeyStoreOutput {
- s.CustomKeyStoreId = &v
- return s
-}
-
-type CreateGrantInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies a grant constraint.
- //
- // KMS supports the EncryptionContextEquals and EncryptionContextSubset grant
- // constraints. Each constraint value can include up to 8 encryption context
- // pairs. The encryption context value in each constraint cannot exceed 384
- // characters.
- //
- // These grant constraints allow the permissions in the grant only when the
- // encryption context in the request matches (EncryptionContextEquals) or includes
- // (EncryptionContextSubset) the encryption context specified in this structure.
- // For information about grant constraints, see Using grant constraints (https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints)
- // in the Key Management Service Developer Guide. For more information about
- // encryption context, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
- // in the Key Management Service Developer Guide .
- //
- // The encryption context grant constraints are supported only on operations
- // that include an encryption context. You cannot use an encryption context
- // grant constraint for cryptographic operations with asymmetric KMS keys or
- // for management operations, such as DescribeKey or RetireGrant.
- Constraints *GrantConstraints `type:"structure"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // The identity that gets the permissions specified in the grant.
- //
- // To specify the principal, use the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // of an Amazon Web Services principal. Valid Amazon Web Services principals
- // include Amazon Web Services accounts (root), IAM users, IAM roles, federated
- // users, and assumed role users. For examples of the ARN syntax to use for
- // specifying a principal, see Amazon Web Services Identity and Access Management
- // (IAM) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam)
- // in the Example ARNs section of the Amazon Web Services General Reference.
- //
- // GranteePrincipal is a required field
- GranteePrincipal *string `min:"1" type:"string" required:"true"`
-
- // Identifies the KMS key for the grant. The grant gives principals permission
- // to use this KMS key.
- //
- // Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different
- // Amazon Web Services account, you must use the key ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // A friendly name for the grant. Use this value to prevent the unintended creation
- // of duplicate grants when retrying this request.
- //
- // When this value is absent, all CreateGrant requests result in a new grant
- // with a unique GrantId even if all the supplied parameters are identical.
- // This can result in unintended duplicates when you retry the CreateGrant request.
- //
- // When this value is present, you can retry a CreateGrant request with identical
- // parameters; if the grant already exists, the original GrantId is returned
- // without creating a new grant. Note that the returned grant token is unique
- // with every CreateGrant request, even when a duplicate GrantId is returned.
- // All grant tokens for the same grant ID can be used interchangeably.
- Name *string `min:"1" type:"string"`
-
- // A list of operations that the grant permits.
- //
- // The operation must be supported on the KMS key. For example, you cannot create
- // a grant for a symmetric KMS key that allows the Sign operation, or a grant
- // for an asymmetric KMS key that allows the GenerateDataKey operation. If you
- // try, KMS returns a ValidationError exception. For details, see Grant operations
- // (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations)
- // in the Key Management Service Developer Guide.
- //
- // Operations is a required field
- Operations []*string `type:"list" required:"true"`
-
- // The principal that has permission to use the RetireGrant operation to retire
- // the grant.
- //
- // To specify the principal, use the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // of an Amazon Web Services principal. Valid Amazon Web Services principals
- // include Amazon Web Services accounts (root), IAM users, federated users,
- // and assumed role users. For examples of the ARN syntax to use for specifying
- // a principal, see Amazon Web Services Identity and Access Management (IAM)
- // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam)
- // in the Example ARNs section of the Amazon Web Services General Reference.
- //
- // The grant determines the retiring principal. Other principals might have
- // permission to retire the grant or revoke the grant. For details, see RevokeGrant
- // and Retiring and revoking grants (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete)
- // in the Key Management Service Developer Guide.
- RetiringPrincipal *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateGrantInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateGrantInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateGrantInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateGrantInput"}
- if s.GranteePrincipal == nil {
- invalidParams.Add(request.NewErrParamRequired("GranteePrincipal"))
- }
- if s.GranteePrincipal != nil && len(*s.GranteePrincipal) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("GranteePrincipal", 1))
- }
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Name != nil && len(*s.Name) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 1))
- }
- if s.Operations == nil {
- invalidParams.Add(request.NewErrParamRequired("Operations"))
- }
- if s.RetiringPrincipal != nil && len(*s.RetiringPrincipal) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RetiringPrincipal", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetConstraints sets the Constraints field's value.
-func (s *CreateGrantInput) SetConstraints(v *GrantConstraints) *CreateGrantInput {
- s.Constraints = v
- return s
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *CreateGrantInput) SetGrantTokens(v []*string) *CreateGrantInput {
- s.GrantTokens = v
- return s
-}
-
-// SetGranteePrincipal sets the GranteePrincipal field's value.
-func (s *CreateGrantInput) SetGranteePrincipal(v string) *CreateGrantInput {
- s.GranteePrincipal = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *CreateGrantInput) SetKeyId(v string) *CreateGrantInput {
- s.KeyId = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *CreateGrantInput) SetName(v string) *CreateGrantInput {
- s.Name = &v
- return s
-}
-
-// SetOperations sets the Operations field's value.
-func (s *CreateGrantInput) SetOperations(v []*string) *CreateGrantInput {
- s.Operations = v
- return s
-}
-
-// SetRetiringPrincipal sets the RetiringPrincipal field's value.
-func (s *CreateGrantInput) SetRetiringPrincipal(v string) *CreateGrantInput {
- s.RetiringPrincipal = &v
- return s
-}
-
-type CreateGrantOutput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier for the grant.
- //
- // You can use the GrantId in a ListGrants, RetireGrant, or RevokeGrant operation.
- GrantId *string `min:"1" type:"string"`
-
- // The grant token.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantToken *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateGrantOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateGrantOutput) GoString() string {
- return s.String()
-}
-
-// SetGrantId sets the GrantId field's value.
-func (s *CreateGrantOutput) SetGrantId(v string) *CreateGrantOutput {
- s.GrantId = &v
- return s
-}
-
-// SetGrantToken sets the GrantToken field's value.
-func (s *CreateGrantOutput) SetGrantToken(v string) *CreateGrantOutput {
- s.GrantToken = &v
- return s
-}
-
-type CreateKeyInput struct {
- _ struct{} `type:"structure"`
-
- // A flag to indicate whether to bypass the key policy lockout safety check.
- //
- // Setting this value to true increases the risk that the KMS key becomes unmanageable.
- // Do not set this value to true indiscriminately.
- //
- // For more information, refer to the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
- // section in the Key Management Service Developer Guide .
- //
- // Use this parameter only when you include a policy in the request and you
- // intend to prevent the principal that is making the request from making a
- // subsequent PutKeyPolicy request on the KMS key.
- //
- // The default value is false.
- BypassPolicyLockoutSafetyCheck *bool `type:"boolean"`
-
- // Creates the KMS key in the specified custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
- // and the key material in its associated CloudHSM cluster. To create a KMS
- // key in a custom key store, you must also specify the Origin parameter with
- // a value of AWS_CLOUDHSM. The CloudHSM cluster that is associated with the
- // custom key store must have at least two active HSMs, each in a different
- // Availability Zone in the Region.
- //
- // This parameter is valid only for symmetric KMS keys and regional KMS keys.
- // You cannot create an asymmetric KMS key or a multi-Region key in a custom
- // key store.
- //
- // To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
- //
- // The response includes the custom key store ID and the ID of the CloudHSM
- // cluster.
- //
- // This operation is part of the Custom Key Store feature (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
- // feature in KMS, which combines the convenience and extensive integration
- // of KMS with the isolation and control of a single-tenant key store.
- CustomKeyStoreId *string `min:"1" type:"string"`
-
- // Instead, use the KeySpec parameter.
- //
- // The KeySpec and CustomerMasterKeySpec parameters work the same way. Only
- // the names differ. We recommend that you use KeySpec parameter in your code.
- // However, to avoid breaking changes, KMS will support both parameters.
- //
- // Deprecated: This parameter has been deprecated. Instead, use the KeySpec parameter.
- CustomerMasterKeySpec *string `deprecated:"true" type:"string" enum:"CustomerMasterKeySpec"`
-
- // A description of the KMS key.
- //
- // Use a description that helps you decide whether the KMS key is appropriate
- // for a task. The default value is an empty string (no description).
- //
- // To set or change the description after the key is created, use UpdateKeyDescription.
- Description *string `type:"string"`
-
- // Specifies the type of KMS key to create. The default value, SYMMETRIC_DEFAULT,
- // creates a KMS key with a 256-bit symmetric key for encryption and decryption.
- // For help choosing a key spec for your KMS key, see How to Choose Your KMS
- // key Configuration (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-choose.html)
- // in the Key Management Service Developer Guide .
- //
- // The KeySpec determines whether the KMS key contains a symmetric key or an
- // asymmetric key pair. It also determines the encryption algorithms or signing
- // algorithms that the KMS key supports. You can't change the KeySpec after
- // the KMS key is created. To further restrict the algorithms that can be used
- // with the KMS key, use a condition key in its key policy or IAM policy. For
- // more information, see kms:EncryptionAlgorithm (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-algorithm)
- // or kms:Signing Algorithm (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-signing-algorithm)
- // in the Key Management Service Developer Guide .
- //
- // Amazon Web Services services that are integrated with KMS (http://aws.amazon.com/kms/features/#AWS_Service_Integration)
- // use symmetric KMS keys to protect your data. These services do not support
- // asymmetric KMS keys. For help determining whether a KMS key is symmetric
- // or asymmetric, see Identifying Symmetric and Asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/find-symm-asymm.html)
- // in the Key Management Service Developer Guide.
- //
- // KMS supports the following key specs for KMS keys:
- //
- // * Symmetric key (default) SYMMETRIC_DEFAULT (AES-256-GCM)
- //
- // * Asymmetric RSA key pairs RSA_2048 RSA_3072 RSA_4096
- //
- // * Asymmetric NIST-recommended elliptic curve key pairs ECC_NIST_P256 (secp256r1)
- // ECC_NIST_P384 (secp384r1) ECC_NIST_P521 (secp521r1)
- //
- // * Other asymmetric elliptic curve key pairs ECC_SECG_P256K1 (secp256k1),
- // commonly used for cryptocurrencies.
- KeySpec *string `type:"string" enum:"KeySpec"`
-
- // Determines the cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
- // for which you can use the KMS key. The default value is ENCRYPT_DECRYPT.
- // This parameter is required only for asymmetric KMS keys. You can't change
- // the KeyUsage value after the KMS key is created.
- //
- // Select only one valid value.
- //
- // * For symmetric KMS keys, omit the parameter or specify ENCRYPT_DECRYPT.
- //
- // * For asymmetric KMS keys with RSA key material, specify ENCRYPT_DECRYPT
- // or SIGN_VERIFY.
- //
- // * For asymmetric KMS keys with ECC key material, specify SIGN_VERIFY.
- KeyUsage *string `type:"string" enum:"KeyUsageType"`
-
- // Creates a multi-Region primary key that you can replicate into other Amazon
- // Web Services Regions. You cannot change this value after you create the KMS
- // key.
- //
- // For a multi-Region key, set this parameter to True. For a single-Region KMS
- // key, omit this parameter or set it to False. The default value is False.
- //
- // This operation supports multi-Region keys, an KMS feature that lets you create
- // multiple interoperable KMS keys in different Amazon Web Services Regions.
- // Because these KMS keys have the same key ID, key material, and other metadata,
- // you can use them interchangeably to encrypt data in one Amazon Web Services
- // Region and decrypt it in a different Amazon Web Services Region without re-encrypting
- // the data or making a cross-Region call. For more information about multi-Region
- // keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
- // in the Key Management Service Developer Guide.
- //
- // This value creates a primary key, not a replica. To create a replica key,
- // use the ReplicateKey operation.
- //
- // You can create a symmetric or asymmetric multi-Region key, and you can create
- // a multi-Region key with imported key material. However, you cannot create
- // a multi-Region key in a custom key store.
- MultiRegion *bool `type:"boolean"`
-
- // The source of the key material for the KMS key. You cannot change the origin
- // after you create the KMS key. The default is AWS_KMS, which means that KMS
- // creates the key material.
- //
- // To create a KMS key with no key material (for imported key material), set
- // the value to EXTERNAL. For more information about importing key material
- // into KMS, see Importing Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html)
- // in the Key Management Service Developer Guide. This value is valid only for
- // symmetric KMS keys.
- //
- // To create a KMS key in an KMS custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
- // and create its key material in the associated CloudHSM cluster, set this
- // value to AWS_CLOUDHSM. You must also use the CustomKeyStoreId parameter to
- // identify the custom key store. This value is valid only for symmetric KMS
- // keys.
- Origin *string `type:"string" enum:"OriginType"`
-
- // The key policy to attach to the KMS key.
- //
- // If you provide a key policy, it must meet the following criteria:
- //
- // * If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy
- // must allow the principal that is making the CreateKey request to make
- // a subsequent PutKeyPolicy request on the KMS key. This reduces the risk
- // that the KMS key becomes unmanageable. For more information, refer to
- // the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
- // section of the Key Management Service Developer Guide .
- //
- // * Each statement in the key policy must contain one or more principals.
- // The principals in the key policy must exist and be visible to KMS. When
- // you create a new Amazon Web Services principal (for example, an IAM user
- // or role), you might need to enforce a delay before including the new principal
- // in a key policy because the new principal might not be immediately visible
- // to KMS. For more information, see Changes that I make are not always immediately
- // visible (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency)
- // in the Amazon Web Services Identity and Access Management User Guide.
- //
- // If you do not provide a key policy, KMS attaches a default key policy to
- // the KMS key. For more information, see Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default)
- // in the Key Management Service Developer Guide.
- //
- // The key policy size quota is 32 kilobytes (32768 bytes).
- //
- // For help writing and formatting a JSON policy document, see the IAM JSON
- // Policy Reference (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html)
- // in the Identity and Access Management User Guide .
- Policy *string `min:"1" type:"string"`
-
- // Assigns one or more tags to the KMS key. Use this parameter to tag the KMS
- // key when it is created. To tag an existing KMS key, use the TagResource operation.
- //
- // Tagging or untagging a KMS key can allow or deny permission to the KMS key.
- // For details, see Using ABAC in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html)
- // in the Key Management Service Developer Guide.
- //
- // To use this parameter, you must have kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
- // permission in an IAM policy.
- //
- // Each tag consists of a tag key and a tag value. Both the tag key and the
- // tag value are required, but the tag value can be an empty (null) string.
- // You cannot have more than one tag on a KMS key with the same tag key. If
- // you specify an existing tag key with a different tag value, KMS replaces
- // the current tag value with the specified one.
- //
- // When you add tags to an Amazon Web Services resource, Amazon Web Services
- // generates a cost allocation report with usage and costs aggregated by tags.
- // Tags can also be used to control access to a KMS key. For details, see Tagging
- // Keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html).
- Tags []*Tag `type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateKeyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateKeyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *CreateKeyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "CreateKeyInput"}
- if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBypassPolicyLockoutSafetyCheck sets the BypassPolicyLockoutSafetyCheck field's value.
-func (s *CreateKeyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *CreateKeyInput {
- s.BypassPolicyLockoutSafetyCheck = &v
- return s
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *CreateKeyInput) SetCustomKeyStoreId(v string) *CreateKeyInput {
- s.CustomKeyStoreId = &v
- return s
-}
-
-// SetCustomerMasterKeySpec sets the CustomerMasterKeySpec field's value.
-func (s *CreateKeyInput) SetCustomerMasterKeySpec(v string) *CreateKeyInput {
- s.CustomerMasterKeySpec = &v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *CreateKeyInput) SetDescription(v string) *CreateKeyInput {
- s.Description = &v
- return s
-}
-
-// SetKeySpec sets the KeySpec field's value.
-func (s *CreateKeyInput) SetKeySpec(v string) *CreateKeyInput {
- s.KeySpec = &v
- return s
-}
-
-// SetKeyUsage sets the KeyUsage field's value.
-func (s *CreateKeyInput) SetKeyUsage(v string) *CreateKeyInput {
- s.KeyUsage = &v
- return s
-}
-
-// SetMultiRegion sets the MultiRegion field's value.
-func (s *CreateKeyInput) SetMultiRegion(v bool) *CreateKeyInput {
- s.MultiRegion = &v
- return s
-}
-
-// SetOrigin sets the Origin field's value.
-func (s *CreateKeyInput) SetOrigin(v string) *CreateKeyInput {
- s.Origin = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *CreateKeyInput) SetPolicy(v string) *CreateKeyInput {
- s.Policy = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *CreateKeyInput) SetTags(v []*Tag) *CreateKeyInput {
- s.Tags = v
- return s
-}
-
-type CreateKeyOutput struct {
- _ struct{} `type:"structure"`
-
- // Metadata associated with the KMS key.
- KeyMetadata *KeyMetadata `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateKeyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CreateKeyOutput) GoString() string {
- return s.String()
-}
-
-// SetKeyMetadata sets the KeyMetadata field's value.
-func (s *CreateKeyOutput) SetKeyMetadata(v *KeyMetadata) *CreateKeyOutput {
- s.KeyMetadata = v
- return s
-}
-
-// The request was rejected because the custom key store contains KMS keys.
-// After verifying that you do not need to use the KMS keys, use the ScheduleKeyDeletion
-// operation to delete the KMS keys. After they are deleted, you can delete
-// the custom key store.
-type CustomKeyStoreHasCMKsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoreHasCMKsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoreHasCMKsException) GoString() string {
- return s.String()
-}
-
-func newErrorCustomKeyStoreHasCMKsException(v protocol.ResponseMetadata) error {
- return &CustomKeyStoreHasCMKsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CustomKeyStoreHasCMKsException) Code() string {
- return "CustomKeyStoreHasCMKsException"
-}
-
-// Message returns the exception's message.
-func (s *CustomKeyStoreHasCMKsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CustomKeyStoreHasCMKsException) OrigErr() error {
- return nil
-}
-
-func (s *CustomKeyStoreHasCMKsException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CustomKeyStoreHasCMKsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CustomKeyStoreHasCMKsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because of the ConnectionState of the custom key
-// store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores
-// operation.
-//
-// This exception is thrown under the following conditions:
-//
-// * You requested the CreateKey or GenerateRandom operation in a custom
-// key store that is not connected. These operations are valid only when
-// the custom key store ConnectionState is CONNECTED.
-//
-// * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
-// on a custom key store that is not disconnected. This operation is valid
-// only when the custom key store ConnectionState is DISCONNECTED.
-//
-// * You requested the ConnectCustomKeyStore operation on a custom key store
-// with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
-// for all other ConnectionState values.
-type CustomKeyStoreInvalidStateException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoreInvalidStateException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoreInvalidStateException) GoString() string {
- return s.String()
-}
-
-func newErrorCustomKeyStoreInvalidStateException(v protocol.ResponseMetadata) error {
- return &CustomKeyStoreInvalidStateException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CustomKeyStoreInvalidStateException) Code() string {
- return "CustomKeyStoreInvalidStateException"
-}
-
-// Message returns the exception's message.
-func (s *CustomKeyStoreInvalidStateException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CustomKeyStoreInvalidStateException) OrigErr() error {
- return nil
-}
-
-func (s *CustomKeyStoreInvalidStateException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CustomKeyStoreInvalidStateException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CustomKeyStoreInvalidStateException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the specified custom key store name is already
-// assigned to another custom key store in the account. Try again with a custom
-// key store name that is unique in the account.
-type CustomKeyStoreNameInUseException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoreNameInUseException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoreNameInUseException) GoString() string {
- return s.String()
-}
-
-func newErrorCustomKeyStoreNameInUseException(v protocol.ResponseMetadata) error {
- return &CustomKeyStoreNameInUseException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CustomKeyStoreNameInUseException) Code() string {
- return "CustomKeyStoreNameInUseException"
-}
-
-// Message returns the exception's message.
-func (s *CustomKeyStoreNameInUseException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CustomKeyStoreNameInUseException) OrigErr() error {
- return nil
-}
-
-func (s *CustomKeyStoreNameInUseException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CustomKeyStoreNameInUseException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CustomKeyStoreNameInUseException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because KMS cannot find a custom key store with
-// the specified key store name or ID.
-type CustomKeyStoreNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoreNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoreNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorCustomKeyStoreNotFoundException(v protocol.ResponseMetadata) error {
- return &CustomKeyStoreNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *CustomKeyStoreNotFoundException) Code() string {
- return "CustomKeyStoreNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *CustomKeyStoreNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *CustomKeyStoreNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *CustomKeyStoreNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *CustomKeyStoreNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *CustomKeyStoreNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains information about each custom key store in the custom key store
-// list.
-type CustomKeyStoresListEntry struct {
- _ struct{} `type:"structure"`
-
- // A unique identifier for the CloudHSM cluster that is associated with the
- // custom key store.
- CloudHsmClusterId *string `min:"19" type:"string"`
-
- // Describes the connection error. This field appears in the response only when
- // the ConnectionState is FAILED. For help resolving these errors, see How to
- // Fix a Connection Failure (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-failed)
- // in Key Management Service Developer Guide.
- //
- // Valid values are:
- //
- // * CLUSTER_NOT_FOUND - KMS cannot find the CloudHSM cluster with the specified
- // cluster ID.
- //
- // * INSUFFICIENT_CLOUDHSM_HSMS - The associated CloudHSM cluster does not
- // contain any active HSMs. To connect a custom key store to its CloudHSM
- // cluster, the cluster must contain at least one active HSM.
- //
- // * INTERNAL_ERROR - KMS could not complete the request due to an internal
- // error. Retry the request. For ConnectCustomKeyStore requests, disconnect
- // the custom key store before trying to connect again.
- //
- // * INVALID_CREDENTIALS - KMS does not have the correct password for the
- // kmsuser crypto user in the CloudHSM cluster. Before you can connect your
- // custom key store to its CloudHSM cluster, you must change the kmsuser
- // account password and update the key store password value for the custom
- // key store.
- //
- // * NETWORK_ERRORS - Network errors are preventing KMS from connecting to
- // the custom key store.
- //
- // * SUBNET_NOT_FOUND - A subnet in the CloudHSM cluster configuration was
- // deleted. If KMS cannot find all of the subnets in the cluster configuration,
- // attempts to connect the custom key store to the CloudHSM cluster fail.
- // To fix this error, create a cluster from a recent backup and associate
- // it with your custom key store. (This process creates a new cluster configuration
- // with a VPC and private subnets.) For details, see How to Fix a Connection
- // Failure (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-failed)
- // in the Key Management Service Developer Guide.
- //
- // * USER_LOCKED_OUT - The kmsuser CU account is locked out of the associated
- // CloudHSM cluster due to too many failed password attempts. Before you
- // can connect your custom key store to its CloudHSM cluster, you must change
- // the kmsuser account password and update the key store password value for
- // the custom key store.
- //
- // * USER_LOGGED_IN - The kmsuser CU account is logged into the the associated
- // CloudHSM cluster. This prevents KMS from rotating the kmsuser account
- // password and logging into the cluster. Before you can connect your custom
- // key store to its CloudHSM cluster, you must log the kmsuser CU out of
- // the cluster. If you changed the kmsuser password to log into the cluster,
- // you must also and update the key store password value for the custom key
- // store. For help, see How to Log Out and Reconnect (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#login-kmsuser-2)
- // in the Key Management Service Developer Guide.
- //
- // * USER_NOT_FOUND - KMS cannot find a kmsuser CU account in the associated
- // CloudHSM cluster. Before you can connect your custom key store to its
- // CloudHSM cluster, you must create a kmsuser CU account in the cluster,
- // and then update the key store password value for the custom key store.
- ConnectionErrorCode *string `type:"string" enum:"ConnectionErrorCodeType"`
-
- // Indicates whether the custom key store is connected to its CloudHSM cluster.
- //
- // You can create and use KMS keys in your custom key stores only when its connection
- // state is CONNECTED.
- //
- // The value is DISCONNECTED if the key store has never been connected or you
- // use the DisconnectCustomKeyStore operation to disconnect it. If the value
- // is CONNECTED but you are having trouble using the custom key store, make
- // sure that its associated CloudHSM cluster is active and contains at least
- // one active HSM.
- //
- // A value of FAILED indicates that an attempt to connect was unsuccessful.
- // The ConnectionErrorCode field in the response indicates the cause of the
- // failure. For help resolving a connection failure, see Troubleshooting a Custom
- // Key Store (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html)
- // in the Key Management Service Developer Guide.
- ConnectionState *string `type:"string" enum:"ConnectionStateType"`
-
- // The date and time when the custom key store was created.
- CreationDate *time.Time `type:"timestamp"`
-
- // A unique identifier for the custom key store.
- CustomKeyStoreId *string `min:"1" type:"string"`
-
- // The user-specified friendly name for the custom key store.
- CustomKeyStoreName *string `min:"1" type:"string"`
-
- // The trust anchor certificate of the associated CloudHSM cluster. When you
- // initialize the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr),
- // you create this certificate and save it in the customerCA.crt file.
- TrustAnchorCertificate *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoresListEntry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s CustomKeyStoresListEntry) GoString() string {
- return s.String()
-}
-
-// SetCloudHsmClusterId sets the CloudHsmClusterId field's value.
-func (s *CustomKeyStoresListEntry) SetCloudHsmClusterId(v string) *CustomKeyStoresListEntry {
- s.CloudHsmClusterId = &v
- return s
-}
-
-// SetConnectionErrorCode sets the ConnectionErrorCode field's value.
-func (s *CustomKeyStoresListEntry) SetConnectionErrorCode(v string) *CustomKeyStoresListEntry {
- s.ConnectionErrorCode = &v
- return s
-}
-
-// SetConnectionState sets the ConnectionState field's value.
-func (s *CustomKeyStoresListEntry) SetConnectionState(v string) *CustomKeyStoresListEntry {
- s.ConnectionState = &v
- return s
-}
-
-// SetCreationDate sets the CreationDate field's value.
-func (s *CustomKeyStoresListEntry) SetCreationDate(v time.Time) *CustomKeyStoresListEntry {
- s.CreationDate = &v
- return s
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *CustomKeyStoresListEntry) SetCustomKeyStoreId(v string) *CustomKeyStoresListEntry {
- s.CustomKeyStoreId = &v
- return s
-}
-
-// SetCustomKeyStoreName sets the CustomKeyStoreName field's value.
-func (s *CustomKeyStoresListEntry) SetCustomKeyStoreName(v string) *CustomKeyStoresListEntry {
- s.CustomKeyStoreName = &v
- return s
-}
-
-// SetTrustAnchorCertificate sets the TrustAnchorCertificate field's value.
-func (s *CustomKeyStoresListEntry) SetTrustAnchorCertificate(v string) *CustomKeyStoresListEntry {
- s.TrustAnchorCertificate = &v
- return s
-}
-
-type DecryptInput struct {
- _ struct{} `type:"structure"`
-
- // Ciphertext to be decrypted. The blob includes metadata.
- // CiphertextBlob is automatically base64 encoded/decoded by the SDK.
- //
- // CiphertextBlob is a required field
- CiphertextBlob []byte `min:"1" type:"blob" required:"true"`
-
- // Specifies the encryption algorithm that will be used to decrypt the ciphertext.
- // Specify the same algorithm that was used to encrypt the data. If you specify
- // a different algorithm, the Decrypt operation fails.
- //
- // This parameter is required only when the ciphertext was encrypted under an
- // asymmetric KMS key. The default value, SYMMETRIC_DEFAULT, represents the
- // only supported algorithm that is valid for symmetric KMS keys.
- EncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`
-
- // Specifies the encryption context to use when decrypting the data. An encryption
- // context is valid only for cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
- // with a symmetric KMS key. The standard asymmetric encryption algorithms that
- // KMS uses do not support an encryption context.
- //
- // An encryption context is a collection of non-secret key-value pairs that
- // represents additional authenticated data. When you use an encryption context
- // to encrypt data, you must specify the same (an exact case-sensitive match)
- // encryption context to decrypt the data. An encryption context is optional
- // when encrypting with a symmetric KMS key, but it is highly recommended.
- //
- // For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
- // in the Key Management Service Developer Guide.
- EncryptionContext map[string]*string `type:"map"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Specifies the KMS key that KMS uses to decrypt the ciphertext. Enter a key
- // ID of the KMS key that was used to encrypt the ciphertext.
- //
- // This parameter is required only when the ciphertext was encrypted under an
- // asymmetric KMS key. If you used a symmetric KMS key, KMS can get the KMS
- // key from metadata that it adds to the symmetric ciphertext blob. However,
- // it is always recommended as a best practice. This practice ensures that you
- // use the KMS key that you intend.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- KeyId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecryptInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecryptInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DecryptInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DecryptInput"}
- if s.CiphertextBlob == nil {
- invalidParams.Add(request.NewErrParamRequired("CiphertextBlob"))
- }
- if s.CiphertextBlob != nil && len(s.CiphertextBlob) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CiphertextBlob", 1))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCiphertextBlob sets the CiphertextBlob field's value.
-func (s *DecryptInput) SetCiphertextBlob(v []byte) *DecryptInput {
- s.CiphertextBlob = v
- return s
-}
-
-// SetEncryptionAlgorithm sets the EncryptionAlgorithm field's value.
-func (s *DecryptInput) SetEncryptionAlgorithm(v string) *DecryptInput {
- s.EncryptionAlgorithm = &v
- return s
-}
-
-// SetEncryptionContext sets the EncryptionContext field's value.
-func (s *DecryptInput) SetEncryptionContext(v map[string]*string) *DecryptInput {
- s.EncryptionContext = v
- return s
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *DecryptInput) SetGrantTokens(v []*string) *DecryptInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *DecryptInput) SetKeyId(v string) *DecryptInput {
- s.KeyId = &v
- return s
-}
-
-type DecryptOutput struct {
- _ struct{} `type:"structure"`
-
- // The encryption algorithm that was used to decrypt the ciphertext.
- EncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key that was used to decrypt the ciphertext.
- KeyId *string `min:"1" type:"string"`
-
- // Decrypted plaintext data. When you use the HTTP API or the Amazon Web Services
- // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
- //
- // Plaintext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by DecryptOutput's
- // String and GoString methods.
- //
- // Plaintext is automatically base64 encoded/decoded by the SDK.
- Plaintext []byte `min:"1" type:"blob" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecryptOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecryptOutput) GoString() string {
- return s.String()
-}
-
-// SetEncryptionAlgorithm sets the EncryptionAlgorithm field's value.
-func (s *DecryptOutput) SetEncryptionAlgorithm(v string) *DecryptOutput {
- s.EncryptionAlgorithm = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *DecryptOutput) SetKeyId(v string) *DecryptOutput {
- s.KeyId = &v
- return s
-}
-
-// SetPlaintext sets the Plaintext field's value.
-func (s *DecryptOutput) SetPlaintext(v []byte) *DecryptOutput {
- s.Plaintext = v
- return s
-}
-
-type DeleteAliasInput struct {
- _ struct{} `type:"structure"`
-
- // The alias to be deleted. The alias name must begin with alias/ followed by
- // the alias name, such as alias/ExampleAlias.
- //
- // AliasName is a required field
- AliasName *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteAliasInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteAliasInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteAliasInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteAliasInput"}
- if s.AliasName == nil {
- invalidParams.Add(request.NewErrParamRequired("AliasName"))
- }
- if s.AliasName != nil && len(*s.AliasName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("AliasName", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAliasName sets the AliasName field's value.
-func (s *DeleteAliasInput) SetAliasName(v string) *DeleteAliasInput {
- s.AliasName = &v
- return s
-}
-
-type DeleteAliasOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteAliasOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteAliasOutput) GoString() string {
- return s.String()
-}
-
-type DeleteCustomKeyStoreInput struct {
- _ struct{} `type:"structure"`
-
- // Enter the ID of the custom key store you want to delete. To find the ID of
- // a custom key store, use the DescribeCustomKeyStores operation.
- //
- // CustomKeyStoreId is a required field
- CustomKeyStoreId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteCustomKeyStoreInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteCustomKeyStoreInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteCustomKeyStoreInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteCustomKeyStoreInput"}
- if s.CustomKeyStoreId == nil {
- invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId"))
- }
- if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *DeleteCustomKeyStoreInput) SetCustomKeyStoreId(v string) *DeleteCustomKeyStoreInput {
- s.CustomKeyStoreId = &v
- return s
-}
-
-type DeleteCustomKeyStoreOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteCustomKeyStoreOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteCustomKeyStoreOutput) GoString() string {
- return s.String()
-}
-
-type DeleteImportedKeyMaterialInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the KMS key from which you are deleting imported key material.
- // The Origin of the KMS key must be EXTERNAL.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteImportedKeyMaterialInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteImportedKeyMaterialInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DeleteImportedKeyMaterialInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DeleteImportedKeyMaterialInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *DeleteImportedKeyMaterialInput) SetKeyId(v string) *DeleteImportedKeyMaterialInput {
- s.KeyId = &v
- return s
-}
-
-type DeleteImportedKeyMaterialOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteImportedKeyMaterialOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DeleteImportedKeyMaterialOutput) GoString() string {
- return s.String()
-}
-
-// The system timed out while trying to fulfill the request. The request can
-// be retried.
-type DependencyTimeoutException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DependencyTimeoutException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DependencyTimeoutException) GoString() string {
- return s.String()
-}
-
-func newErrorDependencyTimeoutException(v protocol.ResponseMetadata) error {
- return &DependencyTimeoutException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *DependencyTimeoutException) Code() string {
- return "DependencyTimeoutException"
-}
-
-// Message returns the exception's message.
-func (s *DependencyTimeoutException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *DependencyTimeoutException) OrigErr() error {
- return nil
-}
-
-func (s *DependencyTimeoutException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *DependencyTimeoutException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *DependencyTimeoutException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type DescribeCustomKeyStoresInput struct {
- _ struct{} `type:"structure"`
-
- // Gets only information about the specified custom key store. Enter the key
- // store ID.
- //
- // By default, this operation gets information about all custom key stores in
- // the account and Region. To limit the output to a particular custom key store,
- // you can use either the CustomKeyStoreId or CustomKeyStoreName parameter,
- // but not both.
- CustomKeyStoreId *string `min:"1" type:"string"`
-
- // Gets only information about the specified custom key store. Enter the friendly
- // name of the custom key store.
- //
- // By default, this operation gets information about all custom key stores in
- // the account and Region. To limit the output to a particular custom key store,
- // you can use either the CustomKeyStoreId or CustomKeyStoreName parameter,
- // but not both.
- CustomKeyStoreName *string `min:"1" type:"string"`
-
- // Use this parameter to specify the maximum number of items to return. When
- // this value is present, KMS does not return more than the specified number
- // of items, but it might return fewer.
- Limit *int64 `min:"1" type:"integer"`
-
- // Use this parameter in a subsequent request after you receive a response with
- // truncated results. Set it to the value of NextMarker from the truncated response
- // you just received.
- Marker *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DescribeCustomKeyStoresInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DescribeCustomKeyStoresInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeCustomKeyStoresInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeCustomKeyStoresInput"}
- if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1))
- }
- if s.CustomKeyStoreName != nil && len(*s.CustomKeyStoreName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreName", 1))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.Marker != nil && len(*s.Marker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *DescribeCustomKeyStoresInput) SetCustomKeyStoreId(v string) *DescribeCustomKeyStoresInput {
- s.CustomKeyStoreId = &v
- return s
-}
-
-// SetCustomKeyStoreName sets the CustomKeyStoreName field's value.
-func (s *DescribeCustomKeyStoresInput) SetCustomKeyStoreName(v string) *DescribeCustomKeyStoresInput {
- s.CustomKeyStoreName = &v
- return s
-}
-
-// SetLimit sets the Limit field's value.
-func (s *DescribeCustomKeyStoresInput) SetLimit(v int64) *DescribeCustomKeyStoresInput {
- s.Limit = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *DescribeCustomKeyStoresInput) SetMarker(v string) *DescribeCustomKeyStoresInput {
- s.Marker = &v
- return s
-}
-
-type DescribeCustomKeyStoresOutput struct {
- _ struct{} `type:"structure"`
-
- // Contains metadata about each custom key store.
- CustomKeyStores []*CustomKeyStoresListEntry `type:"list"`
-
- // When Truncated is true, this element is present and contains the value to
- // use for the Marker parameter in a subsequent request.
- NextMarker *string `min:"1" type:"string"`
-
- // A flag that indicates whether there are more items in the list. When this
- // value is true, the list in this response is truncated. To get more items,
- // pass the value of the NextMarker element in thisresponse to the Marker parameter
- // in a subsequent request.
- Truncated *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DescribeCustomKeyStoresOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DescribeCustomKeyStoresOutput) GoString() string {
- return s.String()
-}
-
-// SetCustomKeyStores sets the CustomKeyStores field's value.
-func (s *DescribeCustomKeyStoresOutput) SetCustomKeyStores(v []*CustomKeyStoresListEntry) *DescribeCustomKeyStoresOutput {
- s.CustomKeyStores = v
- return s
-}
-
-// SetNextMarker sets the NextMarker field's value.
-func (s *DescribeCustomKeyStoresOutput) SetNextMarker(v string) *DescribeCustomKeyStoresOutput {
- s.NextMarker = &v
- return s
-}
-
-// SetTruncated sets the Truncated field's value.
-func (s *DescribeCustomKeyStoresOutput) SetTruncated(v bool) *DescribeCustomKeyStoresOutput {
- s.Truncated = &v
- return s
-}
-
-type DescribeKeyInput struct {
- _ struct{} `type:"structure"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Describes the specified KMS key.
- //
- // If you specify a predefined Amazon Web Services alias (an Amazon Web Services
- // alias with no key ID), KMS associates the alias with an Amazon Web Services
- // managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html##aws-managed-cmk)
- // and returns its KeyId and Arn in the response.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DescribeKeyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DescribeKeyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DescribeKeyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DescribeKeyInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *DescribeKeyInput) SetGrantTokens(v []*string) *DescribeKeyInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *DescribeKeyInput) SetKeyId(v string) *DescribeKeyInput {
- s.KeyId = &v
- return s
-}
-
-type DescribeKeyOutput struct {
- _ struct{} `type:"structure"`
-
- // Metadata associated with the key.
- KeyMetadata *KeyMetadata `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DescribeKeyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DescribeKeyOutput) GoString() string {
- return s.String()
-}
-
-// SetKeyMetadata sets the KeyMetadata field's value.
-func (s *DescribeKeyOutput) SetKeyMetadata(v *KeyMetadata) *DescribeKeyOutput {
- s.KeyMetadata = v
- return s
-}
-
-type DisableKeyInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the KMS key to disable.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisableKeyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisableKeyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DisableKeyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DisableKeyInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *DisableKeyInput) SetKeyId(v string) *DisableKeyInput {
- s.KeyId = &v
- return s
-}
-
-type DisableKeyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisableKeyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisableKeyOutput) GoString() string {
- return s.String()
-}
-
-type DisableKeyRotationInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies a symmetric KMS key. You cannot enable or disable automatic rotation
- // of asymmetric KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#asymmetric-cmks),
- // KMS keys with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html),
- // or KMS keys in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisableKeyRotationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisableKeyRotationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DisableKeyRotationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DisableKeyRotationInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *DisableKeyRotationInput) SetKeyId(v string) *DisableKeyRotationInput {
- s.KeyId = &v
- return s
-}
-
-type DisableKeyRotationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisableKeyRotationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisableKeyRotationOutput) GoString() string {
- return s.String()
-}
-
-// The request was rejected because the specified KMS key is not enabled.
-type DisabledException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisabledException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisabledException) GoString() string {
- return s.String()
-}
-
-func newErrorDisabledException(v protocol.ResponseMetadata) error {
- return &DisabledException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *DisabledException) Code() string {
- return "DisabledException"
-}
-
-// Message returns the exception's message.
-func (s *DisabledException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *DisabledException) OrigErr() error {
- return nil
-}
-
-func (s *DisabledException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *DisabledException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *DisabledException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type DisconnectCustomKeyStoreInput struct {
- _ struct{} `type:"structure"`
-
- // Enter the ID of the custom key store you want to disconnect. To find the
- // ID of a custom key store, use the DescribeCustomKeyStores operation.
- //
- // CustomKeyStoreId is a required field
- CustomKeyStoreId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisconnectCustomKeyStoreInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisconnectCustomKeyStoreInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DisconnectCustomKeyStoreInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DisconnectCustomKeyStoreInput"}
- if s.CustomKeyStoreId == nil {
- invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId"))
- }
- if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *DisconnectCustomKeyStoreInput) SetCustomKeyStoreId(v string) *DisconnectCustomKeyStoreInput {
- s.CustomKeyStoreId = &v
- return s
-}
-
-type DisconnectCustomKeyStoreOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisconnectCustomKeyStoreOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DisconnectCustomKeyStoreOutput) GoString() string {
- return s.String()
-}
-
-type EnableKeyInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the KMS key to enable.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EnableKeyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EnableKeyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *EnableKeyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EnableKeyInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *EnableKeyInput) SetKeyId(v string) *EnableKeyInput {
- s.KeyId = &v
- return s
-}
-
-type EnableKeyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EnableKeyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EnableKeyOutput) GoString() string {
- return s.String()
-}
-
-type EnableKeyRotationInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies a symmetric KMS key. You cannot enable automatic rotation of asymmetric
- // KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks),
- // KMS keys with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html),
- // or KMS keys in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
- // To enable or disable automatic rotation of a set of related multi-Region
- // keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key),
- // set the property on the primary key.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EnableKeyRotationInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EnableKeyRotationInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *EnableKeyRotationInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EnableKeyRotationInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *EnableKeyRotationInput) SetKeyId(v string) *EnableKeyRotationInput {
- s.KeyId = &v
- return s
-}
-
-type EnableKeyRotationOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EnableKeyRotationOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EnableKeyRotationOutput) GoString() string {
- return s.String()
-}
-
-type EncryptInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the encryption algorithm that KMS will use to encrypt the plaintext
- // message. The algorithm must be compatible with the KMS key that you specify.
- //
- // This parameter is required only for asymmetric KMS keys. The default value,
- // SYMMETRIC_DEFAULT, is the algorithm used for symmetric KMS keys. If you are
- // using an asymmetric KMS key, we recommend RSAES_OAEP_SHA_256.
- EncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`
-
- // Specifies the encryption context that will be used to encrypt the data. An
- // encryption context is valid only for cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
- // with a symmetric KMS key. The standard asymmetric encryption algorithms that
- // KMS uses do not support an encryption context.
- //
- // An encryption context is a collection of non-secret key-value pairs that
- // represents additional authenticated data. When you use an encryption context
- // to encrypt data, you must specify the same (an exact case-sensitive match)
- // encryption context to decrypt the data. An encryption context is optional
- // when encrypting with a symmetric KMS key, but it is highly recommended.
- //
- // For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
- // in the Key Management Service Developer Guide.
- EncryptionContext map[string]*string `type:"map"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Identifies the KMS key to use in the encryption operation.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Data to be encrypted.
- //
- // Plaintext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by EncryptInput's
- // String and GoString methods.
- //
- // Plaintext is automatically base64 encoded/decoded by the SDK.
- //
- // Plaintext is a required field
- Plaintext []byte `min:"1" type:"blob" required:"true" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EncryptInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EncryptInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *EncryptInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "EncryptInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Plaintext == nil {
- invalidParams.Add(request.NewErrParamRequired("Plaintext"))
- }
- if s.Plaintext != nil && len(s.Plaintext) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Plaintext", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncryptionAlgorithm sets the EncryptionAlgorithm field's value.
-func (s *EncryptInput) SetEncryptionAlgorithm(v string) *EncryptInput {
- s.EncryptionAlgorithm = &v
- return s
-}
-
-// SetEncryptionContext sets the EncryptionContext field's value.
-func (s *EncryptInput) SetEncryptionContext(v map[string]*string) *EncryptInput {
- s.EncryptionContext = v
- return s
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *EncryptInput) SetGrantTokens(v []*string) *EncryptInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *EncryptInput) SetKeyId(v string) *EncryptInput {
- s.KeyId = &v
- return s
-}
-
-// SetPlaintext sets the Plaintext field's value.
-func (s *EncryptInput) SetPlaintext(v []byte) *EncryptInput {
- s.Plaintext = v
- return s
-}
-
-type EncryptOutput struct {
- _ struct{} `type:"structure"`
-
- // The encrypted plaintext. When you use the HTTP API or the Amazon Web Services
- // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
- // CiphertextBlob is automatically base64 encoded/decoded by the SDK.
- CiphertextBlob []byte `min:"1" type:"blob"`
-
- // The encryption algorithm that was used to encrypt the plaintext.
- EncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key that was used to encrypt the plaintext.
- KeyId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EncryptOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s EncryptOutput) GoString() string {
- return s.String()
-}
-
-// SetCiphertextBlob sets the CiphertextBlob field's value.
-func (s *EncryptOutput) SetCiphertextBlob(v []byte) *EncryptOutput {
- s.CiphertextBlob = v
- return s
-}
-
-// SetEncryptionAlgorithm sets the EncryptionAlgorithm field's value.
-func (s *EncryptOutput) SetEncryptionAlgorithm(v string) *EncryptOutput {
- s.EncryptionAlgorithm = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *EncryptOutput) SetKeyId(v string) *EncryptOutput {
- s.KeyId = &v
- return s
-}
-
-// The request was rejected because the specified import token is expired. Use
-// GetParametersForImport to get a new import token and public key, use the
-// new public key to encrypt the key material, and then try the request again.
-type ExpiredImportTokenException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ExpiredImportTokenException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ExpiredImportTokenException) GoString() string {
- return s.String()
-}
-
-func newErrorExpiredImportTokenException(v protocol.ResponseMetadata) error {
- return &ExpiredImportTokenException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ExpiredImportTokenException) Code() string {
- return "ExpiredImportTokenException"
-}
-
-// Message returns the exception's message.
-func (s *ExpiredImportTokenException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ExpiredImportTokenException) OrigErr() error {
- return nil
-}
-
-func (s *ExpiredImportTokenException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ExpiredImportTokenException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ExpiredImportTokenException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type GenerateDataKeyInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the encryption context that will be used when encrypting the data
- // key.
- //
- // An encryption context is a collection of non-secret key-value pairs that
- // represents additional authenticated data. When you use an encryption context
- // to encrypt data, you must specify the same (an exact case-sensitive match)
- // encryption context to decrypt the data. An encryption context is optional
- // when encrypting with a symmetric KMS key, but it is highly recommended.
- //
- // For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
- // in the Key Management Service Developer Guide.
- EncryptionContext map[string]*string `type:"map"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Identifies the symmetric KMS key that encrypts the data key.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Specifies the length of the data key. Use AES_128 to generate a 128-bit symmetric
- // key, or AES_256 to generate a 256-bit symmetric key.
- //
- // You must specify either the KeySpec or the NumberOfBytes parameter (but not
- // both) in every GenerateDataKey request.
- KeySpec *string `type:"string" enum:"DataKeySpec"`
-
- // Specifies the length of the data key in bytes. For example, use the value
- // 64 to generate a 512-bit data key (64 bytes is 512 bits). For 128-bit (16-byte)
- // and 256-bit (32-byte) data keys, use the KeySpec parameter.
- //
- // You must specify either the KeySpec or the NumberOfBytes parameter (but not
- // both) in every GenerateDataKey request.
- NumberOfBytes *int64 `min:"1" type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GenerateDataKeyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GenerateDataKeyInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 {
- invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncryptionContext sets the EncryptionContext field's value.
-func (s *GenerateDataKeyInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyInput {
- s.EncryptionContext = v
- return s
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *GenerateDataKeyInput) SetGrantTokens(v []*string) *GenerateDataKeyInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GenerateDataKeyInput) SetKeyId(v string) *GenerateDataKeyInput {
- s.KeyId = &v
- return s
-}
-
-// SetKeySpec sets the KeySpec field's value.
-func (s *GenerateDataKeyInput) SetKeySpec(v string) *GenerateDataKeyInput {
- s.KeySpec = &v
- return s
-}
-
-// SetNumberOfBytes sets the NumberOfBytes field's value.
-func (s *GenerateDataKeyInput) SetNumberOfBytes(v int64) *GenerateDataKeyInput {
- s.NumberOfBytes = &v
- return s
-}
-
-type GenerateDataKeyOutput struct {
- _ struct{} `type:"structure"`
-
- // The encrypted copy of the data key. When you use the HTTP API or the Amazon
- // Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
- // CiphertextBlob is automatically base64 encoded/decoded by the SDK.
- CiphertextBlob []byte `min:"1" type:"blob"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key that encrypted the data key.
- KeyId *string `min:"1" type:"string"`
-
- // The plaintext data key. When you use the HTTP API or the Amazon Web Services
- // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded. Use
- // this data key to encrypt your data outside of KMS. Then, remove it from memory
- // as soon as possible.
- //
- // Plaintext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by GenerateDataKeyOutput's
- // String and GoString methods.
- //
- // Plaintext is automatically base64 encoded/decoded by the SDK.
- Plaintext []byte `min:"1" type:"blob" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyOutput) GoString() string {
- return s.String()
-}
-
-// SetCiphertextBlob sets the CiphertextBlob field's value.
-func (s *GenerateDataKeyOutput) SetCiphertextBlob(v []byte) *GenerateDataKeyOutput {
- s.CiphertextBlob = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GenerateDataKeyOutput) SetKeyId(v string) *GenerateDataKeyOutput {
- s.KeyId = &v
- return s
-}
-
-// SetPlaintext sets the Plaintext field's value.
-func (s *GenerateDataKeyOutput) SetPlaintext(v []byte) *GenerateDataKeyOutput {
- s.Plaintext = v
- return s
-}
-
-type GenerateDataKeyPairInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the encryption context that will be used when encrypting the private
- // key in the data key pair.
- //
- // An encryption context is a collection of non-secret key-value pairs that
- // represents additional authenticated data. When you use an encryption context
- // to encrypt data, you must specify the same (an exact case-sensitive match)
- // encryption context to decrypt the data. An encryption context is optional
- // when encrypting with a symmetric KMS key, but it is highly recommended.
- //
- // For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
- // in the Key Management Service Developer Guide.
- EncryptionContext map[string]*string `type:"map"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Specifies the symmetric KMS key that encrypts the private key in the data
- // key pair. You cannot specify an asymmetric KMS key or a KMS key in a custom
- // key store. To get the type and origin of your KMS key, use the DescribeKey
- // operation.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Determines the type of data key pair that is generated.
- //
- // The KMS rule that restricts the use of asymmetric RSA KMS keys to encrypt
- // and decrypt or to sign and verify (but not both), and the rule that permits
- // you to use ECC KMS keys only to sign and verify, are not effective on data
- // key pairs, which are used outside of KMS.
- //
- // KeyPairSpec is a required field
- KeyPairSpec *string `type:"string" required:"true" enum:"DataKeyPairSpec"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyPairInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyPairInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GenerateDataKeyPairInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GenerateDataKeyPairInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.KeyPairSpec == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyPairSpec"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncryptionContext sets the EncryptionContext field's value.
-func (s *GenerateDataKeyPairInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyPairInput {
- s.EncryptionContext = v
- return s
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *GenerateDataKeyPairInput) SetGrantTokens(v []*string) *GenerateDataKeyPairInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GenerateDataKeyPairInput) SetKeyId(v string) *GenerateDataKeyPairInput {
- s.KeyId = &v
- return s
-}
-
-// SetKeyPairSpec sets the KeyPairSpec field's value.
-func (s *GenerateDataKeyPairInput) SetKeyPairSpec(v string) *GenerateDataKeyPairInput {
- s.KeyPairSpec = &v
- return s
-}
-
-type GenerateDataKeyPairOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key that encrypted the private key.
- KeyId *string `min:"1" type:"string"`
-
- // The type of data key pair that was generated.
- KeyPairSpec *string `type:"string" enum:"DataKeyPairSpec"`
-
- // The encrypted copy of the private key. When you use the HTTP API or the Amazon
- // Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
- // PrivateKeyCiphertextBlob is automatically base64 encoded/decoded by the SDK.
- PrivateKeyCiphertextBlob []byte `min:"1" type:"blob"`
-
- // The plaintext copy of the private key. When you use the HTTP API or the Amazon
- // Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
- //
- // PrivateKeyPlaintext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by GenerateDataKeyPairOutput's
- // String and GoString methods.
- //
- // PrivateKeyPlaintext is automatically base64 encoded/decoded by the SDK.
- PrivateKeyPlaintext []byte `min:"1" type:"blob" sensitive:"true"`
-
- // The public key (in plaintext).
- // PublicKey is automatically base64 encoded/decoded by the SDK.
- PublicKey []byte `min:"1" type:"blob"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyPairOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyPairOutput) GoString() string {
- return s.String()
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GenerateDataKeyPairOutput) SetKeyId(v string) *GenerateDataKeyPairOutput {
- s.KeyId = &v
- return s
-}
-
-// SetKeyPairSpec sets the KeyPairSpec field's value.
-func (s *GenerateDataKeyPairOutput) SetKeyPairSpec(v string) *GenerateDataKeyPairOutput {
- s.KeyPairSpec = &v
- return s
-}
-
-// SetPrivateKeyCiphertextBlob sets the PrivateKeyCiphertextBlob field's value.
-func (s *GenerateDataKeyPairOutput) SetPrivateKeyCiphertextBlob(v []byte) *GenerateDataKeyPairOutput {
- s.PrivateKeyCiphertextBlob = v
- return s
-}
-
-// SetPrivateKeyPlaintext sets the PrivateKeyPlaintext field's value.
-func (s *GenerateDataKeyPairOutput) SetPrivateKeyPlaintext(v []byte) *GenerateDataKeyPairOutput {
- s.PrivateKeyPlaintext = v
- return s
-}
-
-// SetPublicKey sets the PublicKey field's value.
-func (s *GenerateDataKeyPairOutput) SetPublicKey(v []byte) *GenerateDataKeyPairOutput {
- s.PublicKey = v
- return s
-}
-
-type GenerateDataKeyPairWithoutPlaintextInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the encryption context that will be used when encrypting the private
- // key in the data key pair.
- //
- // An encryption context is a collection of non-secret key-value pairs that
- // represents additional authenticated data. When you use an encryption context
- // to encrypt data, you must specify the same (an exact case-sensitive match)
- // encryption context to decrypt the data. An encryption context is optional
- // when encrypting with a symmetric KMS key, but it is highly recommended.
- //
- // For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
- // in the Key Management Service Developer Guide.
- EncryptionContext map[string]*string `type:"map"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Specifies the KMS key that encrypts the private key in the data key pair.
- // You must specify a symmetric KMS key. You cannot use an asymmetric KMS key
- // or a KMS key in a custom key store. To get the type and origin of your KMS
- // key, use the DescribeKey operation.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Determines the type of data key pair that is generated.
- //
- // The KMS rule that restricts the use of asymmetric RSA KMS keys to encrypt
- // and decrypt or to sign and verify (but not both), and the rule that permits
- // you to use ECC KMS keys only to sign and verify, are not effective on data
- // key pairs, which are used outside of KMS.
- //
- // KeyPairSpec is a required field
- KeyPairSpec *string `type:"string" required:"true" enum:"DataKeyPairSpec"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyPairWithoutPlaintextInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyPairWithoutPlaintextInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GenerateDataKeyPairWithoutPlaintextInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GenerateDataKeyPairWithoutPlaintextInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.KeyPairSpec == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyPairSpec"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncryptionContext sets the EncryptionContext field's value.
-func (s *GenerateDataKeyPairWithoutPlaintextInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyPairWithoutPlaintextInput {
- s.EncryptionContext = v
- return s
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *GenerateDataKeyPairWithoutPlaintextInput) SetGrantTokens(v []*string) *GenerateDataKeyPairWithoutPlaintextInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GenerateDataKeyPairWithoutPlaintextInput) SetKeyId(v string) *GenerateDataKeyPairWithoutPlaintextInput {
- s.KeyId = &v
- return s
-}
-
-// SetKeyPairSpec sets the KeyPairSpec field's value.
-func (s *GenerateDataKeyPairWithoutPlaintextInput) SetKeyPairSpec(v string) *GenerateDataKeyPairWithoutPlaintextInput {
- s.KeyPairSpec = &v
- return s
-}
-
-type GenerateDataKeyPairWithoutPlaintextOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key that encrypted the private key.
- KeyId *string `min:"1" type:"string"`
-
- // The type of data key pair that was generated.
- KeyPairSpec *string `type:"string" enum:"DataKeyPairSpec"`
-
- // The encrypted copy of the private key. When you use the HTTP API or the Amazon
- // Web Services CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
- // PrivateKeyCiphertextBlob is automatically base64 encoded/decoded by the SDK.
- PrivateKeyCiphertextBlob []byte `min:"1" type:"blob"`
-
- // The public key (in plaintext).
- // PublicKey is automatically base64 encoded/decoded by the SDK.
- PublicKey []byte `min:"1" type:"blob"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyPairWithoutPlaintextOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyPairWithoutPlaintextOutput) GoString() string {
- return s.String()
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GenerateDataKeyPairWithoutPlaintextOutput) SetKeyId(v string) *GenerateDataKeyPairWithoutPlaintextOutput {
- s.KeyId = &v
- return s
-}
-
-// SetKeyPairSpec sets the KeyPairSpec field's value.
-func (s *GenerateDataKeyPairWithoutPlaintextOutput) SetKeyPairSpec(v string) *GenerateDataKeyPairWithoutPlaintextOutput {
- s.KeyPairSpec = &v
- return s
-}
-
-// SetPrivateKeyCiphertextBlob sets the PrivateKeyCiphertextBlob field's value.
-func (s *GenerateDataKeyPairWithoutPlaintextOutput) SetPrivateKeyCiphertextBlob(v []byte) *GenerateDataKeyPairWithoutPlaintextOutput {
- s.PrivateKeyCiphertextBlob = v
- return s
-}
-
-// SetPublicKey sets the PublicKey field's value.
-func (s *GenerateDataKeyPairWithoutPlaintextOutput) SetPublicKey(v []byte) *GenerateDataKeyPairWithoutPlaintextOutput {
- s.PublicKey = v
- return s
-}
-
-type GenerateDataKeyWithoutPlaintextInput struct {
- _ struct{} `type:"structure"`
-
- // Specifies the encryption context that will be used when encrypting the data
- // key.
- //
- // An encryption context is a collection of non-secret key-value pairs that
- // represents additional authenticated data. When you use an encryption context
- // to encrypt data, you must specify the same (an exact case-sensitive match)
- // encryption context to decrypt the data. An encryption context is optional
- // when encrypting with a symmetric KMS key, but it is highly recommended.
- //
- // For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
- // in the Key Management Service Developer Guide.
- EncryptionContext map[string]*string `type:"map"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // The identifier of the symmetric KMS key that encrypts the data key.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // The length of the data key. Use AES_128 to generate a 128-bit symmetric key,
- // or AES_256 to generate a 256-bit symmetric key.
- KeySpec *string `type:"string" enum:"DataKeySpec"`
-
- // The length of the data key in bytes. For example, use the value 64 to generate
- // a 512-bit data key (64 bytes is 512 bits). For common key lengths (128-bit
- // and 256-bit symmetric keys), we recommend that you use the KeySpec field
- // instead of this one.
- NumberOfBytes *int64 `min:"1" type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyWithoutPlaintextInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyWithoutPlaintextInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GenerateDataKeyWithoutPlaintextInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GenerateDataKeyWithoutPlaintextInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 {
- invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncryptionContext sets the EncryptionContext field's value.
-func (s *GenerateDataKeyWithoutPlaintextInput) SetEncryptionContext(v map[string]*string) *GenerateDataKeyWithoutPlaintextInput {
- s.EncryptionContext = v
- return s
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *GenerateDataKeyWithoutPlaintextInput) SetGrantTokens(v []*string) *GenerateDataKeyWithoutPlaintextInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GenerateDataKeyWithoutPlaintextInput) SetKeyId(v string) *GenerateDataKeyWithoutPlaintextInput {
- s.KeyId = &v
- return s
-}
-
-// SetKeySpec sets the KeySpec field's value.
-func (s *GenerateDataKeyWithoutPlaintextInput) SetKeySpec(v string) *GenerateDataKeyWithoutPlaintextInput {
- s.KeySpec = &v
- return s
-}
-
-// SetNumberOfBytes sets the NumberOfBytes field's value.
-func (s *GenerateDataKeyWithoutPlaintextInput) SetNumberOfBytes(v int64) *GenerateDataKeyWithoutPlaintextInput {
- s.NumberOfBytes = &v
- return s
-}
-
-type GenerateDataKeyWithoutPlaintextOutput struct {
- _ struct{} `type:"structure"`
-
- // The encrypted data key. When you use the HTTP API or the Amazon Web Services
- // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
- // CiphertextBlob is automatically base64 encoded/decoded by the SDK.
- CiphertextBlob []byte `min:"1" type:"blob"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key that encrypted the data key.
- KeyId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyWithoutPlaintextOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateDataKeyWithoutPlaintextOutput) GoString() string {
- return s.String()
-}
-
-// SetCiphertextBlob sets the CiphertextBlob field's value.
-func (s *GenerateDataKeyWithoutPlaintextOutput) SetCiphertextBlob(v []byte) *GenerateDataKeyWithoutPlaintextOutput {
- s.CiphertextBlob = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GenerateDataKeyWithoutPlaintextOutput) SetKeyId(v string) *GenerateDataKeyWithoutPlaintextOutput {
- s.KeyId = &v
- return s
-}
-
-type GenerateRandomInput struct {
- _ struct{} `type:"structure"`
-
- // Generates the random byte string in the CloudHSM cluster that is associated
- // with the specified custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html).
- // To find the ID of a custom key store, use the DescribeCustomKeyStores operation.
- CustomKeyStoreId *string `min:"1" type:"string"`
-
- // The length of the byte string.
- NumberOfBytes *int64 `min:"1" type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateRandomInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateRandomInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GenerateRandomInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GenerateRandomInput"}
- if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1))
- }
- if s.NumberOfBytes != nil && *s.NumberOfBytes < 1 {
- invalidParams.Add(request.NewErrParamMinValue("NumberOfBytes", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *GenerateRandomInput) SetCustomKeyStoreId(v string) *GenerateRandomInput {
- s.CustomKeyStoreId = &v
- return s
-}
-
-// SetNumberOfBytes sets the NumberOfBytes field's value.
-func (s *GenerateRandomInput) SetNumberOfBytes(v int64) *GenerateRandomInput {
- s.NumberOfBytes = &v
- return s
-}
-
-type GenerateRandomOutput struct {
- _ struct{} `type:"structure"`
-
- // The random byte string. When you use the HTTP API or the Amazon Web Services
- // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
- //
- // Plaintext is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by GenerateRandomOutput's
- // String and GoString methods.
- //
- // Plaintext is automatically base64 encoded/decoded by the SDK.
- Plaintext []byte `min:"1" type:"blob" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateRandomOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GenerateRandomOutput) GoString() string {
- return s.String()
-}
-
-// SetPlaintext sets the Plaintext field's value.
-func (s *GenerateRandomOutput) SetPlaintext(v []byte) *GenerateRandomOutput {
- s.Plaintext = v
- return s
-}
-
-type GetKeyPolicyInput struct {
- _ struct{} `type:"structure"`
-
- // Gets the key policy for the specified KMS key.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Specifies the name of the key policy. The only valid name is default. To
- // get the names of key policies, use ListKeyPolicies.
- //
- // PolicyName is a required field
- PolicyName *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetKeyPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetKeyPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetKeyPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetKeyPolicyInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.PolicyName == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyName"))
- }
- if s.PolicyName != nil && len(*s.PolicyName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GetKeyPolicyInput) SetKeyId(v string) *GetKeyPolicyInput {
- s.KeyId = &v
- return s
-}
-
-// SetPolicyName sets the PolicyName field's value.
-func (s *GetKeyPolicyInput) SetPolicyName(v string) *GetKeyPolicyInput {
- s.PolicyName = &v
- return s
-}
-
-type GetKeyPolicyOutput struct {
- _ struct{} `type:"structure"`
-
- // A key policy document in JSON format.
- Policy *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetKeyPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetKeyPolicyOutput) GoString() string {
- return s.String()
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *GetKeyPolicyOutput) SetPolicy(v string) *GetKeyPolicyOutput {
- s.Policy = &v
- return s
-}
-
-type GetKeyRotationStatusInput struct {
- _ struct{} `type:"structure"`
-
- // Gets the rotation status for the specified KMS key.
- //
- // Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different
- // Amazon Web Services account, you must use the key ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetKeyRotationStatusInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetKeyRotationStatusInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetKeyRotationStatusInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetKeyRotationStatusInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GetKeyRotationStatusInput) SetKeyId(v string) *GetKeyRotationStatusInput {
- s.KeyId = &v
- return s
-}
-
-type GetKeyRotationStatusOutput struct {
- _ struct{} `type:"structure"`
-
- // A Boolean value that specifies whether key rotation is enabled.
- KeyRotationEnabled *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetKeyRotationStatusOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetKeyRotationStatusOutput) GoString() string {
- return s.String()
-}
-
-// SetKeyRotationEnabled sets the KeyRotationEnabled field's value.
-func (s *GetKeyRotationStatusOutput) SetKeyRotationEnabled(v bool) *GetKeyRotationStatusOutput {
- s.KeyRotationEnabled = &v
- return s
-}
-
-type GetParametersForImportInput struct {
- _ struct{} `type:"structure"`
-
- // The identifier of the symmetric KMS key into which you will import key material.
- // The Origin of the KMS key must be EXTERNAL.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // The algorithm you will use to encrypt the key material before importing it
- // with ImportKeyMaterial. For more information, see Encrypt the Key Material
- // (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys-encrypt-key-material.html)
- // in the Key Management Service Developer Guide.
- //
- // WrappingAlgorithm is a required field
- WrappingAlgorithm *string `type:"string" required:"true" enum:"AlgorithmSpec"`
-
- // The type of wrapping key (public key) to return in the response. Only 2048-bit
- // RSA public keys are supported.
- //
- // WrappingKeySpec is a required field
- WrappingKeySpec *string `type:"string" required:"true" enum:"WrappingKeySpec"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetParametersForImportInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetParametersForImportInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetParametersForImportInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetParametersForImportInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.WrappingAlgorithm == nil {
- invalidParams.Add(request.NewErrParamRequired("WrappingAlgorithm"))
- }
- if s.WrappingKeySpec == nil {
- invalidParams.Add(request.NewErrParamRequired("WrappingKeySpec"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GetParametersForImportInput) SetKeyId(v string) *GetParametersForImportInput {
- s.KeyId = &v
- return s
-}
-
-// SetWrappingAlgorithm sets the WrappingAlgorithm field's value.
-func (s *GetParametersForImportInput) SetWrappingAlgorithm(v string) *GetParametersForImportInput {
- s.WrappingAlgorithm = &v
- return s
-}
-
-// SetWrappingKeySpec sets the WrappingKeySpec field's value.
-func (s *GetParametersForImportInput) SetWrappingKeySpec(v string) *GetParametersForImportInput {
- s.WrappingKeySpec = &v
- return s
-}
-
-type GetParametersForImportOutput struct {
- _ struct{} `type:"structure"`
-
- // The import token to send in a subsequent ImportKeyMaterial request.
- // ImportToken is automatically base64 encoded/decoded by the SDK.
- ImportToken []byte `min:"1" type:"blob"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key to use in a subsequent ImportKeyMaterial request. This is
- // the same KMS key specified in the GetParametersForImport request.
- KeyId *string `min:"1" type:"string"`
-
- // The time at which the import token and public key are no longer valid. After
- // this time, you cannot use them to make an ImportKeyMaterial request and you
- // must send another GetParametersForImport request to get new ones.
- ParametersValidTo *time.Time `type:"timestamp"`
-
- // The public key to use to encrypt the key material before importing it with
- // ImportKeyMaterial.
- //
- // PublicKey is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by GetParametersForImportOutput's
- // String and GoString methods.
- //
- // PublicKey is automatically base64 encoded/decoded by the SDK.
- PublicKey []byte `min:"1" type:"blob" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetParametersForImportOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetParametersForImportOutput) GoString() string {
- return s.String()
-}
-
-// SetImportToken sets the ImportToken field's value.
-func (s *GetParametersForImportOutput) SetImportToken(v []byte) *GetParametersForImportOutput {
- s.ImportToken = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GetParametersForImportOutput) SetKeyId(v string) *GetParametersForImportOutput {
- s.KeyId = &v
- return s
-}
-
-// SetParametersValidTo sets the ParametersValidTo field's value.
-func (s *GetParametersForImportOutput) SetParametersValidTo(v time.Time) *GetParametersForImportOutput {
- s.ParametersValidTo = &v
- return s
-}
-
-// SetPublicKey sets the PublicKey field's value.
-func (s *GetParametersForImportOutput) SetPublicKey(v []byte) *GetParametersForImportOutput {
- s.PublicKey = v
- return s
-}
-
-type GetPublicKeyInput struct {
- _ struct{} `type:"structure"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Identifies the asymmetric KMS key that includes the public key.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetPublicKeyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetPublicKeyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetPublicKeyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetPublicKeyInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *GetPublicKeyInput) SetGrantTokens(v []*string) *GetPublicKeyInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GetPublicKeyInput) SetKeyId(v string) *GetPublicKeyInput {
- s.KeyId = &v
- return s
-}
-
-type GetPublicKeyOutput struct {
- _ struct{} `type:"structure"`
-
- // Instead, use the KeySpec field in the GetPublicKey response.
- //
- // The KeySpec and CustomerMasterKeySpec fields have the same value. We recommend
- // that you use the KeySpec field in your code. However, to avoid breaking changes,
- // KMS will support both fields.
- //
- // Deprecated: This field has been deprecated. Instead, use the KeySpec field.
- CustomerMasterKeySpec *string `deprecated:"true" type:"string" enum:"CustomerMasterKeySpec"`
-
- // The encryption algorithms that KMS supports for this key.
- //
- // This information is critical. If a public key encrypts data outside of KMS
- // by using an unsupported encryption algorithm, the ciphertext cannot be decrypted.
- //
- // This field appears in the response only when the KeyUsage of the public key
- // is ENCRYPT_DECRYPT.
- EncryptionAlgorithms []*string `type:"list"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the asymmetric KMS key from which the public key was downloaded.
- KeyId *string `min:"1" type:"string"`
-
- // The type of the of the public key that was downloaded.
- KeySpec *string `type:"string" enum:"KeySpec"`
-
- // The permitted use of the public key. Valid values are ENCRYPT_DECRYPT or
- // SIGN_VERIFY.
- //
- // This information is critical. If a public key with SIGN_VERIFY key usage
- // encrypts data outside of KMS, the ciphertext cannot be decrypted.
- KeyUsage *string `type:"string" enum:"KeyUsageType"`
-
- // The exported public key.
- //
- // The value is a DER-encoded X.509 public key, also known as SubjectPublicKeyInfo
- // (SPKI), as defined in RFC 5280 (https://tools.ietf.org/html/rfc5280). When
- // you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded.
- // Otherwise, it is not Base64-encoded.
- // PublicKey is automatically base64 encoded/decoded by the SDK.
- PublicKey []byte `min:"1" type:"blob"`
-
- // The signing algorithms that KMS supports for this key.
- //
- // This field appears in the response only when the KeyUsage of the public key
- // is SIGN_VERIFY.
- SigningAlgorithms []*string `type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetPublicKeyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetPublicKeyOutput) GoString() string {
- return s.String()
-}
-
-// SetCustomerMasterKeySpec sets the CustomerMasterKeySpec field's value.
-func (s *GetPublicKeyOutput) SetCustomerMasterKeySpec(v string) *GetPublicKeyOutput {
- s.CustomerMasterKeySpec = &v
- return s
-}
-
-// SetEncryptionAlgorithms sets the EncryptionAlgorithms field's value.
-func (s *GetPublicKeyOutput) SetEncryptionAlgorithms(v []*string) *GetPublicKeyOutput {
- s.EncryptionAlgorithms = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GetPublicKeyOutput) SetKeyId(v string) *GetPublicKeyOutput {
- s.KeyId = &v
- return s
-}
-
-// SetKeySpec sets the KeySpec field's value.
-func (s *GetPublicKeyOutput) SetKeySpec(v string) *GetPublicKeyOutput {
- s.KeySpec = &v
- return s
-}
-
-// SetKeyUsage sets the KeyUsage field's value.
-func (s *GetPublicKeyOutput) SetKeyUsage(v string) *GetPublicKeyOutput {
- s.KeyUsage = &v
- return s
-}
-
-// SetPublicKey sets the PublicKey field's value.
-func (s *GetPublicKeyOutput) SetPublicKey(v []byte) *GetPublicKeyOutput {
- s.PublicKey = v
- return s
-}
-
-// SetSigningAlgorithms sets the SigningAlgorithms field's value.
-func (s *GetPublicKeyOutput) SetSigningAlgorithms(v []*string) *GetPublicKeyOutput {
- s.SigningAlgorithms = v
- return s
-}
-
-// Use this structure to allow cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
-// in the grant only when the operation request includes the specified encryption
-// context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context).
-//
-// KMS applies the grant constraints only to cryptographic operations that support
-// an encryption context, that is, all cryptographic operations with a symmetric
-// KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#symmetric-cmks).
-// Grant constraints are not applied to operations that do not support an encryption
-// context, such as cryptographic operations with asymmetric KMS keys and management
-// operations, such as DescribeKey or RetireGrant.
-//
-// In a cryptographic operation, the encryption context in the decryption operation
-// must be an exact, case-sensitive match for the keys and values in the encryption
-// context of the encryption operation. Only the order of the pairs can vary.
-//
-// However, in a grant constraint, the key in each key-value pair is not case
-// sensitive, but the value is case sensitive.
-//
-// To avoid confusion, do not use multiple encryption context pairs that differ
-// only by case. To require a fully case-sensitive encryption context, use the
-// kms:EncryptionContext: and kms:EncryptionContextKeys conditions in an IAM
-// or key policy. For details, see kms:EncryptionContext: (https://docs.aws.amazon.com/kms/latest/developerguide/policy-conditions.html#conditions-kms-encryption-context)
-// in the Key Management Service Developer Guide .
-type GrantConstraints struct {
- _ struct{} `type:"structure"`
-
- // A list of key-value pairs that must match the encryption context in the cryptographic
- // operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
- // request. The grant allows the operation only when the encryption context
- // in the request is the same as the encryption context specified in this constraint.
- EncryptionContextEquals map[string]*string `type:"map"`
-
- // A list of key-value pairs that must be included in the encryption context
- // of the cryptographic operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
- // request. The grant allows the cryptographic operation only when the encryption
- // context in the request includes the key-value pairs specified in this constraint,
- // although it can include additional key-value pairs.
- EncryptionContextSubset map[string]*string `type:"map"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GrantConstraints) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GrantConstraints) GoString() string {
- return s.String()
-}
-
-// SetEncryptionContextEquals sets the EncryptionContextEquals field's value.
-func (s *GrantConstraints) SetEncryptionContextEquals(v map[string]*string) *GrantConstraints {
- s.EncryptionContextEquals = v
- return s
-}
-
-// SetEncryptionContextSubset sets the EncryptionContextSubset field's value.
-func (s *GrantConstraints) SetEncryptionContextSubset(v map[string]*string) *GrantConstraints {
- s.EncryptionContextSubset = v
- return s
-}
-
-// Contains information about a grant.
-type GrantListEntry struct {
- _ struct{} `type:"structure"`
-
- // A list of key-value pairs that must be present in the encryption context
- // of certain subsequent operations that the grant allows.
- Constraints *GrantConstraints `type:"structure"`
-
- // The date and time when the grant was created.
- CreationDate *time.Time `type:"timestamp"`
-
- // The unique identifier for the grant.
- GrantId *string `min:"1" type:"string"`
-
- // The identity that gets the permissions in the grant.
- //
- // The GranteePrincipal field in the ListGrants response usually contains the
- // user or role designated as the grantee principal in the grant. However, when
- // the grantee principal in the grant is an Amazon Web Services service, the
- // GranteePrincipal field contains the service principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services),
- // which might represent several different grantee principals.
- GranteePrincipal *string `min:"1" type:"string"`
-
- // The Amazon Web Services account under which the grant was issued.
- IssuingAccount *string `min:"1" type:"string"`
-
- // The unique identifier for the KMS key to which the grant applies.
- KeyId *string `min:"1" type:"string"`
-
- // The friendly name that identifies the grant. If a name was provided in the
- // CreateGrant request, that name is returned. Otherwise this value is null.
- Name *string `min:"1" type:"string"`
-
- // The list of operations permitted by the grant.
- Operations []*string `type:"list"`
-
- // The principal that can retire the grant.
- RetiringPrincipal *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GrantListEntry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GrantListEntry) GoString() string {
- return s.String()
-}
-
-// SetConstraints sets the Constraints field's value.
-func (s *GrantListEntry) SetConstraints(v *GrantConstraints) *GrantListEntry {
- s.Constraints = v
- return s
-}
-
-// SetCreationDate sets the CreationDate field's value.
-func (s *GrantListEntry) SetCreationDate(v time.Time) *GrantListEntry {
- s.CreationDate = &v
- return s
-}
-
-// SetGrantId sets the GrantId field's value.
-func (s *GrantListEntry) SetGrantId(v string) *GrantListEntry {
- s.GrantId = &v
- return s
-}
-
-// SetGranteePrincipal sets the GranteePrincipal field's value.
-func (s *GrantListEntry) SetGranteePrincipal(v string) *GrantListEntry {
- s.GranteePrincipal = &v
- return s
-}
-
-// SetIssuingAccount sets the IssuingAccount field's value.
-func (s *GrantListEntry) SetIssuingAccount(v string) *GrantListEntry {
- s.IssuingAccount = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *GrantListEntry) SetKeyId(v string) *GrantListEntry {
- s.KeyId = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *GrantListEntry) SetName(v string) *GrantListEntry {
- s.Name = &v
- return s
-}
-
-// SetOperations sets the Operations field's value.
-func (s *GrantListEntry) SetOperations(v []*string) *GrantListEntry {
- s.Operations = v
- return s
-}
-
-// SetRetiringPrincipal sets the RetiringPrincipal field's value.
-func (s *GrantListEntry) SetRetiringPrincipal(v string) *GrantListEntry {
- s.RetiringPrincipal = &v
- return s
-}
-
-type ImportKeyMaterialInput struct {
- _ struct{} `type:"structure"`
-
- // The encrypted key material to import. The key material must be encrypted
- // with the public wrapping key that GetParametersForImport returned, using
- // the wrapping algorithm that you specified in the same GetParametersForImport
- // request.
- // EncryptedKeyMaterial is automatically base64 encoded/decoded by the SDK.
- //
- // EncryptedKeyMaterial is a required field
- EncryptedKeyMaterial []byte `min:"1" type:"blob" required:"true"`
-
- // Specifies whether the key material expires. The default is KEY_MATERIAL_EXPIRES,
- // in which case you must include the ValidTo parameter. When this parameter
- // is set to KEY_MATERIAL_DOES_NOT_EXPIRE, you must omit the ValidTo parameter.
- ExpirationModel *string `type:"string" enum:"ExpirationModelType"`
-
- // The import token that you received in the response to a previous GetParametersForImport
- // request. It must be from the same response that contained the public key
- // that you used to encrypt the key material.
- // ImportToken is automatically base64 encoded/decoded by the SDK.
- //
- // ImportToken is a required field
- ImportToken []byte `min:"1" type:"blob" required:"true"`
-
- // The identifier of the symmetric KMS key that receives the imported key material.
- // The KMS key's Origin must be EXTERNAL. This must be the same KMS key specified
- // in the KeyID parameter of the corresponding GetParametersForImport request.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // The time at which the imported key material expires. When the key material
- // expires, KMS deletes the key material and the KMS key becomes unusable. You
- // must omit this parameter when the ExpirationModel parameter is set to KEY_MATERIAL_DOES_NOT_EXPIRE.
- // Otherwise it is required.
- ValidTo *time.Time `type:"timestamp"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ImportKeyMaterialInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ImportKeyMaterialInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ImportKeyMaterialInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ImportKeyMaterialInput"}
- if s.EncryptedKeyMaterial == nil {
- invalidParams.Add(request.NewErrParamRequired("EncryptedKeyMaterial"))
- }
- if s.EncryptedKeyMaterial != nil && len(s.EncryptedKeyMaterial) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("EncryptedKeyMaterial", 1))
- }
- if s.ImportToken == nil {
- invalidParams.Add(request.NewErrParamRequired("ImportToken"))
- }
- if s.ImportToken != nil && len(s.ImportToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ImportToken", 1))
- }
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncryptedKeyMaterial sets the EncryptedKeyMaterial field's value.
-func (s *ImportKeyMaterialInput) SetEncryptedKeyMaterial(v []byte) *ImportKeyMaterialInput {
- s.EncryptedKeyMaterial = v
- return s
-}
-
-// SetExpirationModel sets the ExpirationModel field's value.
-func (s *ImportKeyMaterialInput) SetExpirationModel(v string) *ImportKeyMaterialInput {
- s.ExpirationModel = &v
- return s
-}
-
-// SetImportToken sets the ImportToken field's value.
-func (s *ImportKeyMaterialInput) SetImportToken(v []byte) *ImportKeyMaterialInput {
- s.ImportToken = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *ImportKeyMaterialInput) SetKeyId(v string) *ImportKeyMaterialInput {
- s.KeyId = &v
- return s
-}
-
-// SetValidTo sets the ValidTo field's value.
-func (s *ImportKeyMaterialInput) SetValidTo(v time.Time) *ImportKeyMaterialInput {
- s.ValidTo = &v
- return s
-}
-
-type ImportKeyMaterialOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ImportKeyMaterialOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ImportKeyMaterialOutput) GoString() string {
- return s.String()
-}
-
-// The request was rejected because the specified KMS key cannot decrypt the
-// data. The KeyId in a Decrypt request and the SourceKeyId in a ReEncrypt request
-// must identify the same KMS key that was used to encrypt the ciphertext.
-type IncorrectKeyException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IncorrectKeyException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IncorrectKeyException) GoString() string {
- return s.String()
-}
-
-func newErrorIncorrectKeyException(v protocol.ResponseMetadata) error {
- return &IncorrectKeyException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *IncorrectKeyException) Code() string {
- return "IncorrectKeyException"
-}
-
-// Message returns the exception's message.
-func (s *IncorrectKeyException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *IncorrectKeyException) OrigErr() error {
- return nil
-}
-
-func (s *IncorrectKeyException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *IncorrectKeyException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *IncorrectKeyException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the key material in the request is, expired,
-// invalid, or is not the same key material that was previously imported into
-// this KMS key.
-type IncorrectKeyMaterialException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IncorrectKeyMaterialException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IncorrectKeyMaterialException) GoString() string {
- return s.String()
-}
-
-func newErrorIncorrectKeyMaterialException(v protocol.ResponseMetadata) error {
- return &IncorrectKeyMaterialException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *IncorrectKeyMaterialException) Code() string {
- return "IncorrectKeyMaterialException"
-}
-
-// Message returns the exception's message.
-func (s *IncorrectKeyMaterialException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *IncorrectKeyMaterialException) OrigErr() error {
- return nil
-}
-
-func (s *IncorrectKeyMaterialException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *IncorrectKeyMaterialException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *IncorrectKeyMaterialException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the trust anchor certificate in the request
-// is not the trust anchor certificate for the specified CloudHSM cluster.
-//
-// When you initialize the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr),
-// you create the trust anchor certificate and save it in the customerCA.crt
-// file.
-type IncorrectTrustAnchorException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IncorrectTrustAnchorException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s IncorrectTrustAnchorException) GoString() string {
- return s.String()
-}
-
-func newErrorIncorrectTrustAnchorException(v protocol.ResponseMetadata) error {
- return &IncorrectTrustAnchorException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *IncorrectTrustAnchorException) Code() string {
- return "IncorrectTrustAnchorException"
-}
-
-// Message returns the exception's message.
-func (s *IncorrectTrustAnchorException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *IncorrectTrustAnchorException) OrigErr() error {
- return nil
-}
-
-func (s *IncorrectTrustAnchorException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *IncorrectTrustAnchorException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *IncorrectTrustAnchorException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because an internal exception occurred. The request
-// can be retried.
-type InternalException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InternalException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InternalException) GoString() string {
- return s.String()
-}
-
-func newErrorInternalException(v protocol.ResponseMetadata) error {
- return &InternalException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InternalException) Code() string {
- return "KMSInternalException"
-}
-
-// Message returns the exception's message.
-func (s *InternalException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InternalException) OrigErr() error {
- return nil
-}
-
-func (s *InternalException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InternalException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InternalException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the specified alias name is not valid.
-type InvalidAliasNameException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidAliasNameException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidAliasNameException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidAliasNameException(v protocol.ResponseMetadata) error {
- return &InvalidAliasNameException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidAliasNameException) Code() string {
- return "InvalidAliasNameException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidAliasNameException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidAliasNameException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidAliasNameException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidAliasNameException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidAliasNameException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because a specified ARN, or an ARN in a key policy,
-// is not valid.
-type InvalidArnException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidArnException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidArnException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidArnException(v protocol.ResponseMetadata) error {
- return &InvalidArnException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidArnException) Code() string {
- return "InvalidArnException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidArnException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidArnException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidArnException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidArnException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidArnException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// From the Decrypt or ReEncrypt operation, the request was rejected because
-// the specified ciphertext, or additional authenticated data incorporated into
-// the ciphertext, such as the encryption context, is corrupted, missing, or
-// otherwise invalid.
-//
-// From the ImportKeyMaterial operation, the request was rejected because KMS
-// could not decrypt the encrypted (wrapped) key material.
-type InvalidCiphertextException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidCiphertextException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidCiphertextException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidCiphertextException(v protocol.ResponseMetadata) error {
- return &InvalidCiphertextException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidCiphertextException) Code() string {
- return "InvalidCiphertextException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidCiphertextException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidCiphertextException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidCiphertextException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidCiphertextException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidCiphertextException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the specified GrantId is not valid.
-type InvalidGrantIdException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidGrantIdException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidGrantIdException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidGrantIdException(v protocol.ResponseMetadata) error {
- return &InvalidGrantIdException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidGrantIdException) Code() string {
- return "InvalidGrantIdException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidGrantIdException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidGrantIdException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidGrantIdException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidGrantIdException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidGrantIdException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the specified grant token is not valid.
-type InvalidGrantTokenException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidGrantTokenException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidGrantTokenException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidGrantTokenException(v protocol.ResponseMetadata) error {
- return &InvalidGrantTokenException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidGrantTokenException) Code() string {
- return "InvalidGrantTokenException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidGrantTokenException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidGrantTokenException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidGrantTokenException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidGrantTokenException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidGrantTokenException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the provided import token is invalid or
-// is associated with a different KMS key.
-type InvalidImportTokenException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidImportTokenException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidImportTokenException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidImportTokenException(v protocol.ResponseMetadata) error {
- return &InvalidImportTokenException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidImportTokenException) Code() string {
- return "InvalidImportTokenException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidImportTokenException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidImportTokenException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidImportTokenException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidImportTokenException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidImportTokenException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected for one of the following reasons:
-//
-// * The KeyUsage value of the KMS key is incompatible with the API operation.
-//
-// * The encryption algorithm or signing algorithm specified for the operation
-// is incompatible with the type of key material in the KMS key (KeySpec).
-//
-// For encrypting, decrypting, re-encrypting, and generating data keys, the
-// KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
-// must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
-// operation.
-//
-// To find the encryption or signing algorithms supported for a particular KMS
-// key, use the DescribeKey operation.
-type InvalidKeyUsageException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidKeyUsageException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidKeyUsageException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidKeyUsageException(v protocol.ResponseMetadata) error {
- return &InvalidKeyUsageException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidKeyUsageException) Code() string {
- return "InvalidKeyUsageException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidKeyUsageException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidKeyUsageException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidKeyUsageException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidKeyUsageException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidKeyUsageException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the marker that specifies where pagination
-// should next begin is not valid.
-type InvalidMarkerException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidMarkerException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidMarkerException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidMarkerException(v protocol.ResponseMetadata) error {
- return &InvalidMarkerException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidMarkerException) Code() string {
- return "InvalidMarkerException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidMarkerException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidMarkerException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidMarkerException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidMarkerException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidMarkerException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the state of the specified resource is not
-// valid for this request.
-//
-// For more information about how key state affects the use of a KMS key, see
-// Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
-// in the Key Management Service Developer Guide .
-type InvalidStateException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidStateException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidStateException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidStateException(v protocol.ResponseMetadata) error {
- return &InvalidStateException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidStateException) Code() string {
- return "KMSInvalidStateException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidStateException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidStateException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidStateException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidStateException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidStateException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because the signature verification failed. Signature
-// verification fails when it cannot confirm that signature was produced by
-// signing the specified message with the specified KMS key and signing algorithm.
-type KMSInvalidSignatureException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KMSInvalidSignatureException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KMSInvalidSignatureException) GoString() string {
- return s.String()
-}
-
-func newErrorKMSInvalidSignatureException(v protocol.ResponseMetadata) error {
- return &KMSInvalidSignatureException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *KMSInvalidSignatureException) Code() string {
- return "KMSInvalidSignatureException"
-}
-
-// Message returns the exception's message.
-func (s *KMSInvalidSignatureException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *KMSInvalidSignatureException) OrigErr() error {
- return nil
-}
-
-func (s *KMSInvalidSignatureException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *KMSInvalidSignatureException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *KMSInvalidSignatureException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Contains information about each entry in the key list.
-type KeyListEntry struct {
- _ struct{} `type:"structure"`
-
- // ARN of the key.
- KeyArn *string `min:"20" type:"string"`
-
- // Unique identifier of the key.
- KeyId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KeyListEntry) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KeyListEntry) GoString() string {
- return s.String()
-}
-
-// SetKeyArn sets the KeyArn field's value.
-func (s *KeyListEntry) SetKeyArn(v string) *KeyListEntry {
- s.KeyArn = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *KeyListEntry) SetKeyId(v string) *KeyListEntry {
- s.KeyId = &v
- return s
-}
-
-// Contains metadata about a KMS key.
-//
-// This data type is used as a response element for the CreateKey and DescribeKey
-// operations.
-type KeyMetadata struct {
- _ struct{} `type:"structure"`
-
- // The twelve-digit account ID of the Amazon Web Services account that owns
- // the KMS key.
- AWSAccountId *string `type:"string"`
-
- // The Amazon Resource Name (ARN) of the KMS key. For examples, see Key Management
- // Service (KMS) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-kms)
- // in the Example ARNs section of the Amazon Web Services General Reference.
- Arn *string `min:"20" type:"string"`
-
- // The cluster ID of the CloudHSM cluster that contains the key material for
- // the KMS key. When you create a KMS key in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html),
- // KMS creates the key material for the KMS key in the associated CloudHSM cluster.
- // This value is present only when the KMS key is created in a custom key store.
- CloudHsmClusterId *string `min:"19" type:"string"`
-
- // The date and time when the KMS key was created.
- CreationDate *time.Time `type:"timestamp"`
-
- // A unique identifier for the custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html)
- // that contains the KMS key. This value is present only when the KMS key is
- // created in a custom key store.
- CustomKeyStoreId *string `min:"1" type:"string"`
-
- // Instead, use the KeySpec field.
- //
- // The KeySpec and CustomerMasterKeySpec fields have the same value. We recommend
- // that you use the KeySpec field in your code. However, to avoid breaking changes,
- // KMS will support both fields.
- //
- // Deprecated: This field has been deprecated. Instead, use the KeySpec field.
- CustomerMasterKeySpec *string `deprecated:"true" type:"string" enum:"CustomerMasterKeySpec"`
-
- // The date and time after which KMS deletes this KMS key. This value is present
- // only when the KMS key is scheduled for deletion, that is, when its KeyState
- // is PendingDeletion.
- //
- // When the primary key in a multi-Region key is scheduled for deletion but
- // still has replica keys, its key state is PendingReplicaDeletion and the length
- // of its waiting period is displayed in the PendingDeletionWindowInDays field.
- DeletionDate *time.Time `type:"timestamp"`
-
- // The description of the KMS key.
- Description *string `type:"string"`
-
- // Specifies whether the KMS key is enabled. When KeyState is Enabled this value
- // is true, otherwise it is false.
- Enabled *bool `type:"boolean"`
-
- // The encryption algorithms that the KMS key supports. You cannot use the KMS
- // key with other encryption algorithms within KMS.
- //
- // This value is present only when the KeyUsage of the KMS key is ENCRYPT_DECRYPT.
- EncryptionAlgorithms []*string `type:"list"`
-
- // Specifies whether the KMS key's key material expires. This value is present
- // only when Origin is EXTERNAL, otherwise this value is omitted.
- ExpirationModel *string `type:"string" enum:"ExpirationModelType"`
-
- // The globally unique identifier for the KMS key.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // The manager of the KMS key. KMS keys in your Amazon Web Services account
- // are either customer managed or Amazon Web Services managed. For more information
- // about the difference, see KMS keys (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys)
- // in the Key Management Service Developer Guide.
- KeyManager *string `type:"string" enum:"KeyManagerType"`
-
- // Describes the type of key material in the KMS key.
- KeySpec *string `type:"string" enum:"KeySpec"`
-
- // The current status of the KMS key.
- //
- // For more information about how key state affects the use of a KMS key, see
- // Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
- // in the Key Management Service Developer Guide.
- KeyState *string `type:"string" enum:"KeyState"`
-
- // The cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations)
- // for which you can use the KMS key.
- KeyUsage *string `type:"string" enum:"KeyUsageType"`
-
- // Indicates whether the KMS key is a multi-Region (True) or regional (False)
- // key. This value is True for multi-Region primary and replica keys and False
- // for regional KMS keys.
- //
- // For more information about multi-Region keys, see Using multi-Region keys
- // (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html)
- // in the Key Management Service Developer Guide.
- MultiRegion *bool `type:"boolean"`
-
- // Lists the primary and replica keys in same multi-Region key. This field is
- // present only when the value of the MultiRegion field is True.
- //
- // For more information about any listed KMS key, use the DescribeKey operation.
- //
- // * MultiRegionKeyType indicates whether the KMS key is a PRIMARY or REPLICA
- // key.
- //
- // * PrimaryKey displays the key ARN and Region of the primary key. This
- // field displays the current KMS key if it is the primary key.
- //
- // * ReplicaKeys displays the key ARNs and Regions of all replica keys. This
- // field includes the current KMS key if it is a replica key.
- MultiRegionConfiguration *MultiRegionConfiguration `type:"structure"`
-
- // The source of the key material for the KMS key. When this value is AWS_KMS,
- // KMS created the key material. When this value is EXTERNAL, the key material
- // was imported or the KMS key doesn't have any key material. When this value
- // is AWS_CLOUDHSM, the key material was created in the CloudHSM cluster associated
- // with a custom key store.
- Origin *string `type:"string" enum:"OriginType"`
-
- // The waiting period before the primary key in a multi-Region key is deleted.
- // This waiting period begins when the last of its replica keys is deleted.
- // This value is present only when the KeyState of the KMS key is PendingReplicaDeletion.
- // That indicates that the KMS key is the primary key in a multi-Region key,
- // it is scheduled for deletion, and it still has existing replica keys.
- //
- // When a single-Region KMS key or a multi-Region replica key is scheduled for
- // deletion, its deletion date is displayed in the DeletionDate field. However,
- // when the primary key in a multi-Region key is scheduled for deletion, its
- // waiting period doesn't begin until all of its replica keys are deleted. This
- // value displays that waiting period. When the last replica key in the multi-Region
- // key is deleted, the KeyState of the scheduled primary key changes from PendingReplicaDeletion
- // to PendingDeletion and the deletion date appears in the DeletionDate field.
- PendingDeletionWindowInDays *int64 `min:"1" type:"integer"`
-
- // The signing algorithms that the KMS key supports. You cannot use the KMS
- // key with other signing algorithms within KMS.
- //
- // This field appears only when the KeyUsage of the KMS key is SIGN_VERIFY.
- SigningAlgorithms []*string `type:"list"`
-
- // The time at which the imported key material expires. When the key material
- // expires, KMS deletes the key material and the KMS key becomes unusable. This
- // value is present only for KMS keys whose Origin is EXTERNAL and whose ExpirationModel
- // is KEY_MATERIAL_EXPIRES, otherwise this value is omitted.
- ValidTo *time.Time `type:"timestamp"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KeyMetadata) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KeyMetadata) GoString() string {
- return s.String()
-}
-
-// SetAWSAccountId sets the AWSAccountId field's value.
-func (s *KeyMetadata) SetAWSAccountId(v string) *KeyMetadata {
- s.AWSAccountId = &v
- return s
-}
-
-// SetArn sets the Arn field's value.
-func (s *KeyMetadata) SetArn(v string) *KeyMetadata {
- s.Arn = &v
- return s
-}
-
-// SetCloudHsmClusterId sets the CloudHsmClusterId field's value.
-func (s *KeyMetadata) SetCloudHsmClusterId(v string) *KeyMetadata {
- s.CloudHsmClusterId = &v
- return s
-}
-
-// SetCreationDate sets the CreationDate field's value.
-func (s *KeyMetadata) SetCreationDate(v time.Time) *KeyMetadata {
- s.CreationDate = &v
- return s
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *KeyMetadata) SetCustomKeyStoreId(v string) *KeyMetadata {
- s.CustomKeyStoreId = &v
- return s
-}
-
-// SetCustomerMasterKeySpec sets the CustomerMasterKeySpec field's value.
-func (s *KeyMetadata) SetCustomerMasterKeySpec(v string) *KeyMetadata {
- s.CustomerMasterKeySpec = &v
- return s
-}
-
-// SetDeletionDate sets the DeletionDate field's value.
-func (s *KeyMetadata) SetDeletionDate(v time.Time) *KeyMetadata {
- s.DeletionDate = &v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *KeyMetadata) SetDescription(v string) *KeyMetadata {
- s.Description = &v
- return s
-}
-
-// SetEnabled sets the Enabled field's value.
-func (s *KeyMetadata) SetEnabled(v bool) *KeyMetadata {
- s.Enabled = &v
- return s
-}
-
-// SetEncryptionAlgorithms sets the EncryptionAlgorithms field's value.
-func (s *KeyMetadata) SetEncryptionAlgorithms(v []*string) *KeyMetadata {
- s.EncryptionAlgorithms = v
- return s
-}
-
-// SetExpirationModel sets the ExpirationModel field's value.
-func (s *KeyMetadata) SetExpirationModel(v string) *KeyMetadata {
- s.ExpirationModel = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *KeyMetadata) SetKeyId(v string) *KeyMetadata {
- s.KeyId = &v
- return s
-}
-
-// SetKeyManager sets the KeyManager field's value.
-func (s *KeyMetadata) SetKeyManager(v string) *KeyMetadata {
- s.KeyManager = &v
- return s
-}
-
-// SetKeySpec sets the KeySpec field's value.
-func (s *KeyMetadata) SetKeySpec(v string) *KeyMetadata {
- s.KeySpec = &v
- return s
-}
-
-// SetKeyState sets the KeyState field's value.
-func (s *KeyMetadata) SetKeyState(v string) *KeyMetadata {
- s.KeyState = &v
- return s
-}
-
-// SetKeyUsage sets the KeyUsage field's value.
-func (s *KeyMetadata) SetKeyUsage(v string) *KeyMetadata {
- s.KeyUsage = &v
- return s
-}
-
-// SetMultiRegion sets the MultiRegion field's value.
-func (s *KeyMetadata) SetMultiRegion(v bool) *KeyMetadata {
- s.MultiRegion = &v
- return s
-}
-
-// SetMultiRegionConfiguration sets the MultiRegionConfiguration field's value.
-func (s *KeyMetadata) SetMultiRegionConfiguration(v *MultiRegionConfiguration) *KeyMetadata {
- s.MultiRegionConfiguration = v
- return s
-}
-
-// SetOrigin sets the Origin field's value.
-func (s *KeyMetadata) SetOrigin(v string) *KeyMetadata {
- s.Origin = &v
- return s
-}
-
-// SetPendingDeletionWindowInDays sets the PendingDeletionWindowInDays field's value.
-func (s *KeyMetadata) SetPendingDeletionWindowInDays(v int64) *KeyMetadata {
- s.PendingDeletionWindowInDays = &v
- return s
-}
-
-// SetSigningAlgorithms sets the SigningAlgorithms field's value.
-func (s *KeyMetadata) SetSigningAlgorithms(v []*string) *KeyMetadata {
- s.SigningAlgorithms = v
- return s
-}
-
-// SetValidTo sets the ValidTo field's value.
-func (s *KeyMetadata) SetValidTo(v time.Time) *KeyMetadata {
- s.ValidTo = &v
- return s
-}
-
-// The request was rejected because the specified KMS key was not available.
-// You can retry the request.
-type KeyUnavailableException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KeyUnavailableException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s KeyUnavailableException) GoString() string {
- return s.String()
-}
-
-func newErrorKeyUnavailableException(v protocol.ResponseMetadata) error {
- return &KeyUnavailableException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *KeyUnavailableException) Code() string {
- return "KeyUnavailableException"
-}
-
-// Message returns the exception's message.
-func (s *KeyUnavailableException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *KeyUnavailableException) OrigErr() error {
- return nil
-}
-
-func (s *KeyUnavailableException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *KeyUnavailableException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *KeyUnavailableException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// The request was rejected because a quota was exceeded. For more information,
-// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
-// in the Key Management Service Developer Guide.
-type LimitExceededException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LimitExceededException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LimitExceededException) GoString() string {
- return s.String()
-}
-
-func newErrorLimitExceededException(v protocol.ResponseMetadata) error {
- return &LimitExceededException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *LimitExceededException) Code() string {
- return "LimitExceededException"
-}
-
-// Message returns the exception's message.
-func (s *LimitExceededException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *LimitExceededException) OrigErr() error {
- return nil
-}
-
-func (s *LimitExceededException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *LimitExceededException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *LimitExceededException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type ListAliasesInput struct {
- _ struct{} `type:"structure"`
-
- // Lists only aliases that are associated with the specified KMS key. Enter
- // a KMS key in your Amazon Web Services account.
- //
- // This parameter is optional. If you omit it, ListAliases returns all aliases
- // in the account and Region.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- KeyId *string `min:"1" type:"string"`
-
- // Use this parameter to specify the maximum number of items to return. When
- // this value is present, KMS does not return more than the specified number
- // of items, but it might return fewer.
- //
- // This value is optional. If you include a value, it must be between 1 and
- // 100, inclusive. If you do not include a value, it defaults to 50.
- Limit *int64 `min:"1" type:"integer"`
-
- // Use this parameter in a subsequent request after you receive a response with
- // truncated results. Set it to the value of NextMarker from the truncated response
- // you just received.
- Marker *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAliasesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAliasesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListAliasesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListAliasesInput"}
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.Marker != nil && len(*s.Marker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *ListAliasesInput) SetKeyId(v string) *ListAliasesInput {
- s.KeyId = &v
- return s
-}
-
-// SetLimit sets the Limit field's value.
-func (s *ListAliasesInput) SetLimit(v int64) *ListAliasesInput {
- s.Limit = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListAliasesInput) SetMarker(v string) *ListAliasesInput {
- s.Marker = &v
- return s
-}
-
-type ListAliasesOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of aliases.
- Aliases []*AliasListEntry `type:"list"`
-
- // When Truncated is true, this element is present and contains the value to
- // use for the Marker parameter in a subsequent request.
- NextMarker *string `min:"1" type:"string"`
-
- // A flag that indicates whether there are more items in the list. When this
- // value is true, the list in this response is truncated. To get more items,
- // pass the value of the NextMarker element in thisresponse to the Marker parameter
- // in a subsequent request.
- Truncated *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAliasesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAliasesOutput) GoString() string {
- return s.String()
-}
-
-// SetAliases sets the Aliases field's value.
-func (s *ListAliasesOutput) SetAliases(v []*AliasListEntry) *ListAliasesOutput {
- s.Aliases = v
- return s
-}
-
-// SetNextMarker sets the NextMarker field's value.
-func (s *ListAliasesOutput) SetNextMarker(v string) *ListAliasesOutput {
- s.NextMarker = &v
- return s
-}
-
-// SetTruncated sets the Truncated field's value.
-func (s *ListAliasesOutput) SetTruncated(v bool) *ListAliasesOutput {
- s.Truncated = &v
- return s
-}
-
-type ListGrantsInput struct {
- _ struct{} `type:"structure"`
-
- // Returns only the grant with the specified grant ID. The grant ID uniquely
- // identifies the grant.
- GrantId *string `min:"1" type:"string"`
-
- // Returns only grants where the specified principal is the grantee principal
- // for the grant.
- GranteePrincipal *string `min:"1" type:"string"`
-
- // Returns only grants for the specified KMS key. This parameter is required.
- //
- // Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different
- // Amazon Web Services account, you must use the key ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Use this parameter to specify the maximum number of items to return. When
- // this value is present, KMS does not return more than the specified number
- // of items, but it might return fewer.
- //
- // This value is optional. If you include a value, it must be between 1 and
- // 100, inclusive. If you do not include a value, it defaults to 50.
- Limit *int64 `min:"1" type:"integer"`
-
- // Use this parameter in a subsequent request after you receive a response with
- // truncated results. Set it to the value of NextMarker from the truncated response
- // you just received.
- Marker *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListGrantsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListGrantsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListGrantsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListGrantsInput"}
- if s.GrantId != nil && len(*s.GrantId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("GrantId", 1))
- }
- if s.GranteePrincipal != nil && len(*s.GranteePrincipal) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("GranteePrincipal", 1))
- }
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.Marker != nil && len(*s.Marker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantId sets the GrantId field's value.
-func (s *ListGrantsInput) SetGrantId(v string) *ListGrantsInput {
- s.GrantId = &v
- return s
-}
-
-// SetGranteePrincipal sets the GranteePrincipal field's value.
-func (s *ListGrantsInput) SetGranteePrincipal(v string) *ListGrantsInput {
- s.GranteePrincipal = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *ListGrantsInput) SetKeyId(v string) *ListGrantsInput {
- s.KeyId = &v
- return s
-}
-
-// SetLimit sets the Limit field's value.
-func (s *ListGrantsInput) SetLimit(v int64) *ListGrantsInput {
- s.Limit = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListGrantsInput) SetMarker(v string) *ListGrantsInput {
- s.Marker = &v
- return s
-}
-
-type ListGrantsResponse struct {
- _ struct{} `type:"structure"`
-
- // A list of grants.
- Grants []*GrantListEntry `type:"list"`
-
- // When Truncated is true, this element is present and contains the value to
- // use for the Marker parameter in a subsequent request.
- NextMarker *string `min:"1" type:"string"`
-
- // A flag that indicates whether there are more items in the list. When this
- // value is true, the list in this response is truncated. To get more items,
- // pass the value of the NextMarker element in thisresponse to the Marker parameter
- // in a subsequent request.
- Truncated *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListGrantsResponse) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListGrantsResponse) GoString() string {
- return s.String()
-}
-
-// SetGrants sets the Grants field's value.
-func (s *ListGrantsResponse) SetGrants(v []*GrantListEntry) *ListGrantsResponse {
- s.Grants = v
- return s
-}
-
-// SetNextMarker sets the NextMarker field's value.
-func (s *ListGrantsResponse) SetNextMarker(v string) *ListGrantsResponse {
- s.NextMarker = &v
- return s
-}
-
-// SetTruncated sets the Truncated field's value.
-func (s *ListGrantsResponse) SetTruncated(v bool) *ListGrantsResponse {
- s.Truncated = &v
- return s
-}
-
-type ListKeyPoliciesInput struct {
- _ struct{} `type:"structure"`
-
- // Gets the names of key policies for the specified KMS key.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Use this parameter to specify the maximum number of items to return. When
- // this value is present, KMS does not return more than the specified number
- // of items, but it might return fewer.
- //
- // This value is optional. If you include a value, it must be between 1 and
- // 1000, inclusive. If you do not include a value, it defaults to 100.
- //
- // Only one policy can be attached to a key.
- Limit *int64 `min:"1" type:"integer"`
-
- // Use this parameter in a subsequent request after you receive a response with
- // truncated results. Set it to the value of NextMarker from the truncated response
- // you just received.
- Marker *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListKeyPoliciesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListKeyPoliciesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListKeyPoliciesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListKeyPoliciesInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.Marker != nil && len(*s.Marker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *ListKeyPoliciesInput) SetKeyId(v string) *ListKeyPoliciesInput {
- s.KeyId = &v
- return s
-}
-
-// SetLimit sets the Limit field's value.
-func (s *ListKeyPoliciesInput) SetLimit(v int64) *ListKeyPoliciesInput {
- s.Limit = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListKeyPoliciesInput) SetMarker(v string) *ListKeyPoliciesInput {
- s.Marker = &v
- return s
-}
-
-type ListKeyPoliciesOutput struct {
- _ struct{} `type:"structure"`
-
- // When Truncated is true, this element is present and contains the value to
- // use for the Marker parameter in a subsequent request.
- NextMarker *string `min:"1" type:"string"`
-
- // A list of key policy names. The only valid value is default.
- PolicyNames []*string `type:"list"`
-
- // A flag that indicates whether there are more items in the list. When this
- // value is true, the list in this response is truncated. To get more items,
- // pass the value of the NextMarker element in thisresponse to the Marker parameter
- // in a subsequent request.
- Truncated *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListKeyPoliciesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListKeyPoliciesOutput) GoString() string {
- return s.String()
-}
-
-// SetNextMarker sets the NextMarker field's value.
-func (s *ListKeyPoliciesOutput) SetNextMarker(v string) *ListKeyPoliciesOutput {
- s.NextMarker = &v
- return s
-}
-
-// SetPolicyNames sets the PolicyNames field's value.
-func (s *ListKeyPoliciesOutput) SetPolicyNames(v []*string) *ListKeyPoliciesOutput {
- s.PolicyNames = v
- return s
-}
-
-// SetTruncated sets the Truncated field's value.
-func (s *ListKeyPoliciesOutput) SetTruncated(v bool) *ListKeyPoliciesOutput {
- s.Truncated = &v
- return s
-}
-
-type ListKeysInput struct {
- _ struct{} `type:"structure"`
-
- // Use this parameter to specify the maximum number of items to return. When
- // this value is present, KMS does not return more than the specified number
- // of items, but it might return fewer.
- //
- // This value is optional. If you include a value, it must be between 1 and
- // 1000, inclusive. If you do not include a value, it defaults to 100.
- Limit *int64 `min:"1" type:"integer"`
-
- // Use this parameter in a subsequent request after you receive a response with
- // truncated results. Set it to the value of NextMarker from the truncated response
- // you just received.
- Marker *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListKeysInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListKeysInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListKeysInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListKeysInput"}
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.Marker != nil && len(*s.Marker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetLimit sets the Limit field's value.
-func (s *ListKeysInput) SetLimit(v int64) *ListKeysInput {
- s.Limit = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListKeysInput) SetMarker(v string) *ListKeysInput {
- s.Marker = &v
- return s
-}
-
-type ListKeysOutput struct {
- _ struct{} `type:"structure"`
-
- // A list of KMS keys.
- Keys []*KeyListEntry `type:"list"`
-
- // When Truncated is true, this element is present and contains the value to
- // use for the Marker parameter in a subsequent request.
- NextMarker *string `min:"1" type:"string"`
-
- // A flag that indicates whether there are more items in the list. When this
- // value is true, the list in this response is truncated. To get more items,
- // pass the value of the NextMarker element in thisresponse to the Marker parameter
- // in a subsequent request.
- Truncated *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListKeysOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListKeysOutput) GoString() string {
- return s.String()
-}
-
-// SetKeys sets the Keys field's value.
-func (s *ListKeysOutput) SetKeys(v []*KeyListEntry) *ListKeysOutput {
- s.Keys = v
- return s
-}
-
-// SetNextMarker sets the NextMarker field's value.
-func (s *ListKeysOutput) SetNextMarker(v string) *ListKeysOutput {
- s.NextMarker = &v
- return s
-}
-
-// SetTruncated sets the Truncated field's value.
-func (s *ListKeysOutput) SetTruncated(v bool) *ListKeysOutput {
- s.Truncated = &v
- return s
-}
-
-type ListResourceTagsInput struct {
- _ struct{} `type:"structure"`
-
- // Gets tags on the specified KMS key.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Use this parameter to specify the maximum number of items to return. When
- // this value is present, KMS does not return more than the specified number
- // of items, but it might return fewer.
- //
- // This value is optional. If you include a value, it must be between 1 and
- // 50, inclusive. If you do not include a value, it defaults to 50.
- Limit *int64 `min:"1" type:"integer"`
-
- // Use this parameter in a subsequent request after you receive a response with
- // truncated results. Set it to the value of NextMarker from the truncated response
- // you just received.
- //
- // Do not attempt to construct this value. Use only the value of NextMarker
- // from the truncated response you just received.
- Marker *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListResourceTagsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListResourceTagsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListResourceTagsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListResourceTagsInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.Marker != nil && len(*s.Marker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *ListResourceTagsInput) SetKeyId(v string) *ListResourceTagsInput {
- s.KeyId = &v
- return s
-}
-
-// SetLimit sets the Limit field's value.
-func (s *ListResourceTagsInput) SetLimit(v int64) *ListResourceTagsInput {
- s.Limit = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListResourceTagsInput) SetMarker(v string) *ListResourceTagsInput {
- s.Marker = &v
- return s
-}
-
-type ListResourceTagsOutput struct {
- _ struct{} `type:"structure"`
-
- // When Truncated is true, this element is present and contains the value to
- // use for the Marker parameter in a subsequent request.
- //
- // Do not assume or infer any information from this value.
- NextMarker *string `min:"1" type:"string"`
-
- // A list of tags. Each tag consists of a tag key and a tag value.
- //
- // Tagging or untagging a KMS key can allow or deny permission to the KMS key.
- // For details, see Using ABAC in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html)
- // in the Key Management Service Developer Guide.
- Tags []*Tag `type:"list"`
-
- // A flag that indicates whether there are more items in the list. When this
- // value is true, the list in this response is truncated. To get more items,
- // pass the value of the NextMarker element in thisresponse to the Marker parameter
- // in a subsequent request.
- Truncated *bool `type:"boolean"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListResourceTagsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListResourceTagsOutput) GoString() string {
- return s.String()
-}
-
-// SetNextMarker sets the NextMarker field's value.
-func (s *ListResourceTagsOutput) SetNextMarker(v string) *ListResourceTagsOutput {
- s.NextMarker = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *ListResourceTagsOutput) SetTags(v []*Tag) *ListResourceTagsOutput {
- s.Tags = v
- return s
-}
-
-// SetTruncated sets the Truncated field's value.
-func (s *ListResourceTagsOutput) SetTruncated(v bool) *ListResourceTagsOutput {
- s.Truncated = &v
- return s
-}
-
-type ListRetirableGrantsInput struct {
- _ struct{} `type:"structure"`
-
- // Use this parameter to specify the maximum number of items to return. When
- // this value is present, KMS does not return more than the specified number
- // of items, but it might return fewer.
- //
- // This value is optional. If you include a value, it must be between 1 and
- // 100, inclusive. If you do not include a value, it defaults to 50.
- Limit *int64 `min:"1" type:"integer"`
-
- // Use this parameter in a subsequent request after you receive a response with
- // truncated results. Set it to the value of NextMarker from the truncated response
- // you just received.
- Marker *string `min:"1" type:"string"`
-
- // The retiring principal for which to list grants. Enter a principal in your
- // Amazon Web Services account.
- //
- // To specify the retiring principal, use the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // of an Amazon Web Services principal. Valid Amazon Web Services principals
- // include Amazon Web Services accounts (root), IAM users, federated users,
- // and assumed role users. For examples of the ARN syntax for specifying a principal,
- // see Amazon Web Services Identity and Access Management (IAM) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-iam)
- // in the Example ARNs section of the Amazon Web Services General Reference.
- //
- // RetiringPrincipal is a required field
- RetiringPrincipal *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListRetirableGrantsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListRetirableGrantsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListRetirableGrantsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListRetirableGrantsInput"}
- if s.Limit != nil && *s.Limit < 1 {
- invalidParams.Add(request.NewErrParamMinValue("Limit", 1))
- }
- if s.Marker != nil && len(*s.Marker) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Marker", 1))
- }
- if s.RetiringPrincipal == nil {
- invalidParams.Add(request.NewErrParamRequired("RetiringPrincipal"))
- }
- if s.RetiringPrincipal != nil && len(*s.RetiringPrincipal) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("RetiringPrincipal", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetLimit sets the Limit field's value.
-func (s *ListRetirableGrantsInput) SetLimit(v int64) *ListRetirableGrantsInput {
- s.Limit = &v
- return s
-}
-
-// SetMarker sets the Marker field's value.
-func (s *ListRetirableGrantsInput) SetMarker(v string) *ListRetirableGrantsInput {
- s.Marker = &v
- return s
-}
-
-// SetRetiringPrincipal sets the RetiringPrincipal field's value.
-func (s *ListRetirableGrantsInput) SetRetiringPrincipal(v string) *ListRetirableGrantsInput {
- s.RetiringPrincipal = &v
- return s
-}
-
-// The request was rejected because the specified policy is not syntactically
-// or semantically correct.
-type MalformedPolicyDocumentException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MalformedPolicyDocumentException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MalformedPolicyDocumentException) GoString() string {
- return s.String()
-}
-
-func newErrorMalformedPolicyDocumentException(v protocol.ResponseMetadata) error {
- return &MalformedPolicyDocumentException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *MalformedPolicyDocumentException) Code() string {
- return "MalformedPolicyDocumentException"
-}
-
-// Message returns the exception's message.
-func (s *MalformedPolicyDocumentException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *MalformedPolicyDocumentException) OrigErr() error {
- return nil
-}
-
-func (s *MalformedPolicyDocumentException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *MalformedPolicyDocumentException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *MalformedPolicyDocumentException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Describes the configuration of this multi-Region key. This field appears
-// only when the KMS key is a primary or replica of a multi-Region key.
-//
-// For more information about any listed KMS key, use the DescribeKey operation.
-type MultiRegionConfiguration struct {
- _ struct{} `type:"structure"`
-
- // Indicates whether the KMS key is a PRIMARY or REPLICA key.
- MultiRegionKeyType *string `type:"string" enum:"MultiRegionKeyType"`
-
- // Displays the key ARN and Region of the primary key. This field includes the
- // current KMS key if it is the primary key.
- PrimaryKey *MultiRegionKey `type:"structure"`
-
- // displays the key ARNs and Regions of all replica keys. This field includes
- // the current KMS key if it is a replica key.
- ReplicaKeys []*MultiRegionKey `type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MultiRegionConfiguration) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MultiRegionConfiguration) GoString() string {
- return s.String()
-}
-
-// SetMultiRegionKeyType sets the MultiRegionKeyType field's value.
-func (s *MultiRegionConfiguration) SetMultiRegionKeyType(v string) *MultiRegionConfiguration {
- s.MultiRegionKeyType = &v
- return s
-}
-
-// SetPrimaryKey sets the PrimaryKey field's value.
-func (s *MultiRegionConfiguration) SetPrimaryKey(v *MultiRegionKey) *MultiRegionConfiguration {
- s.PrimaryKey = v
- return s
-}
-
-// SetReplicaKeys sets the ReplicaKeys field's value.
-func (s *MultiRegionConfiguration) SetReplicaKeys(v []*MultiRegionKey) *MultiRegionConfiguration {
- s.ReplicaKeys = v
- return s
-}
-
-// Describes the primary or replica key in a multi-Region key.
-type MultiRegionKey struct {
- _ struct{} `type:"structure"`
-
- // Displays the key ARN of a primary or replica key of a multi-Region key.
- Arn *string `min:"20" type:"string"`
-
- // Displays the Amazon Web Services Region of a primary or replica key in a
- // multi-Region key.
- Region *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MultiRegionKey) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s MultiRegionKey) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *MultiRegionKey) SetArn(v string) *MultiRegionKey {
- s.Arn = &v
- return s
-}
-
-// SetRegion sets the Region field's value.
-func (s *MultiRegionKey) SetRegion(v string) *MultiRegionKey {
- s.Region = &v
- return s
-}
-
-// The request was rejected because the specified entity or resource could not
-// be found.
-type NotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s NotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorNotFoundException(v protocol.ResponseMetadata) error {
- return &NotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *NotFoundException) Code() string {
- return "NotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *NotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *NotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *NotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *NotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *NotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type PutKeyPolicyInput struct {
- _ struct{} `type:"structure"`
-
- // A flag to indicate whether to bypass the key policy lockout safety check.
- //
- // Setting this value to true increases the risk that the KMS key becomes unmanageable.
- // Do not set this value to true indiscriminately.
- //
- // For more information, refer to the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
- // section in the Key Management Service Developer Guide.
- //
- // Use this parameter only when you intend to prevent the principal that is
- // making the request from making a subsequent PutKeyPolicy request on the KMS
- // key.
- //
- // The default value is false.
- BypassPolicyLockoutSafetyCheck *bool `type:"boolean"`
-
- // Sets the key policy on the specified KMS key.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // The key policy to attach to the KMS key.
- //
- // The key policy must meet the following criteria:
- //
- // * If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy
- // must allow the principal that is making the PutKeyPolicy request to make
- // a subsequent PutKeyPolicy request on the KMS key. This reduces the risk
- // that the KMS key becomes unmanageable. For more information, refer to
- // the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
- // section of the Key Management Service Developer Guide.
- //
- // * Each statement in the key policy must contain one or more principals.
- // The principals in the key policy must exist and be visible to KMS. When
- // you create a new Amazon Web Services principal (for example, an IAM user
- // or role), you might need to enforce a delay before including the new principal
- // in a key policy because the new principal might not be immediately visible
- // to KMS. For more information, see Changes that I make are not always immediately
- // visible (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency)
- // in the Amazon Web Services Identity and Access Management User Guide.
- //
- // The key policy cannot exceed 32 kilobytes (32768 bytes). For more information,
- // see Resource Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/resource-limits.html)
- // in the Key Management Service Developer Guide.
- //
- // Policy is a required field
- Policy *string `min:"1" type:"string" required:"true"`
-
- // The name of the key policy. The only valid value is default.
- //
- // PolicyName is a required field
- PolicyName *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutKeyPolicyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutKeyPolicyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PutKeyPolicyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PutKeyPolicyInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Policy == nil {
- invalidParams.Add(request.NewErrParamRequired("Policy"))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.PolicyName == nil {
- invalidParams.Add(request.NewErrParamRequired("PolicyName"))
- }
- if s.PolicyName != nil && len(*s.PolicyName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBypassPolicyLockoutSafetyCheck sets the BypassPolicyLockoutSafetyCheck field's value.
-func (s *PutKeyPolicyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *PutKeyPolicyInput {
- s.BypassPolicyLockoutSafetyCheck = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *PutKeyPolicyInput) SetKeyId(v string) *PutKeyPolicyInput {
- s.KeyId = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *PutKeyPolicyInput) SetPolicy(v string) *PutKeyPolicyInput {
- s.Policy = &v
- return s
-}
-
-// SetPolicyName sets the PolicyName field's value.
-func (s *PutKeyPolicyInput) SetPolicyName(v string) *PutKeyPolicyInput {
- s.PolicyName = &v
- return s
-}
-
-type PutKeyPolicyOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutKeyPolicyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PutKeyPolicyOutput) GoString() string {
- return s.String()
-}
-
-type ReEncryptInput struct {
- _ struct{} `type:"structure"`
-
- // Ciphertext of the data to reencrypt.
- // CiphertextBlob is automatically base64 encoded/decoded by the SDK.
- //
- // CiphertextBlob is a required field
- CiphertextBlob []byte `min:"1" type:"blob" required:"true"`
-
- // Specifies the encryption algorithm that KMS will use to reecrypt the data
- // after it has decrypted it. The default value, SYMMETRIC_DEFAULT, represents
- // the encryption algorithm used for symmetric KMS keys.
- //
- // This parameter is required only when the destination KMS key is an asymmetric
- // KMS key.
- DestinationEncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`
-
- // Specifies that encryption context to use when the reencrypting the data.
- //
- // A destination encryption context is valid only when the destination KMS key
- // is a symmetric KMS key. The standard ciphertext format for asymmetric KMS
- // keys does not include fields for metadata.
- //
- // An encryption context is a collection of non-secret key-value pairs that
- // represents additional authenticated data. When you use an encryption context
- // to encrypt data, you must specify the same (an exact case-sensitive match)
- // encryption context to decrypt the data. An encryption context is optional
- // when encrypting with a symmetric KMS key, but it is highly recommended.
- //
- // For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
- // in the Key Management Service Developer Guide.
- DestinationEncryptionContext map[string]*string `type:"map"`
-
- // A unique identifier for the KMS key that is used to reencrypt the data. Specify
- // a symmetric or asymmetric KMS key with a KeyUsage value of ENCRYPT_DECRYPT.
- // To find the KeyUsage value of a KMS key, use the DescribeKey operation.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // DestinationKeyId is a required field
- DestinationKeyId *string `min:"1" type:"string" required:"true"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Specifies the encryption algorithm that KMS will use to decrypt the ciphertext
- // before it is reencrypted. The default value, SYMMETRIC_DEFAULT, represents
- // the algorithm used for symmetric KMS keys.
- //
- // Specify the same algorithm that was used to encrypt the ciphertext. If you
- // specify a different algorithm, the decrypt attempt fails.
- //
- // This parameter is required only when the ciphertext was encrypted under an
- // asymmetric KMS key.
- SourceEncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`
-
- // Specifies the encryption context to use to decrypt the ciphertext. Enter
- // the same encryption context that was used to encrypt the ciphertext.
- //
- // An encryption context is a collection of non-secret key-value pairs that
- // represents additional authenticated data. When you use an encryption context
- // to encrypt data, you must specify the same (an exact case-sensitive match)
- // encryption context to decrypt the data. An encryption context is optional
- // when encrypting with a symmetric KMS key, but it is highly recommended.
- //
- // For more information, see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context)
- // in the Key Management Service Developer Guide.
- SourceEncryptionContext map[string]*string `type:"map"`
-
- // Specifies the KMS key that KMS will use to decrypt the ciphertext before
- // it is re-encrypted. Enter a key ID of the KMS key that was used to encrypt
- // the ciphertext.
- //
- // This parameter is required only when the ciphertext was encrypted under an
- // asymmetric KMS key. If you used a symmetric KMS key, KMS can get the KMS
- // key from metadata that it adds to the symmetric ciphertext blob. However,
- // it is always recommended as a best practice. This practice ensures that you
- // use the KMS key that you intend.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- SourceKeyId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReEncryptInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReEncryptInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReEncryptInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReEncryptInput"}
- if s.CiphertextBlob == nil {
- invalidParams.Add(request.NewErrParamRequired("CiphertextBlob"))
- }
- if s.CiphertextBlob != nil && len(s.CiphertextBlob) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CiphertextBlob", 1))
- }
- if s.DestinationKeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("DestinationKeyId"))
- }
- if s.DestinationKeyId != nil && len(*s.DestinationKeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("DestinationKeyId", 1))
- }
- if s.SourceKeyId != nil && len(*s.SourceKeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("SourceKeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCiphertextBlob sets the CiphertextBlob field's value.
-func (s *ReEncryptInput) SetCiphertextBlob(v []byte) *ReEncryptInput {
- s.CiphertextBlob = v
- return s
-}
-
-// SetDestinationEncryptionAlgorithm sets the DestinationEncryptionAlgorithm field's value.
-func (s *ReEncryptInput) SetDestinationEncryptionAlgorithm(v string) *ReEncryptInput {
- s.DestinationEncryptionAlgorithm = &v
- return s
-}
-
-// SetDestinationEncryptionContext sets the DestinationEncryptionContext field's value.
-func (s *ReEncryptInput) SetDestinationEncryptionContext(v map[string]*string) *ReEncryptInput {
- s.DestinationEncryptionContext = v
- return s
-}
-
-// SetDestinationKeyId sets the DestinationKeyId field's value.
-func (s *ReEncryptInput) SetDestinationKeyId(v string) *ReEncryptInput {
- s.DestinationKeyId = &v
- return s
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *ReEncryptInput) SetGrantTokens(v []*string) *ReEncryptInput {
- s.GrantTokens = v
- return s
-}
-
-// SetSourceEncryptionAlgorithm sets the SourceEncryptionAlgorithm field's value.
-func (s *ReEncryptInput) SetSourceEncryptionAlgorithm(v string) *ReEncryptInput {
- s.SourceEncryptionAlgorithm = &v
- return s
-}
-
-// SetSourceEncryptionContext sets the SourceEncryptionContext field's value.
-func (s *ReEncryptInput) SetSourceEncryptionContext(v map[string]*string) *ReEncryptInput {
- s.SourceEncryptionContext = v
- return s
-}
-
-// SetSourceKeyId sets the SourceKeyId field's value.
-func (s *ReEncryptInput) SetSourceKeyId(v string) *ReEncryptInput {
- s.SourceKeyId = &v
- return s
-}
-
-type ReEncryptOutput struct {
- _ struct{} `type:"structure"`
-
- // The reencrypted data. When you use the HTTP API or the Amazon Web Services
- // CLI, the value is Base64-encoded. Otherwise, it is not Base64-encoded.
- // CiphertextBlob is automatically base64 encoded/decoded by the SDK.
- CiphertextBlob []byte `min:"1" type:"blob"`
-
- // The encryption algorithm that was used to reencrypt the data.
- DestinationEncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key that was used to reencrypt the data.
- KeyId *string `min:"1" type:"string"`
-
- // The encryption algorithm that was used to decrypt the ciphertext before it
- // was reencrypted.
- SourceEncryptionAlgorithm *string `type:"string" enum:"EncryptionAlgorithmSpec"`
-
- // Unique identifier of the KMS key used to originally encrypt the data.
- SourceKeyId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReEncryptOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReEncryptOutput) GoString() string {
- return s.String()
-}
-
-// SetCiphertextBlob sets the CiphertextBlob field's value.
-func (s *ReEncryptOutput) SetCiphertextBlob(v []byte) *ReEncryptOutput {
- s.CiphertextBlob = v
- return s
-}
-
-// SetDestinationEncryptionAlgorithm sets the DestinationEncryptionAlgorithm field's value.
-func (s *ReEncryptOutput) SetDestinationEncryptionAlgorithm(v string) *ReEncryptOutput {
- s.DestinationEncryptionAlgorithm = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *ReEncryptOutput) SetKeyId(v string) *ReEncryptOutput {
- s.KeyId = &v
- return s
-}
-
-// SetSourceEncryptionAlgorithm sets the SourceEncryptionAlgorithm field's value.
-func (s *ReEncryptOutput) SetSourceEncryptionAlgorithm(v string) *ReEncryptOutput {
- s.SourceEncryptionAlgorithm = &v
- return s
-}
-
-// SetSourceKeyId sets the SourceKeyId field's value.
-func (s *ReEncryptOutput) SetSourceKeyId(v string) *ReEncryptOutput {
- s.SourceKeyId = &v
- return s
-}
-
-type ReplicateKeyInput struct {
- _ struct{} `type:"structure"`
-
- // A flag to indicate whether to bypass the key policy lockout safety check.
- //
- // Setting this value to true increases the risk that the KMS key becomes unmanageable.
- // Do not set this value to true indiscriminately.
- //
- // For more information, refer to the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
- // section in the Key Management Service Developer Guide.
- //
- // Use this parameter only when you intend to prevent the principal that is
- // making the request from making a subsequent PutKeyPolicy request on the KMS
- // key.
- //
- // The default value is false.
- BypassPolicyLockoutSafetyCheck *bool `type:"boolean"`
-
- // A description of the KMS key. The default value is an empty string (no description).
- //
- // The description is not a shared property of multi-Region keys. You can specify
- // the same description or a different description for each key in a set of
- // related multi-Region keys. KMS does not synchronize this property.
- Description *string `type:"string"`
-
- // Identifies the multi-Region primary key that is being replicated. To determine
- // whether a KMS key is a multi-Region primary key, use the DescribeKey operation
- // to check the value of the MultiRegionKeyType property.
- //
- // Specify the key ID or key ARN of a multi-Region primary key.
- //
- // For example:
- //
- // * Key ID: mrk-1234abcd12ab34cd56ef1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // The key policy to attach to the KMS key. This parameter is optional. If you
- // do not provide a key policy, KMS attaches the default key policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default)
- // to the KMS key.
- //
- // The key policy is not a shared property of multi-Region keys. You can specify
- // the same key policy or a different key policy for each key in a set of related
- // multi-Region keys. KMS does not synchronize this property.
- //
- // If you provide a key policy, it must meet the following criteria:
- //
- // * If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy
- // must give the caller kms:PutKeyPolicy permission on the replica key. This
- // reduces the risk that the KMS key becomes unmanageable. For more information,
- // refer to the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam)
- // section of the Key Management Service Developer Guide .
- //
- // * Each statement in the key policy must contain one or more principals.
- // The principals in the key policy must exist and be visible to KMS. When
- // you create a new Amazon Web Services principal (for example, an IAM user
- // or role), you might need to enforce a delay before including the new principal
- // in a key policy because the new principal might not be immediately visible
- // to KMS. For more information, see Changes that I make are not always immediately
- // visible (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency)
- // in the Identity and Access Management User Guide .
- //
- // * The key policy size quota is 32 kilobytes (32768 bytes).
- Policy *string `min:"1" type:"string"`
-
- // The Region ID of the Amazon Web Services Region for this replica key.
- //
- // Enter the Region ID, such as us-east-1 or ap-southeast-2. For a list of Amazon
- // Web Services Regions in which KMS is supported, see KMS service endpoints
- // (https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region) in the
- // Amazon Web Services General Reference.
- //
- // The replica must be in a different Amazon Web Services Region than its primary
- // key and other replicas of that primary key, but in the same Amazon Web Services
- // partition. KMS must be available in the replica Region. If the Region is
- // not enabled by default, the Amazon Web Services account must be enabled in
- // the Region.
- //
- // For information about Amazon Web Services partitions, see Amazon Resource
- // Names (ARNs) in the Amazon Web Services General Reference. (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // For information about enabling and disabling Regions, see Enabling a Region
- // (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable)
- // and Disabling a Region (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-disable)
- // in the Amazon Web Services General Reference.
- //
- // ReplicaRegion is a required field
- ReplicaRegion *string `min:"1" type:"string" required:"true"`
-
- // Assigns one or more tags to the replica key. Use this parameter to tag the
- // KMS key when it is created. To tag an existing KMS key, use the TagResource
- // operation.
- //
- // Tagging or untagging a KMS key can allow or deny permission to the KMS key.
- // For details, see Using ABAC in KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html)
- // in the Key Management Service Developer Guide.
- //
- // To use this parameter, you must have kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html)
- // permission in an IAM policy.
- //
- // Tags are not a shared property of multi-Region keys. You can specify the
- // same tags or different tags for each key in a set of related multi-Region
- // keys. KMS does not synchronize this property.
- //
- // Each tag consists of a tag key and a tag value. Both the tag key and the
- // tag value are required, but the tag value can be an empty (null) string.
- // You cannot have more than one tag on a KMS key with the same tag key. If
- // you specify an existing tag key with a different tag value, KMS replaces
- // the current tag value with the specified one.
- //
- // When you add tags to an Amazon Web Services resource, Amazon Web Services
- // generates a cost allocation report with usage and costs aggregated by tags.
- // Tags can also be used to control access to a KMS key. For details, see Tagging
- // Keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html).
- Tags []*Tag `type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicateKeyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicateKeyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ReplicateKeyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ReplicateKeyInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.ReplicaRegion == nil {
- invalidParams.Add(request.NewErrParamRequired("ReplicaRegion"))
- }
- if s.ReplicaRegion != nil && len(*s.ReplicaRegion) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("ReplicaRegion", 1))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetBypassPolicyLockoutSafetyCheck sets the BypassPolicyLockoutSafetyCheck field's value.
-func (s *ReplicateKeyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *ReplicateKeyInput {
- s.BypassPolicyLockoutSafetyCheck = &v
- return s
-}
-
-// SetDescription sets the Description field's value.
-func (s *ReplicateKeyInput) SetDescription(v string) *ReplicateKeyInput {
- s.Description = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *ReplicateKeyInput) SetKeyId(v string) *ReplicateKeyInput {
- s.KeyId = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *ReplicateKeyInput) SetPolicy(v string) *ReplicateKeyInput {
- s.Policy = &v
- return s
-}
-
-// SetReplicaRegion sets the ReplicaRegion field's value.
-func (s *ReplicateKeyInput) SetReplicaRegion(v string) *ReplicateKeyInput {
- s.ReplicaRegion = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *ReplicateKeyInput) SetTags(v []*Tag) *ReplicateKeyInput {
- s.Tags = v
- return s
-}
-
-type ReplicateKeyOutput struct {
- _ struct{} `type:"structure"`
-
- // Displays details about the new replica key, including its Amazon Resource
- // Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // and key state (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html).
- // It also includes the ARN and Amazon Web Services Region of its primary key
- // and other replica keys.
- ReplicaKeyMetadata *KeyMetadata `type:"structure"`
-
- // The key policy of the new replica key. The value is a key policy document
- // in JSON format.
- ReplicaPolicy *string `min:"1" type:"string"`
-
- // The tags on the new replica key. The value is a list of tag key and tag value
- // pairs.
- ReplicaTags []*Tag `type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicateKeyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ReplicateKeyOutput) GoString() string {
- return s.String()
-}
-
-// SetReplicaKeyMetadata sets the ReplicaKeyMetadata field's value.
-func (s *ReplicateKeyOutput) SetReplicaKeyMetadata(v *KeyMetadata) *ReplicateKeyOutput {
- s.ReplicaKeyMetadata = v
- return s
-}
-
-// SetReplicaPolicy sets the ReplicaPolicy field's value.
-func (s *ReplicateKeyOutput) SetReplicaPolicy(v string) *ReplicateKeyOutput {
- s.ReplicaPolicy = &v
- return s
-}
-
-// SetReplicaTags sets the ReplicaTags field's value.
-func (s *ReplicateKeyOutput) SetReplicaTags(v []*Tag) *ReplicateKeyOutput {
- s.ReplicaTags = v
- return s
-}
-
-type RetireGrantInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the grant to retire. To get the grant ID, use CreateGrant, ListGrants,
- // or ListRetirableGrants.
- //
- // * Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123
- GrantId *string `min:"1" type:"string"`
-
- // Identifies the grant to be retired. You can use a grant token to identify
- // a new grant even before it has achieved eventual consistency.
- //
- // Only the CreateGrant operation returns a grant token. For details, see Grant
- // token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Eventual consistency (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency)
- // in the Key Management Service Developer Guide.
- GrantToken *string `min:"1" type:"string"`
-
- // The key ARN KMS key associated with the grant. To find the key ARN, use the
- // ListKeys operation.
- //
- // For example: arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab
- KeyId *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RetireGrantInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RetireGrantInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RetireGrantInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RetireGrantInput"}
- if s.GrantId != nil && len(*s.GrantId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("GrantId", 1))
- }
- if s.GrantToken != nil && len(*s.GrantToken) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("GrantToken", 1))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantId sets the GrantId field's value.
-func (s *RetireGrantInput) SetGrantId(v string) *RetireGrantInput {
- s.GrantId = &v
- return s
-}
-
-// SetGrantToken sets the GrantToken field's value.
-func (s *RetireGrantInput) SetGrantToken(v string) *RetireGrantInput {
- s.GrantToken = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *RetireGrantInput) SetKeyId(v string) *RetireGrantInput {
- s.KeyId = &v
- return s
-}
-
-type RetireGrantOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RetireGrantOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RetireGrantOutput) GoString() string {
- return s.String()
-}
-
-type RevokeGrantInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the grant to revoke. To get the grant ID, use CreateGrant, ListGrants,
- // or ListRetirableGrants.
- //
- // GrantId is a required field
- GrantId *string `min:"1" type:"string" required:"true"`
-
- // A unique identifier for the KMS key associated with the grant. To get the
- // key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // Specify the key ID or key ARN of the KMS key. To specify a KMS key in a different
- // Amazon Web Services account, you must use the key ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RevokeGrantInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RevokeGrantInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *RevokeGrantInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "RevokeGrantInput"}
- if s.GrantId == nil {
- invalidParams.Add(request.NewErrParamRequired("GrantId"))
- }
- if s.GrantId != nil && len(*s.GrantId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("GrantId", 1))
- }
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantId sets the GrantId field's value.
-func (s *RevokeGrantInput) SetGrantId(v string) *RevokeGrantInput {
- s.GrantId = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *RevokeGrantInput) SetKeyId(v string) *RevokeGrantInput {
- s.KeyId = &v
- return s
-}
-
-type RevokeGrantOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RevokeGrantOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RevokeGrantOutput) GoString() string {
- return s.String()
-}
-
-type ScheduleKeyDeletionInput struct {
- _ struct{} `type:"structure"`
-
- // The unique identifier of the KMS key to delete.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // The waiting period, specified in number of days. After the waiting period
- // ends, KMS deletes the KMS key.
- //
- // If the KMS key is a multi-Region primary key with replicas, the waiting period
- // begins when the last of its replica keys is deleted. Otherwise, the waiting
- // period begins immediately.
- //
- // This value is optional. If you include a value, it must be between 7 and
- // 30, inclusive. If you do not include a value, it defaults to 30.
- PendingWindowInDays *int64 `min:"1" type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ScheduleKeyDeletionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ScheduleKeyDeletionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ScheduleKeyDeletionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ScheduleKeyDeletionInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.PendingWindowInDays != nil && *s.PendingWindowInDays < 1 {
- invalidParams.Add(request.NewErrParamMinValue("PendingWindowInDays", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *ScheduleKeyDeletionInput) SetKeyId(v string) *ScheduleKeyDeletionInput {
- s.KeyId = &v
- return s
-}
-
-// SetPendingWindowInDays sets the PendingWindowInDays field's value.
-func (s *ScheduleKeyDeletionInput) SetPendingWindowInDays(v int64) *ScheduleKeyDeletionInput {
- s.PendingWindowInDays = &v
- return s
-}
-
-type ScheduleKeyDeletionOutput struct {
- _ struct{} `type:"structure"`
-
- // The date and time after which KMS deletes the KMS key.
- //
- // If the KMS key is a multi-Region primary key with replica keys, this field
- // does not appear. The deletion date for the primary key isn't known until
- // its last replica key is deleted.
- DeletionDate *time.Time `type:"timestamp"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the KMS key whose deletion is scheduled.
- KeyId *string `min:"1" type:"string"`
-
- // The current status of the KMS key.
- //
- // For more information about how key state affects the use of a KMS key, see
- // Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
- // in the Key Management Service Developer Guide.
- KeyState *string `type:"string" enum:"KeyState"`
-
- // The waiting period before the KMS key is deleted.
- //
- // If the KMS key is a multi-Region primary key with replicas, the waiting period
- // begins when the last of its replica keys is deleted. Otherwise, the waiting
- // period begins immediately.
- PendingWindowInDays *int64 `min:"1" type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ScheduleKeyDeletionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ScheduleKeyDeletionOutput) GoString() string {
- return s.String()
-}
-
-// SetDeletionDate sets the DeletionDate field's value.
-func (s *ScheduleKeyDeletionOutput) SetDeletionDate(v time.Time) *ScheduleKeyDeletionOutput {
- s.DeletionDate = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *ScheduleKeyDeletionOutput) SetKeyId(v string) *ScheduleKeyDeletionOutput {
- s.KeyId = &v
- return s
-}
-
-// SetKeyState sets the KeyState field's value.
-func (s *ScheduleKeyDeletionOutput) SetKeyState(v string) *ScheduleKeyDeletionOutput {
- s.KeyState = &v
- return s
-}
-
-// SetPendingWindowInDays sets the PendingWindowInDays field's value.
-func (s *ScheduleKeyDeletionOutput) SetPendingWindowInDays(v int64) *ScheduleKeyDeletionOutput {
- s.PendingWindowInDays = &v
- return s
-}
-
-type SignInput struct {
- _ struct{} `type:"structure"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Identifies an asymmetric KMS key. KMS uses the private key in the asymmetric
- // KMS key to sign the message. The KeyUsage type of the KMS key must be SIGN_VERIFY.
- // To find the KeyUsage of a KMS key, use the DescribeKey operation.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Specifies the message or message digest to sign. Messages can be 0-4096 bytes.
- // To sign a larger message, provide the message digest.
- //
- // If you provide a message, KMS generates a hash digest of the message and
- // then signs it.
- //
- // Message is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by SignInput's
- // String and GoString methods.
- //
- // Message is automatically base64 encoded/decoded by the SDK.
- //
- // Message is a required field
- Message []byte `min:"1" type:"blob" required:"true" sensitive:"true"`
-
- // Tells KMS whether the value of the Message parameter is a message or message
- // digest. The default value, RAW, indicates a message. To indicate a message
- // digest, enter DIGEST.
- MessageType *string `type:"string" enum:"MessageType"`
-
- // Specifies the signing algorithm to use when signing the message.
- //
- // Choose an algorithm that is compatible with the type and size of the specified
- // asymmetric KMS key.
- //
- // SigningAlgorithm is a required field
- SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithmSpec"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SignInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SignInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *SignInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "SignInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Message == nil {
- invalidParams.Add(request.NewErrParamRequired("Message"))
- }
- if s.Message != nil && len(s.Message) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Message", 1))
- }
- if s.SigningAlgorithm == nil {
- invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *SignInput) SetGrantTokens(v []*string) *SignInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *SignInput) SetKeyId(v string) *SignInput {
- s.KeyId = &v
- return s
-}
-
-// SetMessage sets the Message field's value.
-func (s *SignInput) SetMessage(v []byte) *SignInput {
- s.Message = v
- return s
-}
-
-// SetMessageType sets the MessageType field's value.
-func (s *SignInput) SetMessageType(v string) *SignInput {
- s.MessageType = &v
- return s
-}
-
-// SetSigningAlgorithm sets the SigningAlgorithm field's value.
-func (s *SignInput) SetSigningAlgorithm(v string) *SignInput {
- s.SigningAlgorithm = &v
- return s
-}
-
-type SignOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the asymmetric KMS key that was used to sign the message.
- KeyId *string `min:"1" type:"string"`
-
- // The cryptographic signature that was generated for the message.
- //
- // * When used with the supported RSA signing algorithms, the encoding of
- // this value is defined by PKCS #1 in RFC 8017 (https://tools.ietf.org/html/rfc8017).
- //
- // * When used with the ECDSA_SHA_256, ECDSA_SHA_384, or ECDSA_SHA_512 signing
- // algorithms, this value is a DER-encoded object as defined by ANS X9.62–2005
- // and RFC 3279 Section 2.2.3 (https://tools.ietf.org/html/rfc3279#section-2.2.3).
- // This is the most commonly used signature format and is appropriate for
- // most uses.
- //
- // When you use the HTTP API or the Amazon Web Services CLI, the value is Base64-encoded.
- // Otherwise, it is not Base64-encoded.
- // Signature is automatically base64 encoded/decoded by the SDK.
- Signature []byte `min:"1" type:"blob"`
-
- // The signing algorithm that was used to sign the message.
- SigningAlgorithm *string `type:"string" enum:"SigningAlgorithmSpec"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SignOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s SignOutput) GoString() string {
- return s.String()
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *SignOutput) SetKeyId(v string) *SignOutput {
- s.KeyId = &v
- return s
-}
-
-// SetSignature sets the Signature field's value.
-func (s *SignOutput) SetSignature(v []byte) *SignOutput {
- s.Signature = v
- return s
-}
-
-// SetSigningAlgorithm sets the SigningAlgorithm field's value.
-func (s *SignOutput) SetSigningAlgorithm(v string) *SignOutput {
- s.SigningAlgorithm = &v
- return s
-}
-
-// A key-value pair. A tag consists of a tag key and a tag value. Tag keys and
-// tag values are both required, but tag values can be empty (null) strings.
-//
-// For information about the rules that apply to tag keys and tag values, see
-// User-Defined Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html)
-// in the Amazon Web Services Billing and Cost Management User Guide.
-type Tag struct {
- _ struct{} `type:"structure"`
-
- // The key of the tag.
- //
- // TagKey is a required field
- TagKey *string `min:"1" type:"string" required:"true"`
-
- // The value of the tag.
- //
- // TagValue is a required field
- TagValue *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tag) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Tag) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tag"}
- if s.TagKey == nil {
- invalidParams.Add(request.NewErrParamRequired("TagKey"))
- }
- if s.TagKey != nil && len(*s.TagKey) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TagKey", 1))
- }
- if s.TagValue == nil {
- invalidParams.Add(request.NewErrParamRequired("TagValue"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetTagKey sets the TagKey field's value.
-func (s *Tag) SetTagKey(v string) *Tag {
- s.TagKey = &v
- return s
-}
-
-// SetTagValue sets the TagValue field's value.
-func (s *Tag) SetTagValue(v string) *Tag {
- s.TagValue = &v
- return s
-}
-
-// The request was rejected because one or more tags are not valid.
-type TagException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TagException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TagException) GoString() string {
- return s.String()
-}
-
-func newErrorTagException(v protocol.ResponseMetadata) error {
- return &TagException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *TagException) Code() string {
- return "TagException"
-}
-
-// Message returns the exception's message.
-func (s *TagException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *TagException) OrigErr() error {
- return nil
-}
-
-func (s *TagException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *TagException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *TagException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type TagResourceInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies a customer managed key in the account and Region.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // One or more tags.
- //
- // Each tag consists of a tag key and a tag value. The tag value can be an empty
- // (null) string.
- //
- // You cannot have more than one tag on a KMS key with the same tag key. If
- // you specify an existing tag key with a different tag value, KMS replaces
- // the current tag value with the specified one.
- //
- // Tags is a required field
- Tags []*Tag `type:"list" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TagResourceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TagResourceInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *TagResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Tags == nil {
- invalidParams.Add(request.NewErrParamRequired("Tags"))
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *TagResourceInput) SetKeyId(v string) *TagResourceInput {
- s.KeyId = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput {
- s.Tags = v
- return s
-}
-
-type TagResourceOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TagResourceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TagResourceOutput) GoString() string {
- return s.String()
-}
-
-// The request was rejected because a specified parameter is not supported or
-// a specified resource is not valid for this operation.
-type UnsupportedOperationException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UnsupportedOperationException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UnsupportedOperationException) GoString() string {
- return s.String()
-}
-
-func newErrorUnsupportedOperationException(v protocol.ResponseMetadata) error {
- return &UnsupportedOperationException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *UnsupportedOperationException) Code() string {
- return "UnsupportedOperationException"
-}
-
-// Message returns the exception's message.
-func (s *UnsupportedOperationException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *UnsupportedOperationException) OrigErr() error {
- return nil
-}
-
-func (s *UnsupportedOperationException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *UnsupportedOperationException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *UnsupportedOperationException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type UntagResourceInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the KMS key from which you are removing tags.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // One or more tag keys. Specify only the tag keys, not the tag values.
- //
- // TagKeys is a required field
- TagKeys []*string `type:"list" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UntagResourceInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UntagResourceInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UntagResourceInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.TagKeys == nil {
- invalidParams.Add(request.NewErrParamRequired("TagKeys"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *UntagResourceInput) SetKeyId(v string) *UntagResourceInput {
- s.KeyId = &v
- return s
-}
-
-// SetTagKeys sets the TagKeys field's value.
-func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
- s.TagKeys = v
- return s
-}
-
-type UntagResourceOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UntagResourceOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UntagResourceOutput) GoString() string {
- return s.String()
-}
-
-type UpdateAliasInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the alias that is changing its KMS key. This value must begin
- // with alias/ followed by the alias name, such as alias/ExampleAlias. You cannot
- // use UpdateAlias to change the alias name.
- //
- // AliasName is a required field
- AliasName *string `min:"1" type:"string" required:"true"`
-
- // Identifies the customer managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk)
- // to associate with the alias. You don't have permission to associate an alias
- // with an Amazon Web Services managed key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk).
- //
- // The KMS key must be in the same Amazon Web Services account and Region as
- // the alias. Also, the new target KMS key must be the same type as the current
- // target KMS key (both symmetric or both asymmetric) and they must have the
- // same key usage.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // To verify that the alias is mapped to the correct KMS key, use ListAliases.
- //
- // TargetKeyId is a required field
- TargetKeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateAliasInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateAliasInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UpdateAliasInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateAliasInput"}
- if s.AliasName == nil {
- invalidParams.Add(request.NewErrParamRequired("AliasName"))
- }
- if s.AliasName != nil && len(*s.AliasName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("AliasName", 1))
- }
- if s.TargetKeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("TargetKeyId"))
- }
- if s.TargetKeyId != nil && len(*s.TargetKeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("TargetKeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAliasName sets the AliasName field's value.
-func (s *UpdateAliasInput) SetAliasName(v string) *UpdateAliasInput {
- s.AliasName = &v
- return s
-}
-
-// SetTargetKeyId sets the TargetKeyId field's value.
-func (s *UpdateAliasInput) SetTargetKeyId(v string) *UpdateAliasInput {
- s.TargetKeyId = &v
- return s
-}
-
-type UpdateAliasOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateAliasOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateAliasOutput) GoString() string {
- return s.String()
-}
-
-type UpdateCustomKeyStoreInput struct {
- _ struct{} `type:"structure"`
-
- // Associates the custom key store with a related CloudHSM cluster.
- //
- // Enter the cluster ID of the cluster that you used to create the custom key
- // store or a cluster that shares a backup history and has the same cluster
- // certificate as the original cluster. You cannot use this parameter to associate
- // a custom key store with an unrelated cluster. In addition, the replacement
- // cluster must fulfill the requirements (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore)
- // for a cluster associated with a custom key store. To view the cluster certificate
- // of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
- // operation.
- CloudHsmClusterId *string `min:"19" type:"string"`
-
- // Identifies the custom key store that you want to update. Enter the ID of
- // the custom key store. To find the ID of a custom key store, use the DescribeCustomKeyStores
- // operation.
- //
- // CustomKeyStoreId is a required field
- CustomKeyStoreId *string `min:"1" type:"string" required:"true"`
-
- // Enter the current password of the kmsuser crypto user (CU) in the CloudHSM
- // cluster that is associated with the custom key store.
- //
- // This parameter tells KMS the current password of the kmsuser crypto user
- // (CU). It does not set or change the password of any users in the CloudHSM
- // cluster.
- //
- // KeyStorePassword is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by UpdateCustomKeyStoreInput's
- // String and GoString methods.
- KeyStorePassword *string `min:"7" type:"string" sensitive:"true"`
-
- // Changes the friendly name of the custom key store to the value that you specify.
- // The custom key store name must be unique in the Amazon Web Services account.
- NewCustomKeyStoreName *string `min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateCustomKeyStoreInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateCustomKeyStoreInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UpdateCustomKeyStoreInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateCustomKeyStoreInput"}
- if s.CloudHsmClusterId != nil && len(*s.CloudHsmClusterId) < 19 {
- invalidParams.Add(request.NewErrParamMinLen("CloudHsmClusterId", 19))
- }
- if s.CustomKeyStoreId == nil {
- invalidParams.Add(request.NewErrParamRequired("CustomKeyStoreId"))
- }
- if s.CustomKeyStoreId != nil && len(*s.CustomKeyStoreId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("CustomKeyStoreId", 1))
- }
- if s.KeyStorePassword != nil && len(*s.KeyStorePassword) < 7 {
- invalidParams.Add(request.NewErrParamMinLen("KeyStorePassword", 7))
- }
- if s.NewCustomKeyStoreName != nil && len(*s.NewCustomKeyStoreName) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("NewCustomKeyStoreName", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetCloudHsmClusterId sets the CloudHsmClusterId field's value.
-func (s *UpdateCustomKeyStoreInput) SetCloudHsmClusterId(v string) *UpdateCustomKeyStoreInput {
- s.CloudHsmClusterId = &v
- return s
-}
-
-// SetCustomKeyStoreId sets the CustomKeyStoreId field's value.
-func (s *UpdateCustomKeyStoreInput) SetCustomKeyStoreId(v string) *UpdateCustomKeyStoreInput {
- s.CustomKeyStoreId = &v
- return s
-}
-
-// SetKeyStorePassword sets the KeyStorePassword field's value.
-func (s *UpdateCustomKeyStoreInput) SetKeyStorePassword(v string) *UpdateCustomKeyStoreInput {
- s.KeyStorePassword = &v
- return s
-}
-
-// SetNewCustomKeyStoreName sets the NewCustomKeyStoreName field's value.
-func (s *UpdateCustomKeyStoreInput) SetNewCustomKeyStoreName(v string) *UpdateCustomKeyStoreInput {
- s.NewCustomKeyStoreName = &v
- return s
-}
-
-type UpdateCustomKeyStoreOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateCustomKeyStoreOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateCustomKeyStoreOutput) GoString() string {
- return s.String()
-}
-
-type UpdateKeyDescriptionInput struct {
- _ struct{} `type:"structure"`
-
- // New description for the KMS key.
- //
- // Description is a required field
- Description *string `type:"string" required:"true"`
-
- // Updates the description of the specified KMS key.
- //
- // Specify the key ID or key ARN of the KMS key.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateKeyDescriptionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateKeyDescriptionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UpdateKeyDescriptionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdateKeyDescriptionInput"}
- if s.Description == nil {
- invalidParams.Add(request.NewErrParamRequired("Description"))
- }
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDescription sets the Description field's value.
-func (s *UpdateKeyDescriptionInput) SetDescription(v string) *UpdateKeyDescriptionInput {
- s.Description = &v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *UpdateKeyDescriptionInput) SetKeyId(v string) *UpdateKeyDescriptionInput {
- s.KeyId = &v
- return s
-}
-
-type UpdateKeyDescriptionOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateKeyDescriptionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdateKeyDescriptionOutput) GoString() string {
- return s.String()
-}
-
-type UpdatePrimaryRegionInput struct {
- _ struct{} `type:"structure"`
-
- // Identifies the current primary key. When the operation completes, this KMS
- // key will be a replica key.
- //
- // Specify the key ID or key ARN of a multi-Region primary key.
- //
- // For example:
- //
- // * Key ID: mrk-1234abcd12ab34cd56ef1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // The Amazon Web Services Region of the new primary key. Enter the Region ID,
- // such as us-east-1 or ap-southeast-2. There must be an existing replica key
- // in this Region.
- //
- // When the operation completes, the multi-Region key in this Region will be
- // the primary key.
- //
- // PrimaryRegion is a required field
- PrimaryRegion *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdatePrimaryRegionInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdatePrimaryRegionInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *UpdatePrimaryRegionInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "UpdatePrimaryRegionInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.PrimaryRegion == nil {
- invalidParams.Add(request.NewErrParamRequired("PrimaryRegion"))
- }
- if s.PrimaryRegion != nil && len(*s.PrimaryRegion) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("PrimaryRegion", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *UpdatePrimaryRegionInput) SetKeyId(v string) *UpdatePrimaryRegionInput {
- s.KeyId = &v
- return s
-}
-
-// SetPrimaryRegion sets the PrimaryRegion field's value.
-func (s *UpdatePrimaryRegionInput) SetPrimaryRegion(v string) *UpdatePrimaryRegionInput {
- s.PrimaryRegion = &v
- return s
-}
-
-type UpdatePrimaryRegionOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdatePrimaryRegionOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UpdatePrimaryRegionOutput) GoString() string {
- return s.String()
-}
-
-type VerifyInput struct {
- _ struct{} `type:"structure"`
-
- // A list of grant tokens.
- //
- // Use a grant token when your permission to call this operation comes from
- // a new grant that has not yet achieved eventual consistency. For more information,
- // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token)
- // and Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token)
- // in the Key Management Service Developer Guide.
- GrantTokens []*string `type:"list"`
-
- // Identifies the asymmetric KMS key that will be used to verify the signature.
- // This must be the same KMS key that was used to generate the signature. If
- // you specify a different KMS key, the signature verification fails.
- //
- // To specify a KMS key, use its key ID, key ARN, alias name, or alias ARN.
- // When using an alias name, prefix it with "alias/". To specify a KMS key in
- // a different Amazon Web Services account, you must use the key ARN or alias
- // ARN.
- //
- // For example:
- //
- // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab
- //
- // * Alias name: alias/ExampleAlias
- //
- // * Alias ARN: arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias
- //
- // To get the key ID and key ARN for a KMS key, use ListKeys or DescribeKey.
- // To get the alias name and alias ARN, use ListAliases.
- //
- // KeyId is a required field
- KeyId *string `min:"1" type:"string" required:"true"`
-
- // Specifies the message that was signed. You can submit a raw message of up
- // to 4096 bytes, or a hash digest of the message. If you submit a digest, use
- // the MessageType parameter with a value of DIGEST.
- //
- // If the message specified here is different from the message that was signed,
- // the signature verification fails. A message and its hash digest are considered
- // to be the same message.
- //
- // Message is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by VerifyInput's
- // String and GoString methods.
- //
- // Message is automatically base64 encoded/decoded by the SDK.
- //
- // Message is a required field
- Message []byte `min:"1" type:"blob" required:"true" sensitive:"true"`
-
- // Tells KMS whether the value of the Message parameter is a message or message
- // digest. The default value, RAW, indicates a message. To indicate a message
- // digest, enter DIGEST.
- //
- // Use the DIGEST value only when the value of the Message parameter is a message
- // digest. If you use the DIGEST value with a raw message, the security of the
- // verification operation can be compromised.
- MessageType *string `type:"string" enum:"MessageType"`
-
- // The signature that the Sign operation generated.
- // Signature is automatically base64 encoded/decoded by the SDK.
- //
- // Signature is a required field
- Signature []byte `min:"1" type:"blob" required:"true"`
-
- // The signing algorithm that was used to sign the message. If you submit a
- // different algorithm, the signature verification fails.
- //
- // SigningAlgorithm is a required field
- SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithmSpec"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s VerifyInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s VerifyInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *VerifyInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "VerifyInput"}
- if s.KeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("KeyId"))
- }
- if s.KeyId != nil && len(*s.KeyId) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("KeyId", 1))
- }
- if s.Message == nil {
- invalidParams.Add(request.NewErrParamRequired("Message"))
- }
- if s.Message != nil && len(s.Message) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Message", 1))
- }
- if s.Signature == nil {
- invalidParams.Add(request.NewErrParamRequired("Signature"))
- }
- if s.Signature != nil && len(s.Signature) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Signature", 1))
- }
- if s.SigningAlgorithm == nil {
- invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetGrantTokens sets the GrantTokens field's value.
-func (s *VerifyInput) SetGrantTokens(v []*string) *VerifyInput {
- s.GrantTokens = v
- return s
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *VerifyInput) SetKeyId(v string) *VerifyInput {
- s.KeyId = &v
- return s
-}
-
-// SetMessage sets the Message field's value.
-func (s *VerifyInput) SetMessage(v []byte) *VerifyInput {
- s.Message = v
- return s
-}
-
-// SetMessageType sets the MessageType field's value.
-func (s *VerifyInput) SetMessageType(v string) *VerifyInput {
- s.MessageType = &v
- return s
-}
-
-// SetSignature sets the Signature field's value.
-func (s *VerifyInput) SetSignature(v []byte) *VerifyInput {
- s.Signature = v
- return s
-}
-
-// SetSigningAlgorithm sets the SigningAlgorithm field's value.
-func (s *VerifyInput) SetSigningAlgorithm(v string) *VerifyInput {
- s.SigningAlgorithm = &v
- return s
-}
-
-type VerifyOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN))
- // of the asymmetric KMS key that was used to verify the signature.
- KeyId *string `min:"1" type:"string"`
-
- // A Boolean value that indicates whether the signature was verified. A value
- // of True indicates that the Signature was produced by signing the Message
- // with the specified KeyID and SigningAlgorithm. If the signature is not verified,
- // the Verify operation fails with a KMSInvalidSignatureException exception.
- SignatureValid *bool `type:"boolean"`
-
- // The signing algorithm that was used to verify the signature.
- SigningAlgorithm *string `type:"string" enum:"SigningAlgorithmSpec"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s VerifyOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s VerifyOutput) GoString() string {
- return s.String()
-}
-
-// SetKeyId sets the KeyId field's value.
-func (s *VerifyOutput) SetKeyId(v string) *VerifyOutput {
- s.KeyId = &v
- return s
-}
-
-// SetSignatureValid sets the SignatureValid field's value.
-func (s *VerifyOutput) SetSignatureValid(v bool) *VerifyOutput {
- s.SignatureValid = &v
- return s
-}
-
-// SetSigningAlgorithm sets the SigningAlgorithm field's value.
-func (s *VerifyOutput) SetSigningAlgorithm(v string) *VerifyOutput {
- s.SigningAlgorithm = &v
- return s
-}
-
-const (
- // AlgorithmSpecRsaesPkcs1V15 is a AlgorithmSpec enum value
- AlgorithmSpecRsaesPkcs1V15 = "RSAES_PKCS1_V1_5"
-
- // AlgorithmSpecRsaesOaepSha1 is a AlgorithmSpec enum value
- AlgorithmSpecRsaesOaepSha1 = "RSAES_OAEP_SHA_1"
-
- // AlgorithmSpecRsaesOaepSha256 is a AlgorithmSpec enum value
- AlgorithmSpecRsaesOaepSha256 = "RSAES_OAEP_SHA_256"
-)
-
-// AlgorithmSpec_Values returns all elements of the AlgorithmSpec enum
-func AlgorithmSpec_Values() []string {
- return []string{
- AlgorithmSpecRsaesPkcs1V15,
- AlgorithmSpecRsaesOaepSha1,
- AlgorithmSpecRsaesOaepSha256,
- }
-}
-
-const (
- // ConnectionErrorCodeTypeInvalidCredentials is a ConnectionErrorCodeType enum value
- ConnectionErrorCodeTypeInvalidCredentials = "INVALID_CREDENTIALS"
-
- // ConnectionErrorCodeTypeClusterNotFound is a ConnectionErrorCodeType enum value
- ConnectionErrorCodeTypeClusterNotFound = "CLUSTER_NOT_FOUND"
-
- // ConnectionErrorCodeTypeNetworkErrors is a ConnectionErrorCodeType enum value
- ConnectionErrorCodeTypeNetworkErrors = "NETWORK_ERRORS"
-
- // ConnectionErrorCodeTypeInternalError is a ConnectionErrorCodeType enum value
- ConnectionErrorCodeTypeInternalError = "INTERNAL_ERROR"
-
- // ConnectionErrorCodeTypeInsufficientCloudhsmHsms is a ConnectionErrorCodeType enum value
- ConnectionErrorCodeTypeInsufficientCloudhsmHsms = "INSUFFICIENT_CLOUDHSM_HSMS"
-
- // ConnectionErrorCodeTypeUserLockedOut is a ConnectionErrorCodeType enum value
- ConnectionErrorCodeTypeUserLockedOut = "USER_LOCKED_OUT"
-
- // ConnectionErrorCodeTypeUserNotFound is a ConnectionErrorCodeType enum value
- ConnectionErrorCodeTypeUserNotFound = "USER_NOT_FOUND"
-
- // ConnectionErrorCodeTypeUserLoggedIn is a ConnectionErrorCodeType enum value
- ConnectionErrorCodeTypeUserLoggedIn = "USER_LOGGED_IN"
-
- // ConnectionErrorCodeTypeSubnetNotFound is a ConnectionErrorCodeType enum value
- ConnectionErrorCodeTypeSubnetNotFound = "SUBNET_NOT_FOUND"
-)
-
-// ConnectionErrorCodeType_Values returns all elements of the ConnectionErrorCodeType enum
-func ConnectionErrorCodeType_Values() []string {
- return []string{
- ConnectionErrorCodeTypeInvalidCredentials,
- ConnectionErrorCodeTypeClusterNotFound,
- ConnectionErrorCodeTypeNetworkErrors,
- ConnectionErrorCodeTypeInternalError,
- ConnectionErrorCodeTypeInsufficientCloudhsmHsms,
- ConnectionErrorCodeTypeUserLockedOut,
- ConnectionErrorCodeTypeUserNotFound,
- ConnectionErrorCodeTypeUserLoggedIn,
- ConnectionErrorCodeTypeSubnetNotFound,
- }
-}
-
-const (
- // ConnectionStateTypeConnected is a ConnectionStateType enum value
- ConnectionStateTypeConnected = "CONNECTED"
-
- // ConnectionStateTypeConnecting is a ConnectionStateType enum value
- ConnectionStateTypeConnecting = "CONNECTING"
-
- // ConnectionStateTypeFailed is a ConnectionStateType enum value
- ConnectionStateTypeFailed = "FAILED"
-
- // ConnectionStateTypeDisconnected is a ConnectionStateType enum value
- ConnectionStateTypeDisconnected = "DISCONNECTED"
-
- // ConnectionStateTypeDisconnecting is a ConnectionStateType enum value
- ConnectionStateTypeDisconnecting = "DISCONNECTING"
-)
-
-// ConnectionStateType_Values returns all elements of the ConnectionStateType enum
-func ConnectionStateType_Values() []string {
- return []string{
- ConnectionStateTypeConnected,
- ConnectionStateTypeConnecting,
- ConnectionStateTypeFailed,
- ConnectionStateTypeDisconnected,
- ConnectionStateTypeDisconnecting,
- }
-}
-
-const (
- // CustomerMasterKeySpecRsa2048 is a CustomerMasterKeySpec enum value
- CustomerMasterKeySpecRsa2048 = "RSA_2048"
-
- // CustomerMasterKeySpecRsa3072 is a CustomerMasterKeySpec enum value
- CustomerMasterKeySpecRsa3072 = "RSA_3072"
-
- // CustomerMasterKeySpecRsa4096 is a CustomerMasterKeySpec enum value
- CustomerMasterKeySpecRsa4096 = "RSA_4096"
-
- // CustomerMasterKeySpecEccNistP256 is a CustomerMasterKeySpec enum value
- CustomerMasterKeySpecEccNistP256 = "ECC_NIST_P256"
-
- // CustomerMasterKeySpecEccNistP384 is a CustomerMasterKeySpec enum value
- CustomerMasterKeySpecEccNistP384 = "ECC_NIST_P384"
-
- // CustomerMasterKeySpecEccNistP521 is a CustomerMasterKeySpec enum value
- CustomerMasterKeySpecEccNistP521 = "ECC_NIST_P521"
-
- // CustomerMasterKeySpecEccSecgP256k1 is a CustomerMasterKeySpec enum value
- CustomerMasterKeySpecEccSecgP256k1 = "ECC_SECG_P256K1"
-
- // CustomerMasterKeySpecSymmetricDefault is a CustomerMasterKeySpec enum value
- CustomerMasterKeySpecSymmetricDefault = "SYMMETRIC_DEFAULT"
-)
-
-// CustomerMasterKeySpec_Values returns all elements of the CustomerMasterKeySpec enum
-func CustomerMasterKeySpec_Values() []string {
- return []string{
- CustomerMasterKeySpecRsa2048,
- CustomerMasterKeySpecRsa3072,
- CustomerMasterKeySpecRsa4096,
- CustomerMasterKeySpecEccNistP256,
- CustomerMasterKeySpecEccNistP384,
- CustomerMasterKeySpecEccNistP521,
- CustomerMasterKeySpecEccSecgP256k1,
- CustomerMasterKeySpecSymmetricDefault,
- }
-}
-
-const (
- // DataKeyPairSpecRsa2048 is a DataKeyPairSpec enum value
- DataKeyPairSpecRsa2048 = "RSA_2048"
-
- // DataKeyPairSpecRsa3072 is a DataKeyPairSpec enum value
- DataKeyPairSpecRsa3072 = "RSA_3072"
-
- // DataKeyPairSpecRsa4096 is a DataKeyPairSpec enum value
- DataKeyPairSpecRsa4096 = "RSA_4096"
-
- // DataKeyPairSpecEccNistP256 is a DataKeyPairSpec enum value
- DataKeyPairSpecEccNistP256 = "ECC_NIST_P256"
-
- // DataKeyPairSpecEccNistP384 is a DataKeyPairSpec enum value
- DataKeyPairSpecEccNistP384 = "ECC_NIST_P384"
-
- // DataKeyPairSpecEccNistP521 is a DataKeyPairSpec enum value
- DataKeyPairSpecEccNistP521 = "ECC_NIST_P521"
-
- // DataKeyPairSpecEccSecgP256k1 is a DataKeyPairSpec enum value
- DataKeyPairSpecEccSecgP256k1 = "ECC_SECG_P256K1"
-)
-
-// DataKeyPairSpec_Values returns all elements of the DataKeyPairSpec enum
-func DataKeyPairSpec_Values() []string {
- return []string{
- DataKeyPairSpecRsa2048,
- DataKeyPairSpecRsa3072,
- DataKeyPairSpecRsa4096,
- DataKeyPairSpecEccNistP256,
- DataKeyPairSpecEccNistP384,
- DataKeyPairSpecEccNistP521,
- DataKeyPairSpecEccSecgP256k1,
- }
-}
-
-const (
- // DataKeySpecAes256 is a DataKeySpec enum value
- DataKeySpecAes256 = "AES_256"
-
- // DataKeySpecAes128 is a DataKeySpec enum value
- DataKeySpecAes128 = "AES_128"
-)
-
-// DataKeySpec_Values returns all elements of the DataKeySpec enum
-func DataKeySpec_Values() []string {
- return []string{
- DataKeySpecAes256,
- DataKeySpecAes128,
- }
-}
-
-const (
- // EncryptionAlgorithmSpecSymmetricDefault is a EncryptionAlgorithmSpec enum value
- EncryptionAlgorithmSpecSymmetricDefault = "SYMMETRIC_DEFAULT"
-
- // EncryptionAlgorithmSpecRsaesOaepSha1 is a EncryptionAlgorithmSpec enum value
- EncryptionAlgorithmSpecRsaesOaepSha1 = "RSAES_OAEP_SHA_1"
-
- // EncryptionAlgorithmSpecRsaesOaepSha256 is a EncryptionAlgorithmSpec enum value
- EncryptionAlgorithmSpecRsaesOaepSha256 = "RSAES_OAEP_SHA_256"
-)
-
-// EncryptionAlgorithmSpec_Values returns all elements of the EncryptionAlgorithmSpec enum
-func EncryptionAlgorithmSpec_Values() []string {
- return []string{
- EncryptionAlgorithmSpecSymmetricDefault,
- EncryptionAlgorithmSpecRsaesOaepSha1,
- EncryptionAlgorithmSpecRsaesOaepSha256,
- }
-}
-
-const (
- // ExpirationModelTypeKeyMaterialExpires is a ExpirationModelType enum value
- ExpirationModelTypeKeyMaterialExpires = "KEY_MATERIAL_EXPIRES"
-
- // ExpirationModelTypeKeyMaterialDoesNotExpire is a ExpirationModelType enum value
- ExpirationModelTypeKeyMaterialDoesNotExpire = "KEY_MATERIAL_DOES_NOT_EXPIRE"
-)
-
-// ExpirationModelType_Values returns all elements of the ExpirationModelType enum
-func ExpirationModelType_Values() []string {
- return []string{
- ExpirationModelTypeKeyMaterialExpires,
- ExpirationModelTypeKeyMaterialDoesNotExpire,
- }
-}
-
-const (
- // GrantOperationDecrypt is a GrantOperation enum value
- GrantOperationDecrypt = "Decrypt"
-
- // GrantOperationEncrypt is a GrantOperation enum value
- GrantOperationEncrypt = "Encrypt"
-
- // GrantOperationGenerateDataKey is a GrantOperation enum value
- GrantOperationGenerateDataKey = "GenerateDataKey"
-
- // GrantOperationGenerateDataKeyWithoutPlaintext is a GrantOperation enum value
- GrantOperationGenerateDataKeyWithoutPlaintext = "GenerateDataKeyWithoutPlaintext"
-
- // GrantOperationReEncryptFrom is a GrantOperation enum value
- GrantOperationReEncryptFrom = "ReEncryptFrom"
-
- // GrantOperationReEncryptTo is a GrantOperation enum value
- GrantOperationReEncryptTo = "ReEncryptTo"
-
- // GrantOperationSign is a GrantOperation enum value
- GrantOperationSign = "Sign"
-
- // GrantOperationVerify is a GrantOperation enum value
- GrantOperationVerify = "Verify"
-
- // GrantOperationGetPublicKey is a GrantOperation enum value
- GrantOperationGetPublicKey = "GetPublicKey"
-
- // GrantOperationCreateGrant is a GrantOperation enum value
- GrantOperationCreateGrant = "CreateGrant"
-
- // GrantOperationRetireGrant is a GrantOperation enum value
- GrantOperationRetireGrant = "RetireGrant"
-
- // GrantOperationDescribeKey is a GrantOperation enum value
- GrantOperationDescribeKey = "DescribeKey"
-
- // GrantOperationGenerateDataKeyPair is a GrantOperation enum value
- GrantOperationGenerateDataKeyPair = "GenerateDataKeyPair"
-
- // GrantOperationGenerateDataKeyPairWithoutPlaintext is a GrantOperation enum value
- GrantOperationGenerateDataKeyPairWithoutPlaintext = "GenerateDataKeyPairWithoutPlaintext"
-)
-
-// GrantOperation_Values returns all elements of the GrantOperation enum
-func GrantOperation_Values() []string {
- return []string{
- GrantOperationDecrypt,
- GrantOperationEncrypt,
- GrantOperationGenerateDataKey,
- GrantOperationGenerateDataKeyWithoutPlaintext,
- GrantOperationReEncryptFrom,
- GrantOperationReEncryptTo,
- GrantOperationSign,
- GrantOperationVerify,
- GrantOperationGetPublicKey,
- GrantOperationCreateGrant,
- GrantOperationRetireGrant,
- GrantOperationDescribeKey,
- GrantOperationGenerateDataKeyPair,
- GrantOperationGenerateDataKeyPairWithoutPlaintext,
- }
-}
-
-const (
- // KeyManagerTypeAws is a KeyManagerType enum value
- KeyManagerTypeAws = "AWS"
-
- // KeyManagerTypeCustomer is a KeyManagerType enum value
- KeyManagerTypeCustomer = "CUSTOMER"
-)
-
-// KeyManagerType_Values returns all elements of the KeyManagerType enum
-func KeyManagerType_Values() []string {
- return []string{
- KeyManagerTypeAws,
- KeyManagerTypeCustomer,
- }
-}
-
-const (
- // KeySpecRsa2048 is a KeySpec enum value
- KeySpecRsa2048 = "RSA_2048"
-
- // KeySpecRsa3072 is a KeySpec enum value
- KeySpecRsa3072 = "RSA_3072"
-
- // KeySpecRsa4096 is a KeySpec enum value
- KeySpecRsa4096 = "RSA_4096"
-
- // KeySpecEccNistP256 is a KeySpec enum value
- KeySpecEccNistP256 = "ECC_NIST_P256"
-
- // KeySpecEccNistP384 is a KeySpec enum value
- KeySpecEccNistP384 = "ECC_NIST_P384"
-
- // KeySpecEccNistP521 is a KeySpec enum value
- KeySpecEccNistP521 = "ECC_NIST_P521"
-
- // KeySpecEccSecgP256k1 is a KeySpec enum value
- KeySpecEccSecgP256k1 = "ECC_SECG_P256K1"
-
- // KeySpecSymmetricDefault is a KeySpec enum value
- KeySpecSymmetricDefault = "SYMMETRIC_DEFAULT"
-)
-
-// KeySpec_Values returns all elements of the KeySpec enum
-func KeySpec_Values() []string {
- return []string{
- KeySpecRsa2048,
- KeySpecRsa3072,
- KeySpecRsa4096,
- KeySpecEccNistP256,
- KeySpecEccNistP384,
- KeySpecEccNistP521,
- KeySpecEccSecgP256k1,
- KeySpecSymmetricDefault,
- }
-}
-
-const (
- // KeyStateCreating is a KeyState enum value
- KeyStateCreating = "Creating"
-
- // KeyStateEnabled is a KeyState enum value
- KeyStateEnabled = "Enabled"
-
- // KeyStateDisabled is a KeyState enum value
- KeyStateDisabled = "Disabled"
-
- // KeyStatePendingDeletion is a KeyState enum value
- KeyStatePendingDeletion = "PendingDeletion"
-
- // KeyStatePendingImport is a KeyState enum value
- KeyStatePendingImport = "PendingImport"
-
- // KeyStatePendingReplicaDeletion is a KeyState enum value
- KeyStatePendingReplicaDeletion = "PendingReplicaDeletion"
-
- // KeyStateUnavailable is a KeyState enum value
- KeyStateUnavailable = "Unavailable"
-
- // KeyStateUpdating is a KeyState enum value
- KeyStateUpdating = "Updating"
-)
-
-// KeyState_Values returns all elements of the KeyState enum
-func KeyState_Values() []string {
- return []string{
- KeyStateCreating,
- KeyStateEnabled,
- KeyStateDisabled,
- KeyStatePendingDeletion,
- KeyStatePendingImport,
- KeyStatePendingReplicaDeletion,
- KeyStateUnavailable,
- KeyStateUpdating,
- }
-}
-
-const (
- // KeyUsageTypeSignVerify is a KeyUsageType enum value
- KeyUsageTypeSignVerify = "SIGN_VERIFY"
-
- // KeyUsageTypeEncryptDecrypt is a KeyUsageType enum value
- KeyUsageTypeEncryptDecrypt = "ENCRYPT_DECRYPT"
-)
-
-// KeyUsageType_Values returns all elements of the KeyUsageType enum
-func KeyUsageType_Values() []string {
- return []string{
- KeyUsageTypeSignVerify,
- KeyUsageTypeEncryptDecrypt,
- }
-}
-
-const (
- // MessageTypeRaw is a MessageType enum value
- MessageTypeRaw = "RAW"
-
- // MessageTypeDigest is a MessageType enum value
- MessageTypeDigest = "DIGEST"
-)
-
-// MessageType_Values returns all elements of the MessageType enum
-func MessageType_Values() []string {
- return []string{
- MessageTypeRaw,
- MessageTypeDigest,
- }
-}
-
-const (
- // MultiRegionKeyTypePrimary is a MultiRegionKeyType enum value
- MultiRegionKeyTypePrimary = "PRIMARY"
-
- // MultiRegionKeyTypeReplica is a MultiRegionKeyType enum value
- MultiRegionKeyTypeReplica = "REPLICA"
-)
-
-// MultiRegionKeyType_Values returns all elements of the MultiRegionKeyType enum
-func MultiRegionKeyType_Values() []string {
- return []string{
- MultiRegionKeyTypePrimary,
- MultiRegionKeyTypeReplica,
- }
-}
-
-const (
- // OriginTypeAwsKms is a OriginType enum value
- OriginTypeAwsKms = "AWS_KMS"
-
- // OriginTypeExternal is a OriginType enum value
- OriginTypeExternal = "EXTERNAL"
-
- // OriginTypeAwsCloudhsm is a OriginType enum value
- OriginTypeAwsCloudhsm = "AWS_CLOUDHSM"
-)
-
-// OriginType_Values returns all elements of the OriginType enum
-func OriginType_Values() []string {
- return []string{
- OriginTypeAwsKms,
- OriginTypeExternal,
- OriginTypeAwsCloudhsm,
- }
-}
-
-const (
- // SigningAlgorithmSpecRsassaPssSha256 is a SigningAlgorithmSpec enum value
- SigningAlgorithmSpecRsassaPssSha256 = "RSASSA_PSS_SHA_256"
-
- // SigningAlgorithmSpecRsassaPssSha384 is a SigningAlgorithmSpec enum value
- SigningAlgorithmSpecRsassaPssSha384 = "RSASSA_PSS_SHA_384"
-
- // SigningAlgorithmSpecRsassaPssSha512 is a SigningAlgorithmSpec enum value
- SigningAlgorithmSpecRsassaPssSha512 = "RSASSA_PSS_SHA_512"
-
- // SigningAlgorithmSpecRsassaPkcs1V15Sha256 is a SigningAlgorithmSpec enum value
- SigningAlgorithmSpecRsassaPkcs1V15Sha256 = "RSASSA_PKCS1_V1_5_SHA_256"
-
- // SigningAlgorithmSpecRsassaPkcs1V15Sha384 is a SigningAlgorithmSpec enum value
- SigningAlgorithmSpecRsassaPkcs1V15Sha384 = "RSASSA_PKCS1_V1_5_SHA_384"
-
- // SigningAlgorithmSpecRsassaPkcs1V15Sha512 is a SigningAlgorithmSpec enum value
- SigningAlgorithmSpecRsassaPkcs1V15Sha512 = "RSASSA_PKCS1_V1_5_SHA_512"
-
- // SigningAlgorithmSpecEcdsaSha256 is a SigningAlgorithmSpec enum value
- SigningAlgorithmSpecEcdsaSha256 = "ECDSA_SHA_256"
-
- // SigningAlgorithmSpecEcdsaSha384 is a SigningAlgorithmSpec enum value
- SigningAlgorithmSpecEcdsaSha384 = "ECDSA_SHA_384"
-
- // SigningAlgorithmSpecEcdsaSha512 is a SigningAlgorithmSpec enum value
- SigningAlgorithmSpecEcdsaSha512 = "ECDSA_SHA_512"
-)
-
-// SigningAlgorithmSpec_Values returns all elements of the SigningAlgorithmSpec enum
-func SigningAlgorithmSpec_Values() []string {
- return []string{
- SigningAlgorithmSpecRsassaPssSha256,
- SigningAlgorithmSpecRsassaPssSha384,
- SigningAlgorithmSpecRsassaPssSha512,
- SigningAlgorithmSpecRsassaPkcs1V15Sha256,
- SigningAlgorithmSpecRsassaPkcs1V15Sha384,
- SigningAlgorithmSpecRsassaPkcs1V15Sha512,
- SigningAlgorithmSpecEcdsaSha256,
- SigningAlgorithmSpecEcdsaSha384,
- SigningAlgorithmSpecEcdsaSha512,
- }
-}
-
-const (
- // WrappingKeySpecRsa2048 is a WrappingKeySpec enum value
- WrappingKeySpecRsa2048 = "RSA_2048"
-)
-
-// WrappingKeySpec_Values returns all elements of the WrappingKeySpec enum
-func WrappingKeySpec_Values() []string {
- return []string{
- WrappingKeySpecRsa2048,
- }
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go b/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go
deleted file mode 100644
index 64050c225..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/kms/doc.go
+++ /dev/null
@@ -1,104 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package kms provides the client and types for making API
-// requests to AWS Key Management Service.
-//
-// Key Management Service (KMS) is an encryption and key management web service.
-// This guide describes the KMS operations that you can call programmatically.
-// For general information about KMS, see the Key Management Service Developer
-// Guide (https://docs.aws.amazon.com/kms/latest/developerguide/).
-//
-// KMS is replacing the term customer master key (CMK) with KMS key and KMS
-// key. The concept has not changed. To prevent breaking changes, KMS is keeping
-// some variations of this term.
-//
-// Amazon Web Services provides SDKs that consist of libraries and sample code
-// for various programming languages and platforms (Java, Ruby, .Net, macOS,
-// Android, etc.). The SDKs provide a convenient way to create programmatic
-// access to KMS and other Amazon Web Services services. For example, the SDKs
-// take care of tasks such as signing requests (see below), managing errors,
-// and retrying requests automatically. For more information about the Amazon
-// Web Services SDKs, including how to download and install them, see Tools
-// for Amazon Web Services (http://aws.amazon.com/tools/).
-//
-// We recommend that you use the Amazon Web Services SDKs to make programmatic
-// API calls to KMS.
-//
-// Clients must support TLS (Transport Layer Security) 1.0. We recommend TLS
-// 1.2. Clients must also support cipher suites with Perfect Forward Secrecy
-// (PFS) such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Ephemeral
-// Diffie-Hellman (ECDHE). Most modern systems such as Java 7 and later support
-// these modes.
-//
-// Signing Requests
-//
-// Requests must be signed by using an access key ID and a secret access key.
-// We strongly recommend that you do not use your Amazon Web Services account
-// (root) access key ID and secret key for everyday work with KMS. Instead,
-// use the access key ID and secret access key for an IAM user. You can also
-// use the Amazon Web Services Security Token Service to generate temporary
-// security credentials that you can use to sign requests.
-//
-// All KMS operations require Signature Version 4 (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
-//
-// Logging API Requests
-//
-// KMS supports CloudTrail, a service that logs Amazon Web Services API calls
-// and related events for your Amazon Web Services account and delivers them
-// to an Amazon S3 bucket that you specify. By using the information collected
-// by CloudTrail, you can determine what requests were made to KMS, who made
-// the request, when it was made, and so on. To learn more about CloudTrail,
-// including how to turn it on and find your log files, see the CloudTrail User
-// Guide (https://docs.aws.amazon.com/awscloudtrail/latest/userguide/).
-//
-// Additional Resources
-//
-// For more information about credentials and request signing, see the following:
-//
-// * Amazon Web Services Security Credentials (https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)
-// - This topic provides general information about the types of credentials
-// used to access Amazon Web Services.
-//
-// * Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
-// - This section of the IAM User Guide describes how to create and use temporary
-// security credentials.
-//
-// * Signature Version 4 Signing Process (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html)
-// - This set of topics walks you through the process of signing a request
-// using an access key ID and a secret access key.
-//
-// Commonly Used API Operations
-//
-// Of the API operations discussed in this guide, the following will prove the
-// most useful for most applications. You will likely perform operations other
-// than these, such as creating keys and assigning policies, by using the console.
-//
-// * Encrypt
-//
-// * Decrypt
-//
-// * GenerateDataKey
-//
-// * GenerateDataKeyWithoutPlaintext
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01 for more information on this service.
-//
-// See kms package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/kms/
-//
-// Using the Client
-//
-// To contact AWS Key Management Service with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the AWS Key Management Service client KMS for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/kms/#New
-package kms
diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go b/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go
deleted file mode 100644
index 7f5a1f0ba..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/kms/errors.go
+++ /dev/null
@@ -1,366 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package kms
-
-import (
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-const (
-
- // ErrCodeAlreadyExistsException for service response error code
- // "AlreadyExistsException".
- //
- // The request was rejected because it attempted to create a resource that already
- // exists.
- ErrCodeAlreadyExistsException = "AlreadyExistsException"
-
- // ErrCodeCloudHsmClusterInUseException for service response error code
- // "CloudHsmClusterInUseException".
- //
- // The request was rejected because the specified CloudHSM cluster is already
- // associated with a custom key store or it shares a backup history with a cluster
- // that is associated with a custom key store. Each custom key store must be
- // associated with a different CloudHSM cluster.
- //
- // Clusters that share a backup history have the same cluster certificate. To
- // view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
- // operation.
- ErrCodeCloudHsmClusterInUseException = "CloudHsmClusterInUseException"
-
- // ErrCodeCloudHsmClusterInvalidConfigurationException for service response error code
- // "CloudHsmClusterInvalidConfigurationException".
- //
- // The request was rejected because the associated CloudHSM cluster did not
- // meet the configuration requirements for a custom key store.
- //
- // * The cluster must be configured with private subnets in at least two
- // different Availability Zones in the Region.
- //
- // * The security group for the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
- // (cloudhsm-cluster--sg) must include inbound rules and outbound
- // rules that allow TCP traffic on ports 2223-2225. The Source in the inbound
- // rules and the Destination in the outbound rules must match the security
- // group ID. These rules are set by default when you create the cluster.
- // Do not delete or change them. To get information about a particular security
- // group, use the DescribeSecurityGroups (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html)
- // operation.
- //
- // * The cluster must contain at least as many HSMs as the operation requires.
- // To add HSMs, use the CloudHSM CreateHsm (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_CreateHsm.html)
- // operation. For the CreateCustomKeyStore, UpdateCustomKeyStore, and CreateKey
- // operations, the CloudHSM cluster must have at least two active HSMs, each
- // in a different Availability Zone. For the ConnectCustomKeyStore operation,
- // the CloudHSM must contain at least one active HSM.
- //
- // For information about the requirements for an CloudHSM cluster that is associated
- // with a custom key store, see Assemble the Prerequisites (https://docs.aws.amazon.com/kms/latest/developerguide/create-keystore.html#before-keystore)
- // in the Key Management Service Developer Guide. For information about creating
- // a private subnet for an CloudHSM cluster, see Create a Private Subnet (https://docs.aws.amazon.com/cloudhsm/latest/userguide/create-subnets.html)
- // in the CloudHSM User Guide. For information about cluster security groups,
- // see Configure a Default Security Group (https://docs.aws.amazon.com/cloudhsm/latest/userguide/configure-sg.html)
- // in the CloudHSM User Guide .
- ErrCodeCloudHsmClusterInvalidConfigurationException = "CloudHsmClusterInvalidConfigurationException"
-
- // ErrCodeCloudHsmClusterNotActiveException for service response error code
- // "CloudHsmClusterNotActiveException".
- //
- // The request was rejected because the CloudHSM cluster that is associated
- // with the custom key store is not active. Initialize and activate the cluster
- // and try the command again. For detailed instructions, see Getting Started
- // (https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html)
- // in the CloudHSM User Guide.
- ErrCodeCloudHsmClusterNotActiveException = "CloudHsmClusterNotActiveException"
-
- // ErrCodeCloudHsmClusterNotFoundException for service response error code
- // "CloudHsmClusterNotFoundException".
- //
- // The request was rejected because KMS cannot find the CloudHSM cluster with
- // the specified cluster ID. Retry the request with a different cluster ID.
- ErrCodeCloudHsmClusterNotFoundException = "CloudHsmClusterNotFoundException"
-
- // ErrCodeCloudHsmClusterNotRelatedException for service response error code
- // "CloudHsmClusterNotRelatedException".
- //
- // The request was rejected because the specified CloudHSM cluster has a different
- // cluster certificate than the original cluster. You cannot use the operation
- // to specify an unrelated cluster.
- //
- // Specify a cluster that shares a backup history with the original cluster.
- // This includes clusters that were created from a backup of the current cluster,
- // and clusters that were created from the same backup that produced the current
- // cluster.
- //
- // Clusters that share a backup history have the same cluster certificate. To
- // view the cluster certificate of a cluster, use the DescribeClusters (https://docs.aws.amazon.com/cloudhsm/latest/APIReference/API_DescribeClusters.html)
- // operation.
- ErrCodeCloudHsmClusterNotRelatedException = "CloudHsmClusterNotRelatedException"
-
- // ErrCodeCustomKeyStoreHasCMKsException for service response error code
- // "CustomKeyStoreHasCMKsException".
- //
- // The request was rejected because the custom key store contains KMS keys.
- // After verifying that you do not need to use the KMS keys, use the ScheduleKeyDeletion
- // operation to delete the KMS keys. After they are deleted, you can delete
- // the custom key store.
- ErrCodeCustomKeyStoreHasCMKsException = "CustomKeyStoreHasCMKsException"
-
- // ErrCodeCustomKeyStoreInvalidStateException for service response error code
- // "CustomKeyStoreInvalidStateException".
- //
- // The request was rejected because of the ConnectionState of the custom key
- // store. To get the ConnectionState of a custom key store, use the DescribeCustomKeyStores
- // operation.
- //
- // This exception is thrown under the following conditions:
- //
- // * You requested the CreateKey or GenerateRandom operation in a custom
- // key store that is not connected. These operations are valid only when
- // the custom key store ConnectionState is CONNECTED.
- //
- // * You requested the UpdateCustomKeyStore or DeleteCustomKeyStore operation
- // on a custom key store that is not disconnected. This operation is valid
- // only when the custom key store ConnectionState is DISCONNECTED.
- //
- // * You requested the ConnectCustomKeyStore operation on a custom key store
- // with a ConnectionState of DISCONNECTING or FAILED. This operation is valid
- // for all other ConnectionState values.
- ErrCodeCustomKeyStoreInvalidStateException = "CustomKeyStoreInvalidStateException"
-
- // ErrCodeCustomKeyStoreNameInUseException for service response error code
- // "CustomKeyStoreNameInUseException".
- //
- // The request was rejected because the specified custom key store name is already
- // assigned to another custom key store in the account. Try again with a custom
- // key store name that is unique in the account.
- ErrCodeCustomKeyStoreNameInUseException = "CustomKeyStoreNameInUseException"
-
- // ErrCodeCustomKeyStoreNotFoundException for service response error code
- // "CustomKeyStoreNotFoundException".
- //
- // The request was rejected because KMS cannot find a custom key store with
- // the specified key store name or ID.
- ErrCodeCustomKeyStoreNotFoundException = "CustomKeyStoreNotFoundException"
-
- // ErrCodeDependencyTimeoutException for service response error code
- // "DependencyTimeoutException".
- //
- // The system timed out while trying to fulfill the request. The request can
- // be retried.
- ErrCodeDependencyTimeoutException = "DependencyTimeoutException"
-
- // ErrCodeDisabledException for service response error code
- // "DisabledException".
- //
- // The request was rejected because the specified KMS key is not enabled.
- ErrCodeDisabledException = "DisabledException"
-
- // ErrCodeExpiredImportTokenException for service response error code
- // "ExpiredImportTokenException".
- //
- // The request was rejected because the specified import token is expired. Use
- // GetParametersForImport to get a new import token and public key, use the
- // new public key to encrypt the key material, and then try the request again.
- ErrCodeExpiredImportTokenException = "ExpiredImportTokenException"
-
- // ErrCodeIncorrectKeyException for service response error code
- // "IncorrectKeyException".
- //
- // The request was rejected because the specified KMS key cannot decrypt the
- // data. The KeyId in a Decrypt request and the SourceKeyId in a ReEncrypt request
- // must identify the same KMS key that was used to encrypt the ciphertext.
- ErrCodeIncorrectKeyException = "IncorrectKeyException"
-
- // ErrCodeIncorrectKeyMaterialException for service response error code
- // "IncorrectKeyMaterialException".
- //
- // The request was rejected because the key material in the request is, expired,
- // invalid, or is not the same key material that was previously imported into
- // this KMS key.
- ErrCodeIncorrectKeyMaterialException = "IncorrectKeyMaterialException"
-
- // ErrCodeIncorrectTrustAnchorException for service response error code
- // "IncorrectTrustAnchorException".
- //
- // The request was rejected because the trust anchor certificate in the request
- // is not the trust anchor certificate for the specified CloudHSM cluster.
- //
- // When you initialize the cluster (https://docs.aws.amazon.com/cloudhsm/latest/userguide/initialize-cluster.html#sign-csr),
- // you create the trust anchor certificate and save it in the customerCA.crt
- // file.
- ErrCodeIncorrectTrustAnchorException = "IncorrectTrustAnchorException"
-
- // ErrCodeInternalException for service response error code
- // "KMSInternalException".
- //
- // The request was rejected because an internal exception occurred. The request
- // can be retried.
- ErrCodeInternalException = "KMSInternalException"
-
- // ErrCodeInvalidAliasNameException for service response error code
- // "InvalidAliasNameException".
- //
- // The request was rejected because the specified alias name is not valid.
- ErrCodeInvalidAliasNameException = "InvalidAliasNameException"
-
- // ErrCodeInvalidArnException for service response error code
- // "InvalidArnException".
- //
- // The request was rejected because a specified ARN, or an ARN in a key policy,
- // is not valid.
- ErrCodeInvalidArnException = "InvalidArnException"
-
- // ErrCodeInvalidCiphertextException for service response error code
- // "InvalidCiphertextException".
- //
- // From the Decrypt or ReEncrypt operation, the request was rejected because
- // the specified ciphertext, or additional authenticated data incorporated into
- // the ciphertext, such as the encryption context, is corrupted, missing, or
- // otherwise invalid.
- //
- // From the ImportKeyMaterial operation, the request was rejected because KMS
- // could not decrypt the encrypted (wrapped) key material.
- ErrCodeInvalidCiphertextException = "InvalidCiphertextException"
-
- // ErrCodeInvalidGrantIdException for service response error code
- // "InvalidGrantIdException".
- //
- // The request was rejected because the specified GrantId is not valid.
- ErrCodeInvalidGrantIdException = "InvalidGrantIdException"
-
- // ErrCodeInvalidGrantTokenException for service response error code
- // "InvalidGrantTokenException".
- //
- // The request was rejected because the specified grant token is not valid.
- ErrCodeInvalidGrantTokenException = "InvalidGrantTokenException"
-
- // ErrCodeInvalidImportTokenException for service response error code
- // "InvalidImportTokenException".
- //
- // The request was rejected because the provided import token is invalid or
- // is associated with a different KMS key.
- ErrCodeInvalidImportTokenException = "InvalidImportTokenException"
-
- // ErrCodeInvalidKeyUsageException for service response error code
- // "InvalidKeyUsageException".
- //
- // The request was rejected for one of the following reasons:
- //
- // * The KeyUsage value of the KMS key is incompatible with the API operation.
- //
- // * The encryption algorithm or signing algorithm specified for the operation
- // is incompatible with the type of key material in the KMS key (KeySpec).
- //
- // For encrypting, decrypting, re-encrypting, and generating data keys, the
- // KeyUsage must be ENCRYPT_DECRYPT. For signing and verifying, the KeyUsage
- // must be SIGN_VERIFY. To find the KeyUsage of a KMS key, use the DescribeKey
- // operation.
- //
- // To find the encryption or signing algorithms supported for a particular KMS
- // key, use the DescribeKey operation.
- ErrCodeInvalidKeyUsageException = "InvalidKeyUsageException"
-
- // ErrCodeInvalidMarkerException for service response error code
- // "InvalidMarkerException".
- //
- // The request was rejected because the marker that specifies where pagination
- // should next begin is not valid.
- ErrCodeInvalidMarkerException = "InvalidMarkerException"
-
- // ErrCodeInvalidStateException for service response error code
- // "KMSInvalidStateException".
- //
- // The request was rejected because the state of the specified resource is not
- // valid for this request.
- //
- // For more information about how key state affects the use of a KMS key, see
- // Key state: Effect on your KMS key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html)
- // in the Key Management Service Developer Guide .
- ErrCodeInvalidStateException = "KMSInvalidStateException"
-
- // ErrCodeKMSInvalidSignatureException for service response error code
- // "KMSInvalidSignatureException".
- //
- // The request was rejected because the signature verification failed. Signature
- // verification fails when it cannot confirm that signature was produced by
- // signing the specified message with the specified KMS key and signing algorithm.
- ErrCodeKMSInvalidSignatureException = "KMSInvalidSignatureException"
-
- // ErrCodeKeyUnavailableException for service response error code
- // "KeyUnavailableException".
- //
- // The request was rejected because the specified KMS key was not available.
- // You can retry the request.
- ErrCodeKeyUnavailableException = "KeyUnavailableException"
-
- // ErrCodeLimitExceededException for service response error code
- // "LimitExceededException".
- //
- // The request was rejected because a quota was exceeded. For more information,
- // see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html)
- // in the Key Management Service Developer Guide.
- ErrCodeLimitExceededException = "LimitExceededException"
-
- // ErrCodeMalformedPolicyDocumentException for service response error code
- // "MalformedPolicyDocumentException".
- //
- // The request was rejected because the specified policy is not syntactically
- // or semantically correct.
- ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocumentException"
-
- // ErrCodeNotFoundException for service response error code
- // "NotFoundException".
- //
- // The request was rejected because the specified entity or resource could not
- // be found.
- ErrCodeNotFoundException = "NotFoundException"
-
- // ErrCodeTagException for service response error code
- // "TagException".
- //
- // The request was rejected because one or more tags are not valid.
- ErrCodeTagException = "TagException"
-
- // ErrCodeUnsupportedOperationException for service response error code
- // "UnsupportedOperationException".
- //
- // The request was rejected because a specified parameter is not supported or
- // a specified resource is not valid for this operation.
- ErrCodeUnsupportedOperationException = "UnsupportedOperationException"
-)
-
-var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
- "AlreadyExistsException": newErrorAlreadyExistsException,
- "CloudHsmClusterInUseException": newErrorCloudHsmClusterInUseException,
- "CloudHsmClusterInvalidConfigurationException": newErrorCloudHsmClusterInvalidConfigurationException,
- "CloudHsmClusterNotActiveException": newErrorCloudHsmClusterNotActiveException,
- "CloudHsmClusterNotFoundException": newErrorCloudHsmClusterNotFoundException,
- "CloudHsmClusterNotRelatedException": newErrorCloudHsmClusterNotRelatedException,
- "CustomKeyStoreHasCMKsException": newErrorCustomKeyStoreHasCMKsException,
- "CustomKeyStoreInvalidStateException": newErrorCustomKeyStoreInvalidStateException,
- "CustomKeyStoreNameInUseException": newErrorCustomKeyStoreNameInUseException,
- "CustomKeyStoreNotFoundException": newErrorCustomKeyStoreNotFoundException,
- "DependencyTimeoutException": newErrorDependencyTimeoutException,
- "DisabledException": newErrorDisabledException,
- "ExpiredImportTokenException": newErrorExpiredImportTokenException,
- "IncorrectKeyException": newErrorIncorrectKeyException,
- "IncorrectKeyMaterialException": newErrorIncorrectKeyMaterialException,
- "IncorrectTrustAnchorException": newErrorIncorrectTrustAnchorException,
- "KMSInternalException": newErrorInternalException,
- "InvalidAliasNameException": newErrorInvalidAliasNameException,
- "InvalidArnException": newErrorInvalidArnException,
- "InvalidCiphertextException": newErrorInvalidCiphertextException,
- "InvalidGrantIdException": newErrorInvalidGrantIdException,
- "InvalidGrantTokenException": newErrorInvalidGrantTokenException,
- "InvalidImportTokenException": newErrorInvalidImportTokenException,
- "InvalidKeyUsageException": newErrorInvalidKeyUsageException,
- "InvalidMarkerException": newErrorInvalidMarkerException,
- "KMSInvalidStateException": newErrorInvalidStateException,
- "KMSInvalidSignatureException": newErrorKMSInvalidSignatureException,
- "KeyUnavailableException": newErrorKeyUnavailableException,
- "LimitExceededException": newErrorLimitExceededException,
- "MalformedPolicyDocumentException": newErrorMalformedPolicyDocumentException,
- "NotFoundException": newErrorNotFoundException,
- "TagException": newErrorTagException,
- "UnsupportedOperationException": newErrorUnsupportedOperationException,
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/kmsiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/kms/kmsiface/interface.go
deleted file mode 100644
index 6de9505a5..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/kms/kmsiface/interface.go
+++ /dev/null
@@ -1,268 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package kmsiface provides an interface to enable mocking the AWS Key Management Service service client
-// for testing your code.
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters.
-package kmsiface
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/service/kms"
-)
-
-// KMSAPI provides an interface to enable mocking the
-// kms.KMS service client's API operation,
-// paginators, and waiters. This make unit testing your code that calls out
-// to the SDK's service client's calls easier.
-//
-// The best way to use this interface is so the SDK's service client's calls
-// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the SDK's request pipeline.
-//
-// // myFunc uses an SDK service client to make a request to
-// // AWS Key Management Service.
-// func myFunc(svc kmsiface.KMSAPI) bool {
-// // Make svc.CancelKeyDeletion request
-// }
-//
-// func main() {
-// sess := session.New()
-// svc := kms.New(sess)
-//
-// myFunc(svc)
-// }
-//
-// In your _test.go file:
-//
-// // Define a mock struct to be used in your unit tests of myFunc.
-// type mockKMSClient struct {
-// kmsiface.KMSAPI
-// }
-// func (m *mockKMSClient) CancelKeyDeletion(input *kms.CancelKeyDeletionInput) (*kms.CancelKeyDeletionOutput, error) {
-// // mock response/functionality
-// }
-//
-// func TestMyFunc(t *testing.T) {
-// // Setup Test
-// mockSvc := &mockKMSClient{}
-//
-// myfunc(mockSvc)
-//
-// // Verify myFunc's functionality
-// }
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters. Its suggested to use the pattern above for testing, or using
-// tooling to generate mocks to satisfy the interfaces.
-type KMSAPI interface {
- CancelKeyDeletion(*kms.CancelKeyDeletionInput) (*kms.CancelKeyDeletionOutput, error)
- CancelKeyDeletionWithContext(aws.Context, *kms.CancelKeyDeletionInput, ...request.Option) (*kms.CancelKeyDeletionOutput, error)
- CancelKeyDeletionRequest(*kms.CancelKeyDeletionInput) (*request.Request, *kms.CancelKeyDeletionOutput)
-
- ConnectCustomKeyStore(*kms.ConnectCustomKeyStoreInput) (*kms.ConnectCustomKeyStoreOutput, error)
- ConnectCustomKeyStoreWithContext(aws.Context, *kms.ConnectCustomKeyStoreInput, ...request.Option) (*kms.ConnectCustomKeyStoreOutput, error)
- ConnectCustomKeyStoreRequest(*kms.ConnectCustomKeyStoreInput) (*request.Request, *kms.ConnectCustomKeyStoreOutput)
-
- CreateAlias(*kms.CreateAliasInput) (*kms.CreateAliasOutput, error)
- CreateAliasWithContext(aws.Context, *kms.CreateAliasInput, ...request.Option) (*kms.CreateAliasOutput, error)
- CreateAliasRequest(*kms.CreateAliasInput) (*request.Request, *kms.CreateAliasOutput)
-
- CreateCustomKeyStore(*kms.CreateCustomKeyStoreInput) (*kms.CreateCustomKeyStoreOutput, error)
- CreateCustomKeyStoreWithContext(aws.Context, *kms.CreateCustomKeyStoreInput, ...request.Option) (*kms.CreateCustomKeyStoreOutput, error)
- CreateCustomKeyStoreRequest(*kms.CreateCustomKeyStoreInput) (*request.Request, *kms.CreateCustomKeyStoreOutput)
-
- CreateGrant(*kms.CreateGrantInput) (*kms.CreateGrantOutput, error)
- CreateGrantWithContext(aws.Context, *kms.CreateGrantInput, ...request.Option) (*kms.CreateGrantOutput, error)
- CreateGrantRequest(*kms.CreateGrantInput) (*request.Request, *kms.CreateGrantOutput)
-
- CreateKey(*kms.CreateKeyInput) (*kms.CreateKeyOutput, error)
- CreateKeyWithContext(aws.Context, *kms.CreateKeyInput, ...request.Option) (*kms.CreateKeyOutput, error)
- CreateKeyRequest(*kms.CreateKeyInput) (*request.Request, *kms.CreateKeyOutput)
-
- Decrypt(*kms.DecryptInput) (*kms.DecryptOutput, error)
- DecryptWithContext(aws.Context, *kms.DecryptInput, ...request.Option) (*kms.DecryptOutput, error)
- DecryptRequest(*kms.DecryptInput) (*request.Request, *kms.DecryptOutput)
-
- DeleteAlias(*kms.DeleteAliasInput) (*kms.DeleteAliasOutput, error)
- DeleteAliasWithContext(aws.Context, *kms.DeleteAliasInput, ...request.Option) (*kms.DeleteAliasOutput, error)
- DeleteAliasRequest(*kms.DeleteAliasInput) (*request.Request, *kms.DeleteAliasOutput)
-
- DeleteCustomKeyStore(*kms.DeleteCustomKeyStoreInput) (*kms.DeleteCustomKeyStoreOutput, error)
- DeleteCustomKeyStoreWithContext(aws.Context, *kms.DeleteCustomKeyStoreInput, ...request.Option) (*kms.DeleteCustomKeyStoreOutput, error)
- DeleteCustomKeyStoreRequest(*kms.DeleteCustomKeyStoreInput) (*request.Request, *kms.DeleteCustomKeyStoreOutput)
-
- DeleteImportedKeyMaterial(*kms.DeleteImportedKeyMaterialInput) (*kms.DeleteImportedKeyMaterialOutput, error)
- DeleteImportedKeyMaterialWithContext(aws.Context, *kms.DeleteImportedKeyMaterialInput, ...request.Option) (*kms.DeleteImportedKeyMaterialOutput, error)
- DeleteImportedKeyMaterialRequest(*kms.DeleteImportedKeyMaterialInput) (*request.Request, *kms.DeleteImportedKeyMaterialOutput)
-
- DescribeCustomKeyStores(*kms.DescribeCustomKeyStoresInput) (*kms.DescribeCustomKeyStoresOutput, error)
- DescribeCustomKeyStoresWithContext(aws.Context, *kms.DescribeCustomKeyStoresInput, ...request.Option) (*kms.DescribeCustomKeyStoresOutput, error)
- DescribeCustomKeyStoresRequest(*kms.DescribeCustomKeyStoresInput) (*request.Request, *kms.DescribeCustomKeyStoresOutput)
-
- DescribeKey(*kms.DescribeKeyInput) (*kms.DescribeKeyOutput, error)
- DescribeKeyWithContext(aws.Context, *kms.DescribeKeyInput, ...request.Option) (*kms.DescribeKeyOutput, error)
- DescribeKeyRequest(*kms.DescribeKeyInput) (*request.Request, *kms.DescribeKeyOutput)
-
- DisableKey(*kms.DisableKeyInput) (*kms.DisableKeyOutput, error)
- DisableKeyWithContext(aws.Context, *kms.DisableKeyInput, ...request.Option) (*kms.DisableKeyOutput, error)
- DisableKeyRequest(*kms.DisableKeyInput) (*request.Request, *kms.DisableKeyOutput)
-
- DisableKeyRotation(*kms.DisableKeyRotationInput) (*kms.DisableKeyRotationOutput, error)
- DisableKeyRotationWithContext(aws.Context, *kms.DisableKeyRotationInput, ...request.Option) (*kms.DisableKeyRotationOutput, error)
- DisableKeyRotationRequest(*kms.DisableKeyRotationInput) (*request.Request, *kms.DisableKeyRotationOutput)
-
- DisconnectCustomKeyStore(*kms.DisconnectCustomKeyStoreInput) (*kms.DisconnectCustomKeyStoreOutput, error)
- DisconnectCustomKeyStoreWithContext(aws.Context, *kms.DisconnectCustomKeyStoreInput, ...request.Option) (*kms.DisconnectCustomKeyStoreOutput, error)
- DisconnectCustomKeyStoreRequest(*kms.DisconnectCustomKeyStoreInput) (*request.Request, *kms.DisconnectCustomKeyStoreOutput)
-
- EnableKey(*kms.EnableKeyInput) (*kms.EnableKeyOutput, error)
- EnableKeyWithContext(aws.Context, *kms.EnableKeyInput, ...request.Option) (*kms.EnableKeyOutput, error)
- EnableKeyRequest(*kms.EnableKeyInput) (*request.Request, *kms.EnableKeyOutput)
-
- EnableKeyRotation(*kms.EnableKeyRotationInput) (*kms.EnableKeyRotationOutput, error)
- EnableKeyRotationWithContext(aws.Context, *kms.EnableKeyRotationInput, ...request.Option) (*kms.EnableKeyRotationOutput, error)
- EnableKeyRotationRequest(*kms.EnableKeyRotationInput) (*request.Request, *kms.EnableKeyRotationOutput)
-
- Encrypt(*kms.EncryptInput) (*kms.EncryptOutput, error)
- EncryptWithContext(aws.Context, *kms.EncryptInput, ...request.Option) (*kms.EncryptOutput, error)
- EncryptRequest(*kms.EncryptInput) (*request.Request, *kms.EncryptOutput)
-
- GenerateDataKey(*kms.GenerateDataKeyInput) (*kms.GenerateDataKeyOutput, error)
- GenerateDataKeyWithContext(aws.Context, *kms.GenerateDataKeyInput, ...request.Option) (*kms.GenerateDataKeyOutput, error)
- GenerateDataKeyRequest(*kms.GenerateDataKeyInput) (*request.Request, *kms.GenerateDataKeyOutput)
-
- GenerateDataKeyPair(*kms.GenerateDataKeyPairInput) (*kms.GenerateDataKeyPairOutput, error)
- GenerateDataKeyPairWithContext(aws.Context, *kms.GenerateDataKeyPairInput, ...request.Option) (*kms.GenerateDataKeyPairOutput, error)
- GenerateDataKeyPairRequest(*kms.GenerateDataKeyPairInput) (*request.Request, *kms.GenerateDataKeyPairOutput)
-
- GenerateDataKeyPairWithoutPlaintext(*kms.GenerateDataKeyPairWithoutPlaintextInput) (*kms.GenerateDataKeyPairWithoutPlaintextOutput, error)
- GenerateDataKeyPairWithoutPlaintextWithContext(aws.Context, *kms.GenerateDataKeyPairWithoutPlaintextInput, ...request.Option) (*kms.GenerateDataKeyPairWithoutPlaintextOutput, error)
- GenerateDataKeyPairWithoutPlaintextRequest(*kms.GenerateDataKeyPairWithoutPlaintextInput) (*request.Request, *kms.GenerateDataKeyPairWithoutPlaintextOutput)
-
- GenerateDataKeyWithoutPlaintext(*kms.GenerateDataKeyWithoutPlaintextInput) (*kms.GenerateDataKeyWithoutPlaintextOutput, error)
- GenerateDataKeyWithoutPlaintextWithContext(aws.Context, *kms.GenerateDataKeyWithoutPlaintextInput, ...request.Option) (*kms.GenerateDataKeyWithoutPlaintextOutput, error)
- GenerateDataKeyWithoutPlaintextRequest(*kms.GenerateDataKeyWithoutPlaintextInput) (*request.Request, *kms.GenerateDataKeyWithoutPlaintextOutput)
-
- GenerateRandom(*kms.GenerateRandomInput) (*kms.GenerateRandomOutput, error)
- GenerateRandomWithContext(aws.Context, *kms.GenerateRandomInput, ...request.Option) (*kms.GenerateRandomOutput, error)
- GenerateRandomRequest(*kms.GenerateRandomInput) (*request.Request, *kms.GenerateRandomOutput)
-
- GetKeyPolicy(*kms.GetKeyPolicyInput) (*kms.GetKeyPolicyOutput, error)
- GetKeyPolicyWithContext(aws.Context, *kms.GetKeyPolicyInput, ...request.Option) (*kms.GetKeyPolicyOutput, error)
- GetKeyPolicyRequest(*kms.GetKeyPolicyInput) (*request.Request, *kms.GetKeyPolicyOutput)
-
- GetKeyRotationStatus(*kms.GetKeyRotationStatusInput) (*kms.GetKeyRotationStatusOutput, error)
- GetKeyRotationStatusWithContext(aws.Context, *kms.GetKeyRotationStatusInput, ...request.Option) (*kms.GetKeyRotationStatusOutput, error)
- GetKeyRotationStatusRequest(*kms.GetKeyRotationStatusInput) (*request.Request, *kms.GetKeyRotationStatusOutput)
-
- GetParametersForImport(*kms.GetParametersForImportInput) (*kms.GetParametersForImportOutput, error)
- GetParametersForImportWithContext(aws.Context, *kms.GetParametersForImportInput, ...request.Option) (*kms.GetParametersForImportOutput, error)
- GetParametersForImportRequest(*kms.GetParametersForImportInput) (*request.Request, *kms.GetParametersForImportOutput)
-
- GetPublicKey(*kms.GetPublicKeyInput) (*kms.GetPublicKeyOutput, error)
- GetPublicKeyWithContext(aws.Context, *kms.GetPublicKeyInput, ...request.Option) (*kms.GetPublicKeyOutput, error)
- GetPublicKeyRequest(*kms.GetPublicKeyInput) (*request.Request, *kms.GetPublicKeyOutput)
-
- ImportKeyMaterial(*kms.ImportKeyMaterialInput) (*kms.ImportKeyMaterialOutput, error)
- ImportKeyMaterialWithContext(aws.Context, *kms.ImportKeyMaterialInput, ...request.Option) (*kms.ImportKeyMaterialOutput, error)
- ImportKeyMaterialRequest(*kms.ImportKeyMaterialInput) (*request.Request, *kms.ImportKeyMaterialOutput)
-
- ListAliases(*kms.ListAliasesInput) (*kms.ListAliasesOutput, error)
- ListAliasesWithContext(aws.Context, *kms.ListAliasesInput, ...request.Option) (*kms.ListAliasesOutput, error)
- ListAliasesRequest(*kms.ListAliasesInput) (*request.Request, *kms.ListAliasesOutput)
-
- ListAliasesPages(*kms.ListAliasesInput, func(*kms.ListAliasesOutput, bool) bool) error
- ListAliasesPagesWithContext(aws.Context, *kms.ListAliasesInput, func(*kms.ListAliasesOutput, bool) bool, ...request.Option) error
-
- ListGrants(*kms.ListGrantsInput) (*kms.ListGrantsResponse, error)
- ListGrantsWithContext(aws.Context, *kms.ListGrantsInput, ...request.Option) (*kms.ListGrantsResponse, error)
- ListGrantsRequest(*kms.ListGrantsInput) (*request.Request, *kms.ListGrantsResponse)
-
- ListGrantsPages(*kms.ListGrantsInput, func(*kms.ListGrantsResponse, bool) bool) error
- ListGrantsPagesWithContext(aws.Context, *kms.ListGrantsInput, func(*kms.ListGrantsResponse, bool) bool, ...request.Option) error
-
- ListKeyPolicies(*kms.ListKeyPoliciesInput) (*kms.ListKeyPoliciesOutput, error)
- ListKeyPoliciesWithContext(aws.Context, *kms.ListKeyPoliciesInput, ...request.Option) (*kms.ListKeyPoliciesOutput, error)
- ListKeyPoliciesRequest(*kms.ListKeyPoliciesInput) (*request.Request, *kms.ListKeyPoliciesOutput)
-
- ListKeyPoliciesPages(*kms.ListKeyPoliciesInput, func(*kms.ListKeyPoliciesOutput, bool) bool) error
- ListKeyPoliciesPagesWithContext(aws.Context, *kms.ListKeyPoliciesInput, func(*kms.ListKeyPoliciesOutput, bool) bool, ...request.Option) error
-
- ListKeys(*kms.ListKeysInput) (*kms.ListKeysOutput, error)
- ListKeysWithContext(aws.Context, *kms.ListKeysInput, ...request.Option) (*kms.ListKeysOutput, error)
- ListKeysRequest(*kms.ListKeysInput) (*request.Request, *kms.ListKeysOutput)
-
- ListKeysPages(*kms.ListKeysInput, func(*kms.ListKeysOutput, bool) bool) error
- ListKeysPagesWithContext(aws.Context, *kms.ListKeysInput, func(*kms.ListKeysOutput, bool) bool, ...request.Option) error
-
- ListResourceTags(*kms.ListResourceTagsInput) (*kms.ListResourceTagsOutput, error)
- ListResourceTagsWithContext(aws.Context, *kms.ListResourceTagsInput, ...request.Option) (*kms.ListResourceTagsOutput, error)
- ListResourceTagsRequest(*kms.ListResourceTagsInput) (*request.Request, *kms.ListResourceTagsOutput)
-
- ListRetirableGrants(*kms.ListRetirableGrantsInput) (*kms.ListGrantsResponse, error)
- ListRetirableGrantsWithContext(aws.Context, *kms.ListRetirableGrantsInput, ...request.Option) (*kms.ListGrantsResponse, error)
- ListRetirableGrantsRequest(*kms.ListRetirableGrantsInput) (*request.Request, *kms.ListGrantsResponse)
-
- PutKeyPolicy(*kms.PutKeyPolicyInput) (*kms.PutKeyPolicyOutput, error)
- PutKeyPolicyWithContext(aws.Context, *kms.PutKeyPolicyInput, ...request.Option) (*kms.PutKeyPolicyOutput, error)
- PutKeyPolicyRequest(*kms.PutKeyPolicyInput) (*request.Request, *kms.PutKeyPolicyOutput)
-
- ReEncrypt(*kms.ReEncryptInput) (*kms.ReEncryptOutput, error)
- ReEncryptWithContext(aws.Context, *kms.ReEncryptInput, ...request.Option) (*kms.ReEncryptOutput, error)
- ReEncryptRequest(*kms.ReEncryptInput) (*request.Request, *kms.ReEncryptOutput)
-
- ReplicateKey(*kms.ReplicateKeyInput) (*kms.ReplicateKeyOutput, error)
- ReplicateKeyWithContext(aws.Context, *kms.ReplicateKeyInput, ...request.Option) (*kms.ReplicateKeyOutput, error)
- ReplicateKeyRequest(*kms.ReplicateKeyInput) (*request.Request, *kms.ReplicateKeyOutput)
-
- RetireGrant(*kms.RetireGrantInput) (*kms.RetireGrantOutput, error)
- RetireGrantWithContext(aws.Context, *kms.RetireGrantInput, ...request.Option) (*kms.RetireGrantOutput, error)
- RetireGrantRequest(*kms.RetireGrantInput) (*request.Request, *kms.RetireGrantOutput)
-
- RevokeGrant(*kms.RevokeGrantInput) (*kms.RevokeGrantOutput, error)
- RevokeGrantWithContext(aws.Context, *kms.RevokeGrantInput, ...request.Option) (*kms.RevokeGrantOutput, error)
- RevokeGrantRequest(*kms.RevokeGrantInput) (*request.Request, *kms.RevokeGrantOutput)
-
- ScheduleKeyDeletion(*kms.ScheduleKeyDeletionInput) (*kms.ScheduleKeyDeletionOutput, error)
- ScheduleKeyDeletionWithContext(aws.Context, *kms.ScheduleKeyDeletionInput, ...request.Option) (*kms.ScheduleKeyDeletionOutput, error)
- ScheduleKeyDeletionRequest(*kms.ScheduleKeyDeletionInput) (*request.Request, *kms.ScheduleKeyDeletionOutput)
-
- Sign(*kms.SignInput) (*kms.SignOutput, error)
- SignWithContext(aws.Context, *kms.SignInput, ...request.Option) (*kms.SignOutput, error)
- SignRequest(*kms.SignInput) (*request.Request, *kms.SignOutput)
-
- TagResource(*kms.TagResourceInput) (*kms.TagResourceOutput, error)
- TagResourceWithContext(aws.Context, *kms.TagResourceInput, ...request.Option) (*kms.TagResourceOutput, error)
- TagResourceRequest(*kms.TagResourceInput) (*request.Request, *kms.TagResourceOutput)
-
- UntagResource(*kms.UntagResourceInput) (*kms.UntagResourceOutput, error)
- UntagResourceWithContext(aws.Context, *kms.UntagResourceInput, ...request.Option) (*kms.UntagResourceOutput, error)
- UntagResourceRequest(*kms.UntagResourceInput) (*request.Request, *kms.UntagResourceOutput)
-
- UpdateAlias(*kms.UpdateAliasInput) (*kms.UpdateAliasOutput, error)
- UpdateAliasWithContext(aws.Context, *kms.UpdateAliasInput, ...request.Option) (*kms.UpdateAliasOutput, error)
- UpdateAliasRequest(*kms.UpdateAliasInput) (*request.Request, *kms.UpdateAliasOutput)
-
- UpdateCustomKeyStore(*kms.UpdateCustomKeyStoreInput) (*kms.UpdateCustomKeyStoreOutput, error)
- UpdateCustomKeyStoreWithContext(aws.Context, *kms.UpdateCustomKeyStoreInput, ...request.Option) (*kms.UpdateCustomKeyStoreOutput, error)
- UpdateCustomKeyStoreRequest(*kms.UpdateCustomKeyStoreInput) (*request.Request, *kms.UpdateCustomKeyStoreOutput)
-
- UpdateKeyDescription(*kms.UpdateKeyDescriptionInput) (*kms.UpdateKeyDescriptionOutput, error)
- UpdateKeyDescriptionWithContext(aws.Context, *kms.UpdateKeyDescriptionInput, ...request.Option) (*kms.UpdateKeyDescriptionOutput, error)
- UpdateKeyDescriptionRequest(*kms.UpdateKeyDescriptionInput) (*request.Request, *kms.UpdateKeyDescriptionOutput)
-
- UpdatePrimaryRegion(*kms.UpdatePrimaryRegionInput) (*kms.UpdatePrimaryRegionOutput, error)
- UpdatePrimaryRegionWithContext(aws.Context, *kms.UpdatePrimaryRegionInput, ...request.Option) (*kms.UpdatePrimaryRegionOutput, error)
- UpdatePrimaryRegionRequest(*kms.UpdatePrimaryRegionInput) (*request.Request, *kms.UpdatePrimaryRegionOutput)
-
- Verify(*kms.VerifyInput) (*kms.VerifyOutput, error)
- VerifyWithContext(aws.Context, *kms.VerifyInput, ...request.Option) (*kms.VerifyOutput, error)
- VerifyRequest(*kms.VerifyInput) (*request.Request, *kms.VerifyOutput)
-}
-
-var _ KMSAPI = (*kms.KMS)(nil)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/service.go b/vendor/github.com/aws/aws-sdk-go/service/kms/service.go
deleted file mode 100644
index 9492c2af3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/kms/service.go
+++ /dev/null
@@ -1,104 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package kms
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
-)
-
-// KMS provides the API operation methods for making requests to
-// AWS Key Management Service. See this package's package overview docs
-// for details on the service.
-//
-// KMS methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type KMS struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "kms" // Name of service.
- EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "KMS" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the KMS client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// mySession := session.Must(session.NewSession())
-//
-// // Create a KMS client from just a session.
-// svc := kms.New(mySession)
-//
-// // Create a KMS client with additional configuration
-// svc := kms.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *KMS {
- c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *KMS {
- svc := &KMS{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2014-11-01",
- ResolvedRegion: resolvedRegion,
- JSONVersion: "1.1",
- TargetPrefix: "TrentService",
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(
- protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
- )
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a KMS operation and runs any
-// custom request initialization.
-func (c *KMS) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/api.go b/vendor/github.com/aws/aws-sdk-go/service/sso/api.go
deleted file mode 100644
index 948f060ca..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/api.go
+++ /dev/null
@@ -1,1354 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sso
-
-import (
- "fmt"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/restjson"
-)
-
-const opGetRoleCredentials = "GetRoleCredentials"
-
-// GetRoleCredentialsRequest generates a "aws/request.Request" representing the
-// client's request for the GetRoleCredentials operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetRoleCredentials for more information on using the GetRoleCredentials
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetRoleCredentialsRequest method.
-// req, resp := client.GetRoleCredentialsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials
-func (c *SSO) GetRoleCredentialsRequest(input *GetRoleCredentialsInput) (req *request.Request, output *GetRoleCredentialsOutput) {
- op := &request.Operation{
- Name: opGetRoleCredentials,
- HTTPMethod: "GET",
- HTTPPath: "/federation/credentials",
- }
-
- if input == nil {
- input = &GetRoleCredentialsInput{}
- }
-
- output = &GetRoleCredentialsOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// GetRoleCredentials API operation for AWS Single Sign-On.
-//
-// Returns the STS short-term credentials for a given role name that is assigned
-// to the user.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Single Sign-On's
-// API operation GetRoleCredentials for usage and error information.
-//
-// Returned Error Types:
-// * InvalidRequestException
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-//
-// * UnauthorizedException
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-//
-// * TooManyRequestsException
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-//
-// * ResourceNotFoundException
-// The specified resource doesn't exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials
-func (c *SSO) GetRoleCredentials(input *GetRoleCredentialsInput) (*GetRoleCredentialsOutput, error) {
- req, out := c.GetRoleCredentialsRequest(input)
- return out, req.Send()
-}
-
-// GetRoleCredentialsWithContext is the same as GetRoleCredentials with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetRoleCredentials for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *SSO) GetRoleCredentialsWithContext(ctx aws.Context, input *GetRoleCredentialsInput, opts ...request.Option) (*GetRoleCredentialsOutput, error) {
- req, out := c.GetRoleCredentialsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opListAccountRoles = "ListAccountRoles"
-
-// ListAccountRolesRequest generates a "aws/request.Request" representing the
-// client's request for the ListAccountRoles operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListAccountRoles for more information on using the ListAccountRoles
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListAccountRolesRequest method.
-// req, resp := client.ListAccountRolesRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles
-func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *request.Request, output *ListAccountRolesOutput) {
- op := &request.Operation{
- Name: opListAccountRoles,
- HTTPMethod: "GET",
- HTTPPath: "/assignment/roles",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "maxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListAccountRolesInput{}
- }
-
- output = &ListAccountRolesOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// ListAccountRoles API operation for AWS Single Sign-On.
-//
-// Lists all roles that are assigned to the user for a given AWS account.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Single Sign-On's
-// API operation ListAccountRoles for usage and error information.
-//
-// Returned Error Types:
-// * InvalidRequestException
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-//
-// * UnauthorizedException
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-//
-// * TooManyRequestsException
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-//
-// * ResourceNotFoundException
-// The specified resource doesn't exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles
-func (c *SSO) ListAccountRoles(input *ListAccountRolesInput) (*ListAccountRolesOutput, error) {
- req, out := c.ListAccountRolesRequest(input)
- return out, req.Send()
-}
-
-// ListAccountRolesWithContext is the same as ListAccountRoles with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListAccountRoles for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *SSO) ListAccountRolesWithContext(ctx aws.Context, input *ListAccountRolesInput, opts ...request.Option) (*ListAccountRolesOutput, error) {
- req, out := c.ListAccountRolesRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListAccountRolesPages iterates over the pages of a ListAccountRoles operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListAccountRoles method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListAccountRoles operation.
-// pageNum := 0
-// err := client.ListAccountRolesPages(params,
-// func(page *sso.ListAccountRolesOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *SSO) ListAccountRolesPages(input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool) error {
- return c.ListAccountRolesPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListAccountRolesPagesWithContext same as ListAccountRolesPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *SSO) ListAccountRolesPagesWithContext(ctx aws.Context, input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListAccountRolesInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListAccountRolesRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListAccountRolesOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opListAccounts = "ListAccounts"
-
-// ListAccountsRequest generates a "aws/request.Request" representing the
-// client's request for the ListAccounts operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See ListAccounts for more information on using the ListAccounts
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the ListAccountsRequest method.
-// req, resp := client.ListAccountsRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts
-func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) {
- op := &request.Operation{
- Name: opListAccounts,
- HTTPMethod: "GET",
- HTTPPath: "/assignment/accounts",
- Paginator: &request.Paginator{
- InputTokens: []string{"nextToken"},
- OutputTokens: []string{"nextToken"},
- LimitToken: "maxResults",
- TruncationToken: "",
- },
- }
-
- if input == nil {
- input = &ListAccountsInput{}
- }
-
- output = &ListAccountsOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// ListAccounts API operation for AWS Single Sign-On.
-//
-// Lists all AWS accounts assigned to the user. These AWS accounts are assigned
-// by the administrator of the account. For more information, see Assign User
-// Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers)
-// in the AWS SSO User Guide. This operation returns a paginated response.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Single Sign-On's
-// API operation ListAccounts for usage and error information.
-//
-// Returned Error Types:
-// * InvalidRequestException
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-//
-// * UnauthorizedException
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-//
-// * TooManyRequestsException
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-//
-// * ResourceNotFoundException
-// The specified resource doesn't exist.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts
-func (c *SSO) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) {
- req, out := c.ListAccountsRequest(input)
- return out, req.Send()
-}
-
-// ListAccountsWithContext is the same as ListAccounts with the addition of
-// the ability to pass a context and additional request options.
-//
-// See ListAccounts for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *SSO) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput, opts ...request.Option) (*ListAccountsOutput, error) {
- req, out := c.ListAccountsRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// ListAccountsPages iterates over the pages of a ListAccounts operation,
-// calling the "fn" function with the response data for each page. To stop
-// iterating, return false from the fn function.
-//
-// See ListAccounts method for more information on how to use this operation.
-//
-// Note: This operation can generate multiple requests to a service.
-//
-// // Example iterating over at most 3 pages of a ListAccounts operation.
-// pageNum := 0
-// err := client.ListAccountsPages(params,
-// func(page *sso.ListAccountsOutput, lastPage bool) bool {
-// pageNum++
-// fmt.Println(page)
-// return pageNum <= 3
-// })
-//
-func (c *SSO) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error {
- return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn)
-}
-
-// ListAccountsPagesWithContext same as ListAccountsPages except
-// it takes a Context and allows setting request options on the pages.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *SSO) ListAccountsPagesWithContext(ctx aws.Context, input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool, opts ...request.Option) error {
- p := request.Pagination{
- NewRequest: func() (*request.Request, error) {
- var inCpy *ListAccountsInput
- if input != nil {
- tmp := *input
- inCpy = &tmp
- }
- req, _ := c.ListAccountsRequest(inCpy)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return req, nil
- },
- }
-
- for p.Next() {
- if !fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) {
- break
- }
- }
-
- return p.Err()
-}
-
-const opLogout = "Logout"
-
-// LogoutRequest generates a "aws/request.Request" representing the
-// client's request for the Logout operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See Logout for more information on using the Logout
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the LogoutRequest method.
-// req, resp := client.LogoutRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout
-func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *LogoutOutput) {
- op := &request.Operation{
- Name: opLogout,
- HTTPMethod: "POST",
- HTTPPath: "/logout",
- }
-
- if input == nil {
- input = &LogoutInput{}
- }
-
- output = &LogoutOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
- return
-}
-
-// Logout API operation for AWS Single Sign-On.
-//
-// Removes the client- and server-side session that is associated with the user.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Single Sign-On's
-// API operation Logout for usage and error information.
-//
-// Returned Error Types:
-// * InvalidRequestException
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-//
-// * UnauthorizedException
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-//
-// * TooManyRequestsException
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout
-func (c *SSO) Logout(input *LogoutInput) (*LogoutOutput, error) {
- req, out := c.LogoutRequest(input)
- return out, req.Send()
-}
-
-// LogoutWithContext is the same as Logout with the addition of
-// the ability to pass a context and additional request options.
-//
-// See Logout for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *SSO) LogoutWithContext(ctx aws.Context, input *LogoutInput, opts ...request.Option) (*LogoutOutput, error) {
- req, out := c.LogoutRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-// Provides information about your AWS account.
-type AccountInfo struct {
- _ struct{} `type:"structure"`
-
- // The identifier of the AWS account that is assigned to the user.
- AccountId *string `locationName:"accountId" type:"string"`
-
- // The display name of the AWS account that is assigned to the user.
- AccountName *string `locationName:"accountName" type:"string"`
-
- // The email address of the AWS account that is assigned to the user.
- EmailAddress *string `locationName:"emailAddress" min:"1" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccountInfo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AccountInfo) GoString() string {
- return s.String()
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *AccountInfo) SetAccountId(v string) *AccountInfo {
- s.AccountId = &v
- return s
-}
-
-// SetAccountName sets the AccountName field's value.
-func (s *AccountInfo) SetAccountName(v string) *AccountInfo {
- s.AccountName = &v
- return s
-}
-
-// SetEmailAddress sets the EmailAddress field's value.
-func (s *AccountInfo) SetEmailAddress(v string) *AccountInfo {
- s.EmailAddress = &v
- return s
-}
-
-type GetRoleCredentialsInput struct {
- _ struct{} `type:"structure" nopayload:"true"`
-
- // The token issued by the CreateToken API call. For more information, see CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the AWS SSO OIDC API Reference Guide.
- //
- // AccessToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by GetRoleCredentialsInput's
- // String and GoString methods.
- //
- // AccessToken is a required field
- AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
-
- // The identifier for the AWS account that is assigned to the user.
- //
- // AccountId is a required field
- AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`
-
- // The friendly name of the role that is assigned to the user.
- //
- // RoleName is a required field
- RoleName *string `location:"querystring" locationName:"role_name" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetRoleCredentialsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetRoleCredentialsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetRoleCredentialsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetRoleCredentialsInput"}
- if s.AccessToken == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessToken"))
- }
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
- if s.RoleName == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleName"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessToken sets the AccessToken field's value.
-func (s *GetRoleCredentialsInput) SetAccessToken(v string) *GetRoleCredentialsInput {
- s.AccessToken = &v
- return s
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *GetRoleCredentialsInput) SetAccountId(v string) *GetRoleCredentialsInput {
- s.AccountId = &v
- return s
-}
-
-// SetRoleName sets the RoleName field's value.
-func (s *GetRoleCredentialsInput) SetRoleName(v string) *GetRoleCredentialsInput {
- s.RoleName = &v
- return s
-}
-
-type GetRoleCredentialsOutput struct {
- _ struct{} `type:"structure"`
-
- // The credentials for the role that is assigned to the user.
- RoleCredentials *RoleCredentials `locationName:"roleCredentials" type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetRoleCredentialsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetRoleCredentialsOutput) GoString() string {
- return s.String()
-}
-
-// SetRoleCredentials sets the RoleCredentials field's value.
-func (s *GetRoleCredentialsOutput) SetRoleCredentials(v *RoleCredentials) *GetRoleCredentialsOutput {
- s.RoleCredentials = v
- return s
-}
-
-// Indicates that a problem occurred with the input to the request. For example,
-// a required parameter might be missing or out of range.
-type InvalidRequestException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidRequestException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s InvalidRequestException) GoString() string {
- return s.String()
-}
-
-func newErrorInvalidRequestException(v protocol.ResponseMetadata) error {
- return &InvalidRequestException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *InvalidRequestException) Code() string {
- return "InvalidRequestException"
-}
-
-// Message returns the exception's message.
-func (s *InvalidRequestException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *InvalidRequestException) OrigErr() error {
- return nil
-}
-
-func (s *InvalidRequestException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *InvalidRequestException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *InvalidRequestException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-type ListAccountRolesInput struct {
- _ struct{} `type:"structure" nopayload:"true"`
-
- // The token issued by the CreateToken API call. For more information, see CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the AWS SSO OIDC API Reference Guide.
- //
- // AccessToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by ListAccountRolesInput's
- // String and GoString methods.
- //
- // AccessToken is a required field
- AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
-
- // The identifier for the AWS account that is assigned to the user.
- //
- // AccountId is a required field
- AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`
-
- // The number of items that clients can request per page.
- MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"`
-
- // The page token from the previous response output when you request subsequent
- // pages.
- NextToken *string `location:"querystring" locationName:"next_token" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountRolesInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountRolesInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListAccountRolesInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListAccountRolesInput"}
- if s.AccessToken == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessToken"))
- }
- if s.AccountId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccountId"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessToken sets the AccessToken field's value.
-func (s *ListAccountRolesInput) SetAccessToken(v string) *ListAccountRolesInput {
- s.AccessToken = &v
- return s
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *ListAccountRolesInput) SetAccountId(v string) *ListAccountRolesInput {
- s.AccountId = &v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListAccountRolesInput) SetMaxResults(v int64) *ListAccountRolesInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountRolesInput) SetNextToken(v string) *ListAccountRolesInput {
- s.NextToken = &v
- return s
-}
-
-type ListAccountRolesOutput struct {
- _ struct{} `type:"structure"`
-
- // The page token client that is used to retrieve the list of accounts.
- NextToken *string `locationName:"nextToken" type:"string"`
-
- // A paginated response with the list of roles and the next token if more results
- // are available.
- RoleList []*RoleInfo `locationName:"roleList" type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountRolesOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountRolesOutput) GoString() string {
- return s.String()
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountRolesOutput) SetNextToken(v string) *ListAccountRolesOutput {
- s.NextToken = &v
- return s
-}
-
-// SetRoleList sets the RoleList field's value.
-func (s *ListAccountRolesOutput) SetRoleList(v []*RoleInfo) *ListAccountRolesOutput {
- s.RoleList = v
- return s
-}
-
-type ListAccountsInput struct {
- _ struct{} `type:"structure" nopayload:"true"`
-
- // The token issued by the CreateToken API call. For more information, see CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the AWS SSO OIDC API Reference Guide.
- //
- // AccessToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by ListAccountsInput's
- // String and GoString methods.
- //
- // AccessToken is a required field
- AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
-
- // This is the number of items clients can request per page.
- MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"`
-
- // (Optional) When requesting subsequent pages, this is the page token from
- // the previous response output.
- NextToken *string `location:"querystring" locationName:"next_token" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountsInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountsInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *ListAccountsInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "ListAccountsInput"}
- if s.AccessToken == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessToken"))
- }
- if s.MaxResults != nil && *s.MaxResults < 1 {
- invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessToken sets the AccessToken field's value.
-func (s *ListAccountsInput) SetAccessToken(v string) *ListAccountsInput {
- s.AccessToken = &v
- return s
-}
-
-// SetMaxResults sets the MaxResults field's value.
-func (s *ListAccountsInput) SetMaxResults(v int64) *ListAccountsInput {
- s.MaxResults = &v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountsInput) SetNextToken(v string) *ListAccountsInput {
- s.NextToken = &v
- return s
-}
-
-type ListAccountsOutput struct {
- _ struct{} `type:"structure"`
-
- // A paginated response with the list of account information and the next token
- // if more results are available.
- AccountList []*AccountInfo `locationName:"accountList" type:"list"`
-
- // The page token client that is used to retrieve the list of accounts.
- NextToken *string `locationName:"nextToken" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountsOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ListAccountsOutput) GoString() string {
- return s.String()
-}
-
-// SetAccountList sets the AccountList field's value.
-func (s *ListAccountsOutput) SetAccountList(v []*AccountInfo) *ListAccountsOutput {
- s.AccountList = v
- return s
-}
-
-// SetNextToken sets the NextToken field's value.
-func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput {
- s.NextToken = &v
- return s
-}
-
-type LogoutInput struct {
- _ struct{} `type:"structure" nopayload:"true"`
-
- // The token issued by the CreateToken API call. For more information, see CreateToken
- // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
- // in the AWS SSO OIDC API Reference Guide.
- //
- // AccessToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by LogoutInput's
- // String and GoString methods.
- //
- // AccessToken is a required field
- AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LogoutInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LogoutInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *LogoutInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "LogoutInput"}
- if s.AccessToken == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessToken"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessToken sets the AccessToken field's value.
-func (s *LogoutInput) SetAccessToken(v string) *LogoutInput {
- s.AccessToken = &v
- return s
-}
-
-type LogoutOutput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LogoutOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s LogoutOutput) GoString() string {
- return s.String()
-}
-
-// The specified resource doesn't exist.
-type ResourceNotFoundException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ResourceNotFoundException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s ResourceNotFoundException) GoString() string {
- return s.String()
-}
-
-func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
- return &ResourceNotFoundException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *ResourceNotFoundException) Code() string {
- return "ResourceNotFoundException"
-}
-
-// Message returns the exception's message.
-func (s *ResourceNotFoundException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *ResourceNotFoundException) OrigErr() error {
- return nil
-}
-
-func (s *ResourceNotFoundException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *ResourceNotFoundException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *ResourceNotFoundException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Provides information about the role credentials that are assigned to the
-// user.
-type RoleCredentials struct {
- _ struct{} `type:"structure"`
-
- // The identifier used for the temporary security credentials. For more information,
- // see Using Temporary Security Credentials to Request Access to AWS Resources
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
- // in the AWS IAM User Guide.
- AccessKeyId *string `locationName:"accessKeyId" type:"string"`
-
- // The date on which temporary security credentials expire.
- Expiration *int64 `locationName:"expiration" type:"long"`
-
- // The key that is used to sign the request. For more information, see Using
- // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
- // in the AWS IAM User Guide.
- //
- // SecretAccessKey is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by RoleCredentials's
- // String and GoString methods.
- SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"`
-
- // The token used for temporary credentials. For more information, see Using
- // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
- // in the AWS IAM User Guide.
- //
- // SessionToken is a sensitive parameter and its value will be
- // replaced with "sensitive" in string returned by RoleCredentials's
- // String and GoString methods.
- SessionToken *string `locationName:"sessionToken" type:"string" sensitive:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoleCredentials) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoleCredentials) GoString() string {
- return s.String()
-}
-
-// SetAccessKeyId sets the AccessKeyId field's value.
-func (s *RoleCredentials) SetAccessKeyId(v string) *RoleCredentials {
- s.AccessKeyId = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *RoleCredentials) SetExpiration(v int64) *RoleCredentials {
- s.Expiration = &v
- return s
-}
-
-// SetSecretAccessKey sets the SecretAccessKey field's value.
-func (s *RoleCredentials) SetSecretAccessKey(v string) *RoleCredentials {
- s.SecretAccessKey = &v
- return s
-}
-
-// SetSessionToken sets the SessionToken field's value.
-func (s *RoleCredentials) SetSessionToken(v string) *RoleCredentials {
- s.SessionToken = &v
- return s
-}
-
-// Provides information about the role that is assigned to the user.
-type RoleInfo struct {
- _ struct{} `type:"structure"`
-
- // The identifier of the AWS account assigned to the user.
- AccountId *string `locationName:"accountId" type:"string"`
-
- // The friendly name of the role that is assigned to the user.
- RoleName *string `locationName:"roleName" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoleInfo) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s RoleInfo) GoString() string {
- return s.String()
-}
-
-// SetAccountId sets the AccountId field's value.
-func (s *RoleInfo) SetAccountId(v string) *RoleInfo {
- s.AccountId = &v
- return s
-}
-
-// SetRoleName sets the RoleName field's value.
-func (s *RoleInfo) SetRoleName(v string) *RoleInfo {
- s.RoleName = &v
- return s
-}
-
-// Indicates that the request is being made too frequently and is more than
-// what the server can handle.
-type TooManyRequestsException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TooManyRequestsException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s TooManyRequestsException) GoString() string {
- return s.String()
-}
-
-func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error {
- return &TooManyRequestsException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *TooManyRequestsException) Code() string {
- return "TooManyRequestsException"
-}
-
-// Message returns the exception's message.
-func (s *TooManyRequestsException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *TooManyRequestsException) OrigErr() error {
- return nil
-}
-
-func (s *TooManyRequestsException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *TooManyRequestsException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *TooManyRequestsException) RequestID() string {
- return s.RespMetadata.RequestID
-}
-
-// Indicates that the request is not authorized. This can happen due to an invalid
-// access token in the request.
-type UnauthorizedException struct {
- _ struct{} `type:"structure"`
- RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
-
- Message_ *string `locationName:"message" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UnauthorizedException) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s UnauthorizedException) GoString() string {
- return s.String()
-}
-
-func newErrorUnauthorizedException(v protocol.ResponseMetadata) error {
- return &UnauthorizedException{
- RespMetadata: v,
- }
-}
-
-// Code returns the exception type name.
-func (s *UnauthorizedException) Code() string {
- return "UnauthorizedException"
-}
-
-// Message returns the exception's message.
-func (s *UnauthorizedException) Message() string {
- if s.Message_ != nil {
- return *s.Message_
- }
- return ""
-}
-
-// OrigErr always returns nil, satisfies awserr.Error interface.
-func (s *UnauthorizedException) OrigErr() error {
- return nil
-}
-
-func (s *UnauthorizedException) Error() string {
- return fmt.Sprintf("%s: %s", s.Code(), s.Message())
-}
-
-// Status code returns the HTTP status code for the request's response error.
-func (s *UnauthorizedException) StatusCode() int {
- return s.RespMetadata.StatusCode
-}
-
-// RequestID returns the service's response RequestID for request.
-func (s *UnauthorizedException) RequestID() string {
- return s.RespMetadata.RequestID
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sso/doc.go
deleted file mode 100644
index 92d82b2af..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/doc.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package sso provides the client and types for making API
-// requests to AWS Single Sign-On.
-//
-// AWS Single Sign-On Portal is a web service that makes it easy for you to
-// assign user access to AWS SSO resources such as the user portal. Users can
-// get AWS account applications and roles assigned to them and get federated
-// into the application.
-//
-// For general information about AWS SSO, see What is AWS Single Sign-On? (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html)
-// in the AWS SSO User Guide.
-//
-// This API reference guide describes the AWS SSO Portal operations that you
-// can call programatically and includes detailed information on data types
-// and errors.
-//
-// AWS provides SDKs that consist of libraries and sample code for various programming
-// languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs
-// provide a convenient way to create programmatic access to AWS SSO and other
-// AWS services. For more information about the AWS SDKs, including how to download
-// and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/).
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10 for more information on this service.
-//
-// See sso package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/sso/
-//
-// Using the Client
-//
-// To contact AWS Single Sign-On with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the AWS Single Sign-On client SSO for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/sso/#New
-package sso
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sso/errors.go
deleted file mode 100644
index 77a6792e3..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/errors.go
+++ /dev/null
@@ -1,44 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sso
-
-import (
- "github.com/aws/aws-sdk-go/private/protocol"
-)
-
-const (
-
- // ErrCodeInvalidRequestException for service response error code
- // "InvalidRequestException".
- //
- // Indicates that a problem occurred with the input to the request. For example,
- // a required parameter might be missing or out of range.
- ErrCodeInvalidRequestException = "InvalidRequestException"
-
- // ErrCodeResourceNotFoundException for service response error code
- // "ResourceNotFoundException".
- //
- // The specified resource doesn't exist.
- ErrCodeResourceNotFoundException = "ResourceNotFoundException"
-
- // ErrCodeTooManyRequestsException for service response error code
- // "TooManyRequestsException".
- //
- // Indicates that the request is being made too frequently and is more than
- // what the server can handle.
- ErrCodeTooManyRequestsException = "TooManyRequestsException"
-
- // ErrCodeUnauthorizedException for service response error code
- // "UnauthorizedException".
- //
- // Indicates that the request is not authorized. This can happen due to an invalid
- // access token in the request.
- ErrCodeUnauthorizedException = "UnauthorizedException"
-)
-
-var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{
- "InvalidRequestException": newErrorInvalidRequestException,
- "ResourceNotFoundException": newErrorResourceNotFoundException,
- "TooManyRequestsException": newErrorTooManyRequestsException,
- "UnauthorizedException": newErrorUnauthorizedException,
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/service.go b/vendor/github.com/aws/aws-sdk-go/service/sso/service.go
deleted file mode 100644
index 7a28dc797..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/service.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sso
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol"
- "github.com/aws/aws-sdk-go/private/protocol/restjson"
-)
-
-// SSO provides the API operation methods for making requests to
-// AWS Single Sign-On. See this package's package overview docs
-// for details on the service.
-//
-// SSO methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type SSO struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "SSO" // Name of service.
- EndpointsID = "portal.sso" // ID to lookup a service endpoint with.
- ServiceID = "SSO" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the SSO client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// mySession := session.Must(session.NewSession())
-//
-// // Create a SSO client from just a session.
-// svc := sso.New(mySession)
-//
-// // Create a SSO client with additional configuration
-// svc := sso.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSO {
- c := p.ClientConfig(EndpointsID, cfgs...)
- if c.SigningNameDerived || len(c.SigningName) == 0 {
- c.SigningName = "awsssoportal"
- }
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *SSO {
- svc := &SSO{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2019-06-10",
- ResolvedRegion: resolvedRegion,
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(restjson.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(
- protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(),
- )
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a SSO operation and runs any
-// custom request initialization.
-func (c *SSO) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go
deleted file mode 100644
index 4cac247c1..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go
+++ /dev/null
@@ -1,86 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package ssoiface provides an interface to enable mocking the AWS Single Sign-On service client
-// for testing your code.
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters.
-package ssoiface
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/service/sso"
-)
-
-// SSOAPI provides an interface to enable mocking the
-// sso.SSO service client's API operation,
-// paginators, and waiters. This make unit testing your code that calls out
-// to the SDK's service client's calls easier.
-//
-// The best way to use this interface is so the SDK's service client's calls
-// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the SDK's request pipeline.
-//
-// // myFunc uses an SDK service client to make a request to
-// // AWS Single Sign-On.
-// func myFunc(svc ssoiface.SSOAPI) bool {
-// // Make svc.GetRoleCredentials request
-// }
-//
-// func main() {
-// sess := session.New()
-// svc := sso.New(sess)
-//
-// myFunc(svc)
-// }
-//
-// In your _test.go file:
-//
-// // Define a mock struct to be used in your unit tests of myFunc.
-// type mockSSOClient struct {
-// ssoiface.SSOAPI
-// }
-// func (m *mockSSOClient) GetRoleCredentials(input *sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error) {
-// // mock response/functionality
-// }
-//
-// func TestMyFunc(t *testing.T) {
-// // Setup Test
-// mockSvc := &mockSSOClient{}
-//
-// myfunc(mockSvc)
-//
-// // Verify myFunc's functionality
-// }
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters. Its suggested to use the pattern above for testing, or using
-// tooling to generate mocks to satisfy the interfaces.
-type SSOAPI interface {
- GetRoleCredentials(*sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error)
- GetRoleCredentialsWithContext(aws.Context, *sso.GetRoleCredentialsInput, ...request.Option) (*sso.GetRoleCredentialsOutput, error)
- GetRoleCredentialsRequest(*sso.GetRoleCredentialsInput) (*request.Request, *sso.GetRoleCredentialsOutput)
-
- ListAccountRoles(*sso.ListAccountRolesInput) (*sso.ListAccountRolesOutput, error)
- ListAccountRolesWithContext(aws.Context, *sso.ListAccountRolesInput, ...request.Option) (*sso.ListAccountRolesOutput, error)
- ListAccountRolesRequest(*sso.ListAccountRolesInput) (*request.Request, *sso.ListAccountRolesOutput)
-
- ListAccountRolesPages(*sso.ListAccountRolesInput, func(*sso.ListAccountRolesOutput, bool) bool) error
- ListAccountRolesPagesWithContext(aws.Context, *sso.ListAccountRolesInput, func(*sso.ListAccountRolesOutput, bool) bool, ...request.Option) error
-
- ListAccounts(*sso.ListAccountsInput) (*sso.ListAccountsOutput, error)
- ListAccountsWithContext(aws.Context, *sso.ListAccountsInput, ...request.Option) (*sso.ListAccountsOutput, error)
- ListAccountsRequest(*sso.ListAccountsInput) (*request.Request, *sso.ListAccountsOutput)
-
- ListAccountsPages(*sso.ListAccountsInput, func(*sso.ListAccountsOutput, bool) bool) error
- ListAccountsPagesWithContext(aws.Context, *sso.ListAccountsInput, func(*sso.ListAccountsOutput, bool) bool, ...request.Option) error
-
- Logout(*sso.LogoutInput) (*sso.LogoutOutput, error)
- LogoutWithContext(aws.Context, *sso.LogoutInput, ...request.Option) (*sso.LogoutOutput, error)
- LogoutRequest(*sso.LogoutInput) (*request.Request, *sso.LogoutOutput)
-}
-
-var _ SSOAPI = (*sso.SSO)(nil)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
deleted file mode 100644
index 1e7fa6557..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go
+++ /dev/null
@@ -1,3437 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sts
-
-import (
- "fmt"
- "time"
-
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/awsutil"
- "github.com/aws/aws-sdk-go/aws/credentials"
- "github.com/aws/aws-sdk-go/aws/request"
-)
-
-const opAssumeRole = "AssumeRole"
-
-// AssumeRoleRequest generates a "aws/request.Request" representing the
-// client's request for the AssumeRole operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See AssumeRole for more information on using the AssumeRole
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the AssumeRoleRequest method.
-// req, resp := client.AssumeRoleRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
-func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, output *AssumeRoleOutput) {
- op := &request.Operation{
- Name: opAssumeRole,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssumeRoleInput{}
- }
-
- output = &AssumeRoleOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// AssumeRole API operation for AWS Security Token Service.
-//
-// Returns a set of temporary security credentials that you can use to access
-// Amazon Web Services resources that you might not normally have access to.
-// These temporary credentials consist of an access key ID, a secret access
-// key, and a security token. Typically, you use AssumeRole within your account
-// or for cross-account access. For a comparison of AssumeRole with other API
-// operations that produce temporary credentials, see Requesting Temporary Security
-// Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// Permissions
-//
-// The temporary security credentials created by AssumeRole can be used to make
-// API calls to any Amazon Web Services service with the following exception:
-// You cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken
-// API operations.
-//
-// (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
-// to this operation. You can pass a single JSON policy document to use as an
-// inline session policy. You can also specify up to 10 managed policies to
-// use as managed session policies. The plaintext that you use for both inline
-// and managed session policies can't exceed 2,048 characters. Passing policies
-// to this operation returns new temporary credentials. The resulting session's
-// permissions are the intersection of the role's identity-based policy and
-// the session policies. You can use the role's temporary credentials in subsequent
-// Amazon Web Services API calls to access resources in the account that owns
-// the role. You cannot use session policies to grant more permissions than
-// those allowed by the identity-based policy of the role that is being assumed.
-// For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
-// in the IAM User Guide.
-//
-// When you create a role, you create two policies: A role trust policy that
-// specifies who can assume the role and a permissions policy that specifies
-// what can be done with the role. You specify the trusted principal who is
-// allowed to assume the role in the role trust policy.
-//
-// To assume a role from a different account, your Amazon Web Services account
-// must be trusted by the role. The trust relationship is defined in the role's
-// trust policy when the role is created. That trust policy states which accounts
-// are allowed to delegate that access to users in the account.
-//
-// A user who wants to access a role in a different account must also have permissions
-// that are delegated from the user account administrator. The administrator
-// must attach a policy that allows the user to call AssumeRole for the ARN
-// of the role in the other account.
-//
-// To allow a user to assume a role in the same account, you can do either of
-// the following:
-//
-// * Attach a policy to the user that allows the user to call AssumeRole
-// (as long as the role's trust policy trusts the account).
-//
-// * Add the user as a principal directly in the role's trust policy.
-//
-// You can do either because the role’s trust policy acts as an IAM resource-based
-// policy. When a resource-based policy grants access to a principal in the
-// same account, no additional identity-based policy is required. For more information
-// about trust policies and resource-based policies, see IAM Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
-// in the IAM User Guide.
-//
-// Tags
-//
-// (Optional) You can pass tag key-value pairs to your session. These tags are
-// called session tags. For more information about session tags, see Passing
-// Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
-// in the IAM User Guide.
-//
-// An administrator must grant you the permissions necessary to pass session
-// tags. The administrator can also create granular permissions to allow you
-// to pass only specific session tags. For more information, see Tutorial: Using
-// Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
-// in the IAM User Guide.
-//
-// You can set the session tags as transitive. Transitive tags persist during
-// role chaining. For more information, see Chaining Roles with Session Tags
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
-// in the IAM User Guide.
-//
-// Using MFA with AssumeRole
-//
-// (Optional) You can include multi-factor authentication (MFA) information
-// when you call AssumeRole. This is useful for cross-account scenarios to ensure
-// that the user that assumes the role has been authenticated with an Amazon
-// Web Services MFA device. In that scenario, the trust policy of the role being
-// assumed includes a condition that tests for MFA authentication. If the caller
-// does not include valid MFA information, the request to assume the role is
-// denied. The condition in a trust policy that tests for MFA authentication
-// might look like the following example.
-//
-// "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}}
-//
-// For more information, see Configuring MFA-Protected API Access (https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html)
-// in the IAM User Guide guide.
-//
-// To use MFA with AssumeRole, you pass values for the SerialNumber and TokenCode
-// parameters. The SerialNumber value identifies the user's hardware or virtual
-// MFA device. The TokenCode is the time-based one-time password (TOTP) that
-// the MFA device produces.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation AssumeRole for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
-// The request was rejected because the policy document was malformed. The error
-// message describes the specific error.
-//
-// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the total packed size of the session policies
-// and session tags combined was too large. An Amazon Web Services conversion
-// compresses the session policy document, session policy ARNs, and session
-// tags into a packed binary format that has a separate limit. The error message
-// indicates by percentage how close the policies and tags are to the upper
-// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
-// in the IAM User Guide.
-//
-// You could receive this error even though you meet other defined session policy
-// and session tag limits. For more information, see IAM and STS Entity Character
-// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// * ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// * ErrCodeExpiredTokenException "ExpiredTokenException"
-// The web identity token that was passed is expired or is not valid. Get a
-// new identity token from the identity provider and then retry the request.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRole
-func (c *STS) AssumeRole(input *AssumeRoleInput) (*AssumeRoleOutput, error) {
- req, out := c.AssumeRoleRequest(input)
- return out, req.Send()
-}
-
-// AssumeRoleWithContext is the same as AssumeRole with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AssumeRole for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *STS) AssumeRoleWithContext(ctx aws.Context, input *AssumeRoleInput, opts ...request.Option) (*AssumeRoleOutput, error) {
- req, out := c.AssumeRoleRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opAssumeRoleWithSAML = "AssumeRoleWithSAML"
-
-// AssumeRoleWithSAMLRequest generates a "aws/request.Request" representing the
-// client's request for the AssumeRoleWithSAML operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See AssumeRoleWithSAML for more information on using the AssumeRoleWithSAML
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the AssumeRoleWithSAMLRequest method.
-// req, resp := client.AssumeRoleWithSAMLRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
-func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *request.Request, output *AssumeRoleWithSAMLOutput) {
- op := &request.Operation{
- Name: opAssumeRoleWithSAML,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssumeRoleWithSAMLInput{}
- }
-
- output = &AssumeRoleWithSAMLOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// AssumeRoleWithSAML API operation for AWS Security Token Service.
-//
-// Returns a set of temporary security credentials for users who have been authenticated
-// via a SAML authentication response. This operation provides a mechanism for
-// tying an enterprise identity store or directory to role-based Amazon Web
-// Services access without user-specific credentials or configuration. For a
-// comparison of AssumeRoleWithSAML with the other API operations that produce
-// temporary credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// The temporary security credentials returned by this operation consist of
-// an access key ID, a secret access key, and a security token. Applications
-// can use these temporary security credentials to sign calls to Amazon Web
-// Services services.
-//
-// Session Duration
-//
-// By default, the temporary security credentials created by AssumeRoleWithSAML
-// last for one hour. However, you can use the optional DurationSeconds parameter
-// to specify the duration of your session. Your role session lasts for the
-// duration that you specify, or until the time specified in the SAML authentication
-// response's SessionNotOnOrAfter value, whichever is shorter. You can provide
-// a DurationSeconds value from 900 seconds (15 minutes) up to the maximum session
-// duration setting for the role. This setting can have a value from 1 hour
-// to 12 hours. To learn how to view the maximum value for your role, see View
-// the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
-// in the IAM User Guide. The maximum session duration limit applies when you
-// use the AssumeRole* API operations or the assume-role* CLI commands. However
-// the limit does not apply when you use those operations to create a console
-// URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
-// in the IAM User Guide.
-//
-// Role chaining (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining)
-// limits your CLI or Amazon Web Services API role session to a maximum of one
-// hour. When you use the AssumeRole API operation to assume a role, you can
-// specify the duration of your role session with the DurationSeconds parameter.
-// You can specify a parameter value of up to 43200 seconds (12 hours), depending
-// on the maximum session duration setting for your role. However, if you assume
-// a role using role chaining and provide a DurationSeconds parameter value
-// greater than one hour, the operation fails.
-//
-// Permissions
-//
-// The temporary security credentials created by AssumeRoleWithSAML can be used
-// to make API calls to any Amazon Web Services service with the following exception:
-// you cannot call the STS GetFederationToken or GetSessionToken API operations.
-//
-// (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
-// to this operation. You can pass a single JSON policy document to use as an
-// inline session policy. You can also specify up to 10 managed policies to
-// use as managed session policies. The plaintext that you use for both inline
-// and managed session policies can't exceed 2,048 characters. Passing policies
-// to this operation returns new temporary credentials. The resulting session's
-// permissions are the intersection of the role's identity-based policy and
-// the session policies. You can use the role's temporary credentials in subsequent
-// Amazon Web Services API calls to access resources in the account that owns
-// the role. You cannot use session policies to grant more permissions than
-// those allowed by the identity-based policy of the role that is being assumed.
-// For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
-// in the IAM User Guide.
-//
-// Calling AssumeRoleWithSAML does not require the use of Amazon Web Services
-// security credentials. The identity of the caller is validated by using keys
-// in the metadata document that is uploaded for the SAML provider entity for
-// your identity provider.
-//
-// Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs.
-// The entry includes the value in the NameID element of the SAML assertion.
-// We recommend that you use a NameIDType that is not associated with any personally
-// identifiable information (PII). For example, you could instead use the persistent
-// identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent).
-//
-// Tags
-//
-// (Optional) You can configure your IdP to pass attributes into your SAML assertion
-// as session tags. Each session tag consists of a key name and an associated
-// value. For more information about session tags, see Passing Session Tags
-// in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
-// in the IAM User Guide.
-//
-// You can pass up to 50 session tags. The plaintext session tag keys can’t
-// exceed 128 characters and the values can’t exceed 256 characters. For these
-// and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// An Amazon Web Services conversion compresses the passed session policies
-// and session tags into a packed binary format that has a separate limit. Your
-// request can fail for this limit even if your plaintext meets the other requirements.
-// The PackedPolicySize response element indicates by percentage how close the
-// policies and tags for your request are to the upper size limit.
-//
-// You can pass a session tag with the same key as a tag that is attached to
-// the role. When you do, session tags override the role's tags with the same
-// key.
-//
-// An administrator must grant you the permissions necessary to pass session
-// tags. The administrator can also create granular permissions to allow you
-// to pass only specific session tags. For more information, see Tutorial: Using
-// Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
-// in the IAM User Guide.
-//
-// You can set the session tags as transitive. Transitive tags persist during
-// role chaining. For more information, see Chaining Roles with Session Tags
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
-// in the IAM User Guide.
-//
-// SAML Configuration
-//
-// Before your application can call AssumeRoleWithSAML, you must configure your
-// SAML identity provider (IdP) to issue the claims required by Amazon Web Services.
-// Additionally, you must use Identity and Access Management (IAM) to create
-// a SAML provider entity in your Amazon Web Services account that represents
-// your identity provider. You must also create an IAM role that specifies this
-// SAML provider in its trust policy.
-//
-// For more information, see the following resources:
-//
-// * About SAML 2.0-based Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html)
-// in the IAM User Guide.
-//
-// * Creating SAML Identity Providers (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html)
-// in the IAM User Guide.
-//
-// * Configuring a Relying Party and Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html)
-// in the IAM User Guide.
-//
-// * Creating a Role for SAML 2.0 Federation (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html)
-// in the IAM User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation AssumeRoleWithSAML for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
-// The request was rejected because the policy document was malformed. The error
-// message describes the specific error.
-//
-// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the total packed size of the session policies
-// and session tags combined was too large. An Amazon Web Services conversion
-// compresses the session policy document, session policy ARNs, and session
-// tags into a packed binary format that has a separate limit. The error message
-// indicates by percentage how close the policies and tags are to the upper
-// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
-// in the IAM User Guide.
-//
-// You could receive this error even though you meet other defined session policy
-// and session tag limits. For more information, see IAM and STS Entity Character
-// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// * ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
-// The identity provider (IdP) reported that authentication failed. This might
-// be because the claim is invalid.
-//
-// If this error is returned for the AssumeRoleWithWebIdentity operation, it
-// can also mean that the claim has expired or has been explicitly revoked.
-//
-// * ErrCodeInvalidIdentityTokenException "InvalidIdentityToken"
-// The web identity token that was passed could not be validated by Amazon Web
-// Services. Get a new identity token from the identity provider and then retry
-// the request.
-//
-// * ErrCodeExpiredTokenException "ExpiredTokenException"
-// The web identity token that was passed is expired or is not valid. Get a
-// new identity token from the identity provider and then retry the request.
-//
-// * ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML
-func (c *STS) AssumeRoleWithSAML(input *AssumeRoleWithSAMLInput) (*AssumeRoleWithSAMLOutput, error) {
- req, out := c.AssumeRoleWithSAMLRequest(input)
- return out, req.Send()
-}
-
-// AssumeRoleWithSAMLWithContext is the same as AssumeRoleWithSAML with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AssumeRoleWithSAML for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *STS) AssumeRoleWithSAMLWithContext(ctx aws.Context, input *AssumeRoleWithSAMLInput, opts ...request.Option) (*AssumeRoleWithSAMLOutput, error) {
- req, out := c.AssumeRoleWithSAMLRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opAssumeRoleWithWebIdentity = "AssumeRoleWithWebIdentity"
-
-// AssumeRoleWithWebIdentityRequest generates a "aws/request.Request" representing the
-// client's request for the AssumeRoleWithWebIdentity operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See AssumeRoleWithWebIdentity for more information on using the AssumeRoleWithWebIdentity
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the AssumeRoleWithWebIdentityRequest method.
-// req, resp := client.AssumeRoleWithWebIdentityRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
-func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityInput) (req *request.Request, output *AssumeRoleWithWebIdentityOutput) {
- op := &request.Operation{
- Name: opAssumeRoleWithWebIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &AssumeRoleWithWebIdentityInput{}
- }
-
- output = &AssumeRoleWithWebIdentityOutput{}
- req = c.newRequest(op, input, output)
- req.Config.Credentials = credentials.AnonymousCredentials
- return
-}
-
-// AssumeRoleWithWebIdentity API operation for AWS Security Token Service.
-//
-// Returns a set of temporary security credentials for users who have been authenticated
-// in a mobile or web application with a web identity provider. Example providers
-// include Amazon Cognito, Login with Amazon, Facebook, Google, or any OpenID
-// Connect-compatible identity provider.
-//
-// For mobile applications, we recommend that you use Amazon Cognito. You can
-// use Amazon Cognito with the Amazon Web Services SDK for iOS Developer Guide
-// (http://aws.amazon.com/sdkforios/) and the Amazon Web Services SDK for Android
-// Developer Guide (http://aws.amazon.com/sdkforandroid/) to uniquely identify
-// a user. You can also supply the user with a consistent identity throughout
-// the lifetime of an application.
-//
-// To learn more about Amazon Cognito, see Amazon Cognito Overview (https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840)
-// in Amazon Web Services SDK for Android Developer Guide and Amazon Cognito
-// Overview (https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664)
-// in the Amazon Web Services SDK for iOS Developer Guide.
-//
-// Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web
-// Services security credentials. Therefore, you can distribute an application
-// (for example, on mobile devices) that requests temporary security credentials
-// without including long-term Amazon Web Services credentials in the application.
-// You also don't need to deploy server-based proxy services that use long-term
-// Amazon Web Services credentials. Instead, the identity of the caller is validated
-// by using a token from the web identity provider. For a comparison of AssumeRoleWithWebIdentity
-// with the other API operations that produce temporary credentials, see Requesting
-// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// The temporary security credentials returned by this API consist of an access
-// key ID, a secret access key, and a security token. Applications can use these
-// temporary security credentials to sign calls to Amazon Web Services service
-// API operations.
-//
-// Session Duration
-//
-// By default, the temporary security credentials created by AssumeRoleWithWebIdentity
-// last for one hour. However, you can use the optional DurationSeconds parameter
-// to specify the duration of your session. You can provide a value from 900
-// seconds (15 minutes) up to the maximum session duration setting for the role.
-// This setting can have a value from 1 hour to 12 hours. To learn how to view
-// the maximum value for your role, see View the Maximum Session Duration Setting
-// for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
-// in the IAM User Guide. The maximum session duration limit applies when you
-// use the AssumeRole* API operations or the assume-role* CLI commands. However
-// the limit does not apply when you use those operations to create a console
-// URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html)
-// in the IAM User Guide.
-//
-// Permissions
-//
-// The temporary security credentials created by AssumeRoleWithWebIdentity can
-// be used to make API calls to any Amazon Web Services service with the following
-// exception: you cannot call the STS GetFederationToken or GetSessionToken
-// API operations.
-//
-// (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
-// to this operation. You can pass a single JSON policy document to use as an
-// inline session policy. You can also specify up to 10 managed policies to
-// use as managed session policies. The plaintext that you use for both inline
-// and managed session policies can't exceed 2,048 characters. Passing policies
-// to this operation returns new temporary credentials. The resulting session's
-// permissions are the intersection of the role's identity-based policy and
-// the session policies. You can use the role's temporary credentials in subsequent
-// Amazon Web Services API calls to access resources in the account that owns
-// the role. You cannot use session policies to grant more permissions than
-// those allowed by the identity-based policy of the role that is being assumed.
-// For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
-// in the IAM User Guide.
-//
-// Tags
-//
-// (Optional) You can configure your IdP to pass attributes into your web identity
-// token as session tags. Each session tag consists of a key name and an associated
-// value. For more information about session tags, see Passing Session Tags
-// in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
-// in the IAM User Guide.
-//
-// You can pass up to 50 session tags. The plaintext session tag keys can’t
-// exceed 128 characters and the values can’t exceed 256 characters. For these
-// and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// An Amazon Web Services conversion compresses the passed session policies
-// and session tags into a packed binary format that has a separate limit. Your
-// request can fail for this limit even if your plaintext meets the other requirements.
-// The PackedPolicySize response element indicates by percentage how close the
-// policies and tags for your request are to the upper size limit.
-//
-// You can pass a session tag with the same key as a tag that is attached to
-// the role. When you do, the session tag overrides the role tag with the same
-// key.
-//
-// An administrator must grant you the permissions necessary to pass session
-// tags. The administrator can also create granular permissions to allow you
-// to pass only specific session tags. For more information, see Tutorial: Using
-// Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
-// in the IAM User Guide.
-//
-// You can set the session tags as transitive. Transitive tags persist during
-// role chaining. For more information, see Chaining Roles with Session Tags
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
-// in the IAM User Guide.
-//
-// Identities
-//
-// Before your application can call AssumeRoleWithWebIdentity, you must have
-// an identity token from a supported identity provider and create a role that
-// the application can assume. The role that your application assumes must trust
-// the identity provider that is associated with the identity token. In other
-// words, the identity provider must be specified in the role's trust policy.
-//
-// Calling AssumeRoleWithWebIdentity can result in an entry in your CloudTrail
-// logs. The entry includes the Subject (http://openid.net/specs/openid-connect-core-1_0.html#Claims)
-// of the provided web identity token. We recommend that you avoid using any
-// personally identifiable information (PII) in this field. For example, you
-// could instead use a GUID or a pairwise identifier, as suggested in the OIDC
-// specification (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes).
-//
-// For more information about how to use web identity federation and the AssumeRoleWithWebIdentity
-// API, see the following resources:
-//
-// * Using Web Identity Federation API Operations for Mobile Apps (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html)
-// and Federation Through a Web-based Identity Provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity).
-//
-// * Web Identity Federation Playground (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/).
-// Walk through the process of authenticating through Login with Amazon,
-// Facebook, or Google, getting temporary security credentials, and then
-// using those credentials to make a request to Amazon Web Services.
-//
-// * Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/)
-// and Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/).
-// These toolkits contain sample apps that show how to invoke the identity
-// providers. The toolkits then show how to use the information from these
-// providers to get and use temporary security credentials.
-//
-// * Web Identity Federation with Mobile Applications (http://aws.amazon.com/articles/web-identity-federation-with-mobile-applications).
-// This article discusses web identity federation and shows an example of
-// how to use web identity federation to get access to content in Amazon
-// S3.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation AssumeRoleWithWebIdentity for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
-// The request was rejected because the policy document was malformed. The error
-// message describes the specific error.
-//
-// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the total packed size of the session policies
-// and session tags combined was too large. An Amazon Web Services conversion
-// compresses the session policy document, session policy ARNs, and session
-// tags into a packed binary format that has a separate limit. The error message
-// indicates by percentage how close the policies and tags are to the upper
-// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
-// in the IAM User Guide.
-//
-// You could receive this error even though you meet other defined session policy
-// and session tag limits. For more information, see IAM and STS Entity Character
-// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// * ErrCodeIDPRejectedClaimException "IDPRejectedClaim"
-// The identity provider (IdP) reported that authentication failed. This might
-// be because the claim is invalid.
-//
-// If this error is returned for the AssumeRoleWithWebIdentity operation, it
-// can also mean that the claim has expired or has been explicitly revoked.
-//
-// * ErrCodeIDPCommunicationErrorException "IDPCommunicationError"
-// The request could not be fulfilled because the identity provider (IDP) that
-// was asked to verify the incoming identity token could not be reached. This
-// is often a transient error caused by network conditions. Retry the request
-// a limited number of times so that you don't exceed the request rate. If the
-// error persists, the identity provider might be down or not responding.
-//
-// * ErrCodeInvalidIdentityTokenException "InvalidIdentityToken"
-// The web identity token that was passed could not be validated by Amazon Web
-// Services. Get a new identity token from the identity provider and then retry
-// the request.
-//
-// * ErrCodeExpiredTokenException "ExpiredTokenException"
-// The web identity token that was passed is expired or is not valid. Get a
-// new identity token from the identity provider and then retry the request.
-//
-// * ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity
-func (c *STS) AssumeRoleWithWebIdentity(input *AssumeRoleWithWebIdentityInput) (*AssumeRoleWithWebIdentityOutput, error) {
- req, out := c.AssumeRoleWithWebIdentityRequest(input)
- return out, req.Send()
-}
-
-// AssumeRoleWithWebIdentityWithContext is the same as AssumeRoleWithWebIdentity with the addition of
-// the ability to pass a context and additional request options.
-//
-// See AssumeRoleWithWebIdentity for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *STS) AssumeRoleWithWebIdentityWithContext(ctx aws.Context, input *AssumeRoleWithWebIdentityInput, opts ...request.Option) (*AssumeRoleWithWebIdentityOutput, error) {
- req, out := c.AssumeRoleWithWebIdentityRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opDecodeAuthorizationMessage = "DecodeAuthorizationMessage"
-
-// DecodeAuthorizationMessageRequest generates a "aws/request.Request" representing the
-// client's request for the DecodeAuthorizationMessage operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See DecodeAuthorizationMessage for more information on using the DecodeAuthorizationMessage
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the DecodeAuthorizationMessageRequest method.
-// req, resp := client.DecodeAuthorizationMessageRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
-func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessageInput) (req *request.Request, output *DecodeAuthorizationMessageOutput) {
- op := &request.Operation{
- Name: opDecodeAuthorizationMessage,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &DecodeAuthorizationMessageInput{}
- }
-
- output = &DecodeAuthorizationMessageOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// DecodeAuthorizationMessage API operation for AWS Security Token Service.
-//
-// Decodes additional information about the authorization status of a request
-// from an encoded message returned in response to an Amazon Web Services request.
-//
-// For example, if a user is not authorized to perform an operation that he
-// or she has requested, the request returns a Client.UnauthorizedOperation
-// response (an HTTP 403 response). Some Amazon Web Services operations additionally
-// return an encoded message that can provide details about this authorization
-// failure.
-//
-// Only certain Amazon Web Services operations return an encoded authorization
-// message. The documentation for an individual operation indicates whether
-// that operation returns an encoded message in addition to returning an HTTP
-// code.
-//
-// The message is encoded because the details of the authorization status can
-// contain privileged information that the user who requested the operation
-// should not see. To decode an authorization status message, a user must be
-// granted permissions through an IAM policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html)
-// to request the DecodeAuthorizationMessage (sts:DecodeAuthorizationMessage)
-// action.
-//
-// The decoded message includes the following type of information:
-//
-// * Whether the request was denied due to an explicit deny or due to the
-// absence of an explicit allow. For more information, see Determining Whether
-// a Request is Allowed or Denied (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow)
-// in the IAM User Guide.
-//
-// * The principal who made the request.
-//
-// * The requested action.
-//
-// * The requested resource.
-//
-// * The values of condition keys in the context of the user's request.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation DecodeAuthorizationMessage for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeInvalidAuthorizationMessageException "InvalidAuthorizationMessageException"
-// The error returned if the message passed to DecodeAuthorizationMessage was
-// invalid. This can happen if the token contains invalid characters, such as
-// linebreaks.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/DecodeAuthorizationMessage
-func (c *STS) DecodeAuthorizationMessage(input *DecodeAuthorizationMessageInput) (*DecodeAuthorizationMessageOutput, error) {
- req, out := c.DecodeAuthorizationMessageRequest(input)
- return out, req.Send()
-}
-
-// DecodeAuthorizationMessageWithContext is the same as DecodeAuthorizationMessage with the addition of
-// the ability to pass a context and additional request options.
-//
-// See DecodeAuthorizationMessage for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *STS) DecodeAuthorizationMessageWithContext(ctx aws.Context, input *DecodeAuthorizationMessageInput, opts ...request.Option) (*DecodeAuthorizationMessageOutput, error) {
- req, out := c.DecodeAuthorizationMessageRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetAccessKeyInfo = "GetAccessKeyInfo"
-
-// GetAccessKeyInfoRequest generates a "aws/request.Request" representing the
-// client's request for the GetAccessKeyInfo operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetAccessKeyInfo for more information on using the GetAccessKeyInfo
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetAccessKeyInfoRequest method.
-// req, resp := client.GetAccessKeyInfoRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo
-func (c *STS) GetAccessKeyInfoRequest(input *GetAccessKeyInfoInput) (req *request.Request, output *GetAccessKeyInfoOutput) {
- op := &request.Operation{
- Name: opGetAccessKeyInfo,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetAccessKeyInfoInput{}
- }
-
- output = &GetAccessKeyInfoOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetAccessKeyInfo API operation for AWS Security Token Service.
-//
-// Returns the account identifier for the specified access key ID.
-//
-// Access keys consist of two parts: an access key ID (for example, AKIAIOSFODNN7EXAMPLE)
-// and a secret access key (for example, wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY).
-// For more information about access keys, see Managing Access Keys for IAM
-// Users (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)
-// in the IAM User Guide.
-//
-// When you pass an access key ID to this operation, it returns the ID of the
-// Amazon Web Services account to which the keys belong. Access key IDs beginning
-// with AKIA are long-term credentials for an IAM user or the Amazon Web Services
-// account root user. Access key IDs beginning with ASIA are temporary credentials
-// that are created using STS operations. If the account in the response belongs
-// to you, you can sign in as the root user and review your root user access
-// keys. Then, you can pull a credentials report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html)
-// to learn which IAM user owns the keys. To learn who requested the temporary
-// credentials for an ASIA access key, view the STS events in your CloudTrail
-// logs (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html)
-// in the IAM User Guide.
-//
-// This operation does not indicate the state of the access key. The key might
-// be active, inactive, or deleted. Active keys might not have permissions to
-// perform an operation. Providing a deleted access key might return an error
-// that the key doesn't exist.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation GetAccessKeyInfo for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetAccessKeyInfo
-func (c *STS) GetAccessKeyInfo(input *GetAccessKeyInfoInput) (*GetAccessKeyInfoOutput, error) {
- req, out := c.GetAccessKeyInfoRequest(input)
- return out, req.Send()
-}
-
-// GetAccessKeyInfoWithContext is the same as GetAccessKeyInfo with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetAccessKeyInfo for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *STS) GetAccessKeyInfoWithContext(ctx aws.Context, input *GetAccessKeyInfoInput, opts ...request.Option) (*GetAccessKeyInfoOutput, error) {
- req, out := c.GetAccessKeyInfoRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetCallerIdentity = "GetCallerIdentity"
-
-// GetCallerIdentityRequest generates a "aws/request.Request" representing the
-// client's request for the GetCallerIdentity operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetCallerIdentity for more information on using the GetCallerIdentity
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetCallerIdentityRequest method.
-// req, resp := client.GetCallerIdentityRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
-func (c *STS) GetCallerIdentityRequest(input *GetCallerIdentityInput) (req *request.Request, output *GetCallerIdentityOutput) {
- op := &request.Operation{
- Name: opGetCallerIdentity,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetCallerIdentityInput{}
- }
-
- output = &GetCallerIdentityOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetCallerIdentity API operation for AWS Security Token Service.
-//
-// Returns details about the IAM user or role whose credentials are used to
-// call the operation.
-//
-// No permissions are required to perform this operation. If an administrator
-// adds a policy to your IAM user or role that explicitly denies access to the
-// sts:GetCallerIdentity action, you can still perform this operation. Permissions
-// are not required because the same information is returned when an IAM user
-// or role is denied access. To view an example response, see I Am Not Authorized
-// to Perform: iam:DeleteVirtualMFADevice (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa)
-// in the IAM User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation GetCallerIdentity for usage and error information.
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetCallerIdentity
-func (c *STS) GetCallerIdentity(input *GetCallerIdentityInput) (*GetCallerIdentityOutput, error) {
- req, out := c.GetCallerIdentityRequest(input)
- return out, req.Send()
-}
-
-// GetCallerIdentityWithContext is the same as GetCallerIdentity with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetCallerIdentity for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *STS) GetCallerIdentityWithContext(ctx aws.Context, input *GetCallerIdentityInput, opts ...request.Option) (*GetCallerIdentityOutput, error) {
- req, out := c.GetCallerIdentityRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetFederationToken = "GetFederationToken"
-
-// GetFederationTokenRequest generates a "aws/request.Request" representing the
-// client's request for the GetFederationToken operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetFederationToken for more information on using the GetFederationToken
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetFederationTokenRequest method.
-// req, resp := client.GetFederationTokenRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
-func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *request.Request, output *GetFederationTokenOutput) {
- op := &request.Operation{
- Name: opGetFederationToken,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetFederationTokenInput{}
- }
-
- output = &GetFederationTokenOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetFederationToken API operation for AWS Security Token Service.
-//
-// Returns a set of temporary security credentials (consisting of an access
-// key ID, a secret access key, and a security token) for a federated user.
-// A typical use is in a proxy application that gets temporary security credentials
-// on behalf of distributed applications inside a corporate network. You must
-// call the GetFederationToken operation using the long-term security credentials
-// of an IAM user. As a result, this call is appropriate in contexts where those
-// credentials can be safely stored, usually in a server-based application.
-// For a comparison of GetFederationToken with the other API operations that
-// produce temporary credentials, see Requesting Temporary Security Credentials
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// You can create a mobile-based or browser-based app that can authenticate
-// users using a web identity provider like Login with Amazon, Facebook, Google,
-// or an OpenID Connect-compatible identity provider. In this case, we recommend
-// that you use Amazon Cognito (http://aws.amazon.com/cognito/) or AssumeRoleWithWebIdentity.
-// For more information, see Federation Through a Web-based Identity Provider
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
-// in the IAM User Guide.
-//
-// You can also call GetFederationToken using the security credentials of an
-// Amazon Web Services account root user, but we do not recommend it. Instead,
-// we recommend that you create an IAM user for the purpose of the proxy application.
-// Then attach a policy to the IAM user that limits federated users to only
-// the actions and resources that they need to access. For more information,
-// see IAM Best Practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html)
-// in the IAM User Guide.
-//
-// Session duration
-//
-// The temporary credentials are valid for the specified duration, from 900
-// seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default
-// session duration is 43,200 seconds (12 hours). Temporary credentials obtained
-// by using the Amazon Web Services account root user credentials have a maximum
-// duration of 3,600 seconds (1 hour).
-//
-// Permissions
-//
-// You can use the temporary credentials created by GetFederationToken in any
-// Amazon Web Services service except the following:
-//
-// * You cannot call any IAM operations using the CLI or the Amazon Web Services
-// API.
-//
-// * You cannot call any STS operations except GetCallerIdentity.
-//
-// You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
-// to this operation. You can pass a single JSON policy document to use as an
-// inline session policy. You can also specify up to 10 managed policies to
-// use as managed session policies. The plaintext that you use for both inline
-// and managed session policies can't exceed 2,048 characters.
-//
-// Though the session policy parameters are optional, if you do not pass a policy,
-// then the resulting federated user session has no permissions. When you pass
-// session policies, the session permissions are the intersection of the IAM
-// user policies and the session policies that you pass. This gives you a way
-// to further restrict the permissions for a federated user. You cannot use
-// session policies to grant more permissions than those that are defined in
-// the permissions policy of the IAM user. For more information, see Session
-// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
-// in the IAM User Guide. For information about using GetFederationToken to
-// create temporary security credentials, see GetFederationToken—Federation
-// Through a Custom Identity Broker (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken).
-//
-// You can use the credentials to access a resource that has a resource-based
-// policy. If that policy specifically references the federated user session
-// in the Principal element of the policy, the session has the permissions allowed
-// by the policy. These permissions are granted in addition to the permissions
-// granted by the session policies.
-//
-// Tags
-//
-// (Optional) You can pass tag key-value pairs to your session. These are called
-// session tags. For more information about session tags, see Passing Session
-// Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
-// in the IAM User Guide.
-//
-// You can create a mobile-based or browser-based app that can authenticate
-// users using a web identity provider like Login with Amazon, Facebook, Google,
-// or an OpenID Connect-compatible identity provider. In this case, we recommend
-// that you use Amazon Cognito (http://aws.amazon.com/cognito/) or AssumeRoleWithWebIdentity.
-// For more information, see Federation Through a Web-based Identity Provider
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity)
-// in the IAM User Guide.
-//
-// An administrator must grant you the permissions necessary to pass session
-// tags. The administrator can also create granular permissions to allow you
-// to pass only specific session tags. For more information, see Tutorial: Using
-// Tags for Attribute-Based Access Control (https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html)
-// in the IAM User Guide.
-//
-// Tag key–value pairs are not case sensitive, but case is preserved. This
-// means that you cannot have separate Department and department tag keys. Assume
-// that the user that you are federating has the Department=Marketing tag and
-// you pass the department=engineering session tag. Department and department
-// are not saved as separate tags, and the session tag passed in the request
-// takes precedence over the user tag.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation GetFederationToken for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeMalformedPolicyDocumentException "MalformedPolicyDocument"
-// The request was rejected because the policy document was malformed. The error
-// message describes the specific error.
-//
-// * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge"
-// The request was rejected because the total packed size of the session policies
-// and session tags combined was too large. An Amazon Web Services conversion
-// compresses the session policy document, session policy ARNs, and session
-// tags into a packed binary format that has a separate limit. The error message
-// indicates by percentage how close the policies and tags are to the upper
-// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
-// in the IAM User Guide.
-//
-// You could receive this error even though you meet other defined session policy
-// and session tag limits. For more information, see IAM and STS Entity Character
-// Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
-// in the IAM User Guide.
-//
-// * ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken
-func (c *STS) GetFederationToken(input *GetFederationTokenInput) (*GetFederationTokenOutput, error) {
- req, out := c.GetFederationTokenRequest(input)
- return out, req.Send()
-}
-
-// GetFederationTokenWithContext is the same as GetFederationToken with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetFederationToken for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *STS) GetFederationTokenWithContext(ctx aws.Context, input *GetFederationTokenInput, opts ...request.Option) (*GetFederationTokenOutput, error) {
- req, out := c.GetFederationTokenRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-const opGetSessionToken = "GetSessionToken"
-
-// GetSessionTokenRequest generates a "aws/request.Request" representing the
-// client's request for the GetSessionToken operation. The "output" return
-// value will be populated with the request's response once the request completes
-// successfully.
-//
-// Use "Send" method on the returned Request to send the API call to the service.
-// the "output" return value is not valid until after Send returns without error.
-//
-// See GetSessionToken for more information on using the GetSessionToken
-// API call, and error handling.
-//
-// This method is useful when you want to inject custom logic or configuration
-// into the SDK's request lifecycle. Such as custom headers, or retry logic.
-//
-//
-// // Example sending a request using the GetSessionTokenRequest method.
-// req, resp := client.GetSessionTokenRequest(params)
-//
-// err := req.Send()
-// if err == nil { // resp is now filled
-// fmt.Println(resp)
-// }
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
-func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request.Request, output *GetSessionTokenOutput) {
- op := &request.Operation{
- Name: opGetSessionToken,
- HTTPMethod: "POST",
- HTTPPath: "/",
- }
-
- if input == nil {
- input = &GetSessionTokenInput{}
- }
-
- output = &GetSessionTokenOutput{}
- req = c.newRequest(op, input, output)
- return
-}
-
-// GetSessionToken API operation for AWS Security Token Service.
-//
-// Returns a set of temporary credentials for an Amazon Web Services account
-// or IAM user. The credentials consist of an access key ID, a secret access
-// key, and a security token. Typically, you use GetSessionToken if you want
-// to use MFA to protect programmatic calls to specific Amazon Web Services
-// API operations like Amazon EC2 StopInstances. MFA-enabled IAM users would
-// need to call GetSessionToken and submit an MFA code that is associated with
-// their MFA device. Using the temporary security credentials that are returned
-// from the call, IAM users can then make programmatic calls to API operations
-// that require MFA authentication. If you do not supply a correct MFA code,
-// then the API returns an access denied error. For a comparison of GetSessionToken
-// with the other API operations that produce temporary credentials, see Requesting
-// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html)
-// and Comparing the Amazon Web Services STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison)
-// in the IAM User Guide.
-//
-// Session Duration
-//
-// The GetSessionToken operation must be called by using the long-term Amazon
-// Web Services security credentials of the Amazon Web Services account root
-// user or an IAM user. Credentials that are created by IAM users are valid
-// for the duration that you specify. This duration can range from 900 seconds
-// (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default
-// of 43,200 seconds (12 hours). Credentials based on account credentials can
-// range from 900 seconds (15 minutes) up to 3,600 seconds (1 hour), with a
-// default of 1 hour.
-//
-// Permissions
-//
-// The temporary security credentials created by GetSessionToken can be used
-// to make API calls to any Amazon Web Services service with the following exceptions:
-//
-// * You cannot call any IAM API operations unless MFA authentication information
-// is included in the request.
-//
-// * You cannot call any STS API except AssumeRole or GetCallerIdentity.
-//
-// We recommend that you do not call GetSessionToken with Amazon Web Services
-// account root user credentials. Instead, follow our best practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users)
-// by creating one or more IAM users, giving them the necessary permissions,
-// and using IAM users for everyday interaction with Amazon Web Services.
-//
-// The credentials that are returned by GetSessionToken are based on permissions
-// associated with the user whose credentials were used to call the operation.
-// If GetSessionToken is called using Amazon Web Services account root user
-// credentials, the temporary credentials have root user permissions. Similarly,
-// if GetSessionToken is called using the credentials of an IAM user, the temporary
-// credentials have the same permissions as the IAM user.
-//
-// For more information about using GetSessionToken to create temporary credentials,
-// go to Temporary Credentials for Users in Untrusted Environments (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken)
-// in the IAM User Guide.
-//
-// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
-// with awserr.Error's Code and Message methods to get detailed information about
-// the error.
-//
-// See the AWS API reference guide for AWS Security Token Service's
-// API operation GetSessionToken for usage and error information.
-//
-// Returned Error Codes:
-// * ErrCodeRegionDisabledException "RegionDisabledException"
-// STS is not activated in the requested region for the account that is being
-// asked to generate credentials. The account administrator must use the IAM
-// console to activate STS in that region. For more information, see Activating
-// and Deactivating Amazon Web Services STS in an Amazon Web Services Region
-// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
-// in the IAM User Guide.
-//
-// See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken
-func (c *STS) GetSessionToken(input *GetSessionTokenInput) (*GetSessionTokenOutput, error) {
- req, out := c.GetSessionTokenRequest(input)
- return out, req.Send()
-}
-
-// GetSessionTokenWithContext is the same as GetSessionToken with the addition of
-// the ability to pass a context and additional request options.
-//
-// See GetSessionToken for details on how to use this API operation.
-//
-// The context must be non-nil and will be used for request cancellation. If
-// the context is nil a panic will occur. In the future the SDK may create
-// sub-contexts for http.Requests. See https://golang.org/pkg/context/
-// for more information on using Contexts.
-func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionTokenInput, opts ...request.Option) (*GetSessionTokenOutput, error) {
- req, out := c.GetSessionTokenRequest(input)
- req.SetContext(ctx)
- req.ApplyOptions(opts...)
- return out, req.Send()
-}
-
-type AssumeRoleInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, of the role session. The value specified can range
- // from 900 seconds (15 minutes) up to the maximum session duration set for
- // the role. The maximum session duration setting can have a value from 1 hour
- // to 12 hours. If you specify a value higher than this setting or the administrator
- // setting (whichever is lower), the operation fails. For example, if you specify
- // a session duration of 12 hours, but your administrator set the maximum session
- // duration to 6 hours, your operation fails.
- //
- // Role chaining limits your Amazon Web Services CLI or Amazon Web Services
- // API role session to a maximum of one hour. When you use the AssumeRole API
- // operation to assume a role, you can specify the duration of your role session
- // with the DurationSeconds parameter. You can specify a parameter value of
- // up to 43200 seconds (12 hours), depending on the maximum session duration
- // setting for your role. However, if you assume a role using role chaining
- // and provide a DurationSeconds parameter value greater than one hour, the
- // operation fails. To learn how to view the maximum value for your role, see
- // View the Maximum Session Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
- // in the IAM User Guide.
- //
- // By default, the value is set to 3600 seconds.
- //
- // The DurationSeconds parameter is separate from the duration of a console
- // session that you might request using the returned credentials. The request
- // to the federation endpoint for a console sign-in token takes a SessionDuration
- // parameter that specifies the maximum length of the console session. For more
- // information, see Creating a URL that Enables Federated Users to Access the
- // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
- // in the IAM User Guide.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // A unique identifier that might be required when you assume a role in another
- // account. If the administrator of the account to which the role belongs provided
- // you with an external ID, then provide that value in the ExternalId parameter.
- // This value can be any string, such as a passphrase or account number. A cross-account
- // role is usually set up to trust everyone in an account. Therefore, the administrator
- // of the trusting account might send an external ID to the administrator of
- // the trusted account. That way, only someone with the ID can assume the role,
- // rather than everyone in the account. For more information about the external
- // ID, see How to Use an External ID When Granting Access to Your Amazon Web
- // Services Resources to a Third Party (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@:/-
- ExternalId *string `min:"2" type:"string"`
-
- // An IAM policy in JSON format that you want to use as an inline session policy.
- //
- // This parameter is optional. Passing policies to this operation returns new
- // temporary credentials. The resulting session's permissions are the intersection
- // of the role's identity-based policy and the session policies. You can use
- // the role's temporary credentials in subsequent Amazon Web Services API calls
- // to access resources in the account that owns the role. You cannot use session
- // policies to grant more permissions than those allowed by the identity-based
- // policy of the role that is being assumed. For more information, see Session
- // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // in the IAM User Guide.
- //
- // The plaintext that you use for both inline and managed session policies can't
- // exceed 2,048 characters. The JSON policy characters can be any ASCII character
- // from the space character to the end of the valid character list (\u0020 through
- // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
- // return (\u000D) characters.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- Policy *string `min:"1" type:"string"`
-
- // The Amazon Resource Names (ARNs) of the IAM managed policies that you want
- // to use as managed session policies. The policies must exist in the same account
- // as the role.
- //
- // This parameter is optional. You can provide up to 10 managed policy ARNs.
- // However, the plaintext that you use for both inline and managed session policies
- // can't exceed 2,048 characters. For more information about ARNs, see Amazon
- // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- //
- // Passing policies to this operation returns new temporary credentials. The
- // resulting session's permissions are the intersection of the role's identity-based
- // policy and the session policies. You can use the role's temporary credentials
- // in subsequent Amazon Web Services API calls to access resources in the account
- // that owns the role. You cannot use session policies to grant more permissions
- // than those allowed by the identity-based policy of the role that is being
- // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // in the IAM User Guide.
- PolicyArns []*PolicyDescriptorType `type:"list"`
-
- // The Amazon Resource Name (ARN) of the role to assume.
- //
- // RoleArn is a required field
- RoleArn *string `min:"20" type:"string" required:"true"`
-
- // An identifier for the assumed role session.
- //
- // Use the role session name to uniquely identify a session when the same role
- // is assumed by different principals or for different reasons. In cross-account
- // scenarios, the role session name is visible to, and can be logged by the
- // account that owns the role. The role session name is also used in the ARN
- // of the assumed role principal. This means that subsequent cross-account API
- // requests that use the temporary security credentials will expose the role
- // session name to the external account in their CloudTrail logs.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- //
- // RoleSessionName is a required field
- RoleSessionName *string `min:"2" type:"string" required:"true"`
-
- // The identification number of the MFA device that is associated with the user
- // who is making the AssumeRole call. Specify this value if the trust policy
- // of the role being assumed includes a condition that requires MFA authentication.
- // The value is either the serial number for a hardware device (such as GAHT12345678)
- // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- SerialNumber *string `min:"9" type:"string"`
-
- // The source identity specified by the principal that is calling the AssumeRole
- // operation.
- //
- // You can require users to specify a source identity when they assume a role.
- // You do this by using the sts:SourceIdentity condition key in a role trust
- // policy. You can use source identity information in CloudTrail logs to determine
- // who took actions with a role. You can use the aws:SourceIdentity condition
- // key to further control access to Amazon Web Services resources based on the
- // value of source identity. For more information about using source identity,
- // see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-. You cannot
- // use a value that begins with the text aws:. This prefix is reserved for Amazon
- // Web Services internal use.
- SourceIdentity *string `min:"2" type:"string"`
-
- // A list of session tags that you want to pass. Each session tag consists of
- // a key name and an associated value. For more information about session tags,
- // see Tagging Amazon Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
- // in the IAM User Guide.
- //
- // This parameter is optional. You can pass up to 50 session tags. The plaintext
- // session tag keys can’t exceed 128 characters, and the values can’t exceed
- // 256 characters. For these and additional limits, see IAM and STS Character
- // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
- // in the IAM User Guide.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- //
- // You can pass a session tag with the same key as a tag that is already attached
- // to the role. When you do, session tags override a role tag with the same
- // key.
- //
- // Tag key–value pairs are not case sensitive, but case is preserved. This
- // means that you cannot have separate Department and department tag keys. Assume
- // that the role has the Department=Marketing tag and you pass the department=engineering
- // session tag. Department and department are not saved as separate tags, and
- // the session tag passed in the request takes precedence over the role tag.
- //
- // Additionally, if you used temporary credentials to perform this operation,
- // the new session inherits any transitive session tags from the calling session.
- // If you pass a session tag with the same key as an inherited tag, the operation
- // fails. To view the inherited tags for a session, see the CloudTrail logs.
- // For more information, see Viewing Session Tags in CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/session-tags.html#id_session-tags_ctlogs)
- // in the IAM User Guide.
- Tags []*Tag `type:"list"`
-
- // The value provided by the MFA device, if the trust policy of the role being
- // assumed requires MFA. (In other words, if the policy includes a condition
- // that tests for MFA). If the role being assumed requires MFA and if the TokenCode
- // value is missing or expired, the AssumeRole call returns an "access denied"
- // error.
- //
- // The format for this parameter, as described by its regex pattern, is a sequence
- // of six numeric digits.
- TokenCode *string `min:"6" type:"string"`
-
- // A list of keys for session tags that you want to set as transitive. If you
- // set a tag key as transitive, the corresponding key and value passes to subsequent
- // sessions in a role chain. For more information, see Chaining Roles with Session
- // Tags (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining)
- // in the IAM User Guide.
- //
- // This parameter is optional. When you set session tags as transitive, the
- // session policy and session tags packed binary limit is not affected.
- //
- // If you choose not to specify a transitive tag key, then no tags are passed
- // from this session to any subsequent sessions.
- TransitiveTagKeys []*string `type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AssumeRoleInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AssumeRoleInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.ExternalId != nil && len(*s.ExternalId) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("ExternalId", 2))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.RoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleArn"))
- }
- if s.RoleArn != nil && len(*s.RoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
- }
- if s.RoleSessionName == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleSessionName"))
- }
- if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2))
- }
- if s.SerialNumber != nil && len(*s.SerialNumber) < 9 {
- invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9))
- }
- if s.SourceIdentity != nil && len(*s.SourceIdentity) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("SourceIdentity", 2))
- }
- if s.TokenCode != nil && len(*s.TokenCode) < 6 {
- invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6))
- }
- if s.PolicyArns != nil {
- for i, v := range s.PolicyArns {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *AssumeRoleInput) SetDurationSeconds(v int64) *AssumeRoleInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetExternalId sets the ExternalId field's value.
-func (s *AssumeRoleInput) SetExternalId(v string) *AssumeRoleInput {
- s.ExternalId = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *AssumeRoleInput) SetPolicy(v string) *AssumeRoleInput {
- s.Policy = &v
- return s
-}
-
-// SetPolicyArns sets the PolicyArns field's value.
-func (s *AssumeRoleInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleInput {
- s.PolicyArns = v
- return s
-}
-
-// SetRoleArn sets the RoleArn field's value.
-func (s *AssumeRoleInput) SetRoleArn(v string) *AssumeRoleInput {
- s.RoleArn = &v
- return s
-}
-
-// SetRoleSessionName sets the RoleSessionName field's value.
-func (s *AssumeRoleInput) SetRoleSessionName(v string) *AssumeRoleInput {
- s.RoleSessionName = &v
- return s
-}
-
-// SetSerialNumber sets the SerialNumber field's value.
-func (s *AssumeRoleInput) SetSerialNumber(v string) *AssumeRoleInput {
- s.SerialNumber = &v
- return s
-}
-
-// SetSourceIdentity sets the SourceIdentity field's value.
-func (s *AssumeRoleInput) SetSourceIdentity(v string) *AssumeRoleInput {
- s.SourceIdentity = &v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *AssumeRoleInput) SetTags(v []*Tag) *AssumeRoleInput {
- s.Tags = v
- return s
-}
-
-// SetTokenCode sets the TokenCode field's value.
-func (s *AssumeRoleInput) SetTokenCode(v string) *AssumeRoleInput {
- s.TokenCode = &v
- return s
-}
-
-// SetTransitiveTagKeys sets the TransitiveTagKeys field's value.
-func (s *AssumeRoleInput) SetTransitiveTagKeys(v []*string) *AssumeRoleInput {
- s.TransitiveTagKeys = v
- return s
-}
-
-// Contains the response to a successful AssumeRole request, including temporary
-// Amazon Web Services credentials that can be used to make Amazon Web Services
-// requests.
-type AssumeRoleOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers
- // that you can use to refer to the resulting temporary security credentials.
- // For example, you can reference these credentials as a principal in a resource-based
- // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName
- // that you specified when you called AssumeRole.
- AssumedRoleUser *AssumedRoleUser `type:"structure"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security (or session) token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-
- // A percentage value that indicates the packed size of the session policies
- // and session tags combined passed in the request. The request fails if the
- // packed size is greater than 100 percent, which means the policies and tags
- // exceeded the allowed space.
- PackedPolicySize *int64 `type:"integer"`
-
- // The source identity specified by the principal that is calling the AssumeRole
- // operation.
- //
- // You can require users to specify a source identity when they assume a role.
- // You do this by using the sts:SourceIdentity condition key in a role trust
- // policy. You can use source identity information in CloudTrail logs to determine
- // who took actions with a role. You can use the aws:SourceIdentity condition
- // key to further control access to Amazon Web Services resources based on the
- // value of source identity. For more information about using source identity,
- // see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- SourceIdentity *string `min:"2" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleOutput) GoString() string {
- return s.String()
-}
-
-// SetAssumedRoleUser sets the AssumedRoleUser field's value.
-func (s *AssumeRoleOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleOutput {
- s.AssumedRoleUser = v
- return s
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *AssumeRoleOutput) SetCredentials(v *Credentials) *AssumeRoleOutput {
- s.Credentials = v
- return s
-}
-
-// SetPackedPolicySize sets the PackedPolicySize field's value.
-func (s *AssumeRoleOutput) SetPackedPolicySize(v int64) *AssumeRoleOutput {
- s.PackedPolicySize = &v
- return s
-}
-
-// SetSourceIdentity sets the SourceIdentity field's value.
-func (s *AssumeRoleOutput) SetSourceIdentity(v string) *AssumeRoleOutput {
- s.SourceIdentity = &v
- return s
-}
-
-type AssumeRoleWithSAMLInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, of the role session. Your role session lasts for
- // the duration that you specify for the DurationSeconds parameter, or until
- // the time specified in the SAML authentication response's SessionNotOnOrAfter
- // value, whichever is shorter. You can provide a DurationSeconds value from
- // 900 seconds (15 minutes) up to the maximum session duration setting for the
- // role. This setting can have a value from 1 hour to 12 hours. If you specify
- // a value higher than this setting, the operation fails. For example, if you
- // specify a session duration of 12 hours, but your administrator set the maximum
- // session duration to 6 hours, your operation fails. To learn how to view the
- // maximum value for your role, see View the Maximum Session Duration Setting
- // for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
- // in the IAM User Guide.
- //
- // By default, the value is set to 3600 seconds.
- //
- // The DurationSeconds parameter is separate from the duration of a console
- // session that you might request using the returned credentials. The request
- // to the federation endpoint for a console sign-in token takes a SessionDuration
- // parameter that specifies the maximum length of the console session. For more
- // information, see Creating a URL that Enables Federated Users to Access the
- // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
- // in the IAM User Guide.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // An IAM policy in JSON format that you want to use as an inline session policy.
- //
- // This parameter is optional. Passing policies to this operation returns new
- // temporary credentials. The resulting session's permissions are the intersection
- // of the role's identity-based policy and the session policies. You can use
- // the role's temporary credentials in subsequent Amazon Web Services API calls
- // to access resources in the account that owns the role. You cannot use session
- // policies to grant more permissions than those allowed by the identity-based
- // policy of the role that is being assumed. For more information, see Session
- // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // in the IAM User Guide.
- //
- // The plaintext that you use for both inline and managed session policies can't
- // exceed 2,048 characters. The JSON policy characters can be any ASCII character
- // from the space character to the end of the valid character list (\u0020 through
- // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
- // return (\u000D) characters.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- Policy *string `min:"1" type:"string"`
-
- // The Amazon Resource Names (ARNs) of the IAM managed policies that you want
- // to use as managed session policies. The policies must exist in the same account
- // as the role.
- //
- // This parameter is optional. You can provide up to 10 managed policy ARNs.
- // However, the plaintext that you use for both inline and managed session policies
- // can't exceed 2,048 characters. For more information about ARNs, see Amazon
- // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- //
- // Passing policies to this operation returns new temporary credentials. The
- // resulting session's permissions are the intersection of the role's identity-based
- // policy and the session policies. You can use the role's temporary credentials
- // in subsequent Amazon Web Services API calls to access resources in the account
- // that owns the role. You cannot use session policies to grant more permissions
- // than those allowed by the identity-based policy of the role that is being
- // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // in the IAM User Guide.
- PolicyArns []*PolicyDescriptorType `type:"list"`
-
- // The Amazon Resource Name (ARN) of the SAML provider in IAM that describes
- // the IdP.
- //
- // PrincipalArn is a required field
- PrincipalArn *string `min:"20" type:"string" required:"true"`
-
- // The Amazon Resource Name (ARN) of the role that the caller is assuming.
- //
- // RoleArn is a required field
- RoleArn *string `min:"20" type:"string" required:"true"`
-
- // The base64 encoded SAML authentication response provided by the IdP.
- //
- // For more information, see Configuring a Relying Party and Adding Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html)
- // in the IAM User Guide.
- //
- // SAMLAssertion is a required field
- SAMLAssertion *string `min:"4" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithSAMLInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithSAMLInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AssumeRoleWithSAMLInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithSAMLInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.PrincipalArn == nil {
- invalidParams.Add(request.NewErrParamRequired("PrincipalArn"))
- }
- if s.PrincipalArn != nil && len(*s.PrincipalArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("PrincipalArn", 20))
- }
- if s.RoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleArn"))
- }
- if s.RoleArn != nil && len(*s.RoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
- }
- if s.SAMLAssertion == nil {
- invalidParams.Add(request.NewErrParamRequired("SAMLAssertion"))
- }
- if s.SAMLAssertion != nil && len(*s.SAMLAssertion) < 4 {
- invalidParams.Add(request.NewErrParamMinLen("SAMLAssertion", 4))
- }
- if s.PolicyArns != nil {
- for i, v := range s.PolicyArns {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *AssumeRoleWithSAMLInput) SetDurationSeconds(v int64) *AssumeRoleWithSAMLInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *AssumeRoleWithSAMLInput) SetPolicy(v string) *AssumeRoleWithSAMLInput {
- s.Policy = &v
- return s
-}
-
-// SetPolicyArns sets the PolicyArns field's value.
-func (s *AssumeRoleWithSAMLInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleWithSAMLInput {
- s.PolicyArns = v
- return s
-}
-
-// SetPrincipalArn sets the PrincipalArn field's value.
-func (s *AssumeRoleWithSAMLInput) SetPrincipalArn(v string) *AssumeRoleWithSAMLInput {
- s.PrincipalArn = &v
- return s
-}
-
-// SetRoleArn sets the RoleArn field's value.
-func (s *AssumeRoleWithSAMLInput) SetRoleArn(v string) *AssumeRoleWithSAMLInput {
- s.RoleArn = &v
- return s
-}
-
-// SetSAMLAssertion sets the SAMLAssertion field's value.
-func (s *AssumeRoleWithSAMLInput) SetSAMLAssertion(v string) *AssumeRoleWithSAMLInput {
- s.SAMLAssertion = &v
- return s
-}
-
-// Contains the response to a successful AssumeRoleWithSAML request, including
-// temporary Amazon Web Services credentials that can be used to make Amazon
-// Web Services requests.
-type AssumeRoleWithSAMLOutput struct {
- _ struct{} `type:"structure"`
-
- // The identifiers for the temporary security credentials that the operation
- // returns.
- AssumedRoleUser *AssumedRoleUser `type:"structure"`
-
- // The value of the Recipient attribute of the SubjectConfirmationData element
- // of the SAML assertion.
- Audience *string `type:"string"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security (or session) token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-
- // The value of the Issuer element of the SAML assertion.
- Issuer *string `type:"string"`
-
- // A hash value based on the concatenation of the following:
- //
- // * The Issuer response value.
- //
- // * The Amazon Web Services account ID.
- //
- // * The friendly name (the last part of the ARN) of the SAML provider in
- // IAM.
- //
- // The combination of NameQualifier and Subject can be used to uniquely identify
- // a federated user.
- //
- // The following pseudocode shows how the hash value is calculated:
- //
- // BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP"
- // ) )
- NameQualifier *string `type:"string"`
-
- // A percentage value that indicates the packed size of the session policies
- // and session tags combined passed in the request. The request fails if the
- // packed size is greater than 100 percent, which means the policies and tags
- // exceeded the allowed space.
- PackedPolicySize *int64 `type:"integer"`
-
- // The value in the SourceIdentity attribute in the SAML assertion.
- //
- // You can require users to set a source identity value when they assume a role.
- // You do this by using the sts:SourceIdentity condition key in a role trust
- // policy. That way, actions that are taken with the role are associated with
- // that user. After the source identity is set, the value cannot be changed.
- // It is present in the request for all actions that are taken by the role and
- // persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
- // sessions. You can configure your SAML identity provider to use an attribute
- // associated with your users, like user name or email, as the source identity
- // when calling AssumeRoleWithSAML. You do this by adding an attribute to the
- // SAML assertion. For more information about using source identity, see Monitor
- // and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- SourceIdentity *string `min:"2" type:"string"`
-
- // The value of the NameID element in the Subject element of the SAML assertion.
- Subject *string `type:"string"`
-
- // The format of the name ID, as defined by the Format attribute in the NameID
- // element of the SAML assertion. Typical examples of the format are transient
- // or persistent.
- //
- // If the format includes the prefix urn:oasis:names:tc:SAML:2.0:nameid-format,
- // that prefix is removed. For example, urn:oasis:names:tc:SAML:2.0:nameid-format:transient
- // is returned as transient. If the format includes any other prefix, the format
- // is returned with no modifications.
- SubjectType *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithSAMLOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithSAMLOutput) GoString() string {
- return s.String()
-}
-
-// SetAssumedRoleUser sets the AssumedRoleUser field's value.
-func (s *AssumeRoleWithSAMLOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleWithSAMLOutput {
- s.AssumedRoleUser = v
- return s
-}
-
-// SetAudience sets the Audience field's value.
-func (s *AssumeRoleWithSAMLOutput) SetAudience(v string) *AssumeRoleWithSAMLOutput {
- s.Audience = &v
- return s
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *AssumeRoleWithSAMLOutput) SetCredentials(v *Credentials) *AssumeRoleWithSAMLOutput {
- s.Credentials = v
- return s
-}
-
-// SetIssuer sets the Issuer field's value.
-func (s *AssumeRoleWithSAMLOutput) SetIssuer(v string) *AssumeRoleWithSAMLOutput {
- s.Issuer = &v
- return s
-}
-
-// SetNameQualifier sets the NameQualifier field's value.
-func (s *AssumeRoleWithSAMLOutput) SetNameQualifier(v string) *AssumeRoleWithSAMLOutput {
- s.NameQualifier = &v
- return s
-}
-
-// SetPackedPolicySize sets the PackedPolicySize field's value.
-func (s *AssumeRoleWithSAMLOutput) SetPackedPolicySize(v int64) *AssumeRoleWithSAMLOutput {
- s.PackedPolicySize = &v
- return s
-}
-
-// SetSourceIdentity sets the SourceIdentity field's value.
-func (s *AssumeRoleWithSAMLOutput) SetSourceIdentity(v string) *AssumeRoleWithSAMLOutput {
- s.SourceIdentity = &v
- return s
-}
-
-// SetSubject sets the Subject field's value.
-func (s *AssumeRoleWithSAMLOutput) SetSubject(v string) *AssumeRoleWithSAMLOutput {
- s.Subject = &v
- return s
-}
-
-// SetSubjectType sets the SubjectType field's value.
-func (s *AssumeRoleWithSAMLOutput) SetSubjectType(v string) *AssumeRoleWithSAMLOutput {
- s.SubjectType = &v
- return s
-}
-
-type AssumeRoleWithWebIdentityInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, of the role session. The value can range from 900
- // seconds (15 minutes) up to the maximum session duration setting for the role.
- // This setting can have a value from 1 hour to 12 hours. If you specify a value
- // higher than this setting, the operation fails. For example, if you specify
- // a session duration of 12 hours, but your administrator set the maximum session
- // duration to 6 hours, your operation fails. To learn how to view the maximum
- // value for your role, see View the Maximum Session Duration Setting for a
- // Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session)
- // in the IAM User Guide.
- //
- // By default, the value is set to 3600 seconds.
- //
- // The DurationSeconds parameter is separate from the duration of a console
- // session that you might request using the returned credentials. The request
- // to the federation endpoint for a console sign-in token takes a SessionDuration
- // parameter that specifies the maximum length of the console session. For more
- // information, see Creating a URL that Enables Federated Users to Access the
- // Amazon Web Services Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html)
- // in the IAM User Guide.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // An IAM policy in JSON format that you want to use as an inline session policy.
- //
- // This parameter is optional. Passing policies to this operation returns new
- // temporary credentials. The resulting session's permissions are the intersection
- // of the role's identity-based policy and the session policies. You can use
- // the role's temporary credentials in subsequent Amazon Web Services API calls
- // to access resources in the account that owns the role. You cannot use session
- // policies to grant more permissions than those allowed by the identity-based
- // policy of the role that is being assumed. For more information, see Session
- // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // in the IAM User Guide.
- //
- // The plaintext that you use for both inline and managed session policies can't
- // exceed 2,048 characters. The JSON policy characters can be any ASCII character
- // from the space character to the end of the valid character list (\u0020 through
- // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
- // return (\u000D) characters.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- Policy *string `min:"1" type:"string"`
-
- // The Amazon Resource Names (ARNs) of the IAM managed policies that you want
- // to use as managed session policies. The policies must exist in the same account
- // as the role.
- //
- // This parameter is optional. You can provide up to 10 managed policy ARNs.
- // However, the plaintext that you use for both inline and managed session policies
- // can't exceed 2,048 characters. For more information about ARNs, see Amazon
- // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- //
- // Passing policies to this operation returns new temporary credentials. The
- // resulting session's permissions are the intersection of the role's identity-based
- // policy and the session policies. You can use the role's temporary credentials
- // in subsequent Amazon Web Services API calls to access resources in the account
- // that owns the role. You cannot use session policies to grant more permissions
- // than those allowed by the identity-based policy of the role that is being
- // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // in the IAM User Guide.
- PolicyArns []*PolicyDescriptorType `type:"list"`
-
- // The fully qualified host component of the domain name of the identity provider.
- //
- // Specify this value only for OAuth 2.0 access tokens. Currently www.amazon.com
- // and graph.facebook.com are the only supported identity providers for OAuth
- // 2.0 access tokens. Do not include URL schemes and port numbers.
- //
- // Do not specify this value for OpenID Connect ID tokens.
- ProviderId *string `min:"4" type:"string"`
-
- // The Amazon Resource Name (ARN) of the role that the caller is assuming.
- //
- // RoleArn is a required field
- RoleArn *string `min:"20" type:"string" required:"true"`
-
- // An identifier for the assumed role session. Typically, you pass the name
- // or identifier that is associated with the user who is using your application.
- // That way, the temporary security credentials that your application will use
- // are associated with that user. This session name is included as part of the
- // ARN and assumed role ID in the AssumedRoleUser response element.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- //
- // RoleSessionName is a required field
- RoleSessionName *string `min:"2" type:"string" required:"true"`
-
- // The OAuth 2.0 access token or OpenID Connect ID token that is provided by
- // the identity provider. Your application must get this token by authenticating
- // the user who is using your application with a web identity provider before
- // the application makes an AssumeRoleWithWebIdentity call.
- //
- // WebIdentityToken is a required field
- WebIdentityToken *string `min:"4" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithWebIdentityInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithWebIdentityInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *AssumeRoleWithWebIdentityInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "AssumeRoleWithWebIdentityInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.ProviderId != nil && len(*s.ProviderId) < 4 {
- invalidParams.Add(request.NewErrParamMinLen("ProviderId", 4))
- }
- if s.RoleArn == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleArn"))
- }
- if s.RoleArn != nil && len(*s.RoleArn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20))
- }
- if s.RoleSessionName == nil {
- invalidParams.Add(request.NewErrParamRequired("RoleSessionName"))
- }
- if s.RoleSessionName != nil && len(*s.RoleSessionName) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("RoleSessionName", 2))
- }
- if s.WebIdentityToken == nil {
- invalidParams.Add(request.NewErrParamRequired("WebIdentityToken"))
- }
- if s.WebIdentityToken != nil && len(*s.WebIdentityToken) < 4 {
- invalidParams.Add(request.NewErrParamMinLen("WebIdentityToken", 4))
- }
- if s.PolicyArns != nil {
- for i, v := range s.PolicyArns {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetDurationSeconds(v int64) *AssumeRoleWithWebIdentityInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetPolicy(v string) *AssumeRoleWithWebIdentityInput {
- s.Policy = &v
- return s
-}
-
-// SetPolicyArns sets the PolicyArns field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetPolicyArns(v []*PolicyDescriptorType) *AssumeRoleWithWebIdentityInput {
- s.PolicyArns = v
- return s
-}
-
-// SetProviderId sets the ProviderId field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetProviderId(v string) *AssumeRoleWithWebIdentityInput {
- s.ProviderId = &v
- return s
-}
-
-// SetRoleArn sets the RoleArn field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetRoleArn(v string) *AssumeRoleWithWebIdentityInput {
- s.RoleArn = &v
- return s
-}
-
-// SetRoleSessionName sets the RoleSessionName field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetRoleSessionName(v string) *AssumeRoleWithWebIdentityInput {
- s.RoleSessionName = &v
- return s
-}
-
-// SetWebIdentityToken sets the WebIdentityToken field's value.
-func (s *AssumeRoleWithWebIdentityInput) SetWebIdentityToken(v string) *AssumeRoleWithWebIdentityInput {
- s.WebIdentityToken = &v
- return s
-}
-
-// Contains the response to a successful AssumeRoleWithWebIdentity request,
-// including temporary Amazon Web Services credentials that can be used to make
-// Amazon Web Services requests.
-type AssumeRoleWithWebIdentityOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers
- // that you can use to refer to the resulting temporary security credentials.
- // For example, you can reference these credentials as a principal in a resource-based
- // policy by using the ARN or assumed role ID. The ARN and ID include the RoleSessionName
- // that you specified when you called AssumeRole.
- AssumedRoleUser *AssumedRoleUser `type:"structure"`
-
- // The intended audience (also known as client ID) of the web identity token.
- // This is traditionally the client identifier issued to the application that
- // requested the web identity token.
- Audience *string `type:"string"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-
- // A percentage value that indicates the packed size of the session policies
- // and session tags combined passed in the request. The request fails if the
- // packed size is greater than 100 percent, which means the policies and tags
- // exceeded the allowed space.
- PackedPolicySize *int64 `type:"integer"`
-
- // The issuing authority of the web identity token presented. For OpenID Connect
- // ID tokens, this contains the value of the iss field. For OAuth 2.0 access
- // tokens, this contains the value of the ProviderId parameter that was passed
- // in the AssumeRoleWithWebIdentity request.
- Provider *string `type:"string"`
-
- // The value of the source identity that is returned in the JSON web token (JWT)
- // from the identity provider.
- //
- // You can require users to set a source identity value when they assume a role.
- // You do this by using the sts:SourceIdentity condition key in a role trust
- // policy. That way, actions that are taken with the role are associated with
- // that user. After the source identity is set, the value cannot be changed.
- // It is present in the request for all actions that are taken by the role and
- // persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining)
- // sessions. You can configure your identity provider to use an attribute associated
- // with your users, like user name or email, as the source identity when calling
- // AssumeRoleWithWebIdentity. You do this by adding a claim to the JSON web
- // token. To learn more about OIDC tokens and claims, see Using Tokens with
- // User Pools (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html)
- // in the Amazon Cognito Developer Guide. For more information about using source
- // identity, see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html)
- // in the IAM User Guide.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- SourceIdentity *string `min:"2" type:"string"`
-
- // The unique user identifier that is returned by the identity provider. This
- // identifier is associated with the WebIdentityToken that was submitted with
- // the AssumeRoleWithWebIdentity call. The identifier is typically unique to
- // the user and the application that acquired the WebIdentityToken (pairwise
- // identifier). For OpenID Connect ID tokens, this field contains the value
- // returned by the identity provider as the token's sub (Subject) claim.
- SubjectFromWebIdentityToken *string `min:"6" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithWebIdentityOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumeRoleWithWebIdentityOutput) GoString() string {
- return s.String()
-}
-
-// SetAssumedRoleUser sets the AssumedRoleUser field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetAssumedRoleUser(v *AssumedRoleUser) *AssumeRoleWithWebIdentityOutput {
- s.AssumedRoleUser = v
- return s
-}
-
-// SetAudience sets the Audience field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetAudience(v string) *AssumeRoleWithWebIdentityOutput {
- s.Audience = &v
- return s
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetCredentials(v *Credentials) *AssumeRoleWithWebIdentityOutput {
- s.Credentials = v
- return s
-}
-
-// SetPackedPolicySize sets the PackedPolicySize field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetPackedPolicySize(v int64) *AssumeRoleWithWebIdentityOutput {
- s.PackedPolicySize = &v
- return s
-}
-
-// SetProvider sets the Provider field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetProvider(v string) *AssumeRoleWithWebIdentityOutput {
- s.Provider = &v
- return s
-}
-
-// SetSourceIdentity sets the SourceIdentity field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetSourceIdentity(v string) *AssumeRoleWithWebIdentityOutput {
- s.SourceIdentity = &v
- return s
-}
-
-// SetSubjectFromWebIdentityToken sets the SubjectFromWebIdentityToken field's value.
-func (s *AssumeRoleWithWebIdentityOutput) SetSubjectFromWebIdentityToken(v string) *AssumeRoleWithWebIdentityOutput {
- s.SubjectFromWebIdentityToken = &v
- return s
-}
-
-// The identifiers for the temporary security credentials that the operation
-// returns.
-type AssumedRoleUser struct {
- _ struct{} `type:"structure"`
-
- // The ARN of the temporary security credentials that are returned from the
- // AssumeRole action. For more information about ARNs and how to use them in
- // policies, see IAM Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html)
- // in the IAM User Guide.
- //
- // Arn is a required field
- Arn *string `min:"20" type:"string" required:"true"`
-
- // A unique identifier that contains the role ID and the role session name of
- // the role that is being assumed. The role ID is generated by Amazon Web Services
- // when the role is created.
- //
- // AssumedRoleId is a required field
- AssumedRoleId *string `min:"2" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumedRoleUser) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s AssumedRoleUser) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *AssumedRoleUser) SetArn(v string) *AssumedRoleUser {
- s.Arn = &v
- return s
-}
-
-// SetAssumedRoleId sets the AssumedRoleId field's value.
-func (s *AssumedRoleUser) SetAssumedRoleId(v string) *AssumedRoleUser {
- s.AssumedRoleId = &v
- return s
-}
-
-// Amazon Web Services credentials for API authentication.
-type Credentials struct {
- _ struct{} `type:"structure"`
-
- // The access key ID that identifies the temporary security credentials.
- //
- // AccessKeyId is a required field
- AccessKeyId *string `min:"16" type:"string" required:"true"`
-
- // The date on which the current credentials expire.
- //
- // Expiration is a required field
- Expiration *time.Time `type:"timestamp" required:"true"`
-
- // The secret access key that can be used to sign requests.
- //
- // SecretAccessKey is a required field
- SecretAccessKey *string `type:"string" required:"true"`
-
- // The token that users must pass to the service API to use the temporary credentials.
- //
- // SessionToken is a required field
- SessionToken *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Credentials) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Credentials) GoString() string {
- return s.String()
-}
-
-// SetAccessKeyId sets the AccessKeyId field's value.
-func (s *Credentials) SetAccessKeyId(v string) *Credentials {
- s.AccessKeyId = &v
- return s
-}
-
-// SetExpiration sets the Expiration field's value.
-func (s *Credentials) SetExpiration(v time.Time) *Credentials {
- s.Expiration = &v
- return s
-}
-
-// SetSecretAccessKey sets the SecretAccessKey field's value.
-func (s *Credentials) SetSecretAccessKey(v string) *Credentials {
- s.SecretAccessKey = &v
- return s
-}
-
-// SetSessionToken sets the SessionToken field's value.
-func (s *Credentials) SetSessionToken(v string) *Credentials {
- s.SessionToken = &v
- return s
-}
-
-type DecodeAuthorizationMessageInput struct {
- _ struct{} `type:"structure"`
-
- // The encoded message that was returned with the response.
- //
- // EncodedMessage is a required field
- EncodedMessage *string `min:"1" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecodeAuthorizationMessageInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecodeAuthorizationMessageInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *DecodeAuthorizationMessageInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "DecodeAuthorizationMessageInput"}
- if s.EncodedMessage == nil {
- invalidParams.Add(request.NewErrParamRequired("EncodedMessage"))
- }
- if s.EncodedMessage != nil && len(*s.EncodedMessage) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("EncodedMessage", 1))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetEncodedMessage sets the EncodedMessage field's value.
-func (s *DecodeAuthorizationMessageInput) SetEncodedMessage(v string) *DecodeAuthorizationMessageInput {
- s.EncodedMessage = &v
- return s
-}
-
-// A document that contains additional information about the authorization status
-// of a request from an encoded message that is returned in response to an Amazon
-// Web Services request.
-type DecodeAuthorizationMessageOutput struct {
- _ struct{} `type:"structure"`
-
- // The API returns a response with the decoded message.
- DecodedMessage *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecodeAuthorizationMessageOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s DecodeAuthorizationMessageOutput) GoString() string {
- return s.String()
-}
-
-// SetDecodedMessage sets the DecodedMessage field's value.
-func (s *DecodeAuthorizationMessageOutput) SetDecodedMessage(v string) *DecodeAuthorizationMessageOutput {
- s.DecodedMessage = &v
- return s
-}
-
-// Identifiers for the federated user that is associated with the credentials.
-type FederatedUser struct {
- _ struct{} `type:"structure"`
-
- // The ARN that specifies the federated user that is associated with the credentials.
- // For more information about ARNs and how to use them in policies, see IAM
- // Identifiers (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html)
- // in the IAM User Guide.
- //
- // Arn is a required field
- Arn *string `min:"20" type:"string" required:"true"`
-
- // The string that identifies the federated user associated with the credentials,
- // similar to the unique ID of an IAM user.
- //
- // FederatedUserId is a required field
- FederatedUserId *string `min:"2" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s FederatedUser) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s FederatedUser) GoString() string {
- return s.String()
-}
-
-// SetArn sets the Arn field's value.
-func (s *FederatedUser) SetArn(v string) *FederatedUser {
- s.Arn = &v
- return s
-}
-
-// SetFederatedUserId sets the FederatedUserId field's value.
-func (s *FederatedUser) SetFederatedUserId(v string) *FederatedUser {
- s.FederatedUserId = &v
- return s
-}
-
-type GetAccessKeyInfoInput struct {
- _ struct{} `type:"structure"`
-
- // The identifier of an access key.
- //
- // This parameter allows (through its regex pattern) a string of characters
- // that can consist of any upper- or lowercase letter or digit.
- //
- // AccessKeyId is a required field
- AccessKeyId *string `min:"16" type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetAccessKeyInfoInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetAccessKeyInfoInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetAccessKeyInfoInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetAccessKeyInfoInput"}
- if s.AccessKeyId == nil {
- invalidParams.Add(request.NewErrParamRequired("AccessKeyId"))
- }
- if s.AccessKeyId != nil && len(*s.AccessKeyId) < 16 {
- invalidParams.Add(request.NewErrParamMinLen("AccessKeyId", 16))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetAccessKeyId sets the AccessKeyId field's value.
-func (s *GetAccessKeyInfoInput) SetAccessKeyId(v string) *GetAccessKeyInfoInput {
- s.AccessKeyId = &v
- return s
-}
-
-type GetAccessKeyInfoOutput struct {
- _ struct{} `type:"structure"`
-
- // The number used to identify the Amazon Web Services account.
- Account *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetAccessKeyInfoOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetAccessKeyInfoOutput) GoString() string {
- return s.String()
-}
-
-// SetAccount sets the Account field's value.
-func (s *GetAccessKeyInfoOutput) SetAccount(v string) *GetAccessKeyInfoOutput {
- s.Account = &v
- return s
-}
-
-type GetCallerIdentityInput struct {
- _ struct{} `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetCallerIdentityInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetCallerIdentityInput) GoString() string {
- return s.String()
-}
-
-// Contains the response to a successful GetCallerIdentity request, including
-// information about the entity making the request.
-type GetCallerIdentityOutput struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Web Services account ID number of the account that owns or contains
- // the calling entity.
- Account *string `type:"string"`
-
- // The Amazon Web Services ARN associated with the calling entity.
- Arn *string `min:"20" type:"string"`
-
- // The unique identifier of the calling entity. The exact value depends on the
- // type of entity that is making the call. The values returned are those listed
- // in the aws:userid column in the Principal table (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable)
- // found on the Policy Variables reference page in the IAM User Guide.
- UserId *string `type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetCallerIdentityOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetCallerIdentityOutput) GoString() string {
- return s.String()
-}
-
-// SetAccount sets the Account field's value.
-func (s *GetCallerIdentityOutput) SetAccount(v string) *GetCallerIdentityOutput {
- s.Account = &v
- return s
-}
-
-// SetArn sets the Arn field's value.
-func (s *GetCallerIdentityOutput) SetArn(v string) *GetCallerIdentityOutput {
- s.Arn = &v
- return s
-}
-
-// SetUserId sets the UserId field's value.
-func (s *GetCallerIdentityOutput) SetUserId(v string) *GetCallerIdentityOutput {
- s.UserId = &v
- return s
-}
-
-type GetFederationTokenInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, that the session should last. Acceptable durations
- // for federation sessions range from 900 seconds (15 minutes) to 129,600 seconds
- // (36 hours), with 43,200 seconds (12 hours) as the default. Sessions obtained
- // using Amazon Web Services account root user credentials are restricted to
- // a maximum of 3,600 seconds (one hour). If the specified duration is longer
- // than one hour, the session obtained by using root user credentials defaults
- // to one hour.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // The name of the federated user. The name is used as an identifier for the
- // temporary security credentials (such as Bob). For example, you can reference
- // the federated user name in a resource-based policy, such as in an Amazon
- // S3 bucket policy.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@-
- //
- // Name is a required field
- Name *string `min:"2" type:"string" required:"true"`
-
- // An IAM policy in JSON format that you want to use as an inline session policy.
- //
- // You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // to this operation. You can pass a single JSON policy document to use as an
- // inline session policy. You can also specify up to 10 managed policies to
- // use as managed session policies.
- //
- // This parameter is optional. However, if you do not pass any session policies,
- // then the resulting federated user session has no permissions.
- //
- // When you pass session policies, the session permissions are the intersection
- // of the IAM user policies and the session policies that you pass. This gives
- // you a way to further restrict the permissions for a federated user. You cannot
- // use session policies to grant more permissions than those that are defined
- // in the permissions policy of the IAM user. For more information, see Session
- // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // in the IAM User Guide.
- //
- // The resulting credentials can be used to access a resource that has a resource-based
- // policy. If that policy specifically references the federated user session
- // in the Principal element of the policy, the session has the permissions allowed
- // by the policy. These permissions are granted in addition to the permissions
- // that are granted by the session policies.
- //
- // The plaintext that you use for both inline and managed session policies can't
- // exceed 2,048 characters. The JSON policy characters can be any ASCII character
- // from the space character to the end of the valid character list (\u0020 through
- // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage
- // return (\u000D) characters.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- Policy *string `min:"1" type:"string"`
-
- // The Amazon Resource Names (ARNs) of the IAM managed policies that you want
- // to use as a managed session policy. The policies must exist in the same account
- // as the IAM user that is requesting federated access.
- //
- // You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // to this operation. You can pass a single JSON policy document to use as an
- // inline session policy. You can also specify up to 10 managed policies to
- // use as managed session policies. The plaintext that you use for both inline
- // and managed session policies can't exceed 2,048 characters. You can provide
- // up to 10 managed policy ARNs. For more information about ARNs, see Amazon
- // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- //
- // This parameter is optional. However, if you do not pass any session policies,
- // then the resulting federated user session has no permissions.
- //
- // When you pass session policies, the session permissions are the intersection
- // of the IAM user policies and the session policies that you pass. This gives
- // you a way to further restrict the permissions for a federated user. You cannot
- // use session policies to grant more permissions than those that are defined
- // in the permissions policy of the IAM user. For more information, see Session
- // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session)
- // in the IAM User Guide.
- //
- // The resulting credentials can be used to access a resource that has a resource-based
- // policy. If that policy specifically references the federated user session
- // in the Principal element of the policy, the session has the permissions allowed
- // by the policy. These permissions are granted in addition to the permissions
- // that are granted by the session policies.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- PolicyArns []*PolicyDescriptorType `type:"list"`
-
- // A list of session tags. Each session tag consists of a key name and an associated
- // value. For more information about session tags, see Passing Session Tags
- // in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
- // in the IAM User Guide.
- //
- // This parameter is optional. You can pass up to 50 session tags. The plaintext
- // session tag keys can’t exceed 128 characters and the values can’t exceed
- // 256 characters. For these and additional limits, see IAM and STS Character
- // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
- // in the IAM User Guide.
- //
- // An Amazon Web Services conversion compresses the passed session policies
- // and session tags into a packed binary format that has a separate limit. Your
- // request can fail for this limit even if your plaintext meets the other requirements.
- // The PackedPolicySize response element indicates by percentage how close the
- // policies and tags for your request are to the upper size limit.
- //
- // You can pass a session tag with the same key as a tag that is already attached
- // to the user you are federating. When you do, session tags override a user
- // tag with the same key.
- //
- // Tag key–value pairs are not case sensitive, but case is preserved. This
- // means that you cannot have separate Department and department tag keys. Assume
- // that the role has the Department=Marketing tag and you pass the department=engineering
- // session tag. Department and department are not saved as separate tags, and
- // the session tag passed in the request takes precedence over the role tag.
- Tags []*Tag `type:"list"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetFederationTokenInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetFederationTokenInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetFederationTokenInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetFederationTokenInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.Name == nil {
- invalidParams.Add(request.NewErrParamRequired("Name"))
- }
- if s.Name != nil && len(*s.Name) < 2 {
- invalidParams.Add(request.NewErrParamMinLen("Name", 2))
- }
- if s.Policy != nil && len(*s.Policy) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Policy", 1))
- }
- if s.PolicyArns != nil {
- for i, v := range s.PolicyArns {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "PolicyArns", i), err.(request.ErrInvalidParams))
- }
- }
- }
- if s.Tags != nil {
- for i, v := range s.Tags {
- if v == nil {
- continue
- }
- if err := v.Validate(); err != nil {
- invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
- }
- }
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *GetFederationTokenInput) SetDurationSeconds(v int64) *GetFederationTokenInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetName sets the Name field's value.
-func (s *GetFederationTokenInput) SetName(v string) *GetFederationTokenInput {
- s.Name = &v
- return s
-}
-
-// SetPolicy sets the Policy field's value.
-func (s *GetFederationTokenInput) SetPolicy(v string) *GetFederationTokenInput {
- s.Policy = &v
- return s
-}
-
-// SetPolicyArns sets the PolicyArns field's value.
-func (s *GetFederationTokenInput) SetPolicyArns(v []*PolicyDescriptorType) *GetFederationTokenInput {
- s.PolicyArns = v
- return s
-}
-
-// SetTags sets the Tags field's value.
-func (s *GetFederationTokenInput) SetTags(v []*Tag) *GetFederationTokenInput {
- s.Tags = v
- return s
-}
-
-// Contains the response to a successful GetFederationToken request, including
-// temporary Amazon Web Services credentials that can be used to make Amazon
-// Web Services requests.
-type GetFederationTokenOutput struct {
- _ struct{} `type:"structure"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security (or session) token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-
- // Identifiers for the federated user associated with the credentials (such
- // as arn:aws:sts::123456789012:federated-user/Bob or 123456789012:Bob). You
- // can use the federated user's ARN in your resource-based policies, such as
- // an Amazon S3 bucket policy.
- FederatedUser *FederatedUser `type:"structure"`
-
- // A percentage value that indicates the packed size of the session policies
- // and session tags combined passed in the request. The request fails if the
- // packed size is greater than 100 percent, which means the policies and tags
- // exceeded the allowed space.
- PackedPolicySize *int64 `type:"integer"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetFederationTokenOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetFederationTokenOutput) GoString() string {
- return s.String()
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *GetFederationTokenOutput) SetCredentials(v *Credentials) *GetFederationTokenOutput {
- s.Credentials = v
- return s
-}
-
-// SetFederatedUser sets the FederatedUser field's value.
-func (s *GetFederationTokenOutput) SetFederatedUser(v *FederatedUser) *GetFederationTokenOutput {
- s.FederatedUser = v
- return s
-}
-
-// SetPackedPolicySize sets the PackedPolicySize field's value.
-func (s *GetFederationTokenOutput) SetPackedPolicySize(v int64) *GetFederationTokenOutput {
- s.PackedPolicySize = &v
- return s
-}
-
-type GetSessionTokenInput struct {
- _ struct{} `type:"structure"`
-
- // The duration, in seconds, that the credentials should remain valid. Acceptable
- // durations for IAM user sessions range from 900 seconds (15 minutes) to 129,600
- // seconds (36 hours), with 43,200 seconds (12 hours) as the default. Sessions
- // for Amazon Web Services account owners are restricted to a maximum of 3,600
- // seconds (one hour). If the duration is longer than one hour, the session
- // for Amazon Web Services account owners defaults to one hour.
- DurationSeconds *int64 `min:"900" type:"integer"`
-
- // The identification number of the MFA device that is associated with the IAM
- // user who is making the GetSessionToken call. Specify this value if the IAM
- // user has a policy that requires MFA authentication. The value is either the
- // serial number for a hardware device (such as GAHT12345678) or an Amazon Resource
- // Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user).
- // You can find the device for an IAM user by going to the Amazon Web Services
- // Management Console and viewing the user's security credentials.
- //
- // The regex used to validate this parameter is a string of characters consisting
- // of upper- and lower-case alphanumeric characters with no spaces. You can
- // also include underscores or any of the following characters: =,.@:/-
- SerialNumber *string `min:"9" type:"string"`
-
- // The value provided by the MFA device, if MFA is required. If any policy requires
- // the IAM user to submit an MFA code, specify this value. If MFA authentication
- // is required, the user must provide a code when requesting a set of temporary
- // security credentials. A user who fails to provide the code receives an "access
- // denied" response when requesting resources that require MFA authentication.
- //
- // The format for this parameter, as described by its regex pattern, is a sequence
- // of six numeric digits.
- TokenCode *string `min:"6" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetSessionTokenInput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetSessionTokenInput) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *GetSessionTokenInput) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "GetSessionTokenInput"}
- if s.DurationSeconds != nil && *s.DurationSeconds < 900 {
- invalidParams.Add(request.NewErrParamMinValue("DurationSeconds", 900))
- }
- if s.SerialNumber != nil && len(*s.SerialNumber) < 9 {
- invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9))
- }
- if s.TokenCode != nil && len(*s.TokenCode) < 6 {
- invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetDurationSeconds sets the DurationSeconds field's value.
-func (s *GetSessionTokenInput) SetDurationSeconds(v int64) *GetSessionTokenInput {
- s.DurationSeconds = &v
- return s
-}
-
-// SetSerialNumber sets the SerialNumber field's value.
-func (s *GetSessionTokenInput) SetSerialNumber(v string) *GetSessionTokenInput {
- s.SerialNumber = &v
- return s
-}
-
-// SetTokenCode sets the TokenCode field's value.
-func (s *GetSessionTokenInput) SetTokenCode(v string) *GetSessionTokenInput {
- s.TokenCode = &v
- return s
-}
-
-// Contains the response to a successful GetSessionToken request, including
-// temporary Amazon Web Services credentials that can be used to make Amazon
-// Web Services requests.
-type GetSessionTokenOutput struct {
- _ struct{} `type:"structure"`
-
- // The temporary security credentials, which include an access key ID, a secret
- // access key, and a security (or session) token.
- //
- // The size of the security token that STS API operations return is not fixed.
- // We strongly recommend that you make no assumptions about the maximum size.
- Credentials *Credentials `type:"structure"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetSessionTokenOutput) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s GetSessionTokenOutput) GoString() string {
- return s.String()
-}
-
-// SetCredentials sets the Credentials field's value.
-func (s *GetSessionTokenOutput) SetCredentials(v *Credentials) *GetSessionTokenOutput {
- s.Credentials = v
- return s
-}
-
-// A reference to the IAM managed policy that is passed as a session policy
-// for a role session or a federated user session.
-type PolicyDescriptorType struct {
- _ struct{} `type:"structure"`
-
- // The Amazon Resource Name (ARN) of the IAM managed policy to use as a session
- // policy for the role. For more information about ARNs, see Amazon Resource
- // Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)
- // in the Amazon Web Services General Reference.
- Arn *string `locationName:"arn" min:"20" type:"string"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PolicyDescriptorType) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s PolicyDescriptorType) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *PolicyDescriptorType) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "PolicyDescriptorType"}
- if s.Arn != nil && len(*s.Arn) < 20 {
- invalidParams.Add(request.NewErrParamMinLen("Arn", 20))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetArn sets the Arn field's value.
-func (s *PolicyDescriptorType) SetArn(v string) *PolicyDescriptorType {
- s.Arn = &v
- return s
-}
-
-// You can pass custom key-value pair attributes when you assume a role or federate
-// a user. These are called session tags. You can then use the session tags
-// to control access to resources. For more information, see Tagging Amazon
-// Web Services STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
-// in the IAM User Guide.
-type Tag struct {
- _ struct{} `type:"structure"`
-
- // The key for a session tag.
- //
- // You can pass up to 50 session tags. The plain text session tag keys can’t
- // exceed 128 characters. For these and additional limits, see IAM and STS Character
- // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
- // in the IAM User Guide.
- //
- // Key is a required field
- Key *string `min:"1" type:"string" required:"true"`
-
- // The value for a session tag.
- //
- // You can pass up to 50 session tags. The plain text session tag values can’t
- // exceed 256 characters. For these and additional limits, see IAM and STS Character
- // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length)
- // in the IAM User Guide.
- //
- // Value is a required field
- Value *string `type:"string" required:"true"`
-}
-
-// String returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tag) String() string {
- return awsutil.Prettify(s)
-}
-
-// GoString returns the string representation.
-//
-// API parameter values that are decorated as "sensitive" in the API will not
-// be included in the string output. The member name will be present, but the
-// value will be replaced with "sensitive".
-func (s Tag) GoString() string {
- return s.String()
-}
-
-// Validate inspects the fields of the type to determine if they are valid.
-func (s *Tag) Validate() error {
- invalidParams := request.ErrInvalidParams{Context: "Tag"}
- if s.Key == nil {
- invalidParams.Add(request.NewErrParamRequired("Key"))
- }
- if s.Key != nil && len(*s.Key) < 1 {
- invalidParams.Add(request.NewErrParamMinLen("Key", 1))
- }
- if s.Value == nil {
- invalidParams.Add(request.NewErrParamRequired("Value"))
- }
-
- if invalidParams.Len() > 0 {
- return invalidParams
- }
- return nil
-}
-
-// SetKey sets the Key field's value.
-func (s *Tag) SetKey(v string) *Tag {
- s.Key = &v
- return s
-}
-
-// SetValue sets the Value field's value.
-func (s *Tag) SetValue(v string) *Tag {
- s.Value = &v
- return s
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go b/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go
deleted file mode 100644
index d5307fcaa..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/customizations.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package sts
-
-import "github.com/aws/aws-sdk-go/aws/request"
-
-func init() {
- initRequest = customizeRequest
-}
-
-func customizeRequest(r *request.Request) {
- r.RetryErrorCodes = append(r.RetryErrorCodes, ErrCodeIDPCommunicationErrorException)
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
deleted file mode 100644
index 2d98d9235..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package sts provides the client and types for making API
-// requests to AWS Security Token Service.
-//
-// Security Token Service (STS) enables you to request temporary, limited-privilege
-// credentials for Identity and Access Management (IAM) users or for users that
-// you authenticate (federated users). This guide provides descriptions of the
-// STS API. For more information about using this service, see Temporary Security
-// Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html).
-//
-// See https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15 for more information on this service.
-//
-// See sts package documentation for more information.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/
-//
-// Using the Client
-//
-// To contact AWS Security Token Service with the SDK use the New function to create
-// a new service client. With that client you can make API requests to the service.
-// These clients are safe to use concurrently.
-//
-// See the SDK's documentation for more information on how to use the SDK.
-// https://docs.aws.amazon.com/sdk-for-go/api/
-//
-// See aws.Config documentation for more information on configuring SDK clients.
-// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
-//
-// See the AWS Security Token Service client STS for more
-// information on creating client for this service.
-// https://docs.aws.amazon.com/sdk-for-go/api/service/sts/#New
-package sts
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
deleted file mode 100644
index b680bbd5d..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go
+++ /dev/null
@@ -1,84 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sts
-
-const (
-
- // ErrCodeExpiredTokenException for service response error code
- // "ExpiredTokenException".
- //
- // The web identity token that was passed is expired or is not valid. Get a
- // new identity token from the identity provider and then retry the request.
- ErrCodeExpiredTokenException = "ExpiredTokenException"
-
- // ErrCodeIDPCommunicationErrorException for service response error code
- // "IDPCommunicationError".
- //
- // The request could not be fulfilled because the identity provider (IDP) that
- // was asked to verify the incoming identity token could not be reached. This
- // is often a transient error caused by network conditions. Retry the request
- // a limited number of times so that you don't exceed the request rate. If the
- // error persists, the identity provider might be down or not responding.
- ErrCodeIDPCommunicationErrorException = "IDPCommunicationError"
-
- // ErrCodeIDPRejectedClaimException for service response error code
- // "IDPRejectedClaim".
- //
- // The identity provider (IdP) reported that authentication failed. This might
- // be because the claim is invalid.
- //
- // If this error is returned for the AssumeRoleWithWebIdentity operation, it
- // can also mean that the claim has expired or has been explicitly revoked.
- ErrCodeIDPRejectedClaimException = "IDPRejectedClaim"
-
- // ErrCodeInvalidAuthorizationMessageException for service response error code
- // "InvalidAuthorizationMessageException".
- //
- // The error returned if the message passed to DecodeAuthorizationMessage was
- // invalid. This can happen if the token contains invalid characters, such as
- // linebreaks.
- ErrCodeInvalidAuthorizationMessageException = "InvalidAuthorizationMessageException"
-
- // ErrCodeInvalidIdentityTokenException for service response error code
- // "InvalidIdentityToken".
- //
- // The web identity token that was passed could not be validated by Amazon Web
- // Services. Get a new identity token from the identity provider and then retry
- // the request.
- ErrCodeInvalidIdentityTokenException = "InvalidIdentityToken"
-
- // ErrCodeMalformedPolicyDocumentException for service response error code
- // "MalformedPolicyDocument".
- //
- // The request was rejected because the policy document was malformed. The error
- // message describes the specific error.
- ErrCodeMalformedPolicyDocumentException = "MalformedPolicyDocument"
-
- // ErrCodePackedPolicyTooLargeException for service response error code
- // "PackedPolicyTooLarge".
- //
- // The request was rejected because the total packed size of the session policies
- // and session tags combined was too large. An Amazon Web Services conversion
- // compresses the session policy document, session policy ARNs, and session
- // tags into a packed binary format that has a separate limit. The error message
- // indicates by percentage how close the policies and tags are to the upper
- // size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html)
- // in the IAM User Guide.
- //
- // You could receive this error even though you meet other defined session policy
- // and session tag limits. For more information, see IAM and STS Entity Character
- // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length)
- // in the IAM User Guide.
- ErrCodePackedPolicyTooLargeException = "PackedPolicyTooLarge"
-
- // ErrCodeRegionDisabledException for service response error code
- // "RegionDisabledException".
- //
- // STS is not activated in the requested region for the account that is being
- // asked to generate credentials. The account administrator must use the IAM
- // console to activate STS in that region. For more information, see Activating
- // and Deactivating Amazon Web Services STS in an Amazon Web Services Region
- // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html)
- // in the IAM User Guide.
- ErrCodeRegionDisabledException = "RegionDisabledException"
-)
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go b/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
deleted file mode 100644
index 703defd96..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/service.go
+++ /dev/null
@@ -1,99 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-package sts
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/client"
- "github.com/aws/aws-sdk-go/aws/client/metadata"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/aws/signer/v4"
- "github.com/aws/aws-sdk-go/private/protocol/query"
-)
-
-// STS provides the API operation methods for making requests to
-// AWS Security Token Service. See this package's package overview docs
-// for details on the service.
-//
-// STS methods are safe to use concurrently. It is not safe to
-// modify mutate any of the struct's properties though.
-type STS struct {
- *client.Client
-}
-
-// Used for custom client initialization logic
-var initClient func(*client.Client)
-
-// Used for custom request initialization logic
-var initRequest func(*request.Request)
-
-// Service information constants
-const (
- ServiceName = "sts" // Name of service.
- EndpointsID = ServiceName // ID to lookup a service endpoint with.
- ServiceID = "STS" // ServiceID is a unique identifier of a specific service.
-)
-
-// New creates a new instance of the STS client with a session.
-// If additional configuration is needed for the client instance use the optional
-// aws.Config parameter to add your extra config.
-//
-// Example:
-// mySession := session.Must(session.NewSession())
-//
-// // Create a STS client from just a session.
-// svc := sts.New(mySession)
-//
-// // Create a STS client with additional configuration
-// svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
-func New(p client.ConfigProvider, cfgs ...*aws.Config) *STS {
- c := p.ClientConfig(EndpointsID, cfgs...)
- return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion)
-}
-
-// newClient creates, initializes and returns a new service client instance.
-func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *STS {
- svc := &STS{
- Client: client.New(
- cfg,
- metadata.ClientInfo{
- ServiceName: ServiceName,
- ServiceID: ServiceID,
- SigningName: signingName,
- SigningRegion: signingRegion,
- PartitionID: partitionID,
- Endpoint: endpoint,
- APIVersion: "2011-06-15",
- ResolvedRegion: resolvedRegion,
- },
- handlers,
- ),
- }
-
- // Handlers
- svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
- svc.Handlers.Build.PushBackNamed(query.BuildHandler)
- svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler)
- svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler)
- svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler)
-
- // Run custom client initialization if present
- if initClient != nil {
- initClient(svc.Client)
- }
-
- return svc
-}
-
-// newRequest creates a new request for a STS operation and runs any
-// custom request initialization.
-func (c *STS) newRequest(op *request.Operation, params, data interface{}) *request.Request {
- req := c.NewRequest(op, params, data)
-
- // Run custom request initialization if present
- if initRequest != nil {
- initRequest(req)
- }
-
- return req
-}
diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go
deleted file mode 100644
index e2e1d6efe..000000000
--- a/vendor/github.com/aws/aws-sdk-go/service/sts/stsiface/interface.go
+++ /dev/null
@@ -1,96 +0,0 @@
-// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
-
-// Package stsiface provides an interface to enable mocking the AWS Security Token Service service client
-// for testing your code.
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters.
-package stsiface
-
-import (
- "github.com/aws/aws-sdk-go/aws"
- "github.com/aws/aws-sdk-go/aws/request"
- "github.com/aws/aws-sdk-go/service/sts"
-)
-
-// STSAPI provides an interface to enable mocking the
-// sts.STS service client's API operation,
-// paginators, and waiters. This make unit testing your code that calls out
-// to the SDK's service client's calls easier.
-//
-// The best way to use this interface is so the SDK's service client's calls
-// can be stubbed out for unit testing your code with the SDK without needing
-// to inject custom request handlers into the SDK's request pipeline.
-//
-// // myFunc uses an SDK service client to make a request to
-// // AWS Security Token Service.
-// func myFunc(svc stsiface.STSAPI) bool {
-// // Make svc.AssumeRole request
-// }
-//
-// func main() {
-// sess := session.New()
-// svc := sts.New(sess)
-//
-// myFunc(svc)
-// }
-//
-// In your _test.go file:
-//
-// // Define a mock struct to be used in your unit tests of myFunc.
-// type mockSTSClient struct {
-// stsiface.STSAPI
-// }
-// func (m *mockSTSClient) AssumeRole(input *sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error) {
-// // mock response/functionality
-// }
-//
-// func TestMyFunc(t *testing.T) {
-// // Setup Test
-// mockSvc := &mockSTSClient{}
-//
-// myfunc(mockSvc)
-//
-// // Verify myFunc's functionality
-// }
-//
-// It is important to note that this interface will have breaking changes
-// when the service model is updated and adds new API operations, paginators,
-// and waiters. Its suggested to use the pattern above for testing, or using
-// tooling to generate mocks to satisfy the interfaces.
-type STSAPI interface {
- AssumeRole(*sts.AssumeRoleInput) (*sts.AssumeRoleOutput, error)
- AssumeRoleWithContext(aws.Context, *sts.AssumeRoleInput, ...request.Option) (*sts.AssumeRoleOutput, error)
- AssumeRoleRequest(*sts.AssumeRoleInput) (*request.Request, *sts.AssumeRoleOutput)
-
- AssumeRoleWithSAML(*sts.AssumeRoleWithSAMLInput) (*sts.AssumeRoleWithSAMLOutput, error)
- AssumeRoleWithSAMLWithContext(aws.Context, *sts.AssumeRoleWithSAMLInput, ...request.Option) (*sts.AssumeRoleWithSAMLOutput, error)
- AssumeRoleWithSAMLRequest(*sts.AssumeRoleWithSAMLInput) (*request.Request, *sts.AssumeRoleWithSAMLOutput)
-
- AssumeRoleWithWebIdentity(*sts.AssumeRoleWithWebIdentityInput) (*sts.AssumeRoleWithWebIdentityOutput, error)
- AssumeRoleWithWebIdentityWithContext(aws.Context, *sts.AssumeRoleWithWebIdentityInput, ...request.Option) (*sts.AssumeRoleWithWebIdentityOutput, error)
- AssumeRoleWithWebIdentityRequest(*sts.AssumeRoleWithWebIdentityInput) (*request.Request, *sts.AssumeRoleWithWebIdentityOutput)
-
- DecodeAuthorizationMessage(*sts.DecodeAuthorizationMessageInput) (*sts.DecodeAuthorizationMessageOutput, error)
- DecodeAuthorizationMessageWithContext(aws.Context, *sts.DecodeAuthorizationMessageInput, ...request.Option) (*sts.DecodeAuthorizationMessageOutput, error)
- DecodeAuthorizationMessageRequest(*sts.DecodeAuthorizationMessageInput) (*request.Request, *sts.DecodeAuthorizationMessageOutput)
-
- GetAccessKeyInfo(*sts.GetAccessKeyInfoInput) (*sts.GetAccessKeyInfoOutput, error)
- GetAccessKeyInfoWithContext(aws.Context, *sts.GetAccessKeyInfoInput, ...request.Option) (*sts.GetAccessKeyInfoOutput, error)
- GetAccessKeyInfoRequest(*sts.GetAccessKeyInfoInput) (*request.Request, *sts.GetAccessKeyInfoOutput)
-
- GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error)
- GetCallerIdentityWithContext(aws.Context, *sts.GetCallerIdentityInput, ...request.Option) (*sts.GetCallerIdentityOutput, error)
- GetCallerIdentityRequest(*sts.GetCallerIdentityInput) (*request.Request, *sts.GetCallerIdentityOutput)
-
- GetFederationToken(*sts.GetFederationTokenInput) (*sts.GetFederationTokenOutput, error)
- GetFederationTokenWithContext(aws.Context, *sts.GetFederationTokenInput, ...request.Option) (*sts.GetFederationTokenOutput, error)
- GetFederationTokenRequest(*sts.GetFederationTokenInput) (*request.Request, *sts.GetFederationTokenOutput)
-
- GetSessionToken(*sts.GetSessionTokenInput) (*sts.GetSessionTokenOutput, error)
- GetSessionTokenWithContext(aws.Context, *sts.GetSessionTokenInput, ...request.Option) (*sts.GetSessionTokenOutput, error)
- GetSessionTokenRequest(*sts.GetSessionTokenInput) (*request.Request, *sts.GetSessionTokenOutput)
-}
-
-var _ STSAPI = (*sts.STS)(nil)
diff --git a/vendor/github.com/cenkalti/backoff/v4/.gitignore b/vendor/github.com/cenkalti/backoff/v4/.gitignore
new file mode 100644
index 000000000..50d95c548
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/.gitignore
@@ -0,0 +1,25 @@
+# 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
+
+# IDEs
+.idea/
diff --git a/vendor/github.com/cenkalti/backoff/v4/LICENSE b/vendor/github.com/cenkalti/backoff/v4/LICENSE
new file mode 100644
index 000000000..89b817996
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/LICENSE
@@ -0,0 +1,20 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Cenk Altı
+
+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/cenkalti/backoff/v4/README.md b/vendor/github.com/cenkalti/backoff/v4/README.md
new file mode 100644
index 000000000..9433004a2
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/README.md
@@ -0,0 +1,30 @@
+# Exponential Backoff [![GoDoc][godoc image]][godoc] [![Coverage Status][coveralls image]][coveralls]
+
+This is a Go port of the exponential backoff algorithm from [Google's HTTP Client Library for Java][google-http-java-client].
+
+[Exponential backoff][exponential backoff wiki]
+is an algorithm that uses feedback to multiplicatively decrease the rate of some process,
+in order to gradually find an acceptable rate.
+The retries exponentially increase and stop increasing when a certain threshold is met.
+
+## Usage
+
+Import path is `github.com/cenkalti/backoff/v4`. Please note the version part at the end.
+
+Use https://pkg.go.dev/github.com/cenkalti/backoff/v4 to view the documentation.
+
+## Contributing
+
+* I would like to keep this library as small as possible.
+* Please don't send a PR without opening an issue and discussing it first.
+* If proposed change is not a common use case, I will probably not accept it.
+
+[godoc]: https://pkg.go.dev/github.com/cenkalti/backoff/v4
+[godoc image]: https://godoc.org/github.com/cenkalti/backoff?status.png
+[coveralls]: https://coveralls.io/github/cenkalti/backoff?branch=master
+[coveralls image]: https://coveralls.io/repos/github/cenkalti/backoff/badge.svg?branch=master
+
+[google-http-java-client]: https://github.com/google/google-http-java-client/blob/da1aa993e90285ec18579f1553339b00e19b3ab5/google-http-client/src/main/java/com/google/api/client/util/ExponentialBackOff.java
+[exponential backoff wiki]: http://en.wikipedia.org/wiki/Exponential_backoff
+
+[advanced example]: https://pkg.go.dev/github.com/cenkalti/backoff/v4?tab=doc#pkg-examples
diff --git a/vendor/github.com/cenkalti/backoff/v4/backoff.go b/vendor/github.com/cenkalti/backoff/v4/backoff.go
new file mode 100644
index 000000000..3676ee405
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/backoff.go
@@ -0,0 +1,66 @@
+// Package backoff implements backoff algorithms for retrying operations.
+//
+// Use Retry function for retrying operations that may fail.
+// If Retry does not meet your needs,
+// copy/paste the function into your project and modify as you wish.
+//
+// There is also Ticker type similar to time.Ticker.
+// You can use it if you need to work with channels.
+//
+// See Examples section below for usage examples.
+package backoff
+
+import "time"
+
+// BackOff is a backoff policy for retrying an operation.
+type BackOff interface {
+ // NextBackOff returns the duration to wait before retrying the operation,
+ // or backoff. Stop to indicate that no more retries should be made.
+ //
+ // Example usage:
+ //
+ // duration := backoff.NextBackOff();
+ // if (duration == backoff.Stop) {
+ // // Do not retry operation.
+ // } else {
+ // // Sleep for duration and retry operation.
+ // }
+ //
+ NextBackOff() time.Duration
+
+ // Reset to initial state.
+ Reset()
+}
+
+// Stop indicates that no more retries should be made for use in NextBackOff().
+const Stop time.Duration = -1
+
+// ZeroBackOff is a fixed backoff policy whose backoff time is always zero,
+// meaning that the operation is retried immediately without waiting, indefinitely.
+type ZeroBackOff struct{}
+
+func (b *ZeroBackOff) Reset() {}
+
+func (b *ZeroBackOff) NextBackOff() time.Duration { return 0 }
+
+// StopBackOff is a fixed backoff policy that always returns backoff.Stop for
+// NextBackOff(), meaning that the operation should never be retried.
+type StopBackOff struct{}
+
+func (b *StopBackOff) Reset() {}
+
+func (b *StopBackOff) NextBackOff() time.Duration { return Stop }
+
+// ConstantBackOff is a backoff policy that always returns the same backoff delay.
+// This is in contrast to an exponential backoff policy,
+// which returns a delay that grows longer as you call NextBackOff() over and over again.
+type ConstantBackOff struct {
+ Interval time.Duration
+}
+
+func (b *ConstantBackOff) Reset() {}
+func (b *ConstantBackOff) NextBackOff() time.Duration { return b.Interval }
+
+func NewConstantBackOff(d time.Duration) *ConstantBackOff {
+ return &ConstantBackOff{Interval: d}
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/context.go b/vendor/github.com/cenkalti/backoff/v4/context.go
new file mode 100644
index 000000000..48482330e
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/context.go
@@ -0,0 +1,62 @@
+package backoff
+
+import (
+ "context"
+ "time"
+)
+
+// BackOffContext is a backoff policy that stops retrying after the context
+// is canceled.
+type BackOffContext interface { // nolint: golint
+ BackOff
+ Context() context.Context
+}
+
+type backOffContext struct {
+ BackOff
+ ctx context.Context
+}
+
+// WithContext returns a BackOffContext with context ctx
+//
+// ctx must not be nil
+func WithContext(b BackOff, ctx context.Context) BackOffContext { // nolint: golint
+ if ctx == nil {
+ panic("nil context")
+ }
+
+ if b, ok := b.(*backOffContext); ok {
+ return &backOffContext{
+ BackOff: b.BackOff,
+ ctx: ctx,
+ }
+ }
+
+ return &backOffContext{
+ BackOff: b,
+ ctx: ctx,
+ }
+}
+
+func getContext(b BackOff) context.Context {
+ if cb, ok := b.(BackOffContext); ok {
+ return cb.Context()
+ }
+ if tb, ok := b.(*backOffTries); ok {
+ return getContext(tb.delegate)
+ }
+ return context.Background()
+}
+
+func (b *backOffContext) Context() context.Context {
+ return b.ctx
+}
+
+func (b *backOffContext) NextBackOff() time.Duration {
+ select {
+ case <-b.ctx.Done():
+ return Stop
+ default:
+ return b.BackOff.NextBackOff()
+ }
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/exponential.go b/vendor/github.com/cenkalti/backoff/v4/exponential.go
new file mode 100644
index 000000000..aac99f196
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/exponential.go
@@ -0,0 +1,216 @@
+package backoff
+
+import (
+ "math/rand"
+ "time"
+)
+
+/*
+ExponentialBackOff is a backoff implementation that increases the backoff
+period for each retry attempt using a randomization function that grows exponentially.
+
+NextBackOff() is calculated using the following formula:
+
+ randomized interval =
+ RetryInterval * (random value in range [1 - RandomizationFactor, 1 + RandomizationFactor])
+
+In other words NextBackOff() will range between the randomization factor
+percentage below and above the retry interval.
+
+For example, given the following parameters:
+
+ RetryInterval = 2
+ RandomizationFactor = 0.5
+ Multiplier = 2
+
+the actual backoff period used in the next retry attempt will range between 1 and 3 seconds,
+multiplied by the exponential, that is, between 2 and 6 seconds.
+
+Note: MaxInterval caps the RetryInterval and not the randomized interval.
+
+If the time elapsed since an ExponentialBackOff instance is created goes past the
+MaxElapsedTime, then the method NextBackOff() starts returning backoff.Stop.
+
+The elapsed time can be reset by calling Reset().
+
+Example: Given the following default arguments, for 10 tries the sequence will be,
+and assuming we go over the MaxElapsedTime on the 10th try:
+
+ Request # RetryInterval (seconds) Randomized Interval (seconds)
+
+ 1 0.5 [0.25, 0.75]
+ 2 0.75 [0.375, 1.125]
+ 3 1.125 [0.562, 1.687]
+ 4 1.687 [0.8435, 2.53]
+ 5 2.53 [1.265, 3.795]
+ 6 3.795 [1.897, 5.692]
+ 7 5.692 [2.846, 8.538]
+ 8 8.538 [4.269, 12.807]
+ 9 12.807 [6.403, 19.210]
+ 10 19.210 backoff.Stop
+
+Note: Implementation is not thread-safe.
+*/
+type ExponentialBackOff struct {
+ InitialInterval time.Duration
+ RandomizationFactor float64
+ Multiplier float64
+ MaxInterval time.Duration
+ // After MaxElapsedTime the ExponentialBackOff returns Stop.
+ // It never stops if MaxElapsedTime == 0.
+ MaxElapsedTime time.Duration
+ Stop time.Duration
+ Clock Clock
+
+ currentInterval time.Duration
+ startTime time.Time
+}
+
+// Clock is an interface that returns current time for BackOff.
+type Clock interface {
+ Now() time.Time
+}
+
+// ExponentialBackOffOpts is a function type used to configure ExponentialBackOff options.
+type ExponentialBackOffOpts func(*ExponentialBackOff)
+
+// Default values for ExponentialBackOff.
+const (
+ DefaultInitialInterval = 500 * time.Millisecond
+ DefaultRandomizationFactor = 0.5
+ DefaultMultiplier = 1.5
+ DefaultMaxInterval = 60 * time.Second
+ DefaultMaxElapsedTime = 15 * time.Minute
+)
+
+// NewExponentialBackOff creates an instance of ExponentialBackOff using default values.
+func NewExponentialBackOff(opts ...ExponentialBackOffOpts) *ExponentialBackOff {
+ b := &ExponentialBackOff{
+ InitialInterval: DefaultInitialInterval,
+ RandomizationFactor: DefaultRandomizationFactor,
+ Multiplier: DefaultMultiplier,
+ MaxInterval: DefaultMaxInterval,
+ MaxElapsedTime: DefaultMaxElapsedTime,
+ Stop: Stop,
+ Clock: SystemClock,
+ }
+ for _, fn := range opts {
+ fn(b)
+ }
+ b.Reset()
+ return b
+}
+
+// WithInitialInterval sets the initial interval between retries.
+func WithInitialInterval(duration time.Duration) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.InitialInterval = duration
+ }
+}
+
+// WithRandomizationFactor sets the randomization factor to add jitter to intervals.
+func WithRandomizationFactor(randomizationFactor float64) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.RandomizationFactor = randomizationFactor
+ }
+}
+
+// WithMultiplier sets the multiplier for increasing the interval after each retry.
+func WithMultiplier(multiplier float64) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.Multiplier = multiplier
+ }
+}
+
+// WithMaxInterval sets the maximum interval between retries.
+func WithMaxInterval(duration time.Duration) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.MaxInterval = duration
+ }
+}
+
+// WithMaxElapsedTime sets the maximum total time for retries.
+func WithMaxElapsedTime(duration time.Duration) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.MaxElapsedTime = duration
+ }
+}
+
+// WithRetryStopDuration sets the duration after which retries should stop.
+func WithRetryStopDuration(duration time.Duration) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.Stop = duration
+ }
+}
+
+// WithClockProvider sets the clock used to measure time.
+func WithClockProvider(clock Clock) ExponentialBackOffOpts {
+ return func(ebo *ExponentialBackOff) {
+ ebo.Clock = clock
+ }
+}
+
+type systemClock struct{}
+
+func (t systemClock) Now() time.Time {
+ return time.Now()
+}
+
+// SystemClock implements Clock interface that uses time.Now().
+var SystemClock = systemClock{}
+
+// Reset the interval back to the initial retry interval and restarts the timer.
+// Reset must be called before using b.
+func (b *ExponentialBackOff) Reset() {
+ b.currentInterval = b.InitialInterval
+ b.startTime = b.Clock.Now()
+}
+
+// NextBackOff calculates the next backoff interval using the formula:
+// Randomized interval = RetryInterval * (1 ± RandomizationFactor)
+func (b *ExponentialBackOff) NextBackOff() time.Duration {
+ // Make sure we have not gone over the maximum elapsed time.
+ elapsed := b.GetElapsedTime()
+ next := getRandomValueFromInterval(b.RandomizationFactor, rand.Float64(), b.currentInterval)
+ b.incrementCurrentInterval()
+ if b.MaxElapsedTime != 0 && elapsed+next > b.MaxElapsedTime {
+ return b.Stop
+ }
+ return next
+}
+
+// GetElapsedTime returns the elapsed time since an ExponentialBackOff instance
+// is created and is reset when Reset() is called.
+//
+// The elapsed time is computed using time.Now().UnixNano(). It is
+// safe to call even while the backoff policy is used by a running
+// ticker.
+func (b *ExponentialBackOff) GetElapsedTime() time.Duration {
+ return b.Clock.Now().Sub(b.startTime)
+}
+
+// Increments the current interval by multiplying it with the multiplier.
+func (b *ExponentialBackOff) incrementCurrentInterval() {
+ // Check for overflow, if overflow is detected set the current interval to the max interval.
+ if float64(b.currentInterval) >= float64(b.MaxInterval)/b.Multiplier {
+ b.currentInterval = b.MaxInterval
+ } else {
+ b.currentInterval = time.Duration(float64(b.currentInterval) * b.Multiplier)
+ }
+}
+
+// Returns a random value from the following interval:
+// [currentInterval - randomizationFactor * currentInterval, currentInterval + randomizationFactor * currentInterval].
+func getRandomValueFromInterval(randomizationFactor, random float64, currentInterval time.Duration) time.Duration {
+ if randomizationFactor == 0 {
+ return currentInterval // make sure no randomness is used when randomizationFactor is 0.
+ }
+ var delta = randomizationFactor * float64(currentInterval)
+ var minInterval = float64(currentInterval) - delta
+ var maxInterval = float64(currentInterval) + delta
+
+ // Get a random value from the range [minInterval, maxInterval].
+ // The formula used below has a +1 because if the minInterval is 1 and the maxInterval is 3 then
+ // we want a 33% chance for selecting either 1, 2 or 3.
+ return time.Duration(minInterval + (random * (maxInterval - minInterval + 1)))
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/retry.go b/vendor/github.com/cenkalti/backoff/v4/retry.go
new file mode 100644
index 000000000..b9c0c51cd
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/retry.go
@@ -0,0 +1,146 @@
+package backoff
+
+import (
+ "errors"
+ "time"
+)
+
+// An OperationWithData is executing by RetryWithData() or RetryNotifyWithData().
+// The operation will be retried using a backoff policy if it returns an error.
+type OperationWithData[T any] func() (T, error)
+
+// An Operation is executing by Retry() or RetryNotify().
+// The operation will be retried using a backoff policy if it returns an error.
+type Operation func() error
+
+func (o Operation) withEmptyData() OperationWithData[struct{}] {
+ return func() (struct{}, error) {
+ return struct{}{}, o()
+ }
+}
+
+// Notify is a notify-on-error function. It receives an operation error and
+// backoff delay if the operation failed (with an error).
+//
+// NOTE that if the backoff policy stated to stop retrying,
+// the notify function isn't called.
+type Notify func(error, time.Duration)
+
+// Retry the operation o until it does not return error or BackOff stops.
+// o is guaranteed to be run at least once.
+//
+// If o returns a *PermanentError, the operation is not retried, and the
+// wrapped error is returned.
+//
+// Retry sleeps the goroutine for the duration returned by BackOff after a
+// failed operation returns.
+func Retry(o Operation, b BackOff) error {
+ return RetryNotify(o, b, nil)
+}
+
+// RetryWithData is like Retry but returns data in the response too.
+func RetryWithData[T any](o OperationWithData[T], b BackOff) (T, error) {
+ return RetryNotifyWithData(o, b, nil)
+}
+
+// RetryNotify calls notify function with the error and wait duration
+// for each failed attempt before sleep.
+func RetryNotify(operation Operation, b BackOff, notify Notify) error {
+ return RetryNotifyWithTimer(operation, b, notify, nil)
+}
+
+// RetryNotifyWithData is like RetryNotify but returns data in the response too.
+func RetryNotifyWithData[T any](operation OperationWithData[T], b BackOff, notify Notify) (T, error) {
+ return doRetryNotify(operation, b, notify, nil)
+}
+
+// RetryNotifyWithTimer calls notify function with the error and wait duration using the given Timer
+// for each failed attempt before sleep.
+// A default timer that uses system timer is used when nil is passed.
+func RetryNotifyWithTimer(operation Operation, b BackOff, notify Notify, t Timer) error {
+ _, err := doRetryNotify(operation.withEmptyData(), b, notify, t)
+ return err
+}
+
+// RetryNotifyWithTimerAndData is like RetryNotifyWithTimer but returns data in the response too.
+func RetryNotifyWithTimerAndData[T any](operation OperationWithData[T], b BackOff, notify Notify, t Timer) (T, error) {
+ return doRetryNotify(operation, b, notify, t)
+}
+
+func doRetryNotify[T any](operation OperationWithData[T], b BackOff, notify Notify, t Timer) (T, error) {
+ var (
+ err error
+ next time.Duration
+ res T
+ )
+ if t == nil {
+ t = &defaultTimer{}
+ }
+
+ defer func() {
+ t.Stop()
+ }()
+
+ ctx := getContext(b)
+
+ b.Reset()
+ for {
+ res, err = operation()
+ if err == nil {
+ return res, nil
+ }
+
+ var permanent *PermanentError
+ if errors.As(err, &permanent) {
+ return res, permanent.Err
+ }
+
+ if next = b.NextBackOff(); next == Stop {
+ if cerr := ctx.Err(); cerr != nil {
+ return res, cerr
+ }
+
+ return res, err
+ }
+
+ if notify != nil {
+ notify(err, next)
+ }
+
+ t.Start(next)
+
+ select {
+ case <-ctx.Done():
+ return res, ctx.Err()
+ case <-t.C():
+ }
+ }
+}
+
+// PermanentError signals that the operation should not be retried.
+type PermanentError struct {
+ Err error
+}
+
+func (e *PermanentError) Error() string {
+ return e.Err.Error()
+}
+
+func (e *PermanentError) Unwrap() error {
+ return e.Err
+}
+
+func (e *PermanentError) Is(target error) bool {
+ _, ok := target.(*PermanentError)
+ return ok
+}
+
+// Permanent wraps the given err in a *PermanentError.
+func Permanent(err error) error {
+ if err == nil {
+ return nil
+ }
+ return &PermanentError{
+ Err: err,
+ }
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/ticker.go b/vendor/github.com/cenkalti/backoff/v4/ticker.go
new file mode 100644
index 000000000..df9d68bce
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/ticker.go
@@ -0,0 +1,97 @@
+package backoff
+
+import (
+ "context"
+ "sync"
+ "time"
+)
+
+// Ticker holds a channel that delivers `ticks' of a clock at times reported by a BackOff.
+//
+// Ticks will continue to arrive when the previous operation is still running,
+// so operations that take a while to fail could run in quick succession.
+type Ticker struct {
+ C <-chan time.Time
+ c chan time.Time
+ b BackOff
+ ctx context.Context
+ timer Timer
+ stop chan struct{}
+ stopOnce sync.Once
+}
+
+// NewTicker returns a new Ticker containing a channel that will send
+// the time at times specified by the BackOff argument. Ticker is
+// guaranteed to tick at least once. The channel is closed when Stop
+// method is called or BackOff stops. It is not safe to manipulate the
+// provided backoff policy (notably calling NextBackOff or Reset)
+// while the ticker is running.
+func NewTicker(b BackOff) *Ticker {
+ return NewTickerWithTimer(b, &defaultTimer{})
+}
+
+// NewTickerWithTimer returns a new Ticker with a custom timer.
+// A default timer that uses system timer is used when nil is passed.
+func NewTickerWithTimer(b BackOff, timer Timer) *Ticker {
+ if timer == nil {
+ timer = &defaultTimer{}
+ }
+ c := make(chan time.Time)
+ t := &Ticker{
+ C: c,
+ c: c,
+ b: b,
+ ctx: getContext(b),
+ timer: timer,
+ stop: make(chan struct{}),
+ }
+ t.b.Reset()
+ go t.run()
+ return t
+}
+
+// Stop turns off a ticker. After Stop, no more ticks will be sent.
+func (t *Ticker) Stop() {
+ t.stopOnce.Do(func() { close(t.stop) })
+}
+
+func (t *Ticker) run() {
+ c := t.c
+ defer close(c)
+
+ // Ticker is guaranteed to tick at least once.
+ afterC := t.send(time.Now())
+
+ for {
+ if afterC == nil {
+ return
+ }
+
+ select {
+ case tick := <-afterC:
+ afterC = t.send(tick)
+ case <-t.stop:
+ t.c = nil // Prevent future ticks from being sent to the channel.
+ return
+ case <-t.ctx.Done():
+ return
+ }
+ }
+}
+
+func (t *Ticker) send(tick time.Time) <-chan time.Time {
+ select {
+ case t.c <- tick:
+ case <-t.stop:
+ return nil
+ }
+
+ next := t.b.NextBackOff()
+ if next == Stop {
+ t.Stop()
+ return nil
+ }
+
+ t.timer.Start(next)
+ return t.timer.C()
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/timer.go b/vendor/github.com/cenkalti/backoff/v4/timer.go
new file mode 100644
index 000000000..8120d0213
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/timer.go
@@ -0,0 +1,35 @@
+package backoff
+
+import "time"
+
+type Timer interface {
+ Start(duration time.Duration)
+ Stop()
+ C() <-chan time.Time
+}
+
+// defaultTimer implements Timer interface using time.Timer
+type defaultTimer struct {
+ timer *time.Timer
+}
+
+// C returns the timers channel which receives the current time when the timer fires.
+func (t *defaultTimer) C() <-chan time.Time {
+ return t.timer.C
+}
+
+// Start starts the timer to fire after the given duration
+func (t *defaultTimer) Start(duration time.Duration) {
+ if t.timer == nil {
+ t.timer = time.NewTimer(duration)
+ } else {
+ t.timer.Reset(duration)
+ }
+}
+
+// Stop is called when the timer is not used anymore and resources may be freed.
+func (t *defaultTimer) Stop() {
+ if t.timer != nil {
+ t.timer.Stop()
+ }
+}
diff --git a/vendor/github.com/cenkalti/backoff/v4/tries.go b/vendor/github.com/cenkalti/backoff/v4/tries.go
new file mode 100644
index 000000000..28d58ca37
--- /dev/null
+++ b/vendor/github.com/cenkalti/backoff/v4/tries.go
@@ -0,0 +1,38 @@
+package backoff
+
+import "time"
+
+/*
+WithMaxRetries creates a wrapper around another BackOff, which will
+return Stop if NextBackOff() has been called too many times since
+the last time Reset() was called
+
+Note: Implementation is not thread-safe.
+*/
+func WithMaxRetries(b BackOff, max uint64) BackOff {
+ return &backOffTries{delegate: b, maxTries: max}
+}
+
+type backOffTries struct {
+ delegate BackOff
+ maxTries uint64
+ numTries uint64
+}
+
+func (b *backOffTries) NextBackOff() time.Duration {
+ if b.maxTries == 0 {
+ return Stop
+ }
+ if b.maxTries > 0 {
+ if b.maxTries <= b.numTries {
+ return Stop
+ }
+ b.numTries++
+ }
+ return b.delegate.NextBackOff()
+}
+
+func (b *backOffTries) Reset() {
+ b.numTries = 0
+ b.delegate.Reset()
+}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS b/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS
new file mode 100644
index 000000000..e068e731e
--- /dev/null
+++ b/vendor/github.com/census-instrumentation/opencensus-proto/AUTHORS
@@ -0,0 +1 @@
+Google Inc.
\ No newline at end of file
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/LICENSE b/vendor/github.com/census-instrumentation/opencensus-proto/LICENSE
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/census-instrumentation/opencensus-proto/LICENSE
@@ -0,0 +1,202 @@
+
+ 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/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go
new file mode 100644
index 000000000..194dd70df
--- /dev/null
+++ b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1/resource.pb.go
@@ -0,0 +1,189 @@
+// Copyright 2018, OpenCensus 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.17.3
+// source: opencensus/proto/resource/v1/resource.proto
+
+package v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Resource information.
+type Resource struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Type identifier for the resource.
+ Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
+ // Set of labels that describe the resource.
+ Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *Resource) Reset() {
+ *x = Resource{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_resource_v1_resource_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Resource) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Resource) ProtoMessage() {}
+
+func (x *Resource) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_resource_v1_resource_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Resource.ProtoReflect.Descriptor instead.
+func (*Resource) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_resource_v1_resource_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Resource) GetType() string {
+ if x != nil {
+ return x.Type
+ }
+ return ""
+}
+
+func (x *Resource) GetLabels() map[string]string {
+ if x != nil {
+ return x.Labels
+ }
+ return nil
+}
+
+var File_opencensus_proto_resource_v1_resource_proto protoreflect.FileDescriptor
+
+var file_opencensus_proto_resource_v1_resource_proto_rawDesc = []byte{
+ 0x0a, 0x2b, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1c, 0x6f,
+ 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xa5, 0x01, 0x0a, 0x08,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a, 0x06,
+ 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65,
+ 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+ 0x02, 0x38, 0x01, 0x42, 0x9b, 0x01, 0x0a, 0x1f, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63,
+ 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x69, 0x6e, 0x73, 0x74,
+ 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
+ 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e,
+ 0x2d, 0x67, 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0xea,
+ 0x02, 0x1f, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x3a, 0x56,
+ 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_opencensus_proto_resource_v1_resource_proto_rawDescOnce sync.Once
+ file_opencensus_proto_resource_v1_resource_proto_rawDescData = file_opencensus_proto_resource_v1_resource_proto_rawDesc
+)
+
+func file_opencensus_proto_resource_v1_resource_proto_rawDescGZIP() []byte {
+ file_opencensus_proto_resource_v1_resource_proto_rawDescOnce.Do(func() {
+ file_opencensus_proto_resource_v1_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_opencensus_proto_resource_v1_resource_proto_rawDescData)
+ })
+ return file_opencensus_proto_resource_v1_resource_proto_rawDescData
+}
+
+var file_opencensus_proto_resource_v1_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_opencensus_proto_resource_v1_resource_proto_goTypes = []interface{}{
+ (*Resource)(nil), // 0: opencensus.proto.resource.v1.Resource
+ nil, // 1: opencensus.proto.resource.v1.Resource.LabelsEntry
+}
+var file_opencensus_proto_resource_v1_resource_proto_depIdxs = []int32{
+ 1, // 0: opencensus.proto.resource.v1.Resource.labels:type_name -> opencensus.proto.resource.v1.Resource.LabelsEntry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_opencensus_proto_resource_v1_resource_proto_init() }
+func file_opencensus_proto_resource_v1_resource_proto_init() {
+ if File_opencensus_proto_resource_v1_resource_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_opencensus_proto_resource_v1_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Resource); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_opencensus_proto_resource_v1_resource_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_opencensus_proto_resource_v1_resource_proto_goTypes,
+ DependencyIndexes: file_opencensus_proto_resource_v1_resource_proto_depIdxs,
+ MessageInfos: file_opencensus_proto_resource_v1_resource_proto_msgTypes,
+ }.Build()
+ File_opencensus_proto_resource_v1_resource_proto = out.File
+ file_opencensus_proto_resource_v1_resource_proto_rawDesc = nil
+ file_opencensus_proto_resource_v1_resource_proto_goTypes = nil
+ file_opencensus_proto_resource_v1_resource_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go
new file mode 100644
index 000000000..d35612ca0
--- /dev/null
+++ b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace.pb.go
@@ -0,0 +1,2235 @@
+// Copyright 2017, OpenCensus 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.17.3
+// source: opencensus/proto/trace/v1/trace.proto
+
+package v1
+
+import (
+ v1 "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Type of span. Can be used to specify additional relationships between spans
+// in addition to a parent/child relationship.
+type Span_SpanKind int32
+
+const (
+ // Unspecified.
+ Span_SPAN_KIND_UNSPECIFIED Span_SpanKind = 0
+ // Indicates that the span covers server-side handling of an RPC or other
+ // remote network request.
+ Span_SERVER Span_SpanKind = 1
+ // Indicates that the span covers the client-side wrapper around an RPC or
+ // other remote request.
+ Span_CLIENT Span_SpanKind = 2
+)
+
+// Enum value maps for Span_SpanKind.
+var (
+ Span_SpanKind_name = map[int32]string{
+ 0: "SPAN_KIND_UNSPECIFIED",
+ 1: "SERVER",
+ 2: "CLIENT",
+ }
+ Span_SpanKind_value = map[string]int32{
+ "SPAN_KIND_UNSPECIFIED": 0,
+ "SERVER": 1,
+ "CLIENT": 2,
+ }
+)
+
+func (x Span_SpanKind) Enum() *Span_SpanKind {
+ p := new(Span_SpanKind)
+ *p = x
+ return p
+}
+
+func (x Span_SpanKind) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Span_SpanKind) Descriptor() protoreflect.EnumDescriptor {
+ return file_opencensus_proto_trace_v1_trace_proto_enumTypes[0].Descriptor()
+}
+
+func (Span_SpanKind) Type() protoreflect.EnumType {
+ return &file_opencensus_proto_trace_v1_trace_proto_enumTypes[0]
+}
+
+func (x Span_SpanKind) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Span_SpanKind.Descriptor instead.
+func (Span_SpanKind) EnumDescriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 0}
+}
+
+// Indicates whether the message was sent or received.
+type Span_TimeEvent_MessageEvent_Type int32
+
+const (
+ // Unknown event type.
+ Span_TimeEvent_MessageEvent_TYPE_UNSPECIFIED Span_TimeEvent_MessageEvent_Type = 0
+ // Indicates a sent message.
+ Span_TimeEvent_MessageEvent_SENT Span_TimeEvent_MessageEvent_Type = 1
+ // Indicates a received message.
+ Span_TimeEvent_MessageEvent_RECEIVED Span_TimeEvent_MessageEvent_Type = 2
+)
+
+// Enum value maps for Span_TimeEvent_MessageEvent_Type.
+var (
+ Span_TimeEvent_MessageEvent_Type_name = map[int32]string{
+ 0: "TYPE_UNSPECIFIED",
+ 1: "SENT",
+ 2: "RECEIVED",
+ }
+ Span_TimeEvent_MessageEvent_Type_value = map[string]int32{
+ "TYPE_UNSPECIFIED": 0,
+ "SENT": 1,
+ "RECEIVED": 2,
+ }
+)
+
+func (x Span_TimeEvent_MessageEvent_Type) Enum() *Span_TimeEvent_MessageEvent_Type {
+ p := new(Span_TimeEvent_MessageEvent_Type)
+ *p = x
+ return p
+}
+
+func (x Span_TimeEvent_MessageEvent_Type) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Span_TimeEvent_MessageEvent_Type) Descriptor() protoreflect.EnumDescriptor {
+ return file_opencensus_proto_trace_v1_trace_proto_enumTypes[1].Descriptor()
+}
+
+func (Span_TimeEvent_MessageEvent_Type) Type() protoreflect.EnumType {
+ return &file_opencensus_proto_trace_v1_trace_proto_enumTypes[1]
+}
+
+func (x Span_TimeEvent_MessageEvent_Type) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Span_TimeEvent_MessageEvent_Type.Descriptor instead.
+func (Span_TimeEvent_MessageEvent_Type) EnumDescriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 2, 1, 0}
+}
+
+// The relationship of the current span relative to the linked span: child,
+// parent, or unspecified.
+type Span_Link_Type int32
+
+const (
+ // The relationship of the two spans is unknown, or known but other
+ // than parent-child.
+ Span_Link_TYPE_UNSPECIFIED Span_Link_Type = 0
+ // The linked span is a child of the current span.
+ Span_Link_CHILD_LINKED_SPAN Span_Link_Type = 1
+ // The linked span is a parent of the current span.
+ Span_Link_PARENT_LINKED_SPAN Span_Link_Type = 2
+)
+
+// Enum value maps for Span_Link_Type.
+var (
+ Span_Link_Type_name = map[int32]string{
+ 0: "TYPE_UNSPECIFIED",
+ 1: "CHILD_LINKED_SPAN",
+ 2: "PARENT_LINKED_SPAN",
+ }
+ Span_Link_Type_value = map[string]int32{
+ "TYPE_UNSPECIFIED": 0,
+ "CHILD_LINKED_SPAN": 1,
+ "PARENT_LINKED_SPAN": 2,
+ }
+)
+
+func (x Span_Link_Type) Enum() *Span_Link_Type {
+ p := new(Span_Link_Type)
+ *p = x
+ return p
+}
+
+func (x Span_Link_Type) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Span_Link_Type) Descriptor() protoreflect.EnumDescriptor {
+ return file_opencensus_proto_trace_v1_trace_proto_enumTypes[2].Descriptor()
+}
+
+func (Span_Link_Type) Type() protoreflect.EnumType {
+ return &file_opencensus_proto_trace_v1_trace_proto_enumTypes[2]
+}
+
+func (x Span_Link_Type) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Span_Link_Type.Descriptor instead.
+func (Span_Link_Type) EnumDescriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 4, 0}
+}
+
+// A span represents a single operation within a trace. Spans can be
+// nested to form a trace tree. Spans may also be linked to other spans
+// from the same or different trace. And form graphs. Often, a trace
+// contains a root span that describes the end-to-end latency, and one
+// or more subspans for its sub-operations. A trace can also contain
+// multiple root spans, or none at all. Spans do not need to be
+// contiguous - there may be gaps or overlaps between spans in a trace.
+//
+// The next id is 17.
+// TODO(bdrutu): Add an example.
+type Span struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A unique identifier for a trace. All spans from the same trace share
+ // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
+ // is considered invalid.
+ //
+ // This field is semantically required. Receiver should generate new
+ // random trace_id if empty or invalid trace_id was received.
+ //
+ // This field is required.
+ TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
+ // A unique identifier for a span within a trace, assigned when the span
+ // is created. The ID is an 8-byte array. An ID with all zeroes is considered
+ // invalid.
+ //
+ // This field is semantically required. Receiver should generate new
+ // random span_id if empty or invalid span_id was received.
+ //
+ // This field is required.
+ SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
+ // The Tracestate on the span.
+ Tracestate *Span_Tracestate `protobuf:"bytes,15,opt,name=tracestate,proto3" json:"tracestate,omitempty"`
+ // The `span_id` of this span's parent span. If this is a root span, then this
+ // field must be empty. The ID is an 8-byte array.
+ ParentSpanId []byte `protobuf:"bytes,3,opt,name=parent_span_id,json=parentSpanId,proto3" json:"parent_span_id,omitempty"`
+ // A description of the span's operation.
+ //
+ // For example, the name can be a qualified method name or a file name
+ // and a line number where the operation is called. A best practice is to use
+ // the same display name at the same call point in an application.
+ // This makes it easier to correlate spans in different traces.
+ //
+ // This field is semantically required to be set to non-empty string.
+ // When null or empty string received - receiver may use string "name"
+ // as a replacement. There might be smarted algorithms implemented by
+ // receiver to fix the empty span name.
+ //
+ // This field is required.
+ Name *TruncatableString `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
+ // Distinguishes between spans generated in a particular context. For example,
+ // two spans with the same name may be distinguished using `CLIENT` (caller)
+ // and `SERVER` (callee) to identify queueing latency associated with the span.
+ Kind Span_SpanKind `protobuf:"varint,14,opt,name=kind,proto3,enum=opencensus.proto.trace.v1.Span_SpanKind" json:"kind,omitempty"`
+ // The start time of the span. On the client side, this is the time kept by
+ // the local machine where the span execution starts. On the server side, this
+ // is the time when the server's application handler starts running.
+ //
+ // This field is semantically required. When not set on receive -
+ // receiver should set it to the value of end_time field if it was
+ // set. Or to the current time if neither was set. It is important to
+ // keep end_time > start_time for consistency.
+ //
+ // This field is required.
+ StartTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
+ // The end time of the span. On the client side, this is the time kept by
+ // the local machine where the span execution ends. On the server side, this
+ // is the time when the server application handler stops running.
+ //
+ // This field is semantically required. When not set on receive -
+ // receiver should set it to start_time value. It is important to
+ // keep end_time > start_time for consistency.
+ //
+ // This field is required.
+ EndTime *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
+ // A set of attributes on the span.
+ Attributes *Span_Attributes `protobuf:"bytes,7,opt,name=attributes,proto3" json:"attributes,omitempty"`
+ // A stack trace captured at the start of the span.
+ StackTrace *StackTrace `protobuf:"bytes,8,opt,name=stack_trace,json=stackTrace,proto3" json:"stack_trace,omitempty"`
+ // The included time events.
+ TimeEvents *Span_TimeEvents `protobuf:"bytes,9,opt,name=time_events,json=timeEvents,proto3" json:"time_events,omitempty"`
+ // The included links.
+ Links *Span_Links `protobuf:"bytes,10,opt,name=links,proto3" json:"links,omitempty"`
+ // An optional final status for this span. Semantically when Status
+ // wasn't set it is means span ended without errors and assume
+ // Status.Ok (code = 0).
+ Status *Status `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"`
+ // An optional resource that is associated with this span. If not set, this span
+ // should be part of a batch that does include the resource information, unless resource
+ // information is unknown.
+ Resource *v1.Resource `protobuf:"bytes,16,opt,name=resource,proto3" json:"resource,omitempty"`
+ // A highly recommended but not required flag that identifies when a
+ // trace crosses a process boundary. True when the parent_span belongs
+ // to the same process as the current span. This flag is most commonly
+ // used to indicate the need to adjust time as clocks in different
+ // processes may not be synchronized.
+ SameProcessAsParentSpan *wrapperspb.BoolValue `protobuf:"bytes,12,opt,name=same_process_as_parent_span,json=sameProcessAsParentSpan,proto3" json:"same_process_as_parent_span,omitempty"`
+ // An optional number of child spans that were generated while this span
+ // was active. If set, allows an implementation to detect missing child spans.
+ ChildSpanCount *wrapperspb.UInt32Value `protobuf:"bytes,13,opt,name=child_span_count,json=childSpanCount,proto3" json:"child_span_count,omitempty"`
+}
+
+func (x *Span) Reset() {
+ *x = Span{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span) ProtoMessage() {}
+
+func (x *Span) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span.ProtoReflect.Descriptor instead.
+func (*Span) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Span) GetTraceId() []byte {
+ if x != nil {
+ return x.TraceId
+ }
+ return nil
+}
+
+func (x *Span) GetSpanId() []byte {
+ if x != nil {
+ return x.SpanId
+ }
+ return nil
+}
+
+func (x *Span) GetTracestate() *Span_Tracestate {
+ if x != nil {
+ return x.Tracestate
+ }
+ return nil
+}
+
+func (x *Span) GetParentSpanId() []byte {
+ if x != nil {
+ return x.ParentSpanId
+ }
+ return nil
+}
+
+func (x *Span) GetName() *TruncatableString {
+ if x != nil {
+ return x.Name
+ }
+ return nil
+}
+
+func (x *Span) GetKind() Span_SpanKind {
+ if x != nil {
+ return x.Kind
+ }
+ return Span_SPAN_KIND_UNSPECIFIED
+}
+
+func (x *Span) GetStartTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.StartTime
+ }
+ return nil
+}
+
+func (x *Span) GetEndTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.EndTime
+ }
+ return nil
+}
+
+func (x *Span) GetAttributes() *Span_Attributes {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *Span) GetStackTrace() *StackTrace {
+ if x != nil {
+ return x.StackTrace
+ }
+ return nil
+}
+
+func (x *Span) GetTimeEvents() *Span_TimeEvents {
+ if x != nil {
+ return x.TimeEvents
+ }
+ return nil
+}
+
+func (x *Span) GetLinks() *Span_Links {
+ if x != nil {
+ return x.Links
+ }
+ return nil
+}
+
+func (x *Span) GetStatus() *Status {
+ if x != nil {
+ return x.Status
+ }
+ return nil
+}
+
+func (x *Span) GetResource() *v1.Resource {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *Span) GetSameProcessAsParentSpan() *wrapperspb.BoolValue {
+ if x != nil {
+ return x.SameProcessAsParentSpan
+ }
+ return nil
+}
+
+func (x *Span) GetChildSpanCount() *wrapperspb.UInt32Value {
+ if x != nil {
+ return x.ChildSpanCount
+ }
+ return nil
+}
+
+// The `Status` type defines a logical error model that is suitable for different
+// programming environments, including REST APIs and RPC APIs. This proto's fields
+// are a subset of those of
+// [google.rpc.Status](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto),
+// which is used by [gRPC](https://github.com/grpc).
+type Status struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The status code. This is optional field. It is safe to assume 0 (OK)
+ // when not set.
+ Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
+ // A developer-facing error message, which should be in English.
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
+}
+
+func (x *Status) Reset() {
+ *x = Status{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Status) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status) ProtoMessage() {}
+
+func (x *Status) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Status.ProtoReflect.Descriptor instead.
+func (*Status) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Status) GetCode() int32 {
+ if x != nil {
+ return x.Code
+ }
+ return 0
+}
+
+func (x *Status) GetMessage() string {
+ if x != nil {
+ return x.Message
+ }
+ return ""
+}
+
+// The value of an Attribute.
+type AttributeValue struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The type of the value.
+ //
+ // Types that are assignable to Value:
+ // *AttributeValue_StringValue
+ // *AttributeValue_IntValue
+ // *AttributeValue_BoolValue
+ // *AttributeValue_DoubleValue
+ Value isAttributeValue_Value `protobuf_oneof:"value"`
+}
+
+func (x *AttributeValue) Reset() {
+ *x = AttributeValue{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AttributeValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AttributeValue) ProtoMessage() {}
+
+func (x *AttributeValue) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AttributeValue.ProtoReflect.Descriptor instead.
+func (*AttributeValue) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{2}
+}
+
+func (m *AttributeValue) GetValue() isAttributeValue_Value {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (x *AttributeValue) GetStringValue() *TruncatableString {
+ if x, ok := x.GetValue().(*AttributeValue_StringValue); ok {
+ return x.StringValue
+ }
+ return nil
+}
+
+func (x *AttributeValue) GetIntValue() int64 {
+ if x, ok := x.GetValue().(*AttributeValue_IntValue); ok {
+ return x.IntValue
+ }
+ return 0
+}
+
+func (x *AttributeValue) GetBoolValue() bool {
+ if x, ok := x.GetValue().(*AttributeValue_BoolValue); ok {
+ return x.BoolValue
+ }
+ return false
+}
+
+func (x *AttributeValue) GetDoubleValue() float64 {
+ if x, ok := x.GetValue().(*AttributeValue_DoubleValue); ok {
+ return x.DoubleValue
+ }
+ return 0
+}
+
+type isAttributeValue_Value interface {
+ isAttributeValue_Value()
+}
+
+type AttributeValue_StringValue struct {
+ // A string up to 256 bytes long.
+ StringValue *TruncatableString `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"`
+}
+
+type AttributeValue_IntValue struct {
+ // A 64-bit signed integer.
+ IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"`
+}
+
+type AttributeValue_BoolValue struct {
+ // A Boolean value represented by `true` or `false`.
+ BoolValue bool `protobuf:"varint,3,opt,name=bool_value,json=boolValue,proto3,oneof"`
+}
+
+type AttributeValue_DoubleValue struct {
+ // A double value.
+ DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof"`
+}
+
+func (*AttributeValue_StringValue) isAttributeValue_Value() {}
+
+func (*AttributeValue_IntValue) isAttributeValue_Value() {}
+
+func (*AttributeValue_BoolValue) isAttributeValue_Value() {}
+
+func (*AttributeValue_DoubleValue) isAttributeValue_Value() {}
+
+// The call stack which originated this span.
+type StackTrace struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Stack frames in this stack trace.
+ StackFrames *StackTrace_StackFrames `protobuf:"bytes,1,opt,name=stack_frames,json=stackFrames,proto3" json:"stack_frames,omitempty"`
+ // The hash ID is used to conserve network bandwidth for duplicate
+ // stack traces within a single trace.
+ //
+ // Often multiple spans will have identical stack traces.
+ // The first occurrence of a stack trace should contain both
+ // `stack_frames` and a value in `stack_trace_hash_id`.
+ //
+ // Subsequent spans within the same request can refer
+ // to that stack trace by setting only `stack_trace_hash_id`.
+ //
+ // TODO: describe how to deal with the case where stack_trace_hash_id is
+ // zero because it was not set.
+ StackTraceHashId uint64 `protobuf:"varint,2,opt,name=stack_trace_hash_id,json=stackTraceHashId,proto3" json:"stack_trace_hash_id,omitempty"`
+}
+
+func (x *StackTrace) Reset() {
+ *x = StackTrace{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StackTrace) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StackTrace) ProtoMessage() {}
+
+func (x *StackTrace) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StackTrace.ProtoReflect.Descriptor instead.
+func (*StackTrace) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *StackTrace) GetStackFrames() *StackTrace_StackFrames {
+ if x != nil {
+ return x.StackFrames
+ }
+ return nil
+}
+
+func (x *StackTrace) GetStackTraceHashId() uint64 {
+ if x != nil {
+ return x.StackTraceHashId
+ }
+ return 0
+}
+
+// A description of a binary module.
+type Module struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // TODO: document the meaning of this field.
+ // For example: main binary, kernel modules, and dynamic libraries
+ // such as libc.so, sharedlib.so.
+ Module *TruncatableString `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"`
+ // A unique identifier for the module, usually a hash of its
+ // contents.
+ BuildId *TruncatableString `protobuf:"bytes,2,opt,name=build_id,json=buildId,proto3" json:"build_id,omitempty"`
+}
+
+func (x *Module) Reset() {
+ *x = Module{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Module) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Module) ProtoMessage() {}
+
+func (x *Module) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Module.ProtoReflect.Descriptor instead.
+func (*Module) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *Module) GetModule() *TruncatableString {
+ if x != nil {
+ return x.Module
+ }
+ return nil
+}
+
+func (x *Module) GetBuildId() *TruncatableString {
+ if x != nil {
+ return x.BuildId
+ }
+ return nil
+}
+
+// A string that might be shortened to a specified length.
+type TruncatableString struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The shortened string. For example, if the original string was 500 bytes long and
+ // the limit of the string was 128 bytes, then this value contains the first 128
+ // bytes of the 500-byte string. Note that truncation always happens on a
+ // character boundary, to ensure that a truncated string is still valid UTF-8.
+ // Because it may contain multi-byte characters, the size of the truncated string
+ // may be less than the truncation limit.
+ Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+ // The number of bytes removed from the original string. If this
+ // value is 0, then the string was not shortened.
+ TruncatedByteCount int32 `protobuf:"varint,2,opt,name=truncated_byte_count,json=truncatedByteCount,proto3" json:"truncated_byte_count,omitempty"`
+}
+
+func (x *TruncatableString) Reset() {
+ *x = TruncatableString{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TruncatableString) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TruncatableString) ProtoMessage() {}
+
+func (x *TruncatableString) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TruncatableString.ProtoReflect.Descriptor instead.
+func (*TruncatableString) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *TruncatableString) GetValue() string {
+ if x != nil {
+ return x.Value
+ }
+ return ""
+}
+
+func (x *TruncatableString) GetTruncatedByteCount() int32 {
+ if x != nil {
+ return x.TruncatedByteCount
+ }
+ return 0
+}
+
+// This field conveys information about request position in multiple distributed tracing graphs.
+// It is a list of Tracestate.Entry with a maximum of 32 members in the list.
+//
+// See the https://github.com/w3c/distributed-tracing for more details about this field.
+type Span_Tracestate struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of entries that represent the Tracestate.
+ Entries []*Span_Tracestate_Entry `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
+}
+
+func (x *Span_Tracestate) Reset() {
+ *x = Span_Tracestate{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_Tracestate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_Tracestate) ProtoMessage() {}
+
+func (x *Span_Tracestate) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_Tracestate.ProtoReflect.Descriptor instead.
+func (*Span_Tracestate) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *Span_Tracestate) GetEntries() []*Span_Tracestate_Entry {
+ if x != nil {
+ return x.Entries
+ }
+ return nil
+}
+
+// A set of attributes, each with a key and a value.
+type Span_Attributes struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The set of attributes. The value can be a string, an integer, a double
+ // or the Boolean values `true` or `false`. Note, global attributes like
+ // server name can be set as tags using resource API. Examples of attributes:
+ //
+ // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
+ // "/http/server_latency": 300
+ // "abc.com/myattribute": true
+ // "abc.com/score": 10.239
+ AttributeMap map[string]*AttributeValue `protobuf:"bytes,1,rep,name=attribute_map,json=attributeMap,proto3" json:"attribute_map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // The number of attributes that were discarded. Attributes can be discarded
+ // because their keys are too long or because there are too many attributes.
+ // If this value is 0, then no attributes were dropped.
+ DroppedAttributesCount int32 `protobuf:"varint,2,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"`
+}
+
+func (x *Span_Attributes) Reset() {
+ *x = Span_Attributes{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_Attributes) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_Attributes) ProtoMessage() {}
+
+func (x *Span_Attributes) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_Attributes.ProtoReflect.Descriptor instead.
+func (*Span_Attributes) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 1}
+}
+
+func (x *Span_Attributes) GetAttributeMap() map[string]*AttributeValue {
+ if x != nil {
+ return x.AttributeMap
+ }
+ return nil
+}
+
+func (x *Span_Attributes) GetDroppedAttributesCount() int32 {
+ if x != nil {
+ return x.DroppedAttributesCount
+ }
+ return 0
+}
+
+// A time-stamped annotation or message event in the Span.
+type Span_TimeEvent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The time the event occurred.
+ Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
+ // A `TimeEvent` can contain either an `Annotation` object or a
+ // `MessageEvent` object, but not both.
+ //
+ // Types that are assignable to Value:
+ // *Span_TimeEvent_Annotation_
+ // *Span_TimeEvent_MessageEvent_
+ Value isSpan_TimeEvent_Value `protobuf_oneof:"value"`
+}
+
+func (x *Span_TimeEvent) Reset() {
+ *x = Span_TimeEvent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_TimeEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_TimeEvent) ProtoMessage() {}
+
+func (x *Span_TimeEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_TimeEvent.ProtoReflect.Descriptor instead.
+func (*Span_TimeEvent) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 2}
+}
+
+func (x *Span_TimeEvent) GetTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.Time
+ }
+ return nil
+}
+
+func (m *Span_TimeEvent) GetValue() isSpan_TimeEvent_Value {
+ if m != nil {
+ return m.Value
+ }
+ return nil
+}
+
+func (x *Span_TimeEvent) GetAnnotation() *Span_TimeEvent_Annotation {
+ if x, ok := x.GetValue().(*Span_TimeEvent_Annotation_); ok {
+ return x.Annotation
+ }
+ return nil
+}
+
+func (x *Span_TimeEvent) GetMessageEvent() *Span_TimeEvent_MessageEvent {
+ if x, ok := x.GetValue().(*Span_TimeEvent_MessageEvent_); ok {
+ return x.MessageEvent
+ }
+ return nil
+}
+
+type isSpan_TimeEvent_Value interface {
+ isSpan_TimeEvent_Value()
+}
+
+type Span_TimeEvent_Annotation_ struct {
+ // A text annotation with a set of attributes.
+ Annotation *Span_TimeEvent_Annotation `protobuf:"bytes,2,opt,name=annotation,proto3,oneof"`
+}
+
+type Span_TimeEvent_MessageEvent_ struct {
+ // An event describing a message sent/received between Spans.
+ MessageEvent *Span_TimeEvent_MessageEvent `protobuf:"bytes,3,opt,name=message_event,json=messageEvent,proto3,oneof"`
+}
+
+func (*Span_TimeEvent_Annotation_) isSpan_TimeEvent_Value() {}
+
+func (*Span_TimeEvent_MessageEvent_) isSpan_TimeEvent_Value() {}
+
+// A collection of `TimeEvent`s. A `TimeEvent` is a time-stamped annotation
+// on the span, consisting of either user-supplied key-value pairs, or
+// details of a message sent/received between Spans.
+type Span_TimeEvents struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A collection of `TimeEvent`s.
+ TimeEvent []*Span_TimeEvent `protobuf:"bytes,1,rep,name=time_event,json=timeEvent,proto3" json:"time_event,omitempty"`
+ // The number of dropped annotations in all the included time events.
+ // If the value is 0, then no annotations were dropped.
+ DroppedAnnotationsCount int32 `protobuf:"varint,2,opt,name=dropped_annotations_count,json=droppedAnnotationsCount,proto3" json:"dropped_annotations_count,omitempty"`
+ // The number of dropped message events in all the included time events.
+ // If the value is 0, then no message events were dropped.
+ DroppedMessageEventsCount int32 `protobuf:"varint,3,opt,name=dropped_message_events_count,json=droppedMessageEventsCount,proto3" json:"dropped_message_events_count,omitempty"`
+}
+
+func (x *Span_TimeEvents) Reset() {
+ *x = Span_TimeEvents{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_TimeEvents) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_TimeEvents) ProtoMessage() {}
+
+func (x *Span_TimeEvents) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_TimeEvents.ProtoReflect.Descriptor instead.
+func (*Span_TimeEvents) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 3}
+}
+
+func (x *Span_TimeEvents) GetTimeEvent() []*Span_TimeEvent {
+ if x != nil {
+ return x.TimeEvent
+ }
+ return nil
+}
+
+func (x *Span_TimeEvents) GetDroppedAnnotationsCount() int32 {
+ if x != nil {
+ return x.DroppedAnnotationsCount
+ }
+ return 0
+}
+
+func (x *Span_TimeEvents) GetDroppedMessageEventsCount() int32 {
+ if x != nil {
+ return x.DroppedMessageEventsCount
+ }
+ return 0
+}
+
+// A pointer from the current span to another span in the same trace or in a
+// different trace. For example, this can be used in batching operations,
+// where a single batch handler processes multiple requests from different
+// traces or when the handler receives a request from a different project.
+type Span_Link struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A unique identifier of a trace that this linked span is part of. The ID is a
+ // 16-byte array.
+ TraceId []byte `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
+ // A unique identifier for the linked span. The ID is an 8-byte array.
+ SpanId []byte `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
+ // The relationship of the current span relative to the linked span.
+ Type Span_Link_Type `protobuf:"varint,3,opt,name=type,proto3,enum=opencensus.proto.trace.v1.Span_Link_Type" json:"type,omitempty"`
+ // A set of attributes on the link.
+ Attributes *Span_Attributes `protobuf:"bytes,4,opt,name=attributes,proto3" json:"attributes,omitempty"`
+ // The Tracestate associated with the link.
+ Tracestate *Span_Tracestate `protobuf:"bytes,5,opt,name=tracestate,proto3" json:"tracestate,omitempty"`
+}
+
+func (x *Span_Link) Reset() {
+ *x = Span_Link{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_Link) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_Link) ProtoMessage() {}
+
+func (x *Span_Link) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_Link.ProtoReflect.Descriptor instead.
+func (*Span_Link) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 4}
+}
+
+func (x *Span_Link) GetTraceId() []byte {
+ if x != nil {
+ return x.TraceId
+ }
+ return nil
+}
+
+func (x *Span_Link) GetSpanId() []byte {
+ if x != nil {
+ return x.SpanId
+ }
+ return nil
+}
+
+func (x *Span_Link) GetType() Span_Link_Type {
+ if x != nil {
+ return x.Type
+ }
+ return Span_Link_TYPE_UNSPECIFIED
+}
+
+func (x *Span_Link) GetAttributes() *Span_Attributes {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+func (x *Span_Link) GetTracestate() *Span_Tracestate {
+ if x != nil {
+ return x.Tracestate
+ }
+ return nil
+}
+
+// A collection of links, which are references from this span to a span
+// in the same or different trace.
+type Span_Links struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A collection of links.
+ Link []*Span_Link `protobuf:"bytes,1,rep,name=link,proto3" json:"link,omitempty"`
+ // The number of dropped links after the maximum size was enforced. If
+ // this value is 0, then no links were dropped.
+ DroppedLinksCount int32 `protobuf:"varint,2,opt,name=dropped_links_count,json=droppedLinksCount,proto3" json:"dropped_links_count,omitempty"`
+}
+
+func (x *Span_Links) Reset() {
+ *x = Span_Links{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_Links) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_Links) ProtoMessage() {}
+
+func (x *Span_Links) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_Links.ProtoReflect.Descriptor instead.
+func (*Span_Links) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 5}
+}
+
+func (x *Span_Links) GetLink() []*Span_Link {
+ if x != nil {
+ return x.Link
+ }
+ return nil
+}
+
+func (x *Span_Links) GetDroppedLinksCount() int32 {
+ if x != nil {
+ return x.DroppedLinksCount
+ }
+ return 0
+}
+
+type Span_Tracestate_Entry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The key must begin with a lowercase letter, and can only contain
+ // lowercase letters 'a'-'z', digits '0'-'9', underscores '_', dashes
+ // '-', asterisks '*', and forward slashes '/'.
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ // The value is opaque string up to 256 characters printable ASCII
+ // RFC0020 characters (i.e., the range 0x20 to 0x7E) except ',' and '='.
+ // Note that this also excludes tabs, newlines, carriage returns, etc.
+ Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *Span_Tracestate_Entry) Reset() {
+ *x = Span_Tracestate_Entry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_Tracestate_Entry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_Tracestate_Entry) ProtoMessage() {}
+
+func (x *Span_Tracestate_Entry) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_Tracestate_Entry.ProtoReflect.Descriptor instead.
+func (*Span_Tracestate_Entry) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 0, 0}
+}
+
+func (x *Span_Tracestate_Entry) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+func (x *Span_Tracestate_Entry) GetValue() string {
+ if x != nil {
+ return x.Value
+ }
+ return ""
+}
+
+// A text annotation with a set of attributes.
+type Span_TimeEvent_Annotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A user-supplied message describing the event.
+ Description *TruncatableString `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
+ // A set of attributes on the annotation.
+ Attributes *Span_Attributes `protobuf:"bytes,2,opt,name=attributes,proto3" json:"attributes,omitempty"`
+}
+
+func (x *Span_TimeEvent_Annotation) Reset() {
+ *x = Span_TimeEvent_Annotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_TimeEvent_Annotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_TimeEvent_Annotation) ProtoMessage() {}
+
+func (x *Span_TimeEvent_Annotation) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_TimeEvent_Annotation.ProtoReflect.Descriptor instead.
+func (*Span_TimeEvent_Annotation) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 2, 0}
+}
+
+func (x *Span_TimeEvent_Annotation) GetDescription() *TruncatableString {
+ if x != nil {
+ return x.Description
+ }
+ return nil
+}
+
+func (x *Span_TimeEvent_Annotation) GetAttributes() *Span_Attributes {
+ if x != nil {
+ return x.Attributes
+ }
+ return nil
+}
+
+// An event describing a message sent/received between Spans.
+type Span_TimeEvent_MessageEvent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The type of MessageEvent. Indicates whether the message was sent or
+ // received.
+ Type Span_TimeEvent_MessageEvent_Type `protobuf:"varint,1,opt,name=type,proto3,enum=opencensus.proto.trace.v1.Span_TimeEvent_MessageEvent_Type" json:"type,omitempty"`
+ // An identifier for the MessageEvent's message that can be used to match
+ // SENT and RECEIVED MessageEvents. For example, this field could
+ // represent a sequence ID for a streaming RPC. It is recommended to be
+ // unique within a Span.
+ Id uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
+ // The number of uncompressed bytes sent or received.
+ UncompressedSize uint64 `protobuf:"varint,3,opt,name=uncompressed_size,json=uncompressedSize,proto3" json:"uncompressed_size,omitempty"`
+ // The number of compressed bytes sent or received. If zero, assumed to
+ // be the same size as uncompressed.
+ CompressedSize uint64 `protobuf:"varint,4,opt,name=compressed_size,json=compressedSize,proto3" json:"compressed_size,omitempty"`
+}
+
+func (x *Span_TimeEvent_MessageEvent) Reset() {
+ *x = Span_TimeEvent_MessageEvent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Span_TimeEvent_MessageEvent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Span_TimeEvent_MessageEvent) ProtoMessage() {}
+
+func (x *Span_TimeEvent_MessageEvent) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[15]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Span_TimeEvent_MessageEvent.ProtoReflect.Descriptor instead.
+func (*Span_TimeEvent_MessageEvent) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{0, 2, 1}
+}
+
+func (x *Span_TimeEvent_MessageEvent) GetType() Span_TimeEvent_MessageEvent_Type {
+ if x != nil {
+ return x.Type
+ }
+ return Span_TimeEvent_MessageEvent_TYPE_UNSPECIFIED
+}
+
+func (x *Span_TimeEvent_MessageEvent) GetId() uint64 {
+ if x != nil {
+ return x.Id
+ }
+ return 0
+}
+
+func (x *Span_TimeEvent_MessageEvent) GetUncompressedSize() uint64 {
+ if x != nil {
+ return x.UncompressedSize
+ }
+ return 0
+}
+
+func (x *Span_TimeEvent_MessageEvent) GetCompressedSize() uint64 {
+ if x != nil {
+ return x.CompressedSize
+ }
+ return 0
+}
+
+// A single stack frame in a stack trace.
+type StackTrace_StackFrame struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The fully-qualified name that uniquely identifies the function or
+ // method that is active in this frame.
+ FunctionName *TruncatableString `protobuf:"bytes,1,opt,name=function_name,json=functionName,proto3" json:"function_name,omitempty"`
+ // An un-mangled function name, if `function_name` is
+ // [mangled](http://www.avabodh.com/cxxin/namemangling.html). The name can
+ // be fully qualified.
+ OriginalFunctionName *TruncatableString `protobuf:"bytes,2,opt,name=original_function_name,json=originalFunctionName,proto3" json:"original_function_name,omitempty"`
+ // The name of the source file where the function call appears.
+ FileName *TruncatableString `protobuf:"bytes,3,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"`
+ // The line number in `file_name` where the function call appears.
+ LineNumber int64 `protobuf:"varint,4,opt,name=line_number,json=lineNumber,proto3" json:"line_number,omitempty"`
+ // The column number where the function call appears, if available.
+ // This is important in JavaScript because of its anonymous functions.
+ ColumnNumber int64 `protobuf:"varint,5,opt,name=column_number,json=columnNumber,proto3" json:"column_number,omitempty"`
+ // The binary module from where the code was loaded.
+ LoadModule *Module `protobuf:"bytes,6,opt,name=load_module,json=loadModule,proto3" json:"load_module,omitempty"`
+ // The version of the deployed source code.
+ SourceVersion *TruncatableString `protobuf:"bytes,7,opt,name=source_version,json=sourceVersion,proto3" json:"source_version,omitempty"`
+}
+
+func (x *StackTrace_StackFrame) Reset() {
+ *x = StackTrace_StackFrame{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StackTrace_StackFrame) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StackTrace_StackFrame) ProtoMessage() {}
+
+func (x *StackTrace_StackFrame) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[16]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StackTrace_StackFrame.ProtoReflect.Descriptor instead.
+func (*StackTrace_StackFrame) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{3, 0}
+}
+
+func (x *StackTrace_StackFrame) GetFunctionName() *TruncatableString {
+ if x != nil {
+ return x.FunctionName
+ }
+ return nil
+}
+
+func (x *StackTrace_StackFrame) GetOriginalFunctionName() *TruncatableString {
+ if x != nil {
+ return x.OriginalFunctionName
+ }
+ return nil
+}
+
+func (x *StackTrace_StackFrame) GetFileName() *TruncatableString {
+ if x != nil {
+ return x.FileName
+ }
+ return nil
+}
+
+func (x *StackTrace_StackFrame) GetLineNumber() int64 {
+ if x != nil {
+ return x.LineNumber
+ }
+ return 0
+}
+
+func (x *StackTrace_StackFrame) GetColumnNumber() int64 {
+ if x != nil {
+ return x.ColumnNumber
+ }
+ return 0
+}
+
+func (x *StackTrace_StackFrame) GetLoadModule() *Module {
+ if x != nil {
+ return x.LoadModule
+ }
+ return nil
+}
+
+func (x *StackTrace_StackFrame) GetSourceVersion() *TruncatableString {
+ if x != nil {
+ return x.SourceVersion
+ }
+ return nil
+}
+
+// A collection of stack frames, which can be truncated.
+type StackTrace_StackFrames struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Stack frames in this call stack.
+ Frame []*StackTrace_StackFrame `protobuf:"bytes,1,rep,name=frame,proto3" json:"frame,omitempty"`
+ // The number of stack frames that were dropped because there
+ // were too many stack frames.
+ // If this value is 0, then no stack frames were dropped.
+ DroppedFramesCount int32 `protobuf:"varint,2,opt,name=dropped_frames_count,json=droppedFramesCount,proto3" json:"dropped_frames_count,omitempty"`
+}
+
+func (x *StackTrace_StackFrames) Reset() {
+ *x = StackTrace_StackFrames{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StackTrace_StackFrames) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StackTrace_StackFrames) ProtoMessage() {}
+
+func (x *StackTrace_StackFrames) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_proto_msgTypes[17]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StackTrace_StackFrames.ProtoReflect.Descriptor instead.
+func (*StackTrace_StackFrames) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP(), []int{3, 1}
+}
+
+func (x *StackTrace_StackFrames) GetFrame() []*StackTrace_StackFrame {
+ if x != nil {
+ return x.Frame
+ }
+ return nil
+}
+
+func (x *StackTrace_StackFrames) GetDroppedFramesCount() int32 {
+ if x != nil {
+ return x.DroppedFramesCount
+ }
+ return 0
+}
+
+var File_opencensus_proto_trace_v1_trace_proto protoreflect.FileDescriptor
+
+var file_opencensus_proto_trace_v1_trace_proto_rawDesc = []byte{
+ 0x0a, 0x25, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x63,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e,
+ 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e,
+ 0x76, 0x31, 0x1a, 0x2b, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31,
+ 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x91, 0x16, 0x0a, 0x04, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72, 0x61,
+ 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x72, 0x61,
+ 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x4a, 0x0a,
+ 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70,
+ 0x61, 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x74,
+ 0x72, 0x61, 0x63, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x72,
+ 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x0c, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12,
+ 0x40, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x3c, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x28, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e,
+ 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e, 0x64, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12,
+ 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
+ 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e,
+ 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54,
+ 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d,
+ 0x65, 0x12, 0x4a, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73,
+ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65,
+ 0x73, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x46, 0x0a,
+ 0x0b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x08, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,
+ 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x63, 0x6b,
+ 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x65, 0x76,
+ 0x65, 0x6e, 0x74, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72,
+ 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x54, 0x69, 0x6d, 0x65,
+ 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x45, 0x76, 0x65, 0x6e,
+ 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x25, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70,
+ 0x61, 0x6e, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x12,
+ 0x39, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, 0x0a, 0x08, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x58,
+ 0x0a, 0x1b, 0x73, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x61,
+ 0x73, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x0c, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
+ 0x17, 0x73, 0x61, 0x6d, 0x65, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x41, 0x73, 0x50, 0x61,
+ 0x72, 0x65, 0x6e, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x46, 0x0a, 0x10, 0x63, 0x68, 0x69, 0x6c,
+ 0x64, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x52, 0x0e, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x53, 0x70, 0x61, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+ 0x1a, 0x89, 0x01, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12,
+ 0x4a, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x30, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61,
+ 0x6e, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x1a, 0x2f, 0x0a, 0x05, 0x45,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0x95, 0x02, 0x0a,
+ 0x0a, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x61, 0x0a, 0x0d, 0x61,
+ 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53,
+ 0x70, 0x61, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41,
+ 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x0c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x12, 0x38,
+ 0x0a, 0x18, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
+ 0x75, 0x74, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
+ 0x52, 0x16, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
+ 0x74, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x1a, 0x6a, 0x0a, 0x11, 0x41, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x65, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+ 0x3f, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29,
+ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xa4, 0x05, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x76, 0x65,
+ 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69,
+ 0x6d, 0x65, 0x12, 0x56, 0x0a, 0x0a, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e,
+ 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x76, 0x65, 0x6e,
+ 0x74, 0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0a,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x0d, 0x6d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x36, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70,
+ 0x61, 0x6e, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x1a, 0xa8, 0x01, 0x0a, 0x0a, 0x41, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4e, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4a, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
+ 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x41, 0x74,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
+ 0x75, 0x74, 0x65, 0x73, 0x1a, 0xfb, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x4f, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x4d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, 0x65,
+ 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70,
+ 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x04, 0x52, 0x10, 0x75, 0x6e, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x53,
+ 0x69, 0x7a, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65,
+ 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x63, 0x6f,
+ 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x34, 0x0a, 0x04,
+ 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53,
+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x53, 0x45,
+ 0x4e, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44,
+ 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x1a, 0xd3, 0x01, 0x0a, 0x0a,
+ 0x54, 0x69, 0x6d, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x48, 0x0a, 0x0a, 0x74, 0x69,
+ 0x6d, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29,
+ 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e,
+ 0x54, 0x69, 0x6d, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x45,
+ 0x76, 0x65, 0x6e, 0x74, 0x12, 0x3a, 0x0a, 0x19, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
+ 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x17, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64,
+ 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74,
+ 0x12, 0x3f, 0x0a, 0x1c, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x19, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x4d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x75, 0x6e,
+ 0x74, 0x1a, 0xde, 0x02, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x72,
+ 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x74, 0x72,
+ 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x70, 0x61, 0x6e, 0x49, 0x64, 0x12, 0x3d,
+ 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x6f,
+ 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
+ 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x4c, 0x69,
+ 0x6e, 0x6b, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x4a, 0x0a,
+ 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70,
+ 0x61, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x0a, 0x61,
+ 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x4a, 0x0a, 0x0a, 0x74, 0x72, 0x61,
+ 0x63, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x54,
+ 0x72, 0x61, 0x63, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x72, 0x61, 0x63, 0x65,
+ 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x4b, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a,
+ 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
+ 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, 0x49, 0x4c, 0x44, 0x5f, 0x4c, 0x49, 0x4e,
+ 0x4b, 0x45, 0x44, 0x5f, 0x53, 0x50, 0x41, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x41,
+ 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x45, 0x44, 0x5f, 0x53, 0x50, 0x41, 0x4e,
+ 0x10, 0x02, 0x1a, 0x71, 0x0a, 0x05, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x12, 0x38, 0x0a, 0x04, 0x6c,
+ 0x69, 0x6e, 0x6b, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61,
+ 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x70, 0x61, 0x6e, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52,
+ 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64,
+ 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x4c, 0x69, 0x6e, 0x6b, 0x73,
+ 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3d, 0x0a, 0x08, 0x53, 0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e,
+ 0x64, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x50, 0x41, 0x4e, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55,
+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06,
+ 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4c, 0x49, 0x45,
+ 0x4e, 0x54, 0x10, 0x02, 0x22, 0x36, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12,
+ 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f,
+ 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xd1, 0x01, 0x0a,
+ 0x0e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12,
+ 0x51, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73,
+ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x1d, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62,
+ 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x22, 0x8b, 0x06, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12,
+ 0x54, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73,
+ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61,
+ 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x46,
+ 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x2d, 0x0a, 0x13, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74,
+ 0x72, 0x61, 0x63, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x04, 0x52, 0x10, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x48, 0x61,
+ 0x73, 0x68, 0x49, 0x64, 0x1a, 0xed, 0x03, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72,
+ 0x61, 0x6d, 0x65, 0x12, 0x51, 0x0a, 0x0d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72,
+ 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62,
+ 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x62, 0x0a, 0x16, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e,
+ 0x61, 0x6c, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e,
+ 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74,
+ 0x72, 0x69, 0x6e, 0x67, 0x52, 0x14, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x46, 0x75,
+ 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x09, 0x66, 0x69,
+ 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e,
+ 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x66, 0x69, 0x6c,
+ 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x6e, 0x75,
+ 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x6c, 0x69, 0x6e, 0x65,
+ 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
+ 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63,
+ 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x0b, 0x6c,
+ 0x6f, 0x61, 0x64, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x21, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x52, 0x0a, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12,
+ 0x53, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65,
+ 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65,
+ 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x87, 0x01, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72,
+ 0x61, 0x6d, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x05, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b,
+ 0x46, 0x72, 0x61, 0x6d, 0x65, 0x52, 0x05, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14,
+ 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x64, 0x72, 0x6f, 0x70,
+ 0x70, 0x65, 0x64, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97,
+ 0x01, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x44, 0x0a, 0x06, 0x6d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
+ 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61,
+ 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c,
+ 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12,
+ 0x47, 0x0a, 0x08, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2c, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72,
+ 0x75, 0x6e, 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52,
+ 0x07, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x64, 0x22, 0x5b, 0x0a, 0x11, 0x54, 0x72, 0x75, 0x6e,
+ 0x63, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64,
+ 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x12, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65,
+ 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x8f, 0x01, 0x0a, 0x1c, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65,
+ 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72,
+ 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x65, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65,
+ 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73,
+ 0x75, 0x73, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f,
+ 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0xea, 0x02, 0x1c, 0x4f, 0x70, 0x65, 0x6e, 0x43,
+ 0x65, 0x6e, 0x73, 0x75, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x54, 0x72,
+ 0x61, 0x63, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_opencensus_proto_trace_v1_trace_proto_rawDescOnce sync.Once
+ file_opencensus_proto_trace_v1_trace_proto_rawDescData = file_opencensus_proto_trace_v1_trace_proto_rawDesc
+)
+
+func file_opencensus_proto_trace_v1_trace_proto_rawDescGZIP() []byte {
+ file_opencensus_proto_trace_v1_trace_proto_rawDescOnce.Do(func() {
+ file_opencensus_proto_trace_v1_trace_proto_rawDescData = protoimpl.X.CompressGZIP(file_opencensus_proto_trace_v1_trace_proto_rawDescData)
+ })
+ return file_opencensus_proto_trace_v1_trace_proto_rawDescData
+}
+
+var file_opencensus_proto_trace_v1_trace_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_opencensus_proto_trace_v1_trace_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
+var file_opencensus_proto_trace_v1_trace_proto_goTypes = []interface{}{
+ (Span_SpanKind)(0), // 0: opencensus.proto.trace.v1.Span.SpanKind
+ (Span_TimeEvent_MessageEvent_Type)(0), // 1: opencensus.proto.trace.v1.Span.TimeEvent.MessageEvent.Type
+ (Span_Link_Type)(0), // 2: opencensus.proto.trace.v1.Span.Link.Type
+ (*Span)(nil), // 3: opencensus.proto.trace.v1.Span
+ (*Status)(nil), // 4: opencensus.proto.trace.v1.Status
+ (*AttributeValue)(nil), // 5: opencensus.proto.trace.v1.AttributeValue
+ (*StackTrace)(nil), // 6: opencensus.proto.trace.v1.StackTrace
+ (*Module)(nil), // 7: opencensus.proto.trace.v1.Module
+ (*TruncatableString)(nil), // 8: opencensus.proto.trace.v1.TruncatableString
+ (*Span_Tracestate)(nil), // 9: opencensus.proto.trace.v1.Span.Tracestate
+ (*Span_Attributes)(nil), // 10: opencensus.proto.trace.v1.Span.Attributes
+ (*Span_TimeEvent)(nil), // 11: opencensus.proto.trace.v1.Span.TimeEvent
+ (*Span_TimeEvents)(nil), // 12: opencensus.proto.trace.v1.Span.TimeEvents
+ (*Span_Link)(nil), // 13: opencensus.proto.trace.v1.Span.Link
+ (*Span_Links)(nil), // 14: opencensus.proto.trace.v1.Span.Links
+ (*Span_Tracestate_Entry)(nil), // 15: opencensus.proto.trace.v1.Span.Tracestate.Entry
+ nil, // 16: opencensus.proto.trace.v1.Span.Attributes.AttributeMapEntry
+ (*Span_TimeEvent_Annotation)(nil), // 17: opencensus.proto.trace.v1.Span.TimeEvent.Annotation
+ (*Span_TimeEvent_MessageEvent)(nil), // 18: opencensus.proto.trace.v1.Span.TimeEvent.MessageEvent
+ (*StackTrace_StackFrame)(nil), // 19: opencensus.proto.trace.v1.StackTrace.StackFrame
+ (*StackTrace_StackFrames)(nil), // 20: opencensus.proto.trace.v1.StackTrace.StackFrames
+ (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp
+ (*v1.Resource)(nil), // 22: opencensus.proto.resource.v1.Resource
+ (*wrapperspb.BoolValue)(nil), // 23: google.protobuf.BoolValue
+ (*wrapperspb.UInt32Value)(nil), // 24: google.protobuf.UInt32Value
+}
+var file_opencensus_proto_trace_v1_trace_proto_depIdxs = []int32{
+ 9, // 0: opencensus.proto.trace.v1.Span.tracestate:type_name -> opencensus.proto.trace.v1.Span.Tracestate
+ 8, // 1: opencensus.proto.trace.v1.Span.name:type_name -> opencensus.proto.trace.v1.TruncatableString
+ 0, // 2: opencensus.proto.trace.v1.Span.kind:type_name -> opencensus.proto.trace.v1.Span.SpanKind
+ 21, // 3: opencensus.proto.trace.v1.Span.start_time:type_name -> google.protobuf.Timestamp
+ 21, // 4: opencensus.proto.trace.v1.Span.end_time:type_name -> google.protobuf.Timestamp
+ 10, // 5: opencensus.proto.trace.v1.Span.attributes:type_name -> opencensus.proto.trace.v1.Span.Attributes
+ 6, // 6: opencensus.proto.trace.v1.Span.stack_trace:type_name -> opencensus.proto.trace.v1.StackTrace
+ 12, // 7: opencensus.proto.trace.v1.Span.time_events:type_name -> opencensus.proto.trace.v1.Span.TimeEvents
+ 14, // 8: opencensus.proto.trace.v1.Span.links:type_name -> opencensus.proto.trace.v1.Span.Links
+ 4, // 9: opencensus.proto.trace.v1.Span.status:type_name -> opencensus.proto.trace.v1.Status
+ 22, // 10: opencensus.proto.trace.v1.Span.resource:type_name -> opencensus.proto.resource.v1.Resource
+ 23, // 11: opencensus.proto.trace.v1.Span.same_process_as_parent_span:type_name -> google.protobuf.BoolValue
+ 24, // 12: opencensus.proto.trace.v1.Span.child_span_count:type_name -> google.protobuf.UInt32Value
+ 8, // 13: opencensus.proto.trace.v1.AttributeValue.string_value:type_name -> opencensus.proto.trace.v1.TruncatableString
+ 20, // 14: opencensus.proto.trace.v1.StackTrace.stack_frames:type_name -> opencensus.proto.trace.v1.StackTrace.StackFrames
+ 8, // 15: opencensus.proto.trace.v1.Module.module:type_name -> opencensus.proto.trace.v1.TruncatableString
+ 8, // 16: opencensus.proto.trace.v1.Module.build_id:type_name -> opencensus.proto.trace.v1.TruncatableString
+ 15, // 17: opencensus.proto.trace.v1.Span.Tracestate.entries:type_name -> opencensus.proto.trace.v1.Span.Tracestate.Entry
+ 16, // 18: opencensus.proto.trace.v1.Span.Attributes.attribute_map:type_name -> opencensus.proto.trace.v1.Span.Attributes.AttributeMapEntry
+ 21, // 19: opencensus.proto.trace.v1.Span.TimeEvent.time:type_name -> google.protobuf.Timestamp
+ 17, // 20: opencensus.proto.trace.v1.Span.TimeEvent.annotation:type_name -> opencensus.proto.trace.v1.Span.TimeEvent.Annotation
+ 18, // 21: opencensus.proto.trace.v1.Span.TimeEvent.message_event:type_name -> opencensus.proto.trace.v1.Span.TimeEvent.MessageEvent
+ 11, // 22: opencensus.proto.trace.v1.Span.TimeEvents.time_event:type_name -> opencensus.proto.trace.v1.Span.TimeEvent
+ 2, // 23: opencensus.proto.trace.v1.Span.Link.type:type_name -> opencensus.proto.trace.v1.Span.Link.Type
+ 10, // 24: opencensus.proto.trace.v1.Span.Link.attributes:type_name -> opencensus.proto.trace.v1.Span.Attributes
+ 9, // 25: opencensus.proto.trace.v1.Span.Link.tracestate:type_name -> opencensus.proto.trace.v1.Span.Tracestate
+ 13, // 26: opencensus.proto.trace.v1.Span.Links.link:type_name -> opencensus.proto.trace.v1.Span.Link
+ 5, // 27: opencensus.proto.trace.v1.Span.Attributes.AttributeMapEntry.value:type_name -> opencensus.proto.trace.v1.AttributeValue
+ 8, // 28: opencensus.proto.trace.v1.Span.TimeEvent.Annotation.description:type_name -> opencensus.proto.trace.v1.TruncatableString
+ 10, // 29: opencensus.proto.trace.v1.Span.TimeEvent.Annotation.attributes:type_name -> opencensus.proto.trace.v1.Span.Attributes
+ 1, // 30: opencensus.proto.trace.v1.Span.TimeEvent.MessageEvent.type:type_name -> opencensus.proto.trace.v1.Span.TimeEvent.MessageEvent.Type
+ 8, // 31: opencensus.proto.trace.v1.StackTrace.StackFrame.function_name:type_name -> opencensus.proto.trace.v1.TruncatableString
+ 8, // 32: opencensus.proto.trace.v1.StackTrace.StackFrame.original_function_name:type_name -> opencensus.proto.trace.v1.TruncatableString
+ 8, // 33: opencensus.proto.trace.v1.StackTrace.StackFrame.file_name:type_name -> opencensus.proto.trace.v1.TruncatableString
+ 7, // 34: opencensus.proto.trace.v1.StackTrace.StackFrame.load_module:type_name -> opencensus.proto.trace.v1.Module
+ 8, // 35: opencensus.proto.trace.v1.StackTrace.StackFrame.source_version:type_name -> opencensus.proto.trace.v1.TruncatableString
+ 19, // 36: opencensus.proto.trace.v1.StackTrace.StackFrames.frame:type_name -> opencensus.proto.trace.v1.StackTrace.StackFrame
+ 37, // [37:37] is the sub-list for method output_type
+ 37, // [37:37] is the sub-list for method input_type
+ 37, // [37:37] is the sub-list for extension type_name
+ 37, // [37:37] is the sub-list for extension extendee
+ 0, // [0:37] is the sub-list for field type_name
+}
+
+func init() { file_opencensus_proto_trace_v1_trace_proto_init() }
+func file_opencensus_proto_trace_v1_trace_proto_init() {
+ if File_opencensus_proto_trace_v1_trace_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Status); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AttributeValue); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StackTrace); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Module); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TruncatableString); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_Tracestate); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_Attributes); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_TimeEvent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_TimeEvents); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_Link); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_Links); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_Tracestate_Entry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_TimeEvent_Annotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Span_TimeEvent_MessageEvent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StackTrace_StackFrame); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StackTrace_StackFrames); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[2].OneofWrappers = []interface{}{
+ (*AttributeValue_StringValue)(nil),
+ (*AttributeValue_IntValue)(nil),
+ (*AttributeValue_BoolValue)(nil),
+ (*AttributeValue_DoubleValue)(nil),
+ }
+ file_opencensus_proto_trace_v1_trace_proto_msgTypes[8].OneofWrappers = []interface{}{
+ (*Span_TimeEvent_Annotation_)(nil),
+ (*Span_TimeEvent_MessageEvent_)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_opencensus_proto_trace_v1_trace_proto_rawDesc,
+ NumEnums: 3,
+ NumMessages: 18,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_opencensus_proto_trace_v1_trace_proto_goTypes,
+ DependencyIndexes: file_opencensus_proto_trace_v1_trace_proto_depIdxs,
+ EnumInfos: file_opencensus_proto_trace_v1_trace_proto_enumTypes,
+ MessageInfos: file_opencensus_proto_trace_v1_trace_proto_msgTypes,
+ }.Build()
+ File_opencensus_proto_trace_v1_trace_proto = out.File
+ file_opencensus_proto_trace_v1_trace_proto_rawDesc = nil
+ file_opencensus_proto_trace_v1_trace_proto_goTypes = nil
+ file_opencensus_proto_trace_v1_trace_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go
new file mode 100644
index 000000000..ee62b2e35
--- /dev/null
+++ b/vendor/github.com/census-instrumentation/opencensus-proto/gen-go/trace/v1/trace_config.pb.go
@@ -0,0 +1,555 @@
+// Copyright 2018, OpenCensus 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.26.0
+// protoc v3.17.3
+// source: opencensus/proto/trace/v1/trace_config.proto
+
+package v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// How spans should be sampled:
+// - Always off
+// - Always on
+// - Always follow the parent Span's decision (off if no parent).
+type ConstantSampler_ConstantDecision int32
+
+const (
+ ConstantSampler_ALWAYS_OFF ConstantSampler_ConstantDecision = 0
+ ConstantSampler_ALWAYS_ON ConstantSampler_ConstantDecision = 1
+ ConstantSampler_ALWAYS_PARENT ConstantSampler_ConstantDecision = 2
+)
+
+// Enum value maps for ConstantSampler_ConstantDecision.
+var (
+ ConstantSampler_ConstantDecision_name = map[int32]string{
+ 0: "ALWAYS_OFF",
+ 1: "ALWAYS_ON",
+ 2: "ALWAYS_PARENT",
+ }
+ ConstantSampler_ConstantDecision_value = map[string]int32{
+ "ALWAYS_OFF": 0,
+ "ALWAYS_ON": 1,
+ "ALWAYS_PARENT": 2,
+ }
+)
+
+func (x ConstantSampler_ConstantDecision) Enum() *ConstantSampler_ConstantDecision {
+ p := new(ConstantSampler_ConstantDecision)
+ *p = x
+ return p
+}
+
+func (x ConstantSampler_ConstantDecision) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ConstantSampler_ConstantDecision) Descriptor() protoreflect.EnumDescriptor {
+ return file_opencensus_proto_trace_v1_trace_config_proto_enumTypes[0].Descriptor()
+}
+
+func (ConstantSampler_ConstantDecision) Type() protoreflect.EnumType {
+ return &file_opencensus_proto_trace_v1_trace_config_proto_enumTypes[0]
+}
+
+func (x ConstantSampler_ConstantDecision) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ConstantSampler_ConstantDecision.Descriptor instead.
+func (ConstantSampler_ConstantDecision) EnumDescriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_config_proto_rawDescGZIP(), []int{2, 0}
+}
+
+// Global configuration of the trace service. All fields must be specified, or
+// the default (zero) values will be used for each type.
+type TraceConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The global default sampler used to make decisions on span sampling.
+ //
+ // Types that are assignable to Sampler:
+ // *TraceConfig_ProbabilitySampler
+ // *TraceConfig_ConstantSampler
+ // *TraceConfig_RateLimitingSampler
+ Sampler isTraceConfig_Sampler `protobuf_oneof:"sampler"`
+ // The global default max number of attributes per span.
+ MaxNumberOfAttributes int64 `protobuf:"varint,4,opt,name=max_number_of_attributes,json=maxNumberOfAttributes,proto3" json:"max_number_of_attributes,omitempty"`
+ // The global default max number of annotation events per span.
+ MaxNumberOfAnnotations int64 `protobuf:"varint,5,opt,name=max_number_of_annotations,json=maxNumberOfAnnotations,proto3" json:"max_number_of_annotations,omitempty"`
+ // The global default max number of message events per span.
+ MaxNumberOfMessageEvents int64 `protobuf:"varint,6,opt,name=max_number_of_message_events,json=maxNumberOfMessageEvents,proto3" json:"max_number_of_message_events,omitempty"`
+ // The global default max number of link entries per span.
+ MaxNumberOfLinks int64 `protobuf:"varint,7,opt,name=max_number_of_links,json=maxNumberOfLinks,proto3" json:"max_number_of_links,omitempty"`
+}
+
+func (x *TraceConfig) Reset() {
+ *x = TraceConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TraceConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TraceConfig) ProtoMessage() {}
+
+func (x *TraceConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TraceConfig.ProtoReflect.Descriptor instead.
+func (*TraceConfig) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_config_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *TraceConfig) GetSampler() isTraceConfig_Sampler {
+ if m != nil {
+ return m.Sampler
+ }
+ return nil
+}
+
+func (x *TraceConfig) GetProbabilitySampler() *ProbabilitySampler {
+ if x, ok := x.GetSampler().(*TraceConfig_ProbabilitySampler); ok {
+ return x.ProbabilitySampler
+ }
+ return nil
+}
+
+func (x *TraceConfig) GetConstantSampler() *ConstantSampler {
+ if x, ok := x.GetSampler().(*TraceConfig_ConstantSampler); ok {
+ return x.ConstantSampler
+ }
+ return nil
+}
+
+func (x *TraceConfig) GetRateLimitingSampler() *RateLimitingSampler {
+ if x, ok := x.GetSampler().(*TraceConfig_RateLimitingSampler); ok {
+ return x.RateLimitingSampler
+ }
+ return nil
+}
+
+func (x *TraceConfig) GetMaxNumberOfAttributes() int64 {
+ if x != nil {
+ return x.MaxNumberOfAttributes
+ }
+ return 0
+}
+
+func (x *TraceConfig) GetMaxNumberOfAnnotations() int64 {
+ if x != nil {
+ return x.MaxNumberOfAnnotations
+ }
+ return 0
+}
+
+func (x *TraceConfig) GetMaxNumberOfMessageEvents() int64 {
+ if x != nil {
+ return x.MaxNumberOfMessageEvents
+ }
+ return 0
+}
+
+func (x *TraceConfig) GetMaxNumberOfLinks() int64 {
+ if x != nil {
+ return x.MaxNumberOfLinks
+ }
+ return 0
+}
+
+type isTraceConfig_Sampler interface {
+ isTraceConfig_Sampler()
+}
+
+type TraceConfig_ProbabilitySampler struct {
+ ProbabilitySampler *ProbabilitySampler `protobuf:"bytes,1,opt,name=probability_sampler,json=probabilitySampler,proto3,oneof"`
+}
+
+type TraceConfig_ConstantSampler struct {
+ ConstantSampler *ConstantSampler `protobuf:"bytes,2,opt,name=constant_sampler,json=constantSampler,proto3,oneof"`
+}
+
+type TraceConfig_RateLimitingSampler struct {
+ RateLimitingSampler *RateLimitingSampler `protobuf:"bytes,3,opt,name=rate_limiting_sampler,json=rateLimitingSampler,proto3,oneof"`
+}
+
+func (*TraceConfig_ProbabilitySampler) isTraceConfig_Sampler() {}
+
+func (*TraceConfig_ConstantSampler) isTraceConfig_Sampler() {}
+
+func (*TraceConfig_RateLimitingSampler) isTraceConfig_Sampler() {}
+
+// Sampler that tries to uniformly sample traces with a given probability.
+// The probability of sampling a trace is equal to that of the specified probability.
+type ProbabilitySampler struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The desired probability of sampling. Must be within [0.0, 1.0].
+ SamplingProbability float64 `protobuf:"fixed64,1,opt,name=samplingProbability,proto3" json:"samplingProbability,omitempty"`
+}
+
+func (x *ProbabilitySampler) Reset() {
+ *x = ProbabilitySampler{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ProbabilitySampler) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ProbabilitySampler) ProtoMessage() {}
+
+func (x *ProbabilitySampler) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ProbabilitySampler.ProtoReflect.Descriptor instead.
+func (*ProbabilitySampler) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_config_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ProbabilitySampler) GetSamplingProbability() float64 {
+ if x != nil {
+ return x.SamplingProbability
+ }
+ return 0
+}
+
+// Sampler that always makes a constant decision on span sampling.
+type ConstantSampler struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Decision ConstantSampler_ConstantDecision `protobuf:"varint,1,opt,name=decision,proto3,enum=opencensus.proto.trace.v1.ConstantSampler_ConstantDecision" json:"decision,omitempty"`
+}
+
+func (x *ConstantSampler) Reset() {
+ *x = ConstantSampler{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ConstantSampler) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConstantSampler) ProtoMessage() {}
+
+func (x *ConstantSampler) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ConstantSampler.ProtoReflect.Descriptor instead.
+func (*ConstantSampler) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_config_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ConstantSampler) GetDecision() ConstantSampler_ConstantDecision {
+ if x != nil {
+ return x.Decision
+ }
+ return ConstantSampler_ALWAYS_OFF
+}
+
+// Sampler that tries to sample with a rate per time window.
+type RateLimitingSampler struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Rate per second.
+ Qps int64 `protobuf:"varint,1,opt,name=qps,proto3" json:"qps,omitempty"`
+}
+
+func (x *RateLimitingSampler) Reset() {
+ *x = RateLimitingSampler{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RateLimitingSampler) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RateLimitingSampler) ProtoMessage() {}
+
+func (x *RateLimitingSampler) ProtoReflect() protoreflect.Message {
+ mi := &file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RateLimitingSampler.ProtoReflect.Descriptor instead.
+func (*RateLimitingSampler) Descriptor() ([]byte, []int) {
+ return file_opencensus_proto_trace_v1_trace_config_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *RateLimitingSampler) GetQps() int64 {
+ if x != nil {
+ return x.Qps
+ }
+ return 0
+}
+
+var File_opencensus_proto_trace_v1_trace_config_proto protoreflect.FileDescriptor
+
+var file_opencensus_proto_trace_v1_trace_config_proto_rawDesc = []byte{
+ 0x0a, 0x2c, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x72, 0x61, 0x63,
+ 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19,
+ 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x9c, 0x04, 0x0a, 0x0b, 0x54, 0x72,
+ 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x60, 0x0a, 0x13, 0x70, 0x72, 0x6f,
+ 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e,
+ 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x61,
+ 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x10, 0x63,
+ 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73,
+ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76,
+ 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65,
+ 0x72, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x53, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x72, 0x12, 0x64, 0x0a, 0x15, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d,
+ 0x69, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e,
+ 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x61, 0x6d, 0x70,
+ 0x6c, 0x65, 0x72, 0x48, 0x00, 0x52, 0x13, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74,
+ 0x69, 0x6e, 0x67, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x61,
+ 0x78, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x61, 0x74, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61,
+ 0x78, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
+ 0x74, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x19, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65,
+ 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x62, 0x65,
+ 0x72, 0x4f, 0x66, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e,
+ 0x0a, 0x1c, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f,
+ 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x6d, 0x61, 0x78, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f,
+ 0x66, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2d,
+ 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f,
+ 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x6d, 0x61, 0x78,
+ 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x4c, 0x69, 0x6e, 0x6b, 0x73, 0x42, 0x09, 0x0a,
+ 0x07, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x22, 0x46, 0x0a, 0x12, 0x50, 0x72, 0x6f, 0x62,
+ 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x12, 0x30,
+ 0x0a, 0x13, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x13, 0x73, 0x61, 0x6d,
+ 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
+ 0x22, 0xb0, 0x01, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x53, 0x61, 0x6d,
+ 0x70, 0x6c, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e,
+ 0x73, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x53, 0x61, 0x6d, 0x70, 0x6c,
+ 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73,
+ 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a,
+ 0x10, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f,
+ 0x6e, 0x12, 0x0e, 0x0a, 0x0a, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x4f, 0x46, 0x46, 0x10,
+ 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x4f, 0x4e, 0x10, 0x01,
+ 0x12, 0x11, 0x0a, 0x0d, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x50, 0x41, 0x52, 0x45, 0x4e,
+ 0x54, 0x10, 0x02, 0x22, 0x27, 0x0a, 0x13, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74,
+ 0x69, 0x6e, 0x67, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x71, 0x70,
+ 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x71, 0x70, 0x73, 0x42, 0x95, 0x01, 0x0a,
+ 0x1c, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x54,
+ 0x72, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
+ 0x01, 0x5a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x65,
+ 0x6e, 0x73, 0x75, 0x73, 0x2d, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x73, 0x75, 0x73, 0x2d,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x72, 0x61,
+ 0x63, 0x65, 0x2f, 0x76, 0x31, 0xea, 0x02, 0x1c, 0x4f, 0x70, 0x65, 0x6e, 0x43, 0x65, 0x6e, 0x73,
+ 0x75, 0x73, 0x3a, 0x3a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3a, 0x54, 0x72, 0x61, 0x63, 0x65,
+ 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_opencensus_proto_trace_v1_trace_config_proto_rawDescOnce sync.Once
+ file_opencensus_proto_trace_v1_trace_config_proto_rawDescData = file_opencensus_proto_trace_v1_trace_config_proto_rawDesc
+)
+
+func file_opencensus_proto_trace_v1_trace_config_proto_rawDescGZIP() []byte {
+ file_opencensus_proto_trace_v1_trace_config_proto_rawDescOnce.Do(func() {
+ file_opencensus_proto_trace_v1_trace_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_opencensus_proto_trace_v1_trace_config_proto_rawDescData)
+ })
+ return file_opencensus_proto_trace_v1_trace_config_proto_rawDescData
+}
+
+var file_opencensus_proto_trace_v1_trace_config_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_opencensus_proto_trace_v1_trace_config_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_opencensus_proto_trace_v1_trace_config_proto_goTypes = []interface{}{
+ (ConstantSampler_ConstantDecision)(0), // 0: opencensus.proto.trace.v1.ConstantSampler.ConstantDecision
+ (*TraceConfig)(nil), // 1: opencensus.proto.trace.v1.TraceConfig
+ (*ProbabilitySampler)(nil), // 2: opencensus.proto.trace.v1.ProbabilitySampler
+ (*ConstantSampler)(nil), // 3: opencensus.proto.trace.v1.ConstantSampler
+ (*RateLimitingSampler)(nil), // 4: opencensus.proto.trace.v1.RateLimitingSampler
+}
+var file_opencensus_proto_trace_v1_trace_config_proto_depIdxs = []int32{
+ 2, // 0: opencensus.proto.trace.v1.TraceConfig.probability_sampler:type_name -> opencensus.proto.trace.v1.ProbabilitySampler
+ 3, // 1: opencensus.proto.trace.v1.TraceConfig.constant_sampler:type_name -> opencensus.proto.trace.v1.ConstantSampler
+ 4, // 2: opencensus.proto.trace.v1.TraceConfig.rate_limiting_sampler:type_name -> opencensus.proto.trace.v1.RateLimitingSampler
+ 0, // 3: opencensus.proto.trace.v1.ConstantSampler.decision:type_name -> opencensus.proto.trace.v1.ConstantSampler.ConstantDecision
+ 4, // [4:4] is the sub-list for method output_type
+ 4, // [4:4] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
+}
+
+func init() { file_opencensus_proto_trace_v1_trace_config_proto_init() }
+func file_opencensus_proto_trace_v1_trace_config_proto_init() {
+ if File_opencensus_proto_trace_v1_trace_config_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TraceConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ProbabilitySampler); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConstantSampler); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RateLimitingSampler); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_opencensus_proto_trace_v1_trace_config_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*TraceConfig_ProbabilitySampler)(nil),
+ (*TraceConfig_ConstantSampler)(nil),
+ (*TraceConfig_RateLimitingSampler)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_opencensus_proto_trace_v1_trace_config_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_opencensus_proto_trace_v1_trace_config_proto_goTypes,
+ DependencyIndexes: file_opencensus_proto_trace_v1_trace_config_proto_depIdxs,
+ EnumInfos: file_opencensus_proto_trace_v1_trace_config_proto_enumTypes,
+ MessageInfos: file_opencensus_proto_trace_v1_trace_config_proto_msgTypes,
+ }.Build()
+ File_opencensus_proto_trace_v1_trace_config_proto = out.File
+ file_opencensus_proto_trace_v1_trace_config_proto_rawDesc = nil
+ file_opencensus_proto_trace_v1_trace_config_proto_goTypes = nil
+ file_opencensus_proto_trace_v1_trace_config_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cespare/xxhash/v2/LICENSE.txt b/vendor/github.com/cespare/xxhash/v2/LICENSE.txt
new file mode 100644
index 000000000..24b53065f
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/LICENSE.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2016 Caleb Spare
+
+MIT License
+
+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/cespare/xxhash/v2/README.md b/vendor/github.com/cespare/xxhash/v2/README.md
new file mode 100644
index 000000000..33c88305c
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/README.md
@@ -0,0 +1,74 @@
+# xxhash
+
+[![Go Reference](https://pkg.go.dev/badge/github.com/cespare/xxhash/v2.svg)](https://pkg.go.dev/github.com/cespare/xxhash/v2)
+[![Test](https://github.com/cespare/xxhash/actions/workflows/test.yml/badge.svg)](https://github.com/cespare/xxhash/actions/workflows/test.yml)
+
+xxhash is a Go implementation of the 64-bit [xxHash] algorithm, XXH64. This is a
+high-quality hashing algorithm that is much faster than anything in the Go
+standard library.
+
+This package provides a straightforward API:
+
+```
+func Sum64(b []byte) uint64
+func Sum64String(s string) uint64
+type Digest struct{ ... }
+ func New() *Digest
+```
+
+The `Digest` type implements hash.Hash64. Its key methods are:
+
+```
+func (*Digest) Write([]byte) (int, error)
+func (*Digest) WriteString(string) (int, error)
+func (*Digest) Sum64() uint64
+```
+
+The package is written with optimized pure Go and also contains even faster
+assembly implementations for amd64 and arm64. If desired, the `purego` build tag
+opts into using the Go code even on those architectures.
+
+[xxHash]: http://cyan4973.github.io/xxHash/
+
+## Compatibility
+
+This package is in a module and the latest code is in version 2 of the module.
+You need a version of Go with at least "minimal module compatibility" to use
+github.com/cespare/xxhash/v2:
+
+* 1.9.7+ for Go 1.9
+* 1.10.3+ for Go 1.10
+* Go 1.11 or later
+
+I recommend using the latest release of Go.
+
+## Benchmarks
+
+Here are some quick benchmarks comparing the pure-Go and assembly
+implementations of Sum64.
+
+| input size | purego | asm |
+| ---------- | --------- | --------- |
+| 4 B | 1.3 GB/s | 1.2 GB/s |
+| 16 B | 2.9 GB/s | 3.5 GB/s |
+| 100 B | 6.9 GB/s | 8.1 GB/s |
+| 4 KB | 11.7 GB/s | 16.7 GB/s |
+| 10 MB | 12.0 GB/s | 17.3 GB/s |
+
+These numbers were generated on Ubuntu 20.04 with an Intel Xeon Platinum 8252C
+CPU using the following commands under Go 1.19.2:
+
+```
+benchstat <(go test -tags purego -benchtime 500ms -count 15 -bench 'Sum64$')
+benchstat <(go test -benchtime 500ms -count 15 -bench 'Sum64$')
+```
+
+## Projects using this package
+
+- [InfluxDB](https://github.com/influxdata/influxdb)
+- [Prometheus](https://github.com/prometheus/prometheus)
+- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics)
+- [FreeCache](https://github.com/coocood/freecache)
+- [FastCache](https://github.com/VictoriaMetrics/fastcache)
+- [Ristretto](https://github.com/dgraph-io/ristretto)
+- [Badger](https://github.com/dgraph-io/badger)
diff --git a/vendor/github.com/cespare/xxhash/v2/testall.sh b/vendor/github.com/cespare/xxhash/v2/testall.sh
new file mode 100644
index 000000000..94b9c4439
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/testall.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -eu -o pipefail
+
+# Small convenience script for running the tests with various combinations of
+# arch/tags. This assumes we're running on amd64 and have qemu available.
+
+go test ./...
+go test -tags purego ./...
+GOARCH=arm64 go test
+GOARCH=arm64 go test -tags purego
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash.go b/vendor/github.com/cespare/xxhash/v2/xxhash.go
new file mode 100644
index 000000000..78bddf1ce
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/xxhash.go
@@ -0,0 +1,243 @@
+// Package xxhash implements the 64-bit variant of xxHash (XXH64) as described
+// at http://cyan4973.github.io/xxHash/.
+package xxhash
+
+import (
+ "encoding/binary"
+ "errors"
+ "math/bits"
+)
+
+const (
+ prime1 uint64 = 11400714785074694791
+ prime2 uint64 = 14029467366897019727
+ prime3 uint64 = 1609587929392839161
+ prime4 uint64 = 9650029242287828579
+ prime5 uint64 = 2870177450012600261
+)
+
+// Store the primes in an array as well.
+//
+// The consts are used when possible in Go code to avoid MOVs but we need a
+// contiguous array for the assembly code.
+var primes = [...]uint64{prime1, prime2, prime3, prime4, prime5}
+
+// Digest implements hash.Hash64.
+//
+// Note that a zero-valued Digest is not ready to receive writes.
+// Call Reset or create a Digest using New before calling other methods.
+type Digest struct {
+ v1 uint64
+ v2 uint64
+ v3 uint64
+ v4 uint64
+ total uint64
+ mem [32]byte
+ n int // how much of mem is used
+}
+
+// New creates a new Digest with a zero seed.
+func New() *Digest {
+ return NewWithSeed(0)
+}
+
+// NewWithSeed creates a new Digest with the given seed.
+func NewWithSeed(seed uint64) *Digest {
+ var d Digest
+ d.ResetWithSeed(seed)
+ return &d
+}
+
+// Reset clears the Digest's state so that it can be reused.
+// It uses a seed value of zero.
+func (d *Digest) Reset() {
+ d.ResetWithSeed(0)
+}
+
+// ResetWithSeed clears the Digest's state so that it can be reused.
+// It uses the given seed to initialize the state.
+func (d *Digest) ResetWithSeed(seed uint64) {
+ d.v1 = seed + prime1 + prime2
+ d.v2 = seed + prime2
+ d.v3 = seed
+ d.v4 = seed - prime1
+ d.total = 0
+ d.n = 0
+}
+
+// Size always returns 8 bytes.
+func (d *Digest) Size() int { return 8 }
+
+// BlockSize always returns 32 bytes.
+func (d *Digest) BlockSize() int { return 32 }
+
+// Write adds more data to d. It always returns len(b), nil.
+func (d *Digest) Write(b []byte) (n int, err error) {
+ n = len(b)
+ d.total += uint64(n)
+
+ memleft := d.mem[d.n&(len(d.mem)-1):]
+
+ if d.n+n < 32 {
+ // This new data doesn't even fill the current block.
+ copy(memleft, b)
+ d.n += n
+ return
+ }
+
+ if d.n > 0 {
+ // Finish off the partial block.
+ c := copy(memleft, b)
+ d.v1 = round(d.v1, u64(d.mem[0:8]))
+ d.v2 = round(d.v2, u64(d.mem[8:16]))
+ d.v3 = round(d.v3, u64(d.mem[16:24]))
+ d.v4 = round(d.v4, u64(d.mem[24:32]))
+ b = b[c:]
+ d.n = 0
+ }
+
+ if len(b) >= 32 {
+ // One or more full blocks left.
+ nw := writeBlocks(d, b)
+ b = b[nw:]
+ }
+
+ // Store any remaining partial block.
+ copy(d.mem[:], b)
+ d.n = len(b)
+
+ return
+}
+
+// Sum appends the current hash to b and returns the resulting slice.
+func (d *Digest) Sum(b []byte) []byte {
+ s := d.Sum64()
+ return append(
+ b,
+ byte(s>>56),
+ byte(s>>48),
+ byte(s>>40),
+ byte(s>>32),
+ byte(s>>24),
+ byte(s>>16),
+ byte(s>>8),
+ byte(s),
+ )
+}
+
+// Sum64 returns the current hash.
+func (d *Digest) Sum64() uint64 {
+ var h uint64
+
+ if d.total >= 32 {
+ v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4
+ h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)
+ h = mergeRound(h, v1)
+ h = mergeRound(h, v2)
+ h = mergeRound(h, v3)
+ h = mergeRound(h, v4)
+ } else {
+ h = d.v3 + prime5
+ }
+
+ h += d.total
+
+ b := d.mem[:d.n&(len(d.mem)-1)]
+ for ; len(b) >= 8; b = b[8:] {
+ k1 := round(0, u64(b[:8]))
+ h ^= k1
+ h = rol27(h)*prime1 + prime4
+ }
+ if len(b) >= 4 {
+ h ^= uint64(u32(b[:4])) * prime1
+ h = rol23(h)*prime2 + prime3
+ b = b[4:]
+ }
+ for ; len(b) > 0; b = b[1:] {
+ h ^= uint64(b[0]) * prime5
+ h = rol11(h) * prime1
+ }
+
+ h ^= h >> 33
+ h *= prime2
+ h ^= h >> 29
+ h *= prime3
+ h ^= h >> 32
+
+ return h
+}
+
+const (
+ magic = "xxh\x06"
+ marshaledSize = len(magic) + 8*5 + 32
+)
+
+// MarshalBinary implements the encoding.BinaryMarshaler interface.
+func (d *Digest) MarshalBinary() ([]byte, error) {
+ b := make([]byte, 0, marshaledSize)
+ b = append(b, magic...)
+ b = appendUint64(b, d.v1)
+ b = appendUint64(b, d.v2)
+ b = appendUint64(b, d.v3)
+ b = appendUint64(b, d.v4)
+ b = appendUint64(b, d.total)
+ b = append(b, d.mem[:d.n]...)
+ b = b[:len(b)+len(d.mem)-d.n]
+ return b, nil
+}
+
+// UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
+func (d *Digest) UnmarshalBinary(b []byte) error {
+ if len(b) < len(magic) || string(b[:len(magic)]) != magic {
+ return errors.New("xxhash: invalid hash state identifier")
+ }
+ if len(b) != marshaledSize {
+ return errors.New("xxhash: invalid hash state size")
+ }
+ b = b[len(magic):]
+ b, d.v1 = consumeUint64(b)
+ b, d.v2 = consumeUint64(b)
+ b, d.v3 = consumeUint64(b)
+ b, d.v4 = consumeUint64(b)
+ b, d.total = consumeUint64(b)
+ copy(d.mem[:], b)
+ d.n = int(d.total % uint64(len(d.mem)))
+ return nil
+}
+
+func appendUint64(b []byte, x uint64) []byte {
+ var a [8]byte
+ binary.LittleEndian.PutUint64(a[:], x)
+ return append(b, a[:]...)
+}
+
+func consumeUint64(b []byte) ([]byte, uint64) {
+ x := u64(b)
+ return b[8:], x
+}
+
+func u64(b []byte) uint64 { return binary.LittleEndian.Uint64(b) }
+func u32(b []byte) uint32 { return binary.LittleEndian.Uint32(b) }
+
+func round(acc, input uint64) uint64 {
+ acc += input * prime2
+ acc = rol31(acc)
+ acc *= prime1
+ return acc
+}
+
+func mergeRound(acc, val uint64) uint64 {
+ val = round(0, val)
+ acc ^= val
+ acc = acc*prime1 + prime4
+ return acc
+}
+
+func rol1(x uint64) uint64 { return bits.RotateLeft64(x, 1) }
+func rol7(x uint64) uint64 { return bits.RotateLeft64(x, 7) }
+func rol11(x uint64) uint64 { return bits.RotateLeft64(x, 11) }
+func rol12(x uint64) uint64 { return bits.RotateLeft64(x, 12) }
+func rol18(x uint64) uint64 { return bits.RotateLeft64(x, 18) }
+func rol23(x uint64) uint64 { return bits.RotateLeft64(x, 23) }
+func rol27(x uint64) uint64 { return bits.RotateLeft64(x, 27) }
+func rol31(x uint64) uint64 { return bits.RotateLeft64(x, 31) }
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s
new file mode 100644
index 000000000..3e8b13257
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/xxhash_amd64.s
@@ -0,0 +1,209 @@
+//go:build !appengine && gc && !purego
+// +build !appengine
+// +build gc
+// +build !purego
+
+#include "textflag.h"
+
+// Registers:
+#define h AX
+#define d AX
+#define p SI // pointer to advance through b
+#define n DX
+#define end BX // loop end
+#define v1 R8
+#define v2 R9
+#define v3 R10
+#define v4 R11
+#define x R12
+#define prime1 R13
+#define prime2 R14
+#define prime4 DI
+
+#define round(acc, x) \
+ IMULQ prime2, x \
+ ADDQ x, acc \
+ ROLQ $31, acc \
+ IMULQ prime1, acc
+
+// round0 performs the operation x = round(0, x).
+#define round0(x) \
+ IMULQ prime2, x \
+ ROLQ $31, x \
+ IMULQ prime1, x
+
+// mergeRound applies a merge round on the two registers acc and x.
+// It assumes that prime1, prime2, and prime4 have been loaded.
+#define mergeRound(acc, x) \
+ round0(x) \
+ XORQ x, acc \
+ IMULQ prime1, acc \
+ ADDQ prime4, acc
+
+// blockLoop processes as many 32-byte blocks as possible,
+// updating v1, v2, v3, and v4. It assumes that there is at least one block
+// to process.
+#define blockLoop() \
+loop: \
+ MOVQ +0(p), x \
+ round(v1, x) \
+ MOVQ +8(p), x \
+ round(v2, x) \
+ MOVQ +16(p), x \
+ round(v3, x) \
+ MOVQ +24(p), x \
+ round(v4, x) \
+ ADDQ $32, p \
+ CMPQ p, end \
+ JLE loop
+
+// func Sum64(b []byte) uint64
+TEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32
+ // Load fixed primes.
+ MOVQ ·primes+0(SB), prime1
+ MOVQ ·primes+8(SB), prime2
+ MOVQ ·primes+24(SB), prime4
+
+ // Load slice.
+ MOVQ b_base+0(FP), p
+ MOVQ b_len+8(FP), n
+ LEAQ (p)(n*1), end
+
+ // The first loop limit will be len(b)-32.
+ SUBQ $32, end
+
+ // Check whether we have at least one block.
+ CMPQ n, $32
+ JLT noBlocks
+
+ // Set up initial state (v1, v2, v3, v4).
+ MOVQ prime1, v1
+ ADDQ prime2, v1
+ MOVQ prime2, v2
+ XORQ v3, v3
+ XORQ v4, v4
+ SUBQ prime1, v4
+
+ blockLoop()
+
+ MOVQ v1, h
+ ROLQ $1, h
+ MOVQ v2, x
+ ROLQ $7, x
+ ADDQ x, h
+ MOVQ v3, x
+ ROLQ $12, x
+ ADDQ x, h
+ MOVQ v4, x
+ ROLQ $18, x
+ ADDQ x, h
+
+ mergeRound(h, v1)
+ mergeRound(h, v2)
+ mergeRound(h, v3)
+ mergeRound(h, v4)
+
+ JMP afterBlocks
+
+noBlocks:
+ MOVQ ·primes+32(SB), h
+
+afterBlocks:
+ ADDQ n, h
+
+ ADDQ $24, end
+ CMPQ p, end
+ JG try4
+
+loop8:
+ MOVQ (p), x
+ ADDQ $8, p
+ round0(x)
+ XORQ x, h
+ ROLQ $27, h
+ IMULQ prime1, h
+ ADDQ prime4, h
+
+ CMPQ p, end
+ JLE loop8
+
+try4:
+ ADDQ $4, end
+ CMPQ p, end
+ JG try1
+
+ MOVL (p), x
+ ADDQ $4, p
+ IMULQ prime1, x
+ XORQ x, h
+
+ ROLQ $23, h
+ IMULQ prime2, h
+ ADDQ ·primes+16(SB), h
+
+try1:
+ ADDQ $4, end
+ CMPQ p, end
+ JGE finalize
+
+loop1:
+ MOVBQZX (p), x
+ ADDQ $1, p
+ IMULQ ·primes+32(SB), x
+ XORQ x, h
+ ROLQ $11, h
+ IMULQ prime1, h
+
+ CMPQ p, end
+ JL loop1
+
+finalize:
+ MOVQ h, x
+ SHRQ $33, x
+ XORQ x, h
+ IMULQ prime2, h
+ MOVQ h, x
+ SHRQ $29, x
+ XORQ x, h
+ IMULQ ·primes+16(SB), h
+ MOVQ h, x
+ SHRQ $32, x
+ XORQ x, h
+
+ MOVQ h, ret+24(FP)
+ RET
+
+// func writeBlocks(d *Digest, b []byte) int
+TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40
+ // Load fixed primes needed for round.
+ MOVQ ·primes+0(SB), prime1
+ MOVQ ·primes+8(SB), prime2
+
+ // Load slice.
+ MOVQ b_base+8(FP), p
+ MOVQ b_len+16(FP), n
+ LEAQ (p)(n*1), end
+ SUBQ $32, end
+
+ // Load vN from d.
+ MOVQ s+0(FP), d
+ MOVQ 0(d), v1
+ MOVQ 8(d), v2
+ MOVQ 16(d), v3
+ MOVQ 24(d), v4
+
+ // We don't need to check the loop condition here; this function is
+ // always called with at least one block of data to process.
+ blockLoop()
+
+ // Copy vN back to d.
+ MOVQ v1, 0(d)
+ MOVQ v2, 8(d)
+ MOVQ v3, 16(d)
+ MOVQ v4, 24(d)
+
+ // The number of bytes written is p minus the old base pointer.
+ SUBQ b_base+8(FP), p
+ MOVQ p, ret+32(FP)
+
+ RET
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s b/vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s
new file mode 100644
index 000000000..7e3145a22
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/xxhash_arm64.s
@@ -0,0 +1,183 @@
+//go:build !appengine && gc && !purego
+// +build !appengine
+// +build gc
+// +build !purego
+
+#include "textflag.h"
+
+// Registers:
+#define digest R1
+#define h R2 // return value
+#define p R3 // input pointer
+#define n R4 // input length
+#define nblocks R5 // n / 32
+#define prime1 R7
+#define prime2 R8
+#define prime3 R9
+#define prime4 R10
+#define prime5 R11
+#define v1 R12
+#define v2 R13
+#define v3 R14
+#define v4 R15
+#define x1 R20
+#define x2 R21
+#define x3 R22
+#define x4 R23
+
+#define round(acc, x) \
+ MADD prime2, acc, x, acc \
+ ROR $64-31, acc \
+ MUL prime1, acc
+
+// round0 performs the operation x = round(0, x).
+#define round0(x) \
+ MUL prime2, x \
+ ROR $64-31, x \
+ MUL prime1, x
+
+#define mergeRound(acc, x) \
+ round0(x) \
+ EOR x, acc \
+ MADD acc, prime4, prime1, acc
+
+// blockLoop processes as many 32-byte blocks as possible,
+// updating v1, v2, v3, and v4. It assumes that n >= 32.
+#define blockLoop() \
+ LSR $5, n, nblocks \
+ PCALIGN $16 \
+ loop: \
+ LDP.P 16(p), (x1, x2) \
+ LDP.P 16(p), (x3, x4) \
+ round(v1, x1) \
+ round(v2, x2) \
+ round(v3, x3) \
+ round(v4, x4) \
+ SUB $1, nblocks \
+ CBNZ nblocks, loop
+
+// func Sum64(b []byte) uint64
+TEXT ·Sum64(SB), NOSPLIT|NOFRAME, $0-32
+ LDP b_base+0(FP), (p, n)
+
+ LDP ·primes+0(SB), (prime1, prime2)
+ LDP ·primes+16(SB), (prime3, prime4)
+ MOVD ·primes+32(SB), prime5
+
+ CMP $32, n
+ CSEL LT, prime5, ZR, h // if n < 32 { h = prime5 } else { h = 0 }
+ BLT afterLoop
+
+ ADD prime1, prime2, v1
+ MOVD prime2, v2
+ MOVD $0, v3
+ NEG prime1, v4
+
+ blockLoop()
+
+ ROR $64-1, v1, x1
+ ROR $64-7, v2, x2
+ ADD x1, x2
+ ROR $64-12, v3, x3
+ ROR $64-18, v4, x4
+ ADD x3, x4
+ ADD x2, x4, h
+
+ mergeRound(h, v1)
+ mergeRound(h, v2)
+ mergeRound(h, v3)
+ mergeRound(h, v4)
+
+afterLoop:
+ ADD n, h
+
+ TBZ $4, n, try8
+ LDP.P 16(p), (x1, x2)
+
+ round0(x1)
+
+ // NOTE: here and below, sequencing the EOR after the ROR (using a
+ // rotated register) is worth a small but measurable speedup for small
+ // inputs.
+ ROR $64-27, h
+ EOR x1 @> 64-27, h, h
+ MADD h, prime4, prime1, h
+
+ round0(x2)
+ ROR $64-27, h
+ EOR x2 @> 64-27, h, h
+ MADD h, prime4, prime1, h
+
+try8:
+ TBZ $3, n, try4
+ MOVD.P 8(p), x1
+
+ round0(x1)
+ ROR $64-27, h
+ EOR x1 @> 64-27, h, h
+ MADD h, prime4, prime1, h
+
+try4:
+ TBZ $2, n, try2
+ MOVWU.P 4(p), x2
+
+ MUL prime1, x2
+ ROR $64-23, h
+ EOR x2 @> 64-23, h, h
+ MADD h, prime3, prime2, h
+
+try2:
+ TBZ $1, n, try1
+ MOVHU.P 2(p), x3
+ AND $255, x3, x1
+ LSR $8, x3, x2
+
+ MUL prime5, x1
+ ROR $64-11, h
+ EOR x1 @> 64-11, h, h
+ MUL prime1, h
+
+ MUL prime5, x2
+ ROR $64-11, h
+ EOR x2 @> 64-11, h, h
+ MUL prime1, h
+
+try1:
+ TBZ $0, n, finalize
+ MOVBU (p), x4
+
+ MUL prime5, x4
+ ROR $64-11, h
+ EOR x4 @> 64-11, h, h
+ MUL prime1, h
+
+finalize:
+ EOR h >> 33, h
+ MUL prime2, h
+ EOR h >> 29, h
+ MUL prime3, h
+ EOR h >> 32, h
+
+ MOVD h, ret+24(FP)
+ RET
+
+// func writeBlocks(d *Digest, b []byte) int
+TEXT ·writeBlocks(SB), NOSPLIT|NOFRAME, $0-40
+ LDP ·primes+0(SB), (prime1, prime2)
+
+ // Load state. Assume v[1-4] are stored contiguously.
+ MOVD d+0(FP), digest
+ LDP 0(digest), (v1, v2)
+ LDP 16(digest), (v3, v4)
+
+ LDP b_base+8(FP), (p, n)
+
+ blockLoop()
+
+ // Store updated state.
+ STP (v1, v2), 0(digest)
+ STP (v3, v4), 16(digest)
+
+ BIC $31, n
+ MOVD n, ret+32(FP)
+ RET
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go b/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go
new file mode 100644
index 000000000..78f95f256
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go
@@ -0,0 +1,15 @@
+//go:build (amd64 || arm64) && !appengine && gc && !purego
+// +build amd64 arm64
+// +build !appengine
+// +build gc
+// +build !purego
+
+package xxhash
+
+// Sum64 computes the 64-bit xxHash digest of b with a zero seed.
+//
+//go:noescape
+func Sum64(b []byte) uint64
+
+//go:noescape
+func writeBlocks(d *Digest, b []byte) int
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go
new file mode 100644
index 000000000..118e49e81
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go
@@ -0,0 +1,76 @@
+//go:build (!amd64 && !arm64) || appengine || !gc || purego
+// +build !amd64,!arm64 appengine !gc purego
+
+package xxhash
+
+// Sum64 computes the 64-bit xxHash digest of b with a zero seed.
+func Sum64(b []byte) uint64 {
+ // A simpler version would be
+ // d := New()
+ // d.Write(b)
+ // return d.Sum64()
+ // but this is faster, particularly for small inputs.
+
+ n := len(b)
+ var h uint64
+
+ if n >= 32 {
+ v1 := primes[0] + prime2
+ v2 := prime2
+ v3 := uint64(0)
+ v4 := -primes[0]
+ for len(b) >= 32 {
+ v1 = round(v1, u64(b[0:8:len(b)]))
+ v2 = round(v2, u64(b[8:16:len(b)]))
+ v3 = round(v3, u64(b[16:24:len(b)]))
+ v4 = round(v4, u64(b[24:32:len(b)]))
+ b = b[32:len(b):len(b)]
+ }
+ h = rol1(v1) + rol7(v2) + rol12(v3) + rol18(v4)
+ h = mergeRound(h, v1)
+ h = mergeRound(h, v2)
+ h = mergeRound(h, v3)
+ h = mergeRound(h, v4)
+ } else {
+ h = prime5
+ }
+
+ h += uint64(n)
+
+ for ; len(b) >= 8; b = b[8:] {
+ k1 := round(0, u64(b[:8]))
+ h ^= k1
+ h = rol27(h)*prime1 + prime4
+ }
+ if len(b) >= 4 {
+ h ^= uint64(u32(b[:4])) * prime1
+ h = rol23(h)*prime2 + prime3
+ b = b[4:]
+ }
+ for ; len(b) > 0; b = b[1:] {
+ h ^= uint64(b[0]) * prime5
+ h = rol11(h) * prime1
+ }
+
+ h ^= h >> 33
+ h *= prime2
+ h ^= h >> 29
+ h *= prime3
+ h ^= h >> 32
+
+ return h
+}
+
+func writeBlocks(d *Digest, b []byte) int {
+ v1, v2, v3, v4 := d.v1, d.v2, d.v3, d.v4
+ n := len(b)
+ for len(b) >= 32 {
+ v1 = round(v1, u64(b[0:8:len(b)]))
+ v2 = round(v2, u64(b[8:16:len(b)]))
+ v3 = round(v3, u64(b[16:24:len(b)]))
+ v4 = round(v4, u64(b[24:32:len(b)]))
+ b = b[32:len(b):len(b)]
+ }
+ d.v1, d.v2, d.v3, d.v4 = v1, v2, v3, v4
+ return n - len(b)
+}
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go
new file mode 100644
index 000000000..05f5e7dfe
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go
@@ -0,0 +1,16 @@
+//go:build appengine
+// +build appengine
+
+// This file contains the safe implementations of otherwise unsafe-using code.
+
+package xxhash
+
+// Sum64String computes the 64-bit xxHash digest of s with a zero seed.
+func Sum64String(s string) uint64 {
+ return Sum64([]byte(s))
+}
+
+// WriteString adds more data to d. It always returns len(s), nil.
+func (d *Digest) WriteString(s string) (n int, err error) {
+ return d.Write([]byte(s))
+}
diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go
new file mode 100644
index 000000000..cf9d42aed
--- /dev/null
+++ b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go
@@ -0,0 +1,58 @@
+//go:build !appengine
+// +build !appengine
+
+// This file encapsulates usage of unsafe.
+// xxhash_safe.go contains the safe implementations.
+
+package xxhash
+
+import (
+ "unsafe"
+)
+
+// In the future it's possible that compiler optimizations will make these
+// XxxString functions unnecessary by realizing that calls such as
+// Sum64([]byte(s)) don't need to copy s. See https://go.dev/issue/2205.
+// If that happens, even if we keep these functions they can be replaced with
+// the trivial safe code.
+
+// NOTE: The usual way of doing an unsafe string-to-[]byte conversion is:
+//
+// var b []byte
+// bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
+// bh.Data = (*reflect.StringHeader)(unsafe.Pointer(&s)).Data
+// bh.Len = len(s)
+// bh.Cap = len(s)
+//
+// Unfortunately, as of Go 1.15.3 the inliner's cost model assigns a high enough
+// weight to this sequence of expressions that any function that uses it will
+// not be inlined. Instead, the functions below use a different unsafe
+// conversion designed to minimize the inliner weight and allow both to be
+// inlined. There is also a test (TestInlining) which verifies that these are
+// inlined.
+//
+// See https://github.com/golang/go/issues/42739 for discussion.
+
+// Sum64String computes the 64-bit xxHash digest of s with a zero seed.
+// It may be faster than Sum64([]byte(s)) by avoiding a copy.
+func Sum64String(s string) uint64 {
+ b := *(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)}))
+ return Sum64(b)
+}
+
+// WriteString adds more data to d. It always returns len(s), nil.
+// It may be faster than Write([]byte(s)) by avoiding a copy.
+func (d *Digest) WriteString(s string) (n int, err error) {
+ d.Write(*(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)})))
+ // d.Write always returns len(s), nil.
+ // Ignoring the return output and returning these fixed values buys a
+ // savings of 6 in the inliner's cost model.
+ return len(s), nil
+}
+
+// sliceHeader is similar to reflect.SliceHeader, but it assumes that the layout
+// of the first two words is the same as the layout of a string.
+type sliceHeader struct {
+ s string
+ cap int
+}
diff --git a/vendor/github.com/cloudflare/circl/LICENSE b/vendor/github.com/cloudflare/circl/LICENSE
new file mode 100644
index 000000000..67edaa90a
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/LICENSE
@@ -0,0 +1,57 @@
+Copyright (c) 2019 Cloudflare. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Cloudflare nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+========================================================================
+
+Copyright (c) 2009 The Go Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve.go b/vendor/github.com/cloudflare/circl/dh/x25519/curve.go
new file mode 100644
index 000000000..f9057c2b8
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/curve.go
@@ -0,0 +1,96 @@
+package x25519
+
+import (
+ fp "github.com/cloudflare/circl/math/fp25519"
+)
+
+// ladderJoye calculates a fixed-point multiplication with the generator point.
+// The algorithm is the right-to-left Joye's ladder as described
+// in "How to precompute a ladder" in SAC'2017.
+func ladderJoye(k *Key) {
+ w := [5]fp.Elt{} // [mu,x1,z1,x2,z2] order must be preserved.
+ fp.SetOne(&w[1]) // x1 = 1
+ fp.SetOne(&w[2]) // z1 = 1
+ w[3] = fp.Elt{ // x2 = G-S
+ 0xbd, 0xaa, 0x2f, 0xc8, 0xfe, 0xe1, 0x94, 0x7e,
+ 0xf8, 0xed, 0xb2, 0x14, 0xae, 0x95, 0xf0, 0xbb,
+ 0xe2, 0x48, 0x5d, 0x23, 0xb9, 0xa0, 0xc7, 0xad,
+ 0x34, 0xab, 0x7c, 0xe2, 0xee, 0xcd, 0xae, 0x1e,
+ }
+ fp.SetOne(&w[4]) // z2 = 1
+
+ const n = 255
+ const h = 3
+ swap := uint(1)
+ for s := 0; s < n-h; s++ {
+ i := (s + h) / 8
+ j := (s + h) % 8
+ bit := uint((k[i] >> uint(j)) & 1)
+ copy(w[0][:], tableGenerator[s*Size:(s+1)*Size])
+ diffAdd(&w, swap^bit)
+ swap = bit
+ }
+ for s := 0; s < h; s++ {
+ double(&w[1], &w[2])
+ }
+ toAffine((*[fp.Size]byte)(k), &w[1], &w[2])
+}
+
+// ladderMontgomery calculates a generic scalar point multiplication
+// The algorithm implemented is the left-to-right Montgomery's ladder.
+func ladderMontgomery(k, xP *Key) {
+ w := [5]fp.Elt{} // [x1, x2, z2, x3, z3] order must be preserved.
+ w[0] = *(*fp.Elt)(xP) // x1 = xP
+ fp.SetOne(&w[1]) // x2 = 1
+ w[3] = *(*fp.Elt)(xP) // x3 = xP
+ fp.SetOne(&w[4]) // z3 = 1
+
+ move := uint(0)
+ for s := 255 - 1; s >= 0; s-- {
+ i := s / 8
+ j := s % 8
+ bit := uint((k[i] >> uint(j)) & 1)
+ ladderStep(&w, move^bit)
+ move = bit
+ }
+ toAffine((*[fp.Size]byte)(k), &w[1], &w[2])
+}
+
+func toAffine(k *[fp.Size]byte, x, z *fp.Elt) {
+ fp.Inv(z, z)
+ fp.Mul(x, x, z)
+ _ = fp.ToBytes(k[:], x)
+}
+
+var lowOrderPoints = [5]fp.Elt{
+ { /* (0,_,1) point of order 2 on Curve25519 */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ },
+ { /* (1,_,1) point of order 4 on Curve25519 */
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ },
+ { /* (x,_,1) first point of order 8 on Curve25519 */
+ 0xe0, 0xeb, 0x7a, 0x7c, 0x3b, 0x41, 0xb8, 0xae,
+ 0x16, 0x56, 0xe3, 0xfa, 0xf1, 0x9f, 0xc4, 0x6a,
+ 0xda, 0x09, 0x8d, 0xeb, 0x9c, 0x32, 0xb1, 0xfd,
+ 0x86, 0x62, 0x05, 0x16, 0x5f, 0x49, 0xb8, 0x00,
+ },
+ { /* (x,_,1) second point of order 8 on Curve25519 */
+ 0x5f, 0x9c, 0x95, 0xbc, 0xa3, 0x50, 0x8c, 0x24,
+ 0xb1, 0xd0, 0xb1, 0x55, 0x9c, 0x83, 0xef, 0x5b,
+ 0x04, 0x44, 0x5c, 0xc4, 0x58, 0x1c, 0x8e, 0x86,
+ 0xd8, 0x22, 0x4e, 0xdd, 0xd0, 0x9f, 0x11, 0x57,
+ },
+ { /* (-1,_,1) a point of order 4 on the twist of Curve25519 */
+ 0xec, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+ },
+}
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.go b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.go
new file mode 100644
index 000000000..8a3d54c57
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.go
@@ -0,0 +1,30 @@
+//go:build amd64 && !purego
+// +build amd64,!purego
+
+package x25519
+
+import (
+ fp "github.com/cloudflare/circl/math/fp25519"
+ "golang.org/x/sys/cpu"
+)
+
+var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
+
+var _ = hasBmi2Adx
+
+func double(x, z *fp.Elt) { doubleAmd64(x, z) }
+func diffAdd(w *[5]fp.Elt, b uint) { diffAddAmd64(w, b) }
+func ladderStep(w *[5]fp.Elt, b uint) { ladderStepAmd64(w, b) }
+func mulA24(z, x *fp.Elt) { mulA24Amd64(z, x) }
+
+//go:noescape
+func ladderStepAmd64(w *[5]fp.Elt, b uint)
+
+//go:noescape
+func diffAddAmd64(w *[5]fp.Elt, b uint)
+
+//go:noescape
+func doubleAmd64(x, z *fp.Elt)
+
+//go:noescape
+func mulA24Amd64(z, x *fp.Elt)
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.h b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.h
new file mode 100644
index 000000000..8c1ae4d0f
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.h
@@ -0,0 +1,111 @@
+#define ladderStepLeg \
+ addSub(x2,z2) \
+ addSub(x3,z3) \
+ integerMulLeg(b0,x2,z3) \
+ integerMulLeg(b1,x3,z2) \
+ reduceFromDoubleLeg(t0,b0) \
+ reduceFromDoubleLeg(t1,b1) \
+ addSub(t0,t1) \
+ cselect(x2,x3,regMove) \
+ cselect(z2,z3,regMove) \
+ integerSqrLeg(b0,t0) \
+ integerSqrLeg(b1,t1) \
+ reduceFromDoubleLeg(x3,b0) \
+ reduceFromDoubleLeg(z3,b1) \
+ integerMulLeg(b0,x1,z3) \
+ reduceFromDoubleLeg(z3,b0) \
+ integerSqrLeg(b0,x2) \
+ integerSqrLeg(b1,z2) \
+ reduceFromDoubleLeg(x2,b0) \
+ reduceFromDoubleLeg(z2,b1) \
+ subtraction(t0,x2,z2) \
+ multiplyA24Leg(t1,t0) \
+ additionLeg(t1,t1,z2) \
+ integerMulLeg(b0,x2,z2) \
+ integerMulLeg(b1,t0,t1) \
+ reduceFromDoubleLeg(x2,b0) \
+ reduceFromDoubleLeg(z2,b1)
+
+#define ladderStepBmi2Adx \
+ addSub(x2,z2) \
+ addSub(x3,z3) \
+ integerMulAdx(b0,x2,z3) \
+ integerMulAdx(b1,x3,z2) \
+ reduceFromDoubleAdx(t0,b0) \
+ reduceFromDoubleAdx(t1,b1) \
+ addSub(t0,t1) \
+ cselect(x2,x3,regMove) \
+ cselect(z2,z3,regMove) \
+ integerSqrAdx(b0,t0) \
+ integerSqrAdx(b1,t1) \
+ reduceFromDoubleAdx(x3,b0) \
+ reduceFromDoubleAdx(z3,b1) \
+ integerMulAdx(b0,x1,z3) \
+ reduceFromDoubleAdx(z3,b0) \
+ integerSqrAdx(b0,x2) \
+ integerSqrAdx(b1,z2) \
+ reduceFromDoubleAdx(x2,b0) \
+ reduceFromDoubleAdx(z2,b1) \
+ subtraction(t0,x2,z2) \
+ multiplyA24Adx(t1,t0) \
+ additionAdx(t1,t1,z2) \
+ integerMulAdx(b0,x2,z2) \
+ integerMulAdx(b1,t0,t1) \
+ reduceFromDoubleAdx(x2,b0) \
+ reduceFromDoubleAdx(z2,b1)
+
+#define difAddLeg \
+ addSub(x1,z1) \
+ integerMulLeg(b0,z1,ui) \
+ reduceFromDoubleLeg(z1,b0) \
+ addSub(x1,z1) \
+ integerSqrLeg(b0,x1) \
+ integerSqrLeg(b1,z1) \
+ reduceFromDoubleLeg(x1,b0) \
+ reduceFromDoubleLeg(z1,b1) \
+ integerMulLeg(b0,x1,z2) \
+ integerMulLeg(b1,z1,x2) \
+ reduceFromDoubleLeg(x1,b0) \
+ reduceFromDoubleLeg(z1,b1)
+
+#define difAddBmi2Adx \
+ addSub(x1,z1) \
+ integerMulAdx(b0,z1,ui) \
+ reduceFromDoubleAdx(z1,b0) \
+ addSub(x1,z1) \
+ integerSqrAdx(b0,x1) \
+ integerSqrAdx(b1,z1) \
+ reduceFromDoubleAdx(x1,b0) \
+ reduceFromDoubleAdx(z1,b1) \
+ integerMulAdx(b0,x1,z2) \
+ integerMulAdx(b1,z1,x2) \
+ reduceFromDoubleAdx(x1,b0) \
+ reduceFromDoubleAdx(z1,b1)
+
+#define doubleLeg \
+ addSub(x1,z1) \
+ integerSqrLeg(b0,x1) \
+ integerSqrLeg(b1,z1) \
+ reduceFromDoubleLeg(x1,b0) \
+ reduceFromDoubleLeg(z1,b1) \
+ subtraction(t0,x1,z1) \
+ multiplyA24Leg(t1,t0) \
+ additionLeg(t1,t1,z1) \
+ integerMulLeg(b0,x1,z1) \
+ integerMulLeg(b1,t0,t1) \
+ reduceFromDoubleLeg(x1,b0) \
+ reduceFromDoubleLeg(z1,b1)
+
+#define doubleBmi2Adx \
+ addSub(x1,z1) \
+ integerSqrAdx(b0,x1) \
+ integerSqrAdx(b1,z1) \
+ reduceFromDoubleAdx(x1,b0) \
+ reduceFromDoubleAdx(z1,b1) \
+ subtraction(t0,x1,z1) \
+ multiplyA24Adx(t1,t0) \
+ additionAdx(t1,t1,z1) \
+ integerMulAdx(b0,x1,z1) \
+ integerMulAdx(b1,t0,t1) \
+ reduceFromDoubleAdx(x1,b0) \
+ reduceFromDoubleAdx(z1,b1)
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s
new file mode 100644
index 000000000..ce9f06289
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/curve_amd64.s
@@ -0,0 +1,157 @@
+//go:build amd64 && !purego
+// +build amd64,!purego
+
+#include "textflag.h"
+
+// Depends on circl/math/fp25519 package
+#include "../../math/fp25519/fp_amd64.h"
+#include "curve_amd64.h"
+
+// CTE_A24 is (A+2)/4 from Curve25519
+#define CTE_A24 121666
+
+#define Size 32
+
+// multiplyA24Leg multiplies x times CTE_A24 and stores in z
+// Uses: AX, DX, R8-R13, FLAGS
+// Instr: x86_64, cmov
+#define multiplyA24Leg(z,x) \
+ MOVL $CTE_A24, AX; MULQ 0+x; MOVQ AX, R8; MOVQ DX, R9; \
+ MOVL $CTE_A24, AX; MULQ 8+x; MOVQ AX, R12; MOVQ DX, R10; \
+ MOVL $CTE_A24, AX; MULQ 16+x; MOVQ AX, R13; MOVQ DX, R11; \
+ MOVL $CTE_A24, AX; MULQ 24+x; \
+ ADDQ R12, R9; \
+ ADCQ R13, R10; \
+ ADCQ AX, R11; \
+ ADCQ $0, DX; \
+ MOVL $38, AX; /* 2*C = 38 = 2^256 MOD 2^255-19*/ \
+ IMULQ AX, DX; \
+ ADDQ DX, R8; \
+ ADCQ $0, R9; MOVQ R9, 8+z; \
+ ADCQ $0, R10; MOVQ R10, 16+z; \
+ ADCQ $0, R11; MOVQ R11, 24+z; \
+ MOVQ $0, DX; \
+ CMOVQCS AX, DX; \
+ ADDQ DX, R8; MOVQ R8, 0+z;
+
+// multiplyA24Adx multiplies x times CTE_A24 and stores in z
+// Uses: AX, DX, R8-R12, FLAGS
+// Instr: x86_64, cmov, bmi2
+#define multiplyA24Adx(z,x) \
+ MOVQ $CTE_A24, DX; \
+ MULXQ 0+x, R8, R10; \
+ MULXQ 8+x, R9, R11; ADDQ R10, R9; \
+ MULXQ 16+x, R10, AX; ADCQ R11, R10; \
+ MULXQ 24+x, R11, R12; ADCQ AX, R11; \
+ ;;;;;;;;;;;;;;;;;;;;; ADCQ $0, R12; \
+ MOVL $38, DX; /* 2*C = 38 = 2^256 MOD 2^255-19*/ \
+ IMULQ DX, R12; \
+ ADDQ R12, R8; \
+ ADCQ $0, R9; MOVQ R9, 8+z; \
+ ADCQ $0, R10; MOVQ R10, 16+z; \
+ ADCQ $0, R11; MOVQ R11, 24+z; \
+ MOVQ $0, R12; \
+ CMOVQCS DX, R12; \
+ ADDQ R12, R8; MOVQ R8, 0+z;
+
+#define mulA24Legacy \
+ multiplyA24Leg(0(DI),0(SI))
+#define mulA24Bmi2Adx \
+ multiplyA24Adx(0(DI),0(SI))
+
+// func mulA24Amd64(z, x *fp255.Elt)
+TEXT ·mulA24Amd64(SB),NOSPLIT,$0-16
+ MOVQ z+0(FP), DI
+ MOVQ x+8(FP), SI
+ CHECK_BMI2ADX(LMA24, mulA24Legacy, mulA24Bmi2Adx)
+
+
+// func ladderStepAmd64(w *[5]fp255.Elt, b uint)
+// ladderStepAmd64 calculates a point addition and doubling as follows:
+// (x2,z2) = 2*(x2,z2) and (x3,z3) = (x2,z2)+(x3,z3) using as a difference (x1,-).
+// work = (x1,x2,z2,x3,z3) are five fp255.Elt of 32 bytes.
+// stack = (t0,t1) are two fp.Elt of fp.Size bytes, and
+// (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
+TEXT ·ladderStepAmd64(SB),NOSPLIT,$192-16
+ // Parameters
+ #define regWork DI
+ #define regMove SI
+ #define x1 0*Size(regWork)
+ #define x2 1*Size(regWork)
+ #define z2 2*Size(regWork)
+ #define x3 3*Size(regWork)
+ #define z3 4*Size(regWork)
+ // Local variables
+ #define t0 0*Size(SP)
+ #define t1 1*Size(SP)
+ #define b0 2*Size(SP)
+ #define b1 4*Size(SP)
+ MOVQ w+0(FP), regWork
+ MOVQ b+8(FP), regMove
+ CHECK_BMI2ADX(LLADSTEP, ladderStepLeg, ladderStepBmi2Adx)
+ #undef regWork
+ #undef regMove
+ #undef x1
+ #undef x2
+ #undef z2
+ #undef x3
+ #undef z3
+ #undef t0
+ #undef t1
+ #undef b0
+ #undef b1
+
+// func diffAddAmd64(w *[5]fp255.Elt, b uint)
+// diffAddAmd64 calculates a differential point addition using a precomputed point.
+// (x1,z1) = (x1,z1)+(mu) using a difference point (x2,z2)
+// w = (mu,x1,z1,x2,z2) are five fp.Elt, and
+// stack = (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
+TEXT ·diffAddAmd64(SB),NOSPLIT,$128-16
+ // Parameters
+ #define regWork DI
+ #define regSwap SI
+ #define ui 0*Size(regWork)
+ #define x1 1*Size(regWork)
+ #define z1 2*Size(regWork)
+ #define x2 3*Size(regWork)
+ #define z2 4*Size(regWork)
+ // Local variables
+ #define b0 0*Size(SP)
+ #define b1 2*Size(SP)
+ MOVQ w+0(FP), regWork
+ MOVQ b+8(FP), regSwap
+ cswap(x1,x2,regSwap)
+ cswap(z1,z2,regSwap)
+ CHECK_BMI2ADX(LDIFADD, difAddLeg, difAddBmi2Adx)
+ #undef regWork
+ #undef regSwap
+ #undef ui
+ #undef x1
+ #undef z1
+ #undef x2
+ #undef z2
+ #undef b0
+ #undef b1
+
+// func doubleAmd64(x, z *fp255.Elt)
+// doubleAmd64 calculates a point doubling (x1,z1) = 2*(x1,z1).
+// stack = (t0,t1) are two fp.Elt of fp.Size bytes, and
+// (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
+TEXT ·doubleAmd64(SB),NOSPLIT,$192-16
+ // Parameters
+ #define x1 0(DI)
+ #define z1 0(SI)
+ // Local variables
+ #define t0 0*Size(SP)
+ #define t1 1*Size(SP)
+ #define b0 2*Size(SP)
+ #define b1 4*Size(SP)
+ MOVQ x+0(FP), DI
+ MOVQ z+8(FP), SI
+ CHECK_BMI2ADX(LDOUB,doubleLeg,doubleBmi2Adx)
+ #undef x1
+ #undef z1
+ #undef t0
+ #undef t1
+ #undef b0
+ #undef b1
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_generic.go b/vendor/github.com/cloudflare/circl/dh/x25519/curve_generic.go
new file mode 100644
index 000000000..dae67ea37
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/curve_generic.go
@@ -0,0 +1,85 @@
+package x25519
+
+import (
+ "encoding/binary"
+ "math/bits"
+
+ fp "github.com/cloudflare/circl/math/fp25519"
+)
+
+func doubleGeneric(x, z *fp.Elt) {
+ t0, t1 := &fp.Elt{}, &fp.Elt{}
+ fp.AddSub(x, z)
+ fp.Sqr(x, x)
+ fp.Sqr(z, z)
+ fp.Sub(t0, x, z)
+ mulA24Generic(t1, t0)
+ fp.Add(t1, t1, z)
+ fp.Mul(x, x, z)
+ fp.Mul(z, t0, t1)
+}
+
+func diffAddGeneric(w *[5]fp.Elt, b uint) {
+ mu, x1, z1, x2, z2 := &w[0], &w[1], &w[2], &w[3], &w[4]
+ fp.Cswap(x1, x2, b)
+ fp.Cswap(z1, z2, b)
+ fp.AddSub(x1, z1)
+ fp.Mul(z1, z1, mu)
+ fp.AddSub(x1, z1)
+ fp.Sqr(x1, x1)
+ fp.Sqr(z1, z1)
+ fp.Mul(x1, x1, z2)
+ fp.Mul(z1, z1, x2)
+}
+
+func ladderStepGeneric(w *[5]fp.Elt, b uint) {
+ x1, x2, z2, x3, z3 := &w[0], &w[1], &w[2], &w[3], &w[4]
+ t0 := &fp.Elt{}
+ t1 := &fp.Elt{}
+ fp.AddSub(x2, z2)
+ fp.AddSub(x3, z3)
+ fp.Mul(t0, x2, z3)
+ fp.Mul(t1, x3, z2)
+ fp.AddSub(t0, t1)
+ fp.Cmov(x2, x3, b)
+ fp.Cmov(z2, z3, b)
+ fp.Sqr(x3, t0)
+ fp.Sqr(z3, t1)
+ fp.Mul(z3, x1, z3)
+ fp.Sqr(x2, x2)
+ fp.Sqr(z2, z2)
+ fp.Sub(t0, x2, z2)
+ mulA24Generic(t1, t0)
+ fp.Add(t1, t1, z2)
+ fp.Mul(x2, x2, z2)
+ fp.Mul(z2, t0, t1)
+}
+
+func mulA24Generic(z, x *fp.Elt) {
+ const A24 = 121666
+ const n = 8
+ var xx [4]uint64
+ for i := range xx {
+ xx[i] = binary.LittleEndian.Uint64(x[i*n : (i+1)*n])
+ }
+
+ h0, l0 := bits.Mul64(xx[0], A24)
+ h1, l1 := bits.Mul64(xx[1], A24)
+ h2, l2 := bits.Mul64(xx[2], A24)
+ h3, l3 := bits.Mul64(xx[3], A24)
+
+ var c3 uint64
+ l1, c0 := bits.Add64(h0, l1, 0)
+ l2, c1 := bits.Add64(h1, l2, c0)
+ l3, c2 := bits.Add64(h2, l3, c1)
+ l4, _ := bits.Add64(h3, 0, c2)
+ _, l4 = bits.Mul64(l4, 38)
+ l0, c0 = bits.Add64(l0, l4, 0)
+ xx[1], c1 = bits.Add64(l1, 0, c0)
+ xx[2], c2 = bits.Add64(l2, 0, c1)
+ xx[3], c3 = bits.Add64(l3, 0, c2)
+ xx[0], _ = bits.Add64(l0, (-c3)&38, 0)
+ for i := range xx {
+ binary.LittleEndian.PutUint64(z[i*n:(i+1)*n], xx[i])
+ }
+}
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/curve_noasm.go b/vendor/github.com/cloudflare/circl/dh/x25519/curve_noasm.go
new file mode 100644
index 000000000..07fab97d2
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/curve_noasm.go
@@ -0,0 +1,11 @@
+//go:build !amd64 || purego
+// +build !amd64 purego
+
+package x25519
+
+import fp "github.com/cloudflare/circl/math/fp25519"
+
+func double(x, z *fp.Elt) { doubleGeneric(x, z) }
+func diffAdd(w *[5]fp.Elt, b uint) { diffAddGeneric(w, b) }
+func ladderStep(w *[5]fp.Elt, b uint) { ladderStepGeneric(w, b) }
+func mulA24(z, x *fp.Elt) { mulA24Generic(z, x) }
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/doc.go b/vendor/github.com/cloudflare/circl/dh/x25519/doc.go
new file mode 100644
index 000000000..3ce102d14
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/doc.go
@@ -0,0 +1,19 @@
+/*
+Package x25519 provides Diffie-Hellman functions as specified in RFC-7748.
+
+Validation of public keys.
+
+The Diffie-Hellman function, as described in RFC-7748 [1], works for any
+public key. However, if a different protocol requires contributory
+behaviour [2,3], then the public keys must be validated against low-order
+points [3,4]. To do that, the Shared function performs this validation
+internally and returns false when the public key is invalid (i.e., it
+is a low-order point).
+
+References:
+ - [1] RFC7748 by Langley, Hamburg, Turner (https://rfc-editor.org/rfc/rfc7748.txt)
+ - [2] Curve25519 by Bernstein (https://cr.yp.to/ecdh.html)
+ - [3] Bernstein (https://cr.yp.to/ecdh.html#validate)
+ - [4] Cremers&Jackson (https://eprint.iacr.org/2019/526)
+*/
+package x25519
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/key.go b/vendor/github.com/cloudflare/circl/dh/x25519/key.go
new file mode 100644
index 000000000..c76f72ac7
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/key.go
@@ -0,0 +1,47 @@
+package x25519
+
+import (
+ "crypto/subtle"
+
+ fp "github.com/cloudflare/circl/math/fp25519"
+)
+
+// Size is the length in bytes of a X25519 key.
+const Size = 32
+
+// Key represents a X25519 key.
+type Key [Size]byte
+
+func (k *Key) clamp(in *Key) *Key {
+ *k = *in
+ k[0] &= 248
+ k[31] = (k[31] & 127) | 64
+ return k
+}
+
+// isValidPubKey verifies if the public key is not a low-order point.
+func (k *Key) isValidPubKey() bool {
+ fp.Modp((*fp.Elt)(k))
+ var isLowOrder int
+ for _, P := range lowOrderPoints {
+ isLowOrder |= subtle.ConstantTimeCompare(P[:], k[:])
+ }
+ return isLowOrder == 0
+}
+
+// KeyGen obtains a public key given a secret key.
+func KeyGen(public, secret *Key) {
+ ladderJoye(public.clamp(secret))
+}
+
+// Shared calculates Alice's shared key from Alice's secret key and Bob's
+// public key returning true on success. A failure case happens when the public
+// key is a low-order point, thus the shared key is all-zeros and the function
+// returns false.
+func Shared(shared, secret, public *Key) bool {
+ validPk := *public
+ validPk[31] &= (1 << (255 % 8)) - 1
+ ok := validPk.isValidPubKey()
+ ladderMontgomery(shared.clamp(secret), &validPk)
+ return ok
+}
diff --git a/vendor/github.com/cloudflare/circl/dh/x25519/table.go b/vendor/github.com/cloudflare/circl/dh/x25519/table.go
new file mode 100644
index 000000000..28c8c4ac0
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x25519/table.go
@@ -0,0 +1,268 @@
+package x25519
+
+import "github.com/cloudflare/circl/math/fp25519"
+
+// tableGenerator contains the set of points:
+//
+// t[i] = (xi+1)/(xi-1),
+//
+// where (xi,yi) = 2^iG and G is the generator point
+// Size = (256)*(256/8) = 8192 bytes.
+var tableGenerator = [256 * fp25519.Size]byte{
+ /* (2^ 0)P */ 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f,
+ /* (2^ 1)P */ 0x96, 0xfe, 0xaa, 0x16, 0xf4, 0x20, 0x82, 0x6b, 0x34, 0x6a, 0x56, 0x4f, 0x2b, 0xeb, 0xeb, 0x82, 0x0f, 0x95, 0xa5, 0x75, 0xb0, 0xa5, 0xa9, 0xd5, 0xf4, 0x88, 0x24, 0x4b, 0xcf, 0xb2, 0x42, 0x51,
+ /* (2^ 2)P */ 0x0c, 0x68, 0x69, 0x00, 0x75, 0xbc, 0xae, 0x6a, 0x41, 0x9c, 0xf9, 0xa0, 0x20, 0x78, 0xcf, 0x89, 0xf4, 0xd0, 0x56, 0x3b, 0x18, 0xd9, 0x58, 0x2a, 0xa4, 0x11, 0x60, 0xe3, 0x80, 0xca, 0x5a, 0x4b,
+ /* (2^ 3)P */ 0x5d, 0x74, 0x29, 0x8c, 0x34, 0x32, 0x91, 0x32, 0xd7, 0x2f, 0x64, 0xe1, 0x16, 0xe6, 0xa2, 0xf4, 0x34, 0xbc, 0x67, 0xff, 0x03, 0xbb, 0x45, 0x1e, 0x4a, 0x9b, 0x2a, 0xf4, 0xd0, 0x12, 0x69, 0x30,
+ /* (2^ 4)P */ 0x54, 0x71, 0xaf, 0xe6, 0x07, 0x65, 0x88, 0xff, 0x2f, 0xc8, 0xee, 0xdf, 0x13, 0x0e, 0xf5, 0x04, 0xce, 0xb5, 0xba, 0x2a, 0xe8, 0x2f, 0x51, 0xaa, 0x22, 0xf2, 0xd5, 0x68, 0x1a, 0x25, 0x4e, 0x17,
+ /* (2^ 5)P */ 0x98, 0x88, 0x02, 0x82, 0x0d, 0x70, 0x96, 0xcf, 0xc5, 0x02, 0x2c, 0x0a, 0x37, 0xe3, 0x43, 0x17, 0xaa, 0x6e, 0xe8, 0xb4, 0x98, 0xec, 0x9e, 0x37, 0x2e, 0x48, 0xe0, 0x51, 0x8a, 0x88, 0x59, 0x0c,
+ /* (2^ 6)P */ 0x89, 0xd1, 0xb5, 0x99, 0xd6, 0xf1, 0xcb, 0xfb, 0x84, 0xdc, 0x9f, 0x8e, 0xd5, 0xf0, 0xae, 0xac, 0x14, 0x76, 0x1f, 0x23, 0x06, 0x0d, 0xc2, 0xc1, 0x72, 0xf9, 0x74, 0xa2, 0x8d, 0x21, 0x38, 0x29,
+ /* (2^ 7)P */ 0x18, 0x7f, 0x1d, 0xff, 0xbe, 0x49, 0xaf, 0xf6, 0xc2, 0xc9, 0x7a, 0x38, 0x22, 0x1c, 0x54, 0xcc, 0x6b, 0xc5, 0x15, 0x40, 0xef, 0xc9, 0xfc, 0x96, 0xa9, 0x13, 0x09, 0x69, 0x7c, 0x62, 0xc1, 0x69,
+ /* (2^ 8)P */ 0x0e, 0xdb, 0x33, 0x47, 0x2f, 0xfd, 0x86, 0x7a, 0xe9, 0x7d, 0x08, 0x9e, 0xf2, 0xc4, 0xb8, 0xfd, 0x29, 0xa2, 0xa2, 0x8e, 0x1a, 0x4b, 0x5e, 0x09, 0x79, 0x7a, 0xb3, 0x29, 0xc8, 0xa7, 0xd7, 0x1a,
+ /* (2^ 9)P */ 0xc0, 0xa0, 0x7e, 0xd1, 0xca, 0x89, 0x2d, 0x34, 0x51, 0x20, 0xed, 0xcc, 0xa6, 0xdd, 0xbe, 0x67, 0x74, 0x2f, 0xb4, 0x2b, 0xbf, 0x31, 0xca, 0x19, 0xbb, 0xac, 0x80, 0x49, 0xc8, 0xb4, 0xf7, 0x3d,
+ /* (2^ 10)P */ 0x83, 0xd8, 0x0a, 0xc8, 0x4d, 0x44, 0xc6, 0xa8, 0x85, 0xab, 0xe3, 0x66, 0x03, 0x44, 0x1e, 0xb9, 0xd8, 0xf6, 0x64, 0x01, 0xa0, 0xcd, 0x15, 0xc2, 0x68, 0xe6, 0x47, 0xf2, 0x6e, 0x7c, 0x86, 0x3d,
+ /* (2^ 11)P */ 0x8c, 0x65, 0x3e, 0xcc, 0x2b, 0x58, 0xdd, 0xc7, 0x28, 0x55, 0x0e, 0xee, 0x48, 0x47, 0x2c, 0xfd, 0x71, 0x4f, 0x9f, 0xcc, 0x95, 0x9b, 0xfd, 0xa0, 0xdf, 0x5d, 0x67, 0xb0, 0x71, 0xd8, 0x29, 0x75,
+ /* (2^ 12)P */ 0x78, 0xbd, 0x3c, 0x2d, 0xb4, 0x68, 0xf5, 0xb8, 0x82, 0xda, 0xf3, 0x91, 0x1b, 0x01, 0x33, 0x12, 0x62, 0x3b, 0x7c, 0x4a, 0xcd, 0x6c, 0xce, 0x2d, 0x03, 0x86, 0x49, 0x9e, 0x8e, 0xfc, 0xe7, 0x75,
+ /* (2^ 13)P */ 0xec, 0xb6, 0xd0, 0xfc, 0xf1, 0x13, 0x4f, 0x2f, 0x45, 0x7a, 0xff, 0x29, 0x1f, 0xca, 0xa8, 0xf1, 0x9b, 0xe2, 0x81, 0x29, 0xa7, 0xc1, 0x49, 0xc2, 0x6a, 0xb5, 0x83, 0x8c, 0xbb, 0x0d, 0xbe, 0x6e,
+ /* (2^ 14)P */ 0x22, 0xb2, 0x0b, 0x17, 0x8d, 0xfa, 0x14, 0x71, 0x5f, 0x93, 0x93, 0xbf, 0xd5, 0xdc, 0xa2, 0x65, 0x9a, 0x97, 0x9c, 0xb5, 0x68, 0x1f, 0xc4, 0xbd, 0x89, 0x92, 0xce, 0xa2, 0x79, 0xef, 0x0e, 0x2f,
+ /* (2^ 15)P */ 0xce, 0x37, 0x3c, 0x08, 0x0c, 0xbf, 0xec, 0x42, 0x22, 0x63, 0x49, 0xec, 0x09, 0xbc, 0x30, 0x29, 0x0d, 0xac, 0xfe, 0x9c, 0xc1, 0xb0, 0x94, 0xf2, 0x80, 0xbb, 0xfa, 0xed, 0x4b, 0xaa, 0x80, 0x37,
+ /* (2^ 16)P */ 0x29, 0xd9, 0xea, 0x7c, 0x3e, 0x7d, 0xc1, 0x56, 0xc5, 0x22, 0x57, 0x2e, 0xeb, 0x4b, 0xcb, 0xe7, 0x5a, 0xe1, 0xbf, 0x2d, 0x73, 0x31, 0xe9, 0x0c, 0xf8, 0x52, 0x10, 0x62, 0xc7, 0x83, 0xb8, 0x41,
+ /* (2^ 17)P */ 0x50, 0x53, 0xd2, 0xc3, 0xa0, 0x5c, 0xf7, 0xdb, 0x51, 0xe3, 0xb1, 0x6e, 0x08, 0xbe, 0x36, 0x29, 0x12, 0xb2, 0xa9, 0xb4, 0x3c, 0xe0, 0x36, 0xc9, 0xaa, 0x25, 0x22, 0x32, 0x82, 0xbf, 0x45, 0x1d,
+ /* (2^ 18)P */ 0xc5, 0x4c, 0x02, 0x6a, 0x03, 0xb1, 0x1a, 0xe8, 0x72, 0x9a, 0x4c, 0x30, 0x1c, 0x20, 0x12, 0xe2, 0xfc, 0xb1, 0x32, 0x68, 0xba, 0x3f, 0xd7, 0xc5, 0x81, 0x95, 0x83, 0x4d, 0x5a, 0xdb, 0xff, 0x20,
+ /* (2^ 19)P */ 0xad, 0x0f, 0x5d, 0xbe, 0x67, 0xd3, 0x83, 0xa2, 0x75, 0x44, 0x16, 0x8b, 0xca, 0x25, 0x2b, 0x6c, 0x2e, 0xf2, 0xaa, 0x7c, 0x46, 0x35, 0x49, 0x9d, 0x49, 0xff, 0x85, 0xee, 0x8e, 0x40, 0x66, 0x51,
+ /* (2^ 20)P */ 0x61, 0xe3, 0xb4, 0xfa, 0xa2, 0xba, 0x67, 0x3c, 0xef, 0x5c, 0xf3, 0x7e, 0xc6, 0x33, 0xe4, 0xb3, 0x1c, 0x9b, 0x15, 0x41, 0x92, 0x72, 0x59, 0x52, 0x33, 0xab, 0xb0, 0xd5, 0x92, 0x18, 0x62, 0x6a,
+ /* (2^ 21)P */ 0xcb, 0xcd, 0x55, 0x75, 0x38, 0x4a, 0xb7, 0x20, 0x3f, 0x92, 0x08, 0x12, 0x0e, 0xa1, 0x2a, 0x53, 0xd1, 0x1d, 0x28, 0x62, 0x77, 0x7b, 0xa1, 0xea, 0xbf, 0x44, 0x5c, 0xf0, 0x43, 0x34, 0xab, 0x61,
+ /* (2^ 22)P */ 0xf8, 0xde, 0x24, 0x23, 0x42, 0x6c, 0x7a, 0x25, 0x7f, 0xcf, 0xe3, 0x17, 0x10, 0x6c, 0x1c, 0x13, 0x57, 0xa2, 0x30, 0xf6, 0x39, 0x87, 0x75, 0x23, 0x80, 0x85, 0xa7, 0x01, 0x7a, 0x40, 0x5a, 0x29,
+ /* (2^ 23)P */ 0xd9, 0xa8, 0x5d, 0x6d, 0x24, 0x43, 0xc4, 0xf8, 0x5d, 0xfa, 0x52, 0x0c, 0x45, 0x75, 0xd7, 0x19, 0x3d, 0xf8, 0x1b, 0x73, 0x92, 0xfc, 0xfc, 0x2a, 0x00, 0x47, 0x2b, 0x1b, 0xe8, 0xc8, 0x10, 0x7d,
+ /* (2^ 24)P */ 0x0b, 0xa2, 0xba, 0x70, 0x1f, 0x27, 0xe0, 0xc8, 0x57, 0x39, 0xa6, 0x7c, 0x86, 0x48, 0x37, 0x99, 0xbb, 0xd4, 0x7e, 0xcb, 0xb3, 0xef, 0x12, 0x54, 0x75, 0x29, 0xe6, 0x73, 0x61, 0xd3, 0x96, 0x31,
+ /* (2^ 25)P */ 0xfc, 0xdf, 0xc7, 0x41, 0xd1, 0xca, 0x5b, 0xde, 0x48, 0xc8, 0x95, 0xb3, 0xd2, 0x8c, 0xcc, 0x47, 0xcb, 0xf3, 0x1a, 0xe1, 0x42, 0xd9, 0x4c, 0xa3, 0xc2, 0xce, 0x4e, 0xd0, 0xf2, 0xdb, 0x56, 0x02,
+ /* (2^ 26)P */ 0x7f, 0x66, 0x0e, 0x4b, 0xe9, 0xb7, 0x5a, 0x87, 0x10, 0x0d, 0x85, 0xc0, 0x83, 0xdd, 0xd4, 0xca, 0x9f, 0xc7, 0x72, 0x4e, 0x8f, 0x2e, 0xf1, 0x47, 0x9b, 0xb1, 0x85, 0x8c, 0xbb, 0x87, 0x1a, 0x5f,
+ /* (2^ 27)P */ 0xb8, 0x51, 0x7f, 0x43, 0xb6, 0xd0, 0xe9, 0x7a, 0x65, 0x90, 0x87, 0x18, 0x55, 0xce, 0xc7, 0x12, 0xee, 0x7a, 0xf7, 0x5c, 0xfe, 0x09, 0xde, 0x2a, 0x27, 0x56, 0x2c, 0x7d, 0x2f, 0x5a, 0xa0, 0x23,
+ /* (2^ 28)P */ 0x9a, 0x16, 0x7c, 0xf1, 0x28, 0xe1, 0x08, 0x59, 0x2d, 0x85, 0xd0, 0x8a, 0xdd, 0x98, 0x74, 0xf7, 0x64, 0x2f, 0x10, 0xab, 0xce, 0xc4, 0xb4, 0x74, 0x45, 0x98, 0x13, 0x10, 0xdd, 0xba, 0x3a, 0x18,
+ /* (2^ 29)P */ 0xac, 0xaa, 0x92, 0xaa, 0x8d, 0xba, 0x65, 0xb1, 0x05, 0x67, 0x38, 0x99, 0x95, 0xef, 0xc5, 0xd5, 0xd1, 0x40, 0xfc, 0xf8, 0x0c, 0x8f, 0x2f, 0xbe, 0x14, 0x45, 0x20, 0xee, 0x35, 0xe6, 0x01, 0x27,
+ /* (2^ 30)P */ 0x14, 0x65, 0x15, 0x20, 0x00, 0xa8, 0x9f, 0x62, 0xce, 0xc1, 0xa8, 0x64, 0x87, 0x86, 0x23, 0xf2, 0x0e, 0x06, 0x3f, 0x0b, 0xff, 0x4f, 0x89, 0x5b, 0xfa, 0xa3, 0x08, 0xf7, 0x4c, 0x94, 0xd9, 0x60,
+ /* (2^ 31)P */ 0x1f, 0x20, 0x7a, 0x1c, 0x1a, 0x00, 0xea, 0xae, 0x63, 0xce, 0xe2, 0x3e, 0x63, 0x6a, 0xf1, 0xeb, 0xe1, 0x07, 0x7a, 0x4c, 0x59, 0x09, 0x77, 0x6f, 0xcb, 0x08, 0x02, 0x0d, 0x15, 0x58, 0xb9, 0x79,
+ /* (2^ 32)P */ 0xe7, 0x10, 0xd4, 0x01, 0x53, 0x5e, 0xb5, 0x24, 0x4d, 0xc8, 0xfd, 0xf3, 0xdf, 0x4e, 0xa3, 0xe3, 0xd8, 0x32, 0x40, 0x90, 0xe4, 0x68, 0x87, 0xd8, 0xec, 0xae, 0x3a, 0x7b, 0x42, 0x84, 0x13, 0x13,
+ /* (2^ 33)P */ 0x14, 0x4f, 0x23, 0x86, 0x12, 0xe5, 0x05, 0x84, 0x29, 0xc5, 0xb4, 0xad, 0x39, 0x47, 0xdc, 0x14, 0xfd, 0x4f, 0x63, 0x50, 0xb2, 0xb5, 0xa2, 0xb8, 0x93, 0xff, 0xa7, 0xd8, 0x4a, 0xa9, 0xe2, 0x2f,
+ /* (2^ 34)P */ 0xdd, 0xfa, 0x43, 0xe8, 0xef, 0x57, 0x5c, 0xec, 0x18, 0x99, 0xbb, 0xf0, 0x40, 0xce, 0x43, 0x28, 0x05, 0x63, 0x3d, 0xcf, 0xd6, 0x61, 0xb5, 0xa4, 0x7e, 0x77, 0xfb, 0xe8, 0xbd, 0x29, 0x36, 0x74,
+ /* (2^ 35)P */ 0x8f, 0x73, 0xaf, 0xbb, 0x46, 0xdd, 0x3e, 0x34, 0x51, 0xa6, 0x01, 0xb1, 0x28, 0x18, 0x98, 0xed, 0x7a, 0x79, 0x2c, 0x88, 0x0b, 0x76, 0x01, 0xa4, 0x30, 0x87, 0xc8, 0x8d, 0xe2, 0x23, 0xc2, 0x1f,
+ /* (2^ 36)P */ 0x0e, 0xba, 0x0f, 0xfc, 0x91, 0x4e, 0x60, 0x48, 0xa4, 0x6f, 0x2c, 0x05, 0x8f, 0xf7, 0x37, 0xb6, 0x9c, 0x23, 0xe9, 0x09, 0x3d, 0xac, 0xcc, 0x91, 0x7c, 0x68, 0x7a, 0x43, 0xd4, 0xee, 0xf7, 0x23,
+ /* (2^ 37)P */ 0x00, 0xd8, 0x9b, 0x8d, 0x11, 0xb1, 0x73, 0x51, 0xa7, 0xd4, 0x89, 0x31, 0xb6, 0x41, 0xd6, 0x29, 0x86, 0xc5, 0xbb, 0x88, 0x79, 0x17, 0xbf, 0xfd, 0xf5, 0x1d, 0xd8, 0xca, 0x4f, 0x89, 0x59, 0x29,
+ /* (2^ 38)P */ 0x99, 0xc8, 0xbb, 0xb4, 0xf3, 0x8e, 0xbc, 0xae, 0xb9, 0x92, 0x69, 0xb2, 0x5a, 0x99, 0x48, 0x41, 0xfb, 0x2c, 0xf9, 0x34, 0x01, 0x0b, 0xe2, 0x24, 0xe8, 0xde, 0x05, 0x4a, 0x89, 0x58, 0xd1, 0x40,
+ /* (2^ 39)P */ 0xf6, 0x76, 0xaf, 0x85, 0x11, 0x0b, 0xb0, 0x46, 0x79, 0x7a, 0x18, 0x73, 0x78, 0xc7, 0xba, 0x26, 0x5f, 0xff, 0x8f, 0xab, 0x95, 0xbf, 0xc0, 0x3d, 0xd7, 0x24, 0x55, 0x94, 0xd8, 0x8b, 0x60, 0x2a,
+ /* (2^ 40)P */ 0x02, 0x63, 0x44, 0xbd, 0x88, 0x95, 0x44, 0x26, 0x9c, 0x43, 0x88, 0x03, 0x1c, 0xc2, 0x4b, 0x7c, 0xb2, 0x11, 0xbd, 0x83, 0xf3, 0xa4, 0x98, 0x8e, 0xb9, 0x76, 0xd8, 0xc9, 0x7b, 0x8d, 0x21, 0x26,
+ /* (2^ 41)P */ 0x8a, 0x17, 0x7c, 0x99, 0x42, 0x15, 0x08, 0xe3, 0x6f, 0x60, 0xb6, 0x6f, 0xa8, 0x29, 0x2d, 0x3c, 0x74, 0x93, 0x27, 0xfa, 0x36, 0x77, 0x21, 0x5c, 0xfa, 0xb1, 0xfe, 0x4a, 0x73, 0x05, 0xde, 0x7d,
+ /* (2^ 42)P */ 0xab, 0x2b, 0xd4, 0x06, 0x39, 0x0e, 0xf1, 0x3b, 0x9c, 0x64, 0x80, 0x19, 0x3e, 0x80, 0xf7, 0xe4, 0x7a, 0xbf, 0x95, 0x95, 0xf8, 0x3b, 0x05, 0xe6, 0x30, 0x55, 0x24, 0xda, 0x38, 0xaf, 0x4f, 0x39,
+ /* (2^ 43)P */ 0xf4, 0x28, 0x69, 0x89, 0x58, 0xfb, 0x8e, 0x7a, 0x3c, 0x11, 0x6a, 0xcc, 0xe9, 0x78, 0xc7, 0xfb, 0x6f, 0x59, 0xaf, 0x30, 0xe3, 0x0c, 0x67, 0x72, 0xf7, 0x6c, 0x3d, 0x1d, 0xa8, 0x22, 0xf2, 0x48,
+ /* (2^ 44)P */ 0xa7, 0xca, 0x72, 0x0d, 0x41, 0xce, 0x1f, 0xf0, 0x95, 0x55, 0x3b, 0x21, 0xc7, 0xec, 0x20, 0x5a, 0x83, 0x14, 0xfa, 0xc1, 0x65, 0x11, 0xc2, 0x7b, 0x41, 0xa7, 0xa8, 0x1d, 0xe3, 0x9a, 0xf8, 0x07,
+ /* (2^ 45)P */ 0xf9, 0x0f, 0x83, 0xc6, 0xb4, 0xc2, 0xd2, 0x05, 0x93, 0x62, 0x31, 0xc6, 0x0f, 0x33, 0x3e, 0xd4, 0x04, 0xa9, 0xd3, 0x96, 0x0a, 0x59, 0xa5, 0xa5, 0xb6, 0x33, 0x53, 0xa6, 0x91, 0xdb, 0x5e, 0x70,
+ /* (2^ 46)P */ 0xf7, 0xa5, 0xb9, 0x0b, 0x5e, 0xe1, 0x8e, 0x04, 0x5d, 0xaf, 0x0a, 0x9e, 0xca, 0xcf, 0x40, 0x32, 0x0b, 0xa4, 0xc4, 0xed, 0xce, 0x71, 0x4b, 0x8f, 0x6d, 0x4a, 0x54, 0xde, 0xa3, 0x0d, 0x1c, 0x62,
+ /* (2^ 47)P */ 0x91, 0x40, 0x8c, 0xa0, 0x36, 0x28, 0x87, 0x92, 0x45, 0x14, 0xc9, 0x10, 0xb0, 0x75, 0x83, 0xce, 0x94, 0x63, 0x27, 0x4f, 0x52, 0xeb, 0x72, 0x8a, 0x35, 0x36, 0xc8, 0x7e, 0xfa, 0xfc, 0x67, 0x26,
+ /* (2^ 48)P */ 0x2a, 0x75, 0xe8, 0x45, 0x33, 0x17, 0x4c, 0x7f, 0xa5, 0x79, 0x70, 0xee, 0xfe, 0x47, 0x1b, 0x06, 0x34, 0xff, 0x86, 0x9f, 0xfa, 0x9a, 0xdd, 0x25, 0x9c, 0xc8, 0x5d, 0x42, 0xf5, 0xce, 0x80, 0x37,
+ /* (2^ 49)P */ 0xe9, 0xb4, 0x3b, 0x51, 0x5a, 0x03, 0x46, 0x1a, 0xda, 0x5a, 0x57, 0xac, 0x79, 0xf3, 0x1e, 0x3e, 0x50, 0x4b, 0xa2, 0x5f, 0x1c, 0x5f, 0x8c, 0xc7, 0x22, 0x9f, 0xfd, 0x34, 0x76, 0x96, 0x1a, 0x32,
+ /* (2^ 50)P */ 0xfa, 0x27, 0x6e, 0x82, 0xb8, 0x07, 0x67, 0x94, 0xd0, 0x6f, 0x50, 0x4c, 0xd6, 0x84, 0xca, 0x3d, 0x36, 0x14, 0xe9, 0x75, 0x80, 0x21, 0x89, 0xc1, 0x84, 0x84, 0x3b, 0x9b, 0x16, 0x84, 0x92, 0x6d,
+ /* (2^ 51)P */ 0xdf, 0x2d, 0x3f, 0x38, 0x40, 0xe8, 0x67, 0x3a, 0x75, 0x9b, 0x4f, 0x0c, 0xa3, 0xc9, 0xee, 0x33, 0x47, 0xef, 0x83, 0xa7, 0x6f, 0xc8, 0xc7, 0x3e, 0xc4, 0xfb, 0xc9, 0xba, 0x9f, 0x44, 0xec, 0x26,
+ /* (2^ 52)P */ 0x7d, 0x9e, 0x9b, 0xa0, 0xcb, 0x38, 0x0f, 0x5c, 0x8c, 0x47, 0xa3, 0x62, 0xc7, 0x8c, 0x16, 0x81, 0x1c, 0x12, 0xfc, 0x06, 0xd3, 0xb0, 0x23, 0x3e, 0xdd, 0xdc, 0xef, 0xa5, 0xa0, 0x8a, 0x23, 0x5a,
+ /* (2^ 53)P */ 0xff, 0x43, 0xea, 0xc4, 0x21, 0x61, 0xa2, 0x1b, 0xb5, 0x32, 0x88, 0x7c, 0x7f, 0xc7, 0xf8, 0x36, 0x9a, 0xf9, 0xdc, 0x0a, 0x0b, 0xea, 0xfb, 0x88, 0xf9, 0xeb, 0x5b, 0xc2, 0x8e, 0x93, 0xa9, 0x5c,
+ /* (2^ 54)P */ 0xa0, 0xcd, 0xfc, 0x51, 0x5e, 0x6a, 0x43, 0xd5, 0x3b, 0x89, 0xcd, 0xc2, 0x97, 0x47, 0xbc, 0x1d, 0x08, 0x4a, 0x22, 0xd3, 0x65, 0x6a, 0x34, 0x19, 0x66, 0xf4, 0x9a, 0x9b, 0xe4, 0x34, 0x50, 0x0f,
+ /* (2^ 55)P */ 0x6e, 0xb9, 0xe0, 0xa1, 0x67, 0x39, 0x3c, 0xf2, 0x88, 0x4d, 0x7a, 0x86, 0xfa, 0x08, 0x8b, 0xe5, 0x79, 0x16, 0x34, 0xa7, 0xc6, 0xab, 0x2f, 0xfb, 0x46, 0x69, 0x02, 0xb6, 0x1e, 0x38, 0x75, 0x2a,
+ /* (2^ 56)P */ 0xac, 0x20, 0x94, 0xc1, 0xe4, 0x3b, 0x0a, 0xc8, 0xdc, 0xb6, 0xf2, 0x81, 0xc6, 0xf6, 0xb1, 0x66, 0x88, 0x33, 0xe9, 0x61, 0x67, 0x03, 0xf7, 0x7c, 0xc4, 0xa4, 0x60, 0xa6, 0xd8, 0xbb, 0xab, 0x25,
+ /* (2^ 57)P */ 0x98, 0x51, 0xfd, 0x14, 0xba, 0x12, 0xea, 0x91, 0xa9, 0xff, 0x3c, 0x4a, 0xfc, 0x50, 0x49, 0x68, 0x28, 0xad, 0xf5, 0x30, 0x21, 0x84, 0x26, 0xf8, 0x41, 0xa4, 0x01, 0x53, 0xf7, 0x88, 0xa9, 0x3e,
+ /* (2^ 58)P */ 0x6f, 0x8c, 0x5f, 0x69, 0x9a, 0x10, 0x78, 0xc9, 0xf3, 0xc3, 0x30, 0x05, 0x4a, 0xeb, 0x46, 0x17, 0x95, 0x99, 0x45, 0xb4, 0x77, 0x6d, 0x4d, 0x44, 0xc7, 0x5c, 0x4e, 0x05, 0x8c, 0x2b, 0x95, 0x75,
+ /* (2^ 59)P */ 0xaa, 0xd6, 0xf4, 0x15, 0x79, 0x3f, 0x70, 0xa3, 0xd8, 0x47, 0x26, 0x2f, 0x20, 0x46, 0xc3, 0x66, 0x4b, 0x64, 0x1d, 0x81, 0xdf, 0x69, 0x14, 0xd0, 0x1f, 0xd7, 0xa5, 0x81, 0x7d, 0xa4, 0xfe, 0x77,
+ /* (2^ 60)P */ 0x81, 0xa3, 0x7c, 0xf5, 0x9e, 0x52, 0xe9, 0xc5, 0x1a, 0x88, 0x2f, 0xce, 0xb9, 0xb4, 0xee, 0x6e, 0xd6, 0x9b, 0x00, 0xe8, 0x28, 0x1a, 0xe9, 0xb6, 0xec, 0x3f, 0xfc, 0x9a, 0x3e, 0xbe, 0x80, 0x4b,
+ /* (2^ 61)P */ 0xc5, 0xd2, 0xae, 0x26, 0xc5, 0x73, 0x37, 0x7e, 0x9d, 0xa4, 0xc9, 0x53, 0xb4, 0xfc, 0x4a, 0x1b, 0x4d, 0xb2, 0xff, 0xba, 0xd7, 0xbd, 0x20, 0xa9, 0x0e, 0x40, 0x2d, 0x12, 0x9f, 0x69, 0x54, 0x7c,
+ /* (2^ 62)P */ 0xc8, 0x4b, 0xa9, 0x4f, 0xe1, 0xc8, 0x46, 0xef, 0x5e, 0xed, 0x52, 0x29, 0xce, 0x74, 0xb0, 0xe0, 0xd5, 0x85, 0xd8, 0xdb, 0xe1, 0x50, 0xa4, 0xbe, 0x2c, 0x71, 0x0f, 0x32, 0x49, 0x86, 0xb6, 0x61,
+ /* (2^ 63)P */ 0xd1, 0xbd, 0xcc, 0x09, 0x73, 0x5f, 0x48, 0x8a, 0x2d, 0x1a, 0x4d, 0x7d, 0x0d, 0x32, 0x06, 0xbd, 0xf4, 0xbe, 0x2d, 0x32, 0x73, 0x29, 0x23, 0x25, 0x70, 0xf7, 0x17, 0x8c, 0x75, 0xc4, 0x5d, 0x44,
+ /* (2^ 64)P */ 0x3c, 0x93, 0xc8, 0x7c, 0x17, 0x34, 0x04, 0xdb, 0x9f, 0x05, 0xea, 0x75, 0x21, 0xe8, 0x6f, 0xed, 0x34, 0xdb, 0x53, 0xc0, 0xfd, 0xbe, 0xfe, 0x1e, 0x99, 0xaf, 0x5d, 0xc6, 0x67, 0xe8, 0xdb, 0x4a,
+ /* (2^ 65)P */ 0xdf, 0x09, 0x06, 0xa9, 0xa2, 0x71, 0xcd, 0x3a, 0x50, 0x40, 0xd0, 0x6d, 0x85, 0x91, 0xe9, 0xe5, 0x3c, 0xc2, 0x57, 0x81, 0x68, 0x9b, 0xc6, 0x1e, 0x4d, 0xfe, 0x5c, 0x88, 0xf6, 0x27, 0x74, 0x69,
+ /* (2^ 66)P */ 0x51, 0xa8, 0xe1, 0x65, 0x9b, 0x7b, 0xbe, 0xd7, 0xdd, 0x36, 0xc5, 0x22, 0xd5, 0x28, 0x3d, 0xa0, 0x45, 0xb6, 0xd2, 0x8f, 0x65, 0x9d, 0x39, 0x28, 0xe1, 0x41, 0x26, 0x7c, 0xe1, 0xb7, 0xe5, 0x49,
+ /* (2^ 67)P */ 0xa4, 0x57, 0x04, 0x70, 0x98, 0x3a, 0x8c, 0x6f, 0x78, 0x67, 0xbb, 0x5e, 0xa2, 0xf0, 0x78, 0x50, 0x0f, 0x96, 0x82, 0xc3, 0xcb, 0x3c, 0x3c, 0xd1, 0xb1, 0x84, 0xdf, 0xa7, 0x58, 0x32, 0x00, 0x2e,
+ /* (2^ 68)P */ 0x1c, 0x6a, 0x29, 0xe6, 0x9b, 0xf3, 0xd1, 0x8a, 0xb2, 0xbf, 0x5f, 0x2a, 0x65, 0xaa, 0xee, 0xc1, 0xcb, 0xf3, 0x26, 0xfd, 0x73, 0x06, 0xee, 0x33, 0xcc, 0x2c, 0x9d, 0xa6, 0x73, 0x61, 0x25, 0x59,
+ /* (2^ 69)P */ 0x41, 0xfc, 0x18, 0x4e, 0xaa, 0x07, 0xea, 0x41, 0x1e, 0xa5, 0x87, 0x7c, 0x52, 0x19, 0xfc, 0xd9, 0x6f, 0xca, 0x31, 0x58, 0x80, 0xcb, 0xaa, 0xbd, 0x4f, 0x69, 0x16, 0xc9, 0x2d, 0x65, 0x5b, 0x44,
+ /* (2^ 70)P */ 0x15, 0x23, 0x17, 0xf2, 0xa7, 0xa3, 0x92, 0xce, 0x64, 0x99, 0x1b, 0xe1, 0x2d, 0x28, 0xdc, 0x1e, 0x4a, 0x31, 0x4c, 0xe0, 0xaf, 0x3a, 0x82, 0xa1, 0x86, 0xf5, 0x7c, 0x43, 0x94, 0x2d, 0x0a, 0x79,
+ /* (2^ 71)P */ 0x09, 0xe0, 0xf6, 0x93, 0xfb, 0x47, 0xc4, 0x71, 0x76, 0x52, 0x84, 0x22, 0x67, 0xa5, 0x22, 0x89, 0x69, 0x51, 0x4f, 0x20, 0x3b, 0x90, 0x70, 0xbf, 0xfe, 0x19, 0xa3, 0x1b, 0x89, 0x89, 0x7a, 0x2f,
+ /* (2^ 72)P */ 0x0c, 0x14, 0xe2, 0x77, 0xb5, 0x8e, 0xa0, 0x02, 0xf4, 0xdc, 0x7b, 0x42, 0xd4, 0x4e, 0x9a, 0xed, 0xd1, 0x3c, 0x32, 0xe4, 0x44, 0xec, 0x53, 0x52, 0x5b, 0x35, 0xe9, 0x14, 0x3c, 0x36, 0x88, 0x3e,
+ /* (2^ 73)P */ 0x8c, 0x0b, 0x11, 0x77, 0x42, 0xc1, 0x66, 0xaa, 0x90, 0x33, 0xa2, 0x10, 0x16, 0x39, 0xe0, 0x1a, 0xa2, 0xc2, 0x3f, 0xc9, 0x12, 0xbd, 0x30, 0x20, 0xab, 0xc7, 0x55, 0x95, 0x57, 0x41, 0xe1, 0x3e,
+ /* (2^ 74)P */ 0x41, 0x7d, 0x6e, 0x6d, 0x3a, 0xde, 0x14, 0x92, 0xfe, 0x7e, 0xf1, 0x07, 0x86, 0xd8, 0xcd, 0x3c, 0x17, 0x12, 0xe1, 0xf8, 0x88, 0x12, 0x4f, 0x67, 0xd0, 0x93, 0x9f, 0x32, 0x0f, 0x25, 0x82, 0x56,
+ /* (2^ 75)P */ 0x6e, 0x39, 0x2e, 0x6d, 0x13, 0x0b, 0xf0, 0x6c, 0xbf, 0xde, 0x14, 0x10, 0x6f, 0xf8, 0x4c, 0x6e, 0x83, 0x4e, 0xcc, 0xbf, 0xb5, 0xb1, 0x30, 0x59, 0xb6, 0x16, 0xba, 0x8a, 0xb4, 0x69, 0x70, 0x04,
+ /* (2^ 76)P */ 0x93, 0x07, 0xb2, 0x69, 0xab, 0xe4, 0x4c, 0x0d, 0x9e, 0xfb, 0xd0, 0x97, 0x1a, 0xb9, 0x4d, 0xb2, 0x1d, 0xd0, 0x00, 0x4e, 0xf5, 0x50, 0xfa, 0xcd, 0xb5, 0xdd, 0x8b, 0x36, 0x85, 0x10, 0x1b, 0x22,
+ /* (2^ 77)P */ 0xd2, 0xd8, 0xe3, 0xb1, 0x68, 0x94, 0xe5, 0xe7, 0x93, 0x2f, 0x12, 0xbd, 0x63, 0x65, 0xc5, 0x53, 0x09, 0x3f, 0x66, 0xe0, 0x03, 0xa9, 0xe8, 0xee, 0x42, 0x3d, 0xbe, 0xcb, 0x62, 0xa6, 0xef, 0x61,
+ /* (2^ 78)P */ 0x2a, 0xab, 0x6e, 0xde, 0xdd, 0xdd, 0xf8, 0x2c, 0x31, 0xf2, 0x35, 0x14, 0xd5, 0x0a, 0xf8, 0x9b, 0x73, 0x49, 0xf0, 0xc9, 0xce, 0xda, 0xea, 0x5d, 0x27, 0x9b, 0xd2, 0x41, 0x5d, 0x5b, 0x27, 0x29,
+ /* (2^ 79)P */ 0x4f, 0xf1, 0xeb, 0x95, 0x08, 0x0f, 0xde, 0xcf, 0xa7, 0x05, 0x49, 0x05, 0x6b, 0xb9, 0xaa, 0xb9, 0xfd, 0x20, 0xc4, 0xa1, 0xd9, 0x0d, 0xe8, 0xca, 0xc7, 0xbb, 0x73, 0x16, 0x2f, 0xbf, 0x63, 0x0a,
+ /* (2^ 80)P */ 0x8c, 0xbc, 0x8f, 0x95, 0x11, 0x6e, 0x2f, 0x09, 0xad, 0x2f, 0x82, 0x04, 0xe8, 0x81, 0x2a, 0x67, 0x17, 0x25, 0xd5, 0x60, 0x15, 0x35, 0xc8, 0xca, 0xf8, 0x92, 0xf1, 0xc8, 0x22, 0x77, 0x3f, 0x6f,
+ /* (2^ 81)P */ 0xb7, 0x94, 0xe8, 0xc2, 0xcc, 0x90, 0xba, 0xf8, 0x0d, 0x9f, 0xff, 0x38, 0xa4, 0x57, 0x75, 0x2c, 0x59, 0x23, 0xe5, 0x5a, 0x85, 0x1d, 0x4d, 0x89, 0x69, 0x3d, 0x74, 0x7b, 0x15, 0x22, 0xe1, 0x68,
+ /* (2^ 82)P */ 0xf3, 0x19, 0xb9, 0xcf, 0x70, 0x55, 0x7e, 0xd8, 0xb9, 0x8d, 0x79, 0x95, 0xcd, 0xde, 0x2c, 0x3f, 0xce, 0xa2, 0xc0, 0x10, 0x47, 0x15, 0x21, 0x21, 0xb2, 0xc5, 0x6d, 0x24, 0x15, 0xa1, 0x66, 0x3c,
+ /* (2^ 83)P */ 0x72, 0xcb, 0x4e, 0x29, 0x62, 0xc5, 0xed, 0xcb, 0x16, 0x0b, 0x28, 0x6a, 0xc3, 0x43, 0x71, 0xba, 0x67, 0x8b, 0x07, 0xd4, 0xef, 0xc2, 0x10, 0x96, 0x1e, 0x4b, 0x6a, 0x94, 0x5d, 0x73, 0x44, 0x61,
+ /* (2^ 84)P */ 0x50, 0x33, 0x5b, 0xd7, 0x1e, 0x11, 0x6f, 0x53, 0x1b, 0xd8, 0x41, 0x20, 0x8c, 0xdb, 0x11, 0x02, 0x3c, 0x41, 0x10, 0x0e, 0x00, 0xb1, 0x3c, 0xf9, 0x76, 0x88, 0x9e, 0x03, 0x3c, 0xfd, 0x9d, 0x14,
+ /* (2^ 85)P */ 0x5b, 0x15, 0x63, 0x6b, 0xe4, 0xdd, 0x79, 0xd4, 0x76, 0x79, 0x83, 0x3c, 0xe9, 0x15, 0x6e, 0xb6, 0x38, 0xe0, 0x13, 0x1f, 0x3b, 0xe4, 0xfd, 0xda, 0x35, 0x0b, 0x4b, 0x2e, 0x1a, 0xda, 0xaf, 0x5f,
+ /* (2^ 86)P */ 0x81, 0x75, 0x19, 0x17, 0xdf, 0xbb, 0x00, 0x36, 0xc2, 0xd2, 0x3c, 0xbe, 0x0b, 0x05, 0x72, 0x39, 0x86, 0xbe, 0xd5, 0xbd, 0x6d, 0x90, 0x38, 0x59, 0x0f, 0x86, 0x9b, 0x3f, 0xe4, 0xe5, 0xfc, 0x34,
+ /* (2^ 87)P */ 0x02, 0x4d, 0xd1, 0x42, 0xcd, 0xa4, 0xa8, 0x75, 0x65, 0xdf, 0x41, 0x34, 0xc5, 0xab, 0x8d, 0x82, 0xd3, 0x31, 0xe1, 0xd2, 0xed, 0xab, 0xdc, 0x33, 0x5f, 0xd2, 0x14, 0xb8, 0x6f, 0xd7, 0xba, 0x3e,
+ /* (2^ 88)P */ 0x0f, 0xe1, 0x70, 0x6f, 0x56, 0x6f, 0x90, 0xd4, 0x5a, 0x0f, 0x69, 0x51, 0xaa, 0xf7, 0x12, 0x5d, 0xf2, 0xfc, 0xce, 0x76, 0x6e, 0xb1, 0xad, 0x45, 0x99, 0x29, 0x23, 0xad, 0xae, 0x68, 0xf7, 0x01,
+ /* (2^ 89)P */ 0xbd, 0xfe, 0x48, 0x62, 0x7b, 0xc7, 0x6c, 0x2b, 0xfd, 0xaf, 0x3a, 0xec, 0x28, 0x06, 0xd3, 0x3c, 0x6a, 0x48, 0xef, 0xd4, 0x80, 0x0b, 0x1c, 0xce, 0x23, 0x6c, 0xf6, 0xa6, 0x2e, 0xff, 0x3b, 0x4c,
+ /* (2^ 90)P */ 0x5f, 0xeb, 0xea, 0x4a, 0x09, 0xc4, 0x2e, 0x3f, 0xa7, 0x2c, 0x37, 0x6e, 0x28, 0x9b, 0xb1, 0x61, 0x1d, 0x70, 0x2a, 0xde, 0x66, 0xa9, 0xef, 0x5e, 0xef, 0xe3, 0x55, 0xde, 0x65, 0x05, 0xb2, 0x23,
+ /* (2^ 91)P */ 0x57, 0x85, 0xd5, 0x79, 0x52, 0xca, 0x01, 0xe3, 0x4f, 0x87, 0xc2, 0x27, 0xce, 0xd4, 0xb2, 0x07, 0x67, 0x1d, 0xcf, 0x9d, 0x8a, 0xcd, 0x32, 0xa5, 0x56, 0xff, 0x2b, 0x3f, 0xe2, 0xfe, 0x52, 0x2a,
+ /* (2^ 92)P */ 0x3d, 0x66, 0xd8, 0x7c, 0xb3, 0xef, 0x24, 0x86, 0x94, 0x75, 0xbd, 0xff, 0x20, 0xac, 0xc7, 0xbb, 0x45, 0x74, 0xd3, 0x82, 0x9c, 0x5e, 0xb8, 0x57, 0x66, 0xec, 0xa6, 0x86, 0xcb, 0x52, 0x30, 0x7b,
+ /* (2^ 93)P */ 0x1e, 0xe9, 0x25, 0x25, 0xad, 0xf0, 0x82, 0x34, 0xa0, 0xdc, 0x8e, 0xd2, 0x43, 0x80, 0xb6, 0x2c, 0x3a, 0x00, 0x1b, 0x2e, 0x05, 0x6d, 0x4f, 0xaf, 0x0a, 0x1b, 0x78, 0x29, 0x25, 0x8c, 0x5f, 0x18,
+ /* (2^ 94)P */ 0xd6, 0xe0, 0x0c, 0xd8, 0x5b, 0xde, 0x41, 0xaa, 0xd6, 0xe9, 0x53, 0x68, 0x41, 0xb2, 0x07, 0x94, 0x3a, 0x4c, 0x7f, 0x35, 0x6e, 0xc3, 0x3e, 0x56, 0xce, 0x7b, 0x29, 0x0e, 0xdd, 0xb8, 0xc4, 0x4c,
+ /* (2^ 95)P */ 0x0e, 0x73, 0xb8, 0xff, 0x52, 0x1a, 0xfc, 0xa2, 0x37, 0x8e, 0x05, 0x67, 0x6e, 0xf1, 0x11, 0x18, 0xe1, 0x4e, 0xdf, 0xcd, 0x66, 0xa3, 0xf9, 0x10, 0x99, 0xf0, 0xb9, 0xa0, 0xc4, 0xa0, 0xf4, 0x72,
+ /* (2^ 96)P */ 0xa7, 0x4e, 0x3f, 0x66, 0x6f, 0xc0, 0x16, 0x8c, 0xba, 0x0f, 0x97, 0x4e, 0xf7, 0x3a, 0x3b, 0x69, 0x45, 0xc3, 0x9e, 0xd6, 0xf1, 0xe7, 0x02, 0x21, 0x89, 0x80, 0x8a, 0x96, 0xbc, 0x3c, 0xa5, 0x0b,
+ /* (2^ 97)P */ 0x37, 0x55, 0xa1, 0xfe, 0xc7, 0x9d, 0x3d, 0xca, 0x93, 0x64, 0x53, 0x51, 0xbb, 0x24, 0x68, 0x4c, 0xb1, 0x06, 0x40, 0x84, 0x14, 0x63, 0x88, 0xb9, 0x60, 0xcc, 0x54, 0xb4, 0x2a, 0xa7, 0xd2, 0x40,
+ /* (2^ 98)P */ 0x75, 0x09, 0x57, 0x12, 0xb7, 0xa1, 0x36, 0x59, 0x57, 0xa6, 0xbd, 0xde, 0x48, 0xd6, 0xb9, 0x91, 0xea, 0x30, 0x43, 0xb6, 0x4b, 0x09, 0x44, 0x33, 0xd0, 0x51, 0xee, 0x12, 0x0d, 0xa1, 0x6b, 0x00,
+ /* (2^ 99)P */ 0x58, 0x5d, 0xde, 0xf5, 0x68, 0x84, 0x22, 0x19, 0xb0, 0x05, 0xcc, 0x38, 0x4c, 0x2f, 0xb1, 0x0e, 0x90, 0x19, 0x60, 0xd5, 0x9d, 0x9f, 0x03, 0xa1, 0x0b, 0x0e, 0xff, 0x4f, 0xce, 0xd4, 0x02, 0x45,
+ /* (2^100)P */ 0x89, 0xc1, 0x37, 0x68, 0x10, 0x54, 0x20, 0xeb, 0x3c, 0xb9, 0xd3, 0x6d, 0x4c, 0x54, 0xf6, 0xd0, 0x4f, 0xd7, 0x16, 0xc4, 0x64, 0x70, 0x72, 0x40, 0xf0, 0x2e, 0x50, 0x4b, 0x11, 0xc6, 0x15, 0x6e,
+ /* (2^101)P */ 0x6b, 0xa7, 0xb1, 0xcf, 0x98, 0xa3, 0xf2, 0x4d, 0xb1, 0xf6, 0xf2, 0x19, 0x74, 0x6c, 0x25, 0x11, 0x43, 0x60, 0x6e, 0x06, 0x62, 0x79, 0x49, 0x4a, 0x44, 0x5b, 0x35, 0x41, 0xab, 0x3a, 0x5b, 0x70,
+ /* (2^102)P */ 0xd8, 0xb1, 0x97, 0xd7, 0x36, 0xf5, 0x5e, 0x36, 0xdb, 0xf0, 0xdd, 0x22, 0xd6, 0x6b, 0x07, 0x00, 0x88, 0x5a, 0x57, 0xe0, 0xb0, 0x33, 0xbf, 0x3b, 0x4d, 0xca, 0xe4, 0xc8, 0x05, 0xaa, 0x77, 0x37,
+ /* (2^103)P */ 0x5f, 0xdb, 0x78, 0x55, 0xc8, 0x45, 0x27, 0x39, 0xe2, 0x5a, 0xae, 0xdb, 0x49, 0x41, 0xda, 0x6f, 0x67, 0x98, 0xdc, 0x8a, 0x0b, 0xb0, 0xf0, 0xb1, 0xa3, 0x1d, 0x6f, 0xd3, 0x37, 0x34, 0x96, 0x09,
+ /* (2^104)P */ 0x53, 0x38, 0xdc, 0xa5, 0x90, 0x4e, 0x82, 0x7e, 0xbd, 0x5c, 0x13, 0x1f, 0x64, 0xf6, 0xb5, 0xcc, 0xcc, 0x8f, 0xce, 0x87, 0x6c, 0xd8, 0x36, 0x67, 0x9f, 0x24, 0x04, 0x66, 0xe2, 0x3c, 0x5f, 0x62,
+ /* (2^105)P */ 0x3f, 0xf6, 0x02, 0x95, 0x05, 0xc8, 0x8a, 0xaf, 0x69, 0x14, 0x35, 0x2e, 0x0a, 0xe7, 0x05, 0x0c, 0x05, 0x63, 0x4b, 0x76, 0x9c, 0x2e, 0x29, 0x35, 0xc3, 0x3a, 0xe2, 0xc7, 0x60, 0x43, 0x39, 0x1a,
+ /* (2^106)P */ 0x64, 0x32, 0x18, 0x51, 0x32, 0xd5, 0xc6, 0xd5, 0x4f, 0xb7, 0xc2, 0x43, 0xbd, 0x5a, 0x06, 0x62, 0x9b, 0x3f, 0x97, 0x3b, 0xd0, 0xf5, 0xfb, 0xb5, 0x5e, 0x6e, 0x20, 0x61, 0x36, 0xda, 0xa3, 0x13,
+ /* (2^107)P */ 0xe5, 0x94, 0x5d, 0x72, 0x37, 0x58, 0xbd, 0xc6, 0xc5, 0x16, 0x50, 0x20, 0x12, 0x09, 0xe3, 0x18, 0x68, 0x3c, 0x03, 0x70, 0x15, 0xce, 0x88, 0x20, 0x87, 0x79, 0x83, 0x5c, 0x49, 0x1f, 0xba, 0x7f,
+ /* (2^108)P */ 0x9d, 0x07, 0xf9, 0xf2, 0x23, 0x74, 0x8c, 0x5a, 0xc5, 0x3f, 0x02, 0x34, 0x7b, 0x15, 0x35, 0x17, 0x51, 0xb3, 0xfa, 0xd2, 0x9a, 0xb4, 0xf9, 0xe4, 0x3c, 0xe3, 0x78, 0xc8, 0x72, 0xff, 0x91, 0x66,
+ /* (2^109)P */ 0x3e, 0xff, 0x5e, 0xdc, 0xde, 0x2a, 0x2c, 0x12, 0xf4, 0x6c, 0x95, 0xd8, 0xf1, 0x4b, 0xdd, 0xf8, 0xda, 0x5b, 0x9e, 0x9e, 0x5d, 0x20, 0x86, 0xeb, 0x43, 0xc7, 0x75, 0xd9, 0xb9, 0x92, 0x9b, 0x04,
+ /* (2^110)P */ 0x5a, 0xc0, 0xf6, 0xb0, 0x30, 0x97, 0x37, 0xa5, 0x53, 0xa5, 0xf3, 0xc6, 0xac, 0xff, 0xa0, 0x72, 0x6d, 0xcd, 0x0d, 0xb2, 0x34, 0x2c, 0x03, 0xb0, 0x4a, 0x16, 0xd5, 0x88, 0xbc, 0x9d, 0x0e, 0x47,
+ /* (2^111)P */ 0x47, 0xc0, 0x37, 0xa2, 0x0c, 0xf1, 0x9c, 0xb1, 0xa2, 0x81, 0x6c, 0x1f, 0x71, 0x66, 0x54, 0xb6, 0x43, 0x0b, 0xd8, 0x6d, 0xd1, 0x1b, 0x32, 0xb3, 0x8e, 0xbe, 0x5f, 0x0c, 0x60, 0x4f, 0xc1, 0x48,
+ /* (2^112)P */ 0x03, 0xc8, 0xa6, 0x4a, 0x26, 0x1c, 0x45, 0x66, 0xa6, 0x7d, 0xfa, 0xa4, 0x04, 0x39, 0x6e, 0xb6, 0x95, 0x83, 0x12, 0xb3, 0xb0, 0x19, 0x5f, 0xd4, 0x10, 0xbc, 0xc9, 0xc3, 0x27, 0x26, 0x60, 0x31,
+ /* (2^113)P */ 0x0d, 0xe1, 0xe4, 0x32, 0x48, 0xdc, 0x20, 0x31, 0xf7, 0x17, 0xc7, 0x56, 0x67, 0xc4, 0x20, 0xeb, 0x94, 0x02, 0x28, 0x67, 0x3f, 0x2e, 0xf5, 0x00, 0x09, 0xc5, 0x30, 0x47, 0xc1, 0x4f, 0x6d, 0x56,
+ /* (2^114)P */ 0x06, 0x72, 0x83, 0xfd, 0x40, 0x5d, 0x3a, 0x7e, 0x7a, 0x54, 0x59, 0x71, 0xdc, 0x26, 0xe9, 0xc1, 0x95, 0x60, 0x8d, 0xa6, 0xfb, 0x30, 0x67, 0x21, 0xa7, 0xce, 0x69, 0x3f, 0x84, 0xc3, 0xe8, 0x22,
+ /* (2^115)P */ 0x2b, 0x4b, 0x0e, 0x93, 0xe8, 0x74, 0xd0, 0x33, 0x16, 0x58, 0xd1, 0x84, 0x0e, 0x35, 0xe4, 0xb6, 0x65, 0x23, 0xba, 0xd6, 0x6a, 0xc2, 0x34, 0x55, 0xf3, 0xf3, 0xf1, 0x89, 0x2f, 0xc1, 0x73, 0x77,
+ /* (2^116)P */ 0xaa, 0x62, 0x79, 0xa5, 0x4d, 0x40, 0xba, 0x8c, 0x56, 0xce, 0x99, 0x19, 0xa8, 0x97, 0x98, 0x5b, 0xfc, 0x92, 0x16, 0x12, 0x2f, 0x86, 0x8e, 0x50, 0x91, 0xc2, 0x93, 0xa0, 0x7f, 0x90, 0x81, 0x3a,
+ /* (2^117)P */ 0x10, 0xa5, 0x25, 0x47, 0xff, 0xd0, 0xde, 0x0d, 0x03, 0xc5, 0x3f, 0x67, 0x10, 0xcc, 0xd8, 0x10, 0x89, 0x4e, 0x1f, 0x9f, 0x1c, 0x15, 0x9d, 0x5b, 0x4c, 0xa4, 0x09, 0xcb, 0xd5, 0xc1, 0xa5, 0x32,
+ /* (2^118)P */ 0xfb, 0x41, 0x05, 0xb9, 0x42, 0xa4, 0x0a, 0x1e, 0xdb, 0x85, 0xb4, 0xc1, 0x7c, 0xeb, 0x85, 0x5f, 0xe5, 0xf2, 0x9d, 0x8a, 0xce, 0x95, 0xe5, 0xbe, 0x36, 0x22, 0x42, 0x22, 0xc7, 0x96, 0xe4, 0x25,
+ /* (2^119)P */ 0xb9, 0xe5, 0x0f, 0xcd, 0x46, 0x3c, 0xdf, 0x5e, 0x88, 0x33, 0xa4, 0xd2, 0x7e, 0x5a, 0xe7, 0x34, 0x52, 0xe3, 0x61, 0xd7, 0x11, 0xde, 0x88, 0xe4, 0x5c, 0x54, 0x85, 0xa0, 0x01, 0x8a, 0x87, 0x0e,
+ /* (2^120)P */ 0x04, 0xbb, 0x21, 0xe0, 0x77, 0x3c, 0x49, 0xba, 0x9a, 0x89, 0xdf, 0xc7, 0x43, 0x18, 0x4d, 0x2b, 0x67, 0x0d, 0xe8, 0x7a, 0x48, 0x7a, 0xa3, 0x9e, 0x94, 0x17, 0xe4, 0x11, 0x80, 0x95, 0xa9, 0x67,
+ /* (2^121)P */ 0x65, 0xb0, 0x97, 0x66, 0x1a, 0x05, 0x58, 0x4b, 0xd4, 0xa6, 0x6b, 0x8d, 0x7d, 0x3f, 0xe3, 0x47, 0xc1, 0x46, 0xca, 0x83, 0xd4, 0xa8, 0x4d, 0xbb, 0x0d, 0xdb, 0xc2, 0x81, 0xa1, 0xca, 0xbe, 0x68,
+ /* (2^122)P */ 0xa5, 0x9a, 0x98, 0x0b, 0xe9, 0x80, 0x89, 0x8d, 0x9b, 0xc9, 0x93, 0x2c, 0x4a, 0xb1, 0x5e, 0xf9, 0xa2, 0x73, 0x6e, 0x79, 0xc4, 0xc7, 0xc6, 0x51, 0x69, 0xb5, 0xef, 0xb5, 0x63, 0x83, 0x22, 0x6e,
+ /* (2^123)P */ 0xc8, 0x24, 0xd6, 0x2d, 0xb0, 0xc0, 0xbb, 0xc6, 0xee, 0x70, 0x81, 0xec, 0x7d, 0xb4, 0x7e, 0x77, 0xa9, 0xaf, 0xcf, 0x04, 0xa0, 0x15, 0xde, 0x3c, 0x9b, 0xbf, 0x60, 0x71, 0x08, 0xbc, 0xc6, 0x1d,
+ /* (2^124)P */ 0x02, 0x40, 0xc3, 0xee, 0x43, 0xe0, 0x07, 0x2e, 0x7f, 0xdc, 0x68, 0x7a, 0x67, 0xfc, 0xe9, 0x18, 0x9a, 0x5b, 0xd1, 0x8b, 0x18, 0x03, 0xda, 0xd8, 0x53, 0x82, 0x56, 0x00, 0xbb, 0xc3, 0xfb, 0x48,
+ /* (2^125)P */ 0xe1, 0x4c, 0x65, 0xfb, 0x4c, 0x7d, 0x54, 0x57, 0xad, 0xe2, 0x58, 0xa0, 0x82, 0x5b, 0x56, 0xd3, 0x78, 0x44, 0x15, 0xbf, 0x0b, 0xaf, 0x3e, 0xf6, 0x18, 0xbb, 0xdf, 0x14, 0xf1, 0x1e, 0x53, 0x47,
+ /* (2^126)P */ 0x87, 0xc5, 0x78, 0x42, 0x0a, 0x63, 0xec, 0xe1, 0xf3, 0x83, 0x8e, 0xca, 0x46, 0xd5, 0x07, 0x55, 0x2b, 0x0c, 0xdc, 0x3a, 0xc6, 0x35, 0xe1, 0x85, 0x4e, 0x84, 0x82, 0x56, 0xa8, 0xef, 0xa7, 0x0a,
+ /* (2^127)P */ 0x15, 0xf6, 0xe1, 0xb3, 0xa8, 0x1b, 0x69, 0x72, 0xfa, 0x3f, 0xbe, 0x1f, 0x70, 0xe9, 0xb4, 0x32, 0x68, 0x78, 0xbb, 0x39, 0x2e, 0xd9, 0xb6, 0x97, 0xe8, 0x39, 0x2e, 0xa0, 0xde, 0x53, 0xfe, 0x2c,
+ /* (2^128)P */ 0xb0, 0x52, 0xcd, 0x85, 0xcd, 0x92, 0x73, 0x68, 0x31, 0x98, 0xe2, 0x10, 0xc9, 0x66, 0xff, 0x27, 0x06, 0x2d, 0x83, 0xa9, 0x56, 0x45, 0x13, 0x97, 0xa0, 0xf8, 0x84, 0x0a, 0x36, 0xb0, 0x9b, 0x26,
+ /* (2^129)P */ 0x5c, 0xf8, 0x43, 0x76, 0x45, 0x55, 0x6e, 0x70, 0x1b, 0x7d, 0x59, 0x9b, 0x8c, 0xa4, 0x34, 0x37, 0x72, 0xa4, 0xef, 0xc6, 0xe8, 0x91, 0xee, 0x7a, 0xe0, 0xd9, 0xa9, 0x98, 0xc1, 0xab, 0xd6, 0x5c,
+ /* (2^130)P */ 0x1a, 0xe4, 0x3c, 0xcb, 0x06, 0xde, 0x04, 0x0e, 0x38, 0xe1, 0x02, 0x34, 0x89, 0xeb, 0xc6, 0xd8, 0x72, 0x37, 0x6e, 0x68, 0xbb, 0x59, 0x46, 0x90, 0xc8, 0xa8, 0x6b, 0x74, 0x71, 0xc3, 0x15, 0x72,
+ /* (2^131)P */ 0xd9, 0xa2, 0xe4, 0xea, 0x7e, 0xa9, 0x12, 0xfd, 0xc5, 0xf2, 0x94, 0x63, 0x51, 0xb7, 0x14, 0x95, 0x94, 0xf2, 0x08, 0x92, 0x80, 0xd5, 0x6f, 0x26, 0xb9, 0x26, 0x9a, 0x61, 0x85, 0x70, 0x84, 0x5c,
+ /* (2^132)P */ 0xea, 0x94, 0xd6, 0xfe, 0x10, 0x54, 0x98, 0x52, 0x54, 0xd2, 0x2e, 0x4a, 0x93, 0x5b, 0x90, 0x3c, 0x67, 0xe4, 0x3b, 0x2d, 0x69, 0x47, 0xbb, 0x10, 0xe1, 0xe9, 0xe5, 0x69, 0x2d, 0x3d, 0x3b, 0x06,
+ /* (2^133)P */ 0xeb, 0x7d, 0xa5, 0xdd, 0xee, 0x26, 0x27, 0x47, 0x91, 0x18, 0xf4, 0x10, 0xae, 0xc4, 0xb6, 0xef, 0x14, 0x76, 0x30, 0x7b, 0x91, 0x41, 0x16, 0x2b, 0x7c, 0x5b, 0xf4, 0xc4, 0x4f, 0x55, 0x7c, 0x11,
+ /* (2^134)P */ 0x12, 0x88, 0x9d, 0x8f, 0x11, 0xf3, 0x7c, 0xc0, 0x39, 0x79, 0x01, 0x50, 0x20, 0xd8, 0xdb, 0x01, 0x27, 0x28, 0x1b, 0x17, 0xf4, 0x03, 0xe8, 0xd7, 0xea, 0x25, 0xd2, 0x87, 0x74, 0xe8, 0x15, 0x10,
+ /* (2^135)P */ 0x4d, 0xcc, 0x3a, 0xd2, 0xfe, 0xe3, 0x8d, 0xc5, 0x2d, 0xbe, 0xa7, 0x94, 0xc2, 0x91, 0xdb, 0x50, 0x57, 0xf4, 0x9c, 0x1c, 0x3d, 0xd4, 0x94, 0x0b, 0x4a, 0x52, 0x37, 0x6e, 0xfa, 0x40, 0x16, 0x6b,
+ /* (2^136)P */ 0x09, 0x0d, 0xda, 0x5f, 0x6c, 0x34, 0x2f, 0x69, 0x51, 0x31, 0x4d, 0xfa, 0x59, 0x1c, 0x0b, 0x20, 0x96, 0xa2, 0x77, 0x07, 0x76, 0x6f, 0xc4, 0xb8, 0xcf, 0xfb, 0xfd, 0x3f, 0x5f, 0x39, 0x38, 0x4b,
+ /* (2^137)P */ 0x71, 0xd6, 0x54, 0xbe, 0x00, 0x5e, 0xd2, 0x18, 0xa6, 0xab, 0xc8, 0xbe, 0x82, 0x05, 0xd5, 0x60, 0x82, 0xb9, 0x78, 0x3b, 0x26, 0x8f, 0xad, 0x87, 0x32, 0x04, 0xda, 0x9c, 0x4e, 0xf6, 0xfd, 0x50,
+ /* (2^138)P */ 0xf0, 0xdc, 0x78, 0xc5, 0xaa, 0x67, 0xf5, 0x90, 0x3b, 0x13, 0xa3, 0xf2, 0x0e, 0x9b, 0x1e, 0xef, 0x71, 0xde, 0xd9, 0x42, 0x92, 0xba, 0xeb, 0x0e, 0xc7, 0x01, 0x31, 0xf0, 0x9b, 0x3c, 0x47, 0x15,
+ /* (2^139)P */ 0x95, 0x80, 0xb7, 0x56, 0xae, 0xe8, 0x77, 0x7c, 0x8e, 0x07, 0x6f, 0x6e, 0x66, 0xe7, 0x78, 0xb6, 0x1f, 0xba, 0x48, 0x53, 0x61, 0xb9, 0xa0, 0x2d, 0x0b, 0x3f, 0x73, 0xff, 0xc1, 0x31, 0xf9, 0x7c,
+ /* (2^140)P */ 0x6c, 0x36, 0x0a, 0x0a, 0xf5, 0x57, 0xb3, 0x26, 0x32, 0xd7, 0x87, 0x2b, 0xf4, 0x8c, 0x70, 0xe9, 0xc0, 0xb2, 0x1c, 0xf9, 0xa5, 0xee, 0x3a, 0xc1, 0x4c, 0xbb, 0x43, 0x11, 0x99, 0x0c, 0xd9, 0x35,
+ /* (2^141)P */ 0xdc, 0xd9, 0xa0, 0xa9, 0x04, 0xc4, 0xc1, 0x47, 0x51, 0xd2, 0x72, 0x19, 0x45, 0x58, 0x9e, 0x65, 0x31, 0x8c, 0xb3, 0x73, 0xc4, 0xa8, 0x75, 0x38, 0x24, 0x1f, 0x56, 0x79, 0xd3, 0x9e, 0xbd, 0x1f,
+ /* (2^142)P */ 0x8d, 0xc2, 0x1e, 0xd4, 0x6f, 0xbc, 0xfa, 0x11, 0xca, 0x2d, 0x2a, 0xcd, 0xe3, 0xdf, 0xf8, 0x7e, 0x95, 0x45, 0x40, 0x8c, 0x5d, 0x3b, 0xe7, 0x72, 0x27, 0x2f, 0xb7, 0x54, 0x49, 0xfa, 0x35, 0x61,
+ /* (2^143)P */ 0x9c, 0xb6, 0x24, 0xde, 0xa2, 0x32, 0xfc, 0xcc, 0x88, 0x5d, 0x09, 0x1f, 0x8c, 0x69, 0x55, 0x3f, 0x29, 0xf9, 0xc3, 0x5a, 0xed, 0x50, 0x33, 0xbe, 0xeb, 0x7e, 0x47, 0xca, 0x06, 0xf8, 0x9b, 0x5e,
+ /* (2^144)P */ 0x68, 0x9f, 0x30, 0x3c, 0xb6, 0x8f, 0xce, 0xe9, 0xf4, 0xf9, 0xe1, 0x65, 0x35, 0xf6, 0x76, 0x53, 0xf1, 0x93, 0x63, 0x5a, 0xb3, 0xcf, 0xaf, 0xd1, 0x06, 0x35, 0x62, 0xe5, 0xed, 0xa1, 0x32, 0x66,
+ /* (2^145)P */ 0x4c, 0xed, 0x2d, 0x0c, 0x39, 0x6c, 0x7d, 0x0b, 0x1f, 0xcb, 0x04, 0xdf, 0x81, 0x32, 0xcb, 0x56, 0xc7, 0xc3, 0xec, 0x49, 0x12, 0x5a, 0x30, 0x66, 0x2a, 0xa7, 0x8c, 0xa3, 0x60, 0x8b, 0x58, 0x5d,
+ /* (2^146)P */ 0x2d, 0xf4, 0xe5, 0xe8, 0x78, 0xbf, 0xec, 0xa6, 0xec, 0x3e, 0x8a, 0x3c, 0x4b, 0xb4, 0xee, 0x86, 0x04, 0x16, 0xd2, 0xfb, 0x48, 0x9c, 0x21, 0xec, 0x31, 0x67, 0xc3, 0x17, 0xf5, 0x1a, 0xaf, 0x1a,
+ /* (2^147)P */ 0xe7, 0xbd, 0x69, 0x67, 0x83, 0xa2, 0x06, 0xc3, 0xdb, 0x2a, 0x1e, 0x2b, 0x62, 0x80, 0x82, 0x20, 0xa6, 0x94, 0xff, 0xfb, 0x1f, 0xf5, 0x27, 0x80, 0x6b, 0xf2, 0x24, 0x11, 0xce, 0xa1, 0xcf, 0x76,
+ /* (2^148)P */ 0xb6, 0xab, 0x22, 0x24, 0x56, 0x00, 0xeb, 0x18, 0xc3, 0x29, 0x8c, 0x8f, 0xd5, 0xc4, 0x77, 0xf3, 0x1a, 0x56, 0x31, 0xf5, 0x07, 0xc2, 0xbb, 0x4d, 0x27, 0x8a, 0x12, 0x82, 0xf0, 0xb7, 0x53, 0x02,
+ /* (2^149)P */ 0xe0, 0x17, 0x2c, 0xb6, 0x1c, 0x09, 0x1f, 0x3d, 0xa9, 0x28, 0x46, 0xd6, 0xab, 0xe1, 0x60, 0x48, 0x53, 0x42, 0x9d, 0x30, 0x36, 0x74, 0xd1, 0x52, 0x76, 0xe5, 0xfa, 0x3e, 0xe1, 0x97, 0x6f, 0x35,
+ /* (2^150)P */ 0x5b, 0x53, 0x50, 0xa1, 0x1a, 0xe1, 0x51, 0xd3, 0xcc, 0x78, 0xd8, 0x1d, 0xbb, 0x45, 0x6b, 0x3e, 0x98, 0x2c, 0xd9, 0xbe, 0x28, 0x61, 0x77, 0x0c, 0xb8, 0x85, 0x28, 0x03, 0x93, 0xae, 0x34, 0x1d,
+ /* (2^151)P */ 0xc3, 0xa4, 0x5b, 0xa8, 0x8c, 0x48, 0xa0, 0x4b, 0xce, 0xe6, 0x9c, 0x3c, 0xc3, 0x48, 0x53, 0x98, 0x70, 0xa7, 0xbd, 0x97, 0x6f, 0x4c, 0x12, 0x66, 0x4a, 0x12, 0x54, 0x06, 0x29, 0xa0, 0x81, 0x0f,
+ /* (2^152)P */ 0xfd, 0x86, 0x9b, 0x56, 0xa6, 0x9c, 0xd0, 0x9e, 0x2d, 0x9a, 0xaf, 0x18, 0xfd, 0x09, 0x10, 0x81, 0x0a, 0xc2, 0xd8, 0x93, 0x3f, 0xd0, 0x08, 0xff, 0x6b, 0xf2, 0xae, 0x9f, 0x19, 0x48, 0xa1, 0x52,
+ /* (2^153)P */ 0x73, 0x1b, 0x8d, 0x2d, 0xdc, 0xf9, 0x03, 0x3e, 0x70, 0x1a, 0x96, 0x73, 0x18, 0x80, 0x05, 0x42, 0x70, 0x59, 0xa3, 0x41, 0xf0, 0x87, 0xd9, 0xc0, 0x49, 0xd5, 0xc0, 0xa1, 0x15, 0x1f, 0xaa, 0x07,
+ /* (2^154)P */ 0x24, 0x72, 0xd2, 0x8c, 0xe0, 0x6c, 0xd4, 0xdf, 0x39, 0x42, 0x4e, 0x93, 0x4f, 0x02, 0x0a, 0x6d, 0x59, 0x7b, 0x89, 0x99, 0x63, 0x7a, 0x8a, 0x80, 0xa2, 0x95, 0x3d, 0xe1, 0xe9, 0x56, 0x45, 0x0a,
+ /* (2^155)P */ 0x45, 0x30, 0xc1, 0xe9, 0x1f, 0x99, 0x1a, 0xd2, 0xb8, 0x51, 0x77, 0xfe, 0x48, 0x85, 0x0e, 0x9b, 0x35, 0x00, 0xf3, 0x4b, 0xcb, 0x43, 0xa6, 0x5d, 0x21, 0xf7, 0x40, 0x39, 0xd6, 0x28, 0xdb, 0x77,
+ /* (2^156)P */ 0x11, 0x90, 0xdc, 0x4a, 0x61, 0xeb, 0x5e, 0xfc, 0xeb, 0x11, 0xc4, 0xe8, 0x9a, 0x41, 0x29, 0x52, 0x74, 0xcf, 0x1d, 0x7d, 0x78, 0xe7, 0xc3, 0x9e, 0xb5, 0x4c, 0x6e, 0x21, 0x3e, 0x05, 0x0d, 0x34,
+ /* (2^157)P */ 0xb4, 0xf2, 0x8d, 0xb4, 0x39, 0xaf, 0xc7, 0xca, 0x94, 0x0a, 0xa1, 0x71, 0x28, 0xec, 0xfa, 0xc0, 0xed, 0x75, 0xa5, 0x5c, 0x24, 0x69, 0x0a, 0x14, 0x4c, 0x3a, 0x27, 0x34, 0x71, 0xc3, 0xf1, 0x0c,
+ /* (2^158)P */ 0xa5, 0xb8, 0x24, 0xc2, 0x6a, 0x30, 0xee, 0xc8, 0xb0, 0x30, 0x49, 0xcb, 0x7c, 0xee, 0xea, 0x57, 0x4f, 0xe7, 0xcb, 0xaa, 0xbd, 0x06, 0xe8, 0xa1, 0x7d, 0x65, 0xeb, 0x2e, 0x74, 0x62, 0x9a, 0x7d,
+ /* (2^159)P */ 0x30, 0x48, 0x6c, 0x54, 0xef, 0xb6, 0xb6, 0x9e, 0x2e, 0x6e, 0xb3, 0xdd, 0x1f, 0xca, 0x5c, 0x88, 0x05, 0x71, 0x0d, 0xef, 0x83, 0xf3, 0xb9, 0xe6, 0x12, 0x04, 0x2e, 0x9d, 0xef, 0x4f, 0x65, 0x58,
+ /* (2^160)P */ 0x26, 0x8e, 0x0e, 0xbe, 0xff, 0xc4, 0x05, 0xa9, 0x6e, 0x81, 0x31, 0x9b, 0xdf, 0xe5, 0x2d, 0x94, 0xe1, 0x88, 0x2e, 0x80, 0x3f, 0x72, 0x7d, 0x49, 0x8d, 0x40, 0x2f, 0x60, 0xea, 0x4d, 0x68, 0x30,
+ /* (2^161)P */ 0x34, 0xcb, 0xe6, 0xa3, 0x78, 0xa2, 0xe5, 0x21, 0xc4, 0x1d, 0x15, 0x5b, 0x6f, 0x6e, 0xfb, 0xae, 0x15, 0xca, 0x77, 0x9d, 0x04, 0x8e, 0x0b, 0xb3, 0x81, 0x89, 0xb9, 0x53, 0xcf, 0xc9, 0xc3, 0x28,
+ /* (2^162)P */ 0x2a, 0xdd, 0x6c, 0x55, 0x21, 0xb7, 0x7f, 0x28, 0x74, 0x22, 0x02, 0x97, 0xa8, 0x7c, 0x31, 0x0d, 0x58, 0x32, 0x54, 0x3a, 0x42, 0xc7, 0x68, 0x74, 0x2f, 0x64, 0xb5, 0x4e, 0x46, 0x11, 0x7f, 0x4a,
+ /* (2^163)P */ 0xa6, 0x3a, 0x19, 0x4d, 0x77, 0xa4, 0x37, 0xa2, 0xa1, 0x29, 0x21, 0xa9, 0x6e, 0x98, 0x65, 0xd8, 0x88, 0x1a, 0x7c, 0xf8, 0xec, 0x15, 0xc5, 0x24, 0xeb, 0xf5, 0x39, 0x5f, 0x57, 0x03, 0x40, 0x60,
+ /* (2^164)P */ 0x27, 0x9b, 0x0a, 0x57, 0x89, 0xf1, 0xb9, 0x47, 0x78, 0x4b, 0x5e, 0x46, 0xde, 0xce, 0x98, 0x2b, 0x20, 0x5c, 0xb8, 0xdb, 0x51, 0xf5, 0x6d, 0x02, 0x01, 0x19, 0xe2, 0x47, 0x10, 0xd9, 0xfc, 0x74,
+ /* (2^165)P */ 0xa3, 0xbf, 0xc1, 0x23, 0x0a, 0xa9, 0xe2, 0x13, 0xf6, 0x19, 0x85, 0x47, 0x4e, 0x07, 0xb0, 0x0c, 0x44, 0xcf, 0xf6, 0x3a, 0xbe, 0xcb, 0xf1, 0x5f, 0xbe, 0x2d, 0x81, 0xbe, 0x38, 0x54, 0xfe, 0x67,
+ /* (2^166)P */ 0xb0, 0x05, 0x0f, 0xa4, 0x4f, 0xf6, 0x3c, 0xd1, 0x87, 0x37, 0x28, 0x32, 0x2f, 0xfb, 0x4d, 0x05, 0xea, 0x2a, 0x0d, 0x7f, 0x5b, 0x91, 0x73, 0x41, 0x4e, 0x0d, 0x61, 0x1f, 0x4f, 0x14, 0x2f, 0x48,
+ /* (2^167)P */ 0x34, 0x82, 0x7f, 0xb4, 0x01, 0x02, 0x21, 0xf6, 0x90, 0xb9, 0x70, 0x9e, 0x92, 0xe1, 0x0a, 0x5d, 0x7c, 0x56, 0x49, 0xb0, 0x55, 0xf4, 0xd7, 0xdc, 0x01, 0x6f, 0x91, 0xf0, 0xf1, 0xd0, 0x93, 0x7e,
+ /* (2^168)P */ 0xfa, 0xb4, 0x7d, 0x8a, 0xf1, 0xcb, 0x79, 0xdd, 0x2f, 0xc6, 0x74, 0x6f, 0xbf, 0x91, 0x83, 0xbe, 0xbd, 0x91, 0x82, 0x4b, 0xd1, 0x45, 0x71, 0x02, 0x05, 0x17, 0xbf, 0x2c, 0xea, 0x73, 0x5a, 0x58,
+ /* (2^169)P */ 0xb2, 0x0d, 0x8a, 0x92, 0x3e, 0xa0, 0x5c, 0x48, 0xe7, 0x57, 0x28, 0x74, 0xa5, 0x01, 0xfc, 0x10, 0xa7, 0x51, 0xd5, 0xd6, 0xdb, 0x2e, 0x48, 0x2f, 0x8a, 0xdb, 0x8f, 0x04, 0xb5, 0x33, 0x04, 0x0f,
+ /* (2^170)P */ 0x47, 0x62, 0xdc, 0xd7, 0x8d, 0x2e, 0xda, 0x60, 0x9a, 0x81, 0xd4, 0x8c, 0xd3, 0xc9, 0xb4, 0x88, 0x97, 0x66, 0xf6, 0x01, 0xc0, 0x3a, 0x03, 0x13, 0x75, 0x7d, 0x36, 0x3b, 0xfe, 0x24, 0x3b, 0x27,
+ /* (2^171)P */ 0xd4, 0xb9, 0xb3, 0x31, 0x6a, 0xf6, 0xe8, 0xc6, 0xd5, 0x49, 0xdf, 0x94, 0xa4, 0x14, 0x15, 0x28, 0xa7, 0x3d, 0xb2, 0xc8, 0xdf, 0x6f, 0x72, 0xd1, 0x48, 0xe5, 0xde, 0x03, 0xd1, 0xe7, 0x3a, 0x4b,
+ /* (2^172)P */ 0x7e, 0x9d, 0x4b, 0xce, 0x19, 0x6e, 0x25, 0xc6, 0x1c, 0xc6, 0xe3, 0x86, 0xf1, 0x5c, 0x5c, 0xff, 0x45, 0xc1, 0x8e, 0x4b, 0xa3, 0x3c, 0xc6, 0xac, 0x74, 0x65, 0xe6, 0xfe, 0x88, 0x18, 0x62, 0x74,
+ /* (2^173)P */ 0x1e, 0x0a, 0x29, 0x45, 0x96, 0x40, 0x6f, 0x95, 0x2e, 0x96, 0x3a, 0x26, 0xe3, 0xf8, 0x0b, 0xef, 0x7b, 0x64, 0xc2, 0x5e, 0xeb, 0x50, 0x6a, 0xed, 0x02, 0x75, 0xca, 0x9d, 0x3a, 0x28, 0x94, 0x06,
+ /* (2^174)P */ 0xd1, 0xdc, 0xa2, 0x43, 0x36, 0x96, 0x9b, 0x76, 0x53, 0x53, 0xfc, 0x09, 0xea, 0xc8, 0xb7, 0x42, 0xab, 0x7e, 0x39, 0x13, 0xee, 0x2a, 0x00, 0x4f, 0x3a, 0xd6, 0xb7, 0x19, 0x2c, 0x5e, 0x00, 0x63,
+ /* (2^175)P */ 0xea, 0x3b, 0x02, 0x63, 0xda, 0x36, 0x67, 0xca, 0xb7, 0x99, 0x2a, 0xb1, 0x6d, 0x7f, 0x6c, 0x96, 0xe1, 0xc5, 0x37, 0xc5, 0x90, 0x93, 0xe0, 0xac, 0xee, 0x89, 0xaa, 0xa1, 0x63, 0x60, 0x69, 0x0b,
+ /* (2^176)P */ 0xe5, 0x56, 0x8c, 0x28, 0x97, 0x3e, 0xb0, 0xeb, 0xe8, 0x8b, 0x8c, 0x93, 0x9f, 0x9f, 0x2a, 0x43, 0x71, 0x7f, 0x71, 0x5b, 0x3d, 0xa9, 0xa5, 0xa6, 0x97, 0x9d, 0x8f, 0xe1, 0xc3, 0xb4, 0x5f, 0x1a,
+ /* (2^177)P */ 0xce, 0xcd, 0x60, 0x1c, 0xad, 0xe7, 0x94, 0x1c, 0xa0, 0xc4, 0x02, 0xfc, 0x43, 0x2a, 0x20, 0xee, 0x20, 0x6a, 0xc4, 0x67, 0xd8, 0xe4, 0xaf, 0x8d, 0x58, 0x7b, 0xc2, 0x8a, 0x3c, 0x26, 0x10, 0x0a,
+ /* (2^178)P */ 0x4a, 0x2a, 0x43, 0xe4, 0xdf, 0xa9, 0xde, 0xd0, 0xc5, 0x77, 0x92, 0xbe, 0x7b, 0xf8, 0x6a, 0x85, 0x1a, 0xc7, 0x12, 0xc2, 0xac, 0x72, 0x84, 0xce, 0x91, 0x1e, 0xbb, 0x9b, 0x6d, 0x1b, 0x15, 0x6f,
+ /* (2^179)P */ 0x6a, 0xd5, 0xee, 0x7c, 0x52, 0x6c, 0x77, 0x26, 0xec, 0xfa, 0xf8, 0xfb, 0xb7, 0x1c, 0x21, 0x7d, 0xcc, 0x09, 0x46, 0xfd, 0xa6, 0x66, 0xae, 0x37, 0x42, 0x0c, 0x77, 0xd2, 0x02, 0xb7, 0x81, 0x1f,
+ /* (2^180)P */ 0x92, 0x83, 0xc5, 0xea, 0x57, 0xb0, 0xb0, 0x2f, 0x9d, 0x4e, 0x74, 0x29, 0xfe, 0x89, 0xdd, 0xe1, 0xf8, 0xb4, 0xbe, 0x17, 0xeb, 0xf8, 0x64, 0xc9, 0x1e, 0xd4, 0xa2, 0xc9, 0x73, 0x10, 0x57, 0x29,
+ /* (2^181)P */ 0x54, 0xe2, 0xc0, 0x81, 0x89, 0xa1, 0x48, 0xa9, 0x30, 0x28, 0xb2, 0x65, 0x9b, 0x36, 0xf6, 0x2d, 0xc6, 0xd3, 0xcf, 0x5f, 0xd7, 0xb2, 0x3e, 0xa3, 0x1f, 0xa0, 0x99, 0x41, 0xec, 0xd6, 0x8c, 0x07,
+ /* (2^182)P */ 0x2f, 0x0d, 0x90, 0xad, 0x41, 0x4a, 0x58, 0x4a, 0x52, 0x4c, 0xc7, 0xe2, 0x78, 0x2b, 0x14, 0x32, 0x78, 0xc9, 0x31, 0x84, 0x33, 0xe8, 0xc4, 0x68, 0xc2, 0x9f, 0x68, 0x08, 0x90, 0xea, 0x69, 0x7f,
+ /* (2^183)P */ 0x65, 0x82, 0xa3, 0x46, 0x1e, 0xc8, 0xf2, 0x52, 0xfd, 0x32, 0xa8, 0x04, 0x2d, 0x07, 0x78, 0xfd, 0x94, 0x9e, 0x35, 0x25, 0xfa, 0xd5, 0xd7, 0x8c, 0xd2, 0x29, 0xcc, 0x54, 0x74, 0x1b, 0xe7, 0x4d,
+ /* (2^184)P */ 0xc9, 0x6a, 0xda, 0x1e, 0xad, 0x60, 0xeb, 0x42, 0x3a, 0x9c, 0xc0, 0xdb, 0xdf, 0x37, 0xad, 0x0a, 0x91, 0xc1, 0x3c, 0xe3, 0x71, 0x4b, 0x00, 0x81, 0x3c, 0x80, 0x22, 0x51, 0x34, 0xbe, 0xe6, 0x44,
+ /* (2^185)P */ 0xdb, 0x20, 0x19, 0xba, 0x88, 0x83, 0xfe, 0x03, 0x08, 0xb0, 0x0d, 0x15, 0x32, 0x7c, 0xd5, 0xf5, 0x29, 0x0c, 0xf6, 0x1a, 0x28, 0xc4, 0xc8, 0x49, 0xee, 0x1a, 0x70, 0xde, 0x18, 0xb5, 0xed, 0x21,
+ /* (2^186)P */ 0x99, 0xdc, 0x06, 0x8f, 0x41, 0x3e, 0xb6, 0x7f, 0xb8, 0xd7, 0x66, 0xc1, 0x99, 0x0d, 0x46, 0xa4, 0x83, 0x0a, 0x52, 0xce, 0x48, 0x52, 0xdd, 0x24, 0x58, 0x83, 0x92, 0x2b, 0x71, 0xad, 0xc3, 0x5e,
+ /* (2^187)P */ 0x0f, 0x93, 0x17, 0xbd, 0x5f, 0x2a, 0x02, 0x15, 0xe3, 0x70, 0x25, 0xd8, 0x77, 0x4a, 0xf6, 0xa4, 0x12, 0x37, 0x78, 0x15, 0x69, 0x8d, 0xbc, 0x12, 0xbb, 0x0a, 0x62, 0xfc, 0xc0, 0x94, 0x81, 0x49,
+ /* (2^188)P */ 0x82, 0x6c, 0x68, 0x55, 0xd2, 0xd9, 0xa2, 0x38, 0xf0, 0x21, 0x3e, 0x19, 0xd9, 0x6b, 0x5c, 0x78, 0x84, 0x54, 0x4a, 0xb2, 0x1a, 0xc8, 0xd5, 0xe4, 0x89, 0x09, 0xe2, 0xb2, 0x60, 0x78, 0x30, 0x56,
+ /* (2^189)P */ 0xc4, 0x74, 0x4d, 0x8b, 0xf7, 0x55, 0x9d, 0x42, 0x31, 0x01, 0x35, 0x43, 0x46, 0x83, 0xf1, 0x22, 0xff, 0x1f, 0xc7, 0x98, 0x45, 0xc2, 0x60, 0x1e, 0xef, 0x83, 0x99, 0x97, 0x14, 0xf0, 0xf2, 0x59,
+ /* (2^190)P */ 0x44, 0x4a, 0x49, 0xeb, 0x56, 0x7d, 0xa4, 0x46, 0x8e, 0xa1, 0x36, 0xd6, 0x54, 0xa8, 0x22, 0x3e, 0x3b, 0x1c, 0x49, 0x74, 0x52, 0xe1, 0x46, 0xb3, 0xe7, 0xcd, 0x90, 0x53, 0x4e, 0xfd, 0xea, 0x2c,
+ /* (2^191)P */ 0x75, 0x66, 0x0d, 0xbe, 0x38, 0x85, 0x8a, 0xba, 0x23, 0x8e, 0x81, 0x50, 0xbb, 0x74, 0x90, 0x4b, 0xc3, 0x04, 0xd3, 0x85, 0x90, 0xb8, 0xda, 0xcb, 0xc4, 0x92, 0x61, 0xe5, 0xe0, 0x4f, 0xa2, 0x61,
+ /* (2^192)P */ 0xcb, 0x5b, 0x52, 0xdb, 0xe6, 0x15, 0x76, 0xcb, 0xca, 0xe4, 0x67, 0xa5, 0x35, 0x8c, 0x7d, 0xdd, 0x69, 0xdd, 0xfc, 0xca, 0x3a, 0x15, 0xb4, 0xe6, 0x66, 0x97, 0x3c, 0x7f, 0x09, 0x8e, 0x66, 0x2d,
+ /* (2^193)P */ 0xf0, 0x5e, 0xe5, 0x5c, 0x26, 0x7e, 0x7e, 0xa5, 0x67, 0xb9, 0xd4, 0x7c, 0x52, 0x4e, 0x9f, 0x5d, 0xe5, 0xd1, 0x2f, 0x49, 0x06, 0x36, 0xc8, 0xfb, 0xae, 0xf7, 0xc3, 0xb7, 0xbe, 0x52, 0x0d, 0x09,
+ /* (2^194)P */ 0x7c, 0x4d, 0x7b, 0x1e, 0x5a, 0x51, 0xb9, 0x09, 0xc0, 0x44, 0xda, 0x99, 0x25, 0x6a, 0x26, 0x1f, 0x04, 0x55, 0xc5, 0xe2, 0x48, 0x95, 0xc4, 0xa1, 0xcc, 0x15, 0x6f, 0x12, 0x87, 0x42, 0xf0, 0x7e,
+ /* (2^195)P */ 0x15, 0xef, 0x30, 0xbd, 0x9d, 0x65, 0xd1, 0xfe, 0x7b, 0x27, 0xe0, 0xc4, 0xee, 0xb9, 0x4a, 0x8b, 0x91, 0x32, 0xdf, 0xa5, 0x36, 0x62, 0x4d, 0x88, 0x88, 0xf7, 0x5c, 0xbf, 0xa6, 0x6e, 0xd9, 0x1f,
+ /* (2^196)P */ 0x9a, 0x0d, 0x19, 0x1f, 0x98, 0x61, 0xa1, 0x42, 0xc1, 0x52, 0x60, 0x7e, 0x50, 0x49, 0xd8, 0x61, 0xd5, 0x2c, 0x5a, 0x28, 0xbf, 0x13, 0xe1, 0x9f, 0xd8, 0x85, 0xad, 0xdb, 0x76, 0xd6, 0x22, 0x7c,
+ /* (2^197)P */ 0x7d, 0xd2, 0xfb, 0x2b, 0xed, 0x70, 0xe7, 0x82, 0xa5, 0xf5, 0x96, 0xe9, 0xec, 0xb2, 0x05, 0x4c, 0x50, 0x01, 0x90, 0xb0, 0xc2, 0xa9, 0x40, 0xcd, 0x64, 0xbf, 0xd9, 0x13, 0x92, 0x31, 0x95, 0x58,
+ /* (2^198)P */ 0x08, 0x2e, 0xea, 0x3f, 0x70, 0x5d, 0xcc, 0xe7, 0x8c, 0x18, 0xe2, 0x58, 0x12, 0x49, 0x0c, 0xb5, 0xf0, 0x5b, 0x20, 0x48, 0xaa, 0x0b, 0xe3, 0xcc, 0x62, 0x2d, 0xa3, 0xcf, 0x9c, 0x65, 0x7c, 0x53,
+ /* (2^199)P */ 0x88, 0xc0, 0xcf, 0x98, 0x3a, 0x62, 0xb6, 0x37, 0xa4, 0xac, 0xd6, 0xa4, 0x1f, 0xed, 0x9b, 0xfe, 0xb0, 0xd1, 0xa8, 0x56, 0x8e, 0x9b, 0xd2, 0x04, 0x75, 0x95, 0x51, 0x0b, 0xc4, 0x71, 0x5f, 0x72,
+ /* (2^200)P */ 0xe6, 0x9c, 0x33, 0xd0, 0x9c, 0xf8, 0xc7, 0x28, 0x8b, 0xc1, 0xdd, 0x69, 0x44, 0xb1, 0x67, 0x83, 0x2c, 0x65, 0xa1, 0xa6, 0x83, 0xda, 0x3a, 0x88, 0x17, 0x6c, 0x4d, 0x03, 0x74, 0x19, 0x5f, 0x58,
+ /* (2^201)P */ 0x88, 0x91, 0xb1, 0xf1, 0x66, 0xb2, 0xcf, 0x89, 0x17, 0x52, 0xc3, 0xe7, 0x63, 0x48, 0x3b, 0xe6, 0x6a, 0x52, 0xc0, 0xb4, 0xa6, 0x9d, 0x8c, 0xd8, 0x35, 0x46, 0x95, 0xf0, 0x9d, 0x5c, 0x03, 0x3e,
+ /* (2^202)P */ 0x9d, 0xde, 0x45, 0xfb, 0x12, 0x54, 0x9d, 0xdd, 0x0d, 0xf4, 0xcf, 0xe4, 0x32, 0x45, 0x68, 0xdd, 0x1c, 0x67, 0x1d, 0x15, 0x9b, 0x99, 0x5c, 0x4b, 0x90, 0xf6, 0xe7, 0x11, 0xc8, 0x2c, 0x8c, 0x2d,
+ /* (2^203)P */ 0x40, 0x5d, 0x05, 0x90, 0x1d, 0xbe, 0x54, 0x7f, 0x40, 0xaf, 0x4a, 0x46, 0xdf, 0xc5, 0x64, 0xa4, 0xbe, 0x17, 0xe9, 0xf0, 0x24, 0x96, 0x97, 0x33, 0x30, 0x6b, 0x35, 0x27, 0xc5, 0x8d, 0x01, 0x2c,
+ /* (2^204)P */ 0xd4, 0xb3, 0x30, 0xe3, 0x24, 0x50, 0x41, 0xa5, 0xd3, 0x52, 0x16, 0x69, 0x96, 0x3d, 0xff, 0x73, 0xf1, 0x59, 0x9b, 0xef, 0xc4, 0x42, 0xec, 0x94, 0x5a, 0x8e, 0xd0, 0x18, 0x16, 0x20, 0x47, 0x07,
+ /* (2^205)P */ 0x53, 0x1c, 0x41, 0xca, 0x8a, 0xa4, 0x6c, 0x4d, 0x19, 0x61, 0xa6, 0xcf, 0x2f, 0x5f, 0x41, 0x66, 0xff, 0x27, 0xe2, 0x51, 0x00, 0xd4, 0x4d, 0x9c, 0xeb, 0xf7, 0x02, 0x9a, 0xc0, 0x0b, 0x81, 0x59,
+ /* (2^206)P */ 0x1d, 0x10, 0xdc, 0xb3, 0x71, 0xb1, 0x7e, 0x2a, 0x8e, 0xf6, 0xfe, 0x9f, 0xb9, 0x5a, 0x1c, 0x44, 0xea, 0x59, 0xb3, 0x93, 0x9b, 0x5c, 0x02, 0x32, 0x2f, 0x11, 0x9d, 0x1e, 0xa7, 0xe0, 0x8c, 0x5e,
+ /* (2^207)P */ 0xfd, 0x03, 0x95, 0x42, 0x92, 0xcb, 0xcc, 0xbf, 0x55, 0x5d, 0x09, 0x2f, 0x75, 0xba, 0x71, 0xd2, 0x1e, 0x09, 0x2d, 0x97, 0x5e, 0xad, 0x5e, 0x34, 0xba, 0x03, 0x31, 0xa8, 0x11, 0xdf, 0xc8, 0x18,
+ /* (2^208)P */ 0x4c, 0x0f, 0xed, 0x9a, 0x9a, 0x94, 0xcd, 0x90, 0x7e, 0xe3, 0x60, 0x66, 0xcb, 0xf4, 0xd1, 0xc5, 0x0b, 0x2e, 0xc5, 0x56, 0x2d, 0xc5, 0xca, 0xb8, 0x0d, 0x8e, 0x80, 0xc5, 0x00, 0xe4, 0x42, 0x6e,
+ /* (2^209)P */ 0x23, 0xfd, 0xae, 0xee, 0x66, 0x69, 0xb4, 0xa3, 0xca, 0xcd, 0x9e, 0xe3, 0x0b, 0x1f, 0x4f, 0x0c, 0x1d, 0xa5, 0x83, 0xd6, 0xc9, 0xc8, 0x9d, 0x18, 0x1b, 0x35, 0x09, 0x4c, 0x05, 0x7f, 0xf2, 0x51,
+ /* (2^210)P */ 0x82, 0x06, 0x32, 0x2a, 0xcd, 0x7c, 0x48, 0x4c, 0x96, 0x1c, 0xdf, 0xb3, 0x5b, 0xa9, 0x7e, 0x58, 0xe8, 0xb8, 0x5c, 0x55, 0x9e, 0xf7, 0xcc, 0xc8, 0x3d, 0xd7, 0x06, 0xa2, 0x29, 0xc8, 0x7d, 0x54,
+ /* (2^211)P */ 0x06, 0x9b, 0xc3, 0x80, 0xcd, 0xa6, 0x22, 0xb8, 0xc6, 0xd4, 0x00, 0x20, 0x73, 0x54, 0x6d, 0xe9, 0x4d, 0x3b, 0x46, 0x91, 0x6f, 0x5b, 0x53, 0x28, 0x1d, 0x6e, 0x48, 0xe2, 0x60, 0x46, 0x8f, 0x22,
+ /* (2^212)P */ 0xbf, 0x3a, 0x8d, 0xde, 0x38, 0x95, 0x79, 0x98, 0x6e, 0xca, 0xeb, 0x45, 0x00, 0x33, 0xd8, 0x8c, 0x38, 0xe7, 0x21, 0x82, 0x00, 0x2a, 0x95, 0x79, 0xbb, 0xd2, 0x5c, 0x53, 0xa7, 0xe1, 0x22, 0x43,
+ /* (2^213)P */ 0x1c, 0x80, 0xd1, 0x19, 0x18, 0xc1, 0x14, 0xb1, 0xc7, 0x5e, 0x3f, 0x4f, 0xd8, 0xe4, 0x16, 0x20, 0x4c, 0x0f, 0x26, 0x09, 0xf4, 0x2d, 0x0e, 0xdd, 0x66, 0x72, 0x5f, 0xae, 0xc0, 0x62, 0xc3, 0x5e,
+ /* (2^214)P */ 0xee, 0xb4, 0xb2, 0xb8, 0x18, 0x2b, 0x46, 0xc0, 0xfb, 0x1a, 0x4d, 0x27, 0x50, 0xd9, 0xc8, 0x7c, 0xd2, 0x02, 0x6b, 0x43, 0x05, 0x71, 0x5f, 0xf2, 0xd3, 0xcc, 0xf9, 0xbf, 0xdc, 0xf8, 0xbb, 0x43,
+ /* (2^215)P */ 0xdf, 0xe9, 0x39, 0xa0, 0x67, 0x17, 0xad, 0xb6, 0x83, 0x35, 0x9d, 0xf6, 0xa8, 0x4d, 0x71, 0xb0, 0xf5, 0x31, 0x29, 0xb4, 0x18, 0xfa, 0x55, 0x5e, 0x61, 0x09, 0xc6, 0x33, 0x8f, 0x55, 0xd5, 0x4e,
+ /* (2^216)P */ 0xdd, 0xa5, 0x47, 0xc6, 0x01, 0x79, 0xe3, 0x1f, 0x57, 0xd3, 0x81, 0x80, 0x1f, 0xdf, 0x3d, 0x59, 0xa6, 0xd7, 0x3f, 0x81, 0xfd, 0xa4, 0x49, 0x02, 0x61, 0xaf, 0x9c, 0x4e, 0x27, 0xca, 0xac, 0x69,
+ /* (2^217)P */ 0xc9, 0x21, 0x07, 0x33, 0xea, 0xa3, 0x7b, 0x04, 0xa0, 0x1e, 0x7e, 0x0e, 0xc2, 0x3f, 0x42, 0x83, 0x60, 0x4a, 0x31, 0x01, 0xaf, 0xc0, 0xf4, 0x1d, 0x27, 0x95, 0x28, 0x89, 0xab, 0x2d, 0xa6, 0x09,
+ /* (2^218)P */ 0x00, 0xcb, 0xc6, 0x9c, 0xa4, 0x25, 0xb3, 0xa5, 0xb6, 0x6c, 0xb5, 0x54, 0xc6, 0x5d, 0x4b, 0xe9, 0xa0, 0x94, 0xc9, 0xad, 0x79, 0x87, 0xe2, 0x3b, 0xad, 0x4a, 0x3a, 0xba, 0xf8, 0xe8, 0x96, 0x42,
+ /* (2^219)P */ 0xab, 0x1e, 0x45, 0x1e, 0x76, 0x89, 0x86, 0x32, 0x4a, 0x59, 0x59, 0xff, 0x8b, 0x59, 0x4d, 0x2e, 0x4a, 0x08, 0xa7, 0xd7, 0x53, 0x68, 0xb9, 0x49, 0xa8, 0x20, 0x14, 0x60, 0x19, 0xa3, 0x80, 0x49,
+ /* (2^220)P */ 0x42, 0x2c, 0x55, 0x2f, 0xe1, 0xb9, 0x65, 0x95, 0x96, 0xfe, 0x00, 0x71, 0xdb, 0x18, 0x53, 0x8a, 0xd7, 0xd0, 0xad, 0x43, 0x4d, 0x0b, 0xc9, 0x05, 0xda, 0x4e, 0x5d, 0x6a, 0xd6, 0x4c, 0x8b, 0x53,
+ /* (2^221)P */ 0x9f, 0x03, 0x9f, 0xe8, 0xc3, 0x4f, 0xe9, 0xf4, 0x45, 0x80, 0x61, 0x6f, 0xf2, 0x9a, 0x2c, 0x59, 0x50, 0x95, 0x4b, 0xfd, 0xb5, 0x6e, 0xa3, 0x08, 0x19, 0x14, 0xed, 0xc2, 0xf6, 0xfa, 0xff, 0x25,
+ /* (2^222)P */ 0x54, 0xd3, 0x79, 0xcc, 0x59, 0x44, 0x43, 0x34, 0x6b, 0x47, 0xd5, 0xb1, 0xb4, 0xbf, 0xec, 0xee, 0x99, 0x5d, 0x61, 0x61, 0xa0, 0x34, 0xeb, 0xdd, 0x73, 0xb7, 0x64, 0xeb, 0xcc, 0xce, 0x29, 0x51,
+ /* (2^223)P */ 0x20, 0x35, 0x99, 0x94, 0x58, 0x21, 0x43, 0xee, 0x3b, 0x0b, 0x4c, 0xf1, 0x7c, 0x9c, 0x2f, 0x77, 0xd5, 0xda, 0xbe, 0x06, 0xe3, 0xfc, 0xe2, 0xd2, 0x97, 0x6a, 0xf0, 0x46, 0xb5, 0x42, 0x5f, 0x71,
+ /* (2^224)P */ 0x1a, 0x5f, 0x5b, 0xda, 0xce, 0xcd, 0x4e, 0x43, 0xa9, 0x41, 0x97, 0xa4, 0x15, 0x71, 0xa1, 0x0d, 0x2e, 0xad, 0xed, 0x73, 0x7c, 0xd7, 0x0b, 0x68, 0x41, 0x90, 0xdd, 0x4e, 0x35, 0x02, 0x7c, 0x48,
+ /* (2^225)P */ 0xc4, 0xd9, 0x0e, 0xa7, 0xf3, 0xef, 0xef, 0xb8, 0x02, 0xe3, 0x57, 0xe8, 0xa3, 0x2a, 0xa3, 0x56, 0xa0, 0xa5, 0xa2, 0x48, 0xbd, 0x68, 0x3a, 0xdf, 0x44, 0xc4, 0x76, 0x31, 0xb7, 0x50, 0xf6, 0x07,
+ /* (2^226)P */ 0xb1, 0xcc, 0xe0, 0x26, 0x16, 0x9b, 0x8b, 0xe3, 0x36, 0xfb, 0x09, 0x8b, 0xc1, 0x53, 0xe0, 0x79, 0x64, 0x49, 0xf9, 0xc9, 0x19, 0x03, 0xd9, 0x56, 0xc4, 0xf5, 0x9f, 0xac, 0xe7, 0x41, 0xa9, 0x1c,
+ /* (2^227)P */ 0xbb, 0xa0, 0x2f, 0x16, 0x29, 0xdf, 0xc4, 0x49, 0x05, 0x33, 0xb3, 0x82, 0x32, 0xcf, 0x88, 0x84, 0x7d, 0x43, 0xbb, 0xca, 0x14, 0xda, 0xdf, 0x95, 0x86, 0xad, 0xd5, 0x64, 0x82, 0xf7, 0x91, 0x33,
+ /* (2^228)P */ 0x5d, 0x09, 0xb5, 0xe2, 0x6a, 0xe0, 0x9a, 0x72, 0x46, 0xa9, 0x59, 0x32, 0xd7, 0x58, 0x8a, 0xd5, 0xed, 0x21, 0x39, 0xd1, 0x62, 0x42, 0x83, 0xe9, 0x92, 0xb5, 0x4b, 0xa5, 0xfa, 0xda, 0xfe, 0x27,
+ /* (2^229)P */ 0xbb, 0x48, 0xad, 0x29, 0xb8, 0xc5, 0x9d, 0xa9, 0x60, 0xe2, 0x9e, 0x49, 0x42, 0x57, 0x02, 0x5f, 0xfd, 0x13, 0x75, 0x5d, 0xcd, 0x8e, 0x2c, 0x80, 0x38, 0xd9, 0x6d, 0x3f, 0xef, 0xb3, 0xce, 0x78,
+ /* (2^230)P */ 0x94, 0x5d, 0x13, 0x8a, 0x4f, 0xf4, 0x42, 0xc3, 0xa3, 0xdd, 0x8c, 0x82, 0x44, 0xdb, 0x9e, 0x7b, 0xe7, 0xcf, 0x37, 0x05, 0x1a, 0xd1, 0x36, 0x94, 0xc8, 0xb4, 0x1a, 0xec, 0x64, 0xb1, 0x64, 0x50,
+ /* (2^231)P */ 0xfc, 0xb2, 0x7e, 0xd3, 0xcf, 0xec, 0x20, 0x70, 0xfc, 0x25, 0x0d, 0xd9, 0x3e, 0xea, 0x31, 0x1f, 0x34, 0xbb, 0xa1, 0xdf, 0x7b, 0x0d, 0x93, 0x1b, 0x44, 0x30, 0x11, 0x48, 0x7a, 0x46, 0x44, 0x53,
+ /* (2^232)P */ 0xfb, 0x6d, 0x5e, 0xf2, 0x70, 0x31, 0x07, 0x70, 0xc8, 0x4c, 0x11, 0x50, 0x1a, 0xdc, 0x85, 0xe3, 0x00, 0x4f, 0xfc, 0xc8, 0x8a, 0x69, 0x48, 0x23, 0xd8, 0x40, 0xdd, 0x84, 0x52, 0xa5, 0x77, 0x2a,
+ /* (2^233)P */ 0xe4, 0x6c, 0x8c, 0xc9, 0xe0, 0xaf, 0x06, 0xfe, 0xe4, 0xd6, 0xdf, 0xdd, 0x96, 0xdf, 0x35, 0xc2, 0xd3, 0x1e, 0xbf, 0x33, 0x1e, 0xd0, 0x28, 0x14, 0xaf, 0xbd, 0x00, 0x93, 0xec, 0x68, 0x57, 0x78,
+ /* (2^234)P */ 0x3b, 0xb6, 0xde, 0x91, 0x7a, 0xe5, 0x02, 0x97, 0x80, 0x8b, 0xce, 0xe5, 0xbf, 0xb8, 0xbd, 0x61, 0xac, 0x58, 0x1d, 0x3d, 0x6f, 0x42, 0x5b, 0x64, 0xbc, 0x57, 0xa5, 0x27, 0x22, 0xa8, 0x04, 0x48,
+ /* (2^235)P */ 0x01, 0x26, 0x4d, 0xb4, 0x8a, 0x04, 0x57, 0x8e, 0x35, 0x69, 0x3a, 0x4b, 0x1a, 0x50, 0xd6, 0x68, 0x93, 0xc2, 0xe1, 0xf9, 0xc3, 0x9e, 0x9c, 0xc3, 0xe2, 0x63, 0xde, 0xd4, 0x57, 0xf2, 0x72, 0x41,
+ /* (2^236)P */ 0x01, 0x64, 0x0c, 0x33, 0x50, 0xb4, 0x68, 0xd3, 0x91, 0x23, 0x8f, 0x41, 0x17, 0x30, 0x0d, 0x04, 0x0d, 0xd9, 0xb7, 0x90, 0x60, 0xbb, 0x34, 0x2c, 0x1f, 0xd5, 0xdf, 0x8f, 0x22, 0x49, 0xf6, 0x16,
+ /* (2^237)P */ 0xf5, 0x8e, 0x92, 0x2b, 0x8e, 0x81, 0xa6, 0xbe, 0x72, 0x1e, 0xc1, 0xcd, 0x91, 0xcf, 0x8c, 0xe2, 0xcd, 0x36, 0x7a, 0xe7, 0x68, 0xaa, 0x4a, 0x59, 0x0f, 0xfd, 0x7f, 0x6c, 0x80, 0x34, 0x30, 0x31,
+ /* (2^238)P */ 0x65, 0xbd, 0x49, 0x22, 0xac, 0x27, 0x9d, 0x8a, 0x12, 0x95, 0x8e, 0x01, 0x64, 0xb4, 0xa3, 0x19, 0xc7, 0x7e, 0xb3, 0x52, 0xf3, 0xcf, 0x6c, 0xc2, 0x21, 0x7b, 0x79, 0x1d, 0x34, 0x68, 0x6f, 0x05,
+ /* (2^239)P */ 0x27, 0x23, 0xfd, 0x7e, 0x75, 0xd6, 0x79, 0x5e, 0x15, 0xfe, 0x3a, 0x55, 0xb6, 0xbc, 0xbd, 0xfa, 0x60, 0x5a, 0xaf, 0x6e, 0x2c, 0x22, 0xe7, 0xd3, 0x3b, 0x74, 0xae, 0x4d, 0x6d, 0xc7, 0x46, 0x70,
+ /* (2^240)P */ 0x55, 0x4a, 0x8d, 0xb1, 0x72, 0xe8, 0x0b, 0x66, 0x96, 0x14, 0x4e, 0x57, 0x18, 0x25, 0x99, 0x19, 0xbb, 0xdc, 0x2b, 0x30, 0x3a, 0x05, 0x03, 0xc1, 0x8e, 0x8e, 0x21, 0x0b, 0x80, 0xe9, 0xd8, 0x3e,
+ /* (2^241)P */ 0x3e, 0xe0, 0x75, 0xfa, 0x39, 0x92, 0x0b, 0x7b, 0x83, 0xc0, 0x33, 0x46, 0x68, 0xfb, 0xe9, 0xef, 0x93, 0x77, 0x1a, 0x39, 0xbe, 0x5f, 0xa3, 0x98, 0x34, 0xfe, 0xd0, 0xe2, 0x0f, 0x51, 0x65, 0x60,
+ /* (2^242)P */ 0x0c, 0xad, 0xab, 0x48, 0x85, 0x66, 0xcb, 0x55, 0x27, 0xe5, 0x87, 0xda, 0x48, 0x45, 0x58, 0xb4, 0xdd, 0xc1, 0x07, 0x01, 0xea, 0xec, 0x43, 0x2c, 0x35, 0xde, 0x72, 0x93, 0x80, 0x28, 0x60, 0x52,
+ /* (2^243)P */ 0x1f, 0x3b, 0x21, 0xf9, 0x6a, 0xc5, 0x15, 0x34, 0xdb, 0x98, 0x7e, 0x01, 0x4d, 0x1a, 0xee, 0x5b, 0x9b, 0x70, 0xcf, 0xb5, 0x05, 0xb1, 0xf6, 0x13, 0xb6, 0x9a, 0xb2, 0x82, 0x34, 0x0e, 0xf2, 0x5f,
+ /* (2^244)P */ 0x90, 0x6c, 0x2e, 0xcc, 0x75, 0x9c, 0xa2, 0x0a, 0x06, 0xe2, 0x70, 0x3a, 0xca, 0x73, 0x7d, 0xfc, 0x15, 0xc5, 0xb5, 0xc4, 0x8f, 0xc3, 0x9f, 0x89, 0x07, 0xc2, 0xff, 0x24, 0xb1, 0x86, 0x03, 0x25,
+ /* (2^245)P */ 0x56, 0x2b, 0x3d, 0xae, 0xd5, 0x28, 0xea, 0x54, 0xce, 0x60, 0xde, 0xd6, 0x9d, 0x14, 0x13, 0x99, 0xc1, 0xd6, 0x06, 0x8f, 0xc5, 0x4f, 0x69, 0x16, 0xc7, 0x8f, 0x01, 0xeb, 0x75, 0x39, 0xb2, 0x46,
+ /* (2^246)P */ 0xe2, 0xb4, 0xb7, 0xb4, 0x0f, 0x6a, 0x0a, 0x47, 0xde, 0x53, 0x72, 0x8f, 0x5a, 0x47, 0x92, 0x5d, 0xdb, 0x3a, 0xbd, 0x2f, 0xb5, 0xe5, 0xee, 0xab, 0x68, 0x69, 0x80, 0xa0, 0x01, 0x08, 0xa2, 0x7f,
+ /* (2^247)P */ 0xd2, 0x14, 0x77, 0x9f, 0xf1, 0xfa, 0xf3, 0x76, 0xc3, 0x60, 0x46, 0x2f, 0xc1, 0x40, 0xe8, 0xb3, 0x4e, 0x74, 0x12, 0xf2, 0x8d, 0xcd, 0xb4, 0x0f, 0xd2, 0x2d, 0x3a, 0x1d, 0x25, 0x5a, 0x06, 0x4b,
+ /* (2^248)P */ 0x4a, 0xcd, 0x77, 0x3d, 0x38, 0xde, 0xeb, 0x5c, 0xb1, 0x9c, 0x2c, 0x88, 0xdf, 0x39, 0xdf, 0x6a, 0x59, 0xf7, 0x9a, 0xb0, 0x2e, 0x24, 0xdd, 0xa2, 0x22, 0x64, 0x5f, 0x0e, 0xe5, 0xc0, 0x47, 0x31,
+ /* (2^249)P */ 0xdb, 0x50, 0x13, 0x1d, 0x10, 0xa5, 0x4c, 0x16, 0x62, 0xc9, 0x3f, 0xc3, 0x79, 0x34, 0xd1, 0xf8, 0x08, 0xda, 0xe5, 0x13, 0x4d, 0xce, 0x40, 0xe6, 0xba, 0xf8, 0x61, 0x50, 0xc4, 0xe0, 0xde, 0x4b,
+ /* (2^250)P */ 0xc9, 0xb1, 0xed, 0xa4, 0xc1, 0x6d, 0xc4, 0xd7, 0x8a, 0xd9, 0x7f, 0x43, 0xb6, 0xd7, 0x14, 0x55, 0x0b, 0xc0, 0xa1, 0xb2, 0x6b, 0x2f, 0x94, 0x58, 0x0e, 0x71, 0x70, 0x1d, 0xab, 0xb2, 0xff, 0x2d,
+ /* (2^251)P */ 0x68, 0x6d, 0x8b, 0xc1, 0x2f, 0xcf, 0xdf, 0xcc, 0x67, 0x61, 0x80, 0xb7, 0xa8, 0xcb, 0xeb, 0xa8, 0xe3, 0x37, 0x29, 0x5e, 0xf9, 0x97, 0x06, 0x98, 0x8c, 0x6e, 0x12, 0xd0, 0x1c, 0xba, 0xfb, 0x02,
+ /* (2^252)P */ 0x65, 0x45, 0xff, 0xad, 0x60, 0xc3, 0x98, 0xcb, 0x19, 0x15, 0xdb, 0x4b, 0xd2, 0x01, 0x71, 0x44, 0xd5, 0x15, 0xfb, 0x75, 0x74, 0xc8, 0xc4, 0x98, 0x7d, 0xa2, 0x22, 0x6e, 0x6d, 0xc7, 0xf8, 0x05,
+ /* (2^253)P */ 0x94, 0xf4, 0xb9, 0xfe, 0xdf, 0xe5, 0x69, 0xab, 0x75, 0x6b, 0x40, 0x18, 0x9d, 0xc7, 0x09, 0xae, 0x1d, 0x2d, 0xa4, 0x94, 0xfb, 0x45, 0x9b, 0x19, 0x84, 0xfa, 0x2a, 0xae, 0xeb, 0x0a, 0x71, 0x79,
+ /* (2^254)P */ 0xdf, 0xd2, 0x34, 0xf3, 0xa7, 0xed, 0xad, 0xa6, 0xb4, 0x57, 0x2a, 0xaf, 0x51, 0x9c, 0xde, 0x7b, 0xa8, 0xea, 0xdc, 0x86, 0x4f, 0xc6, 0x8f, 0xa9, 0x7b, 0xd0, 0x0e, 0xc2, 0x35, 0x03, 0xbe, 0x6b,
+ /* (2^255)P */ 0x44, 0x43, 0x98, 0x53, 0xbe, 0xdc, 0x7f, 0x66, 0xa8, 0x49, 0x59, 0x00, 0x1c, 0xbc, 0x72, 0x07, 0x8e, 0xd6, 0xbe, 0x4e, 0x9f, 0xa4, 0x07, 0xba, 0xbf, 0x30, 0xdf, 0xba, 0x85, 0xb0, 0xa7, 0x1f,
+}
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve.go b/vendor/github.com/cloudflare/circl/dh/x448/curve.go
new file mode 100644
index 000000000..d59564e4b
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x448/curve.go
@@ -0,0 +1,104 @@
+package x448
+
+import (
+ fp "github.com/cloudflare/circl/math/fp448"
+)
+
+// ladderJoye calculates a fixed-point multiplication with the generator point.
+// The algorithm is the right-to-left Joye's ladder as described
+// in "How to precompute a ladder" in SAC'2017.
+func ladderJoye(k *Key) {
+ w := [5]fp.Elt{} // [mu,x1,z1,x2,z2] order must be preserved.
+ w[1] = fp.Elt{ // x1 = S
+ 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ }
+ fp.SetOne(&w[2]) // z1 = 1
+ w[3] = fp.Elt{ // x2 = G-S
+ 0x20, 0x27, 0x9d, 0xc9, 0x7d, 0x19, 0xb1, 0xac,
+ 0xf8, 0xba, 0x69, 0x1c, 0xff, 0x33, 0xac, 0x23,
+ 0x51, 0x1b, 0xce, 0x3a, 0x64, 0x65, 0xbd, 0xf1,
+ 0x23, 0xf8, 0xc1, 0x84, 0x9d, 0x45, 0x54, 0x29,
+ 0x67, 0xb9, 0x81, 0x1c, 0x03, 0xd1, 0xcd, 0xda,
+ 0x7b, 0xeb, 0xff, 0x1a, 0x88, 0x03, 0xcf, 0x3a,
+ 0x42, 0x44, 0x32, 0x01, 0x25, 0xb7, 0xfa, 0xf0,
+ }
+ fp.SetOne(&w[4]) // z2 = 1
+
+ const n = 448
+ const h = 2
+ swap := uint(1)
+ for s := 0; s < n-h; s++ {
+ i := (s + h) / 8
+ j := (s + h) % 8
+ bit := uint((k[i] >> uint(j)) & 1)
+ copy(w[0][:], tableGenerator[s*Size:(s+1)*Size])
+ diffAdd(&w, swap^bit)
+ swap = bit
+ }
+ for s := 0; s < h; s++ {
+ double(&w[1], &w[2])
+ }
+ toAffine((*[fp.Size]byte)(k), &w[1], &w[2])
+}
+
+// ladderMontgomery calculates a generic scalar point multiplication
+// The algorithm implemented is the left-to-right Montgomery's ladder.
+func ladderMontgomery(k, xP *Key) {
+ w := [5]fp.Elt{} // [x1, x2, z2, x3, z3] order must be preserved.
+ w[0] = *(*fp.Elt)(xP) // x1 = xP
+ fp.SetOne(&w[1]) // x2 = 1
+ w[3] = *(*fp.Elt)(xP) // x3 = xP
+ fp.SetOne(&w[4]) // z3 = 1
+
+ move := uint(0)
+ for s := 448 - 1; s >= 0; s-- {
+ i := s / 8
+ j := s % 8
+ bit := uint((k[i] >> uint(j)) & 1)
+ ladderStep(&w, move^bit)
+ move = bit
+ }
+ toAffine((*[fp.Size]byte)(k), &w[1], &w[2])
+}
+
+func toAffine(k *[fp.Size]byte, x, z *fp.Elt) {
+ fp.Inv(z, z)
+ fp.Mul(x, x, z)
+ _ = fp.ToBytes(k[:], x)
+}
+
+var lowOrderPoints = [3]fp.Elt{
+ { /* (0,_,1) point of order 2 on Curve448 */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ },
+ { /* (1,_,1) a point of order 4 on the twist of Curve448 */
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ },
+ { /* (-1,_,1) point of order 4 on Curve448 */
+ 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ },
+}
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.go b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.go
new file mode 100644
index 000000000..a06226661
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.go
@@ -0,0 +1,30 @@
+//go:build amd64 && !purego
+// +build amd64,!purego
+
+package x448
+
+import (
+ fp "github.com/cloudflare/circl/math/fp448"
+ "golang.org/x/sys/cpu"
+)
+
+var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
+
+var _ = hasBmi2Adx
+
+func double(x, z *fp.Elt) { doubleAmd64(x, z) }
+func diffAdd(w *[5]fp.Elt, b uint) { diffAddAmd64(w, b) }
+func ladderStep(w *[5]fp.Elt, b uint) { ladderStepAmd64(w, b) }
+func mulA24(z, x *fp.Elt) { mulA24Amd64(z, x) }
+
+//go:noescape
+func doubleAmd64(x, z *fp.Elt)
+
+//go:noescape
+func diffAddAmd64(w *[5]fp.Elt, b uint)
+
+//go:noescape
+func ladderStepAmd64(w *[5]fp.Elt, b uint)
+
+//go:noescape
+func mulA24Amd64(z, x *fp.Elt)
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.h b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.h
new file mode 100644
index 000000000..8c1ae4d0f
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.h
@@ -0,0 +1,111 @@
+#define ladderStepLeg \
+ addSub(x2,z2) \
+ addSub(x3,z3) \
+ integerMulLeg(b0,x2,z3) \
+ integerMulLeg(b1,x3,z2) \
+ reduceFromDoubleLeg(t0,b0) \
+ reduceFromDoubleLeg(t1,b1) \
+ addSub(t0,t1) \
+ cselect(x2,x3,regMove) \
+ cselect(z2,z3,regMove) \
+ integerSqrLeg(b0,t0) \
+ integerSqrLeg(b1,t1) \
+ reduceFromDoubleLeg(x3,b0) \
+ reduceFromDoubleLeg(z3,b1) \
+ integerMulLeg(b0,x1,z3) \
+ reduceFromDoubleLeg(z3,b0) \
+ integerSqrLeg(b0,x2) \
+ integerSqrLeg(b1,z2) \
+ reduceFromDoubleLeg(x2,b0) \
+ reduceFromDoubleLeg(z2,b1) \
+ subtraction(t0,x2,z2) \
+ multiplyA24Leg(t1,t0) \
+ additionLeg(t1,t1,z2) \
+ integerMulLeg(b0,x2,z2) \
+ integerMulLeg(b1,t0,t1) \
+ reduceFromDoubleLeg(x2,b0) \
+ reduceFromDoubleLeg(z2,b1)
+
+#define ladderStepBmi2Adx \
+ addSub(x2,z2) \
+ addSub(x3,z3) \
+ integerMulAdx(b0,x2,z3) \
+ integerMulAdx(b1,x3,z2) \
+ reduceFromDoubleAdx(t0,b0) \
+ reduceFromDoubleAdx(t1,b1) \
+ addSub(t0,t1) \
+ cselect(x2,x3,regMove) \
+ cselect(z2,z3,regMove) \
+ integerSqrAdx(b0,t0) \
+ integerSqrAdx(b1,t1) \
+ reduceFromDoubleAdx(x3,b0) \
+ reduceFromDoubleAdx(z3,b1) \
+ integerMulAdx(b0,x1,z3) \
+ reduceFromDoubleAdx(z3,b0) \
+ integerSqrAdx(b0,x2) \
+ integerSqrAdx(b1,z2) \
+ reduceFromDoubleAdx(x2,b0) \
+ reduceFromDoubleAdx(z2,b1) \
+ subtraction(t0,x2,z2) \
+ multiplyA24Adx(t1,t0) \
+ additionAdx(t1,t1,z2) \
+ integerMulAdx(b0,x2,z2) \
+ integerMulAdx(b1,t0,t1) \
+ reduceFromDoubleAdx(x2,b0) \
+ reduceFromDoubleAdx(z2,b1)
+
+#define difAddLeg \
+ addSub(x1,z1) \
+ integerMulLeg(b0,z1,ui) \
+ reduceFromDoubleLeg(z1,b0) \
+ addSub(x1,z1) \
+ integerSqrLeg(b0,x1) \
+ integerSqrLeg(b1,z1) \
+ reduceFromDoubleLeg(x1,b0) \
+ reduceFromDoubleLeg(z1,b1) \
+ integerMulLeg(b0,x1,z2) \
+ integerMulLeg(b1,z1,x2) \
+ reduceFromDoubleLeg(x1,b0) \
+ reduceFromDoubleLeg(z1,b1)
+
+#define difAddBmi2Adx \
+ addSub(x1,z1) \
+ integerMulAdx(b0,z1,ui) \
+ reduceFromDoubleAdx(z1,b0) \
+ addSub(x1,z1) \
+ integerSqrAdx(b0,x1) \
+ integerSqrAdx(b1,z1) \
+ reduceFromDoubleAdx(x1,b0) \
+ reduceFromDoubleAdx(z1,b1) \
+ integerMulAdx(b0,x1,z2) \
+ integerMulAdx(b1,z1,x2) \
+ reduceFromDoubleAdx(x1,b0) \
+ reduceFromDoubleAdx(z1,b1)
+
+#define doubleLeg \
+ addSub(x1,z1) \
+ integerSqrLeg(b0,x1) \
+ integerSqrLeg(b1,z1) \
+ reduceFromDoubleLeg(x1,b0) \
+ reduceFromDoubleLeg(z1,b1) \
+ subtraction(t0,x1,z1) \
+ multiplyA24Leg(t1,t0) \
+ additionLeg(t1,t1,z1) \
+ integerMulLeg(b0,x1,z1) \
+ integerMulLeg(b1,t0,t1) \
+ reduceFromDoubleLeg(x1,b0) \
+ reduceFromDoubleLeg(z1,b1)
+
+#define doubleBmi2Adx \
+ addSub(x1,z1) \
+ integerSqrAdx(b0,x1) \
+ integerSqrAdx(b1,z1) \
+ reduceFromDoubleAdx(x1,b0) \
+ reduceFromDoubleAdx(z1,b1) \
+ subtraction(t0,x1,z1) \
+ multiplyA24Adx(t1,t0) \
+ additionAdx(t1,t1,z1) \
+ integerMulAdx(b0,x1,z1) \
+ integerMulAdx(b1,t0,t1) \
+ reduceFromDoubleAdx(x1,b0) \
+ reduceFromDoubleAdx(z1,b1)
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s
new file mode 100644
index 000000000..ed33ba3d0
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x448/curve_amd64.s
@@ -0,0 +1,194 @@
+//go:build amd64 && !purego
+// +build amd64,!purego
+
+#include "textflag.h"
+
+// Depends on circl/math/fp448 package
+#include "../../math/fp448/fp_amd64.h"
+#include "curve_amd64.h"
+
+// CTE_A24 is (A+2)/4 from Curve448
+#define CTE_A24 39082
+
+#define Size 56
+
+// multiplyA24Leg multiplies x times CTE_A24 and stores in z
+// Uses: AX, DX, R8-R15, FLAGS
+// Instr: x86_64, cmov, adx
+#define multiplyA24Leg(z,x) \
+ MOVQ $CTE_A24, R15; \
+ MOVQ 0+x, AX; MULQ R15; MOVQ AX, R8; ;;;;;;;;;;;; MOVQ DX, R9; \
+ MOVQ 8+x, AX; MULQ R15; ADDQ AX, R9; ADCQ $0, DX; MOVQ DX, R10; \
+ MOVQ 16+x, AX; MULQ R15; ADDQ AX, R10; ADCQ $0, DX; MOVQ DX, R11; \
+ MOVQ 24+x, AX; MULQ R15; ADDQ AX, R11; ADCQ $0, DX; MOVQ DX, R12; \
+ MOVQ 32+x, AX; MULQ R15; ADDQ AX, R12; ADCQ $0, DX; MOVQ DX, R13; \
+ MOVQ 40+x, AX; MULQ R15; ADDQ AX, R13; ADCQ $0, DX; MOVQ DX, R14; \
+ MOVQ 48+x, AX; MULQ R15; ADDQ AX, R14; ADCQ $0, DX; \
+ MOVQ DX, AX; \
+ SHLQ $32, AX; \
+ ADDQ DX, R8; MOVQ $0, DX; \
+ ADCQ $0, R9; \
+ ADCQ $0, R10; \
+ ADCQ AX, R11; \
+ ADCQ $0, R12; \
+ ADCQ $0, R13; \
+ ADCQ $0, R14; \
+ ADCQ $0, DX; \
+ MOVQ DX, AX; \
+ SHLQ $32, AX; \
+ ADDQ DX, R8; \
+ ADCQ $0, R9; \
+ ADCQ $0, R10; \
+ ADCQ AX, R11; \
+ ADCQ $0, R12; \
+ ADCQ $0, R13; \
+ ADCQ $0, R14; \
+ MOVQ R8, 0+z; \
+ MOVQ R9, 8+z; \
+ MOVQ R10, 16+z; \
+ MOVQ R11, 24+z; \
+ MOVQ R12, 32+z; \
+ MOVQ R13, 40+z; \
+ MOVQ R14, 48+z;
+
+// multiplyA24Adx multiplies x times CTE_A24 and stores in z
+// Uses: AX, DX, R8-R14, FLAGS
+// Instr: x86_64, bmi2
+#define multiplyA24Adx(z,x) \
+ MOVQ $CTE_A24, DX; \
+ MULXQ 0+x, R8, R9; \
+ MULXQ 8+x, AX, R10; ADDQ AX, R9; \
+ MULXQ 16+x, AX, R11; ADCQ AX, R10; \
+ MULXQ 24+x, AX, R12; ADCQ AX, R11; \
+ MULXQ 32+x, AX, R13; ADCQ AX, R12; \
+ MULXQ 40+x, AX, R14; ADCQ AX, R13; \
+ MULXQ 48+x, AX, DX; ADCQ AX, R14; \
+ ;;;;;;;;;;;;;;;;;;;; ADCQ $0, DX; \
+ MOVQ DX, AX; \
+ SHLQ $32, AX; \
+ ADDQ DX, R8; MOVQ $0, DX; \
+ ADCQ $0, R9; \
+ ADCQ $0, R10; \
+ ADCQ AX, R11; \
+ ADCQ $0, R12; \
+ ADCQ $0, R13; \
+ ADCQ $0, R14; \
+ ADCQ $0, DX; \
+ MOVQ DX, AX; \
+ SHLQ $32, AX; \
+ ADDQ DX, R8; \
+ ADCQ $0, R9; \
+ ADCQ $0, R10; \
+ ADCQ AX, R11; \
+ ADCQ $0, R12; \
+ ADCQ $0, R13; \
+ ADCQ $0, R14; \
+ MOVQ R8, 0+z; \
+ MOVQ R9, 8+z; \
+ MOVQ R10, 16+z; \
+ MOVQ R11, 24+z; \
+ MOVQ R12, 32+z; \
+ MOVQ R13, 40+z; \
+ MOVQ R14, 48+z;
+
+#define mulA24Legacy \
+ multiplyA24Leg(0(DI),0(SI))
+#define mulA24Bmi2Adx \
+ multiplyA24Adx(0(DI),0(SI))
+
+// func mulA24Amd64(z, x *fp448.Elt)
+TEXT ·mulA24Amd64(SB),NOSPLIT,$0-16
+ MOVQ z+0(FP), DI
+ MOVQ x+8(FP), SI
+ CHECK_BMI2ADX(LMA24, mulA24Legacy, mulA24Bmi2Adx)
+
+// func ladderStepAmd64(w *[5]fp448.Elt, b uint)
+// ladderStepAmd64 calculates a point addition and doubling as follows:
+// (x2,z2) = 2*(x2,z2) and (x3,z3) = (x2,z2)+(x3,z3) using as a difference (x1,-).
+// w = {x1,x2,z2,x3,z4} are five fp255.Elt of 56 bytes.
+// stack = (t0,t1) are two fp.Elt of fp.Size bytes, and
+// (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
+TEXT ·ladderStepAmd64(SB),NOSPLIT,$336-16
+ // Parameters
+ #define regWork DI
+ #define regMove SI
+ #define x1 0*Size(regWork)
+ #define x2 1*Size(regWork)
+ #define z2 2*Size(regWork)
+ #define x3 3*Size(regWork)
+ #define z3 4*Size(regWork)
+ // Local variables
+ #define t0 0*Size(SP)
+ #define t1 1*Size(SP)
+ #define b0 2*Size(SP)
+ #define b1 4*Size(SP)
+ MOVQ w+0(FP), regWork
+ MOVQ b+8(FP), regMove
+ CHECK_BMI2ADX(LLADSTEP, ladderStepLeg, ladderStepBmi2Adx)
+ #undef regWork
+ #undef regMove
+ #undef x1
+ #undef x2
+ #undef z2
+ #undef x3
+ #undef z3
+ #undef t0
+ #undef t1
+ #undef b0
+ #undef b1
+
+// func diffAddAmd64(work *[5]fp.Elt, swap uint)
+// diffAddAmd64 calculates a differential point addition using a precomputed point.
+// (x1,z1) = (x1,z1)+(mu) using a difference point (x2,z2)
+// work = {mu,x1,z1,x2,z2} are five fp448.Elt of 56 bytes, and
+// stack = (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
+// This is Equation 7 at https://eprint.iacr.org/2017/264.
+TEXT ·diffAddAmd64(SB),NOSPLIT,$224-16
+ // Parameters
+ #define regWork DI
+ #define regSwap SI
+ #define ui 0*Size(regWork)
+ #define x1 1*Size(regWork)
+ #define z1 2*Size(regWork)
+ #define x2 3*Size(regWork)
+ #define z2 4*Size(regWork)
+ // Local variables
+ #define b0 0*Size(SP)
+ #define b1 2*Size(SP)
+ MOVQ w+0(FP), regWork
+ MOVQ b+8(FP), regSwap
+ cswap(x1,x2,regSwap)
+ cswap(z1,z2,regSwap)
+ CHECK_BMI2ADX(LDIFADD, difAddLeg, difAddBmi2Adx)
+ #undef regWork
+ #undef regSwap
+ #undef ui
+ #undef x1
+ #undef z1
+ #undef x2
+ #undef z2
+ #undef b0
+ #undef b1
+
+// func doubleAmd64(x, z *fp448.Elt)
+// doubleAmd64 calculates a point doubling (x1,z1) = 2*(x1,z1).
+// stack = (t0,t1) are two fp.Elt of fp.Size bytes, and
+// (b0,b1) are two-double precision fp.Elt of 2*fp.Size bytes.
+TEXT ·doubleAmd64(SB),NOSPLIT,$336-16
+ // Parameters
+ #define x1 0(DI)
+ #define z1 0(SI)
+ // Local variables
+ #define t0 0*Size(SP)
+ #define t1 1*Size(SP)
+ #define b0 2*Size(SP)
+ #define b1 4*Size(SP)
+ MOVQ x+0(FP), DI
+ MOVQ z+8(FP), SI
+ CHECK_BMI2ADX(LDOUB,doubleLeg,doubleBmi2Adx)
+ #undef x1
+ #undef z1
+ #undef t0
+ #undef t1
+ #undef b0
+ #undef b1
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_generic.go b/vendor/github.com/cloudflare/circl/dh/x448/curve_generic.go
new file mode 100644
index 000000000..b0b65ccf7
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x448/curve_generic.go
@@ -0,0 +1,100 @@
+package x448
+
+import (
+ "encoding/binary"
+ "math/bits"
+
+ "github.com/cloudflare/circl/math/fp448"
+)
+
+func doubleGeneric(x, z *fp448.Elt) {
+ t0, t1 := &fp448.Elt{}, &fp448.Elt{}
+ fp448.AddSub(x, z)
+ fp448.Sqr(x, x)
+ fp448.Sqr(z, z)
+ fp448.Sub(t0, x, z)
+ mulA24Generic(t1, t0)
+ fp448.Add(t1, t1, z)
+ fp448.Mul(x, x, z)
+ fp448.Mul(z, t0, t1)
+}
+
+func diffAddGeneric(w *[5]fp448.Elt, b uint) {
+ mu, x1, z1, x2, z2 := &w[0], &w[1], &w[2], &w[3], &w[4]
+ fp448.Cswap(x1, x2, b)
+ fp448.Cswap(z1, z2, b)
+ fp448.AddSub(x1, z1)
+ fp448.Mul(z1, z1, mu)
+ fp448.AddSub(x1, z1)
+ fp448.Sqr(x1, x1)
+ fp448.Sqr(z1, z1)
+ fp448.Mul(x1, x1, z2)
+ fp448.Mul(z1, z1, x2)
+}
+
+func ladderStepGeneric(w *[5]fp448.Elt, b uint) {
+ x1, x2, z2, x3, z3 := &w[0], &w[1], &w[2], &w[3], &w[4]
+ t0 := &fp448.Elt{}
+ t1 := &fp448.Elt{}
+ fp448.AddSub(x2, z2)
+ fp448.AddSub(x3, z3)
+ fp448.Mul(t0, x2, z3)
+ fp448.Mul(t1, x3, z2)
+ fp448.AddSub(t0, t1)
+ fp448.Cmov(x2, x3, b)
+ fp448.Cmov(z2, z3, b)
+ fp448.Sqr(x3, t0)
+ fp448.Sqr(z3, t1)
+ fp448.Mul(z3, x1, z3)
+ fp448.Sqr(x2, x2)
+ fp448.Sqr(z2, z2)
+ fp448.Sub(t0, x2, z2)
+ mulA24Generic(t1, t0)
+ fp448.Add(t1, t1, z2)
+ fp448.Mul(x2, x2, z2)
+ fp448.Mul(z2, t0, t1)
+}
+
+func mulA24Generic(z, x *fp448.Elt) {
+ const A24 = 39082
+ const n = 8
+ var xx [7]uint64
+ for i := range xx {
+ xx[i] = binary.LittleEndian.Uint64(x[i*n : (i+1)*n])
+ }
+ h0, l0 := bits.Mul64(xx[0], A24)
+ h1, l1 := bits.Mul64(xx[1], A24)
+ h2, l2 := bits.Mul64(xx[2], A24)
+ h3, l3 := bits.Mul64(xx[3], A24)
+ h4, l4 := bits.Mul64(xx[4], A24)
+ h5, l5 := bits.Mul64(xx[5], A24)
+ h6, l6 := bits.Mul64(xx[6], A24)
+
+ l1, c0 := bits.Add64(h0, l1, 0)
+ l2, c1 := bits.Add64(h1, l2, c0)
+ l3, c2 := bits.Add64(h2, l3, c1)
+ l4, c3 := bits.Add64(h3, l4, c2)
+ l5, c4 := bits.Add64(h4, l5, c3)
+ l6, c5 := bits.Add64(h5, l6, c4)
+ l7, _ := bits.Add64(h6, 0, c5)
+
+ l0, c0 = bits.Add64(l0, l7, 0)
+ l1, c1 = bits.Add64(l1, 0, c0)
+ l2, c2 = bits.Add64(l2, 0, c1)
+ l3, c3 = bits.Add64(l3, l7<<32, c2)
+ l4, c4 = bits.Add64(l4, 0, c3)
+ l5, c5 = bits.Add64(l5, 0, c4)
+ l6, l7 = bits.Add64(l6, 0, c5)
+
+ xx[0], c0 = bits.Add64(l0, l7, 0)
+ xx[1], c1 = bits.Add64(l1, 0, c0)
+ xx[2], c2 = bits.Add64(l2, 0, c1)
+ xx[3], c3 = bits.Add64(l3, l7<<32, c2)
+ xx[4], c4 = bits.Add64(l4, 0, c3)
+ xx[5], c5 = bits.Add64(l5, 0, c4)
+ xx[6], _ = bits.Add64(l6, 0, c5)
+
+ for i := range xx {
+ binary.LittleEndian.PutUint64(z[i*n:(i+1)*n], xx[i])
+ }
+}
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/curve_noasm.go b/vendor/github.com/cloudflare/circl/dh/x448/curve_noasm.go
new file mode 100644
index 000000000..3755b7c83
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x448/curve_noasm.go
@@ -0,0 +1,11 @@
+//go:build !amd64 || purego
+// +build !amd64 purego
+
+package x448
+
+import fp "github.com/cloudflare/circl/math/fp448"
+
+func double(x, z *fp.Elt) { doubleGeneric(x, z) }
+func diffAdd(w *[5]fp.Elt, b uint) { diffAddGeneric(w, b) }
+func ladderStep(w *[5]fp.Elt, b uint) { ladderStepGeneric(w, b) }
+func mulA24(z, x *fp.Elt) { mulA24Generic(z, x) }
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/doc.go b/vendor/github.com/cloudflare/circl/dh/x448/doc.go
new file mode 100644
index 000000000..c02904fed
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x448/doc.go
@@ -0,0 +1,19 @@
+/*
+Package x448 provides Diffie-Hellman functions as specified in RFC-7748.
+
+Validation of public keys.
+
+The Diffie-Hellman function, as described in RFC-7748 [1], works for any
+public key. However, if a different protocol requires contributory
+behaviour [2,3], then the public keys must be validated against low-order
+points [3,4]. To do that, the Shared function performs this validation
+internally and returns false when the public key is invalid (i.e., it
+is a low-order point).
+
+References:
+ - [1] RFC7748 by Langley, Hamburg, Turner (https://rfc-editor.org/rfc/rfc7748.txt)
+ - [2] Curve25519 by Bernstein (https://cr.yp.to/ecdh.html)
+ - [3] Bernstein (https://cr.yp.to/ecdh.html#validate)
+ - [4] Cremers&Jackson (https://eprint.iacr.org/2019/526)
+*/
+package x448
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/key.go b/vendor/github.com/cloudflare/circl/dh/x448/key.go
new file mode 100644
index 000000000..2fdde5116
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x448/key.go
@@ -0,0 +1,46 @@
+package x448
+
+import (
+ "crypto/subtle"
+
+ fp "github.com/cloudflare/circl/math/fp448"
+)
+
+// Size is the length in bytes of a X448 key.
+const Size = 56
+
+// Key represents a X448 key.
+type Key [Size]byte
+
+func (k *Key) clamp(in *Key) *Key {
+ *k = *in
+ k[0] &= 252
+ k[55] |= 128
+ return k
+}
+
+// isValidPubKey verifies if the public key is not a low-order point.
+func (k *Key) isValidPubKey() bool {
+ fp.Modp((*fp.Elt)(k))
+ var isLowOrder int
+ for _, P := range lowOrderPoints {
+ isLowOrder |= subtle.ConstantTimeCompare(P[:], k[:])
+ }
+ return isLowOrder == 0
+}
+
+// KeyGen obtains a public key given a secret key.
+func KeyGen(public, secret *Key) {
+ ladderJoye(public.clamp(secret))
+}
+
+// Shared calculates Alice's shared key from Alice's secret key and Bob's
+// public key returning true on success. A failure case happens when the public
+// key is a low-order point, thus the shared key is all-zeros and the function
+// returns false.
+func Shared(shared, secret, public *Key) bool {
+ validPk := *public
+ ok := validPk.isValidPubKey()
+ ladderMontgomery(shared.clamp(secret), &validPk)
+ return ok
+}
diff --git a/vendor/github.com/cloudflare/circl/dh/x448/table.go b/vendor/github.com/cloudflare/circl/dh/x448/table.go
new file mode 100644
index 000000000..eef53c30f
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/dh/x448/table.go
@@ -0,0 +1,460 @@
+package x448
+
+import fp "github.com/cloudflare/circl/math/fp448"
+
+// tableGenerator contains the set of points:
+//
+// t[i] = (xi+1)/(xi-1),
+//
+// where (xi,yi) = 2^iG and G is the generator point
+// Size = (448)*(448/8) = 25088 bytes.
+var tableGenerator = [448 * fp.Size]byte{
+ /* (2^ 0)P */ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+ /* (2^ 1)P */ 0x37, 0xfa, 0xaa, 0x0d, 0x86, 0xa6, 0x24, 0xe9, 0x6c, 0x95, 0x08, 0x34, 0xba, 0x1a, 0x81, 0x3a, 0xae, 0x01, 0xa5, 0xa7, 0x05, 0x85, 0x96, 0x00, 0x06, 0x5a, 0xd7, 0xff, 0xee, 0x8e, 0x8f, 0x94, 0xd2, 0xdc, 0xd7, 0xfc, 0xe7, 0xe5, 0x99, 0x1d, 0x05, 0x46, 0x43, 0xe8, 0xbc, 0x12, 0xb7, 0xeb, 0x30, 0x5e, 0x7a, 0x85, 0x68, 0xed, 0x9d, 0x28,
+ /* (2^ 2)P */ 0xf1, 0x7d, 0x08, 0x2b, 0x32, 0x4a, 0x62, 0x80, 0x36, 0xe7, 0xa4, 0x76, 0x5a, 0x2a, 0x1e, 0xf7, 0x9e, 0x3c, 0x40, 0x46, 0x9a, 0x1b, 0x61, 0xc1, 0xbf, 0x1a, 0x1b, 0xae, 0x91, 0x80, 0xa3, 0x76, 0x6c, 0xd4, 0x8f, 0xa4, 0xee, 0x26, 0x39, 0x23, 0xa4, 0x80, 0xf4, 0x66, 0x92, 0xe4, 0xe1, 0x18, 0x76, 0xc5, 0xe2, 0x19, 0x87, 0xd5, 0xc3, 0xe8,
+ /* (2^ 3)P */ 0xfb, 0xc9, 0xf0, 0x07, 0xf2, 0x93, 0xd8, 0x50, 0x36, 0xed, 0xfb, 0xbd, 0xb2, 0xd3, 0xfc, 0xdf, 0xd5, 0x2a, 0x6e, 0x26, 0x09, 0xce, 0xd4, 0x07, 0x64, 0x9f, 0x40, 0x74, 0xad, 0x98, 0x2f, 0x1c, 0xb6, 0xdc, 0x2d, 0x42, 0xff, 0xbf, 0x97, 0xd8, 0xdb, 0xef, 0x99, 0xca, 0x73, 0x99, 0x1a, 0x04, 0x3b, 0x56, 0x2c, 0x1f, 0x87, 0x9d, 0x9f, 0x03,
+ /* (2^ 4)P */ 0x4c, 0x35, 0x97, 0xf7, 0x81, 0x2c, 0x84, 0xa6, 0xe0, 0xcb, 0xce, 0x37, 0x4c, 0x21, 0x1c, 0x67, 0xfa, 0xab, 0x18, 0x4d, 0xef, 0xd0, 0xf0, 0x44, 0xa9, 0xfb, 0xc0, 0x8e, 0xda, 0x57, 0xa1, 0xd8, 0xeb, 0x87, 0xf4, 0x17, 0xea, 0x66, 0x0f, 0x16, 0xea, 0xcd, 0x5f, 0x3e, 0x88, 0xea, 0x09, 0x68, 0x40, 0xdf, 0x43, 0xcc, 0x54, 0x61, 0x58, 0xaa,
+ /* (2^ 5)P */ 0x8d, 0xe7, 0x59, 0xd7, 0x5e, 0x63, 0x37, 0xa7, 0x3f, 0xd1, 0x49, 0x85, 0x01, 0xdd, 0x5e, 0xb3, 0xe6, 0x29, 0xcb, 0x25, 0x93, 0xdd, 0x08, 0x96, 0x83, 0x52, 0x76, 0x85, 0xf5, 0x5d, 0x02, 0xbf, 0xe9, 0x6d, 0x15, 0x27, 0xc1, 0x09, 0xd1, 0x14, 0x4d, 0x6e, 0xe8, 0xaf, 0x59, 0x58, 0x34, 0x9d, 0x2a, 0x99, 0x85, 0x26, 0xbe, 0x4b, 0x1e, 0xb9,
+ /* (2^ 6)P */ 0x8d, 0xce, 0x94, 0xe2, 0x18, 0x56, 0x0d, 0x82, 0x8e, 0xdf, 0x85, 0x01, 0x8f, 0x93, 0x3c, 0xc6, 0xbd, 0x61, 0xfb, 0xf4, 0x22, 0xc5, 0x16, 0x87, 0xd1, 0xb1, 0x9e, 0x09, 0xc5, 0x83, 0x2e, 0x4a, 0x07, 0x88, 0xee, 0xe0, 0x29, 0x8d, 0x2e, 0x1f, 0x88, 0xad, 0xfd, 0x18, 0x93, 0xb7, 0xed, 0x42, 0x86, 0x78, 0xf0, 0xb8, 0x70, 0xbe, 0x01, 0x67,
+ /* (2^ 7)P */ 0xdf, 0x62, 0x2d, 0x94, 0xc7, 0x35, 0x23, 0xda, 0x27, 0xbb, 0x2b, 0xdb, 0x30, 0x80, 0x68, 0x16, 0xa3, 0xae, 0xd7, 0xd2, 0xa7, 0x7c, 0xbf, 0x6a, 0x1d, 0x83, 0xde, 0x96, 0x0a, 0x43, 0xb6, 0x30, 0x37, 0xd6, 0xee, 0x63, 0x59, 0x9a, 0xbf, 0xa3, 0x30, 0x6c, 0xaf, 0x0c, 0xee, 0x3d, 0xcb, 0x35, 0x4b, 0x55, 0x5f, 0x84, 0x85, 0xcb, 0x4f, 0x1e,
+ /* (2^ 8)P */ 0x9d, 0x04, 0x68, 0x89, 0xa4, 0xa9, 0x0d, 0x87, 0xc1, 0x70, 0xf1, 0xeb, 0xfb, 0x47, 0x0a, 0xf0, 0xde, 0x67, 0xb7, 0x94, 0xcd, 0x36, 0x43, 0xa5, 0x49, 0x43, 0x67, 0xc3, 0xee, 0x3c, 0x6b, 0xec, 0xd0, 0x1a, 0xf4, 0xad, 0xef, 0x06, 0x4a, 0xe8, 0x46, 0x24, 0xd7, 0x93, 0xbf, 0xf0, 0xe3, 0x81, 0x61, 0xec, 0xea, 0x64, 0xfe, 0x67, 0xeb, 0xc7,
+ /* (2^ 9)P */ 0x95, 0x45, 0x79, 0xcf, 0x2c, 0xfd, 0x9b, 0xfe, 0x84, 0x46, 0x4b, 0x8f, 0xa1, 0xcf, 0xc3, 0x04, 0x94, 0x78, 0xdb, 0xc9, 0xa6, 0x01, 0x75, 0xa4, 0xb4, 0x93, 0x72, 0x43, 0xa7, 0x7d, 0xda, 0x31, 0x38, 0x54, 0xab, 0x4e, 0x3f, 0x89, 0xa6, 0xab, 0x57, 0xc0, 0x16, 0x65, 0xdb, 0x92, 0x96, 0xe4, 0xc8, 0xae, 0xe7, 0x4c, 0x7a, 0xeb, 0xbb, 0x5a,
+ /* (2^ 10)P */ 0xbe, 0xfe, 0x86, 0xc3, 0x97, 0xe0, 0x6a, 0x18, 0x20, 0x21, 0xca, 0x22, 0x55, 0xa1, 0xeb, 0xf5, 0x74, 0xe5, 0xc9, 0x59, 0xa7, 0x92, 0x65, 0x15, 0x08, 0x71, 0xd1, 0x09, 0x7e, 0x83, 0xfc, 0xbc, 0x5a, 0x93, 0x38, 0x0d, 0x43, 0x42, 0xfd, 0x76, 0x30, 0xe8, 0x63, 0x60, 0x09, 0x8d, 0x6c, 0xd3, 0xf8, 0x56, 0x3d, 0x68, 0x47, 0xab, 0xa0, 0x1d,
+ /* (2^ 11)P */ 0x38, 0x50, 0x1c, 0xb1, 0xac, 0x88, 0x8f, 0x38, 0xe3, 0x69, 0xe6, 0xfc, 0x4f, 0x8f, 0xe1, 0x9b, 0xb1, 0x1a, 0x09, 0x39, 0x19, 0xdf, 0xcd, 0x98, 0x7b, 0x64, 0x42, 0xf6, 0x11, 0xea, 0xc7, 0xe8, 0x92, 0x65, 0x00, 0x2c, 0x75, 0xb5, 0x94, 0x1e, 0x5b, 0xa6, 0x66, 0x81, 0x77, 0xf3, 0x39, 0x94, 0xac, 0xbd, 0xe4, 0x2a, 0x66, 0x84, 0x9c, 0x60,
+ /* (2^ 12)P */ 0xb5, 0xb6, 0xd9, 0x03, 0x67, 0xa4, 0xa8, 0x0a, 0x4a, 0x2b, 0x9d, 0xfa, 0x13, 0xe1, 0x99, 0x25, 0x4a, 0x5c, 0x67, 0xb9, 0xb2, 0xb7, 0xdd, 0x1e, 0xaf, 0xeb, 0x63, 0x41, 0xb6, 0xb9, 0xa0, 0x87, 0x0a, 0xe0, 0x06, 0x07, 0xaa, 0x97, 0xf8, 0xf9, 0x38, 0x4f, 0xdf, 0x0c, 0x40, 0x7c, 0xc3, 0x98, 0xa9, 0x74, 0xf1, 0x5d, 0xda, 0xd1, 0xc0, 0x0a,
+ /* (2^ 13)P */ 0xf2, 0x0a, 0xab, 0xab, 0x94, 0x50, 0xf0, 0xa3, 0x6f, 0xc6, 0x66, 0xba, 0xa6, 0xdc, 0x44, 0xdd, 0xd6, 0x08, 0xf4, 0xd3, 0xed, 0xb1, 0x40, 0x93, 0xee, 0xf6, 0xb8, 0x8e, 0xb4, 0x7c, 0xb9, 0x82, 0xc9, 0x9d, 0x45, 0x3b, 0x8e, 0x10, 0xcb, 0x70, 0x1e, 0xba, 0x3c, 0x62, 0x50, 0xda, 0xa9, 0x93, 0xb5, 0xd7, 0xd0, 0x6f, 0x29, 0x52, 0x95, 0xae,
+ /* (2^ 14)P */ 0x14, 0x68, 0x69, 0x23, 0xa8, 0x44, 0x87, 0x9e, 0x22, 0x91, 0xe8, 0x92, 0xdf, 0xf7, 0xae, 0xba, 0x1c, 0x96, 0xe1, 0xc3, 0x94, 0xed, 0x6c, 0x95, 0xae, 0x96, 0xa7, 0x15, 0x9f, 0xf1, 0x17, 0x11, 0x92, 0x42, 0xd5, 0xcd, 0x18, 0xe7, 0xa9, 0xb5, 0x2f, 0xcd, 0xde, 0x6c, 0xc9, 0x7d, 0xfc, 0x7e, 0xbd, 0x7f, 0x10, 0x3d, 0x01, 0x00, 0x8d, 0x95,
+ /* (2^ 15)P */ 0x3b, 0x76, 0x72, 0xae, 0xaf, 0x84, 0xf2, 0xf7, 0xd1, 0x6d, 0x13, 0x9c, 0x47, 0xe1, 0xb7, 0xa3, 0x19, 0x16, 0xee, 0x75, 0x45, 0xf6, 0x1a, 0x7b, 0x78, 0x49, 0x79, 0x05, 0x86, 0xf0, 0x7f, 0x9f, 0xfc, 0xc4, 0xbd, 0x86, 0xf3, 0x41, 0xa7, 0xfe, 0x01, 0xd5, 0x67, 0x16, 0x10, 0x5b, 0xa5, 0x16, 0xf3, 0x7f, 0x60, 0xce, 0xd2, 0x0c, 0x8e, 0x4b,
+ /* (2^ 16)P */ 0x4a, 0x07, 0x99, 0x4a, 0x0f, 0x74, 0x91, 0x14, 0x68, 0xb9, 0x48, 0xb7, 0x44, 0x77, 0x9b, 0x4a, 0xe0, 0x68, 0x0e, 0x43, 0x4d, 0x98, 0x98, 0xbf, 0xa8, 0x3a, 0xb7, 0x6d, 0x2a, 0x9a, 0x77, 0x5f, 0x62, 0xf5, 0x6b, 0x4a, 0xb7, 0x7d, 0xe5, 0x09, 0x6b, 0xc0, 0x8b, 0x9c, 0x88, 0x37, 0x33, 0xf2, 0x41, 0xac, 0x22, 0x1f, 0xcf, 0x3b, 0x82, 0x34,
+ /* (2^ 17)P */ 0x00, 0xc3, 0x78, 0x42, 0x32, 0x2e, 0xdc, 0xda, 0xb1, 0x96, 0x21, 0xa4, 0xe4, 0xbb, 0xe9, 0x9d, 0xbb, 0x0f, 0x93, 0xed, 0x26, 0x3d, 0xb5, 0xdb, 0x94, 0x31, 0x37, 0x07, 0xa2, 0xb2, 0xd5, 0x99, 0x0d, 0x93, 0xe1, 0xce, 0x3f, 0x0b, 0x96, 0x82, 0x47, 0xfe, 0x60, 0x6f, 0x8f, 0x61, 0x88, 0xd7, 0x05, 0x95, 0x0b, 0x46, 0x06, 0xb7, 0x32, 0x06,
+ /* (2^ 18)P */ 0x44, 0xf5, 0x34, 0xdf, 0x2f, 0x9c, 0x5d, 0x9f, 0x53, 0x5c, 0x42, 0x8f, 0xc9, 0xdc, 0xd8, 0x40, 0xa2, 0xe7, 0x6a, 0x4a, 0x05, 0xf7, 0x86, 0x77, 0x2b, 0xae, 0x37, 0xed, 0x48, 0xfb, 0xf7, 0x62, 0x7c, 0x17, 0x59, 0x92, 0x41, 0x61, 0x93, 0x38, 0x30, 0xd1, 0xef, 0x54, 0x54, 0x03, 0x17, 0x57, 0x91, 0x15, 0x11, 0x33, 0xb5, 0xfa, 0xfb, 0x17,
+ /* (2^ 19)P */ 0x29, 0xbb, 0xd4, 0xb4, 0x9c, 0xf1, 0x72, 0x94, 0xce, 0x6a, 0x29, 0xa8, 0x89, 0x18, 0x19, 0xf7, 0xb7, 0xcc, 0xee, 0x9a, 0x02, 0xe3, 0xc0, 0xb1, 0xe0, 0xee, 0x83, 0x78, 0xb4, 0x9e, 0x07, 0x87, 0xdf, 0xb0, 0x82, 0x26, 0x4e, 0xa4, 0x0c, 0x33, 0xaf, 0x40, 0x59, 0xb6, 0xdd, 0x52, 0x45, 0xf0, 0xb4, 0xf6, 0xe8, 0x4e, 0x4e, 0x79, 0x1a, 0x5d,
+ /* (2^ 20)P */ 0x27, 0x33, 0x4d, 0x4c, 0x6b, 0x4f, 0x75, 0xb1, 0xbc, 0x1f, 0xab, 0x5b, 0x2b, 0xf0, 0x1c, 0x57, 0x86, 0xdd, 0xfd, 0x60, 0xb0, 0x8c, 0xe7, 0x9a, 0xe5, 0x5c, 0xeb, 0x11, 0x3a, 0xda, 0x22, 0x25, 0x99, 0x06, 0x8d, 0xf4, 0xaf, 0x29, 0x7a, 0xc9, 0xe5, 0xd2, 0x16, 0x9e, 0xd4, 0x63, 0x1d, 0x64, 0xa6, 0x47, 0x96, 0x37, 0x6f, 0x93, 0x2c, 0xcc,
+ /* (2^ 21)P */ 0xc1, 0x94, 0x74, 0x86, 0x75, 0xf2, 0x91, 0x58, 0x23, 0x85, 0x63, 0x76, 0x54, 0xc7, 0xb4, 0x8c, 0xbc, 0x4e, 0xc4, 0xa7, 0xba, 0xa0, 0x55, 0x26, 0x71, 0xd5, 0x33, 0x72, 0xc9, 0xad, 0x1e, 0xf9, 0x5d, 0x78, 0x70, 0x93, 0x4e, 0x85, 0xfc, 0x39, 0x06, 0x73, 0x76, 0xff, 0xe8, 0x64, 0x69, 0x42, 0x45, 0xb2, 0x69, 0xb5, 0x32, 0xe7, 0x2c, 0xde,
+ /* (2^ 22)P */ 0xde, 0x16, 0xd8, 0x33, 0x49, 0x32, 0xe9, 0x0e, 0x3a, 0x60, 0xee, 0x2e, 0x24, 0x75, 0xe3, 0x9c, 0x92, 0x07, 0xdb, 0xad, 0x92, 0xf5, 0x11, 0xdf, 0xdb, 0xb0, 0x17, 0x5c, 0xd6, 0x1a, 0x70, 0x00, 0xb7, 0xe2, 0x18, 0xec, 0xdc, 0xc2, 0x02, 0x93, 0xb3, 0xc8, 0x3f, 0x4f, 0x1b, 0x96, 0xe6, 0x33, 0x8c, 0xfb, 0xcc, 0xa5, 0x4e, 0xe8, 0xe7, 0x11,
+ /* (2^ 23)P */ 0x05, 0x7a, 0x74, 0x52, 0xf8, 0xdf, 0x0d, 0x7c, 0x6a, 0x1a, 0x4e, 0x9a, 0x02, 0x1d, 0xae, 0x77, 0xf8, 0x8e, 0xf9, 0xa2, 0x38, 0x54, 0x50, 0xb2, 0x2c, 0x08, 0x9d, 0x9b, 0x9f, 0xfb, 0x2b, 0x06, 0xde, 0x9d, 0xc2, 0x03, 0x0b, 0x22, 0x2b, 0x10, 0x5b, 0x3a, 0x73, 0x29, 0x8e, 0x3e, 0x37, 0x08, 0x2c, 0x3b, 0xf8, 0x80, 0xc1, 0x66, 0x1e, 0x98,
+ /* (2^ 24)P */ 0xd8, 0xd6, 0x3e, 0xcd, 0x63, 0x8c, 0x2b, 0x41, 0x81, 0xc0, 0x0c, 0x06, 0x87, 0xd6, 0xe7, 0x92, 0xfe, 0xf1, 0x0c, 0x4a, 0x84, 0x5b, 0xaf, 0x40, 0x53, 0x6f, 0x60, 0xd6, 0x6b, 0x76, 0x4b, 0xc2, 0xad, 0xc9, 0xb6, 0xb6, 0x6a, 0xa2, 0xb3, 0xf5, 0xf5, 0xc2, 0x55, 0x83, 0xb2, 0xd3, 0xe9, 0x41, 0x6c, 0x63, 0x51, 0xb8, 0x81, 0x74, 0xc8, 0x2c,
+ /* (2^ 25)P */ 0xb2, 0xaf, 0x1c, 0xee, 0x07, 0xb0, 0x58, 0xa8, 0x2c, 0x6a, 0xc9, 0x2d, 0x62, 0x28, 0x75, 0x0c, 0x40, 0xb6, 0x11, 0x33, 0x96, 0x80, 0x28, 0x6d, 0xd5, 0x9e, 0x87, 0x90, 0x01, 0x66, 0x1d, 0x1c, 0xf8, 0xb4, 0x92, 0xac, 0x38, 0x18, 0x05, 0xc2, 0x4c, 0x4b, 0x54, 0x7d, 0x80, 0x46, 0x87, 0x2d, 0x99, 0x8e, 0x70, 0x80, 0x69, 0x71, 0x8b, 0xed,
+ /* (2^ 26)P */ 0x37, 0xa7, 0x6b, 0x71, 0x36, 0x75, 0x8e, 0xff, 0x0f, 0x42, 0xda, 0x5a, 0x46, 0xa6, 0x97, 0x79, 0x7e, 0x30, 0xb3, 0x8f, 0xc7, 0x3a, 0xa0, 0xcb, 0x1d, 0x9c, 0x78, 0x77, 0x36, 0xc2, 0xe7, 0xf4, 0x2f, 0x29, 0x07, 0xb1, 0x07, 0xfd, 0xed, 0x1b, 0x39, 0x77, 0x06, 0x38, 0x77, 0x0f, 0x50, 0x31, 0x12, 0xbf, 0x92, 0xbf, 0x72, 0x79, 0x54, 0xa9,
+ /* (2^ 27)P */ 0xbd, 0x4d, 0x46, 0x6b, 0x1a, 0x80, 0x46, 0x2d, 0xed, 0xfd, 0x64, 0x6d, 0x94, 0xbc, 0x4a, 0x6e, 0x0c, 0x12, 0xf6, 0x12, 0xab, 0x54, 0x88, 0xd3, 0x85, 0xac, 0x51, 0xae, 0x6f, 0xca, 0xc4, 0xb7, 0xec, 0x22, 0x54, 0x6d, 0x80, 0xb2, 0x1c, 0x63, 0x33, 0x76, 0x6b, 0x8e, 0x6d, 0x59, 0xcd, 0x73, 0x92, 0x5f, 0xff, 0xad, 0x10, 0x35, 0x70, 0x5f,
+ /* (2^ 28)P */ 0xb3, 0x84, 0xde, 0xc8, 0x04, 0x43, 0x63, 0xfa, 0x29, 0xd9, 0xf0, 0x69, 0x65, 0x5a, 0x0c, 0xe8, 0x2e, 0x0b, 0xfe, 0xb0, 0x7a, 0x42, 0xb3, 0xc3, 0xfc, 0xe6, 0xb8, 0x92, 0x29, 0xae, 0xed, 0xec, 0xd5, 0xe8, 0x4a, 0xa1, 0xbd, 0x3b, 0xd3, 0xc0, 0x07, 0xab, 0x65, 0x65, 0x35, 0x9a, 0xa6, 0x5e, 0x78, 0x18, 0x76, 0x1c, 0x15, 0x49, 0xe6, 0x75,
+ /* (2^ 29)P */ 0x45, 0xb3, 0x92, 0xa9, 0xc3, 0xb8, 0x11, 0x68, 0x64, 0x3a, 0x83, 0x5d, 0xa8, 0x94, 0x6a, 0x9d, 0xaa, 0x27, 0x9f, 0x98, 0x5d, 0xc0, 0x29, 0xf0, 0xc0, 0x4b, 0x14, 0x3c, 0x05, 0xe7, 0xf8, 0xbd, 0x38, 0x22, 0x96, 0x75, 0x65, 0x5e, 0x0d, 0x3f, 0xbb, 0x6f, 0xe8, 0x3f, 0x96, 0x76, 0x9f, 0xba, 0xd9, 0x44, 0x92, 0x96, 0x22, 0xe7, 0x52, 0xe7,
+ /* (2^ 30)P */ 0xf4, 0xa3, 0x95, 0x90, 0x47, 0xdf, 0x7d, 0xdc, 0xf4, 0x13, 0x87, 0x67, 0x7d, 0x4f, 0x9d, 0xa0, 0x00, 0x46, 0x72, 0x08, 0xc3, 0xa2, 0x7a, 0x3e, 0xe7, 0x6d, 0x52, 0x7c, 0x11, 0x36, 0x50, 0x83, 0x89, 0x64, 0xcb, 0x1f, 0x08, 0x83, 0x46, 0xcb, 0xac, 0xa6, 0xd8, 0x9c, 0x1b, 0xe8, 0x05, 0x47, 0xc7, 0x26, 0x06, 0x83, 0x39, 0xe9, 0xb1, 0x1c,
+ /* (2^ 31)P */ 0x11, 0xe8, 0xc8, 0x42, 0xbf, 0x30, 0x9c, 0xa3, 0xf1, 0x85, 0x96, 0x95, 0x4f, 0x4f, 0x52, 0xa2, 0xf5, 0x8b, 0x68, 0x24, 0x16, 0xac, 0x9b, 0xa9, 0x27, 0x28, 0x0e, 0x84, 0x03, 0x46, 0x22, 0x5f, 0xf7, 0x0d, 0xa6, 0x85, 0x88, 0xc1, 0x45, 0x4b, 0x85, 0x1a, 0x10, 0x7f, 0xc9, 0x94, 0x20, 0xb0, 0x04, 0x28, 0x12, 0x30, 0xb9, 0xe6, 0x40, 0x6b,
+ /* (2^ 32)P */ 0xac, 0x1b, 0x57, 0xb6, 0x42, 0xdb, 0x81, 0x8d, 0x76, 0xfd, 0x9b, 0x1c, 0x29, 0x30, 0xd5, 0x3a, 0xcc, 0x53, 0xd9, 0x26, 0x7a, 0x0f, 0x9c, 0x2e, 0x79, 0xf5, 0x62, 0xeb, 0x61, 0x9d, 0x9b, 0x80, 0x39, 0xcd, 0x60, 0x2e, 0x1f, 0x08, 0x22, 0xbc, 0x19, 0xb3, 0x2a, 0x43, 0x44, 0xf2, 0x4e, 0x66, 0xf4, 0x36, 0xa6, 0xa7, 0xbc, 0xa4, 0x15, 0x7e,
+ /* (2^ 33)P */ 0xc1, 0x90, 0x8a, 0xde, 0xff, 0x78, 0xc3, 0x73, 0x16, 0xee, 0x76, 0xa0, 0x84, 0x60, 0x8d, 0xe6, 0x82, 0x0f, 0xde, 0x4e, 0xc5, 0x99, 0x34, 0x06, 0x90, 0x44, 0x55, 0xf8, 0x91, 0xd8, 0xe1, 0xe4, 0x2c, 0x8a, 0xde, 0x94, 0x1e, 0x78, 0x25, 0x3d, 0xfd, 0xd8, 0x59, 0x7d, 0xaf, 0x6e, 0xbe, 0x96, 0xbe, 0x3c, 0x16, 0x23, 0x0f, 0x4c, 0xa4, 0x28,
+ /* (2^ 34)P */ 0xba, 0x11, 0x35, 0x57, 0x03, 0xb6, 0xf4, 0x24, 0x89, 0xb8, 0x5a, 0x0d, 0x50, 0x9c, 0xaa, 0x51, 0x7f, 0xa4, 0x0e, 0xfc, 0x71, 0xb3, 0x3b, 0xf1, 0x96, 0x50, 0x23, 0x15, 0xf5, 0xf5, 0xd4, 0x23, 0xdc, 0x8b, 0x26, 0x9e, 0xae, 0xb7, 0x50, 0xcd, 0xc4, 0x25, 0xf6, 0x75, 0x40, 0x9c, 0x37, 0x79, 0x33, 0x60, 0xd4, 0x4b, 0x13, 0x32, 0xee, 0xe2,
+ /* (2^ 35)P */ 0x43, 0xb8, 0x56, 0x59, 0xf0, 0x68, 0x23, 0xb3, 0xea, 0x70, 0x58, 0x4c, 0x1e, 0x5a, 0x16, 0x54, 0x03, 0xb2, 0xf4, 0x73, 0xb6, 0xd9, 0x5c, 0x9c, 0x6f, 0xcf, 0x82, 0x2e, 0x54, 0x15, 0x46, 0x2c, 0xa3, 0xda, 0x4e, 0x87, 0xf5, 0x2b, 0xba, 0x91, 0xa3, 0xa0, 0x89, 0xba, 0x48, 0x2b, 0xfa, 0x64, 0x02, 0x7f, 0x78, 0x03, 0xd1, 0xe8, 0x3b, 0xe9,
+ /* (2^ 36)P */ 0x15, 0xa4, 0x71, 0xd4, 0x0c, 0x24, 0xe9, 0x07, 0xa1, 0x43, 0xf4, 0x7f, 0xbb, 0xa2, 0xa6, 0x6b, 0xfa, 0xb7, 0xea, 0x58, 0xd1, 0x96, 0xb0, 0x24, 0x5c, 0xc7, 0x37, 0x4e, 0x60, 0x0f, 0x40, 0xf2, 0x2f, 0x44, 0x70, 0xea, 0x80, 0x63, 0xfe, 0xfc, 0x46, 0x59, 0x12, 0x27, 0xb5, 0x27, 0xfd, 0xb7, 0x73, 0x0b, 0xca, 0x8b, 0xc2, 0xd3, 0x71, 0x08,
+ /* (2^ 37)P */ 0x26, 0x0e, 0xd7, 0x52, 0x6f, 0xf1, 0xf2, 0x9d, 0xb8, 0x3d, 0xbd, 0xd4, 0x75, 0x97, 0xd8, 0xbf, 0xa8, 0x86, 0x96, 0xa5, 0x80, 0xa0, 0x45, 0x75, 0xf6, 0x77, 0x71, 0xdb, 0x77, 0x96, 0x55, 0x99, 0x31, 0xd0, 0x4f, 0x34, 0xf4, 0x35, 0x39, 0x41, 0xd3, 0x7d, 0xf7, 0xe2, 0x74, 0xde, 0xbe, 0x5b, 0x1f, 0x39, 0x10, 0x21, 0xa3, 0x4d, 0x3b, 0xc8,
+ /* (2^ 38)P */ 0x04, 0x00, 0x2a, 0x45, 0xb2, 0xaf, 0x9b, 0x18, 0x6a, 0xeb, 0x96, 0x28, 0xa4, 0x77, 0xd0, 0x13, 0xcf, 0x17, 0x65, 0xe8, 0xc5, 0x81, 0x28, 0xad, 0x39, 0x7a, 0x0b, 0xaa, 0x55, 0x2b, 0xf3, 0xfc, 0x86, 0x40, 0xad, 0x0d, 0x1e, 0x28, 0xa2, 0x2d, 0xc5, 0xd6, 0x04, 0x15, 0xa2, 0x30, 0x3d, 0x12, 0x8e, 0xd6, 0xb5, 0xf7, 0x69, 0xbb, 0x84, 0x20,
+ /* (2^ 39)P */ 0xd7, 0x7a, 0x77, 0x2c, 0xfb, 0x81, 0x80, 0xe9, 0x1e, 0xc6, 0x36, 0x31, 0x79, 0xc3, 0x7c, 0xa9, 0x57, 0x6b, 0xb5, 0x70, 0xfb, 0xe4, 0xa1, 0xff, 0xfd, 0x21, 0xa5, 0x7c, 0xfa, 0x44, 0xba, 0x0d, 0x96, 0x3d, 0xc4, 0x5c, 0x39, 0x52, 0x87, 0xd7, 0x22, 0x0f, 0x52, 0x88, 0x91, 0x87, 0x96, 0xac, 0xfa, 0x3b, 0xdf, 0xdc, 0x83, 0x8c, 0x99, 0x29,
+ /* (2^ 40)P */ 0x98, 0x6b, 0x3a, 0x8d, 0x83, 0x17, 0xe1, 0x62, 0xd8, 0x80, 0x4c, 0x97, 0xce, 0x6b, 0xaa, 0x10, 0xa7, 0xc4, 0xe9, 0xeb, 0xa5, 0xfb, 0xc9, 0xdd, 0x2d, 0xeb, 0xfc, 0x9a, 0x71, 0xcd, 0x68, 0x6e, 0xc0, 0x35, 0x64, 0x62, 0x1b, 0x95, 0x12, 0xe8, 0x53, 0xec, 0xf0, 0xf4, 0x86, 0x86, 0x78, 0x18, 0xc4, 0xc6, 0xbc, 0x5a, 0x59, 0x8f, 0x7c, 0x7e,
+ /* (2^ 41)P */ 0x7f, 0xd7, 0x1e, 0xc5, 0x83, 0xdc, 0x1f, 0xbe, 0x0b, 0xcf, 0x2e, 0x01, 0x01, 0xed, 0xac, 0x17, 0x3b, 0xed, 0xa4, 0x30, 0x96, 0x0e, 0x14, 0x7e, 0x19, 0x2b, 0xa5, 0x67, 0x1e, 0xb3, 0x34, 0x03, 0xa8, 0xbb, 0x0a, 0x7d, 0x08, 0x2d, 0xd5, 0x53, 0x19, 0x6f, 0x13, 0xd5, 0xc0, 0x90, 0x8a, 0xcc, 0xc9, 0x5c, 0xab, 0x24, 0xd7, 0x03, 0xf6, 0x57,
+ /* (2^ 42)P */ 0x49, 0xcb, 0xb4, 0x96, 0x5f, 0xa6, 0xf8, 0x71, 0x6f, 0x59, 0xad, 0x05, 0x24, 0x2d, 0xaf, 0x67, 0xa8, 0xbe, 0x95, 0xdf, 0x0d, 0x28, 0x5a, 0x7f, 0x6e, 0x87, 0x8c, 0x6e, 0x67, 0x0c, 0xf4, 0xe0, 0x1c, 0x30, 0xc2, 0x66, 0xae, 0x20, 0xa1, 0x34, 0xec, 0x9c, 0xbc, 0xae, 0x3d, 0xa1, 0x28, 0x28, 0x95, 0x1d, 0xc9, 0x3a, 0xa8, 0xfd, 0xfc, 0xa1,
+ /* (2^ 43)P */ 0xe2, 0x2b, 0x9d, 0xed, 0x02, 0x99, 0x67, 0xbb, 0x2e, 0x16, 0x62, 0x05, 0x70, 0xc7, 0x27, 0xb9, 0x1c, 0x3f, 0xf2, 0x11, 0x01, 0xd8, 0x51, 0xa4, 0x18, 0x92, 0xa9, 0x5d, 0xfb, 0xa9, 0xe4, 0x42, 0xba, 0x38, 0x34, 0x1a, 0x4a, 0xc5, 0x6a, 0x37, 0xde, 0xa7, 0x0c, 0xb4, 0x7e, 0x7f, 0xde, 0xa6, 0xee, 0xcd, 0x55, 0x57, 0x05, 0x06, 0xfd, 0x5d,
+ /* (2^ 44)P */ 0x2f, 0x32, 0xcf, 0x2e, 0x2c, 0x7b, 0xbe, 0x9a, 0x0c, 0x57, 0x35, 0xf8, 0x87, 0xda, 0x9c, 0xec, 0x48, 0xf2, 0xbb, 0xe2, 0xda, 0x10, 0x58, 0x20, 0xc6, 0xd3, 0x87, 0xe9, 0xc7, 0x26, 0xd1, 0x9a, 0x46, 0x87, 0x90, 0xda, 0xdc, 0xde, 0xc3, 0xb3, 0xf2, 0xe8, 0x6f, 0x4a, 0xe6, 0xe8, 0x9d, 0x98, 0x36, 0x20, 0x03, 0x47, 0x15, 0x3f, 0x64, 0x59,
+ /* (2^ 45)P */ 0xd4, 0x71, 0x49, 0x0a, 0x67, 0x97, 0xaa, 0x3f, 0xf4, 0x1b, 0x3a, 0x6e, 0x5e, 0x17, 0xcc, 0x0a, 0x8f, 0x81, 0x6a, 0x41, 0x38, 0x77, 0x40, 0x8a, 0x11, 0x42, 0x62, 0xd2, 0x50, 0x32, 0x79, 0x78, 0x28, 0xc2, 0x2e, 0x10, 0x01, 0x94, 0x30, 0x4f, 0x7f, 0x18, 0x17, 0x56, 0x85, 0x4e, 0xad, 0xf7, 0xcb, 0x87, 0x3c, 0x3f, 0x50, 0x2c, 0xc0, 0xba,
+ /* (2^ 46)P */ 0xbc, 0x30, 0x8e, 0x65, 0x8e, 0x57, 0x5b, 0x38, 0x7a, 0xd4, 0x95, 0x52, 0x7a, 0x32, 0x59, 0x69, 0xcd, 0x9d, 0x47, 0x34, 0x5b, 0x55, 0xa5, 0x24, 0x60, 0xdd, 0xc0, 0xc1, 0x62, 0x73, 0x44, 0xae, 0x4c, 0x9c, 0x65, 0x55, 0x1b, 0x9d, 0x8a, 0x29, 0xb0, 0x1a, 0x52, 0xa8, 0xf1, 0xe6, 0x9a, 0xb3, 0xf6, 0xa3, 0xc9, 0x0a, 0x70, 0x7d, 0x0f, 0xee,
+ /* (2^ 47)P */ 0x77, 0xd3, 0xe5, 0x8e, 0xfa, 0x00, 0xeb, 0x1b, 0x7f, 0xdc, 0x68, 0x3f, 0x92, 0xbd, 0xb7, 0x0b, 0xb7, 0xb5, 0x24, 0xdf, 0xc5, 0x67, 0x53, 0xd4, 0x36, 0x79, 0xc4, 0x7b, 0x57, 0xbc, 0x99, 0x97, 0x60, 0xef, 0xe4, 0x01, 0xa1, 0xa7, 0xaa, 0x12, 0x36, 0x29, 0xb1, 0x03, 0xc2, 0x83, 0x1c, 0x2b, 0x83, 0xef, 0x2e, 0x2c, 0x23, 0x92, 0xfd, 0xd1,
+ /* (2^ 48)P */ 0x94, 0xef, 0x03, 0x59, 0xfa, 0x8a, 0x18, 0x76, 0xee, 0x58, 0x08, 0x4d, 0x44, 0xce, 0xf1, 0x52, 0x33, 0x49, 0xf6, 0x69, 0x71, 0xe3, 0xa9, 0xbc, 0x86, 0xe3, 0x43, 0xde, 0x33, 0x7b, 0x90, 0x8b, 0x3e, 0x7d, 0xd5, 0x4a, 0xf0, 0x23, 0x99, 0xa6, 0xea, 0x5f, 0x08, 0xe5, 0xb9, 0x49, 0x8b, 0x0d, 0x6a, 0x21, 0xab, 0x07, 0x62, 0xcd, 0xc4, 0xbe,
+ /* (2^ 49)P */ 0x61, 0xbf, 0x70, 0x14, 0xfa, 0x4e, 0x9e, 0x7c, 0x0c, 0xf8, 0xb2, 0x48, 0x71, 0x62, 0x83, 0xd6, 0xd1, 0xdc, 0x9c, 0x29, 0x66, 0xb1, 0x34, 0x9c, 0x8d, 0xe6, 0x88, 0xaf, 0xbe, 0xdc, 0x4d, 0xeb, 0xb0, 0xe7, 0x28, 0xae, 0xb2, 0x05, 0x56, 0xc6, 0x0e, 0x10, 0x26, 0xab, 0x2c, 0x59, 0x72, 0x03, 0x66, 0xfe, 0x8f, 0x2c, 0x51, 0x2d, 0xdc, 0xae,
+ /* (2^ 50)P */ 0xdc, 0x63, 0xf1, 0x8b, 0x5c, 0x65, 0x0b, 0xf1, 0xa6, 0x22, 0xe2, 0xd9, 0xdb, 0x49, 0xb1, 0x3c, 0x47, 0xc2, 0xfe, 0xac, 0x86, 0x07, 0x52, 0xec, 0xb0, 0x08, 0x69, 0xfb, 0xd1, 0x06, 0xdc, 0x48, 0x5c, 0x3d, 0xb2, 0x4d, 0xb8, 0x1a, 0x4e, 0xda, 0xb9, 0xc1, 0x2b, 0xab, 0x4b, 0x62, 0x81, 0x21, 0x9a, 0xfc, 0x3d, 0x39, 0x83, 0x11, 0x36, 0xeb,
+ /* (2^ 51)P */ 0x94, 0xf3, 0x17, 0xef, 0xf9, 0x60, 0x54, 0xc3, 0xd7, 0x27, 0x35, 0xc5, 0x98, 0x5e, 0xf6, 0x63, 0x6c, 0xa0, 0x4a, 0xd3, 0xa3, 0x98, 0xd9, 0x42, 0xe3, 0xf1, 0xf8, 0x81, 0x96, 0xa9, 0xea, 0x6d, 0x4b, 0x8e, 0x33, 0xca, 0x94, 0x0d, 0xa0, 0xf7, 0xbb, 0x64, 0xa3, 0x36, 0x6f, 0xdc, 0x5a, 0x94, 0x42, 0xca, 0x06, 0xb2, 0x2b, 0x9a, 0x9f, 0x71,
+ /* (2^ 52)P */ 0xec, 0xdb, 0xa6, 0x1f, 0xdf, 0x15, 0x36, 0xa3, 0xda, 0x8a, 0x7a, 0xb6, 0xa7, 0xe3, 0xaf, 0x52, 0xe0, 0x8d, 0xe8, 0xf2, 0x44, 0x20, 0xeb, 0xa1, 0x20, 0xc4, 0x65, 0x3c, 0x7c, 0x6c, 0x49, 0xed, 0x2f, 0x66, 0x23, 0x68, 0x61, 0x91, 0x40, 0x9f, 0x50, 0x19, 0xd1, 0x84, 0xa7, 0xe2, 0xed, 0x34, 0x37, 0xe3, 0xe4, 0x11, 0x7f, 0x87, 0x55, 0x0f,
+ /* (2^ 53)P */ 0xb3, 0xa1, 0x0f, 0xb0, 0x48, 0xc0, 0x4d, 0x96, 0xa7, 0xcf, 0x5a, 0x81, 0xb8, 0x4a, 0x46, 0xef, 0x0a, 0xd3, 0x40, 0x7e, 0x02, 0xe3, 0x63, 0xaa, 0x50, 0xd1, 0x2a, 0x37, 0x22, 0x4a, 0x7f, 0x4f, 0xb6, 0xf9, 0x01, 0x82, 0x78, 0x3d, 0x93, 0x14, 0x11, 0x8a, 0x90, 0x60, 0xcd, 0x45, 0x4e, 0x7b, 0x42, 0xb9, 0x3e, 0x6e, 0x68, 0x1f, 0x36, 0x41,
+ /* (2^ 54)P */ 0x13, 0x73, 0x0e, 0x4f, 0x79, 0x93, 0x9e, 0x29, 0x70, 0x7b, 0x4a, 0x59, 0x1a, 0x9a, 0xf4, 0x55, 0x08, 0xf0, 0xdb, 0x17, 0x58, 0xec, 0x64, 0xad, 0x7f, 0x29, 0xeb, 0x3f, 0x85, 0x4e, 0x60, 0x28, 0x98, 0x1f, 0x73, 0x4e, 0xe6, 0xa8, 0xab, 0xd5, 0xd6, 0xfc, 0xa1, 0x36, 0x6d, 0x15, 0xc6, 0x13, 0x83, 0xa0, 0xc2, 0x6e, 0xd9, 0xdb, 0xc9, 0xcc,
+ /* (2^ 55)P */ 0xff, 0xd8, 0x52, 0xa3, 0xdc, 0x99, 0xcf, 0x3e, 0x19, 0xb3, 0x68, 0xd0, 0xb5, 0x0d, 0xb8, 0xee, 0x3f, 0xef, 0x6e, 0xc0, 0x38, 0x28, 0x44, 0x92, 0x78, 0x91, 0x1a, 0x08, 0x78, 0x6c, 0x65, 0x24, 0xf3, 0xa2, 0x3d, 0xf2, 0xe5, 0x79, 0x62, 0x69, 0x29, 0xf4, 0x22, 0xc5, 0xdb, 0x6a, 0xae, 0xf4, 0x44, 0xa3, 0x6f, 0xc7, 0x86, 0xab, 0xef, 0xef,
+ /* (2^ 56)P */ 0xbf, 0x54, 0x9a, 0x09, 0x5d, 0x17, 0xd0, 0xde, 0xfb, 0xf5, 0xca, 0xff, 0x13, 0x20, 0x88, 0x82, 0x3a, 0xe2, 0xd0, 0x3b, 0xfb, 0x05, 0x76, 0xd1, 0xc0, 0x02, 0x71, 0x3b, 0x94, 0xe8, 0xc9, 0x84, 0xcf, 0xa4, 0xe9, 0x28, 0x7b, 0xf5, 0x09, 0xc3, 0x2b, 0x22, 0x40, 0xf1, 0x68, 0x24, 0x24, 0x7d, 0x9f, 0x6e, 0xcd, 0xfe, 0xb0, 0x19, 0x61, 0xf5,
+ /* (2^ 57)P */ 0xe8, 0x63, 0x51, 0xb3, 0x95, 0x6b, 0x7b, 0x74, 0x92, 0x52, 0x45, 0xa4, 0xed, 0xea, 0x0e, 0x0d, 0x2b, 0x01, 0x1e, 0x2c, 0xbc, 0x91, 0x06, 0x69, 0xdb, 0x1f, 0xb5, 0x77, 0x1d, 0x56, 0xf5, 0xb4, 0x02, 0x80, 0x49, 0x56, 0x12, 0xce, 0x86, 0x05, 0xc9, 0xd9, 0xae, 0xf3, 0x6d, 0xe6, 0x3f, 0x40, 0x52, 0xe9, 0x49, 0x2b, 0x31, 0x06, 0x86, 0x14,
+ /* (2^ 58)P */ 0xf5, 0x09, 0x3b, 0xd2, 0xff, 0xdf, 0x11, 0xa5, 0x1c, 0x99, 0xe8, 0x1b, 0xa4, 0x2c, 0x7d, 0x8e, 0xc8, 0xf7, 0x03, 0x46, 0xfa, 0xb6, 0xde, 0x73, 0x91, 0x7e, 0x5a, 0x7a, 0xd7, 0x9a, 0x5b, 0x80, 0x24, 0x62, 0x5e, 0x92, 0xf1, 0xa3, 0x45, 0xa3, 0x43, 0x92, 0x8a, 0x2a, 0x5b, 0x0c, 0xb4, 0xc8, 0xad, 0x1c, 0xb6, 0x6c, 0x5e, 0x81, 0x18, 0x91,
+ /* (2^ 59)P */ 0x96, 0xb3, 0xca, 0x2b, 0xe3, 0x7a, 0x59, 0x72, 0x17, 0x74, 0x29, 0x21, 0xe7, 0x78, 0x07, 0xad, 0xda, 0xb6, 0xcd, 0xf9, 0x27, 0x4d, 0xc8, 0xf2, 0x98, 0x22, 0xca, 0xf2, 0x33, 0x74, 0x7a, 0xdd, 0x1e, 0x71, 0xec, 0xe3, 0x3f, 0xe2, 0xa2, 0xd2, 0x38, 0x75, 0xb0, 0xd0, 0x0a, 0xcf, 0x7d, 0x36, 0xdc, 0x49, 0x38, 0x25, 0x34, 0x4f, 0x20, 0x9a,
+ /* (2^ 60)P */ 0x2b, 0x6e, 0x04, 0x0d, 0x4f, 0x3d, 0x3b, 0x24, 0xf6, 0x4e, 0x5e, 0x0a, 0xbd, 0x48, 0x96, 0xba, 0x81, 0x8f, 0x39, 0x82, 0x13, 0xe6, 0x72, 0xf3, 0x0f, 0xb6, 0x94, 0xf4, 0xc5, 0x90, 0x74, 0x91, 0xa8, 0xf2, 0xc9, 0xca, 0x9a, 0x4d, 0x98, 0xf2, 0xdf, 0x52, 0x4e, 0x97, 0x2f, 0xeb, 0x84, 0xd3, 0xaf, 0xc2, 0xcc, 0xfb, 0x4c, 0x26, 0x4b, 0xe4,
+ /* (2^ 61)P */ 0x12, 0x9e, 0xfb, 0x9d, 0x78, 0x79, 0x99, 0xdd, 0xb3, 0x0b, 0x2e, 0x56, 0x41, 0x8e, 0x3f, 0x39, 0xb8, 0x97, 0x89, 0x53, 0x9b, 0x8a, 0x3c, 0x40, 0x9d, 0xa4, 0x6c, 0x2e, 0x31, 0x71, 0xc6, 0x0a, 0x41, 0xd4, 0x95, 0x06, 0x5e, 0xc1, 0xab, 0xc2, 0x14, 0xc4, 0xc7, 0x15, 0x08, 0x3a, 0xad, 0x7a, 0xb4, 0x62, 0xa3, 0x0c, 0x90, 0xf4, 0x47, 0x08,
+ /* (2^ 62)P */ 0x7f, 0xec, 0x09, 0x82, 0xf5, 0x94, 0x09, 0x93, 0x32, 0xd3, 0xdc, 0x56, 0x80, 0x7b, 0x5b, 0x22, 0x80, 0x6a, 0x96, 0x72, 0xb1, 0xc2, 0xd9, 0xa1, 0x8b, 0x66, 0x42, 0x16, 0xe2, 0x07, 0xb3, 0x2d, 0xf1, 0x75, 0x35, 0x72, 0xc7, 0x98, 0xbe, 0x63, 0x3b, 0x20, 0x75, 0x05, 0xc1, 0x3e, 0x31, 0x5a, 0xf7, 0xaa, 0xae, 0x4b, 0xdb, 0x1d, 0xd0, 0x74,
+ /* (2^ 63)P */ 0x36, 0x5c, 0x74, 0xe6, 0x5d, 0x59, 0x3f, 0x15, 0x4b, 0x4d, 0x4e, 0x67, 0x41, 0xfe, 0x98, 0x1f, 0x49, 0x76, 0x91, 0x0f, 0x9b, 0xf4, 0xaf, 0x86, 0xaf, 0x66, 0x19, 0xed, 0x46, 0xf1, 0x05, 0x9a, 0xcc, 0xd1, 0x14, 0x1f, 0x82, 0x12, 0x8e, 0xe6, 0xf4, 0xc3, 0x42, 0x5c, 0x4e, 0x33, 0x93, 0xbe, 0x30, 0xe7, 0x64, 0xa9, 0x35, 0x00, 0x4d, 0xf9,
+ /* (2^ 64)P */ 0x1f, 0xc1, 0x1e, 0xb7, 0xe3, 0x7c, 0xfa, 0xa3, 0x6b, 0x76, 0xaf, 0x9c, 0x05, 0x85, 0x4a, 0xa9, 0xfb, 0xe3, 0x7e, 0xf2, 0x49, 0x56, 0xdc, 0x2f, 0x57, 0x10, 0xba, 0x37, 0xb2, 0x62, 0xf5, 0x6b, 0xe5, 0x8f, 0x0a, 0x87, 0xd1, 0x6a, 0xcb, 0x9d, 0x07, 0xd0, 0xf6, 0x38, 0x99, 0x2c, 0x61, 0x4a, 0x4e, 0xd8, 0xd2, 0x88, 0x29, 0x99, 0x11, 0x95,
+ /* (2^ 65)P */ 0x6f, 0xdc, 0xd5, 0xd6, 0xd6, 0xa7, 0x4c, 0x46, 0x93, 0x65, 0x62, 0x23, 0x95, 0x32, 0x9c, 0xde, 0x40, 0x41, 0x68, 0x2c, 0x18, 0x4e, 0x5a, 0x8c, 0xc0, 0xc5, 0xc5, 0xea, 0x5c, 0x45, 0x0f, 0x60, 0x78, 0x39, 0xb6, 0x36, 0x23, 0x12, 0xbc, 0x21, 0x9a, 0xf8, 0x91, 0xac, 0xc4, 0x70, 0xdf, 0x85, 0x8e, 0x3c, 0xec, 0x22, 0x04, 0x98, 0xa8, 0xaa,
+ /* (2^ 66)P */ 0xcc, 0x52, 0x10, 0x5b, 0x4b, 0x6c, 0xc5, 0xfa, 0x3e, 0xd4, 0xf8, 0x1c, 0x04, 0x14, 0x48, 0x33, 0xd9, 0xfc, 0x5f, 0xb0, 0xa5, 0x48, 0x8c, 0x45, 0x8a, 0xee, 0x3e, 0xa7, 0xc1, 0x2e, 0x34, 0xca, 0xf6, 0xc9, 0xeb, 0x10, 0xbb, 0xe1, 0x59, 0x84, 0x25, 0xe8, 0x81, 0x70, 0xc0, 0x09, 0x42, 0xa7, 0x3b, 0x0d, 0x33, 0x00, 0xb5, 0x77, 0xbe, 0x25,
+ /* (2^ 67)P */ 0xcd, 0x1f, 0xbc, 0x7d, 0xef, 0xe5, 0xca, 0x91, 0xaf, 0xa9, 0x59, 0x6a, 0x09, 0xca, 0xd6, 0x1b, 0x3d, 0x55, 0xde, 0xa2, 0x6a, 0x80, 0xd6, 0x95, 0x47, 0xe4, 0x5f, 0x68, 0x54, 0x08, 0xdf, 0x29, 0xba, 0x2a, 0x02, 0x84, 0xe8, 0xe9, 0x00, 0x77, 0x99, 0x36, 0x03, 0xf6, 0x4a, 0x3e, 0x21, 0x81, 0x7d, 0xb8, 0xa4, 0x8a, 0xa2, 0x05, 0xef, 0xbc,
+ /* (2^ 68)P */ 0x7c, 0x59, 0x5f, 0x66, 0xd9, 0xb7, 0x83, 0x43, 0x8a, 0xa1, 0x8d, 0x51, 0x70, 0xba, 0xf2, 0x9b, 0x95, 0xc0, 0x4b, 0x4c, 0xa0, 0x14, 0xd3, 0xa4, 0x5d, 0x4a, 0x37, 0x36, 0x97, 0x31, 0x1e, 0x12, 0xe7, 0xbb, 0x08, 0x67, 0xa5, 0x23, 0xd7, 0xfb, 0x97, 0xd8, 0x6a, 0x03, 0xb1, 0xf8, 0x7f, 0xda, 0x58, 0xd9, 0x3f, 0x73, 0x4a, 0x53, 0xe1, 0x7b,
+ /* (2^ 69)P */ 0x55, 0x83, 0x98, 0x78, 0x6c, 0x56, 0x5e, 0xed, 0xf7, 0x23, 0x3e, 0x4c, 0x7d, 0x09, 0x2d, 0x09, 0x9c, 0x58, 0x8b, 0x32, 0xca, 0xfe, 0xbf, 0x47, 0x03, 0xeb, 0x4d, 0xe7, 0xeb, 0x9c, 0x83, 0x05, 0x68, 0xaa, 0x80, 0x89, 0x44, 0xf9, 0xd4, 0xdc, 0xdb, 0xb1, 0xdb, 0x77, 0xac, 0xf9, 0x2a, 0xae, 0x35, 0xac, 0x74, 0xb5, 0x95, 0x62, 0x18, 0x85,
+ /* (2^ 70)P */ 0xab, 0x82, 0x7e, 0x10, 0xd7, 0xe6, 0x57, 0xd1, 0x66, 0x12, 0x31, 0x9c, 0x9c, 0xa6, 0x27, 0x59, 0x71, 0x2e, 0xeb, 0xa0, 0x68, 0xc5, 0x87, 0x51, 0xf4, 0xca, 0x3f, 0x98, 0x56, 0xb0, 0x89, 0xb1, 0xc7, 0x7b, 0x46, 0xb3, 0xae, 0x36, 0xf2, 0xee, 0x15, 0x1a, 0x60, 0xf4, 0x50, 0x76, 0x4f, 0xc4, 0x53, 0x0d, 0x36, 0x4d, 0x31, 0xb1, 0x20, 0x51,
+ /* (2^ 71)P */ 0xf7, 0x1d, 0x8c, 0x1b, 0x5e, 0xe5, 0x02, 0x6f, 0xc5, 0xa5, 0xe0, 0x5f, 0xc6, 0xb6, 0x63, 0x43, 0xaf, 0x3c, 0x19, 0x6c, 0xf4, 0xaf, 0xa4, 0x33, 0xb1, 0x0a, 0x37, 0x3d, 0xd9, 0x4d, 0xe2, 0x29, 0x24, 0x26, 0x94, 0x7c, 0x02, 0xe4, 0xe2, 0xf2, 0xbe, 0xbd, 0xac, 0x1b, 0x48, 0xb8, 0xdd, 0xe9, 0x0d, 0x9a, 0x50, 0x1a, 0x98, 0x71, 0x6e, 0xdc,
+ /* (2^ 72)P */ 0x9f, 0x40, 0xb1, 0xb3, 0x66, 0x28, 0x6c, 0xfe, 0xa6, 0x7d, 0xf8, 0x3e, 0xb8, 0xf3, 0xde, 0x52, 0x76, 0x52, 0xa3, 0x92, 0x98, 0x23, 0xab, 0x4f, 0x88, 0x97, 0xfc, 0x22, 0xe1, 0x6b, 0x67, 0xcd, 0x13, 0x95, 0xda, 0x65, 0xdd, 0x3b, 0x67, 0x3f, 0x5f, 0x4c, 0xf2, 0x8a, 0xad, 0x98, 0xa7, 0x94, 0x24, 0x45, 0x87, 0x11, 0x7c, 0x75, 0x79, 0x85,
+ /* (2^ 73)P */ 0x70, 0xbf, 0xf9, 0x3b, 0xa9, 0x44, 0x57, 0x72, 0x96, 0xc9, 0xa4, 0x98, 0x65, 0xbf, 0x87, 0xb3, 0x3a, 0x39, 0x12, 0xde, 0xe5, 0x39, 0x01, 0x4f, 0xf7, 0xc0, 0x71, 0x52, 0x36, 0x85, 0xb3, 0x18, 0xf8, 0x14, 0xc0, 0x6d, 0xae, 0x9e, 0x4f, 0xb0, 0x72, 0x87, 0xac, 0x5c, 0xd1, 0x6c, 0x41, 0x6c, 0x90, 0x9d, 0x22, 0x81, 0xe4, 0x2b, 0xea, 0xe5,
+ /* (2^ 74)P */ 0xfc, 0xea, 0x1a, 0x65, 0xd9, 0x49, 0x6a, 0x39, 0xb5, 0x96, 0x72, 0x7b, 0x32, 0xf1, 0xd0, 0xe9, 0x45, 0xd9, 0x31, 0x55, 0xc7, 0x34, 0xe9, 0x5a, 0xec, 0x73, 0x0b, 0x03, 0xc4, 0xb3, 0xe6, 0xc9, 0x5e, 0x0a, 0x17, 0xfe, 0x53, 0x66, 0x7f, 0x21, 0x18, 0x74, 0x54, 0x1b, 0xc9, 0x49, 0x16, 0xd2, 0x48, 0xaf, 0x5b, 0x47, 0x7b, 0xeb, 0xaa, 0xc9,
+ /* (2^ 75)P */ 0x47, 0x04, 0xf5, 0x5a, 0x87, 0x77, 0x9e, 0x21, 0x34, 0x4e, 0x83, 0x88, 0xaf, 0x02, 0x1d, 0xb0, 0x5a, 0x1d, 0x1d, 0x7d, 0x8d, 0x2c, 0xd3, 0x8d, 0x63, 0xa9, 0x45, 0xfb, 0x15, 0x6d, 0x86, 0x45, 0xcd, 0x38, 0x0e, 0xf7, 0x37, 0x79, 0xed, 0x6d, 0x5a, 0xbc, 0x32, 0xcc, 0x66, 0xf1, 0x3a, 0xb2, 0x87, 0x6f, 0x70, 0x71, 0xd9, 0xf2, 0xfa, 0x7b,
+ /* (2^ 76)P */ 0x68, 0x07, 0xdc, 0x61, 0x40, 0xe4, 0xec, 0x32, 0xc8, 0xbe, 0x66, 0x30, 0x54, 0x80, 0xfd, 0x13, 0x7a, 0xef, 0xae, 0xed, 0x2e, 0x00, 0x6d, 0x3f, 0xbd, 0xfc, 0x91, 0x24, 0x53, 0x7f, 0x63, 0x9d, 0x2e, 0xe3, 0x76, 0xe0, 0xf3, 0xe1, 0x8f, 0x7a, 0xc4, 0x77, 0x0c, 0x91, 0xc0, 0xc2, 0x18, 0x6b, 0x04, 0xad, 0xb6, 0x70, 0x9a, 0x64, 0xc5, 0x82,
+ /* (2^ 77)P */ 0x7f, 0xea, 0x13, 0xd8, 0x9e, 0xfc, 0x5b, 0x06, 0xb5, 0x4f, 0xda, 0x38, 0xe0, 0x9c, 0xd2, 0x3a, 0xc1, 0x1c, 0x62, 0x70, 0x7f, 0xc6, 0x24, 0x0a, 0x47, 0x04, 0x01, 0xc4, 0x55, 0x09, 0xd1, 0x7a, 0x07, 0xba, 0xa3, 0x80, 0x4f, 0xc1, 0x65, 0x36, 0x6d, 0xc0, 0x10, 0xcf, 0x94, 0xa9, 0xa2, 0x01, 0x44, 0xd1, 0xf9, 0x1c, 0x4c, 0xfb, 0xf8, 0x99,
+ /* (2^ 78)P */ 0x6c, 0xb9, 0x6b, 0xee, 0x43, 0x5b, 0xb9, 0xbb, 0xee, 0x2e, 0x52, 0xc1, 0xc6, 0xb9, 0x61, 0xd2, 0x93, 0xa5, 0xaf, 0x52, 0xf4, 0xa4, 0x1a, 0x51, 0x61, 0xa7, 0xcb, 0x9e, 0xbb, 0x56, 0x65, 0xe2, 0xbf, 0x75, 0xb9, 0x9c, 0x50, 0x96, 0x60, 0x81, 0x74, 0x47, 0xc0, 0x04, 0x88, 0x71, 0x76, 0x39, 0x9a, 0xa7, 0xb1, 0x4e, 0x43, 0x15, 0xe0, 0xbb,
+ /* (2^ 79)P */ 0xbb, 0xce, 0xe2, 0xbb, 0xf9, 0x17, 0x0f, 0x82, 0x40, 0xad, 0x73, 0xe3, 0xeb, 0x3b, 0x06, 0x1a, 0xcf, 0x8e, 0x6e, 0x28, 0xb8, 0x26, 0xd9, 0x5b, 0xb7, 0xb3, 0xcf, 0xb4, 0x6a, 0x1c, 0xbf, 0x7f, 0xb8, 0xb5, 0x79, 0xcf, 0x45, 0x68, 0x7d, 0xc5, 0xeb, 0xf3, 0xbe, 0x39, 0x40, 0xfc, 0x07, 0x90, 0x7a, 0x62, 0xad, 0x86, 0x08, 0x71, 0x25, 0xe1,
+ /* (2^ 80)P */ 0x9b, 0x46, 0xac, 0xef, 0xc1, 0x4e, 0xa1, 0x97, 0x95, 0x76, 0xf9, 0x1b, 0xc2, 0xb2, 0x6a, 0x41, 0xea, 0x80, 0x3d, 0xe9, 0x08, 0x52, 0x5a, 0xe3, 0xf2, 0x08, 0xc5, 0xea, 0x39, 0x3f, 0x44, 0x71, 0x4d, 0xea, 0x0d, 0x05, 0x23, 0xe4, 0x2e, 0x3c, 0x89, 0xfe, 0x12, 0x8a, 0x95, 0x42, 0x0a, 0x68, 0xea, 0x5a, 0x28, 0x06, 0x9e, 0xe3, 0x5f, 0xe0,
+ /* (2^ 81)P */ 0x00, 0x61, 0x6c, 0x98, 0x9b, 0xe7, 0xb9, 0x06, 0x1c, 0xc5, 0x1b, 0xed, 0xbe, 0xc8, 0xb3, 0xea, 0x87, 0xf0, 0xc4, 0x24, 0x7d, 0xbb, 0x5d, 0xa4, 0x1d, 0x7a, 0x16, 0x00, 0x55, 0x94, 0x67, 0x78, 0xbd, 0x58, 0x02, 0x82, 0x90, 0x53, 0x76, 0xd4, 0x72, 0x99, 0x51, 0x6f, 0x7b, 0xcf, 0x80, 0x30, 0x31, 0x3b, 0x01, 0xc7, 0xc1, 0xef, 0xe6, 0x42,
+ /* (2^ 82)P */ 0xe2, 0x35, 0xaf, 0x4b, 0x79, 0xc6, 0x12, 0x24, 0x99, 0xc0, 0x68, 0xb0, 0x43, 0x3e, 0xe5, 0xef, 0xe2, 0x29, 0xea, 0xb8, 0xb3, 0xbc, 0x6a, 0x53, 0x2c, 0x69, 0x18, 0x5a, 0xf9, 0x15, 0xae, 0x66, 0x58, 0x18, 0xd3, 0x2d, 0x4b, 0x00, 0xfd, 0x84, 0xab, 0x4f, 0xae, 0x70, 0x6b, 0x9e, 0x9a, 0xdf, 0x83, 0xfd, 0x2e, 0x3c, 0xcf, 0xf8, 0x88, 0x5b,
+ /* (2^ 83)P */ 0xa4, 0x90, 0x31, 0x85, 0x13, 0xcd, 0xdf, 0x64, 0xc9, 0xa1, 0x0b, 0xe7, 0xb6, 0x73, 0x8a, 0x1b, 0x22, 0x78, 0x4c, 0xd4, 0xae, 0x48, 0x18, 0x00, 0x00, 0xa8, 0x9f, 0x06, 0xf9, 0xfb, 0x2d, 0xc3, 0xb1, 0x2a, 0xbc, 0x13, 0x99, 0x57, 0xaf, 0xf0, 0x8d, 0x61, 0x54, 0x29, 0xd5, 0xf2, 0x72, 0x00, 0x96, 0xd1, 0x85, 0x12, 0x8a, 0xf0, 0x23, 0xfb,
+ /* (2^ 84)P */ 0x69, 0xc7, 0xdb, 0xd9, 0x92, 0x75, 0x08, 0x9b, 0xeb, 0xa5, 0x93, 0xd1, 0x1a, 0xf4, 0xf5, 0xaf, 0xe6, 0xc4, 0x4a, 0x0d, 0x35, 0x26, 0x39, 0x9d, 0xd3, 0x17, 0x3e, 0xae, 0x2d, 0xbf, 0x73, 0x9f, 0xb7, 0x74, 0x91, 0xd1, 0xd8, 0x5c, 0x14, 0xf9, 0x75, 0xdf, 0xeb, 0xc2, 0x22, 0xd8, 0x14, 0x8d, 0x86, 0x23, 0x4d, 0xd1, 0x2d, 0xdb, 0x6b, 0x42,
+ /* (2^ 85)P */ 0x8c, 0xda, 0xc6, 0xf8, 0x71, 0xba, 0x2b, 0x06, 0x78, 0xae, 0xcc, 0x3a, 0xe3, 0xe3, 0xa1, 0x8b, 0xe2, 0x34, 0x6d, 0x28, 0x9e, 0x46, 0x13, 0x4d, 0x9e, 0xa6, 0x73, 0x49, 0x65, 0x79, 0x88, 0xb9, 0x3a, 0xd1, 0x6d, 0x2f, 0x48, 0x2b, 0x0a, 0x7f, 0x58, 0x20, 0x37, 0xf4, 0x0e, 0xbb, 0x4a, 0x95, 0x58, 0x0c, 0x88, 0x30, 0xc4, 0x74, 0xdd, 0xfd,
+ /* (2^ 86)P */ 0x6d, 0x13, 0x4e, 0x89, 0x2d, 0xa9, 0xa3, 0xed, 0x09, 0xe3, 0x0e, 0x71, 0x3e, 0x4a, 0xab, 0x90, 0xde, 0x03, 0xeb, 0x56, 0x46, 0x60, 0x06, 0xf5, 0x71, 0xe5, 0xee, 0x9b, 0xef, 0xff, 0xc4, 0x2c, 0x9f, 0x37, 0x48, 0x45, 0x94, 0x12, 0x41, 0x81, 0x15, 0x70, 0x91, 0x99, 0x5e, 0x56, 0x6b, 0xf4, 0xa6, 0xc9, 0xf5, 0x69, 0x9d, 0x78, 0x37, 0x57,
+ /* (2^ 87)P */ 0xf3, 0x51, 0x57, 0x7e, 0x43, 0x6f, 0xc6, 0x67, 0x59, 0x0c, 0xcf, 0x94, 0xe6, 0x3d, 0xb5, 0x07, 0xc9, 0x77, 0x48, 0xc9, 0x68, 0x0d, 0x98, 0x36, 0x62, 0x35, 0x38, 0x1c, 0xf5, 0xc5, 0xec, 0x66, 0x78, 0xfe, 0x47, 0xab, 0x26, 0xd6, 0x44, 0xb6, 0x06, 0x0f, 0x89, 0xe3, 0x19, 0x40, 0x1a, 0xe7, 0xd8, 0x65, 0x55, 0xf7, 0x1a, 0xfc, 0xa3, 0x0e,
+ /* (2^ 88)P */ 0x0e, 0x30, 0xa6, 0xb7, 0x58, 0x60, 0x62, 0x2a, 0x6c, 0x13, 0xa8, 0x14, 0x9b, 0xb8, 0xf2, 0x70, 0xd8, 0xb1, 0x71, 0x88, 0x8c, 0x18, 0x31, 0x25, 0x93, 0x90, 0xb4, 0xc7, 0x49, 0xd8, 0xd4, 0xdb, 0x1e, 0x1e, 0x7f, 0xaa, 0xba, 0xc9, 0xf2, 0x5d, 0xa9, 0x3a, 0x43, 0xb4, 0x5c, 0xee, 0x7b, 0xc7, 0x97, 0xb7, 0x66, 0xd7, 0x23, 0xd9, 0x22, 0x59,
+ /* (2^ 89)P */ 0x28, 0x19, 0xa6, 0xf9, 0x89, 0x20, 0x78, 0xd4, 0x6d, 0xcb, 0x79, 0x8f, 0x61, 0x6f, 0xb2, 0x5c, 0x4f, 0xa6, 0x54, 0x84, 0x95, 0x24, 0x36, 0x64, 0xcb, 0x39, 0xe7, 0x8f, 0x97, 0x9c, 0x5c, 0x3c, 0xfb, 0x51, 0x11, 0x01, 0x17, 0xdb, 0xc9, 0x9b, 0x51, 0x03, 0x9a, 0xe9, 0xe5, 0x24, 0x1e, 0xf5, 0xda, 0xe0, 0x48, 0x02, 0x23, 0xd0, 0x2c, 0x81,
+ /* (2^ 90)P */ 0x42, 0x1b, 0xe4, 0x91, 0x85, 0x2a, 0x0c, 0xd2, 0x28, 0x66, 0x57, 0x9e, 0x33, 0x8d, 0x25, 0x71, 0x10, 0x65, 0x76, 0xa2, 0x8c, 0x21, 0x86, 0x81, 0x15, 0xc2, 0x27, 0xeb, 0x54, 0x2d, 0x4f, 0x6c, 0xe6, 0xd6, 0x24, 0x9c, 0x1a, 0x12, 0xb8, 0x81, 0xe2, 0x0a, 0xf3, 0xd3, 0xf0, 0xd3, 0xe1, 0x74, 0x1f, 0x9b, 0x11, 0x47, 0xd0, 0xcf, 0xb6, 0x54,
+ /* (2^ 91)P */ 0x26, 0x45, 0xa2, 0x10, 0xd4, 0x2d, 0xae, 0xc0, 0xb0, 0xe8, 0x86, 0xb3, 0xc7, 0xea, 0x70, 0x87, 0x61, 0xb5, 0xa5, 0x55, 0xbe, 0x88, 0x1d, 0x7a, 0xd9, 0x6f, 0xeb, 0x83, 0xe2, 0x44, 0x7f, 0x98, 0x04, 0xd6, 0x50, 0x9d, 0xa7, 0x86, 0x66, 0x09, 0x63, 0xe1, 0xed, 0x72, 0xb1, 0xe4, 0x1d, 0x3a, 0xfd, 0x47, 0xce, 0x1c, 0xaa, 0x3b, 0x8f, 0x1b,
+ /* (2^ 92)P */ 0xf4, 0x3c, 0x4a, 0xb6, 0xc2, 0x9c, 0xe0, 0x2e, 0xb7, 0x38, 0xea, 0x61, 0x35, 0x97, 0x10, 0x90, 0xae, 0x22, 0x48, 0xb3, 0xa9, 0xc6, 0x7a, 0xbb, 0x23, 0xf2, 0xf8, 0x1b, 0xa7, 0xa1, 0x79, 0xcc, 0xc4, 0xf8, 0x08, 0x76, 0x8a, 0x5a, 0x1c, 0x1b, 0xc5, 0x33, 0x91, 0xa9, 0xb8, 0xb9, 0xd3, 0xf8, 0x49, 0xcd, 0xe5, 0x82, 0x43, 0xf7, 0xca, 0x68,
+ /* (2^ 93)P */ 0x38, 0xba, 0xae, 0x44, 0xfe, 0x57, 0x64, 0x56, 0x7c, 0x0e, 0x9c, 0xca, 0xff, 0xa9, 0x82, 0xbb, 0x38, 0x4a, 0xa7, 0xf7, 0x47, 0xab, 0xbe, 0x6d, 0x23, 0x0b, 0x8a, 0xed, 0xc2, 0xb9, 0x8f, 0xf1, 0xec, 0x91, 0x44, 0x73, 0x64, 0xba, 0xd5, 0x8f, 0x37, 0x38, 0x0d, 0xd5, 0xf8, 0x73, 0x57, 0xb6, 0xc2, 0x45, 0xdc, 0x25, 0xb2, 0xb6, 0xea, 0xd9,
+ /* (2^ 94)P */ 0xbf, 0xe9, 0x1a, 0x40, 0x4d, 0xcc, 0xe6, 0x1d, 0x70, 0x1a, 0x65, 0xcc, 0x34, 0x2c, 0x37, 0x2c, 0x2d, 0x6b, 0x6d, 0xe5, 0x2f, 0x19, 0x9e, 0xe4, 0xe1, 0xaa, 0xd4, 0xab, 0x54, 0xf4, 0xa8, 0xe4, 0x69, 0x2d, 0x8e, 0x4d, 0xd7, 0xac, 0xb0, 0x5b, 0xfe, 0xe3, 0x26, 0x07, 0xc3, 0xf8, 0x1b, 0x43, 0xa8, 0x1d, 0x64, 0xa5, 0x25, 0x88, 0xbb, 0x77,
+ /* (2^ 95)P */ 0x92, 0xcd, 0x6e, 0xa0, 0x79, 0x04, 0x18, 0xf4, 0x11, 0x58, 0x48, 0xb5, 0x3c, 0x7b, 0xd1, 0xcc, 0xd3, 0x14, 0x2c, 0xa0, 0xdd, 0x04, 0x44, 0x11, 0xb3, 0x6d, 0x2f, 0x0d, 0xf5, 0x2a, 0x75, 0x5d, 0x1d, 0xda, 0x86, 0x8d, 0x7d, 0x6b, 0x32, 0x68, 0xb6, 0x6c, 0x64, 0x9e, 0xde, 0x80, 0x88, 0xce, 0x08, 0xbf, 0x0b, 0xe5, 0x8e, 0x4f, 0x1d, 0xfb,
+ /* (2^ 96)P */ 0xaf, 0xe8, 0x85, 0xbf, 0x7f, 0x37, 0x8d, 0x66, 0x7c, 0xd5, 0xd3, 0x96, 0xa5, 0x81, 0x67, 0x95, 0xff, 0x48, 0xde, 0xde, 0xd7, 0x7a, 0x46, 0x34, 0xb1, 0x13, 0x70, 0x29, 0xed, 0x87, 0x90, 0xb0, 0x40, 0x2c, 0xa6, 0x43, 0x6e, 0xb6, 0xbc, 0x48, 0x8a, 0xc1, 0xae, 0xb8, 0xd4, 0xe2, 0xc0, 0x32, 0xb2, 0xa6, 0x2a, 0x8f, 0xb5, 0x16, 0x9e, 0xc3,
+ /* (2^ 97)P */ 0xff, 0x4d, 0xd2, 0xd6, 0x74, 0xef, 0x2c, 0x96, 0xc1, 0x11, 0xa8, 0xb8, 0xfe, 0x94, 0x87, 0x3e, 0xa0, 0xfb, 0x57, 0xa3, 0xfc, 0x7a, 0x7e, 0x6a, 0x59, 0x6c, 0x54, 0xbb, 0xbb, 0xa2, 0x25, 0x38, 0x1b, 0xdf, 0x5d, 0x7b, 0x94, 0x14, 0xde, 0x07, 0x6e, 0xd3, 0xab, 0x02, 0x26, 0x74, 0x16, 0x12, 0xdf, 0x2e, 0x2a, 0xa7, 0xb0, 0xe8, 0x29, 0xc0,
+ /* (2^ 98)P */ 0x6a, 0x38, 0x0b, 0xd3, 0xba, 0x45, 0x23, 0xe0, 0x04, 0x3b, 0x83, 0x39, 0xc5, 0x11, 0xe6, 0xcf, 0x39, 0x0a, 0xb3, 0xb0, 0x3b, 0x27, 0x29, 0x63, 0x1c, 0xf3, 0x00, 0xe6, 0xd2, 0x55, 0x21, 0x1f, 0x84, 0x97, 0x9f, 0x01, 0x49, 0x43, 0x30, 0x5f, 0xe0, 0x1d, 0x24, 0xc4, 0x4e, 0xa0, 0x2b, 0x0b, 0x12, 0x55, 0xc3, 0x27, 0xae, 0x08, 0x83, 0x7c,
+ /* (2^ 99)P */ 0x5d, 0x1a, 0xb7, 0xa9, 0xf5, 0xfd, 0xec, 0xad, 0xb7, 0x87, 0x02, 0x5f, 0x0d, 0x30, 0x4d, 0xe2, 0x65, 0x87, 0xa4, 0x41, 0x45, 0x1d, 0x67, 0xe0, 0x30, 0x5c, 0x13, 0x87, 0xf6, 0x2e, 0x08, 0xc1, 0xc7, 0x12, 0x45, 0xc8, 0x9b, 0xad, 0xb8, 0xd5, 0x57, 0xbb, 0x5c, 0x48, 0x3a, 0xe1, 0x91, 0x5e, 0xf6, 0x4d, 0x8a, 0x63, 0x75, 0x69, 0x0c, 0x01,
+ /* (2^100)P */ 0x8f, 0x53, 0x2d, 0xa0, 0x71, 0x3d, 0xfc, 0x45, 0x10, 0x96, 0xcf, 0x56, 0xf9, 0xbb, 0x40, 0x3c, 0x86, 0x52, 0x76, 0xbe, 0x84, 0xf9, 0xa6, 0x9d, 0x3d, 0x27, 0xbe, 0xb4, 0x00, 0x49, 0x94, 0xf5, 0x5d, 0xe1, 0x62, 0x85, 0x66, 0xe5, 0xb8, 0x20, 0x2c, 0x09, 0x7d, 0x9d, 0x3d, 0x6e, 0x74, 0x39, 0xab, 0xad, 0xa0, 0x90, 0x97, 0x5f, 0xbb, 0xa7,
+ /* (2^101)P */ 0xdb, 0x2d, 0x99, 0x08, 0x16, 0x46, 0x83, 0x7a, 0xa8, 0xea, 0x3d, 0x28, 0x5b, 0x49, 0xfc, 0xb9, 0x6d, 0x00, 0x9e, 0x54, 0x4f, 0x47, 0x64, 0x9b, 0x58, 0x4d, 0x07, 0x0c, 0x6f, 0x29, 0x56, 0x0b, 0x00, 0x14, 0x85, 0x96, 0x41, 0x04, 0xb9, 0x5c, 0xa4, 0xf6, 0x16, 0x73, 0x6a, 0xc7, 0x62, 0x0c, 0x65, 0x2f, 0x93, 0xbf, 0xf7, 0xb9, 0xb7, 0xf1,
+ /* (2^102)P */ 0xeb, 0x6d, 0xb3, 0x46, 0x32, 0xd2, 0xcb, 0x08, 0x94, 0x14, 0xbf, 0x3f, 0xc5, 0xcb, 0x5f, 0x9f, 0x8a, 0x89, 0x0c, 0x1b, 0x45, 0xad, 0x4c, 0x50, 0xb4, 0xe1, 0xa0, 0x6b, 0x11, 0x92, 0xaf, 0x1f, 0x00, 0xcc, 0xe5, 0x13, 0x7e, 0xe4, 0x2e, 0xa0, 0x57, 0xf3, 0xa7, 0x84, 0x79, 0x7a, 0xc2, 0xb7, 0xb7, 0xfc, 0x5d, 0xa5, 0xa9, 0x64, 0xcc, 0xd8,
+ /* (2^103)P */ 0xa9, 0xc4, 0x12, 0x8b, 0x34, 0x78, 0x3e, 0x38, 0xfd, 0x3f, 0x87, 0xfa, 0x88, 0x94, 0xd5, 0xd9, 0x7f, 0xeb, 0x58, 0xff, 0xb9, 0x45, 0xdb, 0xa1, 0xed, 0x22, 0x28, 0x1d, 0x00, 0x6d, 0x79, 0x85, 0x7a, 0x75, 0x5d, 0xf0, 0xb1, 0x9e, 0x47, 0x28, 0x8c, 0x62, 0xdf, 0xfb, 0x4c, 0x7b, 0xc5, 0x1a, 0x42, 0x95, 0xef, 0x9a, 0xb7, 0x27, 0x7e, 0xda,
+ /* (2^104)P */ 0xca, 0xd5, 0xc0, 0x17, 0xa1, 0x66, 0x79, 0x9c, 0x2a, 0xb7, 0x0a, 0xfe, 0x62, 0xe4, 0x26, 0x78, 0x90, 0xa7, 0xcb, 0xb0, 0x4f, 0x6d, 0xf9, 0x8f, 0xf7, 0x7d, 0xac, 0xb8, 0x78, 0x1f, 0x41, 0xea, 0x97, 0x1e, 0x62, 0x97, 0x43, 0x80, 0x58, 0x80, 0xb6, 0x69, 0x7d, 0xee, 0x16, 0xd2, 0xa1, 0x81, 0xd7, 0xb1, 0x27, 0x03, 0x48, 0xda, 0xab, 0xec,
+ /* (2^105)P */ 0x5b, 0xed, 0x40, 0x8e, 0x8c, 0xc1, 0x66, 0x90, 0x7f, 0x0c, 0xb2, 0xfc, 0xbd, 0x16, 0xac, 0x7d, 0x4c, 0x6a, 0xf9, 0xae, 0xe7, 0x4e, 0x11, 0x12, 0xe9, 0xbe, 0x17, 0x09, 0xc6, 0xc1, 0x5e, 0xb5, 0x7b, 0x50, 0x5c, 0x27, 0xfb, 0x80, 0xab, 0x01, 0xfa, 0x5b, 0x9b, 0x75, 0x16, 0x6e, 0xb2, 0x5c, 0x8c, 0x2f, 0xa5, 0x6a, 0x1a, 0x68, 0xa6, 0x90,
+ /* (2^106)P */ 0x75, 0xfe, 0xb6, 0x96, 0x96, 0x87, 0x4c, 0x12, 0xa9, 0xd1, 0xd8, 0x03, 0xa3, 0xc1, 0x15, 0x96, 0xe8, 0xa0, 0x75, 0x82, 0xa0, 0x6d, 0xea, 0x54, 0xdc, 0x5f, 0x0d, 0x7e, 0xf6, 0x70, 0xb5, 0xdc, 0x7a, 0xf6, 0xc4, 0xd4, 0x21, 0x49, 0xf5, 0xd4, 0x14, 0x6d, 0x48, 0x1d, 0x7c, 0x99, 0x42, 0xdf, 0x78, 0x6b, 0x9d, 0xb9, 0x30, 0x3c, 0xd0, 0x29,
+ /* (2^107)P */ 0x85, 0xd6, 0xd8, 0xf3, 0x91, 0x74, 0xdd, 0xbd, 0x72, 0x96, 0x10, 0xe4, 0x76, 0x02, 0x5a, 0x72, 0x67, 0xd3, 0x17, 0x72, 0x14, 0x9a, 0x20, 0x5b, 0x0f, 0x8d, 0xed, 0x6d, 0x4e, 0xe3, 0xd9, 0x82, 0xc2, 0x99, 0xee, 0x39, 0x61, 0x69, 0x8a, 0x24, 0x01, 0x92, 0x15, 0xe7, 0xfc, 0xf9, 0x4d, 0xac, 0xf1, 0x30, 0x49, 0x01, 0x0b, 0x6e, 0x0f, 0x20,
+ /* (2^108)P */ 0xd8, 0x25, 0x94, 0x5e, 0x43, 0x29, 0xf5, 0xcc, 0xe8, 0xe3, 0x55, 0x41, 0x3c, 0x9f, 0x58, 0x5b, 0x00, 0xeb, 0xc5, 0xdf, 0xcf, 0xfb, 0xfd, 0x6e, 0x92, 0xec, 0x99, 0x30, 0xd6, 0x05, 0xdd, 0x80, 0x7a, 0x5d, 0x6d, 0x16, 0x85, 0xd8, 0x9d, 0x43, 0x65, 0xd8, 0x2c, 0x33, 0x2f, 0x5c, 0x41, 0xea, 0xb7, 0x95, 0x77, 0xf2, 0x9e, 0x59, 0x09, 0xe8,
+ /* (2^109)P */ 0x00, 0xa0, 0x03, 0x80, 0xcd, 0x60, 0xe5, 0x17, 0xd4, 0x15, 0x99, 0xdd, 0x4f, 0xbf, 0x66, 0xb8, 0xc0, 0xf5, 0xf9, 0xfc, 0x6d, 0x42, 0x18, 0x34, 0x1c, 0x7d, 0x5b, 0xb5, 0x09, 0xd0, 0x99, 0x57, 0x81, 0x0b, 0x62, 0xb3, 0xa2, 0xf9, 0x0b, 0xae, 0x95, 0xb8, 0xc2, 0x3b, 0x0d, 0x5b, 0x00, 0xf1, 0xed, 0xbc, 0x05, 0x9d, 0x61, 0xbc, 0x73, 0x9d,
+ /* (2^110)P */ 0xd4, 0xdb, 0x29, 0xe5, 0x85, 0xe9, 0xc6, 0x89, 0x2a, 0xa8, 0x54, 0xab, 0xb3, 0x7f, 0x88, 0xc0, 0x4d, 0xe0, 0xd1, 0x74, 0x6e, 0xa3, 0xa7, 0x39, 0xd5, 0xcc, 0xa1, 0x8a, 0xcb, 0x5b, 0x34, 0xad, 0x92, 0xb4, 0xd8, 0xd5, 0x17, 0xf6, 0x77, 0x18, 0x9e, 0xaf, 0x45, 0x3b, 0x03, 0xe2, 0xf8, 0x52, 0x60, 0xdc, 0x15, 0x20, 0x9e, 0xdf, 0xd8, 0x5d,
+ /* (2^111)P */ 0x02, 0xc1, 0xac, 0x1a, 0x15, 0x8e, 0x6c, 0xf5, 0x1e, 0x1e, 0xba, 0x7e, 0xc2, 0xda, 0x7d, 0x02, 0xda, 0x43, 0xae, 0x04, 0x70, 0x28, 0x54, 0x78, 0x94, 0xf5, 0x4f, 0x07, 0x84, 0x8f, 0xed, 0xaa, 0xc0, 0xb8, 0xcd, 0x7f, 0x7e, 0x33, 0xa3, 0xbe, 0x21, 0x29, 0xc8, 0x56, 0x34, 0xc0, 0x76, 0x87, 0x8f, 0xc7, 0x73, 0x58, 0x90, 0x16, 0xfc, 0xd6,
+ /* (2^112)P */ 0xb8, 0x3f, 0xe1, 0xdf, 0x3a, 0x91, 0x25, 0x0c, 0xf6, 0x47, 0xa8, 0x89, 0xc4, 0xc6, 0x61, 0xec, 0x86, 0x2c, 0xfd, 0xbe, 0xa4, 0x6f, 0xc2, 0xd4, 0x46, 0x19, 0x70, 0x5d, 0x09, 0x02, 0x86, 0xd3, 0x4b, 0xe9, 0x16, 0x7b, 0xf0, 0x0d, 0x6c, 0xff, 0x91, 0x05, 0xbf, 0x55, 0xb4, 0x00, 0x8d, 0xe5, 0x6d, 0x68, 0x20, 0x90, 0x12, 0xb5, 0x5c, 0x32,
+ /* (2^113)P */ 0x80, 0x45, 0xc8, 0x51, 0x87, 0xba, 0x1c, 0x5c, 0xcf, 0x5f, 0x4b, 0x3c, 0x9e, 0x3b, 0x36, 0xd2, 0x26, 0xa2, 0x7f, 0xab, 0xb7, 0xbf, 0xda, 0x68, 0x23, 0x8f, 0xc3, 0xa0, 0xfd, 0xad, 0xf1, 0x56, 0x3b, 0xd0, 0x75, 0x2b, 0x44, 0x61, 0xd8, 0xf4, 0xf1, 0x05, 0x49, 0x53, 0x07, 0xee, 0x47, 0xef, 0xc0, 0x7c, 0x9d, 0xe4, 0x15, 0x88, 0xc5, 0x47,
+ /* (2^114)P */ 0x2d, 0xb5, 0x09, 0x80, 0xb9, 0xd3, 0xd8, 0xfe, 0x4c, 0xd2, 0xa6, 0x6e, 0xd3, 0x75, 0xcf, 0xb0, 0x99, 0xcb, 0x50, 0x8d, 0xe9, 0x67, 0x9b, 0x20, 0xe8, 0x57, 0xd8, 0x14, 0x85, 0x73, 0x6a, 0x74, 0xe0, 0x99, 0xf0, 0x6b, 0x6e, 0x59, 0x30, 0x31, 0x33, 0x96, 0x5f, 0xa1, 0x0c, 0x1b, 0xf4, 0xca, 0x09, 0xe1, 0x9b, 0xb5, 0xcf, 0x6d, 0x0b, 0xeb,
+ /* (2^115)P */ 0x1a, 0xde, 0x50, 0xa9, 0xac, 0x3e, 0x10, 0x43, 0x4f, 0x82, 0x4f, 0xc0, 0xfe, 0x3f, 0x33, 0xd2, 0x64, 0x86, 0x50, 0xa9, 0x51, 0x76, 0x5e, 0x50, 0x97, 0x6c, 0x73, 0x8d, 0x77, 0xa3, 0x75, 0x03, 0xbc, 0xc9, 0xfb, 0x50, 0xd9, 0x6d, 0x16, 0xad, 0x5d, 0x32, 0x3d, 0xac, 0x44, 0xdf, 0x51, 0xf7, 0x19, 0xd4, 0x0b, 0x57, 0x78, 0x0b, 0x81, 0x4e,
+ /* (2^116)P */ 0x32, 0x24, 0xf1, 0x6c, 0x55, 0x62, 0x1d, 0xb3, 0x1f, 0xda, 0xfa, 0x6a, 0x8f, 0x98, 0x01, 0x16, 0xde, 0x44, 0x50, 0x0d, 0x2e, 0x6c, 0x0b, 0xa2, 0xd3, 0x74, 0x0e, 0xa9, 0xbf, 0x8d, 0xa9, 0xc8, 0xc8, 0x2f, 0x62, 0xc1, 0x35, 0x5e, 0xfd, 0x3a, 0xb3, 0x83, 0x2d, 0xee, 0x4e, 0xfd, 0x5c, 0x5e, 0xad, 0x85, 0xa5, 0x10, 0xb5, 0x4f, 0x34, 0xa7,
+ /* (2^117)P */ 0xd1, 0x58, 0x6f, 0xe6, 0x54, 0x2c, 0xc2, 0xcd, 0xcf, 0x83, 0xdc, 0x88, 0x0c, 0xb9, 0xb4, 0x62, 0x18, 0x89, 0x65, 0x28, 0xe9, 0x72, 0x4b, 0x65, 0xcf, 0xd6, 0x90, 0x88, 0xd7, 0x76, 0x17, 0x4f, 0x74, 0x64, 0x1e, 0xcb, 0xd3, 0xf5, 0x4b, 0xaa, 0x2e, 0x4d, 0x2d, 0x7c, 0x13, 0x1f, 0xfd, 0xd9, 0x60, 0x83, 0x7e, 0xda, 0x64, 0x1c, 0xdc, 0x9f,
+ /* (2^118)P */ 0xad, 0xef, 0xac, 0x1b, 0xc1, 0x30, 0x5a, 0x15, 0xc9, 0x1f, 0xac, 0xf1, 0xca, 0x44, 0x95, 0x95, 0xea, 0xf2, 0x22, 0xe7, 0x8d, 0x25, 0xf0, 0xff, 0xd8, 0x71, 0xf7, 0xf8, 0x8f, 0x8f, 0xcd, 0xf4, 0x1e, 0xfe, 0x6c, 0x68, 0x04, 0xb8, 0x78, 0xa1, 0x5f, 0xa6, 0x5d, 0x5e, 0xf9, 0x8d, 0xea, 0x80, 0xcb, 0xf3, 0x17, 0xa6, 0x03, 0xc9, 0x38, 0xd5,
+ /* (2^119)P */ 0x79, 0x14, 0x31, 0xc3, 0x38, 0xe5, 0xaa, 0xbf, 0x17, 0xa3, 0x04, 0x4e, 0x80, 0x59, 0x9c, 0x9f, 0x19, 0x39, 0xe4, 0x2d, 0x23, 0x54, 0x4a, 0x7f, 0x3e, 0xf3, 0xd9, 0xc7, 0xba, 0x6c, 0x8f, 0x6b, 0xfa, 0x34, 0xb5, 0x23, 0x17, 0x1d, 0xff, 0x1d, 0xea, 0x1f, 0xd7, 0xba, 0x61, 0xb2, 0xe0, 0x38, 0x6a, 0xe9, 0xcf, 0x48, 0x5d, 0x6a, 0x10, 0x9c,
+ /* (2^120)P */ 0xc8, 0xbb, 0x13, 0x1c, 0x3f, 0x3c, 0x34, 0xfd, 0xac, 0x37, 0x52, 0x44, 0x25, 0xa8, 0xde, 0x1d, 0x63, 0xf4, 0x81, 0x9a, 0xbe, 0x0b, 0x74, 0x2e, 0xc8, 0x51, 0x16, 0xd3, 0xac, 0x4a, 0xaf, 0xe2, 0x5f, 0x3a, 0x89, 0x32, 0xd1, 0x9b, 0x7c, 0x90, 0x0d, 0xac, 0xdc, 0x8b, 0x73, 0x45, 0x45, 0x97, 0xb1, 0x90, 0x2c, 0x1b, 0x31, 0xca, 0xb1, 0x94,
+ /* (2^121)P */ 0x07, 0x28, 0xdd, 0x10, 0x14, 0xa5, 0x95, 0x7e, 0xf3, 0xe4, 0xd4, 0x14, 0xb4, 0x7e, 0x76, 0xdb, 0x42, 0xd6, 0x94, 0x3e, 0xeb, 0x44, 0x64, 0x88, 0x0d, 0xec, 0xc1, 0x21, 0xf0, 0x79, 0xe0, 0x83, 0x67, 0x55, 0x53, 0xc2, 0xf6, 0xc5, 0xc5, 0x89, 0x39, 0xe8, 0x42, 0xd0, 0x17, 0xbd, 0xff, 0x35, 0x59, 0x0e, 0xc3, 0x06, 0x86, 0xd4, 0x64, 0xcf,
+ /* (2^122)P */ 0x91, 0xa8, 0xdb, 0x57, 0x9b, 0xe2, 0x96, 0x31, 0x10, 0x6e, 0xd7, 0x9a, 0x97, 0xb3, 0xab, 0xb5, 0x15, 0x66, 0xbe, 0xcc, 0x6d, 0x9a, 0xac, 0x06, 0xb3, 0x0d, 0xaa, 0x4b, 0x9c, 0x96, 0x79, 0x6c, 0x34, 0xee, 0x9e, 0x53, 0x4d, 0x6e, 0xbd, 0x88, 0x02, 0xbf, 0x50, 0x54, 0x12, 0x5d, 0x01, 0x02, 0x46, 0xc6, 0x74, 0x02, 0x8c, 0x24, 0xae, 0xb1,
+ /* (2^123)P */ 0xf5, 0x22, 0xea, 0xac, 0x7d, 0x9c, 0x33, 0x8a, 0xa5, 0x36, 0x79, 0x6a, 0x4f, 0xa4, 0xdc, 0xa5, 0x73, 0x64, 0xc4, 0x6f, 0x43, 0x02, 0x3b, 0x94, 0x66, 0xd2, 0x4b, 0x4f, 0xf6, 0x45, 0x33, 0x5d, 0x10, 0x33, 0x18, 0x1e, 0xa3, 0xfc, 0xf7, 0xd2, 0xb8, 0xc8, 0xa7, 0xe0, 0x76, 0x8a, 0xcd, 0xff, 0x4f, 0x99, 0x34, 0x47, 0x84, 0x91, 0x96, 0x9f,
+ /* (2^124)P */ 0x8a, 0x48, 0x3b, 0x48, 0x4a, 0xbc, 0xac, 0xe2, 0x80, 0xd6, 0xd2, 0x35, 0xde, 0xd0, 0x56, 0x42, 0x33, 0xb3, 0x56, 0x5a, 0xcd, 0xb8, 0x3d, 0xb5, 0x25, 0xc1, 0xed, 0xff, 0x87, 0x0b, 0x79, 0xff, 0xf2, 0x62, 0xe1, 0x76, 0xc6, 0xa2, 0x0f, 0xa8, 0x9b, 0x0d, 0xcc, 0x3f, 0x3d, 0x35, 0x27, 0x8d, 0x0b, 0x74, 0xb0, 0xc3, 0x78, 0x8c, 0xcc, 0xc8,
+ /* (2^125)P */ 0xfc, 0x9a, 0x0c, 0xa8, 0x49, 0x42, 0xb8, 0xdf, 0xcf, 0xb3, 0x19, 0xa6, 0x64, 0x57, 0xfe, 0xe8, 0xf8, 0xa6, 0x4b, 0x86, 0xa1, 0xd5, 0x83, 0x7f, 0x14, 0x99, 0x18, 0x0c, 0x7d, 0x5b, 0xf7, 0x3d, 0xf9, 0x4b, 0x79, 0xb1, 0x86, 0x30, 0xb4, 0x5e, 0x6a, 0xe8, 0x9d, 0xfa, 0x8a, 0x41, 0xc4, 0x30, 0xfc, 0x56, 0x74, 0x14, 0x42, 0xc8, 0x96, 0x0e,
+ /* (2^126)P */ 0xdf, 0x66, 0xec, 0xbc, 0x44, 0xdb, 0x19, 0xce, 0xd4, 0xb5, 0x49, 0x40, 0x07, 0x49, 0xe0, 0x3a, 0x61, 0x10, 0xfb, 0x7d, 0xba, 0xb1, 0xe0, 0x28, 0x5b, 0x99, 0x59, 0x96, 0xa2, 0xee, 0xe0, 0x23, 0x37, 0x39, 0x1f, 0xe6, 0x57, 0x9f, 0xf8, 0xf8, 0xdc, 0x74, 0xf6, 0x8f, 0x4f, 0x5e, 0x51, 0xa4, 0x12, 0xac, 0xbe, 0xe4, 0xf3, 0xd1, 0xf0, 0x24,
+ /* (2^127)P */ 0x1e, 0x3e, 0x9a, 0x5f, 0xdf, 0x9f, 0xd6, 0x4e, 0x8a, 0x28, 0xc3, 0xcd, 0x96, 0x9d, 0x57, 0xc7, 0x61, 0x81, 0x90, 0xff, 0xae, 0xb1, 0x4f, 0xc2, 0x96, 0x8b, 0x1a, 0x18, 0xf4, 0x50, 0xcb, 0x31, 0xe1, 0x57, 0xf4, 0x90, 0xa8, 0xea, 0xac, 0xe7, 0x61, 0x98, 0xb6, 0x15, 0xc1, 0x7b, 0x29, 0xa4, 0xc3, 0x18, 0xef, 0xb9, 0xd8, 0xdf, 0xf6, 0xac,
+ /* (2^128)P */ 0xca, 0xa8, 0x6c, 0xf1, 0xb4, 0xca, 0xfe, 0x31, 0xee, 0x48, 0x38, 0x8b, 0x0e, 0xbb, 0x7a, 0x30, 0xaa, 0xf9, 0xee, 0x27, 0x53, 0x24, 0xdc, 0x2e, 0x15, 0xa6, 0x48, 0x8f, 0xa0, 0x7e, 0xf1, 0xdc, 0x93, 0x87, 0x39, 0xeb, 0x7f, 0x38, 0x92, 0x92, 0x4c, 0x29, 0xe9, 0x57, 0xd8, 0x59, 0xfc, 0xe9, 0x9c, 0x44, 0xc0, 0x65, 0xcf, 0xac, 0x4b, 0xdc,
+ /* (2^129)P */ 0xa3, 0xd0, 0x37, 0x8f, 0x86, 0x2f, 0xc6, 0x47, 0x55, 0x46, 0x65, 0x26, 0x4b, 0x91, 0xe2, 0x18, 0x5c, 0x4f, 0x23, 0xc1, 0x37, 0x29, 0xb9, 0xc1, 0x27, 0xc5, 0x3c, 0xbf, 0x7e, 0x23, 0xdb, 0x73, 0x99, 0xbd, 0x1b, 0xb2, 0x31, 0x68, 0x3a, 0xad, 0xb7, 0xb0, 0x10, 0xc5, 0xe5, 0x11, 0x51, 0xba, 0xa7, 0x60, 0x66, 0x54, 0xf0, 0x08, 0xd7, 0x69,
+ /* (2^130)P */ 0x89, 0x41, 0x79, 0xcc, 0xeb, 0x0a, 0xf5, 0x4b, 0xa3, 0x4c, 0xce, 0x52, 0xb0, 0xa7, 0xe4, 0x41, 0x75, 0x7d, 0x04, 0xbb, 0x09, 0x4c, 0x50, 0x9f, 0xdf, 0xea, 0x74, 0x61, 0x02, 0xad, 0xb4, 0x9d, 0xb7, 0x05, 0xb9, 0xea, 0xeb, 0x91, 0x35, 0xe7, 0x49, 0xea, 0xd3, 0x4f, 0x3c, 0x60, 0x21, 0x7a, 0xde, 0xc7, 0xe2, 0x5a, 0xee, 0x8e, 0x93, 0xc7,
+ /* (2^131)P */ 0x00, 0xe8, 0xed, 0xd0, 0xb3, 0x0d, 0xaf, 0xb2, 0xde, 0x2c, 0xf6, 0x00, 0xe2, 0xea, 0x6d, 0xf8, 0x0e, 0xd9, 0x67, 0x59, 0xa9, 0x50, 0xbb, 0x17, 0x8f, 0xff, 0xb1, 0x9f, 0x17, 0xb6, 0xf2, 0xb5, 0xba, 0x80, 0xf7, 0x0f, 0xba, 0xd5, 0x09, 0x43, 0xaa, 0x4e, 0x3a, 0x67, 0x6a, 0x89, 0x9b, 0x18, 0x65, 0x35, 0xf8, 0x3a, 0x49, 0x91, 0x30, 0x51,
+ /* (2^132)P */ 0x8d, 0x25, 0xe9, 0x0e, 0x7d, 0x50, 0x76, 0xe4, 0x58, 0x7e, 0xb9, 0x33, 0xe6, 0x65, 0x90, 0xc2, 0x50, 0x9d, 0x50, 0x2e, 0x11, 0xad, 0xd5, 0x43, 0x52, 0x32, 0x41, 0x4f, 0x7b, 0xb6, 0xa0, 0xec, 0x81, 0x75, 0x36, 0x7c, 0x77, 0x85, 0x59, 0x70, 0xe4, 0xf9, 0xef, 0x66, 0x8d, 0x35, 0xc8, 0x2a, 0x6e, 0x5b, 0xc6, 0x0d, 0x0b, 0x29, 0x60, 0x68,
+ /* (2^133)P */ 0xf8, 0xce, 0xb0, 0x3a, 0x56, 0x7d, 0x51, 0x9a, 0x25, 0x73, 0xea, 0xdd, 0xe4, 0xe0, 0x0e, 0xf0, 0x07, 0xc0, 0x31, 0x00, 0x73, 0x35, 0xd0, 0x39, 0xc4, 0x9b, 0xb7, 0x95, 0xe0, 0x62, 0x70, 0x36, 0x0b, 0xcb, 0xa0, 0x42, 0xde, 0x51, 0xcf, 0x41, 0xe0, 0xb8, 0xb4, 0xc0, 0xe5, 0x46, 0x99, 0x9f, 0x02, 0x7f, 0x14, 0x8c, 0xc1, 0x4e, 0xef, 0xe8,
+ /* (2^134)P */ 0x10, 0x01, 0x57, 0x0a, 0xbe, 0x8b, 0x18, 0xc8, 0xca, 0x00, 0x28, 0x77, 0x4a, 0x9a, 0xc7, 0x55, 0x2a, 0xcc, 0x0c, 0x7b, 0xb9, 0xe9, 0xc8, 0x97, 0x7c, 0x02, 0xe3, 0x09, 0x2f, 0x62, 0x30, 0xb8, 0x40, 0x09, 0x65, 0xe9, 0x55, 0x63, 0xb5, 0x07, 0xca, 0x9f, 0x00, 0xdf, 0x9d, 0x5c, 0xc7, 0xee, 0x57, 0xa5, 0x90, 0x15, 0x1e, 0x22, 0xa0, 0x12,
+ /* (2^135)P */ 0x71, 0x2d, 0xc9, 0xef, 0x27, 0xb9, 0xd8, 0x12, 0x43, 0x6b, 0xa8, 0xce, 0x3b, 0x6d, 0x6e, 0x91, 0x43, 0x23, 0xbc, 0x32, 0xb3, 0xbf, 0xe1, 0xc7, 0x39, 0xcf, 0x7c, 0x42, 0x4c, 0xb1, 0x30, 0xe2, 0xdd, 0x69, 0x06, 0xe5, 0xea, 0xf0, 0x2a, 0x16, 0x50, 0x71, 0xca, 0x92, 0xdf, 0xc1, 0xcc, 0xec, 0xe6, 0x54, 0x07, 0xf3, 0x18, 0x8d, 0xd8, 0x29,
+ /* (2^136)P */ 0x98, 0x51, 0x48, 0x8f, 0xfa, 0x2e, 0x5e, 0x67, 0xb0, 0xc6, 0x17, 0x12, 0xb6, 0x7d, 0xc9, 0xad, 0x81, 0x11, 0xad, 0x0c, 0x1c, 0x2d, 0x45, 0xdf, 0xac, 0x66, 0xbd, 0x08, 0x6f, 0x7c, 0xc7, 0x06, 0x6e, 0x19, 0x08, 0x39, 0x64, 0xd7, 0xe4, 0xd1, 0x11, 0x5f, 0x1c, 0xf4, 0x67, 0xc3, 0x88, 0x6a, 0xe6, 0x07, 0xa3, 0x83, 0xd7, 0xfd, 0x2a, 0xf9,
+ /* (2^137)P */ 0x87, 0xed, 0xeb, 0xd9, 0xdf, 0xff, 0x43, 0x8b, 0xaa, 0x20, 0x58, 0xb0, 0xb4, 0x6b, 0x14, 0xb8, 0x02, 0xc5, 0x40, 0x20, 0x22, 0xbb, 0xf7, 0xb4, 0xf3, 0x05, 0x1e, 0x4d, 0x94, 0xff, 0xe3, 0xc5, 0x22, 0x82, 0xfe, 0xaf, 0x90, 0x42, 0x98, 0x6b, 0x76, 0x8b, 0x3e, 0x89, 0x3f, 0x42, 0x2a, 0xa7, 0x26, 0x00, 0xda, 0x5c, 0xa2, 0x2b, 0xec, 0xdd,
+ /* (2^138)P */ 0x5c, 0x21, 0x16, 0x0d, 0x46, 0xb8, 0xd0, 0xa7, 0x88, 0xe7, 0x25, 0xcb, 0x3e, 0x50, 0x73, 0x61, 0xe7, 0xaf, 0x5a, 0x3f, 0x47, 0x8b, 0x3d, 0x97, 0x79, 0x2c, 0xe6, 0x6d, 0x95, 0x74, 0x65, 0x70, 0x36, 0xfd, 0xd1, 0x9e, 0x13, 0x18, 0x63, 0xb1, 0x2d, 0x0b, 0xb5, 0x36, 0x3e, 0xe7, 0x35, 0x42, 0x3b, 0xe6, 0x1f, 0x4d, 0x9d, 0x59, 0xa2, 0x43,
+ /* (2^139)P */ 0x8c, 0x0c, 0x7c, 0x24, 0x9e, 0xe0, 0xf8, 0x05, 0x1c, 0x9e, 0x1f, 0x31, 0xc0, 0x70, 0xb3, 0xfb, 0x4e, 0xf8, 0x0a, 0x57, 0xb7, 0x49, 0xb5, 0x73, 0xa1, 0x5f, 0x9b, 0x6a, 0x07, 0x6c, 0x87, 0x71, 0x87, 0xd4, 0xbe, 0x98, 0x1e, 0x98, 0xee, 0x52, 0xc1, 0x7b, 0x95, 0x0f, 0x28, 0x32, 0x36, 0x28, 0xd0, 0x3a, 0x0f, 0x7d, 0x2a, 0xa9, 0x62, 0xb9,
+ /* (2^140)P */ 0x97, 0xe6, 0x18, 0x77, 0xf9, 0x34, 0xac, 0xbc, 0xe0, 0x62, 0x9f, 0x42, 0xde, 0xbd, 0x2f, 0xf7, 0x1f, 0xb7, 0x14, 0x52, 0x8a, 0x79, 0xb2, 0x3f, 0xd2, 0x95, 0x71, 0x01, 0xe8, 0xaf, 0x8c, 0xa4, 0xa4, 0xa7, 0x27, 0xf3, 0x5c, 0xdf, 0x3e, 0x57, 0x7a, 0xf1, 0x76, 0x49, 0xe6, 0x42, 0x3f, 0x8f, 0x1e, 0x63, 0x4a, 0x65, 0xb5, 0x41, 0xf5, 0x02,
+ /* (2^141)P */ 0x72, 0x85, 0xc5, 0x0b, 0xe1, 0x47, 0x64, 0x02, 0xc5, 0x4d, 0x81, 0x69, 0xb2, 0xcf, 0x0f, 0x6c, 0xd4, 0x6d, 0xd0, 0xc7, 0xb4, 0x1c, 0xd0, 0x32, 0x59, 0x89, 0xe2, 0xe0, 0x96, 0x8b, 0x12, 0x98, 0xbf, 0x63, 0x7a, 0x4c, 0x76, 0x7e, 0x58, 0x17, 0x8f, 0x5b, 0x0a, 0x59, 0x65, 0x75, 0xbc, 0x61, 0x1f, 0xbe, 0xc5, 0x6e, 0x0a, 0x57, 0x52, 0x70,
+ /* (2^142)P */ 0x92, 0x1c, 0x77, 0xbb, 0x62, 0x02, 0x6c, 0x25, 0x9c, 0x66, 0x07, 0x83, 0xab, 0xcc, 0x80, 0x5d, 0xd2, 0x76, 0x0c, 0xa4, 0xc5, 0xb4, 0x8a, 0x68, 0x23, 0x31, 0x32, 0x29, 0x8a, 0x47, 0x92, 0x12, 0x80, 0xb3, 0xfa, 0x18, 0xe4, 0x8d, 0xc0, 0x4d, 0xfe, 0x97, 0x5f, 0x72, 0x41, 0xb5, 0x5c, 0x7a, 0xbd, 0xf0, 0xcf, 0x5e, 0x97, 0xaa, 0x64, 0x32,
+ /* (2^143)P */ 0x35, 0x3f, 0x75, 0xc1, 0x7a, 0x75, 0x7e, 0xa9, 0xc6, 0x0b, 0x4e, 0x32, 0x62, 0xec, 0xe3, 0x5c, 0xfb, 0x01, 0x43, 0xb6, 0xd4, 0x5b, 0x75, 0xd2, 0xee, 0x7f, 0x5d, 0x23, 0x2b, 0xb3, 0x54, 0x34, 0x4c, 0xd3, 0xb4, 0x32, 0x84, 0x81, 0xb5, 0x09, 0x76, 0x19, 0xda, 0x58, 0xda, 0x7c, 0xdb, 0x2e, 0xdd, 0x4c, 0x8e, 0xdd, 0x5d, 0x89, 0x10, 0x10,
+ /* (2^144)P */ 0x57, 0x25, 0x6a, 0x08, 0x37, 0x92, 0xa8, 0xdf, 0x24, 0xef, 0x8f, 0x33, 0x34, 0x52, 0xa4, 0x4c, 0xf0, 0x77, 0x9f, 0x69, 0x77, 0xd5, 0x8f, 0xd2, 0x9a, 0xb3, 0xb6, 0x1d, 0x2d, 0xa6, 0xf7, 0x1f, 0xda, 0xd7, 0xcb, 0x75, 0x11, 0xc3, 0x6b, 0xc0, 0x38, 0xb1, 0xd5, 0x2d, 0x96, 0x84, 0x16, 0xfa, 0x26, 0xb9, 0xcc, 0x3f, 0x16, 0x47, 0x23, 0x74,
+ /* (2^145)P */ 0x9b, 0x61, 0x2a, 0x1c, 0xdd, 0x39, 0xa5, 0xfa, 0x1c, 0x7d, 0x63, 0x50, 0xca, 0xe6, 0x9d, 0xfa, 0xb7, 0xc4, 0x4c, 0x6a, 0x97, 0x5f, 0x36, 0x4e, 0x47, 0xdd, 0x17, 0xf7, 0xf9, 0x19, 0xce, 0x75, 0x17, 0xad, 0xce, 0x2a, 0xf3, 0xfe, 0x27, 0x8f, 0x3e, 0x48, 0xc0, 0x60, 0x87, 0x24, 0x19, 0xae, 0x59, 0xe4, 0x5a, 0x00, 0x2a, 0xba, 0xa2, 0x1f,
+ /* (2^146)P */ 0x26, 0x88, 0x42, 0x60, 0x9f, 0x6e, 0x2c, 0x7c, 0x39, 0x0f, 0x47, 0x6a, 0x0e, 0x02, 0xbb, 0x4b, 0x34, 0x29, 0x55, 0x18, 0x36, 0xcf, 0x3b, 0x47, 0xf1, 0x2e, 0xfc, 0x6e, 0x94, 0xff, 0xe8, 0x6b, 0x06, 0xd2, 0xba, 0x77, 0x5e, 0x60, 0xd7, 0x19, 0xef, 0x02, 0x9d, 0x3a, 0xc2, 0xb7, 0xa9, 0xd8, 0x57, 0xee, 0x7e, 0x2b, 0xf2, 0x6d, 0x28, 0xda,
+ /* (2^147)P */ 0xdf, 0xd9, 0x92, 0x11, 0x98, 0x23, 0xe2, 0x45, 0x2f, 0x74, 0x70, 0xee, 0x0e, 0x55, 0x65, 0x79, 0x86, 0x38, 0x17, 0x92, 0x85, 0x87, 0x99, 0x50, 0xd9, 0x7c, 0xdb, 0xa1, 0x10, 0xec, 0x30, 0xb7, 0x40, 0xa3, 0x23, 0x9b, 0x0e, 0x27, 0x49, 0x29, 0x03, 0x94, 0xff, 0x53, 0xdc, 0xd7, 0xed, 0x49, 0xa9, 0x5a, 0x3b, 0xee, 0xd7, 0xc7, 0x65, 0xaf,
+ /* (2^148)P */ 0xa0, 0xbd, 0xbe, 0x03, 0xee, 0x0c, 0xbe, 0x32, 0x00, 0x7b, 0x52, 0xcb, 0x92, 0x29, 0xbf, 0xa0, 0xc6, 0xd9, 0xd2, 0xd6, 0x15, 0xe8, 0x3a, 0x75, 0x61, 0x65, 0x56, 0xae, 0xad, 0x3c, 0x2a, 0x64, 0x14, 0x3f, 0x8e, 0xc1, 0x2d, 0x0c, 0x8d, 0x20, 0xdb, 0x58, 0x4b, 0xe5, 0x40, 0x15, 0x4b, 0xdc, 0xa8, 0xbd, 0xef, 0x08, 0xa7, 0xd1, 0xf4, 0xb0,
+ /* (2^149)P */ 0xa9, 0x0f, 0x05, 0x94, 0x66, 0xac, 0x1f, 0x65, 0x3f, 0xe1, 0xb8, 0xe1, 0x34, 0x5e, 0x1d, 0x8f, 0xe3, 0x93, 0x03, 0x15, 0xff, 0xb6, 0x65, 0xb6, 0x6e, 0xc0, 0x2f, 0xd4, 0x2e, 0xb9, 0x2c, 0x13, 0x3c, 0x99, 0x1c, 0xb5, 0x87, 0xba, 0x79, 0xcb, 0xf0, 0x18, 0x06, 0x86, 0x04, 0x14, 0x25, 0x09, 0xcd, 0x1c, 0x14, 0xda, 0x35, 0xd0, 0x38, 0x3b,
+ /* (2^150)P */ 0x1b, 0x04, 0xa3, 0x27, 0xb4, 0xd3, 0x37, 0x48, 0x1e, 0x8f, 0x69, 0xd3, 0x5a, 0x2f, 0x20, 0x02, 0x36, 0xbe, 0x06, 0x7b, 0x6b, 0x6c, 0x12, 0x5b, 0x80, 0x74, 0x44, 0xe6, 0xf8, 0xf5, 0x95, 0x59, 0x29, 0xab, 0x51, 0x47, 0x83, 0x28, 0xe0, 0xad, 0xde, 0xaa, 0xd3, 0xb1, 0x1a, 0xcb, 0xa3, 0xcd, 0x8b, 0x6a, 0xb1, 0xa7, 0x0a, 0xd1, 0xf9, 0xbe,
+ /* (2^151)P */ 0xce, 0x2f, 0x85, 0xca, 0x74, 0x6d, 0x49, 0xb8, 0xce, 0x80, 0x44, 0xe0, 0xda, 0x5b, 0xcf, 0x2f, 0x79, 0x74, 0xfe, 0xb4, 0x2c, 0x99, 0x20, 0x6e, 0x09, 0x04, 0xfb, 0x6d, 0x57, 0x5b, 0x95, 0x0c, 0x45, 0xda, 0x4f, 0x7f, 0x63, 0xcc, 0x85, 0x5a, 0x67, 0x50, 0x68, 0x71, 0xb4, 0x67, 0xb1, 0x2e, 0xc1, 0x1c, 0xdc, 0xff, 0x2a, 0x7c, 0x10, 0x5e,
+ /* (2^152)P */ 0xa6, 0xde, 0xf3, 0xd4, 0x22, 0x30, 0x24, 0x9e, 0x0b, 0x30, 0x54, 0x59, 0x7e, 0xa2, 0xeb, 0x89, 0x54, 0x65, 0x3e, 0x40, 0xd1, 0xde, 0xe6, 0xee, 0x4d, 0xbf, 0x5e, 0x40, 0x1d, 0xee, 0x4f, 0x68, 0xd9, 0xa7, 0x2f, 0xb3, 0x64, 0xb3, 0xf5, 0xc8, 0xd3, 0xaa, 0x70, 0x70, 0x3d, 0xef, 0xd3, 0x95, 0x54, 0xdb, 0x3e, 0x94, 0x95, 0x92, 0x1f, 0x45,
+ /* (2^153)P */ 0x22, 0x80, 0x1d, 0x9d, 0x96, 0xa5, 0x78, 0x6f, 0xe0, 0x1e, 0x1b, 0x66, 0x42, 0xc8, 0xae, 0x9e, 0x46, 0x45, 0x08, 0x41, 0xdf, 0x80, 0xae, 0x6f, 0xdb, 0x15, 0x5a, 0x21, 0x31, 0x7a, 0xd0, 0xf2, 0x54, 0x15, 0x88, 0xd3, 0x0f, 0x7f, 0x14, 0x5a, 0x14, 0x97, 0xab, 0xf4, 0x58, 0x6a, 0x9f, 0xea, 0x74, 0xe5, 0x6b, 0x90, 0x59, 0x2b, 0x48, 0xd9,
+ /* (2^154)P */ 0x12, 0x24, 0x04, 0xf5, 0x50, 0xc2, 0x8c, 0xb0, 0x7c, 0x46, 0x98, 0xd5, 0x24, 0xad, 0xf6, 0x72, 0xdc, 0x82, 0x1a, 0x60, 0xc1, 0xeb, 0x48, 0xef, 0x7f, 0x6e, 0xe6, 0xcc, 0xdb, 0x7b, 0xae, 0xbe, 0x5e, 0x1e, 0x5c, 0xe6, 0x0a, 0x70, 0xdf, 0xa4, 0xa3, 0x85, 0x1b, 0x1b, 0x7f, 0x72, 0xb9, 0x96, 0x6f, 0xdc, 0x03, 0x76, 0x66, 0xfb, 0xa0, 0x33,
+ /* (2^155)P */ 0x37, 0x40, 0xbb, 0xbc, 0x68, 0x58, 0x86, 0xca, 0xbb, 0xa5, 0x24, 0x76, 0x3d, 0x48, 0xd1, 0xad, 0xb4, 0xa8, 0xcf, 0xc3, 0xb6, 0xa8, 0xba, 0x1a, 0x3a, 0xbe, 0x33, 0x75, 0x04, 0x5c, 0x13, 0x8c, 0x0d, 0x70, 0x8d, 0xa6, 0x4e, 0x2a, 0xeb, 0x17, 0x3c, 0x22, 0xdd, 0x3e, 0x96, 0x40, 0x11, 0x9e, 0x4e, 0xae, 0x3d, 0xf8, 0x91, 0xd7, 0x50, 0xc8,
+ /* (2^156)P */ 0xd8, 0xca, 0xde, 0x19, 0xcf, 0x00, 0xe4, 0x73, 0x18, 0x7f, 0x9b, 0x9f, 0xf4, 0x5b, 0x49, 0x49, 0x99, 0xdc, 0xa4, 0x46, 0x21, 0xb5, 0xd7, 0x3e, 0xb7, 0x47, 0x1b, 0xa9, 0x9f, 0x4c, 0x69, 0x7d, 0xec, 0x33, 0xd6, 0x1c, 0x51, 0x7f, 0x47, 0x74, 0x7a, 0x6c, 0xf3, 0xd2, 0x2e, 0xbf, 0xdf, 0x6c, 0x9e, 0x77, 0x3b, 0x34, 0xf6, 0x73, 0x80, 0xed,
+ /* (2^157)P */ 0x16, 0xfb, 0x16, 0xc3, 0xc2, 0x83, 0xe4, 0xf4, 0x03, 0x7f, 0x52, 0xb0, 0x67, 0x51, 0x7b, 0x24, 0x5a, 0x51, 0xd3, 0xb6, 0x4e, 0x59, 0x76, 0xcd, 0x08, 0x7b, 0x1d, 0x7a, 0x9c, 0x65, 0xae, 0xce, 0xaa, 0xd2, 0x1c, 0x85, 0x66, 0x68, 0x06, 0x15, 0xa8, 0x06, 0xe6, 0x16, 0x37, 0xf4, 0x49, 0x9e, 0x0f, 0x50, 0x37, 0xb1, 0xb2, 0x93, 0x70, 0x43,
+ /* (2^158)P */ 0x18, 0x3a, 0x16, 0xe5, 0x8d, 0xc8, 0x35, 0xd6, 0x7b, 0x09, 0xec, 0x61, 0x5f, 0x5c, 0x2a, 0x19, 0x96, 0x2e, 0xc3, 0xfd, 0xab, 0xe6, 0x23, 0xae, 0xab, 0xc5, 0xcb, 0xb9, 0x7b, 0x2d, 0x34, 0x51, 0xb9, 0x41, 0x9e, 0x7d, 0xca, 0xda, 0x25, 0x45, 0x14, 0xb0, 0xc7, 0x4d, 0x26, 0x2b, 0xfe, 0x43, 0xb0, 0x21, 0x5e, 0xfa, 0xdc, 0x7c, 0xf9, 0x5a,
+ /* (2^159)P */ 0x94, 0xad, 0x42, 0x17, 0xf5, 0xcd, 0x1c, 0x0d, 0xf6, 0x41, 0xd2, 0x55, 0xbb, 0x50, 0xf1, 0xc6, 0xbc, 0xa6, 0xc5, 0x3a, 0xfd, 0x9b, 0x75, 0x3e, 0xf6, 0x1a, 0xa7, 0xb2, 0x6e, 0x64, 0x12, 0xdc, 0x3c, 0xe5, 0xf6, 0xfc, 0x3b, 0xfa, 0x43, 0x81, 0xd4, 0xa5, 0xee, 0xf5, 0x9c, 0x47, 0x2f, 0xd0, 0x9c, 0xde, 0xa1, 0x48, 0x91, 0x9a, 0x34, 0xc1,
+ /* (2^160)P */ 0x37, 0x1b, 0xb3, 0x88, 0xc9, 0x98, 0x4e, 0xfb, 0x84, 0x4f, 0x2b, 0x0a, 0xb6, 0x8f, 0x35, 0x15, 0xcd, 0x61, 0x7a, 0x5f, 0x5c, 0xa0, 0xca, 0x23, 0xa0, 0x93, 0x1f, 0xcc, 0x3c, 0x39, 0x3a, 0x24, 0xa7, 0x49, 0xad, 0x8d, 0x59, 0xcc, 0x94, 0x5a, 0x16, 0xf5, 0x70, 0xe8, 0x52, 0x1e, 0xee, 0x20, 0x30, 0x17, 0x7e, 0xf0, 0x4c, 0x93, 0x06, 0x5a,
+ /* (2^161)P */ 0x81, 0xba, 0x3b, 0xd7, 0x3e, 0xb4, 0x32, 0x3a, 0x22, 0x39, 0x2a, 0xfc, 0x19, 0xd9, 0xd2, 0xf6, 0xc5, 0x79, 0x6c, 0x0e, 0xde, 0xda, 0x01, 0xff, 0x52, 0xfb, 0xb6, 0x95, 0x4e, 0x7a, 0x10, 0xb8, 0x06, 0x86, 0x3c, 0xcd, 0x56, 0xd6, 0x15, 0xbf, 0x6e, 0x3e, 0x4f, 0x35, 0x5e, 0xca, 0xbc, 0xa5, 0x95, 0xa2, 0xdf, 0x2d, 0x1d, 0xaf, 0x59, 0xf9,
+ /* (2^162)P */ 0x69, 0xe5, 0xe2, 0xfa, 0xc9, 0x7f, 0xdd, 0x09, 0xf5, 0x6b, 0x4e, 0x2e, 0xbe, 0xb4, 0xbf, 0x3e, 0xb2, 0xf2, 0x81, 0x30, 0xe1, 0x07, 0xa8, 0x0d, 0x2b, 0xd2, 0x5a, 0x55, 0xbe, 0x4b, 0x86, 0x5d, 0xb0, 0x5e, 0x7c, 0x8f, 0xc1, 0x3c, 0x81, 0x4c, 0xf7, 0x6d, 0x7d, 0xe6, 0x4f, 0x8a, 0x85, 0xc2, 0x2f, 0x28, 0xef, 0x8c, 0x69, 0xc2, 0xc2, 0x1a,
+ /* (2^163)P */ 0xd9, 0xe4, 0x0e, 0x1e, 0xc2, 0xf7, 0x2f, 0x9f, 0xa1, 0x40, 0xfe, 0x46, 0x16, 0xaf, 0x2e, 0xd1, 0xec, 0x15, 0x9b, 0x61, 0x92, 0xce, 0xfc, 0x10, 0x43, 0x1d, 0x00, 0xf6, 0xbe, 0x20, 0x80, 0x80, 0x6f, 0x3c, 0x16, 0x94, 0x59, 0xba, 0x03, 0x53, 0x6e, 0xb6, 0xdd, 0x25, 0x7b, 0x86, 0xbf, 0x96, 0xf4, 0x2f, 0xa1, 0x96, 0x8d, 0xf9, 0xb3, 0x29,
+ /* (2^164)P */ 0x3b, 0x04, 0x60, 0x6e, 0xce, 0xab, 0xd2, 0x63, 0x18, 0x53, 0x88, 0x16, 0x4a, 0x6a, 0xab, 0x72, 0x03, 0x68, 0xa5, 0xd4, 0x0d, 0xb2, 0x82, 0x81, 0x1f, 0x2b, 0x5c, 0x75, 0xe8, 0xd2, 0x1d, 0x7f, 0xe7, 0x1b, 0x35, 0x02, 0xde, 0xec, 0xbd, 0xcb, 0xc7, 0x01, 0xd3, 0x95, 0x61, 0xfe, 0xb2, 0x7a, 0x66, 0x09, 0x4c, 0x6d, 0xfd, 0x39, 0xf7, 0x52,
+ /* (2^165)P */ 0x42, 0xc1, 0x5f, 0xf8, 0x35, 0x52, 0xc1, 0xfe, 0xc5, 0x11, 0x80, 0x1c, 0x11, 0x46, 0x31, 0x11, 0xbe, 0xd0, 0xc4, 0xb6, 0x07, 0x13, 0x38, 0xa0, 0x8d, 0x65, 0xf0, 0x56, 0x9e, 0x16, 0xbf, 0x9d, 0xcd, 0x51, 0x34, 0xf9, 0x08, 0x48, 0x7b, 0x76, 0x0c, 0x7b, 0x30, 0x07, 0xa8, 0x76, 0xaf, 0xa3, 0x29, 0x38, 0xb0, 0x58, 0xde, 0x72, 0x4b, 0x45,
+ /* (2^166)P */ 0xd4, 0x16, 0xa7, 0xc0, 0xb4, 0x9f, 0xdf, 0x1a, 0x37, 0xc8, 0x35, 0xed, 0xc5, 0x85, 0x74, 0x64, 0x09, 0x22, 0xef, 0xe9, 0x0c, 0xaf, 0x12, 0x4c, 0x9e, 0xf8, 0x47, 0x56, 0xe0, 0x7f, 0x4e, 0x24, 0x6b, 0x0c, 0xe7, 0xad, 0xc6, 0x47, 0x1d, 0xa4, 0x0d, 0x86, 0x89, 0x65, 0xe8, 0x5f, 0x71, 0xc7, 0xe9, 0xcd, 0xec, 0x6c, 0x62, 0xc7, 0xe3, 0xb3,
+ /* (2^167)P */ 0xb5, 0xea, 0x86, 0xe3, 0x15, 0x18, 0x3f, 0x6d, 0x7b, 0x05, 0x95, 0x15, 0x53, 0x26, 0x1c, 0xeb, 0xbe, 0x7e, 0x16, 0x42, 0x4b, 0xa2, 0x3d, 0xdd, 0x0e, 0xff, 0xba, 0x67, 0xb5, 0xae, 0x7a, 0x17, 0xde, 0x23, 0xad, 0x14, 0xcc, 0xd7, 0xaf, 0x57, 0x01, 0xe0, 0xdd, 0x48, 0xdd, 0xd7, 0xe3, 0xdf, 0xe9, 0x2d, 0xda, 0x67, 0xa4, 0x9f, 0x29, 0x04,
+ /* (2^168)P */ 0x16, 0x53, 0xe6, 0x9c, 0x4e, 0xe5, 0x1e, 0x70, 0x81, 0x25, 0x02, 0x9b, 0x47, 0x6d, 0xd2, 0x08, 0x73, 0xbe, 0x0a, 0xf1, 0x7b, 0xeb, 0x24, 0xeb, 0x38, 0x23, 0x5c, 0xb6, 0x3e, 0xce, 0x1e, 0xe3, 0xbc, 0x82, 0x35, 0x1f, 0xaf, 0x3a, 0x3a, 0xe5, 0x4e, 0xc1, 0xca, 0xbf, 0x47, 0xb4, 0xbb, 0xbc, 0x5f, 0xea, 0xc6, 0xca, 0xf3, 0xa0, 0xa2, 0x73,
+ /* (2^169)P */ 0xef, 0xa4, 0x7a, 0x4e, 0xe4, 0xc7, 0xb6, 0x43, 0x2e, 0xa5, 0xe4, 0xa5, 0xba, 0x1e, 0xa5, 0xfe, 0x9e, 0xce, 0xa9, 0x80, 0x04, 0xcb, 0x4f, 0xd8, 0x74, 0x05, 0x48, 0xfa, 0x99, 0x11, 0x5d, 0x97, 0x3b, 0x07, 0x0d, 0xdd, 0xe6, 0xb1, 0x74, 0x87, 0x1a, 0xd3, 0x26, 0xb7, 0x8f, 0xe1, 0x63, 0x3d, 0xec, 0x53, 0x93, 0xb0, 0x81, 0x78, 0x34, 0xa4,
+ /* (2^170)P */ 0xe1, 0xe7, 0xd4, 0x58, 0x9d, 0x0e, 0x8b, 0x65, 0x66, 0x37, 0x16, 0x48, 0x6f, 0xaa, 0x42, 0x37, 0x77, 0xad, 0xb1, 0x56, 0x48, 0xdf, 0x65, 0x36, 0x30, 0xb8, 0x00, 0x12, 0xd8, 0x32, 0x28, 0x7f, 0xc1, 0x71, 0xeb, 0x93, 0x0f, 0x48, 0x04, 0xe1, 0x5a, 0x6a, 0x96, 0xc1, 0xca, 0x89, 0x6d, 0x1b, 0x82, 0x4c, 0x18, 0x6d, 0x55, 0x4b, 0xea, 0xfd,
+ /* (2^171)P */ 0x62, 0x1a, 0x53, 0xb4, 0xb1, 0xbe, 0x6f, 0x15, 0x18, 0x88, 0xd4, 0x66, 0x61, 0xc7, 0x12, 0x69, 0x02, 0xbd, 0x03, 0x23, 0x2b, 0xef, 0xf9, 0x54, 0xa4, 0x85, 0xa8, 0xe3, 0xb7, 0xbd, 0xa9, 0xa3, 0xf3, 0x2a, 0xdd, 0xf1, 0xd4, 0x03, 0x0f, 0xa9, 0xa1, 0xd8, 0xa3, 0xcd, 0xb2, 0x71, 0x90, 0x4b, 0x35, 0x62, 0xf2, 0x2f, 0xce, 0x67, 0x1f, 0xaa,
+ /* (2^172)P */ 0x9e, 0x1e, 0xcd, 0x43, 0x7e, 0x87, 0x37, 0x94, 0x3a, 0x97, 0x4c, 0x7e, 0xee, 0xc9, 0x37, 0x85, 0xf1, 0xd9, 0x4f, 0xbf, 0xf9, 0x6f, 0x39, 0x9a, 0x39, 0x87, 0x2e, 0x25, 0x84, 0x42, 0xc3, 0x80, 0xcb, 0x07, 0x22, 0xae, 0x30, 0xd5, 0x50, 0xa1, 0x23, 0xcc, 0x31, 0x81, 0x9d, 0xf1, 0x30, 0xd9, 0x2b, 0x73, 0x41, 0x16, 0x50, 0xab, 0x2d, 0xa2,
+ /* (2^173)P */ 0xa4, 0x69, 0x4f, 0xa1, 0x4e, 0xb9, 0xbf, 0x14, 0xe8, 0x2b, 0x04, 0x93, 0xb7, 0x6e, 0x9f, 0x7d, 0x73, 0x0a, 0xc5, 0x14, 0xb8, 0xde, 0x8c, 0xc1, 0xfe, 0xc0, 0xa7, 0xa4, 0xcc, 0x42, 0x42, 0x81, 0x15, 0x65, 0x8a, 0x80, 0xb9, 0xde, 0x1f, 0x60, 0x33, 0x0e, 0xcb, 0xfc, 0xe0, 0xdb, 0x83, 0xa1, 0xe5, 0xd0, 0x16, 0x86, 0x2c, 0xe2, 0x87, 0xed,
+ /* (2^174)P */ 0x7a, 0xc0, 0xeb, 0x6b, 0xf6, 0x0d, 0x4c, 0x6d, 0x1e, 0xdb, 0xab, 0xe7, 0x19, 0x45, 0xc6, 0xe3, 0xb2, 0x06, 0xbb, 0xbc, 0x70, 0x99, 0x83, 0x33, 0xeb, 0x28, 0xc8, 0x77, 0xf6, 0x4d, 0x01, 0xb7, 0x59, 0xa0, 0xd2, 0xb3, 0x2a, 0x72, 0x30, 0xe7, 0x11, 0x39, 0xb6, 0x41, 0x29, 0x65, 0x5a, 0x14, 0xb9, 0x86, 0x08, 0xe0, 0x7d, 0x32, 0x8c, 0xf0,
+ /* (2^175)P */ 0x5c, 0x11, 0x30, 0x9e, 0x05, 0x27, 0xf5, 0x45, 0x0f, 0xb3, 0xc9, 0x75, 0xc3, 0xd7, 0xe1, 0x82, 0x3b, 0x8e, 0x87, 0x23, 0x00, 0x15, 0x19, 0x07, 0xd9, 0x21, 0x53, 0xc7, 0xf1, 0xa3, 0xbf, 0x70, 0x64, 0x15, 0x18, 0xca, 0x23, 0x9e, 0xd3, 0x08, 0xc3, 0x2a, 0x8b, 0xe5, 0x83, 0x04, 0x89, 0x14, 0xfd, 0x28, 0x25, 0x1c, 0xe3, 0x26, 0xa7, 0x22,
+ /* (2^176)P */ 0xdc, 0xd4, 0x75, 0x60, 0x99, 0x94, 0xea, 0x09, 0x8e, 0x8a, 0x3c, 0x1b, 0xf9, 0xbd, 0x33, 0x0d, 0x51, 0x3d, 0x12, 0x6f, 0x4e, 0x72, 0xe0, 0x17, 0x20, 0xe9, 0x75, 0xe6, 0x3a, 0xb2, 0x13, 0x83, 0x4e, 0x7a, 0x08, 0x9e, 0xd1, 0x04, 0x5f, 0x6b, 0x42, 0x0b, 0x76, 0x2a, 0x2d, 0x77, 0x53, 0x6c, 0x65, 0x6d, 0x8e, 0x25, 0x3c, 0xb6, 0x8b, 0x69,
+ /* (2^177)P */ 0xb9, 0x49, 0x28, 0xd0, 0xdc, 0x6c, 0x8f, 0x4c, 0xc9, 0x14, 0x8a, 0x38, 0xa3, 0xcb, 0xc4, 0x9d, 0x53, 0xcf, 0xe9, 0xe3, 0xcf, 0xe0, 0xb1, 0xf2, 0x1b, 0x4c, 0x7f, 0x83, 0x2a, 0x7a, 0xe9, 0x8b, 0x3b, 0x86, 0x61, 0x30, 0xe9, 0x99, 0xbd, 0xba, 0x19, 0x6e, 0x65, 0x2a, 0x12, 0x3e, 0x9c, 0xa8, 0xaf, 0xc3, 0xcf, 0xf8, 0x1f, 0x77, 0x86, 0xea,
+ /* (2^178)P */ 0x30, 0xde, 0xe7, 0xff, 0x54, 0xf7, 0xa2, 0x59, 0xf6, 0x0b, 0xfb, 0x7a, 0xf2, 0x39, 0xf0, 0xdb, 0x39, 0xbc, 0xf0, 0xfa, 0x60, 0xeb, 0x6b, 0x4f, 0x47, 0x17, 0xc8, 0x00, 0x65, 0x6d, 0x25, 0x1c, 0xd0, 0x48, 0x56, 0x53, 0x45, 0x11, 0x30, 0x02, 0x49, 0x20, 0x27, 0xac, 0xf2, 0x4c, 0xac, 0x64, 0x3d, 0x52, 0xb8, 0x89, 0xe0, 0x93, 0x16, 0x0f,
+ /* (2^179)P */ 0x84, 0x09, 0xba, 0x40, 0xb2, 0x2f, 0xa3, 0xa8, 0xc2, 0xba, 0x46, 0x33, 0x05, 0x9d, 0x62, 0xad, 0xa1, 0x3c, 0x33, 0xef, 0x0d, 0xeb, 0xf0, 0x77, 0x11, 0x5a, 0xb0, 0x21, 0x9c, 0xdf, 0x55, 0x24, 0x25, 0x35, 0x51, 0x61, 0x92, 0xf0, 0xb1, 0xce, 0xf5, 0xd4, 0x7b, 0x6c, 0x21, 0x9d, 0x56, 0x52, 0xf8, 0xa1, 0x4c, 0xe9, 0x27, 0x55, 0xac, 0x91,
+ /* (2^180)P */ 0x03, 0x3e, 0x30, 0xd2, 0x0a, 0xfa, 0x7d, 0x82, 0x3d, 0x1f, 0x8b, 0xcb, 0xb6, 0x04, 0x5c, 0xcc, 0x8b, 0xda, 0xe2, 0x68, 0x74, 0x08, 0x8c, 0x44, 0x83, 0x57, 0x6d, 0x6f, 0x80, 0xb0, 0x7e, 0xa9, 0x82, 0x91, 0x7b, 0x4c, 0x37, 0x97, 0xd1, 0x63, 0xd1, 0xbd, 0x45, 0xe6, 0x8a, 0x86, 0xd6, 0x89, 0x54, 0xfd, 0xd2, 0xb1, 0xd7, 0x54, 0xad, 0xaf,
+ /* (2^181)P */ 0x8b, 0x33, 0x62, 0x49, 0x9f, 0x63, 0xf9, 0x87, 0x42, 0x58, 0xbf, 0xb3, 0xe6, 0x68, 0x02, 0x60, 0x5c, 0x76, 0x62, 0xf7, 0x61, 0xd7, 0x36, 0x31, 0xf7, 0x9c, 0xb5, 0xe5, 0x13, 0x6c, 0xea, 0x78, 0xae, 0xcf, 0xde, 0xbf, 0xb6, 0xeb, 0x4f, 0xc8, 0x2a, 0xb4, 0x9a, 0x9f, 0xf3, 0xd1, 0x6a, 0xec, 0x0c, 0xbd, 0x85, 0x98, 0x40, 0x06, 0x1c, 0x2a,
+ /* (2^182)P */ 0x74, 0x3b, 0xe7, 0x81, 0xd5, 0xae, 0x54, 0x56, 0x03, 0xe8, 0x97, 0x16, 0x76, 0xcf, 0x24, 0x96, 0x96, 0x5b, 0xcc, 0x09, 0xab, 0x23, 0x6f, 0x54, 0xae, 0x8f, 0xe4, 0x12, 0xcb, 0xfd, 0xbc, 0xac, 0x93, 0x45, 0x3d, 0x68, 0x08, 0x22, 0x59, 0xc6, 0xf0, 0x47, 0x19, 0x8c, 0x79, 0x93, 0x1e, 0x0e, 0x30, 0xb0, 0x94, 0xfb, 0x17, 0x1d, 0x5a, 0x12,
+ /* (2^183)P */ 0x85, 0xff, 0x40, 0x18, 0x85, 0xff, 0x44, 0x37, 0x69, 0x23, 0x4d, 0x34, 0xe1, 0xeb, 0xa3, 0x1b, 0x55, 0x40, 0xc1, 0x64, 0xf4, 0xd4, 0x13, 0x0a, 0x9f, 0xb9, 0x19, 0xfc, 0x88, 0x7d, 0xc0, 0x72, 0xcf, 0x69, 0x2f, 0xd2, 0x0c, 0x82, 0x0f, 0xda, 0x08, 0xba, 0x0f, 0xaa, 0x3b, 0xe9, 0xe5, 0x83, 0x7a, 0x06, 0xe8, 0x1b, 0x38, 0x43, 0xc3, 0x54,
+ /* (2^184)P */ 0x14, 0xaa, 0xb3, 0x6e, 0xe6, 0x28, 0xee, 0xc5, 0x22, 0x6c, 0x7c, 0xf9, 0xa8, 0x71, 0xcc, 0xfe, 0x68, 0x7e, 0xd3, 0xb8, 0x37, 0x96, 0xca, 0x0b, 0xd9, 0xb6, 0x06, 0xa9, 0xf6, 0x71, 0xe8, 0x31, 0xf7, 0xd8, 0xf1, 0x5d, 0xab, 0xb9, 0xf0, 0x5c, 0x98, 0xcf, 0x22, 0xa2, 0x2a, 0xf6, 0xd0, 0x59, 0xf0, 0x9d, 0xd9, 0x6a, 0x4f, 0x59, 0x57, 0xad,
+ /* (2^185)P */ 0xd7, 0x2b, 0x3d, 0x38, 0x4c, 0x2e, 0x23, 0x4d, 0x49, 0xa2, 0x62, 0x62, 0xf9, 0x0f, 0xde, 0x08, 0xf3, 0x86, 0x71, 0xb6, 0xc7, 0xf9, 0x85, 0x9c, 0x33, 0xa1, 0xcf, 0x16, 0xaa, 0x60, 0xb9, 0xb7, 0xea, 0xed, 0x01, 0x1c, 0x59, 0xdb, 0x3f, 0x3f, 0x97, 0x2e, 0xf0, 0x09, 0x9f, 0x10, 0x85, 0x5f, 0x53, 0x39, 0xf3, 0x13, 0x40, 0x56, 0x95, 0xf9,
+ /* (2^186)P */ 0xb4, 0xe3, 0xda, 0xc6, 0x1f, 0x78, 0x8e, 0xac, 0xd4, 0x20, 0x1d, 0xa0, 0xbf, 0x4c, 0x09, 0x16, 0xa7, 0x30, 0xb5, 0x8d, 0x9e, 0xa1, 0x5f, 0x6d, 0x52, 0xf4, 0x71, 0xb6, 0x32, 0x2d, 0x21, 0x51, 0xc6, 0xfc, 0x2f, 0x08, 0xf4, 0x13, 0x6c, 0x55, 0xba, 0x72, 0x81, 0x24, 0x49, 0x0e, 0x4f, 0x06, 0x36, 0x39, 0x6a, 0xc5, 0x81, 0xfc, 0xeb, 0xb2,
+ /* (2^187)P */ 0x7d, 0x8d, 0xc8, 0x6c, 0xea, 0xb4, 0xb9, 0xe8, 0x40, 0xc9, 0x69, 0xc9, 0x30, 0x05, 0xfd, 0x34, 0x46, 0xfd, 0x94, 0x05, 0x16, 0xf5, 0x4b, 0x13, 0x3d, 0x24, 0x1a, 0xd6, 0x64, 0x2b, 0x9c, 0xe2, 0xa5, 0xd9, 0x98, 0xe0, 0xe8, 0xf4, 0xbc, 0x2c, 0xbd, 0xa2, 0x56, 0xe3, 0x9e, 0x14, 0xdb, 0xbf, 0x05, 0xbf, 0x9a, 0x13, 0x5d, 0xf7, 0x91, 0xa3,
+ /* (2^188)P */ 0x8b, 0xcb, 0x27, 0xf3, 0x15, 0x26, 0x05, 0x40, 0x0f, 0xa6, 0x15, 0x13, 0x71, 0x95, 0xa2, 0xc6, 0x38, 0x04, 0x67, 0xf8, 0x9a, 0x83, 0x06, 0xaa, 0x25, 0x36, 0x72, 0x01, 0x6f, 0x74, 0x5f, 0xe5, 0x6e, 0x44, 0x99, 0xce, 0x13, 0xbc, 0x82, 0xc2, 0x0d, 0xa4, 0x98, 0x50, 0x38, 0xf3, 0xa2, 0xc5, 0xe5, 0x24, 0x1f, 0x6f, 0x56, 0x3e, 0x07, 0xb2,
+ /* (2^189)P */ 0xbd, 0x0f, 0x32, 0x60, 0x07, 0xb1, 0xd7, 0x0b, 0x11, 0x07, 0x57, 0x02, 0x89, 0xe8, 0x8b, 0xe8, 0x5a, 0x1f, 0xee, 0x54, 0x6b, 0xff, 0xb3, 0x04, 0x07, 0x57, 0x13, 0x0b, 0x94, 0xa8, 0x4d, 0x81, 0xe2, 0x17, 0x16, 0x45, 0xd4, 0x4b, 0xf7, 0x7e, 0x64, 0x66, 0x20, 0xe8, 0x0b, 0x26, 0xfd, 0xa9, 0x8a, 0x47, 0x52, 0x89, 0x14, 0xd0, 0xd1, 0xa1,
+ /* (2^190)P */ 0xdc, 0x03, 0xe6, 0x20, 0x44, 0x47, 0x8f, 0x04, 0x16, 0x24, 0x22, 0xc1, 0x55, 0x5c, 0xbe, 0x43, 0xc3, 0x92, 0xc5, 0x54, 0x3d, 0x5d, 0xd1, 0x05, 0x9c, 0xc6, 0x7c, 0xbf, 0x23, 0x84, 0x1a, 0xba, 0x4f, 0x1f, 0xfc, 0xa1, 0xae, 0x1a, 0x64, 0x02, 0x51, 0xf1, 0xcb, 0x7a, 0x20, 0xce, 0xb2, 0x34, 0x3c, 0xca, 0xe0, 0xe4, 0xba, 0x22, 0xd4, 0x7b,
+ /* (2^191)P */ 0xca, 0xfd, 0xca, 0xd7, 0xde, 0x61, 0xae, 0xf0, 0x79, 0x0c, 0x20, 0xab, 0xbc, 0x6f, 0x4d, 0x61, 0xf0, 0xc7, 0x9c, 0x8d, 0x4b, 0x52, 0xf3, 0xb9, 0x48, 0x63, 0x0b, 0xb6, 0xd2, 0x25, 0x9a, 0x96, 0x72, 0xc1, 0x6b, 0x0c, 0xb5, 0xfb, 0x71, 0xaa, 0xad, 0x47, 0x5b, 0xe7, 0xc0, 0x0a, 0x55, 0xb2, 0xd4, 0x16, 0x2f, 0xb1, 0x01, 0xfd, 0xce, 0x27,
+ /* (2^192)P */ 0x64, 0x11, 0x4b, 0xab, 0x57, 0x09, 0xc6, 0x49, 0x4a, 0x37, 0xc3, 0x36, 0xc4, 0x7b, 0x81, 0x1f, 0x42, 0xed, 0xbb, 0xe0, 0xa0, 0x8d, 0x51, 0xe6, 0xca, 0x8b, 0xb9, 0xcd, 0x99, 0x2d, 0x91, 0x53, 0xa9, 0x47, 0xcb, 0x32, 0xc7, 0xa4, 0x92, 0xec, 0x46, 0x74, 0x44, 0x6d, 0x71, 0x9f, 0x6d, 0x0c, 0x69, 0xa4, 0xf8, 0xbe, 0x9f, 0x7f, 0xa0, 0xd7,
+ /* (2^193)P */ 0x5f, 0x33, 0xb6, 0x91, 0xc8, 0xa5, 0x3f, 0x5d, 0x7f, 0x38, 0x6e, 0x74, 0x20, 0x4a, 0xd6, 0x2b, 0x98, 0x2a, 0x41, 0x4b, 0x83, 0x64, 0x0b, 0x92, 0x7a, 0x06, 0x1e, 0xc6, 0x2c, 0xf6, 0xe4, 0x91, 0xe5, 0xb1, 0x2e, 0x6e, 0x4e, 0xa8, 0xc8, 0x14, 0x32, 0x57, 0x44, 0x1c, 0xe4, 0xb9, 0x7f, 0x54, 0x51, 0x08, 0x81, 0xaa, 0x4e, 0xce, 0xa1, 0x5d,
+ /* (2^194)P */ 0x5c, 0xd5, 0x9b, 0x5e, 0x7c, 0xb5, 0xb1, 0x52, 0x73, 0x00, 0x41, 0x56, 0x79, 0x08, 0x7e, 0x07, 0x28, 0x06, 0xa6, 0xfb, 0x7f, 0x69, 0xbd, 0x7a, 0x3c, 0xae, 0x9f, 0x39, 0xbb, 0x54, 0xa2, 0x79, 0xb9, 0x0e, 0x7f, 0xbb, 0xe0, 0xe6, 0xb7, 0x27, 0x64, 0x38, 0x45, 0xdb, 0x84, 0xe4, 0x61, 0x72, 0x3f, 0xe2, 0x24, 0xfe, 0x7a, 0x31, 0x9a, 0xc9,
+ /* (2^195)P */ 0xa1, 0xd2, 0xa4, 0xee, 0x24, 0x96, 0xe5, 0x5b, 0x79, 0x78, 0x3c, 0x7b, 0x82, 0x3b, 0x8b, 0x58, 0x0b, 0xa3, 0x63, 0x2d, 0xbc, 0x75, 0x46, 0xe8, 0x83, 0x1a, 0xc0, 0x2a, 0x92, 0x61, 0xa8, 0x75, 0x37, 0x3c, 0xbf, 0x0f, 0xef, 0x8f, 0x6c, 0x97, 0x75, 0x10, 0x05, 0x7a, 0xde, 0x23, 0xe8, 0x2a, 0x35, 0xeb, 0x41, 0x64, 0x7d, 0xcf, 0xe0, 0x52,
+ /* (2^196)P */ 0x4a, 0xd0, 0x49, 0x93, 0xae, 0xf3, 0x24, 0x8c, 0xe1, 0x09, 0x98, 0x45, 0xd8, 0xb9, 0xfe, 0x8e, 0x8c, 0xa8, 0x2c, 0xc9, 0x9f, 0xce, 0x01, 0xdc, 0x38, 0x11, 0xab, 0x85, 0xb9, 0xe8, 0x00, 0x51, 0xfd, 0x82, 0xe1, 0x9b, 0x4e, 0xfc, 0xb5, 0x2a, 0x0f, 0x8b, 0xda, 0x4e, 0x02, 0xca, 0xcc, 0xe3, 0x91, 0xc4, 0xe0, 0xcf, 0x7b, 0xd6, 0xe6, 0x6a,
+ /* (2^197)P */ 0xfe, 0x11, 0xd7, 0xaa, 0xe3, 0x0c, 0x52, 0x2e, 0x04, 0xe0, 0xe0, 0x61, 0xc8, 0x05, 0xd7, 0x31, 0x4c, 0xc3, 0x9b, 0x2d, 0xce, 0x59, 0xbe, 0x12, 0xb7, 0x30, 0x21, 0xfc, 0x81, 0xb8, 0x5e, 0x57, 0x73, 0xd0, 0xad, 0x8e, 0x9e, 0xe4, 0xeb, 0xcd, 0xcf, 0xd2, 0x0f, 0x01, 0x35, 0x16, 0xed, 0x7a, 0x43, 0x8e, 0x42, 0xdc, 0xea, 0x4c, 0xa8, 0x7c,
+ /* (2^198)P */ 0x37, 0x26, 0xcc, 0x76, 0x0b, 0xe5, 0x76, 0xdd, 0x3e, 0x19, 0x3c, 0xc4, 0x6c, 0x7f, 0xd0, 0x03, 0xc1, 0xb8, 0x59, 0x82, 0xca, 0x36, 0xc1, 0xe4, 0xc8, 0xb2, 0x83, 0x69, 0x9c, 0xc5, 0x9d, 0x12, 0x82, 0x1c, 0xea, 0xb2, 0x84, 0x9f, 0xf3, 0x52, 0x6b, 0xbb, 0xd8, 0x81, 0x56, 0x83, 0x04, 0x66, 0x05, 0x22, 0x49, 0x37, 0x93, 0xb1, 0xfd, 0xd5,
+ /* (2^199)P */ 0xaf, 0x96, 0xbf, 0x03, 0xbe, 0xe6, 0x5d, 0x78, 0x19, 0xba, 0x37, 0x46, 0x0a, 0x2b, 0x52, 0x7c, 0xd8, 0x51, 0x9e, 0x3d, 0x29, 0x42, 0xdb, 0x0e, 0x31, 0x20, 0x94, 0xf8, 0x43, 0x9a, 0x2d, 0x22, 0xd3, 0xe3, 0xa1, 0x79, 0x68, 0xfb, 0x2d, 0x7e, 0xd6, 0x79, 0xda, 0x0b, 0xc6, 0x5b, 0x76, 0x68, 0xf0, 0xfe, 0x72, 0x59, 0xbb, 0xa1, 0x9c, 0x74,
+ /* (2^200)P */ 0x0a, 0xd9, 0xec, 0xc5, 0xbd, 0xf0, 0xda, 0xcf, 0x82, 0xab, 0x46, 0xc5, 0x32, 0x13, 0xdc, 0x5b, 0xac, 0xc3, 0x53, 0x9a, 0x7f, 0xef, 0xa5, 0x40, 0x5a, 0x1f, 0xc1, 0x12, 0x91, 0x54, 0x83, 0x6a, 0xb0, 0x9a, 0x85, 0x4d, 0xbf, 0x36, 0x8e, 0xd3, 0xa2, 0x2b, 0xe5, 0xd6, 0xc6, 0xe1, 0x58, 0x5b, 0x82, 0x9b, 0xc8, 0xf2, 0x03, 0xba, 0xf5, 0x92,
+ /* (2^201)P */ 0xfb, 0x21, 0x7e, 0xde, 0xe7, 0xb4, 0xc0, 0x56, 0x86, 0x3a, 0x5b, 0x78, 0xf8, 0xf0, 0xf4, 0xe7, 0x5c, 0x00, 0xd2, 0xd7, 0xd6, 0xf8, 0x75, 0x5e, 0x0f, 0x3e, 0xd1, 0x4b, 0x77, 0xd8, 0xad, 0xb0, 0xc9, 0x8b, 0x59, 0x7d, 0x30, 0x76, 0x64, 0x7a, 0x76, 0xd9, 0x51, 0x69, 0xfc, 0xbd, 0x8e, 0xb5, 0x55, 0xe0, 0xd2, 0x07, 0x15, 0xa9, 0xf7, 0xa4,
+ /* (2^202)P */ 0xaa, 0x2d, 0x2f, 0x2b, 0x3c, 0x15, 0xdd, 0xcd, 0xe9, 0x28, 0x82, 0x4f, 0xa2, 0xaa, 0x31, 0x48, 0xcc, 0xfa, 0x07, 0x73, 0x8a, 0x34, 0x74, 0x0d, 0xab, 0x1a, 0xca, 0xd2, 0xbf, 0x3a, 0xdb, 0x1a, 0x5f, 0x50, 0x62, 0xf4, 0x6b, 0x83, 0x38, 0x43, 0x96, 0xee, 0x6b, 0x39, 0x1e, 0xf0, 0x17, 0x80, 0x1e, 0x9b, 0xed, 0x2b, 0x2f, 0xcc, 0x65, 0xf7,
+ /* (2^203)P */ 0x03, 0xb3, 0x23, 0x9c, 0x0d, 0xd1, 0xeb, 0x7e, 0x34, 0x17, 0x8a, 0x4c, 0xde, 0x54, 0x39, 0xc4, 0x11, 0x82, 0xd3, 0xa4, 0x00, 0x32, 0x95, 0x9c, 0xa6, 0x64, 0x76, 0x6e, 0xd6, 0x53, 0x27, 0xb4, 0x6a, 0x14, 0x8c, 0x54, 0xf6, 0x58, 0x9e, 0x22, 0x4a, 0x55, 0x18, 0x77, 0xd0, 0x08, 0x6b, 0x19, 0x8a, 0xb5, 0xe7, 0x19, 0xb8, 0x60, 0x92, 0xb1,
+ /* (2^204)P */ 0x66, 0xec, 0xf3, 0x12, 0xde, 0x67, 0x7f, 0xd4, 0x5b, 0xf6, 0x70, 0x64, 0x0a, 0xb5, 0xc2, 0xf9, 0xb3, 0x64, 0xab, 0x56, 0x46, 0xc7, 0x93, 0xc2, 0x8b, 0x2d, 0xd0, 0xd6, 0x39, 0x3b, 0x1f, 0xcd, 0xb3, 0xac, 0xcc, 0x2c, 0x27, 0x6a, 0xbc, 0xb3, 0x4b, 0xa8, 0x3c, 0x69, 0x20, 0xe2, 0x18, 0x35, 0x17, 0xe1, 0x8a, 0xd3, 0x11, 0x74, 0xaa, 0x4d,
+ /* (2^205)P */ 0x96, 0xc4, 0x16, 0x7e, 0xfd, 0xf5, 0xd0, 0x7d, 0x1f, 0x32, 0x1b, 0xdb, 0xa6, 0xfd, 0x51, 0x75, 0x4d, 0xd7, 0x00, 0xe5, 0x7f, 0x58, 0x5b, 0xeb, 0x4b, 0x6a, 0x78, 0xfe, 0xe5, 0xd6, 0x8f, 0x99, 0x17, 0xca, 0x96, 0x45, 0xf7, 0x52, 0xdf, 0x84, 0x06, 0x77, 0xb9, 0x05, 0x63, 0x5d, 0xe9, 0x91, 0xb1, 0x4b, 0x82, 0x5a, 0xdb, 0xd7, 0xca, 0x69,
+ /* (2^206)P */ 0x02, 0xd3, 0x38, 0x38, 0x87, 0xea, 0xbd, 0x9f, 0x11, 0xca, 0xf3, 0x21, 0xf1, 0x9b, 0x35, 0x97, 0x98, 0xff, 0x8e, 0x6d, 0x3d, 0xd6, 0xb2, 0xfa, 0x68, 0xcb, 0x7e, 0x62, 0x85, 0xbb, 0xc7, 0x5d, 0xee, 0x32, 0x30, 0x2e, 0x71, 0x96, 0x63, 0x43, 0x98, 0xc4, 0xa7, 0xde, 0x60, 0xb2, 0xd9, 0x43, 0x4a, 0xfa, 0x97, 0x2d, 0x5f, 0x21, 0xd4, 0xfe,
+ /* (2^207)P */ 0x3b, 0x20, 0x29, 0x07, 0x07, 0xb5, 0x78, 0xc3, 0xc7, 0xab, 0x56, 0xba, 0x40, 0xde, 0x1d, 0xcf, 0xc3, 0x00, 0x56, 0x21, 0x0c, 0xc8, 0x42, 0xd9, 0x0e, 0xcd, 0x02, 0x7c, 0x07, 0xb9, 0x11, 0xd7, 0x96, 0xaf, 0xff, 0xad, 0xc5, 0xba, 0x30, 0x6d, 0x82, 0x3a, 0xbf, 0xef, 0x7b, 0xf7, 0x0a, 0x74, 0xbd, 0x31, 0x0c, 0xe4, 0xec, 0x1a, 0xe5, 0xc5,
+ /* (2^208)P */ 0xcc, 0xf2, 0x28, 0x16, 0x12, 0xbf, 0xef, 0x85, 0xbc, 0xf7, 0xcb, 0x9f, 0xdb, 0xa8, 0xb2, 0x49, 0x53, 0x48, 0xa8, 0x24, 0xa8, 0x68, 0x8d, 0xbb, 0x21, 0x0a, 0x5a, 0xbd, 0xb2, 0x91, 0x61, 0x47, 0xc4, 0x43, 0x08, 0xa6, 0x19, 0xef, 0x8e, 0x88, 0x39, 0xc6, 0x33, 0x30, 0xf3, 0x0e, 0xc5, 0x92, 0x66, 0xd6, 0xfe, 0xc5, 0x12, 0xd9, 0x4c, 0x2d,
+ /* (2^209)P */ 0x30, 0x34, 0x07, 0xbf, 0x9c, 0x5a, 0x4e, 0x65, 0xf1, 0x39, 0x35, 0x38, 0xae, 0x7b, 0x55, 0xac, 0x6a, 0x92, 0x24, 0x7e, 0x50, 0xd3, 0xba, 0x78, 0x51, 0xfe, 0x4d, 0x32, 0x05, 0x11, 0xf5, 0x52, 0xf1, 0x31, 0x45, 0x39, 0x98, 0x7b, 0x28, 0x56, 0xc3, 0x5d, 0x4f, 0x07, 0x6f, 0x84, 0xb8, 0x1a, 0x58, 0x0b, 0xc4, 0x7c, 0xc4, 0x8d, 0x32, 0x8e,
+ /* (2^210)P */ 0x7e, 0xaf, 0x98, 0xce, 0xc5, 0x2b, 0x9d, 0xf6, 0xfa, 0x2c, 0xb6, 0x2a, 0x5a, 0x1d, 0xc0, 0x24, 0x8d, 0xa4, 0xce, 0xb1, 0x12, 0x01, 0xf9, 0x79, 0xc6, 0x79, 0x38, 0x0c, 0xd4, 0x07, 0xc9, 0xf7, 0x37, 0xa1, 0x0b, 0xfe, 0x72, 0xec, 0x5d, 0xd6, 0xb0, 0x1c, 0x70, 0xbe, 0x70, 0x01, 0x13, 0xe0, 0x86, 0x95, 0xc7, 0x2e, 0x12, 0x3b, 0xe6, 0xa6,
+ /* (2^211)P */ 0x24, 0x82, 0x67, 0xe0, 0x14, 0x7b, 0x56, 0x08, 0x38, 0x44, 0xdb, 0xa0, 0x3a, 0x05, 0x47, 0xb2, 0xc0, 0xac, 0xd1, 0xcc, 0x3f, 0x82, 0xb8, 0x8a, 0x88, 0xbc, 0xf5, 0x33, 0xa1, 0x35, 0x0f, 0xf6, 0xe2, 0xef, 0x6c, 0xf7, 0x37, 0x9e, 0xe8, 0x10, 0xca, 0xb0, 0x8e, 0x80, 0x86, 0x00, 0x23, 0xd0, 0x4a, 0x76, 0x9f, 0xf7, 0x2c, 0x52, 0x15, 0x0e,
+ /* (2^212)P */ 0x5e, 0x49, 0xe1, 0x2c, 0x9a, 0x01, 0x76, 0xa6, 0xb3, 0x07, 0x5b, 0xa4, 0x07, 0xef, 0x1d, 0xc3, 0x6a, 0xbb, 0x64, 0xbe, 0x71, 0x15, 0x6e, 0x32, 0x31, 0x46, 0x9a, 0x9e, 0x8f, 0x45, 0x73, 0xce, 0x0b, 0x94, 0x1a, 0x52, 0x07, 0xf4, 0x50, 0x30, 0x49, 0x53, 0x50, 0xfb, 0x71, 0x1f, 0x5a, 0x03, 0xa9, 0x76, 0xf2, 0x8f, 0x42, 0xff, 0xed, 0xed,
+ /* (2^213)P */ 0xed, 0x08, 0xdb, 0x91, 0x1c, 0xee, 0xa2, 0xb4, 0x47, 0xa2, 0xfa, 0xcb, 0x03, 0xd1, 0xff, 0x8c, 0xad, 0x64, 0x50, 0x61, 0xcd, 0xfc, 0x88, 0xa0, 0x31, 0x95, 0x30, 0xb9, 0x58, 0xdd, 0xd7, 0x43, 0xe4, 0x46, 0xc2, 0x16, 0xd9, 0x72, 0x4a, 0x56, 0x51, 0x70, 0x85, 0xf1, 0xa1, 0x80, 0x40, 0xd5, 0xba, 0x67, 0x81, 0xda, 0xcd, 0x03, 0xea, 0x51,
+ /* (2^214)P */ 0x42, 0x50, 0xf0, 0xef, 0x37, 0x61, 0x72, 0x85, 0xe1, 0xf1, 0xff, 0x6f, 0x3d, 0xe8, 0x7b, 0x21, 0x5c, 0xe5, 0x50, 0x03, 0xde, 0x00, 0xc1, 0xf7, 0x3a, 0x55, 0x12, 0x1c, 0x9e, 0x1e, 0xce, 0xd1, 0x2f, 0xaf, 0x05, 0x70, 0x5b, 0x47, 0xf2, 0x04, 0x7a, 0x89, 0xbc, 0x78, 0xa6, 0x65, 0x6c, 0xaa, 0x3c, 0xa2, 0x3c, 0x8b, 0x5c, 0xa9, 0x22, 0x48,
+ /* (2^215)P */ 0x7e, 0x8c, 0x8f, 0x2f, 0x60, 0xe3, 0x5a, 0x94, 0xd4, 0xce, 0xdd, 0x9d, 0x83, 0x3b, 0x77, 0x78, 0x43, 0x1d, 0xfd, 0x8f, 0xc8, 0xe8, 0x02, 0x90, 0xab, 0xf6, 0xc9, 0xfc, 0xf1, 0x63, 0xaa, 0x5f, 0x42, 0xf1, 0x78, 0x34, 0x64, 0x16, 0x75, 0x9c, 0x7d, 0xd0, 0xe4, 0x74, 0x5a, 0xa8, 0xfb, 0xcb, 0xac, 0x20, 0xa3, 0xc2, 0xa6, 0x20, 0xf8, 0x1b,
+ /* (2^216)P */ 0x00, 0x4f, 0x1e, 0x56, 0xb5, 0x34, 0xb2, 0x87, 0x31, 0xe5, 0xee, 0x8d, 0xf1, 0x41, 0x67, 0xb7, 0x67, 0x3a, 0x54, 0x86, 0x5c, 0xf0, 0x0b, 0x37, 0x2f, 0x1b, 0x92, 0x5d, 0x58, 0x93, 0xdc, 0xd8, 0x58, 0xcc, 0x9e, 0x67, 0xd0, 0x97, 0x3a, 0xaf, 0x49, 0x39, 0x2d, 0x3b, 0xd8, 0x98, 0xfb, 0x76, 0x6b, 0xe7, 0xaf, 0xc3, 0x45, 0x44, 0x53, 0x94,
+ /* (2^217)P */ 0x30, 0xbd, 0x90, 0x75, 0xd3, 0xbd, 0x3b, 0x58, 0x27, 0x14, 0x9f, 0x6b, 0xd4, 0x31, 0x99, 0xcd, 0xde, 0x3a, 0x21, 0x1e, 0xb4, 0x02, 0xe4, 0x33, 0x04, 0x02, 0xb0, 0x50, 0x66, 0x68, 0x90, 0xdd, 0x7b, 0x69, 0x31, 0xd9, 0xcf, 0x68, 0x73, 0xf1, 0x60, 0xdd, 0xc8, 0x1d, 0x5d, 0xe3, 0xd6, 0x5b, 0x2a, 0xa4, 0xea, 0xc4, 0x3f, 0x08, 0xcd, 0x9c,
+ /* (2^218)P */ 0x6b, 0x1a, 0xbf, 0x55, 0xc1, 0x1b, 0x0c, 0x05, 0x09, 0xdf, 0xf5, 0x5e, 0xa3, 0x77, 0x95, 0xe9, 0xdf, 0x19, 0xdd, 0xc7, 0x94, 0xcb, 0x06, 0x73, 0xd0, 0x88, 0x02, 0x33, 0x94, 0xca, 0x7a, 0x2f, 0x8e, 0x3d, 0x72, 0x61, 0x2d, 0x4d, 0xa6, 0x61, 0x1f, 0x32, 0x5e, 0x87, 0x53, 0x36, 0x11, 0x15, 0x20, 0xb3, 0x5a, 0x57, 0x51, 0x93, 0x20, 0xd8,
+ /* (2^219)P */ 0xb7, 0x56, 0xf4, 0xab, 0x7d, 0x0c, 0xfb, 0x99, 0x1a, 0x30, 0x29, 0xb0, 0x75, 0x2a, 0xf8, 0x53, 0x71, 0x23, 0xbd, 0xa7, 0xd8, 0x0a, 0xe2, 0x27, 0x65, 0xe9, 0x74, 0x26, 0x98, 0x4a, 0x69, 0x19, 0xb2, 0x4d, 0x0a, 0x17, 0x98, 0xb2, 0xa9, 0x57, 0x4e, 0xf6, 0x86, 0xc8, 0x01, 0xa4, 0xc6, 0x98, 0xad, 0x5a, 0x90, 0x2c, 0x05, 0x46, 0x64, 0xb7,
+ /* (2^220)P */ 0x7b, 0x91, 0xdf, 0xfc, 0xf8, 0x1c, 0x8c, 0x15, 0x9e, 0xf7, 0xd5, 0xa8, 0xe8, 0xe7, 0xe3, 0xa3, 0xb0, 0x04, 0x74, 0xfa, 0x78, 0xfb, 0x26, 0xbf, 0x67, 0x42, 0xf9, 0x8c, 0x9b, 0xb4, 0x69, 0x5b, 0x02, 0x13, 0x6d, 0x09, 0x6c, 0xd6, 0x99, 0x61, 0x7b, 0x89, 0x4a, 0x67, 0x75, 0xa3, 0x98, 0x13, 0x23, 0x1d, 0x18, 0x24, 0x0e, 0xef, 0x41, 0x79,
+ /* (2^221)P */ 0x86, 0x33, 0xab, 0x08, 0xcb, 0xbf, 0x1e, 0x76, 0x3c, 0x0b, 0xbd, 0x30, 0xdb, 0xe9, 0xa3, 0x35, 0x87, 0x1b, 0xe9, 0x07, 0x00, 0x66, 0x7f, 0x3b, 0x35, 0x0c, 0x8a, 0x3f, 0x61, 0xbc, 0xe0, 0xae, 0xf6, 0xcc, 0x54, 0xe1, 0x72, 0x36, 0x2d, 0xee, 0x93, 0x24, 0xf8, 0xd7, 0xc5, 0xf9, 0xcb, 0xb0, 0xe5, 0x88, 0x0d, 0x23, 0x4b, 0x76, 0x15, 0xa2,
+ /* (2^222)P */ 0x37, 0xdb, 0x83, 0xd5, 0x6d, 0x06, 0x24, 0x37, 0x1b, 0x15, 0x85, 0x15, 0xe2, 0xc0, 0x4e, 0x02, 0xa9, 0x6d, 0x0a, 0x3a, 0x94, 0x4a, 0x6f, 0x49, 0x00, 0x01, 0x72, 0xbb, 0x60, 0x14, 0x35, 0xae, 0xb4, 0xc6, 0x01, 0x0a, 0x00, 0x9e, 0xc3, 0x58, 0xc5, 0xd1, 0x5e, 0x30, 0x73, 0x96, 0x24, 0x85, 0x9d, 0xf0, 0xf9, 0xec, 0x09, 0xd3, 0xe7, 0x70,
+ /* (2^223)P */ 0xf3, 0xbd, 0x96, 0x87, 0xe9, 0x71, 0xbd, 0xd6, 0xa2, 0x45, 0xeb, 0x0a, 0xcd, 0x2c, 0xf1, 0x72, 0xa6, 0x31, 0xa9, 0x6f, 0x09, 0xa1, 0x5e, 0xdd, 0xc8, 0x8d, 0x0d, 0xbc, 0x5a, 0x8d, 0xb1, 0x2c, 0x9a, 0xcc, 0x37, 0x74, 0xc2, 0xa9, 0x4e, 0xd6, 0xc0, 0x3c, 0xa0, 0x23, 0xb0, 0xa0, 0x77, 0x14, 0x80, 0x45, 0x71, 0x6a, 0x2d, 0x41, 0xc3, 0x82,
+ /* (2^224)P */ 0x37, 0x44, 0xec, 0x8a, 0x3e, 0xc1, 0x0c, 0xa9, 0x12, 0x9c, 0x08, 0x88, 0xcb, 0xd9, 0xf8, 0xba, 0x00, 0xd6, 0xc3, 0xdf, 0xef, 0x7a, 0x44, 0x7e, 0x25, 0x69, 0xc9, 0xc1, 0x46, 0xe5, 0x20, 0x9e, 0xcc, 0x0b, 0x05, 0x3e, 0xf4, 0x78, 0x43, 0x0c, 0xa6, 0x2f, 0xc1, 0xfa, 0x70, 0xb2, 0x3c, 0x31, 0x7a, 0x63, 0x58, 0xab, 0x17, 0xcf, 0x4c, 0x4f,
+ /* (2^225)P */ 0x2b, 0x08, 0x31, 0x59, 0x75, 0x8b, 0xec, 0x0a, 0xa9, 0x79, 0x70, 0xdd, 0xf1, 0x11, 0xc3, 0x11, 0x1f, 0xab, 0x37, 0xaa, 0x26, 0xea, 0x53, 0xc4, 0x79, 0xa7, 0x91, 0x00, 0xaa, 0x08, 0x42, 0xeb, 0x8b, 0x8b, 0xe8, 0xc3, 0x2f, 0xb8, 0x78, 0x90, 0x38, 0x0e, 0x8a, 0x42, 0x0c, 0x0f, 0xbf, 0x3e, 0xf8, 0xd8, 0x07, 0xcf, 0x6a, 0x34, 0xc9, 0xfa,
+ /* (2^226)P */ 0x11, 0xe0, 0x76, 0x4d, 0x23, 0xc5, 0xa6, 0xcc, 0x9f, 0x9a, 0x2a, 0xde, 0x3a, 0xb5, 0x92, 0x39, 0x19, 0x8a, 0xf1, 0x8d, 0xf9, 0x4d, 0xc9, 0xb4, 0x39, 0x9f, 0x57, 0xd8, 0x72, 0xab, 0x1d, 0x61, 0x6a, 0xb2, 0xff, 0x52, 0xba, 0x54, 0x0e, 0xfb, 0x83, 0x30, 0x8a, 0xf7, 0x3b, 0xf4, 0xd8, 0xae, 0x1a, 0x94, 0x3a, 0xec, 0x63, 0xfe, 0x6e, 0x7c,
+ /* (2^227)P */ 0xdc, 0x70, 0x8e, 0x55, 0x44, 0xbf, 0xd2, 0x6a, 0xa0, 0x14, 0x61, 0x89, 0xd5, 0x55, 0x45, 0x3c, 0xf6, 0x40, 0x0d, 0x83, 0x85, 0x44, 0xb4, 0x62, 0x56, 0xfe, 0x60, 0xd7, 0x07, 0x1d, 0x47, 0x30, 0x3b, 0x73, 0xa4, 0xb5, 0xb7, 0xea, 0xac, 0xda, 0xf1, 0x17, 0xaa, 0x60, 0xdf, 0xe9, 0x84, 0xda, 0x31, 0x32, 0x61, 0xbf, 0xd0, 0x7e, 0x8a, 0x02,
+ /* (2^228)P */ 0xb9, 0x51, 0xb3, 0x89, 0x21, 0x5d, 0xa2, 0xfe, 0x79, 0x2a, 0xb3, 0x2a, 0x3b, 0xe6, 0x6f, 0x2b, 0x22, 0x03, 0xea, 0x7b, 0x1f, 0xaf, 0x85, 0xc3, 0x38, 0x55, 0x5b, 0x8e, 0xb4, 0xaa, 0x77, 0xfe, 0x03, 0x6e, 0xda, 0x91, 0x24, 0x0c, 0x48, 0x39, 0x27, 0x43, 0x16, 0xd2, 0x0a, 0x0d, 0x43, 0xa3, 0x0e, 0xca, 0x45, 0xd1, 0x7f, 0xf5, 0xd3, 0x16,
+ /* (2^229)P */ 0x3d, 0x32, 0x9b, 0x38, 0xf8, 0x06, 0x93, 0x78, 0x5b, 0x50, 0x2b, 0x06, 0xd8, 0x66, 0xfe, 0xab, 0x9b, 0x58, 0xc7, 0xd1, 0x4d, 0xd5, 0xf8, 0x3b, 0x10, 0x7e, 0x85, 0xde, 0x58, 0x4e, 0xdf, 0x53, 0xd9, 0x58, 0xe0, 0x15, 0x81, 0x9f, 0x1a, 0x78, 0xfc, 0x9f, 0x10, 0xc2, 0x23, 0xd6, 0x78, 0xd1, 0x9d, 0xd2, 0xd5, 0x1c, 0x53, 0xe2, 0xc9, 0x76,
+ /* (2^230)P */ 0x98, 0x1e, 0x38, 0x7b, 0x71, 0x18, 0x4b, 0x15, 0xaf, 0xa1, 0xa6, 0x98, 0xcb, 0x26, 0xa3, 0xc8, 0x07, 0x46, 0xda, 0x3b, 0x70, 0x65, 0xec, 0x7a, 0x2b, 0x34, 0x94, 0xa8, 0xb6, 0x14, 0xf8, 0x1a, 0xce, 0xf7, 0xc8, 0x60, 0xf3, 0x88, 0xf4, 0x33, 0x60, 0x7b, 0xd1, 0x02, 0xe7, 0xda, 0x00, 0x4a, 0xea, 0xd2, 0xfd, 0x88, 0xd2, 0x99, 0x28, 0xf3,
+ /* (2^231)P */ 0x28, 0x24, 0x1d, 0x26, 0xc2, 0xeb, 0x8b, 0x3b, 0xb4, 0x6b, 0xbe, 0x6b, 0x77, 0xff, 0xf3, 0x21, 0x3b, 0x26, 0x6a, 0x8c, 0x8e, 0x2a, 0x44, 0xa8, 0x01, 0x2b, 0x71, 0xea, 0x64, 0x30, 0xfd, 0xfd, 0x95, 0xcb, 0x39, 0x38, 0x48, 0xfa, 0x96, 0x97, 0x8c, 0x2f, 0x33, 0xca, 0x03, 0xe6, 0xd7, 0x94, 0x55, 0x6c, 0xc3, 0xb3, 0xa8, 0xf7, 0xae, 0x8c,
+ /* (2^232)P */ 0xea, 0x62, 0x8a, 0xb4, 0xeb, 0x74, 0xf7, 0xb8, 0xae, 0xc5, 0x20, 0x71, 0x06, 0xd6, 0x7c, 0x62, 0x9b, 0x69, 0x74, 0xef, 0xa7, 0x6d, 0xd6, 0x8c, 0x37, 0xb9, 0xbf, 0xcf, 0xeb, 0xe4, 0x2f, 0x04, 0x02, 0x21, 0x7d, 0x75, 0x6b, 0x92, 0x48, 0xf8, 0x70, 0xad, 0x69, 0xe2, 0xea, 0x0e, 0x88, 0x67, 0x72, 0xcc, 0x2d, 0x10, 0xce, 0x2d, 0xcf, 0x65,
+ /* (2^233)P */ 0x49, 0xf3, 0x57, 0x64, 0xe5, 0x5c, 0xc5, 0x65, 0x49, 0x97, 0xc4, 0x8a, 0xcc, 0xa9, 0xca, 0x94, 0x7b, 0x86, 0x88, 0xb6, 0x51, 0x27, 0x69, 0xa5, 0x0f, 0x8b, 0x06, 0x59, 0xa0, 0x94, 0xef, 0x63, 0x1a, 0x01, 0x9e, 0x4f, 0xd2, 0x5a, 0x93, 0xc0, 0x7c, 0xe6, 0x61, 0x77, 0xb6, 0xf5, 0x40, 0xd9, 0x98, 0x43, 0x5b, 0x56, 0x68, 0xe9, 0x37, 0x8f,
+ /* (2^234)P */ 0xee, 0x87, 0xd2, 0x05, 0x1b, 0x39, 0x89, 0x10, 0x07, 0x6d, 0xe8, 0xfd, 0x8b, 0x4d, 0xb2, 0xa7, 0x7b, 0x1e, 0xa0, 0x6c, 0x0d, 0x3d, 0x3d, 0x49, 0xba, 0x61, 0x36, 0x1f, 0xc2, 0x84, 0x4a, 0xcc, 0x87, 0xa9, 0x1b, 0x23, 0x04, 0xe2, 0x3e, 0x97, 0xe1, 0xdb, 0xd5, 0x5a, 0xe8, 0x41, 0x6b, 0xe5, 0x5a, 0xa1, 0x99, 0xe5, 0x7b, 0xa7, 0xe0, 0x3b,
+ /* (2^235)P */ 0xea, 0xa3, 0x6a, 0xdd, 0x77, 0x7f, 0x77, 0x41, 0xc5, 0x6a, 0xe4, 0xaf, 0x11, 0x5f, 0x88, 0xa5, 0x10, 0xee, 0xd0, 0x8c, 0x0c, 0xb4, 0xa5, 0x2a, 0xd0, 0xd8, 0x1d, 0x47, 0x06, 0xc0, 0xd5, 0xce, 0x51, 0x54, 0x9b, 0x2b, 0xe6, 0x2f, 0xe7, 0xe7, 0x31, 0x5f, 0x5c, 0x23, 0x81, 0x3e, 0x03, 0x93, 0xaa, 0x2d, 0x71, 0x84, 0xa0, 0x89, 0x32, 0xa6,
+ /* (2^236)P */ 0x55, 0xa3, 0x13, 0x92, 0x4e, 0x93, 0x7d, 0xec, 0xca, 0x57, 0xfb, 0x37, 0xae, 0xd2, 0x18, 0x2e, 0x54, 0x05, 0x6c, 0xd1, 0x28, 0xca, 0x90, 0x40, 0x82, 0x2e, 0x79, 0xc6, 0x5a, 0xc7, 0xdd, 0x84, 0x93, 0xdf, 0x15, 0xb8, 0x1f, 0xb1, 0xf9, 0xaf, 0x2c, 0xe5, 0x32, 0xcd, 0xc2, 0x99, 0x6d, 0xac, 0x85, 0x5c, 0x63, 0xd3, 0xe2, 0xff, 0x24, 0xda,
+ /* (2^237)P */ 0x2d, 0x8d, 0xfd, 0x65, 0xcc, 0xe5, 0x02, 0xa0, 0xe5, 0xb9, 0xec, 0x59, 0x09, 0x50, 0x27, 0xb7, 0x3d, 0x2a, 0x79, 0xb2, 0x76, 0x5d, 0x64, 0x95, 0xf8, 0xc5, 0xaf, 0x8a, 0x62, 0x11, 0x5c, 0x56, 0x1c, 0x05, 0x64, 0x9e, 0x5e, 0xbd, 0x54, 0x04, 0xe6, 0x9e, 0xab, 0xe6, 0x22, 0x7e, 0x42, 0x54, 0xb5, 0xa5, 0xd0, 0x8d, 0x28, 0x6b, 0x0f, 0x0b,
+ /* (2^238)P */ 0x2d, 0xb2, 0x8c, 0x59, 0x10, 0x37, 0x84, 0x3b, 0x9b, 0x65, 0x1b, 0x0f, 0x10, 0xf9, 0xea, 0x60, 0x1b, 0x02, 0xf5, 0xee, 0x8b, 0xe6, 0x32, 0x7d, 0x10, 0x7f, 0x5f, 0x8c, 0x72, 0x09, 0x4e, 0x1f, 0x29, 0xff, 0x65, 0xcb, 0x3e, 0x3a, 0xd2, 0x96, 0x50, 0x1e, 0xea, 0x64, 0x99, 0xb5, 0x4c, 0x7a, 0x69, 0xb8, 0x95, 0xae, 0x48, 0xc0, 0x7c, 0xb1,
+ /* (2^239)P */ 0xcd, 0x7c, 0x4f, 0x3e, 0xea, 0xf3, 0x90, 0xcb, 0x12, 0x76, 0xd1, 0x17, 0xdc, 0x0d, 0x13, 0x0f, 0xfd, 0x4d, 0xb5, 0x1f, 0xe4, 0xdd, 0xf2, 0x4d, 0x58, 0xea, 0xa5, 0x66, 0x92, 0xcf, 0xe5, 0x54, 0xea, 0x9b, 0x35, 0x83, 0x1a, 0x44, 0x8e, 0x62, 0x73, 0x45, 0x98, 0xa3, 0x89, 0x95, 0x52, 0x93, 0x1a, 0x8d, 0x63, 0x0f, 0xc2, 0x57, 0x3c, 0xb1,
+ /* (2^240)P */ 0x72, 0xb4, 0xdf, 0x51, 0xb7, 0xf6, 0x52, 0xa2, 0x14, 0x56, 0xe5, 0x0a, 0x2e, 0x75, 0x81, 0x02, 0xee, 0x93, 0x48, 0x0a, 0x92, 0x4e, 0x0c, 0x0f, 0xdf, 0x09, 0x89, 0x99, 0xf6, 0xf9, 0x22, 0xa2, 0x32, 0xf8, 0xb0, 0x76, 0x0c, 0xb2, 0x4d, 0x6e, 0xbe, 0x83, 0x35, 0x61, 0x44, 0xd2, 0x58, 0xc7, 0xdd, 0x14, 0xcf, 0xc3, 0x4b, 0x7c, 0x07, 0xee,
+ /* (2^241)P */ 0x8b, 0x03, 0xee, 0xcb, 0xa7, 0x2e, 0x28, 0xbd, 0x97, 0xd1, 0x4c, 0x2b, 0xd1, 0x92, 0x67, 0x5b, 0x5a, 0x12, 0xbf, 0x29, 0x17, 0xfc, 0x50, 0x09, 0x74, 0x76, 0xa2, 0xd4, 0x82, 0xfd, 0x2c, 0x0c, 0x90, 0xf7, 0xe7, 0xe5, 0x9a, 0x2c, 0x16, 0x40, 0xb9, 0x6c, 0xd9, 0xe0, 0x22, 0x9e, 0xf8, 0xdd, 0x73, 0xe4, 0x7b, 0x9e, 0xbe, 0x4f, 0x66, 0x22,
+ /* (2^242)P */ 0xa4, 0x10, 0xbe, 0xb8, 0x83, 0x3a, 0x77, 0x8e, 0xea, 0x0a, 0xc4, 0x97, 0x3e, 0xb6, 0x6c, 0x81, 0xd7, 0x65, 0xd9, 0xf7, 0xae, 0xe6, 0xbe, 0xab, 0x59, 0x81, 0x29, 0x4b, 0xff, 0xe1, 0x0f, 0xc3, 0x2b, 0xad, 0x4b, 0xef, 0xc4, 0x50, 0x9f, 0x88, 0x31, 0xf2, 0xde, 0x80, 0xd6, 0xf4, 0x20, 0x9c, 0x77, 0x9b, 0xbe, 0xbe, 0x08, 0xf5, 0xf0, 0x95,
+ /* (2^243)P */ 0x0e, 0x7c, 0x7b, 0x7c, 0xb3, 0xd8, 0x83, 0xfc, 0x8c, 0x75, 0x51, 0x74, 0x1b, 0xe1, 0x6d, 0x11, 0x05, 0x46, 0x24, 0x0d, 0xa4, 0x2b, 0x32, 0xfd, 0x2c, 0x4e, 0x21, 0xdf, 0x39, 0x6b, 0x96, 0xfc, 0xff, 0x92, 0xfc, 0x35, 0x0d, 0x9a, 0x4b, 0xc0, 0x70, 0x46, 0x32, 0x7d, 0xc0, 0xc4, 0x04, 0xe0, 0x2d, 0x83, 0xa7, 0x00, 0xc7, 0xcb, 0xb4, 0x8f,
+ /* (2^244)P */ 0xa9, 0x5a, 0x7f, 0x0e, 0xdd, 0x2c, 0x85, 0xaa, 0x4d, 0xac, 0xde, 0xb3, 0xb6, 0xaf, 0xe6, 0xd1, 0x06, 0x7b, 0x2c, 0xa4, 0x01, 0x19, 0x22, 0x7d, 0x78, 0xf0, 0x3a, 0xea, 0x89, 0xfe, 0x21, 0x61, 0x6d, 0xb8, 0xfe, 0xa5, 0x2a, 0xab, 0x0d, 0x7b, 0x51, 0x39, 0xb6, 0xde, 0xbc, 0xf0, 0xc5, 0x48, 0xd7, 0x09, 0x82, 0x6e, 0x66, 0x75, 0xc5, 0xcd,
+ /* (2^245)P */ 0xee, 0xdf, 0x2b, 0x6c, 0xa8, 0xde, 0x61, 0xe1, 0x27, 0xfa, 0x2a, 0x0f, 0x68, 0xe7, 0x7a, 0x9b, 0x13, 0xe9, 0x56, 0xd2, 0x1c, 0x3d, 0x2f, 0x3c, 0x7a, 0xf6, 0x6f, 0x45, 0xee, 0xe8, 0xf4, 0xa0, 0xa6, 0xe8, 0xa5, 0x27, 0xee, 0xf2, 0x85, 0xa9, 0xd5, 0x0e, 0xa9, 0x26, 0x60, 0xfe, 0xee, 0xc7, 0x59, 0x99, 0x5e, 0xa3, 0xdf, 0x23, 0x36, 0xd5,
+ /* (2^246)P */ 0x15, 0x66, 0x6f, 0xd5, 0x78, 0xa4, 0x0a, 0xf7, 0xb1, 0xe8, 0x75, 0x6b, 0x48, 0x7d, 0xa6, 0x4d, 0x3d, 0x36, 0x9b, 0xc7, 0xcc, 0x68, 0x9a, 0xfe, 0x2f, 0x39, 0x2a, 0x51, 0x31, 0x39, 0x7d, 0x73, 0x6f, 0xc8, 0x74, 0x72, 0x6f, 0x6e, 0xda, 0x5f, 0xad, 0x48, 0xc8, 0x40, 0xe1, 0x06, 0x01, 0x36, 0xa1, 0x88, 0xc8, 0x99, 0x9c, 0xd1, 0x11, 0x8f,
+ /* (2^247)P */ 0xab, 0xc5, 0xcb, 0xcf, 0xbd, 0x73, 0x21, 0xd0, 0x82, 0xb1, 0x2e, 0x2d, 0xd4, 0x36, 0x1b, 0xed, 0xa9, 0x8a, 0x26, 0x79, 0xc4, 0x17, 0xae, 0xe5, 0x09, 0x0a, 0x0c, 0xa4, 0x21, 0xa0, 0x6e, 0xdd, 0x62, 0x8e, 0x44, 0x62, 0xcc, 0x50, 0xff, 0x93, 0xb3, 0x9a, 0x72, 0x8c, 0x3f, 0xa1, 0xa6, 0x4d, 0x87, 0xd5, 0x1c, 0x5a, 0xc0, 0x0b, 0x1a, 0xd6,
+ /* (2^248)P */ 0x67, 0x36, 0x6a, 0x1f, 0x96, 0xe5, 0x80, 0x20, 0xa9, 0xe8, 0x0b, 0x0e, 0x21, 0x29, 0x3f, 0xc8, 0x0a, 0x6d, 0x27, 0x47, 0xca, 0xd9, 0x05, 0x55, 0xbf, 0x11, 0xcf, 0x31, 0x7a, 0x37, 0xc7, 0x90, 0xa9, 0xf4, 0x07, 0x5e, 0xd5, 0xc3, 0x92, 0xaa, 0x95, 0xc8, 0x23, 0x2a, 0x53, 0x45, 0xe3, 0x3a, 0x24, 0xe9, 0x67, 0x97, 0x3a, 0x82, 0xf9, 0xa6,
+ /* (2^249)P */ 0x92, 0x9e, 0x6d, 0x82, 0x67, 0xe9, 0xf9, 0x17, 0x96, 0x2c, 0xa7, 0xd3, 0x89, 0xf9, 0xdb, 0xd8, 0x20, 0xc6, 0x2e, 0xec, 0x4a, 0x76, 0x64, 0xbf, 0x27, 0x40, 0xe2, 0xb4, 0xdf, 0x1f, 0xa0, 0xef, 0x07, 0x80, 0xfb, 0x8e, 0x12, 0xf8, 0xb8, 0xe1, 0xc6, 0xdf, 0x7c, 0x69, 0x35, 0x5a, 0xe1, 0x8e, 0x5d, 0x69, 0x84, 0x56, 0xb6, 0x31, 0x1c, 0x0b,
+ /* (2^250)P */ 0xd6, 0x94, 0x5c, 0xef, 0xbb, 0x46, 0x45, 0x44, 0x5b, 0xa1, 0xae, 0x03, 0x65, 0xdd, 0xb5, 0x66, 0x88, 0x35, 0x29, 0x95, 0x16, 0x54, 0xa6, 0xf5, 0xc9, 0x78, 0x34, 0xe6, 0x0f, 0xc4, 0x2b, 0x5b, 0x79, 0x51, 0x68, 0x48, 0x3a, 0x26, 0x87, 0x05, 0x70, 0xaf, 0x8b, 0xa6, 0xc7, 0x2e, 0xb3, 0xa9, 0x10, 0x01, 0xb0, 0xb9, 0x31, 0xfd, 0xdc, 0x80,
+ /* (2^251)P */ 0x25, 0xf2, 0xad, 0xd6, 0x75, 0xa3, 0x04, 0x05, 0x64, 0x8a, 0x97, 0x60, 0x27, 0x2a, 0xe5, 0x6d, 0xb0, 0x73, 0xf4, 0x07, 0x2a, 0x9d, 0xe9, 0x46, 0xb4, 0x1c, 0x51, 0xf8, 0x63, 0x98, 0x7e, 0xe5, 0x13, 0x51, 0xed, 0x98, 0x65, 0x98, 0x4f, 0x8f, 0xe7, 0x7e, 0x72, 0xd7, 0x64, 0x11, 0x2f, 0xcd, 0x12, 0xf8, 0xc4, 0x63, 0x52, 0x0f, 0x7f, 0xc4,
+ /* (2^252)P */ 0x5c, 0xd9, 0x85, 0x63, 0xc7, 0x8a, 0x65, 0x9a, 0x25, 0x83, 0x31, 0x73, 0x49, 0xf0, 0x93, 0x96, 0x70, 0x67, 0x6d, 0xb1, 0xff, 0x95, 0x54, 0xe4, 0xf8, 0x15, 0x6c, 0x5f, 0xbd, 0xf6, 0x0f, 0x38, 0x7b, 0x68, 0x7d, 0xd9, 0x3d, 0xf0, 0xa9, 0xa0, 0xe4, 0xd1, 0xb6, 0x34, 0x6d, 0x14, 0x16, 0xc2, 0x4c, 0x30, 0x0e, 0x67, 0xd3, 0xbe, 0x2e, 0xc0,
+ /* (2^253)P */ 0x06, 0x6b, 0x52, 0xc8, 0x14, 0xcd, 0xae, 0x03, 0x93, 0xea, 0xc1, 0xf2, 0xf6, 0x8b, 0xc5, 0xb6, 0xdc, 0x82, 0x42, 0x29, 0x94, 0xe0, 0x25, 0x6c, 0x3f, 0x9f, 0x5d, 0xe4, 0x96, 0xf6, 0x8e, 0x3f, 0xf9, 0x72, 0xc4, 0x77, 0x60, 0x8b, 0xa4, 0xf9, 0xa8, 0xc3, 0x0a, 0x81, 0xb1, 0x97, 0x70, 0x18, 0xab, 0xea, 0x37, 0x8a, 0x08, 0xc7, 0xe2, 0x95,
+ /* (2^254)P */ 0x94, 0x49, 0xd9, 0x5f, 0x76, 0x72, 0x82, 0xad, 0x2d, 0x50, 0x1a, 0x7a, 0x5b, 0xe6, 0x95, 0x1e, 0x95, 0x65, 0x87, 0x1c, 0x52, 0xd7, 0x44, 0xe6, 0x9b, 0x56, 0xcd, 0x6f, 0x05, 0xff, 0x67, 0xc5, 0xdb, 0xa2, 0xac, 0xe4, 0xa2, 0x28, 0x63, 0x5f, 0xfb, 0x0c, 0x3b, 0xf1, 0x87, 0xc3, 0x36, 0x78, 0x3f, 0x77, 0xfa, 0x50, 0x85, 0xf9, 0xd7, 0x82,
+ /* (2^255)P */ 0x64, 0xc0, 0xe0, 0xd8, 0x2d, 0xed, 0xcb, 0x6a, 0xfd, 0xcd, 0xbc, 0x7e, 0x9f, 0xc8, 0x85, 0xe9, 0xc1, 0x7c, 0x0f, 0xe5, 0x18, 0xea, 0xd4, 0x51, 0xad, 0x59, 0x13, 0x75, 0xd9, 0x3d, 0xd4, 0x8a, 0xb2, 0xbe, 0x78, 0x52, 0x2b, 0x52, 0x94, 0x37, 0x41, 0xd6, 0xb4, 0xb6, 0x45, 0x20, 0x76, 0xe0, 0x1f, 0x31, 0xdb, 0xb1, 0xa1, 0x43, 0xf0, 0x18,
+ /* (2^256)P */ 0x74, 0xa9, 0xa4, 0xa9, 0xdd, 0x6e, 0x3e, 0x68, 0xe5, 0xc3, 0x2e, 0x92, 0x17, 0xa4, 0xcb, 0x80, 0xb1, 0xf0, 0x06, 0x93, 0xef, 0xe6, 0x00, 0xe6, 0x3b, 0xb1, 0x32, 0x65, 0x7b, 0x83, 0xb6, 0x8a, 0x49, 0x1b, 0x14, 0x89, 0xee, 0xba, 0xf5, 0x6a, 0x8d, 0x36, 0xef, 0xb0, 0xd8, 0xb2, 0x16, 0x99, 0x17, 0x35, 0x02, 0x16, 0x55, 0x58, 0xdd, 0x82,
+ /* (2^257)P */ 0x36, 0x95, 0xe8, 0xf4, 0x36, 0x42, 0xbb, 0xc5, 0x3e, 0xfa, 0x30, 0x84, 0x9e, 0x59, 0xfd, 0xd2, 0x95, 0x42, 0xf8, 0x64, 0xd9, 0xb9, 0x0e, 0x9f, 0xfa, 0xd0, 0x7b, 0x20, 0x31, 0x77, 0x48, 0x29, 0x4d, 0xd0, 0x32, 0x57, 0x56, 0x30, 0xa6, 0x17, 0x53, 0x04, 0xbf, 0x08, 0x28, 0xec, 0xb8, 0x46, 0xc1, 0x03, 0x89, 0xdc, 0xed, 0xa0, 0x35, 0x53,
+ /* (2^258)P */ 0xc5, 0x7f, 0x9e, 0xd8, 0xc5, 0xba, 0x5f, 0x68, 0xc8, 0x23, 0x75, 0xea, 0x0d, 0xd9, 0x5a, 0xfd, 0x61, 0x1a, 0xa3, 0x2e, 0x45, 0x63, 0x14, 0x55, 0x86, 0x21, 0x29, 0xbe, 0xef, 0x5e, 0x50, 0xe5, 0x18, 0x59, 0xe7, 0xe3, 0xce, 0x4d, 0x8c, 0x15, 0x8f, 0x89, 0x66, 0x44, 0x52, 0x3d, 0xfa, 0xc7, 0x9a, 0x59, 0x90, 0x8e, 0xc0, 0x06, 0x3f, 0xc9,
+ /* (2^259)P */ 0x8e, 0x04, 0xd9, 0x16, 0x50, 0x1d, 0x8c, 0x9f, 0xd5, 0xe3, 0xce, 0xfd, 0x47, 0x04, 0x27, 0x4d, 0xc2, 0xfa, 0x71, 0xd9, 0x0b, 0xb8, 0x65, 0xf4, 0x11, 0xf3, 0x08, 0xee, 0x81, 0xc8, 0x67, 0x99, 0x0b, 0x8d, 0x77, 0xa3, 0x4f, 0xb5, 0x9b, 0xdb, 0x26, 0xf1, 0x97, 0xeb, 0x04, 0x54, 0xeb, 0x80, 0x08, 0x1d, 0x1d, 0xf6, 0x3d, 0x1f, 0x5a, 0xb8,
+ /* (2^260)P */ 0xb7, 0x9c, 0x9d, 0xee, 0xb9, 0x5c, 0xad, 0x0d, 0x9e, 0xfd, 0x60, 0x3c, 0x27, 0x4e, 0xa2, 0x95, 0xfb, 0x64, 0x7e, 0x79, 0x64, 0x87, 0x10, 0xb4, 0x73, 0xe0, 0x9d, 0x46, 0x4d, 0x3d, 0xee, 0x83, 0xe4, 0x16, 0x88, 0x97, 0xe6, 0x4d, 0xba, 0x70, 0xb6, 0x96, 0x7b, 0xff, 0x4b, 0xc8, 0xcf, 0x72, 0x83, 0x3e, 0x5b, 0x24, 0x2e, 0x57, 0xf1, 0x82,
+ /* (2^261)P */ 0x30, 0x71, 0x40, 0x51, 0x4f, 0x44, 0xbb, 0xc7, 0xf0, 0x54, 0x6e, 0x9d, 0xeb, 0x15, 0xad, 0xf8, 0x61, 0x43, 0x5a, 0xef, 0xc0, 0xb1, 0x57, 0xae, 0x03, 0x40, 0xe8, 0x68, 0x6f, 0x03, 0x20, 0x4f, 0x8a, 0x51, 0x2a, 0x9e, 0xd2, 0x45, 0xaf, 0xb4, 0xf5, 0xd4, 0x95, 0x7f, 0x3d, 0x3d, 0xb7, 0xb6, 0x28, 0xc5, 0x08, 0x8b, 0x44, 0xd6, 0x3f, 0xe7,
+ /* (2^262)P */ 0xa9, 0x52, 0x04, 0x67, 0xcb, 0x20, 0x63, 0xf8, 0x18, 0x01, 0x44, 0x21, 0x6a, 0x8a, 0x83, 0x48, 0xd4, 0xaf, 0x23, 0x0f, 0x35, 0x8d, 0xe5, 0x5a, 0xc4, 0x7c, 0x55, 0x46, 0x19, 0x5f, 0x35, 0xe0, 0x5d, 0x97, 0x4c, 0x2d, 0x04, 0xed, 0x59, 0xd4, 0xb0, 0xb2, 0xc6, 0xe3, 0x51, 0xe1, 0x38, 0xc6, 0x30, 0x49, 0x8f, 0xae, 0x61, 0x64, 0xce, 0xa8,
+ /* (2^263)P */ 0x9b, 0x64, 0x83, 0x3c, 0xd3, 0xdf, 0xb9, 0x27, 0xe7, 0x5b, 0x7f, 0xeb, 0xf3, 0x26, 0xcf, 0xb1, 0x8f, 0xaf, 0x26, 0xc8, 0x48, 0xce, 0xa1, 0xac, 0x7d, 0x10, 0x34, 0x28, 0xe1, 0x1f, 0x69, 0x03, 0x64, 0x77, 0x61, 0xdd, 0x4a, 0x9b, 0x18, 0x47, 0xf8, 0xca, 0x63, 0xc9, 0x03, 0x2d, 0x20, 0x2a, 0x69, 0x6e, 0x42, 0xd0, 0xe7, 0xaa, 0xb5, 0xf3,
+ /* (2^264)P */ 0xea, 0x31, 0x0c, 0x57, 0x0f, 0x3e, 0xe3, 0x35, 0xd8, 0x30, 0xa5, 0x6f, 0xdd, 0x95, 0x43, 0xc6, 0x66, 0x07, 0x4f, 0x34, 0xc3, 0x7e, 0x04, 0x10, 0x2d, 0xc4, 0x1c, 0x94, 0x52, 0x2e, 0x5b, 0x9a, 0x65, 0x2f, 0x91, 0xaa, 0x4f, 0x3c, 0xdc, 0x23, 0x18, 0xe1, 0x4f, 0x85, 0xcd, 0xf4, 0x8c, 0x51, 0xf7, 0xab, 0x4f, 0xdc, 0x15, 0x5c, 0x9e, 0xc5,
+ /* (2^265)P */ 0x54, 0x57, 0x23, 0x17, 0xe7, 0x82, 0x2f, 0x04, 0x7d, 0xfe, 0xe7, 0x1f, 0xa2, 0x57, 0x79, 0xe9, 0x58, 0x9b, 0xbe, 0xc6, 0x16, 0x4a, 0x17, 0x50, 0x90, 0x4a, 0x34, 0x70, 0x87, 0x37, 0x01, 0x26, 0xd8, 0xa3, 0x5f, 0x07, 0x7c, 0xd0, 0x7d, 0x05, 0x8a, 0x93, 0x51, 0x2f, 0x99, 0xea, 0xcf, 0x00, 0xd8, 0xc7, 0xe6, 0x9b, 0x8c, 0x62, 0x45, 0x87,
+ /* (2^266)P */ 0xc3, 0xfd, 0x29, 0x66, 0xe7, 0x30, 0x29, 0x77, 0xe0, 0x0d, 0x63, 0x5b, 0xe6, 0x90, 0x1a, 0x1e, 0x99, 0xc2, 0xa7, 0xab, 0xff, 0xa7, 0xbd, 0x79, 0x01, 0x97, 0xfd, 0x27, 0x1b, 0x43, 0x2b, 0xe6, 0xfe, 0x5e, 0xf1, 0xb9, 0x35, 0x38, 0x08, 0x25, 0x55, 0x90, 0x68, 0x2e, 0xc3, 0x67, 0x39, 0x9f, 0x2b, 0x2c, 0x70, 0x48, 0x8c, 0x47, 0xee, 0x56,
+ /* (2^267)P */ 0xf7, 0x32, 0x70, 0xb5, 0xe6, 0x42, 0xfd, 0x0a, 0x39, 0x9b, 0x07, 0xfe, 0x0e, 0xf4, 0x47, 0xba, 0x6a, 0x3f, 0xf5, 0x2c, 0x15, 0xf3, 0x60, 0x3f, 0xb1, 0x83, 0x7b, 0x2e, 0x34, 0x58, 0x1a, 0x6e, 0x4a, 0x49, 0x05, 0x45, 0xca, 0xdb, 0x00, 0x01, 0x0c, 0x42, 0x5e, 0x60, 0x40, 0x5f, 0xd9, 0xc7, 0x3a, 0x9e, 0x1c, 0x8d, 0xab, 0x11, 0x55, 0x65,
+ /* (2^268)P */ 0x87, 0x40, 0xb7, 0x0d, 0xaa, 0x34, 0x89, 0x90, 0x75, 0x6d, 0xa2, 0xfe, 0x3b, 0x6d, 0x5c, 0x39, 0x98, 0x10, 0x9e, 0x15, 0xc5, 0x35, 0xa2, 0x27, 0x23, 0x0a, 0x2d, 0x60, 0xe2, 0xa8, 0x7f, 0x3e, 0x77, 0x8f, 0xcc, 0x44, 0xcc, 0x30, 0x28, 0xe2, 0xf0, 0x04, 0x8c, 0xee, 0xe4, 0x5f, 0x68, 0x8c, 0xdf, 0x70, 0xbf, 0x31, 0xee, 0x2a, 0xfc, 0xce,
+ /* (2^269)P */ 0x92, 0xf2, 0xa0, 0xd9, 0x58, 0x3b, 0x7c, 0x1a, 0x99, 0x46, 0x59, 0x54, 0x60, 0x06, 0x8d, 0x5e, 0xf0, 0x22, 0xa1, 0xed, 0x92, 0x8a, 0x4d, 0x76, 0x95, 0x05, 0x0b, 0xff, 0xfc, 0x9a, 0xd1, 0xcc, 0x05, 0xb9, 0x5e, 0x99, 0xe8, 0x2a, 0x76, 0x7b, 0xfd, 0xa6, 0xe2, 0xd1, 0x1a, 0xd6, 0x76, 0x9f, 0x2f, 0x0e, 0xd1, 0xa8, 0x77, 0x5a, 0x40, 0x5a,
+ /* (2^270)P */ 0xff, 0xf9, 0x3f, 0xa9, 0xa6, 0x6c, 0x6d, 0x03, 0x8b, 0xa7, 0x10, 0x5d, 0x3f, 0xec, 0x3e, 0x1c, 0x0b, 0x6b, 0xa2, 0x6a, 0x22, 0xa9, 0x28, 0xd0, 0x66, 0xc9, 0xc2, 0x3d, 0x47, 0x20, 0x7d, 0xa6, 0x1d, 0xd8, 0x25, 0xb5, 0xf2, 0xf9, 0x70, 0x19, 0x6b, 0xf8, 0x43, 0x36, 0xc5, 0x1f, 0xe4, 0x5a, 0x4c, 0x13, 0xe4, 0x6d, 0x08, 0x0b, 0x1d, 0xb1,
+ /* (2^271)P */ 0x3f, 0x20, 0x9b, 0xfb, 0xec, 0x7d, 0x31, 0xc5, 0xfc, 0x88, 0x0b, 0x30, 0xed, 0x36, 0xc0, 0x63, 0xb1, 0x7d, 0x10, 0xda, 0xb6, 0x2e, 0xad, 0xf3, 0xec, 0x94, 0xe7, 0xec, 0xb5, 0x9c, 0xfe, 0xf5, 0x35, 0xf0, 0xa2, 0x2d, 0x7f, 0xca, 0x6b, 0x67, 0x1a, 0xf6, 0xb3, 0xda, 0x09, 0x2a, 0xaa, 0xdf, 0xb1, 0xca, 0x9b, 0xfb, 0xeb, 0xb3, 0xcd, 0xc0,
+ /* (2^272)P */ 0xcd, 0x4d, 0x89, 0x00, 0xa4, 0x3b, 0x48, 0xf0, 0x76, 0x91, 0x35, 0xa5, 0xf8, 0xc9, 0xb6, 0x46, 0xbc, 0xf6, 0x9a, 0x45, 0x47, 0x17, 0x96, 0x80, 0x5b, 0x3a, 0x28, 0x33, 0xf9, 0x5a, 0xef, 0x43, 0x07, 0xfe, 0x3b, 0xf4, 0x8e, 0x19, 0xce, 0xd2, 0x94, 0x4b, 0x6d, 0x8e, 0x67, 0x20, 0xc7, 0x4f, 0x2f, 0x59, 0x8e, 0xe1, 0xa1, 0xa9, 0xf9, 0x0e,
+ /* (2^273)P */ 0xdc, 0x7b, 0xb5, 0x50, 0x2e, 0xe9, 0x7e, 0x8b, 0x78, 0xa1, 0x38, 0x96, 0x22, 0xc3, 0x61, 0x67, 0x6d, 0xc8, 0x58, 0xed, 0x41, 0x1d, 0x5d, 0x86, 0x98, 0x7f, 0x2f, 0x1b, 0x8d, 0x3e, 0xaa, 0xc1, 0xd2, 0x0a, 0xf3, 0xbf, 0x95, 0x04, 0xf3, 0x10, 0x3c, 0x2b, 0x7f, 0x90, 0x46, 0x04, 0xaa, 0x6a, 0xa9, 0x35, 0x76, 0xac, 0x49, 0xb5, 0x00, 0x45,
+ /* (2^274)P */ 0xb1, 0x93, 0x79, 0x84, 0x4a, 0x2a, 0x30, 0x78, 0x16, 0xaa, 0xc5, 0x74, 0x06, 0xce, 0xa5, 0xa7, 0x32, 0x86, 0xe0, 0xf9, 0x10, 0xd2, 0x58, 0x76, 0xfb, 0x66, 0x49, 0x76, 0x3a, 0x90, 0xba, 0xb5, 0xcc, 0x99, 0xcd, 0x09, 0xc1, 0x9a, 0x74, 0x23, 0xdf, 0x0c, 0xfe, 0x99, 0x52, 0x80, 0xa3, 0x7c, 0x1c, 0x71, 0x5f, 0x2c, 0x49, 0x57, 0xf4, 0xf9,
+ /* (2^275)P */ 0x6d, 0xbf, 0x52, 0xe6, 0x25, 0x98, 0xed, 0xcf, 0xe3, 0xbc, 0x08, 0xa2, 0x1a, 0x90, 0xae, 0xa0, 0xbf, 0x07, 0x15, 0xad, 0x0a, 0x9f, 0x3e, 0x47, 0x44, 0xc2, 0x10, 0x46, 0xa6, 0x7a, 0x9e, 0x2f, 0x57, 0xbc, 0xe2, 0xf0, 0x1d, 0xd6, 0x9a, 0x06, 0xed, 0xfc, 0x54, 0x95, 0x92, 0x15, 0xa2, 0xf7, 0x8d, 0x6b, 0xef, 0xb2, 0x05, 0xed, 0x5c, 0x63,
+ /* (2^276)P */ 0xbc, 0x0b, 0x27, 0x3a, 0x3a, 0xf8, 0xe1, 0x48, 0x02, 0x7e, 0x27, 0xe6, 0x81, 0x62, 0x07, 0x73, 0x74, 0xe5, 0x52, 0xd7, 0xf8, 0x26, 0xca, 0x93, 0x4d, 0x3e, 0x9b, 0x55, 0x09, 0x8e, 0xe3, 0xd7, 0xa6, 0xe3, 0xb6, 0x2a, 0xa9, 0xb3, 0xb0, 0xa0, 0x8c, 0x01, 0xbb, 0x07, 0x90, 0x78, 0x6d, 0x6d, 0xe9, 0xf0, 0x7a, 0x90, 0xbd, 0xdc, 0x0c, 0x36,
+ /* (2^277)P */ 0x7f, 0x20, 0x12, 0x0f, 0x40, 0x00, 0x53, 0xd8, 0x0c, 0x27, 0x47, 0x47, 0x22, 0x80, 0xfb, 0x62, 0xe4, 0xa7, 0xf7, 0xbd, 0x42, 0xa5, 0xc3, 0x2b, 0xb2, 0x7f, 0x50, 0xcc, 0xe2, 0xfb, 0xd5, 0xc0, 0x63, 0xdd, 0x24, 0x5f, 0x7c, 0x08, 0x91, 0xbf, 0x6e, 0x47, 0x44, 0xd4, 0x6a, 0xc0, 0xc3, 0x09, 0x39, 0x27, 0xdd, 0xc7, 0xca, 0x06, 0x29, 0x55,
+ /* (2^278)P */ 0x76, 0x28, 0x58, 0xb0, 0xd2, 0xf3, 0x0f, 0x04, 0xe9, 0xc9, 0xab, 0x66, 0x5b, 0x75, 0x51, 0xdc, 0xe5, 0x8f, 0xe8, 0x1f, 0xdb, 0x03, 0x0f, 0xb0, 0x7d, 0xf9, 0x20, 0x64, 0x89, 0xe9, 0xdc, 0xe6, 0x24, 0xc3, 0xd5, 0xd2, 0x41, 0xa6, 0xe4, 0xe3, 0xc4, 0x79, 0x7c, 0x0f, 0xa1, 0x61, 0x2f, 0xda, 0xa4, 0xc9, 0xfd, 0xad, 0x5c, 0x65, 0x6a, 0xf3,
+ /* (2^279)P */ 0xd5, 0xab, 0x72, 0x7a, 0x3b, 0x59, 0xea, 0xcf, 0xd5, 0x17, 0xd2, 0xb2, 0x5f, 0x2d, 0xab, 0xad, 0x9e, 0x88, 0x64, 0x55, 0x96, 0x6e, 0xf3, 0x44, 0xa9, 0x11, 0xf5, 0xf8, 0x3a, 0xf1, 0xcd, 0x79, 0x4c, 0x99, 0x6d, 0x23, 0x6a, 0xa0, 0xc2, 0x1a, 0x19, 0x45, 0xb5, 0xd8, 0x95, 0x2f, 0x49, 0xe9, 0x46, 0x39, 0x26, 0x60, 0x04, 0x15, 0x8b, 0xcc,
+ /* (2^280)P */ 0x66, 0x0c, 0xf0, 0x54, 0x41, 0x02, 0x91, 0xab, 0xe5, 0x85, 0x8a, 0x44, 0xa6, 0x34, 0x96, 0x32, 0xc0, 0xdf, 0x6c, 0x41, 0x39, 0xd4, 0xc6, 0xe1, 0xe3, 0x81, 0xb0, 0x4c, 0x34, 0x4f, 0xe5, 0xf4, 0x35, 0x46, 0x1f, 0xeb, 0x75, 0xfd, 0x43, 0x37, 0x50, 0x99, 0xab, 0xad, 0xb7, 0x8c, 0xa1, 0x57, 0xcb, 0xe6, 0xce, 0x16, 0x2e, 0x85, 0xcc, 0xf9,
+ /* (2^281)P */ 0x63, 0xd1, 0x3f, 0x9e, 0xa2, 0x17, 0x2e, 0x1d, 0x3e, 0xce, 0x48, 0x2d, 0xbb, 0x8f, 0x69, 0xc9, 0xa6, 0x3d, 0x4e, 0xfe, 0x09, 0x56, 0xb3, 0x02, 0x5f, 0x99, 0x97, 0x0c, 0x54, 0xda, 0x32, 0x97, 0x9b, 0xf4, 0x95, 0xf1, 0xad, 0xe3, 0x2b, 0x04, 0xa7, 0x9b, 0x3f, 0xbb, 0xe7, 0x87, 0x2e, 0x1f, 0x8b, 0x4b, 0x7a, 0xa4, 0x43, 0x0c, 0x0f, 0x35,
+ /* (2^282)P */ 0x05, 0xdc, 0xe0, 0x2c, 0xa1, 0xc1, 0xd0, 0xf1, 0x1f, 0x4e, 0xc0, 0x6c, 0x35, 0x7b, 0xca, 0x8f, 0x8b, 0x02, 0xb1, 0xf7, 0xd6, 0x2e, 0xe7, 0x93, 0x80, 0x85, 0x18, 0x88, 0x19, 0xb9, 0xb4, 0x4a, 0xbc, 0xeb, 0x5a, 0x78, 0x38, 0xed, 0xc6, 0x27, 0x2a, 0x74, 0x76, 0xf0, 0x1b, 0x79, 0x92, 0x2f, 0xd2, 0x81, 0x98, 0xdf, 0xa9, 0x50, 0x19, 0xeb,
+ /* (2^283)P */ 0xb5, 0xe7, 0xb4, 0x11, 0x3a, 0x81, 0xb6, 0xb4, 0xf8, 0xa2, 0xb3, 0x6c, 0xfc, 0x9d, 0xe0, 0xc0, 0xe0, 0x59, 0x7f, 0x05, 0x37, 0xef, 0x2c, 0xa9, 0x3a, 0x24, 0xac, 0x7b, 0x25, 0xa0, 0x55, 0xd2, 0x44, 0x82, 0x82, 0x6e, 0x64, 0xa3, 0x58, 0xc8, 0x67, 0xae, 0x26, 0xa7, 0x0f, 0x42, 0x63, 0xe1, 0x93, 0x01, 0x52, 0x19, 0xaf, 0x49, 0x3e, 0x33,
+ /* (2^284)P */ 0x05, 0x85, 0xe6, 0x66, 0xaf, 0x5f, 0xdf, 0xbf, 0x9d, 0x24, 0x62, 0x60, 0x90, 0xe2, 0x4c, 0x7d, 0x4e, 0xc3, 0x74, 0x5d, 0x4f, 0x53, 0xf3, 0x63, 0x13, 0xf4, 0x74, 0x28, 0x6b, 0x7d, 0x57, 0x0c, 0x9d, 0x84, 0xa7, 0x1a, 0xff, 0xa0, 0x79, 0xdf, 0xfc, 0x65, 0x98, 0x8e, 0x22, 0x0d, 0x62, 0x7e, 0xf2, 0x34, 0x60, 0x83, 0x05, 0x14, 0xb1, 0xc1,
+ /* (2^285)P */ 0x64, 0x22, 0xcc, 0xdf, 0x5c, 0xbc, 0x88, 0x68, 0x4c, 0xd9, 0xbc, 0x0e, 0xc9, 0x8b, 0xb4, 0x23, 0x52, 0xad, 0xb0, 0xb3, 0xf1, 0x17, 0xd8, 0x15, 0x04, 0x6b, 0x99, 0xf0, 0xc4, 0x7d, 0x48, 0x22, 0x4a, 0xf8, 0x6f, 0xaa, 0x88, 0x0d, 0xc5, 0x5e, 0xa9, 0x1c, 0x61, 0x3d, 0x95, 0xa9, 0x7b, 0x6a, 0x79, 0x33, 0x0a, 0x2b, 0x99, 0xe3, 0x4e, 0x48,
+ /* (2^286)P */ 0x6b, 0x9b, 0x6a, 0x2a, 0xf1, 0x60, 0x31, 0xb4, 0x73, 0xd1, 0x87, 0x45, 0x9c, 0x15, 0x58, 0x4b, 0x91, 0x6d, 0x94, 0x1c, 0x41, 0x11, 0x4a, 0x83, 0xec, 0xaf, 0x65, 0xbc, 0x34, 0xaa, 0x26, 0xe2, 0xaf, 0xed, 0x46, 0x05, 0x4e, 0xdb, 0xc6, 0x4e, 0x10, 0x28, 0x4e, 0x72, 0xe5, 0x31, 0xa3, 0x20, 0xd7, 0xb1, 0x96, 0x64, 0xf6, 0xce, 0x08, 0x08,
+ /* (2^287)P */ 0x16, 0xa9, 0x5c, 0x9f, 0x9a, 0xb4, 0xb8, 0xc8, 0x32, 0x78, 0xc0, 0x3a, 0xd9, 0x5f, 0x94, 0xac, 0x3a, 0x42, 0x1f, 0x43, 0xd6, 0x80, 0x47, 0x2c, 0xdc, 0x76, 0x27, 0xfa, 0x50, 0xe5, 0xa1, 0xe4, 0xc3, 0xcb, 0x61, 0x31, 0xe1, 0x2e, 0xde, 0x81, 0x3b, 0x77, 0x1c, 0x39, 0x3c, 0xdb, 0xda, 0x87, 0x4b, 0x84, 0x12, 0xeb, 0xdd, 0x54, 0xbf, 0xe7,
+ /* (2^288)P */ 0xbf, 0xcb, 0x73, 0x21, 0x3d, 0x7e, 0x13, 0x8c, 0xa6, 0x34, 0x21, 0x2b, 0xa5, 0xe4, 0x9f, 0x8e, 0x9c, 0x01, 0x9c, 0x43, 0xd9, 0xc7, 0xb9, 0xf1, 0xbe, 0x7f, 0x45, 0x51, 0x97, 0xa1, 0x8e, 0x01, 0xf8, 0xbd, 0xd2, 0xbf, 0x81, 0x3a, 0x8b, 0xab, 0xe4, 0x89, 0xb7, 0xbd, 0xf2, 0xcd, 0xa9, 0x8a, 0x8a, 0xde, 0xfb, 0x8a, 0x55, 0x12, 0x7b, 0x17,
+ /* (2^289)P */ 0x1b, 0x95, 0x58, 0x4d, 0xe6, 0x51, 0x31, 0x52, 0x1c, 0xd8, 0x15, 0x84, 0xb1, 0x0d, 0x36, 0x25, 0x88, 0x91, 0x46, 0x71, 0x42, 0x56, 0xe2, 0x90, 0x08, 0x9e, 0x77, 0x1b, 0xee, 0x22, 0x3f, 0xec, 0xee, 0x8c, 0x7b, 0x2e, 0x79, 0xc4, 0x6c, 0x07, 0xa1, 0x7e, 0x52, 0xf5, 0x26, 0x5c, 0x84, 0x2a, 0x50, 0x6e, 0x82, 0xb3, 0x76, 0xda, 0x35, 0x16,
+ /* (2^290)P */ 0x0a, 0x6f, 0x99, 0x87, 0xc0, 0x7d, 0x8a, 0xb2, 0xca, 0xae, 0xe8, 0x65, 0x98, 0x0f, 0xb3, 0x44, 0xe1, 0xdc, 0x52, 0x79, 0x75, 0xec, 0x8f, 0x95, 0x87, 0x45, 0xd1, 0x32, 0x18, 0x55, 0x15, 0xce, 0x64, 0x9b, 0x08, 0x4f, 0x2c, 0xea, 0xba, 0x1c, 0x57, 0x06, 0x63, 0xc8, 0xb1, 0xfd, 0xc5, 0x67, 0xe7, 0x1f, 0x87, 0x9e, 0xde, 0x72, 0x7d, 0xec,
+ /* (2^291)P */ 0x36, 0x8b, 0x4d, 0x2c, 0xc2, 0x46, 0xe8, 0x96, 0xac, 0x0b, 0x8c, 0xc5, 0x09, 0x10, 0xfc, 0xf2, 0xda, 0xea, 0x22, 0xb2, 0xd3, 0x89, 0xeb, 0xb2, 0x85, 0x0f, 0xff, 0x59, 0x50, 0x2c, 0x99, 0x5a, 0x1f, 0xec, 0x2a, 0x6f, 0xec, 0xcf, 0xe9, 0xce, 0x12, 0x6b, 0x19, 0xd8, 0xde, 0x9b, 0xce, 0x0e, 0x6a, 0xaa, 0xe1, 0x32, 0xea, 0x4c, 0xfe, 0x92,
+ /* (2^292)P */ 0x5f, 0x17, 0x70, 0x53, 0x26, 0x03, 0x0b, 0xab, 0xd1, 0xc1, 0x42, 0x0b, 0xab, 0x2b, 0x3d, 0x31, 0xa4, 0xd5, 0x2b, 0x5e, 0x00, 0xd5, 0x9a, 0x22, 0x34, 0xe0, 0x53, 0x3f, 0x59, 0x7f, 0x2c, 0x6d, 0x72, 0x9a, 0xa4, 0xbe, 0x3d, 0x42, 0x05, 0x1b, 0xf2, 0x7f, 0x88, 0x56, 0xd1, 0x7c, 0x7d, 0x6b, 0x9f, 0x43, 0xfe, 0x65, 0x19, 0xae, 0x9c, 0x4c,
+ /* (2^293)P */ 0xf3, 0x7c, 0x20, 0xa9, 0xfc, 0xf2, 0xf2, 0x3b, 0x3c, 0x57, 0x41, 0x94, 0xe5, 0xcc, 0x6a, 0x37, 0x5d, 0x09, 0xf2, 0xab, 0xc2, 0xca, 0x60, 0x38, 0x6b, 0x7a, 0xe1, 0x78, 0x2b, 0xc1, 0x1d, 0xe8, 0xfd, 0xbc, 0x3d, 0x5c, 0xa2, 0xdb, 0x49, 0x20, 0x79, 0xe6, 0x1b, 0x9b, 0x65, 0xd9, 0x6d, 0xec, 0x57, 0x1d, 0xd2, 0xe9, 0x90, 0xeb, 0x43, 0x7b,
+ /* (2^294)P */ 0x2a, 0x8b, 0x2e, 0x19, 0x18, 0x10, 0xb8, 0x83, 0xe7, 0x7d, 0x2d, 0x9a, 0x3a, 0xe5, 0xd1, 0xe4, 0x7c, 0x38, 0xe5, 0x59, 0x2a, 0x6e, 0xd9, 0x01, 0x29, 0x3d, 0x23, 0xf7, 0x52, 0xba, 0x61, 0x04, 0x9a, 0xde, 0xc4, 0x31, 0x50, 0xeb, 0x1b, 0xaa, 0xde, 0x39, 0x58, 0xd8, 0x1b, 0x1e, 0xfc, 0x57, 0x9a, 0x28, 0x43, 0x9e, 0x97, 0x5e, 0xaa, 0xa3,
+ /* (2^295)P */ 0x97, 0x0a, 0x74, 0xc4, 0x39, 0x99, 0x6b, 0x40, 0xc7, 0x3e, 0x8c, 0xa7, 0xb1, 0x4e, 0x9a, 0x59, 0x6e, 0x1c, 0xfe, 0xfc, 0x2a, 0x5e, 0x73, 0x2b, 0x8c, 0xa9, 0x71, 0xf5, 0xda, 0x6b, 0x15, 0xab, 0xf7, 0xbe, 0x2a, 0x44, 0x5f, 0xba, 0xae, 0x67, 0x93, 0xc5, 0x86, 0xc1, 0xb8, 0xdf, 0xdc, 0xcb, 0xd7, 0xff, 0xb1, 0x71, 0x7c, 0x6f, 0x88, 0xf8,
+ /* (2^296)P */ 0x3f, 0x89, 0xb1, 0xbf, 0x24, 0x16, 0xac, 0x56, 0xfe, 0xdf, 0x94, 0x71, 0xbf, 0xd6, 0x57, 0x0c, 0xb4, 0x77, 0x37, 0xaa, 0x2a, 0x70, 0x76, 0x49, 0xaf, 0x0c, 0x97, 0x8e, 0x78, 0x2a, 0x67, 0xc9, 0x3b, 0x3d, 0x5b, 0x01, 0x2f, 0xda, 0xd5, 0xa8, 0xde, 0x02, 0xa9, 0xac, 0x76, 0x00, 0x0b, 0x46, 0xc6, 0x2d, 0xdc, 0x08, 0xf4, 0x10, 0x2c, 0xbe,
+ /* (2^297)P */ 0xcb, 0x07, 0xf9, 0x91, 0xc6, 0xd5, 0x3e, 0x54, 0x63, 0xae, 0xfc, 0x10, 0xbe, 0x3a, 0x20, 0x73, 0x4e, 0x65, 0x0e, 0x2d, 0x86, 0x77, 0x83, 0x9d, 0xe2, 0x0a, 0xe9, 0xac, 0x22, 0x52, 0x76, 0xd4, 0x6e, 0xfa, 0xe0, 0x09, 0xef, 0x78, 0x82, 0x9f, 0x26, 0xf9, 0x06, 0xb5, 0xe7, 0x05, 0x0e, 0xf2, 0x46, 0x72, 0x93, 0xd3, 0x24, 0xbd, 0x87, 0x60,
+ /* (2^298)P */ 0x14, 0x55, 0x84, 0x7b, 0x6c, 0x60, 0x80, 0x73, 0x8c, 0xbe, 0x2d, 0xd6, 0x69, 0xd6, 0x17, 0x26, 0x44, 0x9f, 0x88, 0xa2, 0x39, 0x7c, 0x89, 0xbc, 0x6d, 0x9e, 0x46, 0xb6, 0x68, 0x66, 0xea, 0xdc, 0x31, 0xd6, 0x21, 0x51, 0x9f, 0x28, 0x28, 0xaf, 0x9e, 0x47, 0x2c, 0x4c, 0x8f, 0xf3, 0xaf, 0x1f, 0xe4, 0xab, 0xac, 0xe9, 0x0c, 0x91, 0x3a, 0x61,
+ /* (2^299)P */ 0xb0, 0x37, 0x55, 0x4b, 0xe9, 0xc3, 0xb1, 0xce, 0x42, 0xe6, 0xc5, 0x11, 0x7f, 0x2c, 0x11, 0xfc, 0x4e, 0x71, 0x17, 0x00, 0x74, 0x7f, 0xbf, 0x07, 0x4d, 0xfd, 0x40, 0xb2, 0x87, 0xb0, 0xef, 0x1f, 0x35, 0x2c, 0x2d, 0xd7, 0xe1, 0xe4, 0xad, 0x0e, 0x7f, 0x63, 0x66, 0x62, 0x23, 0x41, 0xf6, 0xc1, 0x14, 0xa6, 0xd7, 0xa9, 0x11, 0x56, 0x9d, 0x1b,
+ /* (2^300)P */ 0x02, 0x82, 0x42, 0x18, 0x4f, 0x1b, 0xc9, 0x5d, 0x78, 0x5f, 0xee, 0xed, 0x01, 0x49, 0x8f, 0xf2, 0xa0, 0xe2, 0x6e, 0xbb, 0x6b, 0x04, 0x8d, 0xb2, 0x41, 0xae, 0xc8, 0x1b, 0x59, 0x34, 0xb8, 0x2a, 0xdb, 0x1f, 0xd2, 0x52, 0xdf, 0x3f, 0x35, 0x00, 0x8b, 0x61, 0xbc, 0x97, 0xa0, 0xc4, 0x77, 0xd1, 0xe4, 0x2c, 0x59, 0x68, 0xff, 0x30, 0xf2, 0xe2,
+ /* (2^301)P */ 0x79, 0x08, 0xb1, 0xdb, 0x55, 0xae, 0xd0, 0xed, 0xda, 0xa0, 0xec, 0x6c, 0xae, 0x68, 0xf2, 0x0b, 0x61, 0xb3, 0xf5, 0x21, 0x69, 0x87, 0x0b, 0x03, 0xea, 0x8a, 0x15, 0xd9, 0x7e, 0xca, 0xf7, 0xcd, 0xf3, 0x33, 0xb3, 0x4c, 0x5b, 0x23, 0x4e, 0x6f, 0x90, 0xad, 0x91, 0x4b, 0x4f, 0x46, 0x37, 0xe5, 0xe8, 0xb7, 0xeb, 0xd5, 0xca, 0x34, 0x4e, 0x23,
+ /* (2^302)P */ 0x09, 0x02, 0xdd, 0xfd, 0x70, 0xac, 0x56, 0x80, 0x36, 0x5e, 0x49, 0xd0, 0x3f, 0xc2, 0xe0, 0xba, 0x46, 0x7f, 0x5c, 0xf7, 0xc5, 0xbd, 0xd5, 0x55, 0x7d, 0x3f, 0xd5, 0x7d, 0x06, 0xdf, 0x27, 0x20, 0x4f, 0xe9, 0x30, 0xec, 0x1b, 0xa0, 0x0c, 0xd4, 0x2c, 0xe1, 0x2b, 0x65, 0x73, 0xea, 0x75, 0x35, 0xe8, 0xe6, 0x56, 0xd6, 0x07, 0x15, 0x99, 0xdf,
+ /* (2^303)P */ 0x4e, 0x10, 0xb7, 0xd0, 0x63, 0x8c, 0xcf, 0x16, 0x00, 0x7c, 0x58, 0xdf, 0x86, 0xdc, 0x4e, 0xca, 0x9c, 0x40, 0x5a, 0x42, 0xfd, 0xec, 0x98, 0xa4, 0x42, 0x53, 0xae, 0x16, 0x9d, 0xfd, 0x75, 0x5a, 0x12, 0x56, 0x1e, 0xc6, 0x57, 0xcc, 0x79, 0x27, 0x96, 0x00, 0xcf, 0x80, 0x4f, 0x8a, 0x36, 0x5c, 0xbb, 0xe9, 0x12, 0xdb, 0xb6, 0x2b, 0xad, 0x96,
+ /* (2^304)P */ 0x92, 0x32, 0x1f, 0xfd, 0xc6, 0x02, 0x94, 0x08, 0x1b, 0x60, 0x6a, 0x9f, 0x8b, 0xd6, 0xc8, 0xad, 0xd5, 0x1b, 0x27, 0x4e, 0xa4, 0x4d, 0x4a, 0x00, 0x10, 0x5f, 0x86, 0x11, 0xf5, 0xe3, 0x14, 0x32, 0x43, 0xee, 0xb9, 0xc7, 0xab, 0xf4, 0x6f, 0xe5, 0x66, 0x0c, 0x06, 0x0d, 0x96, 0x79, 0x28, 0xaf, 0x45, 0x2b, 0x56, 0xbe, 0xe4, 0x4a, 0x52, 0xd6,
+ /* (2^305)P */ 0x15, 0x16, 0x69, 0xef, 0x60, 0xca, 0x82, 0x25, 0x0f, 0xc6, 0x30, 0xa0, 0x0a, 0xd1, 0x83, 0x29, 0xcd, 0xb6, 0x89, 0x6c, 0xf5, 0xb2, 0x08, 0x38, 0xe6, 0xca, 0x6b, 0x19, 0x93, 0xc6, 0x5f, 0x75, 0x8e, 0x60, 0x34, 0x23, 0xc4, 0x13, 0x17, 0x69, 0x55, 0xcc, 0x72, 0x9c, 0x2b, 0x6c, 0x80, 0xf4, 0x4b, 0x8b, 0xb6, 0x97, 0x65, 0x07, 0xb6, 0xfb,
+ /* (2^306)P */ 0x01, 0x99, 0x74, 0x28, 0xa6, 0x67, 0xa3, 0xe5, 0x25, 0xfb, 0xdf, 0x82, 0x93, 0xe7, 0x35, 0x74, 0xce, 0xe3, 0x15, 0x1c, 0x1d, 0x79, 0x52, 0x84, 0x08, 0x04, 0x2f, 0x5c, 0xb8, 0xcd, 0x7f, 0x89, 0xb0, 0x39, 0x93, 0x63, 0xc9, 0x5d, 0x06, 0x01, 0x59, 0xf7, 0x7e, 0xf1, 0x4c, 0x3d, 0x12, 0x8d, 0x69, 0x1d, 0xb7, 0x21, 0x5e, 0x88, 0x82, 0xa2,
+ /* (2^307)P */ 0x8e, 0x69, 0xaf, 0x9a, 0x41, 0x0d, 0x9d, 0xcf, 0x8e, 0x8d, 0x5c, 0x51, 0x6e, 0xde, 0x0e, 0x48, 0x23, 0x89, 0xe5, 0x37, 0x80, 0xd6, 0x9d, 0x72, 0x32, 0x26, 0x38, 0x2d, 0x63, 0xa0, 0xfa, 0xd3, 0x40, 0xc0, 0x8c, 0x68, 0x6f, 0x2b, 0x1e, 0x9a, 0x39, 0x51, 0x78, 0x74, 0x9a, 0x7b, 0x4a, 0x8f, 0x0c, 0xa0, 0x88, 0x60, 0xa5, 0x21, 0xcd, 0xc7,
+ /* (2^308)P */ 0x3a, 0x7f, 0x73, 0x14, 0xbf, 0x89, 0x6a, 0x4c, 0x09, 0x5d, 0xf2, 0x93, 0x20, 0x2d, 0xc4, 0x29, 0x86, 0x06, 0x95, 0xab, 0x22, 0x76, 0x4c, 0x54, 0xe1, 0x7e, 0x80, 0x6d, 0xab, 0x29, 0x61, 0x87, 0x77, 0xf6, 0xc0, 0x3e, 0xda, 0xab, 0x65, 0x7e, 0x39, 0x12, 0xa1, 0x6b, 0x42, 0xf7, 0xc5, 0x97, 0x77, 0xec, 0x6f, 0x22, 0xbe, 0x44, 0xc7, 0x03,
+ /* (2^309)P */ 0xa5, 0x23, 0x90, 0x41, 0xa3, 0xc5, 0x3e, 0xe0, 0xa5, 0x32, 0x49, 0x1f, 0x39, 0x78, 0xb1, 0xd8, 0x24, 0xea, 0xd4, 0x87, 0x53, 0x42, 0x51, 0xf4, 0xd9, 0x46, 0x25, 0x2f, 0x62, 0xa9, 0x90, 0x9a, 0x4a, 0x25, 0x8a, 0xd2, 0x10, 0xe7, 0x3c, 0xbc, 0x58, 0x8d, 0x16, 0x14, 0x96, 0xa4, 0x6f, 0xf8, 0x12, 0x69, 0x91, 0x73, 0xe2, 0xfa, 0xf4, 0x57,
+ /* (2^310)P */ 0x51, 0x45, 0x3f, 0x96, 0xdc, 0x97, 0x38, 0xa6, 0x01, 0x63, 0x09, 0xea, 0xc2, 0x13, 0x30, 0xb0, 0x00, 0xb8, 0x0a, 0xce, 0xd1, 0x8f, 0x3e, 0x69, 0x62, 0x46, 0x33, 0x9c, 0xbf, 0x4b, 0xcb, 0x0c, 0x90, 0x1c, 0x45, 0xcf, 0x37, 0x5b, 0xf7, 0x4b, 0x5e, 0x95, 0xc3, 0x28, 0x9f, 0x08, 0x83, 0x53, 0x74, 0xab, 0x0c, 0xb4, 0xc0, 0xa1, 0xbc, 0x89,
+ /* (2^311)P */ 0x06, 0xb1, 0x51, 0x15, 0x65, 0x60, 0x21, 0x17, 0x7a, 0x20, 0x65, 0xee, 0x12, 0x35, 0x4d, 0x46, 0xf4, 0xf8, 0xd0, 0xb1, 0xca, 0x09, 0x30, 0x08, 0x89, 0x23, 0x3b, 0xe7, 0xab, 0x8b, 0x77, 0xa6, 0xad, 0x25, 0xdd, 0xea, 0x3c, 0x7d, 0xa5, 0x24, 0xb3, 0xe8, 0xfa, 0xfb, 0xc9, 0xf2, 0x71, 0xe9, 0xfa, 0xf2, 0xdc, 0x54, 0xdd, 0x55, 0x2e, 0x2f,
+ /* (2^312)P */ 0x7f, 0x96, 0x96, 0xfb, 0x52, 0x86, 0xcf, 0xea, 0x62, 0x18, 0xf1, 0x53, 0x1f, 0x61, 0x2a, 0x9f, 0x8c, 0x51, 0xca, 0x2c, 0xde, 0x6d, 0xce, 0xab, 0x58, 0x32, 0x0b, 0x33, 0x9b, 0x99, 0xb4, 0x5c, 0x88, 0x2a, 0x76, 0xcc, 0x3e, 0x54, 0x1e, 0x9d, 0xa2, 0x89, 0xe4, 0x19, 0xba, 0x80, 0xc8, 0x39, 0x32, 0x7f, 0x0f, 0xc7, 0x84, 0xbb, 0x43, 0x56,
+ /* (2^313)P */ 0x9b, 0x07, 0xb4, 0x42, 0xa9, 0xa0, 0x78, 0x4f, 0x28, 0x70, 0x2b, 0x7e, 0x61, 0xe0, 0xdd, 0x02, 0x98, 0xfc, 0xed, 0x31, 0x80, 0xf1, 0x15, 0x52, 0x89, 0x23, 0xcd, 0x5d, 0x2b, 0xc5, 0x19, 0x32, 0xfb, 0x70, 0x50, 0x7a, 0x97, 0x6b, 0x42, 0xdb, 0xca, 0xdb, 0xc4, 0x59, 0x99, 0xe0, 0x12, 0x1f, 0x17, 0xba, 0x8b, 0xf0, 0xc4, 0x38, 0x5d, 0x27,
+ /* (2^314)P */ 0x29, 0x1d, 0xdc, 0x2b, 0xf6, 0x5b, 0x04, 0x61, 0x36, 0x76, 0xa0, 0x56, 0x36, 0x6e, 0xd7, 0x24, 0x4d, 0xe7, 0xef, 0x44, 0xd2, 0xd5, 0x07, 0xcd, 0xc4, 0x9d, 0x80, 0x48, 0xc3, 0x38, 0xcf, 0xd8, 0xa3, 0xdd, 0xb2, 0x5e, 0xb5, 0x70, 0x15, 0xbb, 0x36, 0x85, 0x8a, 0xd7, 0xfb, 0x56, 0x94, 0x73, 0x9c, 0x81, 0xbe, 0xb1, 0x44, 0x28, 0xf1, 0x37,
+ /* (2^315)P */ 0xbf, 0xcf, 0x5c, 0xd2, 0xe2, 0xea, 0xc2, 0xcd, 0x70, 0x7a, 0x9d, 0xcb, 0x81, 0xc1, 0xe9, 0xf1, 0x56, 0x71, 0x52, 0xf7, 0x1b, 0x87, 0xc6, 0xd8, 0xcc, 0xb2, 0x69, 0xf3, 0xb0, 0xbd, 0xba, 0x83, 0x12, 0x26, 0xc4, 0xce, 0x72, 0xde, 0x3b, 0x21, 0x28, 0x9e, 0x5a, 0x94, 0xf5, 0x04, 0xa3, 0xc8, 0x0f, 0x5e, 0xbc, 0x71, 0xf9, 0x0d, 0xce, 0xf5,
+ /* (2^316)P */ 0x93, 0x97, 0x00, 0x85, 0xf4, 0xb4, 0x40, 0xec, 0xd9, 0x2b, 0x6c, 0xd6, 0x63, 0x9e, 0x93, 0x0a, 0x5a, 0xf4, 0xa7, 0x9a, 0xe3, 0x3c, 0xf0, 0x55, 0xd1, 0x96, 0x6c, 0xf5, 0x2a, 0xce, 0xd7, 0x95, 0x72, 0xbf, 0xc5, 0x0c, 0xce, 0x79, 0xa2, 0x0a, 0x78, 0xe0, 0x72, 0xd0, 0x66, 0x28, 0x05, 0x75, 0xd3, 0x23, 0x09, 0x91, 0xed, 0x7e, 0xc4, 0xbc,
+ /* (2^317)P */ 0x77, 0xc2, 0x9a, 0xf7, 0xa6, 0xe6, 0x18, 0xb4, 0xe7, 0xf6, 0xda, 0xec, 0x44, 0x6d, 0xfb, 0x08, 0xee, 0x65, 0xa8, 0x92, 0x85, 0x1f, 0xba, 0x38, 0x93, 0x20, 0x5c, 0x4d, 0xd2, 0x18, 0x0f, 0x24, 0xbe, 0x1a, 0x96, 0x44, 0x7d, 0xeb, 0xb3, 0xda, 0x95, 0xf4, 0xaf, 0x6c, 0x06, 0x0f, 0x47, 0x37, 0xc8, 0x77, 0x63, 0xe1, 0x29, 0xef, 0xff, 0xa5,
+ /* (2^318)P */ 0x16, 0x12, 0xd9, 0x47, 0x90, 0x22, 0x9b, 0x05, 0xf2, 0xa5, 0x9a, 0xae, 0x83, 0x98, 0xb5, 0xac, 0xab, 0x29, 0xaa, 0xdc, 0x5f, 0xde, 0xcd, 0xf7, 0x42, 0xad, 0x3b, 0x96, 0xd6, 0x3e, 0x6e, 0x52, 0x47, 0xb1, 0xab, 0x51, 0xde, 0x49, 0x7c, 0x87, 0x8d, 0x86, 0xe2, 0x70, 0x13, 0x21, 0x51, 0x1c, 0x0c, 0x25, 0xc1, 0xb0, 0xe6, 0x19, 0xcf, 0x12,
+ /* (2^319)P */ 0xf0, 0xbc, 0x97, 0x8f, 0x4b, 0x2f, 0xd1, 0x1f, 0x8c, 0x57, 0xed, 0x3c, 0xf4, 0x26, 0x19, 0xbb, 0x60, 0xca, 0x24, 0xc5, 0xd9, 0x97, 0xe2, 0x5f, 0x76, 0x49, 0x39, 0x7e, 0x2d, 0x12, 0x21, 0x98, 0xda, 0xe6, 0xdb, 0xd2, 0xd8, 0x9f, 0x18, 0xd8, 0x83, 0x6c, 0xba, 0x89, 0x8d, 0x29, 0xfa, 0x46, 0x33, 0x8c, 0x28, 0xdf, 0x6a, 0xb3, 0x69, 0x28,
+ /* (2^320)P */ 0x86, 0x17, 0xbc, 0xd6, 0x7c, 0xba, 0x1e, 0x83, 0xbb, 0x84, 0xb5, 0x8c, 0xad, 0xdf, 0xa1, 0x24, 0x81, 0x70, 0x40, 0x0f, 0xad, 0xad, 0x3b, 0x23, 0xd0, 0x93, 0xa0, 0x49, 0x5c, 0x4b, 0x51, 0xbe, 0x20, 0x49, 0x4e, 0xda, 0x2d, 0xd3, 0xad, 0x1b, 0x74, 0x08, 0x41, 0xf0, 0xef, 0x19, 0xe9, 0x45, 0x5d, 0x02, 0xae, 0x26, 0x25, 0xd9, 0xd1, 0xc2,
+ /* (2^321)P */ 0x48, 0x81, 0x3e, 0xb2, 0x83, 0xf8, 0x4d, 0xb3, 0xd0, 0x4c, 0x75, 0xb3, 0xa0, 0x52, 0x26, 0xf2, 0xaf, 0x5d, 0x36, 0x70, 0x72, 0xd6, 0xb7, 0x88, 0x08, 0x69, 0xbd, 0x15, 0x25, 0xb1, 0x45, 0x1b, 0xb7, 0x0b, 0x5f, 0x71, 0x5d, 0x83, 0x49, 0xb9, 0x84, 0x3b, 0x7c, 0xc1, 0x50, 0x93, 0x05, 0x53, 0xe0, 0x61, 0xea, 0xc1, 0xef, 0xdb, 0x82, 0x97,
+ /* (2^322)P */ 0x00, 0xd5, 0xc3, 0x3a, 0x4d, 0x8a, 0x23, 0x7a, 0xef, 0xff, 0x37, 0xef, 0xf3, 0xbc, 0xa9, 0xb6, 0xae, 0xd7, 0x3a, 0x7b, 0xfd, 0x3e, 0x8e, 0x9b, 0xab, 0x44, 0x54, 0x60, 0x28, 0x6c, 0xbf, 0x15, 0x24, 0x4a, 0x56, 0x60, 0x7f, 0xa9, 0x7a, 0x28, 0x59, 0x2c, 0x8a, 0xd1, 0x7d, 0x6b, 0x00, 0xfd, 0xa5, 0xad, 0xbc, 0x19, 0x3f, 0xcb, 0x73, 0xe0,
+ /* (2^323)P */ 0xcf, 0x9e, 0x66, 0x06, 0x4d, 0x2b, 0xf5, 0x9c, 0xc2, 0x9d, 0x9e, 0xed, 0x5a, 0x5c, 0x2d, 0x00, 0xbf, 0x29, 0x90, 0x88, 0xe4, 0x5d, 0xfd, 0xe2, 0xf0, 0x38, 0xec, 0x4d, 0x26, 0xea, 0x54, 0xf0, 0x3c, 0x84, 0x10, 0x6a, 0xf9, 0x66, 0x9c, 0xe7, 0x21, 0xfd, 0x0f, 0xc7, 0x13, 0x50, 0x81, 0xb6, 0x50, 0xf9, 0x04, 0x7f, 0xa4, 0x37, 0x85, 0x14,
+ /* (2^324)P */ 0xdb, 0x87, 0x49, 0xc7, 0xa8, 0x39, 0x0c, 0x32, 0x98, 0x0c, 0xb9, 0x1a, 0x1b, 0x4d, 0xe0, 0x8a, 0x9a, 0x8e, 0x8f, 0xab, 0x5a, 0x17, 0x3d, 0x04, 0x21, 0xce, 0x3e, 0x2c, 0xf9, 0xa3, 0x97, 0xe4, 0x77, 0x95, 0x0e, 0xb6, 0xa5, 0x15, 0xad, 0x3a, 0x1e, 0x46, 0x53, 0x17, 0x09, 0x83, 0x71, 0x4e, 0x86, 0x38, 0xd5, 0x23, 0x44, 0x16, 0x8d, 0xc8,
+ /* (2^325)P */ 0x05, 0x5e, 0x99, 0x08, 0xbb, 0xc3, 0xc0, 0xb7, 0x6c, 0x12, 0xf2, 0xf3, 0xf4, 0x7c, 0x6a, 0x4d, 0x9e, 0xeb, 0x3d, 0xb9, 0x63, 0x94, 0xce, 0x81, 0xd8, 0x11, 0xcb, 0x55, 0x69, 0x4a, 0x20, 0x0b, 0x4c, 0x2e, 0x14, 0xb8, 0xd4, 0x6a, 0x7c, 0xf0, 0xed, 0xfc, 0x8f, 0xef, 0xa0, 0xeb, 0x6c, 0x01, 0xe2, 0xdc, 0x10, 0x22, 0xa2, 0x01, 0x85, 0x64,
+ /* (2^326)P */ 0x58, 0xe1, 0x9c, 0x27, 0x55, 0xc6, 0x25, 0xa6, 0x7d, 0x67, 0x88, 0x65, 0x99, 0x6c, 0xcb, 0xdb, 0x27, 0x4f, 0x44, 0x29, 0xf5, 0x4a, 0x23, 0x10, 0xbc, 0x03, 0x3f, 0x36, 0x1e, 0xef, 0xb0, 0xba, 0x75, 0xe8, 0x74, 0x5f, 0x69, 0x3e, 0x26, 0x40, 0xb4, 0x2f, 0xdc, 0x43, 0xbf, 0xa1, 0x8b, 0xbd, 0xca, 0x6e, 0xc1, 0x6e, 0x21, 0x79, 0xa0, 0xd0,
+ /* (2^327)P */ 0x78, 0x93, 0x4a, 0x2d, 0x22, 0x6e, 0x6e, 0x7d, 0x74, 0xd2, 0x66, 0x58, 0xce, 0x7b, 0x1d, 0x97, 0xb1, 0xf2, 0xda, 0x1c, 0x79, 0xfb, 0xba, 0xd1, 0xc0, 0xc5, 0x6e, 0xc9, 0x11, 0x89, 0xd2, 0x41, 0x8d, 0x70, 0xb9, 0xcc, 0xea, 0x6a, 0xb3, 0x45, 0xb6, 0x05, 0x2e, 0xf2, 0x17, 0xf1, 0x27, 0xb8, 0xed, 0x06, 0x1f, 0xdb, 0x9d, 0x1f, 0x69, 0x28,
+ /* (2^328)P */ 0x93, 0x12, 0xa8, 0x11, 0xe1, 0x92, 0x30, 0x8d, 0xac, 0xe1, 0x1c, 0x60, 0x7c, 0xed, 0x2d, 0x2e, 0xd3, 0x03, 0x5c, 0x9c, 0xc5, 0xbd, 0x64, 0x4a, 0x8c, 0xba, 0x76, 0xfe, 0xc6, 0xc1, 0xea, 0xc2, 0x4f, 0xbe, 0x70, 0x3d, 0x64, 0xcf, 0x8e, 0x18, 0xcb, 0xcd, 0x57, 0xa7, 0xf7, 0x36, 0xa9, 0x6b, 0x3e, 0xb8, 0x69, 0xee, 0x47, 0xa2, 0x7e, 0xb2,
+ /* (2^329)P */ 0x96, 0xaf, 0x3a, 0xf5, 0xed, 0xcd, 0xaf, 0xf7, 0x82, 0xaf, 0x59, 0x62, 0x0b, 0x36, 0x85, 0xf9, 0xaf, 0xd6, 0x38, 0xff, 0x87, 0x2e, 0x1d, 0x6c, 0x8b, 0xaf, 0x3b, 0xdf, 0x28, 0xa2, 0xd6, 0x4d, 0x80, 0x92, 0xc3, 0x0f, 0x34, 0xa8, 0xae, 0x69, 0x5d, 0x7b, 0x9d, 0xbc, 0xf5, 0xfd, 0x1d, 0xb1, 0x96, 0x55, 0x86, 0xe1, 0x5c, 0xb6, 0xac, 0xb9,
+ /* (2^330)P */ 0x50, 0x9e, 0x37, 0x28, 0x7d, 0xa8, 0x33, 0x63, 0xda, 0x3f, 0x20, 0x98, 0x0e, 0x09, 0xa8, 0x77, 0x3b, 0x7a, 0xfc, 0x16, 0x85, 0x44, 0x64, 0x77, 0x65, 0x68, 0x92, 0x41, 0xc6, 0x1f, 0xdf, 0x27, 0xf9, 0xec, 0xa0, 0x61, 0x22, 0xea, 0x19, 0xe7, 0x75, 0x8b, 0x4e, 0xe5, 0x0f, 0xb7, 0xf7, 0xd2, 0x53, 0xf4, 0xdd, 0x4a, 0xaa, 0x78, 0x40, 0xb7,
+ /* (2^331)P */ 0xd4, 0x89, 0xe3, 0x79, 0xba, 0xb6, 0xc3, 0xda, 0xe6, 0x78, 0x65, 0x7d, 0x6e, 0x22, 0x62, 0xb1, 0x3d, 0xea, 0x90, 0x84, 0x30, 0x5e, 0xd4, 0x39, 0x84, 0x78, 0xd9, 0x75, 0xd6, 0xce, 0x2a, 0x11, 0x29, 0x69, 0xa4, 0x5e, 0xaa, 0x2a, 0x98, 0x5a, 0xe5, 0x91, 0x8f, 0xb2, 0xfb, 0xda, 0x97, 0xe8, 0x83, 0x6f, 0x04, 0xb9, 0x5d, 0xaf, 0xe1, 0x9b,
+ /* (2^332)P */ 0x8b, 0xe4, 0xe1, 0x48, 0x9c, 0xc4, 0x83, 0x89, 0xdf, 0x65, 0xd3, 0x35, 0x55, 0x13, 0xf4, 0x1f, 0x36, 0x92, 0x33, 0x38, 0xcb, 0xed, 0x15, 0xe6, 0x60, 0x2d, 0x25, 0xf5, 0x36, 0x60, 0x3a, 0x37, 0x9b, 0x71, 0x9d, 0x42, 0xb0, 0x14, 0xc8, 0xba, 0x62, 0xa3, 0x49, 0xb0, 0x88, 0xc1, 0x72, 0x73, 0xdd, 0x62, 0x40, 0xa9, 0x62, 0x88, 0x99, 0xca,
+ /* (2^333)P */ 0x47, 0x7b, 0xea, 0xda, 0x46, 0x2f, 0x45, 0xc6, 0xe3, 0xb4, 0x4d, 0x8d, 0xac, 0x0b, 0x54, 0x22, 0x06, 0x31, 0x16, 0x66, 0x3e, 0xe4, 0x38, 0x12, 0xcd, 0xf3, 0xe7, 0x99, 0x37, 0xd9, 0x62, 0x24, 0x4b, 0x05, 0xf2, 0x58, 0xe6, 0x29, 0x4b, 0x0d, 0xf6, 0xc1, 0xba, 0xa0, 0x1e, 0x0f, 0xcb, 0x1f, 0xc6, 0x2b, 0x19, 0xfc, 0x82, 0x01, 0xd0, 0x86,
+ /* (2^334)P */ 0xa2, 0xae, 0x77, 0x20, 0xfb, 0xa8, 0x18, 0xb4, 0x61, 0xef, 0xe8, 0x52, 0x79, 0xbb, 0x86, 0x90, 0x5d, 0x2e, 0x76, 0xed, 0x66, 0x60, 0x5d, 0x00, 0xb5, 0xa4, 0x00, 0x40, 0x89, 0xec, 0xd1, 0xd2, 0x0d, 0x26, 0xb9, 0x30, 0xb2, 0xd2, 0xb8, 0xe8, 0x0e, 0x56, 0xf9, 0x67, 0x94, 0x2e, 0x62, 0xe1, 0x79, 0x48, 0x2b, 0xa9, 0xfa, 0xea, 0xdb, 0x28,
+ /* (2^335)P */ 0x35, 0xf1, 0xb0, 0x43, 0xbd, 0x27, 0xef, 0x18, 0x44, 0xa2, 0x04, 0xb4, 0x69, 0xa1, 0x97, 0x1f, 0x8c, 0x04, 0x82, 0x9b, 0x00, 0x6d, 0xf8, 0xbf, 0x7d, 0xc1, 0x5b, 0xab, 0xe8, 0xb2, 0x34, 0xbd, 0xaf, 0x7f, 0xb2, 0x0d, 0xf3, 0xed, 0xfc, 0x5b, 0x50, 0xee, 0xe7, 0x4a, 0x20, 0xd9, 0xf5, 0xc6, 0x9a, 0x97, 0x6d, 0x07, 0x2f, 0xb9, 0x31, 0x02,
+ /* (2^336)P */ 0xf9, 0x54, 0x4a, 0xc5, 0x61, 0x7e, 0x1d, 0xa6, 0x0e, 0x1a, 0xa8, 0xd3, 0x8c, 0x36, 0x7d, 0xf1, 0x06, 0xb1, 0xac, 0x93, 0xcd, 0xe9, 0x8f, 0x61, 0x6c, 0x5d, 0x03, 0x23, 0xdf, 0x85, 0x53, 0x39, 0x63, 0x5e, 0xeb, 0xf3, 0xd3, 0xd3, 0x75, 0x97, 0x9b, 0x62, 0x9b, 0x01, 0xb3, 0x19, 0xd8, 0x2b, 0x36, 0xf2, 0x2c, 0x2c, 0x6f, 0x36, 0xc6, 0x3c,
+ /* (2^337)P */ 0x05, 0x74, 0x43, 0x10, 0xb6, 0xb0, 0xf8, 0xbf, 0x02, 0x46, 0x9a, 0xee, 0xc1, 0xaf, 0xc1, 0xe5, 0x5a, 0x2e, 0xbb, 0xe1, 0xdc, 0xc6, 0xce, 0x51, 0x29, 0x50, 0xbf, 0x1b, 0xde, 0xff, 0xba, 0x4d, 0x8d, 0x8b, 0x7e, 0xe7, 0xbd, 0x5b, 0x8f, 0xbe, 0xe3, 0x75, 0x71, 0xff, 0x37, 0x05, 0x5a, 0x10, 0xeb, 0x54, 0x7e, 0x44, 0x72, 0x2c, 0xd4, 0xfc,
+ /* (2^338)P */ 0x03, 0x12, 0x1c, 0xb2, 0x08, 0x90, 0xa1, 0x2d, 0x50, 0xa0, 0xad, 0x7f, 0x8d, 0xa6, 0x97, 0xc1, 0xbd, 0xdc, 0xc3, 0xa7, 0xad, 0x31, 0xdf, 0xb8, 0x03, 0x84, 0xc3, 0xb9, 0x29, 0x3d, 0x92, 0x2e, 0xc3, 0x90, 0x07, 0xe8, 0xa7, 0xc7, 0xbc, 0x61, 0xe9, 0x3e, 0xa0, 0x35, 0xda, 0x1d, 0xab, 0x48, 0xfe, 0x50, 0xc9, 0x25, 0x59, 0x23, 0x69, 0x3f,
+ /* (2^339)P */ 0x8e, 0x91, 0xab, 0x6b, 0x91, 0x4f, 0x89, 0x76, 0x67, 0xad, 0xb2, 0x65, 0x9d, 0xad, 0x02, 0x36, 0xdc, 0xac, 0x96, 0x93, 0x97, 0x21, 0x14, 0xd0, 0xe8, 0x11, 0x60, 0x1e, 0xeb, 0x96, 0x06, 0xf2, 0x53, 0xf2, 0x6d, 0xb7, 0x93, 0x6f, 0x26, 0x91, 0x23, 0xe3, 0x34, 0x04, 0x92, 0x91, 0x37, 0x08, 0x50, 0xd6, 0x28, 0x09, 0x27, 0xa1, 0x0c, 0x00,
+ /* (2^340)P */ 0x1f, 0xbb, 0x21, 0x26, 0x33, 0xcb, 0xa4, 0xd1, 0xee, 0x85, 0xf9, 0xd9, 0x3c, 0x90, 0xc3, 0xd1, 0x26, 0xa2, 0x25, 0x93, 0x43, 0x61, 0xed, 0x91, 0x6e, 0x54, 0x03, 0x2e, 0x42, 0x9d, 0xf7, 0xa6, 0x02, 0x0f, 0x2f, 0x9c, 0x7a, 0x8d, 0x12, 0xc2, 0x18, 0xfc, 0x41, 0xff, 0x85, 0x26, 0x1a, 0x44, 0x55, 0x0b, 0x89, 0xab, 0x6f, 0x62, 0x33, 0x8c,
+ /* (2^341)P */ 0xe0, 0x3c, 0x5d, 0x70, 0x64, 0x87, 0x81, 0x35, 0xf2, 0x37, 0xa6, 0x24, 0x3e, 0xe0, 0x62, 0xd5, 0x71, 0xe7, 0x93, 0xfb, 0xac, 0xc3, 0xe7, 0xc7, 0x04, 0xe2, 0x70, 0xd3, 0x29, 0x5b, 0x21, 0xbf, 0xf4, 0x26, 0x5d, 0xf3, 0x95, 0xb4, 0x2a, 0x6a, 0x07, 0x55, 0xa6, 0x4b, 0x3b, 0x15, 0xf2, 0x25, 0x8a, 0x95, 0x3f, 0x63, 0x2f, 0x7a, 0x23, 0x96,
+ /* (2^342)P */ 0x0d, 0x3d, 0xd9, 0x13, 0xa7, 0xb3, 0x5e, 0x67, 0xf7, 0x02, 0x23, 0xee, 0x84, 0xff, 0x99, 0xda, 0xb9, 0x53, 0xf8, 0xf0, 0x0e, 0x39, 0x2f, 0x3c, 0x64, 0x34, 0xe3, 0x09, 0xfd, 0x2b, 0x33, 0xc7, 0xfe, 0x62, 0x2b, 0x84, 0xdf, 0x2b, 0xd2, 0x7c, 0x26, 0x01, 0x70, 0x66, 0x5b, 0x85, 0xc2, 0xbe, 0x88, 0x37, 0xf1, 0x30, 0xac, 0xb8, 0x76, 0xa3,
+ /* (2^343)P */ 0x6e, 0x01, 0xf0, 0x55, 0x35, 0xe4, 0xbd, 0x43, 0x62, 0x9d, 0xd6, 0x11, 0xef, 0x6f, 0xb8, 0x8c, 0xaa, 0x98, 0x87, 0xc6, 0x6d, 0xc4, 0xcc, 0x74, 0x92, 0x53, 0x4a, 0xdf, 0xe4, 0x08, 0x89, 0x17, 0xd0, 0x0f, 0xf4, 0x00, 0x60, 0x78, 0x08, 0x44, 0xb5, 0xda, 0x18, 0xed, 0x98, 0xc8, 0x61, 0x3d, 0x39, 0xdb, 0xcf, 0x1d, 0x49, 0x40, 0x65, 0x75,
+ /* (2^344)P */ 0x8e, 0x10, 0xae, 0x5f, 0x06, 0xd2, 0x95, 0xfd, 0x20, 0x16, 0x49, 0x5b, 0x57, 0xbe, 0x22, 0x8b, 0x43, 0xfb, 0xe6, 0xcc, 0x26, 0xa5, 0x5d, 0xd3, 0x68, 0xc5, 0xf9, 0x5a, 0x86, 0x24, 0x87, 0x27, 0x05, 0xfd, 0xe2, 0xff, 0xb3, 0xa3, 0x7b, 0x37, 0x59, 0xc5, 0x4e, 0x14, 0x94, 0xf9, 0x3b, 0xcb, 0x7c, 0xed, 0xca, 0x1d, 0xb2, 0xac, 0x05, 0x4a,
+ /* (2^345)P */ 0xf4, 0xd1, 0x81, 0xeb, 0x89, 0xbf, 0xfe, 0x1e, 0x41, 0x92, 0x29, 0xee, 0xe1, 0x43, 0xf5, 0x86, 0x1d, 0x2f, 0xbb, 0x1e, 0x84, 0x5d, 0x7b, 0x8d, 0xd5, 0xda, 0xee, 0x1e, 0x8a, 0xd0, 0x27, 0xf2, 0x60, 0x51, 0x59, 0x82, 0xf4, 0x84, 0x2b, 0x5b, 0x14, 0x2d, 0x81, 0x82, 0x3e, 0x2b, 0xb4, 0x6d, 0x51, 0x4f, 0xc5, 0xcb, 0xbf, 0x74, 0xe3, 0xb4,
+ /* (2^346)P */ 0x19, 0x2f, 0x22, 0xb3, 0x04, 0x5f, 0x81, 0xca, 0x05, 0x60, 0xb9, 0xaa, 0xee, 0x0e, 0x2f, 0x48, 0x38, 0xf9, 0x91, 0xb4, 0x66, 0xe4, 0x57, 0x28, 0x54, 0x10, 0xe9, 0x61, 0x9d, 0xd4, 0x90, 0x75, 0xb1, 0x39, 0x23, 0xb6, 0xfc, 0x82, 0xe0, 0xfa, 0xbb, 0x5c, 0x6e, 0xc3, 0x44, 0x13, 0x00, 0x83, 0x55, 0x9e, 0x8e, 0x10, 0x61, 0x81, 0x91, 0x04,
+ /* (2^347)P */ 0x5f, 0x2a, 0xd7, 0x81, 0xd9, 0x9c, 0xbb, 0x79, 0xbc, 0x62, 0x56, 0x98, 0x03, 0x5a, 0x18, 0x85, 0x2a, 0x9c, 0xd0, 0xfb, 0xd2, 0xb1, 0xaf, 0xef, 0x0d, 0x24, 0xc5, 0xfa, 0x39, 0xbb, 0x6b, 0xed, 0xa4, 0xdf, 0xe4, 0x87, 0xcd, 0x41, 0xd3, 0x72, 0x32, 0xc6, 0x28, 0x21, 0xb1, 0xba, 0x8b, 0xa3, 0x91, 0x79, 0x76, 0x22, 0x25, 0x10, 0x61, 0xd1,
+ /* (2^348)P */ 0x73, 0xb5, 0x32, 0x97, 0xdd, 0xeb, 0xdd, 0x22, 0x22, 0xf1, 0x33, 0x3c, 0x77, 0x56, 0x7d, 0x6b, 0x48, 0x2b, 0x05, 0x81, 0x03, 0x03, 0x91, 0x9a, 0xe3, 0x5e, 0xd4, 0xee, 0x3f, 0xf8, 0xbb, 0x50, 0x21, 0x32, 0x4c, 0x4a, 0x58, 0x49, 0xde, 0x0c, 0xde, 0x30, 0x82, 0x3d, 0x92, 0xf0, 0x6c, 0xcc, 0x32, 0x3e, 0xd2, 0x78, 0x8a, 0x6e, 0x2c, 0xd0,
+ /* (2^349)P */ 0xf0, 0xf7, 0xa1, 0x0b, 0xc1, 0x74, 0x85, 0xa8, 0xe9, 0xdd, 0x48, 0xa1, 0xc0, 0x16, 0xd8, 0x2b, 0x61, 0x08, 0xc2, 0x2b, 0x30, 0x26, 0x79, 0xce, 0x9e, 0xfd, 0x39, 0xd7, 0x81, 0xa4, 0x63, 0x8c, 0xd5, 0x74, 0xa0, 0x88, 0xfa, 0x03, 0x30, 0xe9, 0x7f, 0x2b, 0xc6, 0x02, 0xc9, 0x5e, 0xe4, 0xd5, 0x4d, 0x92, 0xd0, 0xf6, 0xf2, 0x5b, 0x79, 0x08,
+ /* (2^350)P */ 0x34, 0x89, 0x81, 0x43, 0xd1, 0x94, 0x2c, 0x10, 0x54, 0x9b, 0xa0, 0xe5, 0x44, 0xe8, 0xc2, 0x2f, 0x3e, 0x0e, 0x74, 0xae, 0xba, 0xe2, 0xac, 0x85, 0x6b, 0xd3, 0x5c, 0x97, 0xf7, 0x90, 0xf1, 0x12, 0xc0, 0x03, 0xc8, 0x1f, 0x37, 0x72, 0x8c, 0x9b, 0x9c, 0x17, 0x96, 0x9d, 0xc7, 0xbf, 0xa3, 0x3f, 0x44, 0x3d, 0x87, 0x81, 0xbd, 0x81, 0xa6, 0x5f,
+ /* (2^351)P */ 0xe4, 0xff, 0x78, 0x62, 0x82, 0x5b, 0x76, 0x58, 0xf5, 0x5b, 0xa6, 0xc4, 0x53, 0x11, 0x3b, 0x7b, 0xaa, 0x67, 0xf8, 0xea, 0x3b, 0x5d, 0x9a, 0x2e, 0x04, 0xeb, 0x4a, 0x24, 0xfb, 0x56, 0xf0, 0xa8, 0xd4, 0x14, 0xed, 0x0f, 0xfd, 0xc5, 0x26, 0x17, 0x2a, 0xf0, 0xb9, 0x13, 0x8c, 0xbd, 0x65, 0x14, 0x24, 0x95, 0x27, 0x12, 0x63, 0x2a, 0x09, 0x18,
+ /* (2^352)P */ 0xe1, 0x5c, 0xe7, 0xe0, 0x00, 0x6a, 0x96, 0xf2, 0x49, 0x6a, 0x39, 0xa5, 0xe0, 0x17, 0x79, 0x4a, 0x63, 0x07, 0x62, 0x09, 0x61, 0x1b, 0x6e, 0xa9, 0xb5, 0x62, 0xb7, 0xde, 0xdf, 0x80, 0x4c, 0x5a, 0x99, 0x73, 0x59, 0x9d, 0xfb, 0xb1, 0x5e, 0xbe, 0xb8, 0xb7, 0x63, 0x93, 0xe8, 0xad, 0x5e, 0x1f, 0xae, 0x59, 0x1c, 0xcd, 0xb4, 0xc2, 0xb3, 0x8a,
+ /* (2^353)P */ 0x78, 0x53, 0xa1, 0x4c, 0x70, 0x9c, 0x63, 0x7e, 0xb3, 0x12, 0x40, 0x5f, 0xbb, 0x23, 0xa7, 0xf7, 0x77, 0x96, 0x5b, 0x4d, 0x91, 0x10, 0x52, 0x85, 0x9e, 0xa5, 0x38, 0x0b, 0xfd, 0x25, 0x01, 0x4b, 0xfa, 0x4d, 0xd3, 0x3f, 0x78, 0x74, 0x42, 0xff, 0x62, 0x2d, 0x27, 0xdc, 0x9d, 0xd1, 0x29, 0x76, 0x2e, 0x78, 0xb3, 0x35, 0xfa, 0x15, 0xd5, 0x38,
+ /* (2^354)P */ 0x8b, 0xc7, 0x43, 0xce, 0xf0, 0x5e, 0xf1, 0x0d, 0x02, 0x38, 0xe8, 0x82, 0xc9, 0x25, 0xad, 0x2d, 0x27, 0xa4, 0x54, 0x18, 0xb2, 0x30, 0x73, 0xa4, 0x41, 0x08, 0xe4, 0x86, 0xe6, 0x8c, 0xe9, 0x2a, 0x34, 0xb3, 0xd6, 0x61, 0x8f, 0x66, 0x26, 0x08, 0xb6, 0x06, 0x33, 0xaa, 0x12, 0xac, 0x72, 0xec, 0x2e, 0x52, 0xa3, 0x25, 0x3e, 0xd7, 0x62, 0xe8,
+ /* (2^355)P */ 0xc4, 0xbb, 0x89, 0xc8, 0x40, 0xcc, 0x84, 0xec, 0x4a, 0xd9, 0xc4, 0x55, 0x78, 0x00, 0xcf, 0xd8, 0xe9, 0x24, 0x59, 0xdc, 0x5e, 0xf0, 0x66, 0xa1, 0x83, 0xae, 0x97, 0x18, 0xc5, 0x54, 0x27, 0xa2, 0x21, 0x52, 0x03, 0x31, 0x5b, 0x11, 0x67, 0xf6, 0x12, 0x00, 0x87, 0x2f, 0xff, 0x59, 0x70, 0x8f, 0x6d, 0x71, 0xab, 0xab, 0x24, 0xb8, 0xba, 0x35,
+ /* (2^356)P */ 0x69, 0x43, 0xa7, 0x14, 0x06, 0x96, 0xe9, 0xc2, 0xe3, 0x2b, 0x45, 0x22, 0xc0, 0xd0, 0x2f, 0x34, 0xd1, 0x01, 0x99, 0xfc, 0x99, 0x38, 0xa1, 0x25, 0x2e, 0x59, 0x6c, 0x27, 0xc9, 0xeb, 0x7b, 0xdc, 0x4e, 0x26, 0x68, 0xba, 0xfa, 0xec, 0x02, 0x05, 0x64, 0x80, 0x30, 0x20, 0x5c, 0x26, 0x7f, 0xaf, 0x95, 0x17, 0x3d, 0x5c, 0x9e, 0x96, 0x96, 0xaf,
+ /* (2^357)P */ 0xa6, 0xba, 0x21, 0x29, 0x32, 0xe2, 0x98, 0xde, 0x9b, 0x6d, 0x0b, 0x44, 0x91, 0xa8, 0x3e, 0xd4, 0xb8, 0x04, 0x6c, 0xf6, 0x04, 0x39, 0xbd, 0x52, 0x05, 0x15, 0x27, 0x78, 0x8e, 0x55, 0xac, 0x79, 0xc5, 0xe6, 0x00, 0x7f, 0x90, 0xa2, 0xdd, 0x07, 0x13, 0xe0, 0x24, 0x70, 0x5c, 0x0f, 0x4d, 0xa9, 0xf9, 0xae, 0xcb, 0x34, 0x10, 0x9d, 0x89, 0x9d,
+ /* (2^358)P */ 0x12, 0xe0, 0xb3, 0x9f, 0xc4, 0x96, 0x1d, 0xcf, 0xed, 0x99, 0x64, 0x28, 0x8d, 0xc7, 0x31, 0x82, 0xee, 0x5e, 0x75, 0x48, 0xff, 0x3a, 0xf2, 0x09, 0x34, 0x03, 0x93, 0x52, 0x19, 0xb2, 0xc5, 0x81, 0x93, 0x45, 0x5e, 0x59, 0x21, 0x2b, 0xec, 0x89, 0xba, 0x36, 0x6e, 0xf9, 0x82, 0x75, 0x7e, 0x82, 0x3f, 0xaa, 0xe2, 0xe3, 0x3b, 0x94, 0xfd, 0x98,
+ /* (2^359)P */ 0x7c, 0xdb, 0x75, 0x31, 0x61, 0xfb, 0x15, 0x28, 0x94, 0xd7, 0xc3, 0x5a, 0xa9, 0xa1, 0x0a, 0x66, 0x0f, 0x2b, 0x13, 0x3e, 0x42, 0xb5, 0x28, 0x3a, 0xca, 0x83, 0xf3, 0x61, 0x22, 0xf4, 0x40, 0xc5, 0xdf, 0xe7, 0x31, 0x9f, 0x7e, 0x51, 0x75, 0x06, 0x9d, 0x51, 0xc8, 0xe7, 0x9f, 0xc3, 0x71, 0x4f, 0x3d, 0x5b, 0xfb, 0xe9, 0x8e, 0x08, 0x40, 0x8e,
+ /* (2^360)P */ 0xf7, 0x31, 0xad, 0x50, 0x5d, 0x25, 0x93, 0x73, 0x68, 0xf6, 0x7c, 0x89, 0x5a, 0x3d, 0x9f, 0x9b, 0x05, 0x82, 0xe7, 0x70, 0x4b, 0x19, 0xaa, 0xcf, 0xff, 0xde, 0x50, 0x8f, 0x2f, 0x69, 0xd3, 0xf0, 0x99, 0x51, 0x6b, 0x9d, 0xb6, 0x56, 0x6f, 0xf8, 0x4c, 0x74, 0x8b, 0x4c, 0x91, 0xf9, 0xa9, 0xb1, 0x3e, 0x07, 0xdf, 0x0b, 0x27, 0x8a, 0xb1, 0xed,
+ /* (2^361)P */ 0xfb, 0x67, 0xd9, 0x48, 0xd2, 0xe4, 0x44, 0x9b, 0x43, 0x15, 0x8a, 0xeb, 0x00, 0x53, 0xad, 0x25, 0xc7, 0x7e, 0x19, 0x30, 0x87, 0xb7, 0xd5, 0x5f, 0x04, 0xf8, 0xaa, 0xdd, 0x57, 0xae, 0x34, 0x75, 0xe2, 0x84, 0x4b, 0x54, 0x60, 0x37, 0x95, 0xe4, 0xd3, 0xec, 0xac, 0xef, 0x47, 0x31, 0xa3, 0xc8, 0x31, 0x22, 0xdb, 0x26, 0xe7, 0x6a, 0xb5, 0xad,
+ /* (2^362)P */ 0x44, 0x09, 0x5c, 0x95, 0xe4, 0x72, 0x3c, 0x1a, 0xd1, 0xac, 0x42, 0x51, 0x99, 0x6f, 0xfa, 0x1f, 0xf2, 0x22, 0xbe, 0xff, 0x7b, 0x66, 0xf5, 0x6c, 0xb3, 0x66, 0xc7, 0x4d, 0x78, 0x31, 0x83, 0x80, 0xf5, 0x41, 0xe9, 0x7f, 0xbe, 0xf7, 0x23, 0x49, 0x6b, 0x84, 0x4e, 0x7e, 0x47, 0x07, 0x6e, 0x74, 0xdf, 0xe5, 0x9d, 0x9e, 0x56, 0x2a, 0xc0, 0xbc,
+ /* (2^363)P */ 0xac, 0x10, 0x80, 0x8c, 0x7c, 0xfa, 0x83, 0xdf, 0xb3, 0xd0, 0xc4, 0xbe, 0xfb, 0x9f, 0xac, 0xc9, 0xc3, 0x40, 0x95, 0x0b, 0x09, 0x23, 0xda, 0x63, 0x67, 0xcf, 0xe7, 0x9f, 0x7d, 0x7b, 0x6b, 0xe2, 0xe6, 0x6d, 0xdb, 0x87, 0x9e, 0xa6, 0xff, 0x6d, 0xab, 0xbd, 0xfb, 0x54, 0x84, 0x68, 0xcf, 0x89, 0xf1, 0xd0, 0xe2, 0x85, 0x61, 0xdc, 0x22, 0xd1,
+ /* (2^364)P */ 0xa8, 0x48, 0xfb, 0x8c, 0x6a, 0x63, 0x01, 0x72, 0x43, 0x43, 0xeb, 0x21, 0xa3, 0x00, 0x8a, 0xc0, 0x87, 0x51, 0x9e, 0x86, 0x75, 0x16, 0x79, 0xf9, 0x6b, 0x11, 0x80, 0x62, 0xc2, 0x9d, 0xb8, 0x8c, 0x30, 0x8e, 0x8d, 0x03, 0x52, 0x7e, 0x31, 0x59, 0x38, 0xf9, 0x25, 0xc7, 0x0f, 0xc7, 0xa8, 0x2b, 0x5c, 0x80, 0xfa, 0x90, 0xa2, 0x63, 0xca, 0xe7,
+ /* (2^365)P */ 0xf1, 0x5d, 0xb5, 0xd9, 0x20, 0x10, 0x7d, 0x0f, 0xc5, 0x50, 0x46, 0x07, 0xff, 0x02, 0x75, 0x2b, 0x4a, 0xf3, 0x39, 0x91, 0x72, 0xb7, 0xd5, 0xcc, 0x38, 0xb8, 0xe7, 0x36, 0x26, 0x5e, 0x11, 0x97, 0x25, 0xfb, 0x49, 0x68, 0xdc, 0xb4, 0x46, 0x87, 0x5c, 0xc2, 0x7f, 0xaa, 0x7d, 0x36, 0x23, 0xa6, 0xc6, 0x53, 0xec, 0xbc, 0x57, 0x47, 0xc1, 0x2b,
+ /* (2^366)P */ 0x25, 0x5d, 0x7d, 0x95, 0xda, 0x0b, 0x8f, 0x78, 0x1e, 0x19, 0x09, 0xfa, 0x67, 0xe0, 0xa0, 0x17, 0x24, 0x76, 0x6c, 0x30, 0x1f, 0x62, 0x3d, 0xbe, 0x45, 0x70, 0xcc, 0xb6, 0x1e, 0x68, 0x06, 0x25, 0x68, 0x16, 0x1a, 0x33, 0x3f, 0x90, 0xc7, 0x78, 0x2d, 0x98, 0x3c, 0x2f, 0xb9, 0x2d, 0x94, 0x0b, 0xfb, 0x49, 0x56, 0x30, 0xd7, 0xc1, 0xe6, 0x48,
+ /* (2^367)P */ 0x7a, 0xd1, 0xe0, 0x8e, 0x67, 0xfc, 0x0b, 0x50, 0x1f, 0x84, 0x98, 0xfa, 0xaf, 0xae, 0x2e, 0x31, 0x27, 0xcf, 0x3f, 0xf2, 0x6e, 0x8d, 0x81, 0x8f, 0xd2, 0x5f, 0xde, 0xd3, 0x5e, 0xe9, 0xe7, 0x13, 0x48, 0x83, 0x5a, 0x4e, 0x84, 0xd1, 0x58, 0xcf, 0x6b, 0x84, 0xdf, 0x13, 0x1d, 0x91, 0x85, 0xe8, 0xcb, 0x29, 0x79, 0xd2, 0xca, 0xac, 0x6a, 0x93,
+ /* (2^368)P */ 0x53, 0x82, 0xce, 0x61, 0x96, 0x88, 0x6f, 0xe1, 0x4a, 0x4c, 0x1e, 0x30, 0x73, 0xe8, 0x74, 0xde, 0x40, 0x2b, 0xe0, 0xc4, 0xb5, 0xd8, 0x7c, 0x15, 0xe7, 0xe1, 0xb1, 0xe0, 0xd6, 0x88, 0xb1, 0x6a, 0x57, 0x19, 0x6a, 0x22, 0x66, 0x57, 0xf6, 0x8d, 0xfd, 0xc0, 0xf2, 0xa3, 0x03, 0x56, 0xfb, 0x2e, 0x75, 0x5e, 0xc7, 0x8e, 0x22, 0x96, 0x5c, 0x06,
+ /* (2^369)P */ 0x98, 0x7e, 0xbf, 0x3e, 0xbf, 0x24, 0x9d, 0x15, 0xd3, 0xf6, 0xd3, 0xd2, 0xf0, 0x11, 0xf2, 0xdb, 0x36, 0x23, 0x38, 0xf7, 0x1d, 0x71, 0x20, 0xd2, 0x54, 0x7f, 0x1e, 0x24, 0x8f, 0xe2, 0xaa, 0xf7, 0x3f, 0x6b, 0x41, 0x4e, 0xdc, 0x0e, 0xec, 0xe8, 0x35, 0x0a, 0x08, 0x6d, 0x89, 0x5b, 0x32, 0x91, 0x01, 0xb6, 0xe0, 0x2c, 0xc6, 0xa1, 0xbe, 0xb4,
+ /* (2^370)P */ 0x29, 0xf2, 0x1e, 0x1c, 0xdc, 0x68, 0x8a, 0x43, 0x87, 0x2c, 0x48, 0xb3, 0x9e, 0xed, 0xd2, 0x82, 0x46, 0xac, 0x2f, 0xef, 0x93, 0x34, 0x37, 0xca, 0x64, 0x8d, 0xc9, 0x06, 0x90, 0xbb, 0x78, 0x0a, 0x3c, 0x4c, 0xcf, 0x35, 0x7a, 0x0f, 0xf7, 0xa7, 0xf4, 0x2f, 0x45, 0x69, 0x3f, 0xa9, 0x5d, 0xce, 0x7b, 0x8a, 0x84, 0xc3, 0xae, 0xf4, 0xda, 0xd5,
+ /* (2^371)P */ 0xca, 0xba, 0x95, 0x43, 0x05, 0x7b, 0x06, 0xd9, 0x5c, 0x0a, 0x18, 0x5f, 0x6a, 0x6a, 0xce, 0xc0, 0x3d, 0x95, 0x51, 0x0e, 0x1a, 0xbe, 0x85, 0x7a, 0xf2, 0x69, 0xec, 0xc0, 0x8c, 0xca, 0xa3, 0x32, 0x0a, 0x76, 0x50, 0xc6, 0x76, 0x61, 0x00, 0x89, 0xbf, 0x6e, 0x0f, 0x48, 0x90, 0x31, 0x93, 0xec, 0x34, 0x70, 0xf0, 0xc3, 0x8d, 0xf0, 0x0f, 0xb5,
+ /* (2^372)P */ 0xbe, 0x23, 0xe2, 0x18, 0x99, 0xf1, 0xed, 0x8a, 0xf6, 0xc9, 0xac, 0xb8, 0x1e, 0x9a, 0x3c, 0x15, 0xae, 0xd7, 0x6d, 0xb3, 0x04, 0xee, 0x5b, 0x0d, 0x1e, 0x79, 0xb7, 0xf9, 0xf9, 0x8d, 0xad, 0xf9, 0x8f, 0x5a, 0x6a, 0x7b, 0xd7, 0x9b, 0xca, 0x62, 0xfe, 0x9c, 0xc0, 0x6f, 0x6d, 0x9d, 0x76, 0xa3, 0x69, 0xb9, 0x4c, 0xa1, 0xc4, 0x0c, 0x76, 0xaa,
+ /* (2^373)P */ 0x1c, 0x06, 0xfe, 0x3f, 0x45, 0x70, 0xcd, 0x97, 0xa9, 0xa2, 0xb1, 0xd3, 0xf2, 0xa5, 0x0c, 0x49, 0x2c, 0x75, 0x73, 0x1f, 0xcf, 0x00, 0xaf, 0xd5, 0x2e, 0xde, 0x0d, 0x8f, 0x8f, 0x7c, 0xc4, 0x58, 0xce, 0xd4, 0xf6, 0x24, 0x19, 0x2e, 0xd8, 0xc5, 0x1d, 0x1a, 0x3f, 0xb8, 0x4f, 0xbc, 0x7d, 0xbd, 0x68, 0xe3, 0x81, 0x98, 0x1b, 0xa8, 0xc9, 0xd9,
+ /* (2^374)P */ 0x39, 0x95, 0x78, 0x24, 0x6c, 0x38, 0xe4, 0xe7, 0xd0, 0x8d, 0xb9, 0x38, 0x71, 0x5e, 0xc1, 0x62, 0x80, 0xcc, 0xcb, 0x8c, 0x97, 0xca, 0xf8, 0xb9, 0xd9, 0x9c, 0xce, 0x72, 0x7b, 0x70, 0xee, 0x5f, 0xea, 0xa2, 0xdf, 0xa9, 0x14, 0x10, 0xf9, 0x6e, 0x59, 0x9f, 0x9c, 0xe0, 0x0c, 0xb2, 0x07, 0x97, 0xcd, 0xd2, 0x89, 0x16, 0xfd, 0x9c, 0xa8, 0xa5,
+ /* (2^375)P */ 0x5a, 0x61, 0xf1, 0x59, 0x7c, 0x38, 0xda, 0xe2, 0x85, 0x99, 0x68, 0xe9, 0xc9, 0xf7, 0x32, 0x7e, 0xc4, 0xca, 0xb7, 0x11, 0x08, 0x69, 0x2b, 0x66, 0x02, 0xf7, 0x2e, 0x18, 0xc3, 0x8e, 0xe1, 0xf9, 0xc5, 0x19, 0x9a, 0x0a, 0x9c, 0x07, 0xba, 0xc7, 0x9c, 0x03, 0x34, 0x89, 0x99, 0x67, 0x0b, 0x16, 0x4b, 0x07, 0x36, 0x16, 0x36, 0x2c, 0xe2, 0xa1,
+ /* (2^376)P */ 0x70, 0x10, 0x91, 0x27, 0xa8, 0x24, 0x8e, 0x29, 0x04, 0x6f, 0x79, 0x1f, 0xd3, 0xa5, 0x68, 0xd3, 0x0b, 0x7d, 0x56, 0x4d, 0x14, 0x57, 0x7b, 0x2e, 0x00, 0x9f, 0x9a, 0xfd, 0x6c, 0x63, 0x18, 0x81, 0xdb, 0x9d, 0xb7, 0xd7, 0xa4, 0x1e, 0xe8, 0x40, 0xf1, 0x4c, 0xa3, 0x01, 0xd5, 0x4b, 0x75, 0xea, 0xdd, 0x97, 0xfd, 0x5b, 0xb2, 0x66, 0x6a, 0x24,
+ /* (2^377)P */ 0x72, 0x11, 0xfe, 0x73, 0x1b, 0xd3, 0xea, 0x7f, 0x93, 0x15, 0x15, 0x05, 0xfe, 0x40, 0xe8, 0x28, 0xd8, 0x50, 0x47, 0x66, 0xfa, 0xb7, 0xb5, 0x04, 0xba, 0x35, 0x1e, 0x32, 0x9f, 0x5f, 0x32, 0xba, 0x3d, 0xd1, 0xed, 0x9a, 0x76, 0xca, 0xa3, 0x3e, 0x77, 0xd8, 0xd8, 0x7c, 0x5f, 0x68, 0x42, 0xb5, 0x86, 0x7f, 0x3b, 0xc9, 0xc1, 0x89, 0x64, 0xda,
+ /* (2^378)P */ 0xd5, 0xd4, 0x17, 0x31, 0xfc, 0x6a, 0xfd, 0xb8, 0xe8, 0xe5, 0x3e, 0x39, 0x06, 0xe4, 0xd1, 0x90, 0x2a, 0xca, 0xf6, 0x54, 0x6c, 0x1b, 0x2f, 0x49, 0x97, 0xb1, 0x2a, 0x82, 0x43, 0x3d, 0x1f, 0x8b, 0xe2, 0x47, 0xc5, 0x24, 0xa8, 0xd5, 0x53, 0x29, 0x7d, 0xc6, 0x87, 0xa6, 0x25, 0x3a, 0x64, 0xdd, 0x71, 0x08, 0x9e, 0xcd, 0xe9, 0x45, 0xc7, 0xba,
+ /* (2^379)P */ 0x37, 0x72, 0x6d, 0x13, 0x7a, 0x8d, 0x04, 0x31, 0xe6, 0xe3, 0x9e, 0x36, 0x71, 0x3e, 0xc0, 0x1e, 0xe3, 0x71, 0xd3, 0x49, 0x4e, 0x4a, 0x36, 0x42, 0x68, 0x68, 0x61, 0xc7, 0x3c, 0xdb, 0x81, 0x49, 0xf7, 0x91, 0x4d, 0xea, 0x4c, 0x4f, 0x98, 0xc6, 0x7e, 0x60, 0x84, 0x4b, 0x6a, 0x37, 0xbb, 0x52, 0xf7, 0xce, 0x02, 0xe4, 0xad, 0xd1, 0x3c, 0xa7,
+ /* (2^380)P */ 0x51, 0x06, 0x2d, 0xf8, 0x08, 0xe8, 0xf1, 0x0c, 0xe5, 0xa9, 0xac, 0x29, 0x73, 0x3b, 0xed, 0x98, 0x5f, 0x55, 0x08, 0x38, 0x51, 0x44, 0x36, 0x5d, 0xea, 0xc3, 0xb8, 0x0e, 0xa0, 0x4f, 0xd2, 0x79, 0xe9, 0x98, 0xc3, 0xf5, 0x00, 0xb9, 0x26, 0x27, 0x42, 0xa8, 0x07, 0xc1, 0x12, 0x31, 0xc1, 0xc3, 0x3c, 0x3b, 0x7a, 0x72, 0x97, 0xc2, 0x70, 0x3a,
+ /* (2^381)P */ 0xf4, 0xb2, 0xba, 0x32, 0xbc, 0xa9, 0x2f, 0x87, 0xc7, 0x3c, 0x45, 0xcd, 0xae, 0xe2, 0x13, 0x6d, 0x3a, 0xf2, 0xf5, 0x66, 0x97, 0x29, 0xaf, 0x53, 0x9f, 0xda, 0xea, 0x14, 0xdf, 0x04, 0x98, 0x19, 0x95, 0x9e, 0x2a, 0x00, 0x5c, 0x9d, 0x1d, 0xf0, 0x39, 0x23, 0xff, 0xfc, 0xca, 0x36, 0xb7, 0xde, 0xdf, 0x37, 0x78, 0x52, 0x21, 0xfa, 0x19, 0x10,
+ /* (2^382)P */ 0x50, 0x20, 0x73, 0x74, 0x62, 0x21, 0xf2, 0xf7, 0x9b, 0x66, 0x85, 0x34, 0x74, 0xd4, 0x9d, 0x60, 0xd7, 0xbc, 0xc8, 0x46, 0x3b, 0xb8, 0x80, 0x42, 0x15, 0x0a, 0x6c, 0x35, 0x1a, 0x69, 0xf0, 0x1d, 0x4b, 0x29, 0x54, 0x5a, 0x9a, 0x48, 0xec, 0x9f, 0x37, 0x74, 0x91, 0xd0, 0xd1, 0x9e, 0x00, 0xc2, 0x76, 0x56, 0xd6, 0xa0, 0x15, 0x14, 0x83, 0x59,
+ /* (2^383)P */ 0xc2, 0xf8, 0x22, 0x20, 0x23, 0x07, 0xbd, 0x1d, 0x6f, 0x1e, 0x8c, 0x56, 0x06, 0x6a, 0x4b, 0x9f, 0xe2, 0xa9, 0x92, 0x46, 0x4b, 0x46, 0x59, 0xd7, 0xe1, 0xda, 0x14, 0x98, 0x07, 0x65, 0x7e, 0x28, 0x20, 0xf2, 0x9d, 0x4f, 0x36, 0x5c, 0x92, 0xe0, 0x9d, 0xfe, 0x3e, 0xda, 0xe4, 0x47, 0x19, 0x3c, 0x00, 0x7f, 0x22, 0xf2, 0x9e, 0x51, 0xae, 0x4d,
+ /* (2^384)P */ 0xbe, 0x8c, 0x1b, 0x10, 0xb6, 0xad, 0xcc, 0xcc, 0xd8, 0x5e, 0x21, 0xa6, 0xfb, 0xf1, 0xf6, 0xbd, 0x0a, 0x24, 0x67, 0xb4, 0x57, 0x7a, 0xbc, 0xe8, 0xe9, 0xff, 0xee, 0x0a, 0x1f, 0xee, 0xbd, 0xc8, 0x44, 0xed, 0x2b, 0xbb, 0x55, 0x1f, 0xdd, 0x7c, 0xb3, 0xeb, 0x3f, 0x63, 0xa1, 0x28, 0x91, 0x21, 0xab, 0x71, 0xc6, 0x4c, 0xd0, 0xe9, 0xb0, 0x21,
+ /* (2^385)P */ 0xad, 0xc9, 0x77, 0x2b, 0xee, 0x89, 0xa4, 0x7b, 0xfd, 0xf9, 0xf6, 0x14, 0xe4, 0xed, 0x1a, 0x16, 0x9b, 0x78, 0x41, 0x43, 0xa8, 0x83, 0x72, 0x06, 0x2e, 0x7c, 0xdf, 0xeb, 0x7e, 0xdd, 0xd7, 0x8b, 0xea, 0x9a, 0x2b, 0x03, 0xba, 0x57, 0xf3, 0xf1, 0xd9, 0xe5, 0x09, 0xc5, 0x98, 0x61, 0x1c, 0x51, 0x6d, 0x5d, 0x6e, 0xfb, 0x5e, 0x95, 0x9f, 0xb5,
+ /* (2^386)P */ 0x23, 0xe2, 0x1e, 0x95, 0xa3, 0x5e, 0x42, 0x10, 0xc7, 0xc3, 0x70, 0xbf, 0x4b, 0x6b, 0x83, 0x36, 0x93, 0xb7, 0x68, 0x47, 0x88, 0x3a, 0x10, 0x88, 0x48, 0x7f, 0x8c, 0xae, 0x54, 0x10, 0x02, 0xa4, 0x52, 0x8f, 0x8d, 0xf7, 0x26, 0x4f, 0x50, 0xc3, 0x6a, 0xe2, 0x4e, 0x3b, 0x4c, 0xb9, 0x8a, 0x14, 0x15, 0x6d, 0x21, 0x29, 0xb3, 0x6e, 0x4e, 0xd0,
+ /* (2^387)P */ 0x4c, 0x8a, 0x18, 0x3f, 0xb7, 0x20, 0xfd, 0x3e, 0x54, 0xca, 0x68, 0x3c, 0xea, 0x6f, 0xf4, 0x6b, 0xa2, 0xbd, 0x01, 0xbd, 0xfe, 0x08, 0xa8, 0xd8, 0xc2, 0x20, 0x36, 0x05, 0xcd, 0xe9, 0xf3, 0x9e, 0xfa, 0x85, 0x66, 0x8f, 0x4b, 0x1d, 0x8c, 0x64, 0x4f, 0xb8, 0xc6, 0x0f, 0x5b, 0x57, 0xd8, 0x24, 0x19, 0x5a, 0x14, 0x4b, 0x92, 0xd3, 0x96, 0xbc,
+ /* (2^388)P */ 0xa9, 0x3f, 0xc9, 0x6c, 0xca, 0x64, 0x1e, 0x6f, 0xdf, 0x65, 0x7f, 0x9a, 0x47, 0x6b, 0x8a, 0x60, 0x31, 0xa6, 0x06, 0xac, 0x69, 0x30, 0xe6, 0xea, 0x63, 0x42, 0x26, 0x5f, 0xdb, 0xd0, 0xf2, 0x8e, 0x34, 0x0a, 0x3a, 0xeb, 0xf3, 0x79, 0xc8, 0xb7, 0x60, 0x56, 0x5c, 0x37, 0x95, 0x71, 0xf8, 0x7f, 0x49, 0x3e, 0x9e, 0x01, 0x26, 0x1e, 0x80, 0x9f,
+ /* (2^389)P */ 0xf8, 0x16, 0x9a, 0xaa, 0xb0, 0x28, 0xb5, 0x8e, 0xd0, 0x60, 0xe5, 0x26, 0xa9, 0x47, 0xc4, 0x5c, 0xa9, 0x39, 0xfe, 0x0a, 0xd8, 0x07, 0x2b, 0xb3, 0xce, 0xf1, 0xea, 0x1a, 0xf4, 0x7b, 0x98, 0x31, 0x3d, 0x13, 0x29, 0x80, 0xe8, 0x0d, 0xcf, 0x56, 0x39, 0x86, 0x50, 0x0c, 0xb3, 0x18, 0xf4, 0xc5, 0xca, 0xf2, 0x6f, 0xcd, 0x8d, 0xd5, 0x02, 0xb0,
+ /* (2^390)P */ 0xbf, 0x39, 0x3f, 0xac, 0x6d, 0x1a, 0x6a, 0xe4, 0x42, 0x24, 0xd6, 0x41, 0x9d, 0xb9, 0x5b, 0x46, 0x73, 0x93, 0x76, 0xaa, 0xb7, 0x37, 0x36, 0xa6, 0x09, 0xe5, 0x04, 0x3b, 0x66, 0xc4, 0x29, 0x3e, 0x41, 0xc2, 0xcb, 0xe5, 0x17, 0xd7, 0x34, 0x67, 0x1d, 0x2c, 0x12, 0xec, 0x24, 0x7a, 0x40, 0xa2, 0x45, 0x41, 0xf0, 0x75, 0xed, 0x43, 0x30, 0xc9,
+ /* (2^391)P */ 0x80, 0xf6, 0x47, 0x5b, 0xad, 0x54, 0x02, 0xbc, 0xdd, 0xa4, 0xb2, 0xd7, 0x42, 0x95, 0xf2, 0x0d, 0x1b, 0xef, 0x37, 0xa7, 0xb4, 0x34, 0x04, 0x08, 0x71, 0x1b, 0xd3, 0xdf, 0xa1, 0xf0, 0x2b, 0xfa, 0xc0, 0x1f, 0xf3, 0x44, 0xb5, 0xc6, 0x47, 0x3d, 0x65, 0x67, 0x45, 0x4d, 0x2f, 0xde, 0x52, 0x73, 0xfc, 0x30, 0x01, 0x6b, 0xc1, 0x03, 0xd8, 0xd7,
+ /* (2^392)P */ 0x1c, 0x67, 0x55, 0x3e, 0x01, 0x17, 0x0f, 0x3e, 0xe5, 0x34, 0x58, 0xfc, 0xcb, 0x71, 0x24, 0x74, 0x5d, 0x36, 0x1e, 0x89, 0x2a, 0x63, 0xf8, 0xf8, 0x9f, 0x50, 0x9f, 0x32, 0x92, 0x29, 0xd8, 0x1a, 0xec, 0x76, 0x57, 0x6c, 0x67, 0x12, 0x6a, 0x6e, 0xef, 0x97, 0x1f, 0xc3, 0x77, 0x60, 0x3c, 0x22, 0xcb, 0xc7, 0x04, 0x1a, 0x89, 0x2d, 0x10, 0xa6,
+ /* (2^393)P */ 0x12, 0xf5, 0xa9, 0x26, 0x16, 0xd9, 0x3c, 0x65, 0x5d, 0x83, 0xab, 0xd1, 0x70, 0x6b, 0x1c, 0xdb, 0xe7, 0x86, 0x0d, 0xfb, 0xe7, 0xf8, 0x2a, 0x58, 0x6e, 0x7a, 0x66, 0x13, 0x53, 0x3a, 0x6f, 0x8d, 0x43, 0x5f, 0x14, 0x23, 0x14, 0xff, 0x3d, 0x52, 0x7f, 0xee, 0xbd, 0x7a, 0x34, 0x8b, 0x35, 0x24, 0xc3, 0x7a, 0xdb, 0xcf, 0x22, 0x74, 0x9a, 0x8f,
+ /* (2^394)P */ 0xdb, 0x20, 0xfc, 0xe5, 0x39, 0x4e, 0x7d, 0x78, 0xee, 0x0b, 0xbf, 0x1d, 0x80, 0xd4, 0x05, 0x4f, 0xb9, 0xd7, 0x4e, 0x94, 0x88, 0x9a, 0x50, 0x78, 0x1a, 0x70, 0x8c, 0xcc, 0x25, 0xb6, 0x61, 0x09, 0xdc, 0x7b, 0xea, 0x3f, 0x7f, 0xea, 0x2a, 0x0d, 0x47, 0x1c, 0x8e, 0xa6, 0x5b, 0xd2, 0xa3, 0x61, 0x93, 0x3c, 0x68, 0x9f, 0x8b, 0xea, 0xb0, 0xcb,
+ /* (2^395)P */ 0xff, 0x54, 0x02, 0x19, 0xae, 0x8b, 0x4c, 0x2c, 0x3a, 0xe0, 0xe4, 0xac, 0x87, 0xf7, 0x51, 0x45, 0x41, 0x43, 0xdc, 0xaa, 0xcd, 0xcb, 0xdc, 0x40, 0xe3, 0x44, 0x3b, 0x1d, 0x9e, 0x3d, 0xb9, 0x82, 0xcc, 0x7a, 0xc5, 0x12, 0xf8, 0x1e, 0xdd, 0xdb, 0x8d, 0xb0, 0x2a, 0xe8, 0xe6, 0x6c, 0x94, 0x3b, 0xb7, 0x2d, 0xba, 0x79, 0x3b, 0xb5, 0x86, 0xfb,
+ /* (2^396)P */ 0x82, 0x88, 0x13, 0xdd, 0x6c, 0xcd, 0x85, 0x2b, 0x90, 0x86, 0xb7, 0xac, 0x16, 0xa6, 0x6e, 0x6a, 0x94, 0xd8, 0x1e, 0x4e, 0x41, 0x0f, 0xce, 0x81, 0x6a, 0xa8, 0x26, 0x56, 0x43, 0x52, 0x52, 0xe6, 0xff, 0x88, 0xcf, 0x47, 0x05, 0x1d, 0xff, 0xf3, 0xa0, 0x10, 0xb2, 0x97, 0x87, 0xeb, 0x47, 0xbb, 0xfa, 0x1f, 0xe8, 0x4c, 0xce, 0xc4, 0xcd, 0x93,
+ /* (2^397)P */ 0xf4, 0x11, 0xf5, 0x8d, 0x89, 0x29, 0x79, 0xb3, 0x59, 0x0b, 0x29, 0x7d, 0x9c, 0x12, 0x4a, 0x65, 0x72, 0x3a, 0xf9, 0xec, 0x37, 0x18, 0x86, 0xef, 0x44, 0x07, 0x25, 0x74, 0x76, 0x53, 0xed, 0x51, 0x01, 0xc6, 0x28, 0xc5, 0xc3, 0x4a, 0x0f, 0x99, 0xec, 0xc8, 0x40, 0x5a, 0x83, 0x30, 0x79, 0xa2, 0x3e, 0x63, 0x09, 0x2d, 0x6f, 0x23, 0x54, 0x1c,
+ /* (2^398)P */ 0x5c, 0x6f, 0x3b, 0x1c, 0x30, 0x77, 0x7e, 0x87, 0x66, 0x83, 0x2e, 0x7e, 0x85, 0x50, 0xfd, 0xa0, 0x7a, 0xc2, 0xf5, 0x0f, 0xc1, 0x64, 0xe7, 0x0b, 0xbd, 0x59, 0xa7, 0xe7, 0x65, 0x53, 0xc3, 0xf5, 0x55, 0x5b, 0xe1, 0x82, 0x30, 0x5a, 0x61, 0xcd, 0xa0, 0x89, 0x32, 0xdb, 0x87, 0xfc, 0x21, 0x8a, 0xab, 0x6d, 0x82, 0xa8, 0x42, 0x81, 0x4f, 0xf2,
+ /* (2^399)P */ 0xb3, 0xeb, 0x88, 0x18, 0xf6, 0x56, 0x96, 0xbf, 0xba, 0x5d, 0x71, 0xa1, 0x5a, 0xd1, 0x04, 0x7b, 0xd5, 0x46, 0x01, 0x74, 0xfe, 0x15, 0x25, 0xb7, 0xff, 0x0c, 0x24, 0x47, 0xac, 0xfd, 0xab, 0x47, 0x32, 0xe1, 0x6a, 0x4e, 0xca, 0xcf, 0x7f, 0xdd, 0xf8, 0xd2, 0x4b, 0x3b, 0xf5, 0x17, 0xba, 0xba, 0x8b, 0xa1, 0xec, 0x28, 0x3f, 0x97, 0xab, 0x2a,
+ /* (2^400)P */ 0x51, 0x38, 0xc9, 0x5e, 0xc6, 0xb3, 0x64, 0xf2, 0x24, 0x4d, 0x04, 0x7d, 0xc8, 0x39, 0x0c, 0x4a, 0xc9, 0x73, 0x74, 0x1b, 0x5c, 0xb2, 0xc5, 0x41, 0x62, 0xa0, 0x4c, 0x6d, 0x8d, 0x91, 0x9a, 0x7b, 0x88, 0xab, 0x9c, 0x7e, 0x23, 0xdb, 0x6f, 0xb5, 0x72, 0xd6, 0x47, 0x40, 0xef, 0x22, 0x58, 0x62, 0x19, 0x6c, 0x38, 0xba, 0x5b, 0x00, 0x30, 0x9f,
+ /* (2^401)P */ 0x65, 0xbb, 0x3b, 0x9b, 0xe9, 0xae, 0xbf, 0xbe, 0xe4, 0x13, 0x95, 0xf3, 0xe3, 0x77, 0xcb, 0xe4, 0x9a, 0x22, 0xb5, 0x4a, 0x08, 0x9d, 0xb3, 0x9e, 0x27, 0xe0, 0x15, 0x6c, 0x9f, 0x7e, 0x9a, 0x5e, 0x15, 0x45, 0x25, 0x8d, 0x01, 0x0a, 0xd2, 0x2b, 0xbd, 0x48, 0x06, 0x0d, 0x18, 0x97, 0x4b, 0xdc, 0xbc, 0xf0, 0xcd, 0xb2, 0x52, 0x3c, 0xac, 0xf5,
+ /* (2^402)P */ 0x3e, 0xed, 0x47, 0x6b, 0x5c, 0xf6, 0x76, 0xd0, 0xe9, 0x15, 0xa3, 0xcb, 0x36, 0x00, 0x21, 0xa3, 0x79, 0x20, 0xa5, 0x3e, 0x88, 0x03, 0xcb, 0x7e, 0x63, 0xbb, 0xed, 0xa9, 0x13, 0x35, 0x16, 0xaf, 0x2e, 0xb4, 0x70, 0x14, 0x93, 0xfb, 0xc4, 0x9b, 0xd8, 0xb1, 0xbe, 0x43, 0xd1, 0x85, 0xb8, 0x97, 0xef, 0xea, 0x88, 0xa1, 0x25, 0x52, 0x62, 0x75,
+ /* (2^403)P */ 0x8e, 0x4f, 0xaa, 0x23, 0x62, 0x7e, 0x2b, 0x37, 0x89, 0x00, 0x11, 0x30, 0xc5, 0x33, 0x4a, 0x89, 0x8a, 0xe2, 0xfc, 0x5c, 0x6a, 0x75, 0xe5, 0xf7, 0x02, 0x4a, 0x9b, 0xf7, 0xb5, 0x6a, 0x85, 0x31, 0xd3, 0x5a, 0xcf, 0xc3, 0xf8, 0xde, 0x2f, 0xcf, 0xb5, 0x24, 0xf4, 0xe3, 0xa1, 0xad, 0x42, 0xae, 0x09, 0xb9, 0x2e, 0x04, 0x2d, 0x01, 0x22, 0x3f,
+ /* (2^404)P */ 0x41, 0x16, 0xfb, 0x7d, 0x50, 0xfd, 0xb5, 0xba, 0x88, 0x24, 0xba, 0xfd, 0x3d, 0xb2, 0x90, 0x15, 0xb7, 0xfa, 0xa2, 0xe1, 0x4c, 0x7d, 0xb9, 0xc6, 0xff, 0x81, 0x57, 0xb6, 0xc2, 0x9e, 0xcb, 0xc4, 0x35, 0xbd, 0x01, 0xb7, 0xaa, 0xce, 0xd0, 0xe9, 0xb5, 0xd6, 0x72, 0xbf, 0xd2, 0xee, 0xc7, 0xac, 0x94, 0xff, 0x29, 0x57, 0x02, 0x49, 0x09, 0xad,
+ /* (2^405)P */ 0x27, 0xa5, 0x78, 0x1b, 0xbf, 0x6b, 0xaf, 0x0b, 0x8c, 0xd9, 0xa8, 0x37, 0xb0, 0x67, 0x18, 0xb6, 0xc7, 0x05, 0x8a, 0x67, 0x03, 0x30, 0x62, 0x6e, 0x56, 0x82, 0xa9, 0x54, 0x3e, 0x0c, 0x4e, 0x07, 0xe1, 0x5a, 0x38, 0xed, 0xfa, 0xc8, 0x55, 0x6b, 0x08, 0xa3, 0x6b, 0x64, 0x2a, 0x15, 0xd6, 0x39, 0x6f, 0x47, 0x99, 0x42, 0x3f, 0x33, 0x84, 0x8f,
+ /* (2^406)P */ 0xbc, 0x45, 0x29, 0x81, 0x0e, 0xa4, 0xc5, 0x72, 0x3a, 0x10, 0xe1, 0xc4, 0x1e, 0xda, 0xc3, 0xfe, 0xb0, 0xce, 0xd2, 0x13, 0x34, 0x67, 0x21, 0xc6, 0x7e, 0xf9, 0x8c, 0xff, 0x39, 0x50, 0xae, 0x92, 0x60, 0x35, 0x2f, 0x8b, 0x6e, 0xc9, 0xc1, 0x27, 0x3a, 0x94, 0x66, 0x3e, 0x26, 0x84, 0x93, 0xc8, 0x6c, 0xcf, 0xd2, 0x03, 0xa1, 0x10, 0xcf, 0xb7,
+ /* (2^407)P */ 0x64, 0xda, 0x19, 0xf6, 0xc5, 0x73, 0x17, 0x44, 0x88, 0x81, 0x07, 0x0d, 0x34, 0xb2, 0x75, 0xf9, 0xd9, 0xe2, 0xe0, 0x8b, 0x71, 0xcf, 0x72, 0x34, 0x83, 0xb4, 0xce, 0xfc, 0xd7, 0x29, 0x09, 0x5a, 0x98, 0xbf, 0x14, 0xac, 0x77, 0x55, 0x38, 0x47, 0x5b, 0x0f, 0x40, 0x24, 0xe5, 0xa5, 0xa6, 0xac, 0x2d, 0xa6, 0xff, 0x9c, 0x73, 0xfe, 0x5c, 0x7e,
+ /* (2^408)P */ 0x1e, 0x33, 0xcc, 0x68, 0xb2, 0xbc, 0x8c, 0x93, 0xaf, 0xcc, 0x38, 0xf8, 0xd9, 0x16, 0x72, 0x50, 0xac, 0xd9, 0xb5, 0x0b, 0x9a, 0xbe, 0x46, 0x7a, 0xf1, 0xee, 0xf1, 0xad, 0xec, 0x5b, 0x59, 0x27, 0x9c, 0x05, 0xa3, 0x87, 0xe0, 0x37, 0x2c, 0x83, 0xce, 0xb3, 0x65, 0x09, 0x8e, 0xc3, 0x9c, 0xbf, 0x6a, 0xa2, 0x00, 0xcc, 0x12, 0x36, 0xc5, 0x95,
+ /* (2^409)P */ 0x36, 0x11, 0x02, 0x14, 0x9c, 0x3c, 0xeb, 0x2f, 0x23, 0x5b, 0x6b, 0x2b, 0x08, 0x54, 0x53, 0xac, 0xb2, 0xa3, 0xe0, 0x26, 0x62, 0x3c, 0xe4, 0xe1, 0x81, 0xee, 0x13, 0x3e, 0xa4, 0x97, 0xef, 0xf9, 0x92, 0x27, 0x01, 0xce, 0x54, 0x8b, 0x3e, 0x31, 0xbe, 0xa7, 0x88, 0xcf, 0x47, 0x99, 0x3c, 0x10, 0x6f, 0x60, 0xb3, 0x06, 0x4e, 0xee, 0x1b, 0xf0,
+ /* (2^410)P */ 0x59, 0x49, 0x66, 0xcf, 0x22, 0xe6, 0xf6, 0x73, 0xfe, 0xa3, 0x1c, 0x09, 0xfa, 0x5f, 0x65, 0xa8, 0xf0, 0x82, 0xc2, 0xef, 0x16, 0x63, 0x6e, 0x79, 0x69, 0x51, 0x39, 0x07, 0x65, 0xc4, 0x81, 0xec, 0x73, 0x0f, 0x15, 0x93, 0xe1, 0x30, 0x33, 0xe9, 0x37, 0x86, 0x42, 0x4c, 0x1f, 0x9b, 0xad, 0xee, 0x3f, 0xf1, 0x2a, 0x8e, 0x6a, 0xa3, 0xc8, 0x35,
+ /* (2^411)P */ 0x1e, 0x49, 0xf1, 0xdd, 0xd2, 0x9c, 0x8e, 0x78, 0xb2, 0x06, 0xe4, 0x6a, 0xab, 0x3a, 0xdc, 0xcd, 0xf4, 0xeb, 0xe1, 0xe7, 0x2f, 0xaa, 0xeb, 0x40, 0x31, 0x9f, 0xb9, 0xab, 0x13, 0xa9, 0x78, 0xbf, 0x38, 0x89, 0x0e, 0x85, 0x14, 0x8b, 0x46, 0x76, 0x14, 0xda, 0xcf, 0x33, 0xc8, 0x79, 0xd3, 0xd5, 0xa3, 0x6a, 0x69, 0x45, 0x70, 0x34, 0xc3, 0xe9,
+ /* (2^412)P */ 0x5e, 0xe7, 0x78, 0xe9, 0x24, 0xcc, 0xe9, 0xf4, 0xc8, 0x6b, 0xe0, 0xfb, 0x3a, 0xbe, 0xcc, 0x42, 0x4a, 0x00, 0x22, 0xf8, 0xe6, 0x32, 0xbe, 0x6d, 0x18, 0x55, 0x60, 0xe9, 0x72, 0x69, 0x50, 0x56, 0xca, 0x04, 0x18, 0x38, 0xa1, 0xee, 0xd8, 0x38, 0x3c, 0xa7, 0x70, 0xe2, 0xb9, 0x4c, 0xa0, 0xc8, 0x89, 0x72, 0xcf, 0x49, 0x7f, 0xdf, 0xbc, 0x67,
+ /* (2^413)P */ 0x1d, 0x17, 0xcb, 0x0b, 0xbd, 0xb2, 0x36, 0xe3, 0xa8, 0x99, 0x31, 0xb6, 0x26, 0x9c, 0x0c, 0x74, 0xaf, 0x4d, 0x24, 0x61, 0xcf, 0x31, 0x7b, 0xed, 0xdd, 0xc3, 0xf6, 0x32, 0x70, 0xfe, 0x17, 0xf6, 0x51, 0x37, 0x65, 0xce, 0x5d, 0xaf, 0xa5, 0x2f, 0x2a, 0xfe, 0x00, 0x71, 0x7c, 0x50, 0xbe, 0x21, 0xc7, 0xed, 0xc6, 0xfc, 0x67, 0xcf, 0x9c, 0xdd,
+ /* (2^414)P */ 0x26, 0x3e, 0xf8, 0xbb, 0xd0, 0xb1, 0x01, 0xd8, 0xeb, 0x0b, 0x62, 0x87, 0x35, 0x4c, 0xde, 0xca, 0x99, 0x9c, 0x6d, 0xf7, 0xb6, 0xf0, 0x57, 0x0a, 0x52, 0x29, 0x6a, 0x3f, 0x26, 0x31, 0x04, 0x07, 0x2a, 0xc9, 0xfa, 0x9b, 0x0e, 0x62, 0x8e, 0x72, 0xf2, 0xad, 0xce, 0xb6, 0x35, 0x7a, 0xc1, 0xae, 0x35, 0xc7, 0xa3, 0x14, 0xcf, 0x0c, 0x28, 0xb7,
+ /* (2^415)P */ 0xa6, 0xf1, 0x32, 0x3a, 0x20, 0xd2, 0x24, 0x97, 0xcf, 0x5d, 0x37, 0x99, 0xaf, 0x33, 0x7a, 0x5b, 0x7a, 0xcc, 0x4e, 0x41, 0x38, 0xb1, 0x4e, 0xad, 0xc9, 0xd9, 0x71, 0x7e, 0xb2, 0xf5, 0xd5, 0x01, 0x6c, 0x4d, 0xfd, 0xa1, 0xda, 0x03, 0x38, 0x9b, 0x3d, 0x92, 0x92, 0xf2, 0xca, 0xbf, 0x1f, 0x24, 0xa4, 0xbb, 0x30, 0x6a, 0x74, 0x56, 0xc8, 0xce,
+ /* (2^416)P */ 0x27, 0xf4, 0xed, 0xc9, 0xc3, 0xb1, 0x79, 0x85, 0xbe, 0xf6, 0xeb, 0xf3, 0x55, 0xc7, 0xaa, 0xa6, 0xe9, 0x07, 0x5d, 0xf4, 0xeb, 0xa6, 0x81, 0xe3, 0x0e, 0xcf, 0xa3, 0xc1, 0xef, 0xe7, 0x34, 0xb2, 0x03, 0x73, 0x8a, 0x91, 0xf1, 0xad, 0x05, 0xc7, 0x0b, 0x43, 0x99, 0x12, 0x31, 0xc8, 0xc7, 0xc5, 0xa4, 0x3d, 0xcd, 0xe5, 0x4e, 0x6d, 0x24, 0xdd,
+ /* (2^417)P */ 0x61, 0x54, 0xd0, 0x95, 0x2c, 0x45, 0x75, 0xac, 0xb5, 0x1a, 0x9d, 0x11, 0xeb, 0xed, 0x6b, 0x57, 0xa3, 0xe6, 0xcd, 0x77, 0xd4, 0x83, 0x8e, 0x39, 0xf1, 0x0f, 0x98, 0xcb, 0x40, 0x02, 0x6e, 0x10, 0x82, 0x9e, 0xb4, 0x93, 0x76, 0xd7, 0x97, 0xa3, 0x53, 0x12, 0x86, 0xc6, 0x15, 0x78, 0x73, 0x93, 0xe7, 0x7f, 0xcf, 0x1f, 0xbf, 0xcd, 0xd2, 0x7a,
+ /* (2^418)P */ 0xc2, 0x21, 0xdc, 0xd5, 0x69, 0xff, 0xca, 0x49, 0x3a, 0xe1, 0xc3, 0x69, 0x41, 0x56, 0xc1, 0x76, 0x63, 0x24, 0xbd, 0x64, 0x1b, 0x3d, 0x92, 0xf9, 0x13, 0x04, 0x25, 0xeb, 0x27, 0xa6, 0xef, 0x39, 0x3a, 0x80, 0xe0, 0xf8, 0x27, 0xee, 0xc9, 0x49, 0x77, 0xef, 0x3f, 0x29, 0x3d, 0x5e, 0xe6, 0x66, 0x83, 0xd1, 0xf6, 0xfe, 0x9d, 0xbc, 0xf1, 0x96,
+ /* (2^419)P */ 0x6b, 0xc6, 0x99, 0x26, 0x3c, 0xf3, 0x63, 0xf9, 0xc7, 0x29, 0x8c, 0x52, 0x62, 0x2d, 0xdc, 0x8a, 0x66, 0xce, 0x2c, 0xa7, 0xe4, 0xf0, 0xd7, 0x37, 0x17, 0x1e, 0xe4, 0xa3, 0x53, 0x7b, 0x29, 0x8e, 0x60, 0x99, 0xf9, 0x0c, 0x7c, 0x6f, 0xa2, 0xcc, 0x9f, 0x80, 0xdd, 0x5e, 0x46, 0xaa, 0x0d, 0x6c, 0xc9, 0x6c, 0xf7, 0x78, 0x5b, 0x38, 0xe3, 0x24,
+ /* (2^420)P */ 0x4b, 0x75, 0x6a, 0x2f, 0x08, 0xe1, 0x72, 0x76, 0xab, 0x82, 0x96, 0xdf, 0x3b, 0x1f, 0x9b, 0xd8, 0xed, 0xdb, 0xcd, 0x15, 0x09, 0x5a, 0x1e, 0xb7, 0xc5, 0x26, 0x72, 0x07, 0x0c, 0x50, 0xcd, 0x3b, 0x4d, 0x3f, 0xa2, 0x67, 0xc2, 0x02, 0x61, 0x2e, 0x68, 0xe9, 0x6f, 0xf0, 0x21, 0x2a, 0xa7, 0x3b, 0x88, 0x04, 0x11, 0x64, 0x49, 0x0d, 0xb4, 0x46,
+ /* (2^421)P */ 0x63, 0x85, 0xf3, 0xc5, 0x2b, 0x5a, 0x9f, 0xf0, 0x17, 0xcb, 0x45, 0x0a, 0xf3, 0x6e, 0x7e, 0xb0, 0x7c, 0xbc, 0xf0, 0x4f, 0x3a, 0xb0, 0xbc, 0x36, 0x36, 0x52, 0x51, 0xcb, 0xfe, 0x9a, 0xcb, 0xe8, 0x7e, 0x4b, 0x06, 0x7f, 0xaa, 0x35, 0xc8, 0x0e, 0x7a, 0x30, 0xa3, 0xb1, 0x09, 0xbb, 0x86, 0x4c, 0xbe, 0xb8, 0xbd, 0xe0, 0x32, 0xa5, 0xd4, 0xf7,
+ /* (2^422)P */ 0x7d, 0x50, 0x37, 0x68, 0x4e, 0x22, 0xb2, 0x2c, 0xd5, 0x0f, 0x2b, 0x6d, 0xb1, 0x51, 0xf2, 0x82, 0xe9, 0x98, 0x7c, 0x50, 0xc7, 0x96, 0x7e, 0x0e, 0xdc, 0xb1, 0x0e, 0xb2, 0x63, 0x8c, 0x30, 0x37, 0x72, 0x21, 0x9c, 0x61, 0xc2, 0xa7, 0x33, 0xd9, 0xb2, 0x63, 0x93, 0xd1, 0x6b, 0x6a, 0x73, 0xa5, 0x58, 0x80, 0xff, 0x04, 0xc7, 0x83, 0x21, 0x29,
+ /* (2^423)P */ 0x29, 0x04, 0xbc, 0x99, 0x39, 0xc9, 0x58, 0xc9, 0x6b, 0x17, 0xe8, 0x90, 0xb3, 0xe6, 0xa9, 0xb6, 0x28, 0x9b, 0xcb, 0x3b, 0x28, 0x90, 0x68, 0x71, 0xff, 0xcf, 0x08, 0x78, 0xc9, 0x8d, 0xa8, 0x4e, 0x43, 0xd1, 0x1c, 0x9e, 0xa4, 0xe3, 0xdf, 0xbf, 0x92, 0xf4, 0xf9, 0x41, 0xba, 0x4d, 0x1c, 0xf9, 0xdd, 0x74, 0x76, 0x1c, 0x6e, 0x3e, 0x94, 0x87,
+ /* (2^424)P */ 0xe4, 0xda, 0xc5, 0xd7, 0xfb, 0x87, 0xc5, 0x4d, 0x6b, 0x19, 0xaa, 0xb9, 0xbc, 0x8c, 0xf2, 0x8a, 0xd8, 0x5d, 0xdb, 0x4d, 0xef, 0xa6, 0xf2, 0x65, 0xf1, 0x22, 0x9c, 0xf1, 0x46, 0x30, 0x71, 0x7c, 0xe4, 0x53, 0x8e, 0x55, 0x2e, 0x9c, 0x9a, 0x31, 0x2a, 0xc3, 0xab, 0x0f, 0xde, 0xe4, 0xbe, 0xd8, 0x96, 0x50, 0x6e, 0x0c, 0x54, 0x49, 0xe6, 0xec,
+ /* (2^425)P */ 0x3c, 0x1d, 0x5a, 0xa5, 0xda, 0xad, 0xdd, 0xc2, 0xae, 0xac, 0x6f, 0x86, 0x75, 0x31, 0x91, 0x64, 0x45, 0x9d, 0xa4, 0xf0, 0x81, 0xf1, 0x0e, 0xba, 0x74, 0xaf, 0x7b, 0xcd, 0x6f, 0xfe, 0xac, 0x4e, 0xdb, 0x4e, 0x45, 0x35, 0x36, 0xc5, 0xc0, 0x6c, 0x3d, 0x64, 0xf4, 0xd8, 0x07, 0x62, 0xd1, 0xec, 0xf3, 0xfc, 0x93, 0xc9, 0x28, 0x0c, 0x2c, 0xf3,
+ /* (2^426)P */ 0x0c, 0x69, 0x2b, 0x5c, 0xb6, 0x41, 0x69, 0xf1, 0xa4, 0xf1, 0x5b, 0x75, 0x4c, 0x42, 0x8b, 0x47, 0xeb, 0x69, 0xfb, 0xa8, 0xe6, 0xf9, 0x7b, 0x48, 0x50, 0xaf, 0xd3, 0xda, 0xb2, 0x35, 0x10, 0xb5, 0x5b, 0x40, 0x90, 0x39, 0xc9, 0x07, 0x06, 0x73, 0x26, 0x20, 0x95, 0x01, 0xa4, 0x2d, 0xf0, 0xe7, 0x2e, 0x00, 0x7d, 0x41, 0x09, 0x68, 0x13, 0xc4,
+ /* (2^427)P */ 0xbe, 0x38, 0x78, 0xcf, 0xc9, 0x4f, 0x36, 0xca, 0x09, 0x61, 0x31, 0x3c, 0x57, 0x2e, 0xec, 0x17, 0xa4, 0x7d, 0x19, 0x2b, 0x9b, 0x5b, 0xbe, 0x8f, 0xd6, 0xc5, 0x2f, 0x86, 0xf2, 0x64, 0x76, 0x17, 0x00, 0x6e, 0x1a, 0x8c, 0x67, 0x1b, 0x68, 0xeb, 0x15, 0xa2, 0xd6, 0x09, 0x91, 0xdd, 0x23, 0x0d, 0x98, 0xb2, 0x10, 0x19, 0x55, 0x9b, 0x63, 0xf2,
+ /* (2^428)P */ 0x51, 0x1f, 0x93, 0xea, 0x2a, 0x3a, 0xfa, 0x41, 0xc0, 0x57, 0xfb, 0x74, 0xa6, 0x65, 0x09, 0x56, 0x14, 0xb6, 0x12, 0xaa, 0xb3, 0x1a, 0x8d, 0x3b, 0x76, 0x91, 0x7a, 0x23, 0x56, 0x9c, 0x6a, 0xc0, 0xe0, 0x3c, 0x3f, 0xb5, 0x1a, 0xf4, 0x57, 0x71, 0x93, 0x2b, 0xb1, 0xa7, 0x70, 0x57, 0x22, 0x80, 0xf5, 0xb8, 0x07, 0x77, 0x87, 0x0c, 0xbe, 0x83,
+ /* (2^429)P */ 0x07, 0x9b, 0x0e, 0x52, 0x38, 0x63, 0x13, 0x86, 0x6a, 0xa6, 0xb4, 0xd2, 0x60, 0x68, 0x9a, 0x99, 0x82, 0x0a, 0x04, 0x5f, 0x89, 0x7a, 0x1a, 0x2a, 0xae, 0x2d, 0x35, 0x0c, 0x1e, 0xad, 0xef, 0x4f, 0x9a, 0xfc, 0xc8, 0xd9, 0xcf, 0x9d, 0x48, 0x71, 0xa5, 0x55, 0x79, 0x73, 0x39, 0x1b, 0xd8, 0x73, 0xec, 0x9b, 0x03, 0x16, 0xd8, 0x82, 0xf7, 0x67,
+ /* (2^430)P */ 0x52, 0x67, 0x42, 0x21, 0xc9, 0x40, 0x78, 0x82, 0x2b, 0x95, 0x2d, 0x20, 0x92, 0xd1, 0xe2, 0x61, 0x25, 0xb0, 0xc6, 0x9c, 0x20, 0x59, 0x8e, 0x28, 0x6f, 0xf3, 0xfd, 0xd3, 0xc1, 0x32, 0x43, 0xc9, 0xa6, 0x08, 0x7a, 0x77, 0x9c, 0x4c, 0x8c, 0x33, 0x71, 0x13, 0x69, 0xe3, 0x52, 0x30, 0xa7, 0xf5, 0x07, 0x67, 0xac, 0xad, 0x46, 0x8a, 0x26, 0x25,
+ /* (2^431)P */ 0xda, 0x86, 0xc4, 0xa2, 0x71, 0x56, 0xdd, 0xd2, 0x48, 0xd3, 0xde, 0x42, 0x63, 0x01, 0xa7, 0x2c, 0x92, 0x83, 0x6f, 0x2e, 0xd8, 0x1e, 0x3f, 0xc1, 0xc5, 0x42, 0x4e, 0x34, 0x19, 0x54, 0x6e, 0x35, 0x2c, 0x51, 0x2e, 0xfd, 0x0f, 0x9a, 0x45, 0x66, 0x5e, 0x4a, 0x83, 0xda, 0x0a, 0x53, 0x68, 0x63, 0xfa, 0xce, 0x47, 0x20, 0xd3, 0x34, 0xba, 0x0d,
+ /* (2^432)P */ 0xd0, 0xe9, 0x64, 0xa4, 0x61, 0x4b, 0x86, 0xe5, 0x93, 0x6f, 0xda, 0x0e, 0x31, 0x7e, 0x6e, 0xe3, 0xc6, 0x73, 0xd8, 0xa3, 0x08, 0x57, 0x52, 0xcd, 0x51, 0x63, 0x1d, 0x9f, 0x93, 0x00, 0x62, 0x91, 0x26, 0x21, 0xa7, 0xdd, 0x25, 0x0f, 0x09, 0x0d, 0x35, 0xad, 0xcf, 0x11, 0x8e, 0x6e, 0xe8, 0xae, 0x1d, 0x95, 0xcb, 0x88, 0xf8, 0x70, 0x7b, 0x91,
+ /* (2^433)P */ 0x0c, 0x19, 0x5c, 0xd9, 0x8d, 0xda, 0x9d, 0x2c, 0x90, 0x54, 0x65, 0xe8, 0xb6, 0x35, 0x50, 0xae, 0xea, 0xae, 0x43, 0xb7, 0x1e, 0x99, 0x8b, 0x4c, 0x36, 0x4e, 0xe4, 0x1e, 0xc4, 0x64, 0x43, 0xb6, 0xeb, 0xd4, 0xe9, 0x60, 0x22, 0xee, 0xcf, 0xb8, 0x52, 0x1b, 0xf0, 0x04, 0xce, 0xbc, 0x2b, 0xf0, 0xbe, 0xcd, 0x44, 0x74, 0x1e, 0x1f, 0x63, 0xf9,
+ /* (2^434)P */ 0xe1, 0x3f, 0x95, 0x94, 0xb2, 0xb6, 0x31, 0xa9, 0x1b, 0xdb, 0xfd, 0x0e, 0xdb, 0xdd, 0x1a, 0x22, 0x78, 0x60, 0x9f, 0x75, 0x5f, 0x93, 0x06, 0x0c, 0xd8, 0xbb, 0xa2, 0x85, 0x2b, 0x5e, 0xc0, 0x9b, 0xa8, 0x5d, 0xaf, 0x93, 0x91, 0x91, 0x47, 0x41, 0x1a, 0xfc, 0xb4, 0x51, 0x85, 0xad, 0x69, 0x4d, 0x73, 0x69, 0xd5, 0x4e, 0x82, 0xfb, 0x66, 0xcb,
+ /* (2^435)P */ 0x7c, 0xbe, 0xc7, 0x51, 0xc4, 0x74, 0x6e, 0xab, 0xfd, 0x41, 0x4f, 0x76, 0x4f, 0x24, 0x03, 0xd6, 0x2a, 0xb7, 0x42, 0xb4, 0xda, 0x41, 0x2c, 0x82, 0x48, 0x4c, 0x7f, 0x6f, 0x25, 0x5d, 0x36, 0xd4, 0x69, 0xf5, 0xef, 0x02, 0x81, 0xea, 0x6f, 0x19, 0x69, 0xe8, 0x6f, 0x5b, 0x2f, 0x14, 0x0e, 0x6f, 0x89, 0xb4, 0xb5, 0xd8, 0xae, 0xef, 0x7b, 0x87,
+ /* (2^436)P */ 0xe9, 0x91, 0xa0, 0x8b, 0xc9, 0xe0, 0x01, 0x90, 0x37, 0xc1, 0x6f, 0xdc, 0x5e, 0xf7, 0xbf, 0x43, 0x00, 0xaa, 0x10, 0x76, 0x76, 0x18, 0x6e, 0x19, 0x1e, 0x94, 0x50, 0x11, 0x0a, 0xd1, 0xe2, 0xdb, 0x08, 0x21, 0xa0, 0x1f, 0xdb, 0x54, 0xfe, 0xea, 0x6e, 0xa3, 0x68, 0x56, 0x87, 0x0b, 0x22, 0x4e, 0x66, 0xf3, 0x82, 0x82, 0x00, 0xcd, 0xd4, 0x12,
+ /* (2^437)P */ 0x25, 0x8e, 0x24, 0x77, 0x64, 0x4c, 0xe0, 0xf8, 0x18, 0xc0, 0xdc, 0xc7, 0x1b, 0x35, 0x65, 0xde, 0x67, 0x41, 0x5e, 0x6f, 0x90, 0x82, 0xa7, 0x2e, 0x6d, 0xf1, 0x47, 0xb4, 0x92, 0x9c, 0xfd, 0x6a, 0x9a, 0x41, 0x36, 0x20, 0x24, 0x58, 0xc3, 0x59, 0x07, 0x9a, 0xfa, 0x9f, 0x03, 0xcb, 0xc7, 0x69, 0x37, 0x60, 0xe1, 0xab, 0x13, 0x72, 0xee, 0xa2,
+ /* (2^438)P */ 0x74, 0x78, 0xfb, 0x13, 0xcb, 0x8e, 0x37, 0x1a, 0xf6, 0x1d, 0x17, 0x83, 0x06, 0xd4, 0x27, 0x06, 0x21, 0xe8, 0xda, 0xdf, 0x6b, 0xf3, 0x83, 0x6b, 0x34, 0x8a, 0x8c, 0xee, 0x01, 0x05, 0x5b, 0xed, 0xd3, 0x1b, 0xc9, 0x64, 0x83, 0xc9, 0x49, 0xc2, 0x57, 0x1b, 0xdd, 0xcf, 0xf1, 0x9d, 0x63, 0xee, 0x1c, 0x0d, 0xa0, 0x0a, 0x73, 0x1f, 0x5b, 0x32,
+ /* (2^439)P */ 0x29, 0xce, 0x1e, 0xc0, 0x6a, 0xf5, 0xeb, 0x99, 0x5a, 0x39, 0x23, 0xe9, 0xdd, 0xac, 0x44, 0x88, 0xbc, 0x80, 0x22, 0xde, 0x2c, 0xcb, 0xa8, 0x3b, 0xff, 0xf7, 0x6f, 0xc7, 0x71, 0x72, 0xa8, 0xa3, 0xf6, 0x4d, 0xc6, 0x75, 0xda, 0x80, 0xdc, 0xd9, 0x30, 0xd9, 0x07, 0x50, 0x5a, 0x54, 0x7d, 0xda, 0x39, 0x6f, 0x78, 0x94, 0xbf, 0x25, 0x98, 0xdc,
+ /* (2^440)P */ 0x01, 0x26, 0x62, 0x44, 0xfb, 0x0f, 0x11, 0x72, 0x73, 0x0a, 0x16, 0xc7, 0x16, 0x9c, 0x9b, 0x37, 0xd8, 0xff, 0x4f, 0xfe, 0x57, 0xdb, 0xae, 0xef, 0x7d, 0x94, 0x30, 0x04, 0x70, 0x83, 0xde, 0x3c, 0xd4, 0xb5, 0x70, 0xda, 0xa7, 0x55, 0xc8, 0x19, 0xe1, 0x36, 0x15, 0x61, 0xe7, 0x3b, 0x7d, 0x85, 0xbb, 0xf3, 0x42, 0x5a, 0x94, 0xf4, 0x53, 0x2a,
+ /* (2^441)P */ 0x14, 0x60, 0xa6, 0x0b, 0x83, 0xe1, 0x23, 0x77, 0xc0, 0xce, 0x50, 0xed, 0x35, 0x8d, 0x98, 0x99, 0x7d, 0xf5, 0x8d, 0xce, 0x94, 0x25, 0xc8, 0x0f, 0x6d, 0xfa, 0x4a, 0xa4, 0x3a, 0x1f, 0x66, 0xfb, 0x5a, 0x64, 0xaf, 0x8b, 0x54, 0x54, 0x44, 0x3f, 0x5b, 0x88, 0x61, 0xe4, 0x48, 0x45, 0x26, 0x20, 0xbe, 0x0d, 0x06, 0xbb, 0x65, 0x59, 0xe1, 0x36,
+ /* (2^442)P */ 0xb7, 0x98, 0xce, 0xa3, 0xe3, 0xee, 0x11, 0x1b, 0x9e, 0x24, 0x59, 0x75, 0x31, 0x37, 0x44, 0x6f, 0x6b, 0x9e, 0xec, 0xb7, 0x44, 0x01, 0x7e, 0xab, 0xbb, 0x69, 0x5d, 0x11, 0xb0, 0x30, 0x64, 0xea, 0x91, 0xb4, 0x7a, 0x8c, 0x02, 0x4c, 0xb9, 0x10, 0xa7, 0xc7, 0x79, 0xe6, 0xdc, 0x77, 0xe3, 0xc8, 0xef, 0x3e, 0xf9, 0x38, 0x81, 0xce, 0x9a, 0xb2,
+ /* (2^443)P */ 0x91, 0x12, 0x76, 0xd0, 0x10, 0xb4, 0xaf, 0xe1, 0x89, 0x3a, 0x93, 0x6b, 0x5c, 0x19, 0x5f, 0x24, 0xed, 0x04, 0x92, 0xc7, 0xf0, 0x00, 0x08, 0xc1, 0x92, 0xff, 0x90, 0xdb, 0xb2, 0xbf, 0xdf, 0x49, 0xcd, 0xbd, 0x5c, 0x6e, 0xbf, 0x16, 0xbb, 0x61, 0xf9, 0x20, 0x33, 0x35, 0x93, 0x11, 0xbc, 0x59, 0x69, 0xce, 0x18, 0x9f, 0xf8, 0x7b, 0xa1, 0x6e,
+ /* (2^444)P */ 0xa1, 0xf4, 0xaf, 0xad, 0xf8, 0xe6, 0x99, 0xd2, 0xa1, 0x4d, 0xde, 0x56, 0xc9, 0x7b, 0x0b, 0x11, 0x3e, 0xbf, 0x89, 0x1a, 0x9a, 0x90, 0xe5, 0xe2, 0xa6, 0x37, 0x88, 0xa1, 0x68, 0x59, 0xae, 0x8c, 0xec, 0x02, 0x14, 0x8d, 0xb7, 0x2e, 0x25, 0x75, 0x7f, 0x76, 0x1a, 0xd3, 0x4d, 0xad, 0x8a, 0x00, 0x6c, 0x96, 0x49, 0xa4, 0xc3, 0x2e, 0x5c, 0x7b,
+ /* (2^445)P */ 0x26, 0x53, 0xf7, 0xda, 0xa8, 0x01, 0x14, 0xb1, 0x63, 0xe3, 0xc3, 0x89, 0x88, 0xb0, 0x85, 0x40, 0x2b, 0x26, 0x9a, 0x10, 0x1a, 0x70, 0x33, 0xf4, 0x50, 0x9d, 0x4d, 0xd8, 0x64, 0xc6, 0x0f, 0xe1, 0x17, 0xc8, 0x10, 0x4b, 0xfc, 0xa0, 0xc9, 0xba, 0x2c, 0x98, 0x09, 0xf5, 0x84, 0xb6, 0x7c, 0x4e, 0xa3, 0xe3, 0x81, 0x1b, 0x32, 0x60, 0x02, 0xdd,
+ /* (2^446)P */ 0xa3, 0xe5, 0x86, 0xd4, 0x43, 0xa8, 0xd1, 0x98, 0x9d, 0x9d, 0xdb, 0x04, 0xcf, 0x6e, 0x35, 0x05, 0x30, 0x53, 0x3b, 0xbc, 0x90, 0x00, 0x4a, 0xc5, 0x40, 0x2a, 0x0f, 0xde, 0x1a, 0xd7, 0x36, 0x27, 0x44, 0x62, 0xa6, 0xac, 0x9d, 0xd2, 0x70, 0x69, 0x14, 0x39, 0x9b, 0xd1, 0xc3, 0x0a, 0x3a, 0x82, 0x0e, 0xf1, 0x94, 0xd7, 0x42, 0x94, 0xd5, 0x7d,
+ /* (2^447)P */ 0x04, 0xc0, 0x6e, 0x12, 0x90, 0x70, 0xf9, 0xdf, 0xf7, 0xc9, 0x86, 0xc0, 0xe6, 0x92, 0x8b, 0x0a, 0xa1, 0xc1, 0x3b, 0xcc, 0x33, 0xb7, 0xf0, 0xeb, 0x51, 0x50, 0x80, 0x20, 0x69, 0x1c, 0x4f, 0x89, 0x05, 0x1e, 0xe4, 0x7a, 0x0a, 0xc2, 0xf0, 0xf5, 0x78, 0x91, 0x76, 0x34, 0x45, 0xdc, 0x24, 0x53, 0x24, 0x98, 0xe2, 0x73, 0x6f, 0xe6, 0x46, 0x67,
+}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/constants.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/constants.go
new file mode 100644
index 000000000..b6b236e5d
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/constants.go
@@ -0,0 +1,71 @@
+package goldilocks
+
+import fp "github.com/cloudflare/circl/math/fp448"
+
+var (
+ // genX is the x-coordinate of the generator of Goldilocks curve.
+ genX = fp.Elt{
+ 0x5e, 0xc0, 0x0c, 0xc7, 0x2b, 0xa8, 0x26, 0x26,
+ 0x8e, 0x93, 0x00, 0x8b, 0xe1, 0x80, 0x3b, 0x43,
+ 0x11, 0x65, 0xb6, 0x2a, 0xf7, 0x1a, 0xae, 0x12,
+ 0x64, 0xa4, 0xd3, 0xa3, 0x24, 0xe3, 0x6d, 0xea,
+ 0x67, 0x17, 0x0f, 0x47, 0x70, 0x65, 0x14, 0x9e,
+ 0xda, 0x36, 0xbf, 0x22, 0xa6, 0x15, 0x1d, 0x22,
+ 0xed, 0x0d, 0xed, 0x6b, 0xc6, 0x70, 0x19, 0x4f,
+ }
+ // genY is the y-coordinate of the generator of Goldilocks curve.
+ genY = fp.Elt{
+ 0x14, 0xfa, 0x30, 0xf2, 0x5b, 0x79, 0x08, 0x98,
+ 0xad, 0xc8, 0xd7, 0x4e, 0x2c, 0x13, 0xbd, 0xfd,
+ 0xc4, 0x39, 0x7c, 0xe6, 0x1c, 0xff, 0xd3, 0x3a,
+ 0xd7, 0xc2, 0xa0, 0x05, 0x1e, 0x9c, 0x78, 0x87,
+ 0x40, 0x98, 0xa3, 0x6c, 0x73, 0x73, 0xea, 0x4b,
+ 0x62, 0xc7, 0xc9, 0x56, 0x37, 0x20, 0x76, 0x88,
+ 0x24, 0xbc, 0xb6, 0x6e, 0x71, 0x46, 0x3f, 0x69,
+ }
+ // paramD is -39081 in Fp.
+ paramD = fp.Elt{
+ 0x56, 0x67, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ }
+ // order is 2^446-0x8335dc163bb124b65129c96fde933d8d723a70aadc873d6d54a7bb0d,
+ // which is the number of points in the prime subgroup.
+ order = Scalar{
+ 0xf3, 0x44, 0x58, 0xab, 0x92, 0xc2, 0x78, 0x23,
+ 0x55, 0x8f, 0xc5, 0x8d, 0x72, 0xc2, 0x6c, 0x21,
+ 0x90, 0x36, 0xd6, 0xae, 0x49, 0xdb, 0x4e, 0xc4,
+ 0xe9, 0x23, 0xca, 0x7c, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
+ }
+ // residue448 is 2^448 mod order.
+ residue448 = [4]uint64{
+ 0x721cf5b5529eec34, 0x7a4cf635c8e9c2ab, 0xeec492d944a725bf, 0x20cd77058,
+ }
+ // invFour is 1/4 mod order.
+ invFour = Scalar{
+ 0x3d, 0x11, 0xd6, 0xaa, 0xa4, 0x30, 0xde, 0x48,
+ 0xd5, 0x63, 0x71, 0xa3, 0x9c, 0x30, 0x5b, 0x08,
+ 0xa4, 0x8d, 0xb5, 0x6b, 0xd2, 0xb6, 0x13, 0x71,
+ 0xfa, 0x88, 0x32, 0xdf, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0f,
+ }
+ // paramDTwist is -39082 in Fp. The D parameter of the twist curve.
+ paramDTwist = fp.Elt{
+ 0x55, 0x67, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ }
+)
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go
new file mode 100644
index 000000000..5a939100d
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/curve.go
@@ -0,0 +1,80 @@
+// Package goldilocks provides elliptic curve operations over the goldilocks curve.
+package goldilocks
+
+import fp "github.com/cloudflare/circl/math/fp448"
+
+// Curve is the Goldilocks curve x^2+y^2=z^2-39081x^2y^2.
+type Curve struct{}
+
+// Identity returns the identity point.
+func (Curve) Identity() *Point {
+ return &Point{
+ y: fp.One(),
+ z: fp.One(),
+ }
+}
+
+// IsOnCurve returns true if the point lies on the curve.
+func (Curve) IsOnCurve(P *Point) bool {
+ x2, y2, t, t2, z2 := &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}
+ rhs, lhs := &fp.Elt{}, &fp.Elt{}
+ fp.Mul(t, &P.ta, &P.tb) // t = ta*tb
+ fp.Sqr(x2, &P.x) // x^2
+ fp.Sqr(y2, &P.y) // y^2
+ fp.Sqr(z2, &P.z) // z^2
+ fp.Sqr(t2, t) // t^2
+ fp.Add(lhs, x2, y2) // x^2 + y^2
+ fp.Mul(rhs, t2, ¶mD) // dt^2
+ fp.Add(rhs, rhs, z2) // z^2 + dt^2
+ fp.Sub(lhs, lhs, rhs) // x^2 + y^2 - (z^2 + dt^2)
+ eq0 := fp.IsZero(lhs)
+
+ fp.Mul(lhs, &P.x, &P.y) // xy
+ fp.Mul(rhs, t, &P.z) // tz
+ fp.Sub(lhs, lhs, rhs) // xy - tz
+ eq1 := fp.IsZero(lhs)
+ return eq0 && eq1
+}
+
+// Generator returns the generator point.
+func (Curve) Generator() *Point {
+ return &Point{
+ x: genX,
+ y: genY,
+ z: fp.One(),
+ ta: genX,
+ tb: genY,
+ }
+}
+
+// Order returns the number of points in the prime subgroup.
+func (Curve) Order() Scalar { return order }
+
+// Double returns 2P.
+func (Curve) Double(P *Point) *Point { R := *P; R.Double(); return &R }
+
+// Add returns P+Q.
+func (Curve) Add(P, Q *Point) *Point { R := *P; R.Add(Q); return &R }
+
+// ScalarMult returns kP. This function runs in constant time.
+func (e Curve) ScalarMult(k *Scalar, P *Point) *Point {
+ k4 := &Scalar{}
+ k4.divBy4(k)
+ return e.pull(twistCurve{}.ScalarMult(k4, e.push(P)))
+}
+
+// ScalarBaseMult returns kG where G is the generator point. This function runs in constant time.
+func (e Curve) ScalarBaseMult(k *Scalar) *Point {
+ k4 := &Scalar{}
+ k4.divBy4(k)
+ return e.pull(twistCurve{}.ScalarBaseMult(k4))
+}
+
+// CombinedMult returns mG+nP, where G is the generator point. This function is non-constant time.
+func (e Curve) CombinedMult(m, n *Scalar, P *Point) *Point {
+ m4 := &Scalar{}
+ n4 := &Scalar{}
+ m4.divBy4(m)
+ n4.divBy4(n)
+ return e.pull(twistCurve{}.CombinedMult(m4, n4, twistCurve{}.pull(P)))
+}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/isogeny.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/isogeny.go
new file mode 100644
index 000000000..b1daab851
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/isogeny.go
@@ -0,0 +1,52 @@
+package goldilocks
+
+import fp "github.com/cloudflare/circl/math/fp448"
+
+func (Curve) pull(P *twistPoint) *Point { return twistCurve{}.push(P) }
+func (twistCurve) pull(P *Point) *twistPoint { return Curve{}.push(P) }
+
+// push sends a point on the Goldilocks curve to a point on the twist curve.
+func (Curve) push(P *Point) *twistPoint {
+ Q := &twistPoint{}
+ Px, Py, Pz := &P.x, &P.y, &P.z
+ a, b, c, d, e, f, g, h := &Q.x, &Q.y, &Q.z, &fp.Elt{}, &Q.ta, &Q.x, &Q.y, &Q.tb
+ fp.Add(e, Px, Py) // x+y
+ fp.Sqr(a, Px) // A = x^2
+ fp.Sqr(b, Py) // B = y^2
+ fp.Sqr(c, Pz) // z^2
+ fp.Add(c, c, c) // C = 2*z^2
+ *d = *a // D = A
+ fp.Sqr(e, e) // (x+y)^2
+ fp.Sub(e, e, a) // (x+y)^2-A
+ fp.Sub(e, e, b) // E = (x+y)^2-A-B
+ fp.Add(h, b, d) // H = B+D
+ fp.Sub(g, b, d) // G = B-D
+ fp.Sub(f, c, h) // F = C-H
+ fp.Mul(&Q.z, f, g) // Z = F * G
+ fp.Mul(&Q.x, e, f) // X = E * F
+ fp.Mul(&Q.y, g, h) // Y = G * H, // T = E * H
+ return Q
+}
+
+// push sends a point on the twist curve to a point on the Goldilocks curve.
+func (twistCurve) push(P *twistPoint) *Point {
+ Q := &Point{}
+ Px, Py, Pz := &P.x, &P.y, &P.z
+ a, b, c, d, e, f, g, h := &Q.x, &Q.y, &Q.z, &fp.Elt{}, &Q.ta, &Q.x, &Q.y, &Q.tb
+ fp.Add(e, Px, Py) // x+y
+ fp.Sqr(a, Px) // A = x^2
+ fp.Sqr(b, Py) // B = y^2
+ fp.Sqr(c, Pz) // z^2
+ fp.Add(c, c, c) // C = 2*z^2
+ fp.Neg(d, a) // D = -A
+ fp.Sqr(e, e) // (x+y)^2
+ fp.Sub(e, e, a) // (x+y)^2-A
+ fp.Sub(e, e, b) // E = (x+y)^2-A-B
+ fp.Add(h, b, d) // H = B+D
+ fp.Sub(g, b, d) // G = B-D
+ fp.Sub(f, c, h) // F = C-H
+ fp.Mul(&Q.z, f, g) // Z = F * G
+ fp.Mul(&Q.x, e, f) // X = E * F
+ fp.Mul(&Q.y, g, h) // Y = G * H, // T = E * H
+ return Q
+}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/point.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/point.go
new file mode 100644
index 000000000..11f73de05
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/point.go
@@ -0,0 +1,171 @@
+package goldilocks
+
+import (
+ "errors"
+ "fmt"
+
+ fp "github.com/cloudflare/circl/math/fp448"
+)
+
+// Point is a point on the Goldilocks Curve.
+type Point struct{ x, y, z, ta, tb fp.Elt }
+
+func (P Point) String() string {
+ return fmt.Sprintf("x: %v\ny: %v\nz: %v\nta: %v\ntb: %v", P.x, P.y, P.z, P.ta, P.tb)
+}
+
+// FromAffine creates a point from affine coordinates.
+func FromAffine(x, y *fp.Elt) (*Point, error) {
+ P := &Point{
+ x: *x,
+ y: *y,
+ z: fp.One(),
+ ta: *x,
+ tb: *y,
+ }
+ if !(Curve{}).IsOnCurve(P) {
+ return P, errors.New("point not on curve")
+ }
+ return P, nil
+}
+
+// isLessThan returns true if 0 <= x < y, and assumes that slices are of the
+// same length and are interpreted in little-endian order.
+func isLessThan(x, y []byte) bool {
+ i := len(x) - 1
+ for i > 0 && x[i] == y[i] {
+ i--
+ }
+ return x[i] < y[i]
+}
+
+// FromBytes returns a point from the input buffer.
+func FromBytes(in []byte) (*Point, error) {
+ if len(in) < fp.Size+1 {
+ return nil, errors.New("wrong input length")
+ }
+ err := errors.New("invalid decoding")
+ P := &Point{}
+ signX := in[fp.Size] >> 7
+ copy(P.y[:], in[:fp.Size])
+ p := fp.P()
+ if !isLessThan(P.y[:], p[:]) {
+ return nil, err
+ }
+
+ u, v := &fp.Elt{}, &fp.Elt{}
+ one := fp.One()
+ fp.Sqr(u, &P.y) // u = y^2
+ fp.Mul(v, u, ¶mD) // v = dy^2
+ fp.Sub(u, u, &one) // u = y^2-1
+ fp.Sub(v, v, &one) // v = dy^2-1
+ isQR := fp.InvSqrt(&P.x, u, v) // x = sqrt(u/v)
+ if !isQR {
+ return nil, err
+ }
+ fp.Modp(&P.x) // x = x mod p
+ if fp.IsZero(&P.x) && signX == 1 {
+ return nil, err
+ }
+ if signX != (P.x[0] & 1) {
+ fp.Neg(&P.x, &P.x)
+ }
+ P.ta = P.x
+ P.tb = P.y
+ P.z = fp.One()
+ return P, nil
+}
+
+// IsIdentity returns true is P is the identity Point.
+func (P *Point) IsIdentity() bool {
+ return fp.IsZero(&P.x) && !fp.IsZero(&P.y) && !fp.IsZero(&P.z) && P.y == P.z
+}
+
+// IsEqual returns true if P is equivalent to Q.
+func (P *Point) IsEqual(Q *Point) bool {
+ l, r := &fp.Elt{}, &fp.Elt{}
+ fp.Mul(l, &P.x, &Q.z)
+ fp.Mul(r, &Q.x, &P.z)
+ fp.Sub(l, l, r)
+ b := fp.IsZero(l)
+ fp.Mul(l, &P.y, &Q.z)
+ fp.Mul(r, &Q.y, &P.z)
+ fp.Sub(l, l, r)
+ b = b && fp.IsZero(l)
+ fp.Mul(l, &P.ta, &P.tb)
+ fp.Mul(l, l, &Q.z)
+ fp.Mul(r, &Q.ta, &Q.tb)
+ fp.Mul(r, r, &P.z)
+ fp.Sub(l, l, r)
+ b = b && fp.IsZero(l)
+ return b
+}
+
+// Neg obtains the inverse of the Point.
+func (P *Point) Neg() { fp.Neg(&P.x, &P.x); fp.Neg(&P.ta, &P.ta) }
+
+// ToAffine returns the x,y affine coordinates of P.
+func (P *Point) ToAffine() (x, y fp.Elt) {
+ fp.Inv(&P.z, &P.z) // 1/z
+ fp.Mul(&P.x, &P.x, &P.z) // x/z
+ fp.Mul(&P.y, &P.y, &P.z) // y/z
+ fp.Modp(&P.x)
+ fp.Modp(&P.y)
+ fp.SetOne(&P.z)
+ P.ta = P.x
+ P.tb = P.y
+ return P.x, P.y
+}
+
+// ToBytes stores P into a slice of bytes.
+func (P *Point) ToBytes(out []byte) error {
+ if len(out) < fp.Size+1 {
+ return errors.New("invalid decoding")
+ }
+ x, y := P.ToAffine()
+ out[fp.Size] = (x[0] & 1) << 7
+ return fp.ToBytes(out[:fp.Size], &y)
+}
+
+// MarshalBinary encodes the receiver into a binary form and returns the result.
+func (P *Point) MarshalBinary() (data []byte, err error) {
+ data = make([]byte, fp.Size+1)
+ err = P.ToBytes(data[:fp.Size+1])
+ return data, err
+}
+
+// UnmarshalBinary must be able to decode the form generated by MarshalBinary.
+func (P *Point) UnmarshalBinary(data []byte) error { Q, err := FromBytes(data); *P = *Q; return err }
+
+// Double sets P = 2Q.
+func (P *Point) Double() { P.Add(P) }
+
+// Add sets P =P+Q..
+func (P *Point) Add(Q *Point) {
+ // This is formula (5) from "Twisted Edwards Curves Revisited" by
+ // Hisil H., Wong K.KH., Carter G., Dawson E. (2008)
+ // https://doi.org/10.1007/978-3-540-89255-7_20
+ x1, y1, z1, ta1, tb1 := &P.x, &P.y, &P.z, &P.ta, &P.tb
+ x2, y2, z2, ta2, tb2 := &Q.x, &Q.y, &Q.z, &Q.ta, &Q.tb
+ x3, y3, z3, E, H := &P.x, &P.y, &P.z, &P.ta, &P.tb
+ A, B, C, D := &fp.Elt{}, &fp.Elt{}, &fp.Elt{}, &fp.Elt{}
+ t1, t2, F, G := C, D, &fp.Elt{}, &fp.Elt{}
+ fp.Mul(t1, ta1, tb1) // t1 = ta1*tb1
+ fp.Mul(t2, ta2, tb2) // t2 = ta2*tb2
+ fp.Mul(A, x1, x2) // A = x1*x2
+ fp.Mul(B, y1, y2) // B = y1*y2
+ fp.Mul(C, t1, t2) // t1*t2
+ fp.Mul(C, C, ¶mD) // C = d*t1*t2
+ fp.Mul(D, z1, z2) // D = z1*z2
+ fp.Add(F, x1, y1) // x1+y1
+ fp.Add(E, x2, y2) // x2+y2
+ fp.Mul(E, E, F) // (x1+y1)*(x2+y2)
+ fp.Sub(E, E, A) // (x1+y1)*(x2+y2)-A
+ fp.Sub(E, E, B) // E = (x1+y1)*(x2+y2)-A-B
+ fp.Sub(F, D, C) // F = D-C
+ fp.Add(G, D, C) // G = D+C
+ fp.Sub(H, B, A) // H = B-A
+ fp.Mul(z3, F, G) // Z = F * G
+ fp.Mul(x3, E, F) // X = E * F
+ fp.Mul(y3, G, H) // Y = G * H, T = E * H
+}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/scalar.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/scalar.go
new file mode 100644
index 000000000..f98117b25
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/scalar.go
@@ -0,0 +1,203 @@
+package goldilocks
+
+import (
+ "encoding/binary"
+ "math/bits"
+)
+
+// ScalarSize is the size (in bytes) of scalars.
+const ScalarSize = 56 // 448 / 8
+
+// _N is the number of 64-bit words to store scalars.
+const _N = 7 // 448 / 64
+
+// Scalar represents a positive integer stored in little-endian order.
+type Scalar [ScalarSize]byte
+
+type scalar64 [_N]uint64
+
+func (z *scalar64) fromScalar(x *Scalar) {
+ z[0] = binary.LittleEndian.Uint64(x[0*8 : 1*8])
+ z[1] = binary.LittleEndian.Uint64(x[1*8 : 2*8])
+ z[2] = binary.LittleEndian.Uint64(x[2*8 : 3*8])
+ z[3] = binary.LittleEndian.Uint64(x[3*8 : 4*8])
+ z[4] = binary.LittleEndian.Uint64(x[4*8 : 5*8])
+ z[5] = binary.LittleEndian.Uint64(x[5*8 : 6*8])
+ z[6] = binary.LittleEndian.Uint64(x[6*8 : 7*8])
+}
+
+func (z *scalar64) toScalar(x *Scalar) {
+ binary.LittleEndian.PutUint64(x[0*8:1*8], z[0])
+ binary.LittleEndian.PutUint64(x[1*8:2*8], z[1])
+ binary.LittleEndian.PutUint64(x[2*8:3*8], z[2])
+ binary.LittleEndian.PutUint64(x[3*8:4*8], z[3])
+ binary.LittleEndian.PutUint64(x[4*8:5*8], z[4])
+ binary.LittleEndian.PutUint64(x[5*8:6*8], z[5])
+ binary.LittleEndian.PutUint64(x[6*8:7*8], z[6])
+}
+
+// add calculates z = x + y. Assumes len(z) > max(len(x),len(y)).
+func add(z, x, y []uint64) uint64 {
+ l, L, zz := len(x), len(y), y
+ if l > L {
+ l, L, zz = L, l, x
+ }
+ c := uint64(0)
+ for i := 0; i < l; i++ {
+ z[i], c = bits.Add64(x[i], y[i], c)
+ }
+ for i := l; i < L; i++ {
+ z[i], c = bits.Add64(zz[i], 0, c)
+ }
+ return c
+}
+
+// sub calculates z = x - y. Assumes len(z) > max(len(x),len(y)).
+func sub(z, x, y []uint64) uint64 {
+ l, L, zz := len(x), len(y), y
+ if l > L {
+ l, L, zz = L, l, x
+ }
+ c := uint64(0)
+ for i := 0; i < l; i++ {
+ z[i], c = bits.Sub64(x[i], y[i], c)
+ }
+ for i := l; i < L; i++ {
+ z[i], c = bits.Sub64(zz[i], 0, c)
+ }
+ return c
+}
+
+// mulWord calculates z = x * y. Assumes len(z) >= len(x)+1.
+func mulWord(z, x []uint64, y uint64) {
+ for i := range z {
+ z[i] = 0
+ }
+ carry := uint64(0)
+ for i := range x {
+ hi, lo := bits.Mul64(x[i], y)
+ lo, cc := bits.Add64(lo, z[i], 0)
+ hi, _ = bits.Add64(hi, 0, cc)
+ z[i], cc = bits.Add64(lo, carry, 0)
+ carry, _ = bits.Add64(hi, 0, cc)
+ }
+ z[len(x)] = carry
+}
+
+// Cmov moves x into z if b=1.
+func (z *scalar64) Cmov(b uint64, x *scalar64) {
+ m := uint64(0) - b
+ for i := range z {
+ z[i] = (z[i] &^ m) | (x[i] & m)
+ }
+}
+
+// leftShift shifts to the left the words of z returning the more significant word.
+func (z *scalar64) leftShift(low uint64) uint64 {
+ high := z[_N-1]
+ for i := _N - 1; i > 0; i-- {
+ z[i] = z[i-1]
+ }
+ z[0] = low
+ return high
+}
+
+// reduceOneWord calculates z = z + 2^448*x such that the result fits in a Scalar.
+func (z *scalar64) reduceOneWord(x uint64) {
+ prod := (&scalar64{})[:]
+ mulWord(prod, residue448[:], x)
+ cc := add(z[:], z[:], prod)
+ mulWord(prod, residue448[:], cc)
+ add(z[:], z[:], prod)
+}
+
+// modOrder reduces z mod order.
+func (z *scalar64) modOrder() {
+ var o64, x scalar64
+ o64.fromScalar(&order)
+ // Performs: while (z >= order) { z = z-order }
+ // At most 8 (eight) iterations reduce 3 bits by subtracting.
+ for i := 0; i < 8; i++ {
+ c := sub(x[:], z[:], o64[:]) // (c || x) = z-order
+ z.Cmov(1-c, &x) // if c != 0 { z = x }
+ }
+}
+
+// FromBytes stores z = x mod order, where x is a number stored in little-endian order.
+func (z *Scalar) FromBytes(x []byte) {
+ n := len(x)
+ nCeil := (n + 7) >> 3
+ for i := range z {
+ z[i] = 0
+ }
+ if nCeil < _N {
+ copy(z[:], x)
+ return
+ }
+ copy(z[:], x[8*(nCeil-_N):])
+ var z64 scalar64
+ z64.fromScalar(z)
+ for i := nCeil - _N - 1; i >= 0; i-- {
+ low := binary.LittleEndian.Uint64(x[8*i:])
+ high := z64.leftShift(low)
+ z64.reduceOneWord(high)
+ }
+ z64.modOrder()
+ z64.toScalar(z)
+}
+
+// divBy4 calculates z = x/4 mod order.
+func (z *Scalar) divBy4(x *Scalar) { z.Mul(x, &invFour) }
+
+// Red reduces z mod order.
+func (z *Scalar) Red() { var t scalar64; t.fromScalar(z); t.modOrder(); t.toScalar(z) }
+
+// Neg calculates z = -z mod order.
+func (z *Scalar) Neg() { z.Sub(&order, z) }
+
+// Add calculates z = x+y mod order.
+func (z *Scalar) Add(x, y *Scalar) {
+ var z64, x64, y64, t scalar64
+ x64.fromScalar(x)
+ y64.fromScalar(y)
+ c := add(z64[:], x64[:], y64[:])
+ add(t[:], z64[:], residue448[:])
+ z64.Cmov(c, &t)
+ z64.modOrder()
+ z64.toScalar(z)
+}
+
+// Sub calculates z = x-y mod order.
+func (z *Scalar) Sub(x, y *Scalar) {
+ var z64, x64, y64, t scalar64
+ x64.fromScalar(x)
+ y64.fromScalar(y)
+ c := sub(z64[:], x64[:], y64[:])
+ sub(t[:], z64[:], residue448[:])
+ z64.Cmov(c, &t)
+ z64.modOrder()
+ z64.toScalar(z)
+}
+
+// Mul calculates z = x*y mod order.
+func (z *Scalar) Mul(x, y *Scalar) {
+ var z64, x64, y64 scalar64
+ prod := (&[_N + 1]uint64{})[:]
+ x64.fromScalar(x)
+ y64.fromScalar(y)
+ mulWord(prod, x64[:], y64[_N-1])
+ copy(z64[:], prod[:_N])
+ z64.reduceOneWord(prod[_N])
+ for i := _N - 2; i >= 0; i-- {
+ h := z64.leftShift(0)
+ z64.reduceOneWord(h)
+ mulWord(prod, x64[:], y64[i])
+ c := add(z64[:], z64[:], prod[:_N])
+ z64.reduceOneWord(prod[_N] + c)
+ }
+ z64.modOrder()
+ z64.toScalar(z)
+}
+
+// IsZero returns true if z=0.
+func (z *Scalar) IsZero() bool { z.Red(); return *z == Scalar{} }
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist.go
new file mode 100644
index 000000000..83d7cdadd
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist.go
@@ -0,0 +1,138 @@
+package goldilocks
+
+import (
+ "crypto/subtle"
+ "math/bits"
+
+ "github.com/cloudflare/circl/internal/conv"
+ "github.com/cloudflare/circl/math"
+ fp "github.com/cloudflare/circl/math/fp448"
+)
+
+// twistCurve is -x^2+y^2=1-39082x^2y^2 and is 4-isogenous to Goldilocks.
+type twistCurve struct{}
+
+// Identity returns the identity point.
+func (twistCurve) Identity() *twistPoint {
+ return &twistPoint{
+ y: fp.One(),
+ z: fp.One(),
+ }
+}
+
+// subYDiv16 update x = (x - y) / 16.
+func subYDiv16(x *scalar64, y int64) {
+ s := uint64(y >> 63)
+ x0, b0 := bits.Sub64((*x)[0], uint64(y), 0)
+ x1, b1 := bits.Sub64((*x)[1], s, b0)
+ x2, b2 := bits.Sub64((*x)[2], s, b1)
+ x3, b3 := bits.Sub64((*x)[3], s, b2)
+ x4, b4 := bits.Sub64((*x)[4], s, b3)
+ x5, b5 := bits.Sub64((*x)[5], s, b4)
+ x6, _ := bits.Sub64((*x)[6], s, b5)
+ x[0] = (x0 >> 4) | (x1 << 60)
+ x[1] = (x1 >> 4) | (x2 << 60)
+ x[2] = (x2 >> 4) | (x3 << 60)
+ x[3] = (x3 >> 4) | (x4 << 60)
+ x[4] = (x4 >> 4) | (x5 << 60)
+ x[5] = (x5 >> 4) | (x6 << 60)
+ x[6] = (x6 >> 4)
+}
+
+func recodeScalar(d *[113]int8, k *Scalar) {
+ var k64 scalar64
+ k64.fromScalar(k)
+ for i := 0; i < 112; i++ {
+ d[i] = int8((k64[0] & 0x1f) - 16)
+ subYDiv16(&k64, int64(d[i]))
+ }
+ d[112] = int8(k64[0])
+}
+
+// ScalarMult returns kP.
+func (e twistCurve) ScalarMult(k *Scalar, P *twistPoint) *twistPoint {
+ var TabP [8]preTwistPointProy
+ var S preTwistPointProy
+ var d [113]int8
+
+ var isZero int
+ if k.IsZero() {
+ isZero = 1
+ }
+ subtle.ConstantTimeCopy(isZero, k[:], order[:])
+
+ minusK := *k
+ isEven := 1 - int(k[0]&0x1)
+ minusK.Neg()
+ subtle.ConstantTimeCopy(isEven, k[:], minusK[:])
+ recodeScalar(&d, k)
+
+ P.oddMultiples(TabP[:])
+ Q := e.Identity()
+ for i := 112; i >= 0; i-- {
+ Q.Double()
+ Q.Double()
+ Q.Double()
+ Q.Double()
+ mask := d[i] >> 7
+ absDi := (d[i] + mask) ^ mask
+ inx := int32((absDi - 1) >> 1)
+ sig := int((d[i] >> 7) & 0x1)
+ for j := range TabP {
+ S.cmov(&TabP[j], uint(subtle.ConstantTimeEq(inx, int32(j))))
+ }
+ S.cneg(sig)
+ Q.mixAdd(&S)
+ }
+ Q.cneg(uint(isEven))
+ return Q
+}
+
+const (
+ omegaFix = 7
+ omegaVar = 5
+)
+
+// CombinedMult returns mG+nP.
+func (e twistCurve) CombinedMult(m, n *Scalar, P *twistPoint) *twistPoint {
+ nafFix := math.OmegaNAF(conv.BytesLe2BigInt(m[:]), omegaFix)
+ nafVar := math.OmegaNAF(conv.BytesLe2BigInt(n[:]), omegaVar)
+
+ if len(nafFix) > len(nafVar) {
+ nafVar = append(nafVar, make([]int32, len(nafFix)-len(nafVar))...)
+ } else if len(nafFix) < len(nafVar) {
+ nafFix = append(nafFix, make([]int32, len(nafVar)-len(nafFix))...)
+ }
+
+ var TabQ [1 << (omegaVar - 2)]preTwistPointProy
+ P.oddMultiples(TabQ[:])
+ Q := e.Identity()
+ for i := len(nafFix) - 1; i >= 0; i-- {
+ Q.Double()
+ // Generator point
+ if nafFix[i] != 0 {
+ idxM := absolute(nafFix[i]) >> 1
+ R := tabVerif[idxM]
+ if nafFix[i] < 0 {
+ R.neg()
+ }
+ Q.mixAddZ1(&R)
+ }
+ // Variable input point
+ if nafVar[i] != 0 {
+ idxN := absolute(nafVar[i]) >> 1
+ S := TabQ[idxN]
+ if nafVar[i] < 0 {
+ S.neg()
+ }
+ Q.mixAdd(&S)
+ }
+ }
+ return Q
+}
+
+// absolute returns always a positive value.
+func absolute(x int32) int32 {
+ mask := x >> 31
+ return (x + mask) ^ mask
+}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistPoint.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistPoint.go
new file mode 100644
index 000000000..c55db77b0
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistPoint.go
@@ -0,0 +1,135 @@
+package goldilocks
+
+import (
+ "fmt"
+
+ fp "github.com/cloudflare/circl/math/fp448"
+)
+
+type twistPoint struct{ x, y, z, ta, tb fp.Elt }
+
+type preTwistPointAffine struct{ addYX, subYX, dt2 fp.Elt }
+
+type preTwistPointProy struct {
+ preTwistPointAffine
+ z2 fp.Elt
+}
+
+func (P *twistPoint) String() string {
+ return fmt.Sprintf("x: %v\ny: %v\nz: %v\nta: %v\ntb: %v", P.x, P.y, P.z, P.ta, P.tb)
+}
+
+// cneg conditionally negates the point if b=1.
+func (P *twistPoint) cneg(b uint) {
+ t := &fp.Elt{}
+ fp.Neg(t, &P.x)
+ fp.Cmov(&P.x, t, b)
+ fp.Neg(t, &P.ta)
+ fp.Cmov(&P.ta, t, b)
+}
+
+// Double updates P with 2P.
+func (P *twistPoint) Double() {
+ // This is formula (7) from "Twisted Edwards Curves Revisited" by
+ // Hisil H., Wong K.KH., Carter G., Dawson E. (2008)
+ // https://doi.org/10.1007/978-3-540-89255-7_20
+ Px, Py, Pz, Pta, Ptb := &P.x, &P.y, &P.z, &P.ta, &P.tb
+ a, b, c, e, f, g, h := Px, Py, Pz, Pta, Px, Py, Ptb
+ fp.Add(e, Px, Py) // x+y
+ fp.Sqr(a, Px) // A = x^2
+ fp.Sqr(b, Py) // B = y^2
+ fp.Sqr(c, Pz) // z^2
+ fp.Add(c, c, c) // C = 2*z^2
+ fp.Add(h, a, b) // H = A+B
+ fp.Sqr(e, e) // (x+y)^2
+ fp.Sub(e, e, h) // E = (x+y)^2-A-B
+ fp.Sub(g, b, a) // G = B-A
+ fp.Sub(f, c, g) // F = C-G
+ fp.Mul(Pz, f, g) // Z = F * G
+ fp.Mul(Px, e, f) // X = E * F
+ fp.Mul(Py, g, h) // Y = G * H, T = E * H
+}
+
+// mixAdd calculates P= P+Q, where Q is a precomputed point with Z_Q = 1.
+func (P *twistPoint) mixAddZ1(Q *preTwistPointAffine) {
+ fp.Add(&P.z, &P.z, &P.z) // D = 2*z1 (z2=1)
+ P.coreAddition(Q)
+}
+
+// coreAddition calculates P=P+Q for curves with A=-1.
+func (P *twistPoint) coreAddition(Q *preTwistPointAffine) {
+ // This is the formula following (5) from "Twisted Edwards Curves Revisited" by
+ // Hisil H., Wong K.KH., Carter G., Dawson E. (2008)
+ // https://doi.org/10.1007/978-3-540-89255-7_20
+ Px, Py, Pz, Pta, Ptb := &P.x, &P.y, &P.z, &P.ta, &P.tb
+ addYX2, subYX2, dt2 := &Q.addYX, &Q.subYX, &Q.dt2
+ a, b, c, d, e, f, g, h := Px, Py, &fp.Elt{}, Pz, Pta, Px, Py, Ptb
+ fp.Mul(c, Pta, Ptb) // t1 = ta*tb
+ fp.Sub(h, Py, Px) // y1-x1
+ fp.Add(b, Py, Px) // y1+x1
+ fp.Mul(a, h, subYX2) // A = (y1-x1)*(y2-x2)
+ fp.Mul(b, b, addYX2) // B = (y1+x1)*(y2+x2)
+ fp.Mul(c, c, dt2) // C = 2*D*t1*t2
+ fp.Sub(e, b, a) // E = B-A
+ fp.Add(h, b, a) // H = B+A
+ fp.Sub(f, d, c) // F = D-C
+ fp.Add(g, d, c) // G = D+C
+ fp.Mul(Pz, f, g) // Z = F * G
+ fp.Mul(Px, e, f) // X = E * F
+ fp.Mul(Py, g, h) // Y = G * H, T = E * H
+}
+
+func (P *preTwistPointAffine) neg() {
+ P.addYX, P.subYX = P.subYX, P.addYX
+ fp.Neg(&P.dt2, &P.dt2)
+}
+
+func (P *preTwistPointAffine) cneg(b int) {
+ t := &fp.Elt{}
+ fp.Cswap(&P.addYX, &P.subYX, uint(b))
+ fp.Neg(t, &P.dt2)
+ fp.Cmov(&P.dt2, t, uint(b))
+}
+
+func (P *preTwistPointAffine) cmov(Q *preTwistPointAffine, b uint) {
+ fp.Cmov(&P.addYX, &Q.addYX, b)
+ fp.Cmov(&P.subYX, &Q.subYX, b)
+ fp.Cmov(&P.dt2, &Q.dt2, b)
+}
+
+// mixAdd calculates P= P+Q, where Q is a precomputed point with Z_Q != 1.
+func (P *twistPoint) mixAdd(Q *preTwistPointProy) {
+ fp.Mul(&P.z, &P.z, &Q.z2) // D = 2*z1*z2
+ P.coreAddition(&Q.preTwistPointAffine)
+}
+
+// oddMultiples calculates T[i] = (2*i-1)P for 0 < i < len(T).
+func (P *twistPoint) oddMultiples(T []preTwistPointProy) {
+ if n := len(T); n > 0 {
+ T[0].FromTwistPoint(P)
+ _2P := *P
+ _2P.Double()
+ R := &preTwistPointProy{}
+ R.FromTwistPoint(&_2P)
+ for i := 1; i < n; i++ {
+ P.mixAdd(R)
+ T[i].FromTwistPoint(P)
+ }
+ }
+}
+
+// cmov conditionally moves Q into P if b=1.
+func (P *preTwistPointProy) cmov(Q *preTwistPointProy, b uint) {
+ P.preTwistPointAffine.cmov(&Q.preTwistPointAffine, b)
+ fp.Cmov(&P.z2, &Q.z2, b)
+}
+
+// FromTwistPoint precomputes some coordinates of Q for missed addition.
+func (P *preTwistPointProy) FromTwistPoint(Q *twistPoint) {
+ fp.Add(&P.addYX, &Q.y, &Q.x) // addYX = X + Y
+ fp.Sub(&P.subYX, &Q.y, &Q.x) // subYX = Y - X
+ fp.Mul(&P.dt2, &Q.ta, &Q.tb) // T = ta*tb
+ fp.Mul(&P.dt2, &P.dt2, ¶mDTwist) // D*T
+ fp.Add(&P.dt2, &P.dt2, &P.dt2) // dt2 = 2*D*T
+ fp.Add(&P.z2, &Q.z, &Q.z) // z2 = 2*Z
+}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistTables.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistTables.go
new file mode 100644
index 000000000..ed432e02c
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twistTables.go
@@ -0,0 +1,216 @@
+package goldilocks
+
+import fp "github.com/cloudflare/circl/math/fp448"
+
+var tabFixMult = [fxV][fx2w1]preTwistPointAffine{
+ {
+ {
+ addYX: fp.Elt{0x65, 0x4a, 0xdd, 0xdf, 0xb4, 0x79, 0x60, 0xc8, 0xa1, 0x70, 0xb4, 0x3a, 0x1e, 0x0c, 0x9b, 0x19, 0xe5, 0x48, 0x3f, 0xd7, 0x44, 0x18, 0x18, 0x14, 0x14, 0x27, 0x45, 0xd0, 0x2b, 0x24, 0xd5, 0x93, 0xc3, 0x74, 0x4c, 0x50, 0x70, 0x43, 0x26, 0x05, 0x08, 0x24, 0xca, 0x78, 0x30, 0xc1, 0x06, 0x8d, 0xd4, 0x86, 0x42, 0xf0, 0x14, 0xde, 0x08, 0x05},
+ subYX: fp.Elt{0x64, 0x4a, 0xdd, 0xdf, 0xb4, 0x79, 0x60, 0xc8, 0xa1, 0x70, 0xb4, 0x3a, 0x1e, 0x0c, 0x9b, 0x19, 0xe5, 0x48, 0x3f, 0xd7, 0x44, 0x18, 0x18, 0x14, 0x14, 0x27, 0x45, 0xd0, 0x2d, 0x24, 0xd5, 0x93, 0xc3, 0x74, 0x4c, 0x50, 0x70, 0x43, 0x26, 0x05, 0x08, 0x24, 0xca, 0x78, 0x30, 0xc1, 0x06, 0x8d, 0xd4, 0x86, 0x42, 0xf0, 0x14, 0xde, 0x08, 0x05},
+ dt2: fp.Elt{0x1a, 0x33, 0xea, 0x64, 0x45, 0x1c, 0xdf, 0x17, 0x1d, 0x16, 0x34, 0x28, 0xd6, 0x61, 0x19, 0x67, 0x79, 0xb4, 0x13, 0xcf, 0x3e, 0x7c, 0x0e, 0x72, 0xda, 0xf1, 0x5f, 0xda, 0xe6, 0xcf, 0x42, 0xd3, 0xb6, 0x17, 0xc2, 0x68, 0x13, 0x2d, 0xd9, 0x60, 0x3e, 0xae, 0xf0, 0x5b, 0x96, 0xf0, 0xcd, 0xaf, 0xea, 0xb7, 0x0d, 0x59, 0x16, 0xa7, 0xff, 0x55},
+ },
+ {
+ addYX: fp.Elt{0xca, 0xd8, 0x7d, 0x86, 0x1a, 0xef, 0xad, 0x11, 0xe3, 0x27, 0x41, 0x7e, 0x7f, 0x3e, 0xa9, 0xd2, 0xb5, 0x4e, 0x50, 0xe0, 0x77, 0x91, 0xc2, 0x13, 0x52, 0x73, 0x41, 0x09, 0xa6, 0x57, 0x9a, 0xc8, 0xa8, 0x90, 0x9d, 0x26, 0x14, 0xbb, 0xa1, 0x2a, 0xf7, 0x45, 0x43, 0x4e, 0xea, 0x35, 0x62, 0xe1, 0x08, 0x85, 0x46, 0xb8, 0x24, 0x05, 0x2d, 0xab},
+ subYX: fp.Elt{0x9b, 0xe6, 0xd3, 0xe5, 0xfe, 0x50, 0x36, 0x3c, 0x3c, 0x6d, 0x74, 0x1d, 0x74, 0xc0, 0xde, 0x5b, 0x45, 0x27, 0xe5, 0x12, 0xee, 0x63, 0x35, 0x6b, 0x13, 0xe2, 0x41, 0x6b, 0x3a, 0x05, 0x2b, 0xb1, 0x89, 0x26, 0xb6, 0xc6, 0xd1, 0x84, 0xff, 0x0e, 0x9b, 0xa3, 0xfb, 0x21, 0x36, 0x6b, 0x01, 0xf7, 0x9f, 0x7c, 0xeb, 0xf5, 0x18, 0x7a, 0x2a, 0x70},
+ dt2: fp.Elt{0x09, 0xad, 0x99, 0x1a, 0x38, 0xd3, 0xdf, 0x22, 0x37, 0x32, 0x61, 0x8b, 0xf3, 0x19, 0x48, 0x08, 0xe8, 0x49, 0xb6, 0x4a, 0xa7, 0xed, 0xa4, 0xa2, 0xee, 0x86, 0xd7, 0x31, 0x5e, 0xce, 0x95, 0x76, 0x86, 0x42, 0x1c, 0x9d, 0x07, 0x14, 0x8c, 0x34, 0x18, 0x9c, 0x6d, 0x3a, 0xdf, 0xa9, 0xe8, 0x36, 0x7e, 0xe4, 0x95, 0xbe, 0xb5, 0x09, 0xf8, 0x9c},
+ },
+ {
+ addYX: fp.Elt{0x51, 0xdb, 0x49, 0xa8, 0x9f, 0xe3, 0xd7, 0xec, 0x0d, 0x0f, 0x49, 0xe8, 0xb6, 0xc5, 0x0f, 0x5a, 0x1c, 0xce, 0x54, 0x0d, 0xb1, 0x8d, 0x5b, 0xbf, 0xf4, 0xaa, 0x34, 0x77, 0xc4, 0x5d, 0x59, 0xb6, 0xc5, 0x0e, 0x5a, 0xd8, 0x5b, 0x30, 0xc2, 0x1d, 0xec, 0x85, 0x1c, 0x42, 0xbe, 0x24, 0x2e, 0x50, 0x55, 0x44, 0xb2, 0x3a, 0x01, 0xaa, 0x98, 0xfb},
+ subYX: fp.Elt{0xe7, 0x29, 0xb7, 0xd0, 0xaa, 0x4f, 0x32, 0x53, 0x56, 0xde, 0xbc, 0xd1, 0x92, 0x5d, 0x19, 0xbe, 0xa3, 0xe3, 0x75, 0x48, 0xe0, 0x7a, 0x1b, 0x54, 0x7a, 0xb7, 0x41, 0x77, 0x84, 0x38, 0xdd, 0x14, 0x9f, 0xca, 0x3f, 0xa3, 0xc8, 0xa7, 0x04, 0x70, 0xf1, 0x4d, 0x3d, 0xb3, 0x84, 0x79, 0xcb, 0xdb, 0xe4, 0xc5, 0x42, 0x9b, 0x57, 0x19, 0xf1, 0x2d},
+ dt2: fp.Elt{0x20, 0xb4, 0x94, 0x9e, 0xdf, 0x31, 0x44, 0x0b, 0xc9, 0x7b, 0x75, 0x40, 0x9d, 0xd1, 0x96, 0x39, 0x70, 0x71, 0x15, 0xc8, 0x93, 0xd5, 0xc5, 0xe5, 0xba, 0xfe, 0xee, 0x08, 0x6a, 0x98, 0x0a, 0x1b, 0xb2, 0xaa, 0x3a, 0xf4, 0xa4, 0x79, 0xf9, 0x8e, 0x4d, 0x65, 0x10, 0x9b, 0x3a, 0x6e, 0x7c, 0x87, 0x94, 0x92, 0x11, 0x65, 0xbf, 0x1a, 0x09, 0xde},
+ },
+ {
+ addYX: fp.Elt{0xf3, 0x84, 0x76, 0x77, 0xa5, 0x6b, 0x27, 0x3b, 0x83, 0x3d, 0xdf, 0xa0, 0xeb, 0x32, 0x6d, 0x58, 0x81, 0x57, 0x64, 0xc2, 0x21, 0x7c, 0x9b, 0xea, 0xe6, 0xb0, 0x93, 0xf9, 0xe7, 0xc3, 0xed, 0x5a, 0x8e, 0xe2, 0xb4, 0x72, 0x76, 0x66, 0x0f, 0x22, 0x29, 0x94, 0x3e, 0x63, 0x48, 0x5e, 0x80, 0xcb, 0xac, 0xfa, 0x95, 0xb6, 0x4b, 0xc4, 0x95, 0x33},
+ subYX: fp.Elt{0x0c, 0x55, 0xd1, 0x5e, 0x5f, 0xbf, 0xbf, 0xe2, 0x4c, 0xfc, 0x37, 0x4a, 0xc4, 0xb1, 0xf4, 0x83, 0x61, 0x93, 0x60, 0x8e, 0x9f, 0x31, 0xf0, 0xa0, 0x41, 0xff, 0x1d, 0xe2, 0x7f, 0xca, 0x40, 0xd6, 0x88, 0xe8, 0x91, 0x61, 0xe2, 0x11, 0x18, 0x83, 0xf3, 0x25, 0x2f, 0x3f, 0x49, 0x40, 0xd4, 0x83, 0xe2, 0xd7, 0x74, 0x6a, 0x16, 0x86, 0x4e, 0xab},
+ dt2: fp.Elt{0xdd, 0x58, 0x65, 0xd8, 0x9f, 0xdd, 0x70, 0x7f, 0x0f, 0xec, 0xbd, 0x5c, 0x5c, 0x9b, 0x7e, 0x1b, 0x9f, 0x79, 0x36, 0x1f, 0xfd, 0x79, 0x10, 0x1c, 0x52, 0xf3, 0x22, 0xa4, 0x1f, 0x71, 0x6e, 0x63, 0x14, 0xf4, 0xa7, 0x3e, 0xbe, 0xad, 0x43, 0x30, 0x38, 0x8c, 0x29, 0xc6, 0xcf, 0x50, 0x75, 0x21, 0xe5, 0x78, 0xfd, 0xb0, 0x9a, 0xc4, 0x6d, 0xd4},
+ },
+ },
+ {
+ {
+ addYX: fp.Elt{0x7a, 0xa1, 0x38, 0xa6, 0xfd, 0x0e, 0x96, 0xd5, 0x26, 0x76, 0x86, 0x70, 0x80, 0x30, 0xa6, 0x67, 0xeb, 0xf4, 0x39, 0xdb, 0x22, 0xf5, 0x9f, 0x98, 0xe4, 0xb5, 0x3a, 0x0c, 0x59, 0xbf, 0x85, 0xc6, 0xf0, 0x0b, 0x1c, 0x41, 0x38, 0x09, 0x01, 0xdb, 0xd6, 0x3c, 0xb7, 0xf1, 0x08, 0x6b, 0x4b, 0x9e, 0x63, 0x53, 0x83, 0xd3, 0xab, 0xa3, 0x72, 0x0d},
+ subYX: fp.Elt{0x84, 0x68, 0x25, 0xe8, 0xe9, 0x8f, 0x91, 0xbf, 0xf7, 0xa4, 0x30, 0xae, 0xea, 0x9f, 0xdd, 0x56, 0x64, 0x09, 0xc9, 0x54, 0x68, 0x4e, 0x33, 0xc5, 0x6f, 0x7b, 0x2d, 0x52, 0x2e, 0x42, 0xbe, 0xbe, 0xf5, 0x64, 0xbf, 0x77, 0x54, 0xdf, 0xb0, 0x10, 0xd2, 0x16, 0x5d, 0xce, 0xaf, 0x9f, 0xfb, 0xa3, 0x63, 0x50, 0xcb, 0xc0, 0xd0, 0x88, 0x44, 0xa3},
+ dt2: fp.Elt{0xc3, 0x8b, 0xa5, 0xf1, 0x44, 0xe4, 0x41, 0xcd, 0x75, 0xe3, 0x17, 0x69, 0x5b, 0xb9, 0xbb, 0xee, 0x82, 0xbb, 0xce, 0x57, 0xdf, 0x2a, 0x9c, 0x12, 0xab, 0x66, 0x08, 0x68, 0x05, 0x1b, 0x87, 0xee, 0x5d, 0x1e, 0x18, 0x14, 0x22, 0x4b, 0x99, 0x61, 0x75, 0x28, 0xe7, 0x65, 0x1c, 0x36, 0xb6, 0x18, 0x09, 0xa8, 0xdf, 0xef, 0x30, 0x35, 0xbc, 0x58},
+ },
+ {
+ addYX: fp.Elt{0xc5, 0xd3, 0x0e, 0x6f, 0xaf, 0x06, 0x69, 0xc4, 0x07, 0x9e, 0x58, 0x6e, 0x3f, 0x49, 0xd9, 0x0a, 0x3c, 0x2c, 0x37, 0xcd, 0x27, 0x4d, 0x87, 0x91, 0x7a, 0xb0, 0x28, 0xad, 0x2f, 0x68, 0x92, 0x05, 0x97, 0xf1, 0x30, 0x5f, 0x4c, 0x10, 0x20, 0x30, 0xd3, 0x08, 0x3f, 0xc1, 0xc6, 0xb7, 0xb5, 0xd1, 0x71, 0x7b, 0xa8, 0x0a, 0xd8, 0xf5, 0x17, 0xcf},
+ subYX: fp.Elt{0x64, 0xd4, 0x8f, 0x91, 0x40, 0xab, 0x6e, 0x1a, 0x62, 0x83, 0xdc, 0xd7, 0x30, 0x1a, 0x4a, 0x2a, 0x4c, 0x54, 0x86, 0x19, 0x81, 0x5d, 0x04, 0x52, 0xa3, 0xca, 0x82, 0x38, 0xdc, 0x1e, 0xf0, 0x7a, 0x78, 0x76, 0x49, 0x4f, 0x71, 0xc4, 0x74, 0x2f, 0xf0, 0x5b, 0x2e, 0x5e, 0xac, 0xef, 0x17, 0xe4, 0x8e, 0x6e, 0xed, 0x43, 0x23, 0x61, 0x99, 0x49},
+ dt2: fp.Elt{0x64, 0x90, 0x72, 0x76, 0xf8, 0x2c, 0x7d, 0x57, 0xf9, 0x30, 0x5e, 0x7a, 0x10, 0x74, 0x19, 0x39, 0xd9, 0xaf, 0x0a, 0xf1, 0x43, 0xed, 0x88, 0x9c, 0x8b, 0xdc, 0x9b, 0x1c, 0x90, 0xe7, 0xf7, 0xa3, 0xa5, 0x0d, 0xc6, 0xbc, 0x30, 0xfb, 0x91, 0x1a, 0x51, 0xba, 0x2d, 0xbe, 0x89, 0xdf, 0x1d, 0xdc, 0x53, 0xa8, 0x82, 0x8a, 0xd3, 0x8d, 0x16, 0x68},
+ },
+ {
+ addYX: fp.Elt{0xef, 0x5c, 0xe3, 0x74, 0xbf, 0x13, 0x4a, 0xbf, 0x66, 0x73, 0x64, 0xb7, 0xd4, 0xce, 0x98, 0x82, 0x05, 0xfa, 0x98, 0x0c, 0x0a, 0xae, 0xe5, 0x6b, 0x9f, 0xac, 0xbb, 0x6e, 0x1f, 0xcf, 0xff, 0xa6, 0x71, 0x9a, 0xa8, 0x7a, 0x9e, 0x64, 0x1f, 0x20, 0x4a, 0x61, 0xa2, 0xd6, 0x50, 0xe3, 0xba, 0x81, 0x0c, 0x50, 0x59, 0x69, 0x59, 0x15, 0x55, 0xdb},
+ subYX: fp.Elt{0xe8, 0x77, 0x4d, 0xe8, 0x66, 0x3d, 0xc1, 0x00, 0x3c, 0xf2, 0x25, 0x00, 0xdc, 0xb2, 0xe5, 0x9b, 0x12, 0x89, 0xf3, 0xd6, 0xea, 0x85, 0x60, 0xfe, 0x67, 0x91, 0xfd, 0x04, 0x7c, 0xe0, 0xf1, 0x86, 0x06, 0x11, 0x66, 0xee, 0xd4, 0xd5, 0xbe, 0x3b, 0x0f, 0xe3, 0x59, 0xb3, 0x4f, 0x00, 0xb6, 0xce, 0x80, 0xc1, 0x61, 0xf7, 0xaf, 0x04, 0x6a, 0x3c},
+ dt2: fp.Elt{0x00, 0xd7, 0x32, 0x93, 0x67, 0x70, 0x6f, 0xd7, 0x69, 0xab, 0xb1, 0xd3, 0xdc, 0xd6, 0xa8, 0xdd, 0x35, 0x25, 0xca, 0xd3, 0x8a, 0x6d, 0xce, 0xfb, 0xfd, 0x2b, 0x83, 0xf0, 0xd4, 0xac, 0x66, 0xfb, 0x72, 0x87, 0x7e, 0x55, 0xb7, 0x91, 0x58, 0x10, 0xc3, 0x11, 0x7e, 0x15, 0xfe, 0x7c, 0x55, 0x90, 0xa3, 0x9e, 0xed, 0x9a, 0x7f, 0xa7, 0xb7, 0xeb},
+ },
+ {
+ addYX: fp.Elt{0x25, 0x0f, 0xc2, 0x09, 0x9c, 0x10, 0xc8, 0x7c, 0x93, 0xa7, 0xbe, 0xe9, 0x26, 0x25, 0x7c, 0x21, 0xfe, 0xe7, 0x5f, 0x3c, 0x02, 0x83, 0xa7, 0x9e, 0xdf, 0xc0, 0x94, 0x2b, 0x7d, 0x1a, 0xd0, 0x1d, 0xcc, 0x2e, 0x7d, 0xd4, 0x85, 0xe7, 0xc1, 0x15, 0x66, 0xd6, 0xd6, 0x32, 0xb8, 0xf7, 0x63, 0xaa, 0x3b, 0xa5, 0xea, 0x49, 0xad, 0x88, 0x9b, 0x66},
+ subYX: fp.Elt{0x09, 0x97, 0x79, 0x36, 0x41, 0x56, 0x9b, 0xdf, 0x15, 0xd8, 0x43, 0x28, 0x17, 0x5b, 0x96, 0xc9, 0xcf, 0x39, 0x1f, 0x13, 0xf7, 0x4d, 0x1d, 0x1f, 0xda, 0x51, 0x56, 0xe7, 0x0a, 0x5a, 0x65, 0xb6, 0x2a, 0x87, 0x49, 0x86, 0xc2, 0x2b, 0xcd, 0xfe, 0x07, 0xf6, 0x4c, 0xe2, 0x1d, 0x9b, 0xd8, 0x82, 0x09, 0x5b, 0x11, 0x10, 0x62, 0x56, 0x89, 0xbd},
+ dt2: fp.Elt{0xd9, 0x15, 0x73, 0xf2, 0x96, 0x35, 0x53, 0xb0, 0xe7, 0xa8, 0x0b, 0x93, 0x35, 0x0b, 0x3a, 0x00, 0xf5, 0x18, 0xb1, 0xc3, 0x12, 0x3f, 0x91, 0x17, 0xc1, 0x4c, 0x15, 0x5a, 0x86, 0x92, 0x11, 0xbd, 0x44, 0x40, 0x5a, 0x7b, 0x15, 0x89, 0xba, 0xc1, 0xc1, 0xbc, 0x43, 0x45, 0xe6, 0x52, 0x02, 0x73, 0x0a, 0xd0, 0x2a, 0x19, 0xda, 0x47, 0xa8, 0xff},
+ },
+ },
+}
+
+// tabVerif contains the odd multiples of P. The entry T[i] = (2i+1)P, where
+// P = phi(G) and G is the generator of the Goldilocks curve, and phi is a
+// 4-degree isogeny.
+var tabVerif = [1 << (omegaFix - 2)]preTwistPointAffine{
+ { /* 1P*/
+ addYX: fp.Elt{0x65, 0x4a, 0xdd, 0xdf, 0xb4, 0x79, 0x60, 0xc8, 0xa1, 0x70, 0xb4, 0x3a, 0x1e, 0x0c, 0x9b, 0x19, 0xe5, 0x48, 0x3f, 0xd7, 0x44, 0x18, 0x18, 0x14, 0x14, 0x27, 0x45, 0xd0, 0x2b, 0x24, 0xd5, 0x93, 0xc3, 0x74, 0x4c, 0x50, 0x70, 0x43, 0x26, 0x05, 0x08, 0x24, 0xca, 0x78, 0x30, 0xc1, 0x06, 0x8d, 0xd4, 0x86, 0x42, 0xf0, 0x14, 0xde, 0x08, 0x05},
+ subYX: fp.Elt{0x64, 0x4a, 0xdd, 0xdf, 0xb4, 0x79, 0x60, 0xc8, 0xa1, 0x70, 0xb4, 0x3a, 0x1e, 0x0c, 0x9b, 0x19, 0xe5, 0x48, 0x3f, 0xd7, 0x44, 0x18, 0x18, 0x14, 0x14, 0x27, 0x45, 0xd0, 0x2d, 0x24, 0xd5, 0x93, 0xc3, 0x74, 0x4c, 0x50, 0x70, 0x43, 0x26, 0x05, 0x08, 0x24, 0xca, 0x78, 0x30, 0xc1, 0x06, 0x8d, 0xd4, 0x86, 0x42, 0xf0, 0x14, 0xde, 0x08, 0x05},
+ dt2: fp.Elt{0x1a, 0x33, 0xea, 0x64, 0x45, 0x1c, 0xdf, 0x17, 0x1d, 0x16, 0x34, 0x28, 0xd6, 0x61, 0x19, 0x67, 0x79, 0xb4, 0x13, 0xcf, 0x3e, 0x7c, 0x0e, 0x72, 0xda, 0xf1, 0x5f, 0xda, 0xe6, 0xcf, 0x42, 0xd3, 0xb6, 0x17, 0xc2, 0x68, 0x13, 0x2d, 0xd9, 0x60, 0x3e, 0xae, 0xf0, 0x5b, 0x96, 0xf0, 0xcd, 0xaf, 0xea, 0xb7, 0x0d, 0x59, 0x16, 0xa7, 0xff, 0x55},
+ },
+ { /* 3P*/
+ addYX: fp.Elt{0xd1, 0xe9, 0xa8, 0x33, 0x20, 0x76, 0x18, 0x08, 0x45, 0x2a, 0xc9, 0x67, 0x2a, 0xc3, 0x15, 0x24, 0xf9, 0x74, 0x21, 0x30, 0x99, 0x59, 0x8b, 0xb2, 0xf0, 0xa4, 0x07, 0xe2, 0x6a, 0x36, 0x8d, 0xd9, 0xd2, 0x4a, 0x7f, 0x73, 0x50, 0x39, 0x3d, 0xaa, 0xa7, 0x51, 0x73, 0x0d, 0x2b, 0x8b, 0x96, 0x47, 0xac, 0x3c, 0x5d, 0xaa, 0x39, 0x9c, 0xcf, 0xd5},
+ subYX: fp.Elt{0x6b, 0x11, 0x5d, 0x1a, 0xf9, 0x41, 0x9d, 0xc5, 0x30, 0x3e, 0xad, 0x25, 0x2c, 0x04, 0x45, 0xea, 0xcc, 0x67, 0x07, 0x85, 0xe9, 0xda, 0x0e, 0xb5, 0x40, 0xb7, 0x32, 0xb4, 0x49, 0xdd, 0xff, 0xaa, 0xfc, 0xbb, 0x19, 0xca, 0x8b, 0x79, 0x2b, 0x8f, 0x8d, 0x00, 0x33, 0xc2, 0xad, 0xe9, 0xd3, 0x12, 0xa8, 0xaa, 0x87, 0x62, 0xad, 0x2d, 0xff, 0xa4},
+ dt2: fp.Elt{0xb0, 0xaf, 0x3b, 0xea, 0xf0, 0x42, 0x0b, 0x5e, 0x88, 0xd3, 0x98, 0x08, 0x87, 0x59, 0x72, 0x0a, 0xc2, 0xdf, 0xcb, 0x7f, 0x59, 0xb5, 0x4c, 0x63, 0x68, 0xe8, 0x41, 0x38, 0x67, 0x4f, 0xe9, 0xc6, 0xb2, 0x6b, 0x08, 0xa7, 0xf7, 0x0e, 0xcd, 0xea, 0xca, 0x3d, 0xaf, 0x8e, 0xda, 0x4b, 0x2e, 0xd2, 0x88, 0x64, 0x8d, 0xc5, 0x5f, 0x76, 0x0f, 0x3d},
+ },
+ { /* 5P*/
+ addYX: fp.Elt{0xe5, 0x65, 0xc9, 0xe2, 0x75, 0xf0, 0x7d, 0x1a, 0xba, 0xa4, 0x40, 0x4b, 0x93, 0x12, 0xa2, 0x80, 0x95, 0x0d, 0x03, 0x93, 0xe8, 0xa5, 0x4d, 0xe2, 0x3d, 0x81, 0xf5, 0xce, 0xd4, 0x2d, 0x25, 0x59, 0x16, 0x5c, 0xe7, 0xda, 0xc7, 0x45, 0xd2, 0x7e, 0x2c, 0x38, 0xd4, 0x37, 0x64, 0xb2, 0xc2, 0x28, 0xc5, 0x72, 0x16, 0x32, 0x45, 0x36, 0x6f, 0x9f},
+ subYX: fp.Elt{0x09, 0xf4, 0x7e, 0xbd, 0x89, 0xdb, 0x19, 0x58, 0xe1, 0x08, 0x00, 0x8a, 0xf4, 0x5f, 0x2a, 0x32, 0x40, 0xf0, 0x2c, 0x3f, 0x5d, 0xe4, 0xfc, 0x89, 0x11, 0x24, 0xb4, 0x2f, 0x97, 0xad, 0xac, 0x8f, 0x19, 0xab, 0xfa, 0x12, 0xe5, 0xf9, 0x50, 0x4e, 0x50, 0x6f, 0x32, 0x30, 0x88, 0xa6, 0xe5, 0x48, 0x28, 0xa2, 0x1b, 0x9f, 0xcd, 0xe2, 0x43, 0x38},
+ dt2: fp.Elt{0xa9, 0xcc, 0x53, 0x39, 0x86, 0x02, 0x60, 0x75, 0x34, 0x99, 0x57, 0xbd, 0xfc, 0x5a, 0x8e, 0xce, 0x5e, 0x98, 0x22, 0xd0, 0xa5, 0x24, 0xff, 0x90, 0x28, 0x9f, 0x58, 0xf3, 0x39, 0xe9, 0xba, 0x36, 0x23, 0xfb, 0x7f, 0x41, 0xcc, 0x2b, 0x5a, 0x25, 0x3f, 0x4c, 0x2a, 0xf1, 0x52, 0x6f, 0x2f, 0x07, 0xe3, 0x88, 0x81, 0x77, 0xdd, 0x7c, 0x88, 0x82},
+ },
+ { /* 7P*/
+ addYX: fp.Elt{0xf7, 0xee, 0x88, 0xfd, 0x3a, 0xbf, 0x7e, 0x28, 0x39, 0x23, 0x79, 0xe6, 0x5c, 0x56, 0xcb, 0xb5, 0x48, 0x6a, 0x80, 0x6d, 0x37, 0x60, 0x6c, 0x10, 0x35, 0x49, 0x4b, 0x46, 0x60, 0xd4, 0x79, 0xd4, 0x53, 0xd3, 0x67, 0x88, 0xd0, 0x41, 0xd5, 0x43, 0x85, 0xc8, 0x71, 0xe3, 0x1c, 0xb6, 0xda, 0x22, 0x64, 0x8f, 0x80, 0xac, 0xad, 0x7d, 0xd5, 0x82},
+ subYX: fp.Elt{0x92, 0x40, 0xc1, 0x83, 0x21, 0x9b, 0xd5, 0x7d, 0x3f, 0x29, 0xb6, 0x26, 0xef, 0x12, 0xb9, 0x27, 0x39, 0x42, 0x37, 0x97, 0x09, 0x9a, 0x08, 0xe1, 0x68, 0xb6, 0x7a, 0x3f, 0x9f, 0x45, 0xf8, 0x37, 0x19, 0x83, 0x97, 0xe6, 0x73, 0x30, 0x32, 0x35, 0xcf, 0xae, 0x5c, 0x12, 0x68, 0xdf, 0x6e, 0x2b, 0xde, 0x83, 0xa0, 0x44, 0x74, 0x2e, 0x4a, 0xe9},
+ dt2: fp.Elt{0xcb, 0x22, 0x0a, 0xda, 0x6b, 0xc1, 0x8a, 0x29, 0xa1, 0xac, 0x8b, 0x5b, 0x8b, 0x32, 0x20, 0xf2, 0x21, 0xae, 0x0c, 0x43, 0xc4, 0xd7, 0x19, 0x37, 0x3d, 0x79, 0x25, 0x98, 0x6c, 0x9c, 0x22, 0x31, 0x2a, 0x55, 0x9f, 0xda, 0x5e, 0xa8, 0x13, 0xdb, 0x8e, 0x2e, 0x16, 0x39, 0xf4, 0x91, 0x6f, 0xec, 0x71, 0x71, 0xc9, 0x10, 0xf2, 0xa4, 0x8f, 0x11},
+ },
+ { /* 9P*/
+ addYX: fp.Elt{0x85, 0xdd, 0x37, 0x62, 0x74, 0x8e, 0x33, 0x5b, 0x25, 0x12, 0x1b, 0xe7, 0xdf, 0x47, 0xe5, 0x12, 0xfd, 0x3a, 0x3a, 0xf5, 0x5d, 0x4c, 0xa2, 0x29, 0x3c, 0x5c, 0x2f, 0xee, 0x18, 0x19, 0x0a, 0x2b, 0xef, 0x67, 0x50, 0x7a, 0x0d, 0x29, 0xae, 0x55, 0x82, 0xcd, 0xd6, 0x41, 0x90, 0xb4, 0x13, 0x31, 0x5d, 0x11, 0xb8, 0xaa, 0x12, 0x86, 0x08, 0xac},
+ subYX: fp.Elt{0xcc, 0x37, 0x8d, 0x83, 0x5f, 0xfd, 0xde, 0xd5, 0xf7, 0xf1, 0xae, 0x0a, 0xa7, 0x0b, 0xeb, 0x6d, 0x19, 0x8a, 0xb6, 0x1a, 0x59, 0xd8, 0xff, 0x3c, 0xbc, 0xbc, 0xef, 0x9c, 0xda, 0x7b, 0x75, 0x12, 0xaf, 0x80, 0x8f, 0x2c, 0x3c, 0xaa, 0x0b, 0x17, 0x86, 0x36, 0x78, 0x18, 0xc8, 0x8a, 0xf6, 0xb8, 0x2c, 0x2f, 0x57, 0x2c, 0x62, 0x57, 0xf6, 0x90},
+ dt2: fp.Elt{0x83, 0xbc, 0xa2, 0x07, 0xa5, 0x38, 0x96, 0xea, 0xfe, 0x11, 0x46, 0x1d, 0x3b, 0xcd, 0x42, 0xc5, 0xee, 0x67, 0x04, 0x72, 0x08, 0xd8, 0xd9, 0x96, 0x07, 0xf7, 0xac, 0xc3, 0x64, 0xf1, 0x98, 0x2c, 0x55, 0xd7, 0x7d, 0xc8, 0x6c, 0xbd, 0x2c, 0xff, 0x15, 0xd6, 0x6e, 0xb8, 0x17, 0x8e, 0xa8, 0x27, 0x66, 0xb1, 0x73, 0x79, 0x96, 0xff, 0x29, 0x10},
+ },
+ { /* 11P*/
+ addYX: fp.Elt{0x76, 0xcb, 0x9b, 0x0c, 0x5b, 0xfe, 0xe1, 0x2a, 0xdd, 0x6f, 0x6c, 0xdd, 0x6f, 0xb4, 0xc0, 0xc2, 0x1b, 0x4b, 0x38, 0xe8, 0x66, 0x8c, 0x1e, 0x31, 0x63, 0xb9, 0x94, 0xcd, 0xc3, 0x8c, 0x44, 0x25, 0x7b, 0xd5, 0x39, 0x80, 0xfc, 0x01, 0xaa, 0xf7, 0x2a, 0x61, 0x8a, 0x25, 0xd2, 0x5f, 0xc5, 0x66, 0x38, 0xa4, 0x17, 0xcf, 0x3e, 0x11, 0x0f, 0xa3},
+ subYX: fp.Elt{0xe0, 0xb6, 0xd1, 0x9c, 0x71, 0x49, 0x2e, 0x7b, 0xde, 0x00, 0xda, 0x6b, 0xf1, 0xec, 0xe6, 0x7a, 0x15, 0x38, 0x71, 0xe9, 0x7b, 0xdb, 0xf8, 0x98, 0xc0, 0x91, 0x2e, 0x53, 0xee, 0x92, 0x87, 0x25, 0xc9, 0xb0, 0xbb, 0x33, 0x15, 0x46, 0x7f, 0xfd, 0x4f, 0x8b, 0x77, 0x05, 0x96, 0xb6, 0xe2, 0x08, 0xdb, 0x0d, 0x09, 0xee, 0x5b, 0xd1, 0x2a, 0x63},
+ dt2: fp.Elt{0x8f, 0x7b, 0x57, 0x8c, 0xbf, 0x06, 0x0d, 0x43, 0x21, 0x92, 0x94, 0x2d, 0x6a, 0x38, 0x07, 0x0f, 0xa0, 0xf1, 0xe3, 0xd8, 0x2a, 0xbf, 0x46, 0xc6, 0x9e, 0x1f, 0x8f, 0x2b, 0x46, 0x84, 0x0b, 0x74, 0xed, 0xff, 0xf8, 0xa5, 0x94, 0xae, 0xf1, 0x67, 0xb1, 0x9b, 0xdd, 0x4a, 0xd0, 0xdb, 0xc2, 0xb5, 0x58, 0x49, 0x0c, 0xa9, 0x1d, 0x7d, 0xa9, 0xd3},
+ },
+ { /* 13P*/
+ addYX: fp.Elt{0x73, 0x84, 0x2e, 0x31, 0x1f, 0xdc, 0xed, 0x9f, 0x74, 0xfa, 0xe0, 0x35, 0xb1, 0x85, 0x6a, 0x8d, 0x86, 0xd0, 0xff, 0xd6, 0x08, 0x43, 0x73, 0x1a, 0xd5, 0xf8, 0x43, 0xd4, 0xb3, 0xe5, 0x3f, 0xa8, 0x84, 0x17, 0x59, 0x65, 0x4e, 0xe6, 0xee, 0x54, 0x9c, 0xda, 0x5e, 0x7e, 0x98, 0x29, 0x6d, 0x73, 0x34, 0x1f, 0x99, 0x80, 0x54, 0x54, 0x81, 0x0b},
+ subYX: fp.Elt{0xb1, 0xe5, 0xbb, 0x80, 0x22, 0x9c, 0x81, 0x6d, 0xaf, 0x27, 0x65, 0x6f, 0x7e, 0x9c, 0xb6, 0x8d, 0x35, 0x5c, 0x2e, 0x20, 0x48, 0x7a, 0x28, 0xf0, 0x97, 0xfe, 0xb7, 0x71, 0xce, 0xd6, 0xad, 0x3a, 0x81, 0xf6, 0x74, 0x5e, 0xf3, 0xfd, 0x1b, 0xd4, 0x1e, 0x7c, 0xc2, 0xb7, 0xc8, 0xa6, 0xc9, 0x89, 0x03, 0x47, 0xec, 0x24, 0xd6, 0x0e, 0xec, 0x9c},
+ dt2: fp.Elt{0x91, 0x0a, 0x43, 0x34, 0x20, 0xc2, 0x64, 0xf7, 0x4e, 0x48, 0xc8, 0xd2, 0x95, 0x83, 0xd1, 0xa4, 0xfb, 0x4e, 0x41, 0x3b, 0x0d, 0xd5, 0x07, 0xd9, 0xf1, 0x13, 0x16, 0x78, 0x54, 0x57, 0xd0, 0xf1, 0x4f, 0x20, 0xac, 0xcf, 0x9c, 0x3b, 0x33, 0x0b, 0x99, 0x54, 0xc3, 0x7f, 0x3e, 0x57, 0x26, 0x86, 0xd5, 0xa5, 0x2b, 0x8d, 0xe3, 0x19, 0x36, 0xf7},
+ },
+ { /* 15P*/
+ addYX: fp.Elt{0x23, 0x69, 0x47, 0x14, 0xf9, 0x9a, 0x50, 0xff, 0x64, 0xd1, 0x50, 0x35, 0xc3, 0x11, 0xd3, 0x19, 0xcf, 0x87, 0xda, 0x30, 0x0b, 0x50, 0xda, 0xc0, 0xe0, 0x25, 0x00, 0xe5, 0x68, 0x93, 0x04, 0xc2, 0xaf, 0xbd, 0x2f, 0x36, 0x5f, 0x47, 0x96, 0x10, 0xa8, 0xbd, 0xe4, 0x88, 0xac, 0x80, 0x52, 0x61, 0x73, 0xe9, 0x63, 0xdd, 0x99, 0xad, 0x20, 0x5b},
+ subYX: fp.Elt{0x1b, 0x5e, 0xa2, 0x2a, 0x25, 0x0f, 0x86, 0xc0, 0xb1, 0x2e, 0x0c, 0x13, 0x40, 0x8d, 0xf0, 0xe6, 0x00, 0x55, 0x08, 0xc5, 0x7d, 0xf4, 0xc9, 0x31, 0x25, 0x3a, 0x99, 0x69, 0xdd, 0x67, 0x63, 0x9a, 0xd6, 0x89, 0x2e, 0xa1, 0x19, 0xca, 0x2c, 0xd9, 0x59, 0x5f, 0x5d, 0xc3, 0x6e, 0x62, 0x36, 0x12, 0x59, 0x15, 0xe1, 0xdc, 0xa4, 0xad, 0xc9, 0xd0},
+ dt2: fp.Elt{0xbc, 0xea, 0xfc, 0xaf, 0x66, 0x23, 0xb7, 0x39, 0x6b, 0x2a, 0x96, 0xa8, 0x54, 0x43, 0xe9, 0xaa, 0x32, 0x40, 0x63, 0x92, 0x5e, 0xdf, 0x35, 0xc2, 0x9f, 0x24, 0x0c, 0xed, 0xfc, 0xde, 0x73, 0x8f, 0xa7, 0xd5, 0xa3, 0x2b, 0x18, 0x1f, 0xb0, 0xf8, 0xeb, 0x55, 0xd9, 0xc3, 0xfd, 0x28, 0x7c, 0x4f, 0xce, 0x0d, 0xf7, 0xae, 0xc2, 0x83, 0xc3, 0x78},
+ },
+ { /* 17P*/
+ addYX: fp.Elt{0x71, 0xe6, 0x60, 0x93, 0x37, 0xdb, 0x01, 0xa5, 0x4c, 0xba, 0xe8, 0x8e, 0xd5, 0xf9, 0xd3, 0x98, 0xe5, 0xeb, 0xab, 0x3a, 0x15, 0x8b, 0x35, 0x60, 0xbe, 0xe5, 0x9c, 0x2d, 0x10, 0x9b, 0x2e, 0xcf, 0x65, 0x64, 0xea, 0x8f, 0x72, 0xce, 0xf5, 0x18, 0xe5, 0xe2, 0xf0, 0x0e, 0xae, 0x04, 0xec, 0xa0, 0x20, 0x65, 0x63, 0x07, 0xb1, 0x9f, 0x03, 0x97},
+ subYX: fp.Elt{0x9e, 0x41, 0x64, 0x30, 0x95, 0x7f, 0x3a, 0x89, 0x7b, 0x0a, 0x79, 0x59, 0x23, 0x9a, 0x3b, 0xfe, 0xa4, 0x13, 0x08, 0xb2, 0x2e, 0x04, 0x50, 0x10, 0x30, 0xcd, 0x2e, 0xa4, 0x91, 0x71, 0x50, 0x36, 0x4a, 0x02, 0xf4, 0x8d, 0xa3, 0x36, 0x1b, 0xf4, 0x52, 0xba, 0x15, 0x04, 0x8b, 0x80, 0x25, 0xd9, 0xae, 0x67, 0x20, 0xd9, 0x88, 0x8f, 0x97, 0xa6},
+ dt2: fp.Elt{0xb5, 0xe7, 0x46, 0xbd, 0x55, 0x23, 0xa0, 0x68, 0xc0, 0x12, 0xd9, 0xf1, 0x0a, 0x75, 0xe2, 0xda, 0xf4, 0x6b, 0xca, 0x14, 0xe4, 0x9f, 0x0f, 0xb5, 0x3c, 0xa6, 0xa5, 0xa2, 0x63, 0x94, 0xd1, 0x1c, 0x39, 0x58, 0x57, 0x02, 0x27, 0x98, 0xb6, 0x47, 0xc6, 0x61, 0x4b, 0x5c, 0xab, 0x6f, 0x2d, 0xab, 0xe3, 0xc1, 0x69, 0xf9, 0x12, 0xb0, 0xc8, 0xd5},
+ },
+ { /* 19P*/
+ addYX: fp.Elt{0x19, 0x7d, 0xd5, 0xac, 0x79, 0xa2, 0x82, 0x9b, 0x28, 0x31, 0x22, 0xc0, 0x73, 0x02, 0x76, 0x17, 0x10, 0x70, 0x79, 0x57, 0xc9, 0x84, 0x62, 0x8e, 0x04, 0x04, 0x61, 0x67, 0x08, 0x48, 0xb4, 0x4b, 0xde, 0x53, 0x8c, 0xff, 0x36, 0x1b, 0x62, 0x86, 0x5d, 0xe1, 0x9b, 0xb1, 0xe5, 0xe8, 0x44, 0x64, 0xa1, 0x68, 0x3f, 0xa8, 0x45, 0x52, 0x91, 0xed},
+ subYX: fp.Elt{0x42, 0x1a, 0x36, 0x1f, 0x90, 0x15, 0x24, 0x8d, 0x24, 0x80, 0xe6, 0xfe, 0x1e, 0xf0, 0xad, 0xaf, 0x6a, 0x93, 0xf0, 0xa6, 0x0d, 0x5d, 0xea, 0xf6, 0x62, 0x96, 0x7a, 0x05, 0x76, 0x85, 0x74, 0x32, 0xc7, 0xc8, 0x64, 0x53, 0x62, 0xe7, 0x54, 0x84, 0xe0, 0x40, 0x66, 0x19, 0x70, 0x40, 0x95, 0x35, 0x68, 0x64, 0x43, 0xcd, 0xba, 0x29, 0x32, 0xa8},
+ dt2: fp.Elt{0x3e, 0xf6, 0xd6, 0xe4, 0x99, 0xeb, 0x20, 0x66, 0x08, 0x2e, 0x26, 0x64, 0xd7, 0x76, 0xf3, 0xb4, 0xc5, 0xa4, 0x35, 0x92, 0xd2, 0x99, 0x70, 0x5a, 0x1a, 0xe9, 0xe9, 0x3d, 0x3b, 0xe1, 0xcd, 0x0e, 0xee, 0x24, 0x13, 0x03, 0x22, 0xd6, 0xd6, 0x72, 0x08, 0x2b, 0xde, 0xfd, 0x93, 0xed, 0x0c, 0x7f, 0x5e, 0x31, 0x22, 0x4d, 0x80, 0x78, 0xc0, 0x48},
+ },
+ { /* 21P*/
+ addYX: fp.Elt{0x8f, 0x72, 0xd2, 0x9e, 0xc4, 0xcd, 0x2c, 0xbf, 0xa8, 0xd3, 0x24, 0x62, 0x28, 0xee, 0x39, 0x0a, 0x19, 0x3a, 0x58, 0xff, 0x21, 0x2e, 0x69, 0x6c, 0x6e, 0x18, 0xd0, 0xcd, 0x61, 0xc1, 0x18, 0x02, 0x5a, 0xe9, 0xe3, 0xef, 0x1f, 0x8e, 0x10, 0xe8, 0x90, 0x2b, 0x48, 0xcd, 0xee, 0x38, 0xbd, 0x3a, 0xca, 0xbc, 0x2d, 0xe2, 0x3a, 0x03, 0x71, 0x02},
+ subYX: fp.Elt{0xf8, 0xa4, 0x32, 0x26, 0x66, 0xaf, 0x3b, 0x53, 0xe7, 0xb0, 0x91, 0x92, 0xf5, 0x3c, 0x74, 0xce, 0xf2, 0xdd, 0x68, 0xa9, 0xf4, 0xcd, 0x5f, 0x60, 0xab, 0x71, 0xdf, 0xcd, 0x5c, 0x5d, 0x51, 0x72, 0x3a, 0x96, 0xea, 0xd6, 0xde, 0x54, 0x8e, 0x55, 0x4c, 0x08, 0x4c, 0x60, 0xdd, 0x34, 0xa9, 0x6f, 0xf3, 0x04, 0x02, 0xa8, 0xa6, 0x4e, 0x4d, 0x62},
+ dt2: fp.Elt{0x76, 0x4a, 0xae, 0x38, 0x62, 0x69, 0x72, 0xdc, 0xe8, 0x43, 0xbe, 0x1d, 0x61, 0xde, 0x31, 0xc3, 0x42, 0x8f, 0x33, 0x9d, 0xca, 0xc7, 0x9c, 0xec, 0x6a, 0xe2, 0xaa, 0x01, 0x49, 0x78, 0x8d, 0x72, 0x4f, 0x38, 0xea, 0x52, 0xc2, 0xd3, 0xc9, 0x39, 0x71, 0xba, 0xb9, 0x09, 0x9b, 0xa3, 0x7f, 0x45, 0x43, 0x65, 0x36, 0x29, 0xca, 0xe7, 0x5c, 0x5f},
+ },
+ { /* 23P*/
+ addYX: fp.Elt{0x89, 0x42, 0x35, 0x48, 0x6d, 0x74, 0xe5, 0x1f, 0xc3, 0xdd, 0x28, 0x5b, 0x84, 0x41, 0x33, 0x9f, 0x42, 0xf3, 0x1d, 0x5d, 0x15, 0x6d, 0x76, 0x33, 0x36, 0xaf, 0xe9, 0xdd, 0xfa, 0x63, 0x4f, 0x7a, 0x9c, 0xeb, 0x1c, 0x4f, 0x34, 0x65, 0x07, 0x54, 0xbb, 0x4c, 0x8b, 0x62, 0x9d, 0xd0, 0x06, 0x99, 0xb3, 0xe9, 0xda, 0x85, 0x19, 0xb0, 0x3d, 0x3c},
+ subYX: fp.Elt{0xbb, 0x99, 0xf6, 0xbf, 0xaf, 0x2c, 0x22, 0x0d, 0x7a, 0xaa, 0x98, 0x6f, 0x01, 0x82, 0x99, 0xcf, 0x88, 0xbd, 0x0e, 0x3a, 0x89, 0xe0, 0x9c, 0x8c, 0x17, 0x20, 0xc4, 0xe0, 0xcf, 0x43, 0x7a, 0xef, 0x0d, 0x9f, 0x87, 0xd4, 0xfb, 0xf2, 0x96, 0xb8, 0x03, 0xe8, 0xcb, 0x5c, 0xec, 0x65, 0x5f, 0x49, 0xa4, 0x7c, 0x85, 0xb4, 0xf6, 0xc7, 0xdb, 0xa3},
+ dt2: fp.Elt{0x11, 0xf3, 0x32, 0xa3, 0xa7, 0xb2, 0x7d, 0x51, 0x82, 0x44, 0xeb, 0xa2, 0x7d, 0x72, 0xcb, 0xc6, 0xf6, 0xc7, 0xb2, 0x38, 0x0e, 0x0f, 0x4f, 0x29, 0x00, 0xe4, 0x5b, 0x94, 0x46, 0x86, 0x66, 0xa1, 0x83, 0xb3, 0xeb, 0x15, 0xb6, 0x31, 0x50, 0x28, 0xeb, 0xed, 0x0d, 0x32, 0x39, 0xe9, 0x23, 0x81, 0x99, 0x3e, 0xff, 0x17, 0x4c, 0x11, 0x43, 0xd1},
+ },
+ { /* 25P*/
+ addYX: fp.Elt{0xce, 0xe7, 0xf8, 0x94, 0x8f, 0x96, 0xf8, 0x96, 0xe6, 0x72, 0x20, 0x44, 0x2c, 0xa7, 0xfc, 0xba, 0xc8, 0xe1, 0xbb, 0xc9, 0x16, 0x85, 0xcd, 0x0b, 0xe5, 0xb5, 0x5a, 0x7f, 0x51, 0x43, 0x63, 0x8b, 0x23, 0x8e, 0x1d, 0x31, 0xff, 0x46, 0x02, 0x66, 0xcc, 0x9e, 0x4d, 0xa2, 0xca, 0xe2, 0xc7, 0xfd, 0x22, 0xb1, 0xdb, 0xdf, 0x6f, 0xe6, 0xa5, 0x82},
+ subYX: fp.Elt{0xd0, 0xf5, 0x65, 0x40, 0xec, 0x8e, 0x65, 0x42, 0x78, 0xc1, 0x65, 0xe4, 0x10, 0xc8, 0x0b, 0x1b, 0xdd, 0x96, 0x68, 0xce, 0xee, 0x45, 0x55, 0xd8, 0x6e, 0xd3, 0xe6, 0x77, 0x19, 0xae, 0xc2, 0x8d, 0x8d, 0x3e, 0x14, 0x3f, 0x6d, 0x00, 0x2f, 0x9b, 0xd1, 0x26, 0x60, 0x28, 0x0f, 0x3a, 0x47, 0xb3, 0xe6, 0x68, 0x28, 0x24, 0x25, 0xca, 0xc8, 0x06},
+ dt2: fp.Elt{0x54, 0xbb, 0x60, 0x92, 0xdb, 0x8f, 0x0f, 0x38, 0xe0, 0xe6, 0xe4, 0xc9, 0xcc, 0x14, 0x62, 0x01, 0xc4, 0x2b, 0x0f, 0xcf, 0xed, 0x7d, 0x8e, 0xa4, 0xd9, 0x73, 0x0b, 0xba, 0x0c, 0xaf, 0x0c, 0xf9, 0xe2, 0xeb, 0x29, 0x2a, 0x53, 0xdf, 0x2c, 0x5a, 0xfa, 0x8f, 0xc1, 0x01, 0xd7, 0xb1, 0x45, 0x73, 0x92, 0x32, 0x83, 0x85, 0x12, 0x74, 0x89, 0x44},
+ },
+ { /* 27P*/
+ addYX: fp.Elt{0x0b, 0x73, 0x3c, 0xc2, 0xb1, 0x2e, 0xe1, 0xa7, 0xf5, 0xc9, 0x7a, 0xfb, 0x3d, 0x2d, 0xac, 0x59, 0xdb, 0xfa, 0x36, 0x11, 0xd1, 0x13, 0x04, 0x51, 0x1d, 0xab, 0x9b, 0x6b, 0x93, 0xfe, 0xda, 0xb0, 0x8e, 0xb4, 0x79, 0x11, 0x21, 0x0f, 0x65, 0xb9, 0xbb, 0x79, 0x96, 0x2a, 0xfd, 0x30, 0xe0, 0xb4, 0x2d, 0x9a, 0x55, 0x25, 0x5d, 0xd4, 0xad, 0x2a},
+ subYX: fp.Elt{0x9e, 0xc5, 0x04, 0xfe, 0xec, 0x3c, 0x64, 0x1c, 0xed, 0x95, 0xed, 0xae, 0xaf, 0x5c, 0x6e, 0x08, 0x9e, 0x02, 0x29, 0x59, 0x7e, 0x5f, 0xc4, 0x9a, 0xd5, 0x32, 0x72, 0x86, 0xe1, 0x4e, 0x3c, 0xce, 0x99, 0x69, 0x3b, 0xc4, 0xdd, 0x4d, 0xb7, 0xbb, 0xda, 0x3b, 0x1a, 0x99, 0xaa, 0x62, 0x15, 0xc1, 0xf0, 0xb6, 0x6c, 0xec, 0x56, 0xc1, 0xff, 0x0c},
+ dt2: fp.Elt{0x2f, 0xf1, 0x3f, 0x7a, 0x2d, 0x56, 0x19, 0x7f, 0xea, 0xbe, 0x59, 0x2e, 0x13, 0x67, 0x81, 0xfb, 0xdb, 0xc8, 0xa3, 0x1d, 0xd5, 0xe9, 0x13, 0x8b, 0x29, 0xdf, 0xcf, 0x9f, 0xe7, 0xd9, 0x0b, 0x70, 0xd3, 0x15, 0x57, 0x4a, 0xe9, 0x50, 0x12, 0x1b, 0x81, 0x4b, 0x98, 0x98, 0xa8, 0x31, 0x1d, 0x27, 0x47, 0x38, 0xed, 0x57, 0x99, 0x26, 0xb2, 0xee},
+ },
+ { /* 29P*/
+ addYX: fp.Elt{0x1c, 0xb2, 0xb2, 0x67, 0x3b, 0x8b, 0x3d, 0x5a, 0x30, 0x7e, 0x38, 0x7e, 0x3c, 0x3d, 0x28, 0x56, 0x59, 0xd8, 0x87, 0x53, 0x8b, 0xe6, 0x6c, 0x5d, 0xe5, 0x0a, 0x33, 0x10, 0xce, 0xa2, 0x17, 0x0d, 0xe8, 0x76, 0xee, 0x68, 0xa8, 0x72, 0x54, 0xbd, 0xa6, 0x24, 0x94, 0x6e, 0x77, 0xc7, 0x53, 0xb7, 0x89, 0x1c, 0x7a, 0xe9, 0x78, 0x9a, 0x74, 0x5f},
+ subYX: fp.Elt{0x76, 0x96, 0x1c, 0xcf, 0x08, 0x55, 0xd8, 0x1e, 0x0d, 0xa3, 0x59, 0x95, 0x32, 0xf4, 0xc2, 0x8e, 0x84, 0x5e, 0x4b, 0x04, 0xda, 0x71, 0xc9, 0x78, 0x52, 0xde, 0x14, 0xb4, 0x31, 0xf4, 0xd4, 0xb8, 0x58, 0xc5, 0x20, 0xe8, 0xdd, 0x15, 0xb5, 0xee, 0xea, 0x61, 0xe0, 0xf5, 0xd6, 0xae, 0x55, 0x59, 0x05, 0x3e, 0xaf, 0x74, 0xac, 0x1f, 0x17, 0x82},
+ dt2: fp.Elt{0x59, 0x24, 0xcd, 0xfc, 0x11, 0x7e, 0x85, 0x18, 0x3d, 0x69, 0xf7, 0x71, 0x31, 0x66, 0x98, 0x42, 0x95, 0x00, 0x8c, 0xb2, 0xae, 0x39, 0x7e, 0x85, 0xd6, 0xb0, 0x02, 0xec, 0xce, 0xfc, 0x25, 0xb2, 0xe3, 0x99, 0x8e, 0x5b, 0x61, 0x96, 0x2e, 0x6d, 0x96, 0x57, 0x71, 0xa5, 0x93, 0x41, 0x0e, 0x6f, 0xfd, 0x0a, 0xbf, 0xa9, 0xf7, 0x56, 0xa9, 0x3e},
+ },
+ { /* 31P*/
+ addYX: fp.Elt{0xa2, 0x2e, 0x0c, 0x17, 0x4d, 0xcc, 0x85, 0x2c, 0x18, 0xa0, 0xd2, 0x08, 0xba, 0x11, 0xfa, 0x47, 0x71, 0x86, 0xaf, 0x36, 0x6a, 0xd7, 0xfe, 0xb9, 0xb0, 0x2f, 0x89, 0x98, 0x49, 0x69, 0xf8, 0x6a, 0xad, 0x27, 0x5e, 0x0a, 0x22, 0x60, 0x5e, 0x5d, 0xca, 0x06, 0x51, 0x27, 0x99, 0x29, 0x85, 0x68, 0x98, 0xe1, 0xc4, 0x21, 0x50, 0xa0, 0xe9, 0xc1},
+ subYX: fp.Elt{0x4d, 0x70, 0xee, 0x91, 0x92, 0x3f, 0xb7, 0xd3, 0x1d, 0xdb, 0x8d, 0x6e, 0x16, 0xf5, 0x65, 0x7d, 0x5f, 0xb5, 0x6c, 0x59, 0x26, 0x70, 0x4b, 0xf2, 0xfc, 0xe7, 0xdf, 0x86, 0xfe, 0xa5, 0xa7, 0xa6, 0x5d, 0xfb, 0x06, 0xe9, 0xf9, 0xcc, 0xc0, 0x37, 0xcc, 0xd8, 0x09, 0x04, 0xd2, 0xa5, 0x1d, 0xd7, 0xb7, 0xce, 0x92, 0xac, 0x3c, 0xad, 0xfb, 0xae},
+ dt2: fp.Elt{0x17, 0xa3, 0x9a, 0xc7, 0x86, 0x2a, 0x51, 0xf7, 0x96, 0x79, 0x49, 0x22, 0x2e, 0x5a, 0x01, 0x5c, 0xb5, 0x95, 0xd4, 0xe8, 0xcb, 0x00, 0xca, 0x2d, 0x55, 0xb6, 0x34, 0x36, 0x0b, 0x65, 0x46, 0xf0, 0x49, 0xfc, 0x87, 0x86, 0xe5, 0xc3, 0x15, 0xdb, 0x32, 0xcd, 0xf2, 0xd3, 0x82, 0x4c, 0xe6, 0x61, 0x8a, 0xaf, 0xd4, 0x9e, 0x0f, 0x5a, 0xf2, 0x81},
+ },
+ { /* 33P*/
+ addYX: fp.Elt{0x88, 0x10, 0xc0, 0xcb, 0xf5, 0x77, 0xae, 0xa5, 0xbe, 0xf6, 0xcd, 0x2e, 0x8b, 0x7e, 0xbd, 0x79, 0x62, 0x4a, 0xeb, 0x69, 0xc3, 0x28, 0xaa, 0x72, 0x87, 0xa9, 0x25, 0x87, 0x46, 0xea, 0x0e, 0x62, 0xa3, 0x6a, 0x1a, 0xe2, 0xba, 0xdc, 0x81, 0x10, 0x33, 0x01, 0xf6, 0x16, 0x89, 0x80, 0xc6, 0xcd, 0xdb, 0xdc, 0xba, 0x0e, 0x09, 0x4a, 0x35, 0x4a},
+ subYX: fp.Elt{0x86, 0xb2, 0x2b, 0xd0, 0xb8, 0x4a, 0x6d, 0x66, 0x7b, 0x32, 0xdf, 0x3b, 0x1a, 0x19, 0x1f, 0x63, 0xee, 0x1f, 0x3d, 0x1c, 0x5c, 0x14, 0x60, 0x5b, 0x72, 0x49, 0x07, 0xb1, 0x0d, 0x72, 0xc6, 0x35, 0xf0, 0xbc, 0x5e, 0xda, 0x80, 0x6b, 0x64, 0x5b, 0xe5, 0x34, 0x54, 0x39, 0xdd, 0xe6, 0x3c, 0xcb, 0xe5, 0x29, 0x32, 0x06, 0xc6, 0xb1, 0x96, 0x34},
+ dt2: fp.Elt{0x85, 0x86, 0xf5, 0x84, 0x86, 0xe6, 0x77, 0x8a, 0x71, 0x85, 0x0c, 0x4f, 0x81, 0x5b, 0x29, 0x06, 0xb5, 0x2e, 0x26, 0x71, 0x07, 0x78, 0x07, 0xae, 0xbc, 0x95, 0x46, 0xc3, 0x65, 0xac, 0xe3, 0x76, 0x51, 0x7d, 0xd4, 0x85, 0x31, 0xe3, 0x43, 0xf3, 0x1b, 0x7c, 0xf7, 0x6b, 0x2c, 0xf8, 0x1c, 0xbb, 0x8d, 0xca, 0xab, 0x4b, 0xba, 0x7f, 0xa4, 0xe2},
+ },
+ { /* 35P*/
+ addYX: fp.Elt{0x1a, 0xee, 0xe7, 0xa4, 0x8a, 0x9d, 0x53, 0x80, 0xc6, 0xb8, 0x4e, 0xdc, 0x89, 0xe0, 0xc4, 0x2b, 0x60, 0x52, 0x6f, 0xec, 0x81, 0xd2, 0x55, 0x6b, 0x1b, 0x6f, 0x17, 0x67, 0x8e, 0x42, 0x26, 0x4c, 0x65, 0x23, 0x29, 0xc6, 0x7b, 0xcd, 0x9f, 0xad, 0x4b, 0x42, 0xd3, 0x0c, 0x75, 0xc3, 0x8a, 0xf5, 0xbe, 0x9e, 0x55, 0xf7, 0x47, 0x5d, 0xbd, 0x3a},
+ subYX: fp.Elt{0x0d, 0xa8, 0x3b, 0xf9, 0xc7, 0x7e, 0xc6, 0x86, 0x94, 0xc0, 0x01, 0xff, 0x27, 0xce, 0x43, 0xac, 0xe5, 0xe1, 0xd2, 0x8d, 0xc1, 0x22, 0x31, 0xbe, 0xe1, 0xaf, 0xf9, 0x4a, 0x78, 0xa1, 0x0c, 0xaa, 0xd4, 0x80, 0xe4, 0x09, 0x8d, 0xfb, 0x1d, 0x52, 0xc8, 0x60, 0x2d, 0xf2, 0xa2, 0x89, 0x02, 0x56, 0x3d, 0x56, 0x27, 0x85, 0xc7, 0xf0, 0x2b, 0x9a},
+ dt2: fp.Elt{0x62, 0x7c, 0xc7, 0x6b, 0x2c, 0x9d, 0x0a, 0x7c, 0xe5, 0x50, 0x3c, 0xe6, 0x87, 0x1c, 0x82, 0x30, 0x67, 0x3c, 0x39, 0xb6, 0xa0, 0x31, 0xfb, 0x03, 0x7b, 0xa1, 0x58, 0xdf, 0x12, 0x76, 0x5d, 0x5d, 0x0a, 0x8f, 0x9b, 0x37, 0x32, 0xc3, 0x60, 0x33, 0xea, 0x9f, 0x0a, 0x99, 0xfa, 0x20, 0xd0, 0x33, 0x21, 0xc3, 0x94, 0xd4, 0x86, 0x49, 0x7c, 0x4e},
+ },
+ { /* 37P*/
+ addYX: fp.Elt{0xc7, 0x0c, 0x71, 0xfe, 0x55, 0xd1, 0x95, 0x8f, 0x43, 0xbb, 0x6b, 0x74, 0x30, 0xbd, 0xe8, 0x6f, 0x1c, 0x1b, 0x06, 0x62, 0xf5, 0xfc, 0x65, 0xa0, 0xeb, 0x81, 0x12, 0xc9, 0x64, 0x66, 0x61, 0xde, 0xf3, 0x6d, 0xd4, 0xae, 0x8e, 0xb1, 0x72, 0xe0, 0xcd, 0x37, 0x01, 0x28, 0x52, 0xd7, 0x39, 0x46, 0x0c, 0x55, 0xcf, 0x47, 0x70, 0xef, 0xa1, 0x17},
+ subYX: fp.Elt{0x8d, 0x58, 0xde, 0x83, 0x88, 0x16, 0x0e, 0x12, 0x42, 0x03, 0x50, 0x60, 0x4b, 0xdf, 0xbf, 0x95, 0xcc, 0x7d, 0x18, 0x17, 0x7e, 0x31, 0x5d, 0x8a, 0x66, 0xc1, 0xcf, 0x14, 0xea, 0xf4, 0xf4, 0xe5, 0x63, 0x2d, 0x32, 0x86, 0x9b, 0xed, 0x1f, 0x4f, 0x03, 0xaf, 0x33, 0x92, 0xcb, 0xaf, 0x9c, 0x05, 0x0d, 0x47, 0x1b, 0x42, 0xba, 0x13, 0x22, 0x98},
+ dt2: fp.Elt{0xb5, 0x48, 0xeb, 0x7d, 0x3d, 0x10, 0x9f, 0x59, 0xde, 0xf8, 0x1c, 0x4f, 0x7d, 0x9d, 0x40, 0x4d, 0x9e, 0x13, 0x24, 0xb5, 0x21, 0x09, 0xb7, 0xee, 0x98, 0x5c, 0x56, 0xbc, 0x5e, 0x2b, 0x78, 0x38, 0x06, 0xac, 0xe3, 0xe0, 0xfa, 0x2e, 0xde, 0x4f, 0xd2, 0xb3, 0xfb, 0x2d, 0x71, 0x84, 0xd1, 0x9d, 0x12, 0x5b, 0x35, 0xc8, 0x03, 0x68, 0x67, 0xc7},
+ },
+ { /* 39P*/
+ addYX: fp.Elt{0xb6, 0x65, 0xfb, 0xa7, 0x06, 0x35, 0xbb, 0xe0, 0x31, 0x8d, 0x91, 0x40, 0x98, 0xab, 0x30, 0xe4, 0xca, 0x12, 0x59, 0x89, 0xed, 0x65, 0x5d, 0x7f, 0xae, 0x69, 0xa0, 0xa4, 0xfa, 0x78, 0xb4, 0xf7, 0xed, 0xae, 0x86, 0x78, 0x79, 0x64, 0x24, 0xa6, 0xd4, 0xe1, 0xf6, 0xd3, 0xa0, 0x89, 0xba, 0x20, 0xf4, 0x54, 0x0d, 0x8f, 0xdb, 0x1a, 0x79, 0xdb},
+ subYX: fp.Elt{0xe1, 0x82, 0x0c, 0x4d, 0xde, 0x9f, 0x40, 0xf0, 0xc1, 0xbd, 0x8b, 0xd3, 0x24, 0x03, 0xcd, 0xf2, 0x92, 0x7d, 0xe2, 0x68, 0x7f, 0xf1, 0xbe, 0x69, 0xde, 0x34, 0x67, 0x4c, 0x85, 0x3b, 0xec, 0x98, 0xcc, 0x4d, 0x3e, 0xc0, 0x96, 0x27, 0xe6, 0x75, 0xfc, 0xdf, 0x37, 0xc0, 0x1e, 0x27, 0xe0, 0xf6, 0xc2, 0xbd, 0xbc, 0x3d, 0x9b, 0x39, 0xdc, 0xe2},
+ dt2: fp.Elt{0xd8, 0x29, 0xa7, 0x39, 0xe3, 0x9f, 0x2f, 0x0e, 0x4b, 0x24, 0x21, 0x70, 0xef, 0xfd, 0x91, 0xea, 0xbf, 0xe1, 0x72, 0x90, 0xcc, 0xc9, 0x84, 0x0e, 0xad, 0xd5, 0xe6, 0xbb, 0xc5, 0x99, 0x7f, 0xa4, 0xf0, 0x2e, 0xcc, 0x95, 0x64, 0x27, 0x19, 0xd8, 0x4c, 0x27, 0x0d, 0xff, 0xb6, 0x29, 0xe2, 0x6c, 0xfa, 0xbb, 0x4d, 0x9c, 0xbb, 0xaf, 0xa5, 0xec},
+ },
+ { /* 41P*/
+ addYX: fp.Elt{0xd6, 0x33, 0x3f, 0x9f, 0xcf, 0xfd, 0x4c, 0xd1, 0xfe, 0xe5, 0xeb, 0x64, 0x27, 0xae, 0x7a, 0xa2, 0x82, 0x50, 0x6d, 0xaa, 0xe3, 0x5d, 0xe2, 0x48, 0x60, 0xb3, 0x76, 0x04, 0xd9, 0x19, 0xa7, 0xa1, 0x73, 0x8d, 0x38, 0xa9, 0xaf, 0x45, 0xb5, 0xb2, 0x62, 0x9b, 0xf1, 0x35, 0x7b, 0x84, 0x66, 0xeb, 0x06, 0xef, 0xf1, 0xb2, 0x2d, 0x6a, 0x61, 0x15},
+ subYX: fp.Elt{0x86, 0x50, 0x42, 0xf7, 0xda, 0x59, 0xb2, 0xcf, 0x0d, 0x3d, 0xee, 0x8e, 0x53, 0x5d, 0xf7, 0x9e, 0x6a, 0x26, 0x2d, 0xc7, 0x8c, 0x8e, 0x18, 0x50, 0x6d, 0xb7, 0x51, 0x4c, 0xa7, 0x52, 0x6e, 0x0e, 0x0a, 0x16, 0x74, 0xb2, 0x81, 0x8b, 0x56, 0x27, 0x22, 0x84, 0xf4, 0x56, 0xc5, 0x06, 0xe1, 0x8b, 0xca, 0x2d, 0xdb, 0x9a, 0xf6, 0x10, 0x9c, 0x51},
+ dt2: fp.Elt{0x1f, 0x16, 0xa2, 0x78, 0x96, 0x1b, 0x85, 0x9c, 0x76, 0x49, 0xd4, 0x0f, 0xac, 0xb0, 0xf4, 0xd0, 0x06, 0x2c, 0x7e, 0x6d, 0x6e, 0x8e, 0xc7, 0x9f, 0x18, 0xad, 0xfc, 0x88, 0x0c, 0x0c, 0x09, 0x05, 0x05, 0xa0, 0x79, 0x72, 0x32, 0x72, 0x87, 0x0f, 0x49, 0x87, 0x0c, 0xb4, 0x12, 0xc2, 0x09, 0xf8, 0x9f, 0x30, 0x72, 0xa9, 0x47, 0x13, 0x93, 0x49},
+ },
+ { /* 43P*/
+ addYX: fp.Elt{0xcc, 0xb1, 0x4c, 0xd3, 0xc0, 0x9e, 0x9e, 0x4d, 0x6d, 0x28, 0x0b, 0xa5, 0x94, 0xa7, 0x2e, 0xc2, 0xc7, 0xaf, 0x29, 0x73, 0xc9, 0x68, 0xea, 0x0f, 0x34, 0x37, 0x8d, 0x96, 0x8f, 0x3a, 0x3d, 0x73, 0x1e, 0x6d, 0x9f, 0xcf, 0x8d, 0x83, 0xb5, 0x71, 0xb9, 0xe1, 0x4b, 0x67, 0x71, 0xea, 0xcf, 0x56, 0xe5, 0xeb, 0x72, 0x15, 0x2f, 0x9e, 0xa8, 0xaa},
+ subYX: fp.Elt{0xf4, 0x3e, 0x85, 0x1c, 0x1a, 0xef, 0x50, 0xd1, 0xb4, 0x20, 0xb2, 0x60, 0x05, 0x98, 0xfe, 0x47, 0x3b, 0xc1, 0x76, 0xca, 0x2c, 0x4e, 0x5a, 0x42, 0xa3, 0xf7, 0x20, 0xaa, 0x57, 0x39, 0xee, 0x34, 0x1f, 0xe1, 0x68, 0xd3, 0x7e, 0x06, 0xc4, 0x6c, 0xc7, 0x76, 0x2b, 0xe4, 0x1c, 0x48, 0x44, 0xe6, 0xe5, 0x44, 0x24, 0x8d, 0xb3, 0xb6, 0x88, 0x32},
+ dt2: fp.Elt{0x18, 0xa7, 0xba, 0xd0, 0x44, 0x6f, 0x33, 0x31, 0x00, 0xf8, 0xf6, 0x12, 0xe3, 0xc5, 0xc7, 0xb5, 0x91, 0x9c, 0x91, 0xb5, 0x75, 0x18, 0x18, 0x8a, 0xab, 0xed, 0x24, 0x11, 0x2e, 0xce, 0x5a, 0x0f, 0x94, 0x5f, 0x2e, 0xca, 0xd3, 0x80, 0xea, 0xe5, 0x34, 0x96, 0x67, 0x8b, 0x6a, 0x26, 0x5e, 0xc8, 0x9d, 0x2c, 0x5e, 0x6c, 0xa2, 0x0c, 0xbf, 0xf0},
+ },
+ { /* 45P*/
+ addYX: fp.Elt{0xb3, 0xbf, 0xa3, 0x85, 0xee, 0xf6, 0x58, 0x02, 0x78, 0xc4, 0x30, 0xd6, 0x57, 0x59, 0x8c, 0x88, 0x08, 0x7c, 0xbc, 0xbe, 0x0a, 0x74, 0xa9, 0xde, 0x69, 0xe7, 0x41, 0xd8, 0xbf, 0x66, 0x8d, 0x3d, 0x28, 0x00, 0x8c, 0x47, 0x65, 0x34, 0xfe, 0x86, 0x9e, 0x6a, 0xf2, 0x41, 0x6a, 0x94, 0xc4, 0x88, 0x75, 0x23, 0x0d, 0x52, 0x69, 0xee, 0x07, 0x89},
+ subYX: fp.Elt{0x22, 0x3c, 0xa1, 0x70, 0x58, 0x97, 0x93, 0xbe, 0x59, 0xa8, 0x0b, 0x8a, 0x46, 0x2a, 0x38, 0x1e, 0x08, 0x6b, 0x61, 0x9f, 0xf2, 0x4a, 0x8b, 0x80, 0x68, 0x6e, 0xc8, 0x92, 0x60, 0xf3, 0xc9, 0x89, 0xb2, 0x6d, 0x63, 0xb0, 0xeb, 0x83, 0x15, 0x63, 0x0e, 0x64, 0xbb, 0xb8, 0xfe, 0xb4, 0x81, 0x90, 0x01, 0x28, 0x10, 0xb9, 0x74, 0x6e, 0xde, 0xa4},
+ dt2: fp.Elt{0x1a, 0x23, 0x45, 0xa8, 0x6f, 0x4e, 0xa7, 0x4a, 0x0c, 0xeb, 0xb0, 0x43, 0xf9, 0xef, 0x99, 0x60, 0x5b, 0xdb, 0x66, 0xc0, 0x86, 0x71, 0x43, 0xb1, 0x22, 0x7b, 0x1c, 0xe7, 0x8d, 0x09, 0x1d, 0x83, 0x76, 0x9c, 0xd3, 0x5a, 0xdd, 0x42, 0xd9, 0x2f, 0x2d, 0xba, 0x7a, 0xc2, 0xd9, 0x6b, 0xd4, 0x7a, 0xf1, 0xd5, 0x5f, 0x6b, 0x85, 0xbf, 0x0b, 0xf1},
+ },
+ { /* 47P*/
+ addYX: fp.Elt{0xb2, 0x83, 0xfa, 0x1f, 0xd2, 0xce, 0xb6, 0xf2, 0x2d, 0xea, 0x1b, 0xe5, 0x29, 0xa5, 0x72, 0xf9, 0x25, 0x48, 0x4e, 0xf2, 0x50, 0x1b, 0x39, 0xda, 0x34, 0xc5, 0x16, 0x13, 0xb4, 0x0c, 0xa1, 0x00, 0x79, 0x7a, 0xf5, 0x8b, 0xf3, 0x70, 0x14, 0xb6, 0xfc, 0x9a, 0x47, 0x68, 0x1e, 0x42, 0x70, 0x64, 0x2a, 0x84, 0x3e, 0x3d, 0x20, 0x58, 0xf9, 0x6a},
+ subYX: fp.Elt{0xd9, 0xee, 0xc0, 0xc4, 0xf5, 0xc2, 0x86, 0xaf, 0x45, 0xd2, 0xd2, 0x87, 0x1b, 0x64, 0xd5, 0xe0, 0x8c, 0x44, 0x00, 0x4f, 0x43, 0x89, 0x04, 0x48, 0x4a, 0x0b, 0xca, 0x94, 0x06, 0x2f, 0x23, 0x5b, 0x6c, 0x8d, 0x44, 0x66, 0x53, 0xf5, 0x5a, 0x20, 0x72, 0x28, 0x58, 0x84, 0xcc, 0x73, 0x22, 0x5e, 0xd1, 0x0b, 0x56, 0x5e, 0x6a, 0xa3, 0x11, 0x91},
+ dt2: fp.Elt{0x6e, 0x9f, 0x88, 0xa8, 0x68, 0x2f, 0x12, 0x37, 0x88, 0xfc, 0x92, 0x8f, 0x24, 0xeb, 0x5b, 0x2a, 0x2a, 0xd0, 0x14, 0x40, 0x4c, 0xa9, 0xa4, 0x03, 0x0c, 0x45, 0x48, 0x13, 0xe8, 0xa6, 0x37, 0xab, 0xc0, 0x06, 0x38, 0x6c, 0x96, 0x73, 0x40, 0x6c, 0xc6, 0xea, 0x56, 0xc6, 0xe9, 0x1a, 0x69, 0xeb, 0x7a, 0xd1, 0x33, 0x69, 0x58, 0x2b, 0xea, 0x2f},
+ },
+ { /* 49P*/
+ addYX: fp.Elt{0x58, 0xa8, 0x05, 0x41, 0x00, 0x9d, 0xaa, 0xd9, 0x98, 0xcf, 0xb9, 0x41, 0xb5, 0x4a, 0x8d, 0xe2, 0xe7, 0xc0, 0x72, 0xef, 0xc8, 0x28, 0x6b, 0x68, 0x9d, 0xc9, 0xdf, 0x05, 0x8b, 0xd0, 0x04, 0x74, 0x79, 0x45, 0x52, 0x05, 0xa3, 0x6e, 0x35, 0x3a, 0xe3, 0xef, 0xb2, 0xdc, 0x08, 0x6f, 0x4e, 0x76, 0x85, 0x67, 0xba, 0x23, 0x8f, 0xdd, 0xaf, 0x09},
+ subYX: fp.Elt{0xb4, 0x38, 0xc8, 0xff, 0x4f, 0x65, 0x2a, 0x7e, 0xad, 0xb1, 0xc6, 0xb9, 0x3d, 0xd6, 0xf7, 0x14, 0xcf, 0xf6, 0x98, 0x75, 0xbb, 0x47, 0x83, 0x90, 0xe7, 0xe1, 0xf6, 0x14, 0x99, 0x7e, 0xfa, 0xe4, 0x77, 0x24, 0xe3, 0xe7, 0xf0, 0x1e, 0xdb, 0x27, 0x4e, 0x16, 0x04, 0xf2, 0x08, 0x52, 0xfc, 0xec, 0x55, 0xdb, 0x2e, 0x67, 0xe1, 0x94, 0x32, 0x89},
+ dt2: fp.Elt{0x00, 0xad, 0x03, 0x35, 0x1a, 0xb1, 0x88, 0xf0, 0xc9, 0x11, 0xe4, 0x12, 0x52, 0x61, 0xfd, 0x8a, 0x1b, 0x6a, 0x0a, 0x4c, 0x42, 0x46, 0x22, 0x0e, 0xa5, 0xf9, 0xe2, 0x50, 0xf2, 0xb2, 0x1f, 0x20, 0x78, 0x10, 0xf6, 0xbf, 0x7f, 0x0c, 0x9c, 0xad, 0x40, 0x8b, 0x82, 0xd4, 0xba, 0x69, 0x09, 0xac, 0x4b, 0x6d, 0xc4, 0x49, 0x17, 0x81, 0x57, 0x3b},
+ },
+ { /* 51P*/
+ addYX: fp.Elt{0x0d, 0xfe, 0xb4, 0x35, 0x11, 0xbd, 0x1d, 0x6b, 0xc2, 0xc5, 0x3b, 0xd2, 0x23, 0x2c, 0x72, 0xe3, 0x48, 0xb1, 0x48, 0x73, 0xfb, 0xa3, 0x21, 0x6e, 0xc0, 0x09, 0x69, 0xac, 0xe1, 0x60, 0xbc, 0x24, 0x03, 0x99, 0x63, 0x0a, 0x00, 0xf0, 0x75, 0xf6, 0x92, 0xc5, 0xd6, 0xdb, 0x51, 0xd4, 0x7d, 0xe6, 0xf4, 0x11, 0x79, 0xd7, 0xc3, 0xaf, 0x48, 0xd0},
+ subYX: fp.Elt{0xf4, 0x4f, 0xaf, 0x31, 0xe3, 0x10, 0x89, 0x95, 0xf0, 0x8a, 0xf6, 0x31, 0x9f, 0x48, 0x02, 0xba, 0x42, 0x2b, 0x3c, 0x22, 0x8b, 0xcc, 0x12, 0x98, 0x6e, 0x7a, 0x64, 0x3a, 0xc4, 0xca, 0x32, 0x2a, 0x72, 0xf8, 0x2c, 0xcf, 0x78, 0x5e, 0x7a, 0x75, 0x6e, 0x72, 0x46, 0x48, 0x62, 0x28, 0xac, 0x58, 0x1a, 0xc6, 0x59, 0x88, 0x2a, 0x44, 0x9e, 0x83},
+ dt2: fp.Elt{0xb3, 0xde, 0x36, 0xfd, 0xeb, 0x1b, 0xd4, 0x24, 0x1b, 0x08, 0x8c, 0xfe, 0xa9, 0x41, 0xa1, 0x64, 0xf2, 0x6d, 0xdb, 0xf9, 0x94, 0xae, 0x86, 0x71, 0xab, 0x10, 0xbf, 0xa3, 0xb2, 0xa0, 0xdf, 0x10, 0x8c, 0x74, 0xce, 0xb3, 0xfc, 0xdb, 0xba, 0x15, 0xf6, 0x91, 0x7a, 0x9c, 0x36, 0x1e, 0x45, 0x07, 0x3c, 0xec, 0x1a, 0x61, 0x26, 0x93, 0xe3, 0x50},
+ },
+ { /* 53P*/
+ addYX: fp.Elt{0xc5, 0x50, 0xc5, 0x83, 0xb0, 0xbd, 0xd9, 0xf6, 0x6d, 0x15, 0x5e, 0xc1, 0x1a, 0x33, 0xa0, 0xce, 0x13, 0x70, 0x3b, 0xe1, 0x31, 0xc6, 0xc4, 0x02, 0xec, 0x8c, 0xd5, 0x9c, 0x97, 0xd3, 0x12, 0xc4, 0xa2, 0xf9, 0xd5, 0xfb, 0x22, 0x69, 0x94, 0x09, 0x2f, 0x59, 0xce, 0xdb, 0xf2, 0xf2, 0x00, 0xe0, 0xa9, 0x08, 0x44, 0x2e, 0x8b, 0x6b, 0xf5, 0xb3},
+ subYX: fp.Elt{0x90, 0xdd, 0xec, 0xa2, 0x65, 0xb7, 0x61, 0xbc, 0xaa, 0x70, 0xa2, 0x15, 0xd8, 0xb0, 0xf8, 0x8e, 0x23, 0x3d, 0x9f, 0x46, 0xa3, 0x29, 0x20, 0xd1, 0xa1, 0x15, 0x81, 0xc6, 0xb6, 0xde, 0xbe, 0x60, 0x63, 0x24, 0xac, 0x15, 0xfb, 0xeb, 0xd3, 0xea, 0x57, 0x13, 0x86, 0x38, 0x1e, 0x22, 0xf4, 0x8c, 0x5d, 0xaf, 0x1b, 0x27, 0x21, 0x4f, 0xa3, 0x63},
+ dt2: fp.Elt{0x07, 0x15, 0x87, 0xc4, 0xfd, 0xa1, 0x97, 0x7a, 0x07, 0x1f, 0x56, 0xcc, 0xe3, 0x6a, 0x01, 0x90, 0xce, 0xf9, 0xfa, 0x50, 0xb2, 0xe0, 0x87, 0x8b, 0x6c, 0x63, 0x6c, 0xf6, 0x2a, 0x09, 0xef, 0xef, 0xd2, 0x31, 0x40, 0x25, 0xf6, 0x84, 0xcb, 0xe0, 0xc4, 0x23, 0xc1, 0xcb, 0xe2, 0x02, 0x83, 0x2d, 0xed, 0x74, 0x74, 0x8b, 0xf8, 0x7c, 0x81, 0x18},
+ },
+ { /* 55P*/
+ addYX: fp.Elt{0x9e, 0xe5, 0x59, 0x95, 0x63, 0x2e, 0xac, 0x8b, 0x03, 0x3c, 0xc1, 0x8e, 0xe1, 0x5b, 0x56, 0x3c, 0x16, 0x41, 0xe4, 0xc2, 0x60, 0x0c, 0x6d, 0x65, 0x9f, 0xfc, 0x27, 0x68, 0x43, 0x44, 0x05, 0x12, 0x6c, 0xda, 0x04, 0xef, 0xcf, 0xcf, 0xdc, 0x0a, 0x1a, 0x7f, 0x12, 0xd3, 0xeb, 0x02, 0xb6, 0x04, 0xca, 0xd6, 0xcb, 0xf0, 0x22, 0xba, 0x35, 0x6d},
+ subYX: fp.Elt{0x09, 0x6d, 0xf9, 0x64, 0x4c, 0xe6, 0x41, 0xff, 0x01, 0x4d, 0xce, 0x1e, 0xfa, 0x38, 0xa2, 0x25, 0x62, 0xff, 0x03, 0x39, 0x18, 0x91, 0xbb, 0x9d, 0xce, 0x02, 0xf0, 0xf1, 0x3c, 0x55, 0x18, 0xa9, 0xab, 0x4d, 0xd2, 0x35, 0xfd, 0x8d, 0xa9, 0xb2, 0xad, 0xb7, 0x06, 0x6e, 0xc6, 0x69, 0x49, 0xd6, 0x98, 0x98, 0x0b, 0x22, 0x81, 0x6b, 0xbd, 0xa0},
+ dt2: fp.Elt{0x22, 0xf4, 0x85, 0x5d, 0x2b, 0xf1, 0x55, 0xa5, 0xd6, 0x27, 0x86, 0x57, 0x12, 0x1f, 0x16, 0x0a, 0x5a, 0x9b, 0xf2, 0x38, 0xb6, 0x28, 0xd8, 0x99, 0x0c, 0x89, 0x1d, 0x7f, 0xca, 0x21, 0x17, 0x1a, 0x0b, 0x02, 0x5f, 0x77, 0x2f, 0x73, 0x30, 0x7c, 0xc8, 0xd7, 0x2b, 0xcc, 0xe7, 0xf3, 0x21, 0xac, 0x53, 0xa7, 0x11, 0x5d, 0xd8, 0x1d, 0x9b, 0xf5},
+ },
+ { /* 57P*/
+ addYX: fp.Elt{0x94, 0x63, 0x5d, 0xef, 0xfd, 0x6d, 0x25, 0x4e, 0x6d, 0x29, 0x03, 0xed, 0x24, 0x28, 0x27, 0x57, 0x47, 0x3e, 0x6a, 0x1a, 0xfe, 0x37, 0xee, 0x5f, 0x83, 0x29, 0x14, 0xfd, 0x78, 0x25, 0x8a, 0xe1, 0x02, 0x38, 0xd8, 0xca, 0x65, 0x55, 0x40, 0x7d, 0x48, 0x2c, 0x7c, 0x7e, 0x60, 0xb6, 0x0c, 0x6d, 0xf7, 0xe8, 0xb3, 0x62, 0x53, 0xd6, 0x9c, 0x2b},
+ subYX: fp.Elt{0x47, 0x25, 0x70, 0x62, 0xf5, 0x65, 0x93, 0x62, 0x08, 0xac, 0x59, 0x66, 0xdb, 0x08, 0xd9, 0x1a, 0x19, 0xaf, 0xf4, 0xef, 0x02, 0xa2, 0x78, 0xa9, 0x55, 0x1c, 0xfa, 0x08, 0x11, 0xcb, 0xa3, 0x71, 0x74, 0xb1, 0x62, 0xe7, 0xc7, 0xf3, 0x5a, 0xb5, 0x8b, 0xd4, 0xf6, 0x10, 0x57, 0x79, 0x72, 0x2f, 0x13, 0x86, 0x7b, 0x44, 0x5f, 0x48, 0xfd, 0x88},
+ dt2: fp.Elt{0x10, 0x02, 0xcd, 0x05, 0x9a, 0xc3, 0x32, 0x6d, 0x10, 0x3a, 0x74, 0xba, 0x06, 0xc4, 0x3b, 0x34, 0xbc, 0x36, 0xed, 0xa3, 0xba, 0x9a, 0xdb, 0x6d, 0xd4, 0x69, 0x99, 0x97, 0xd0, 0xe4, 0xdd, 0xf5, 0xd4, 0x7c, 0xd3, 0x4e, 0xab, 0xd1, 0x3b, 0xbb, 0xe9, 0xc7, 0x6a, 0x94, 0x25, 0x61, 0xf0, 0x06, 0xc5, 0x12, 0xa8, 0x86, 0xe5, 0x35, 0x46, 0xeb},
+ },
+ { /* 59P*/
+ addYX: fp.Elt{0x9e, 0x95, 0x11, 0xc6, 0xc7, 0xe8, 0xee, 0x5a, 0x26, 0xa0, 0x72, 0x72, 0x59, 0x91, 0x59, 0x16, 0x49, 0x99, 0x7e, 0xbb, 0xd7, 0x15, 0xb4, 0xf2, 0x40, 0xf9, 0x5a, 0x4d, 0xc8, 0xa0, 0xe2, 0x34, 0x7b, 0x34, 0xf3, 0x99, 0xbf, 0xa9, 0xf3, 0x79, 0xc1, 0x1a, 0x0c, 0xf4, 0x86, 0x74, 0x4e, 0xcb, 0xbc, 0x90, 0xad, 0xb6, 0x51, 0x6d, 0xaa, 0x33},
+ subYX: fp.Elt{0x9f, 0xd1, 0xc5, 0xa2, 0x6c, 0x24, 0x88, 0x15, 0x71, 0x68, 0xf6, 0x07, 0x45, 0x02, 0xc4, 0x73, 0x7e, 0x75, 0x87, 0xca, 0x7c, 0xf0, 0x92, 0x00, 0x75, 0xd6, 0x5a, 0xdd, 0xe0, 0x64, 0x16, 0x9d, 0x62, 0x80, 0x33, 0x9f, 0xf4, 0x8e, 0x1a, 0x15, 0x1c, 0xd3, 0x0f, 0x4d, 0x4f, 0x62, 0x2d, 0xd7, 0xa5, 0x77, 0xe3, 0xea, 0xf0, 0xfb, 0x1a, 0xdb},
+ dt2: fp.Elt{0x6a, 0xa2, 0xb1, 0xaa, 0xfb, 0x5a, 0x32, 0x4e, 0xff, 0x47, 0x06, 0xd5, 0x9a, 0x4f, 0xce, 0x83, 0x5b, 0x82, 0x34, 0x3e, 0x47, 0xb8, 0xf8, 0xe9, 0x7c, 0x67, 0x69, 0x8d, 0x9c, 0xb7, 0xde, 0x57, 0xf4, 0x88, 0x41, 0x56, 0x0c, 0x87, 0x1e, 0xc9, 0x2f, 0x54, 0xbf, 0x5c, 0x68, 0x2c, 0xd9, 0xc4, 0xef, 0x53, 0x73, 0x1e, 0xa6, 0x38, 0x02, 0x10},
+ },
+ { /* 61P*/
+ addYX: fp.Elt{0x08, 0x80, 0x4a, 0xc9, 0xb7, 0xa8, 0x88, 0xd9, 0xfc, 0x6a, 0xc0, 0x3e, 0xc2, 0x33, 0x4d, 0x2b, 0x2a, 0xa3, 0x6d, 0x72, 0x3e, 0xdc, 0x34, 0x68, 0x08, 0xbf, 0x27, 0xef, 0xf4, 0xff, 0xe2, 0x0c, 0x31, 0x0c, 0xa2, 0x0a, 0x1f, 0x65, 0xc1, 0x4c, 0x61, 0xd3, 0x1b, 0xbc, 0x25, 0xb1, 0xd0, 0xd4, 0x89, 0xb2, 0x53, 0xfb, 0x43, 0xa5, 0xaf, 0x04},
+ subYX: fp.Elt{0xe3, 0xe1, 0x37, 0xad, 0x58, 0xa9, 0x55, 0x81, 0xee, 0x64, 0x21, 0xb9, 0xf5, 0x4c, 0x35, 0xea, 0x4a, 0xd3, 0x26, 0xaa, 0x90, 0xd4, 0x60, 0x46, 0x09, 0x4b, 0x4a, 0x62, 0xf9, 0xcd, 0xe1, 0xee, 0xbb, 0xc2, 0x09, 0x0b, 0xb0, 0x96, 0x8e, 0x43, 0x77, 0xaf, 0x25, 0x20, 0x5e, 0x47, 0xe4, 0x1d, 0x50, 0x69, 0x74, 0x08, 0xd7, 0xb9, 0x90, 0x13},
+ dt2: fp.Elt{0x51, 0x91, 0x95, 0x64, 0x03, 0x16, 0xfd, 0x6e, 0x26, 0x94, 0x6b, 0x61, 0xe7, 0xd9, 0xe0, 0x4a, 0x6d, 0x7c, 0xfa, 0xc0, 0xe2, 0x43, 0x23, 0x53, 0x70, 0xf5, 0x6f, 0x73, 0x8b, 0x81, 0xb0, 0x0c, 0xee, 0x2e, 0x46, 0xf2, 0x8d, 0xa6, 0xfb, 0xb5, 0x1c, 0x33, 0xbf, 0x90, 0x59, 0xc9, 0x7c, 0xb8, 0x6f, 0xad, 0x75, 0x02, 0x90, 0x8e, 0x59, 0x75},
+ },
+ { /* 63P*/
+ addYX: fp.Elt{0x36, 0x4d, 0x77, 0x04, 0xb8, 0x7d, 0x4a, 0xd1, 0xc5, 0xbb, 0x7b, 0x50, 0x5f, 0x8d, 0x9d, 0x62, 0x0f, 0x66, 0x71, 0xec, 0x87, 0xc5, 0x80, 0x82, 0xc8, 0xf4, 0x6a, 0x94, 0x92, 0x5b, 0xb0, 0x16, 0x9b, 0xb2, 0xc9, 0x6f, 0x2b, 0x2d, 0xee, 0x95, 0x73, 0x2e, 0xc2, 0x1b, 0xc5, 0x55, 0x36, 0x86, 0x24, 0xf8, 0x20, 0x05, 0x0d, 0x93, 0xd7, 0x76},
+ subYX: fp.Elt{0x7f, 0x01, 0xeb, 0x2e, 0x48, 0x4d, 0x1d, 0xf1, 0x06, 0x7e, 0x7c, 0x2a, 0x43, 0xbf, 0x28, 0xac, 0xe9, 0x58, 0x13, 0xc8, 0xbf, 0x8e, 0xc0, 0xef, 0xe8, 0x4f, 0x46, 0x8a, 0xe7, 0xc0, 0xf6, 0x0f, 0x0a, 0x03, 0x48, 0x91, 0x55, 0x39, 0x2a, 0xe3, 0xdc, 0xf6, 0x22, 0x9d, 0x4d, 0x71, 0x55, 0x68, 0x25, 0x6e, 0x95, 0x52, 0xee, 0x4c, 0xd9, 0x01},
+ dt2: fp.Elt{0xac, 0x33, 0x3f, 0x7c, 0x27, 0x35, 0x15, 0x91, 0x33, 0x8d, 0xf9, 0xc4, 0xf4, 0xf3, 0x90, 0x09, 0x75, 0x69, 0x62, 0x9f, 0x61, 0x35, 0x83, 0x92, 0x04, 0xef, 0x96, 0x38, 0x80, 0x9e, 0x88, 0xb3, 0x67, 0x95, 0xbe, 0x79, 0x3c, 0x35, 0xd8, 0xdc, 0xb2, 0x3e, 0x2d, 0xe6, 0x46, 0xbe, 0x81, 0xf3, 0x32, 0x0e, 0x37, 0x23, 0x75, 0x2a, 0x3d, 0xa0},
+ },
+}
diff --git a/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist_basemult.go b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist_basemult.go
new file mode 100644
index 000000000..f6ac5edbb
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/ecc/goldilocks/twist_basemult.go
@@ -0,0 +1,62 @@
+package goldilocks
+
+import (
+ "crypto/subtle"
+
+ mlsb "github.com/cloudflare/circl/math/mlsbset"
+)
+
+const (
+ // MLSBRecoding parameters
+ fxT = 448
+ fxV = 2
+ fxW = 3
+ fx2w1 = 1 << (uint(fxW) - 1)
+)
+
+// ScalarBaseMult returns kG where G is the generator point.
+func (e twistCurve) ScalarBaseMult(k *Scalar) *twistPoint {
+ m, err := mlsb.New(fxT, fxV, fxW)
+ if err != nil {
+ panic(err)
+ }
+ if m.IsExtended() {
+ panic("not extended")
+ }
+
+ var isZero int
+ if k.IsZero() {
+ isZero = 1
+ }
+ subtle.ConstantTimeCopy(isZero, k[:], order[:])
+
+ minusK := *k
+ isEven := 1 - int(k[0]&0x1)
+ minusK.Neg()
+ subtle.ConstantTimeCopy(isEven, k[:], minusK[:])
+ c, err := m.Encode(k[:])
+ if err != nil {
+ panic(err)
+ }
+
+ gP := c.Exp(groupMLSB{})
+ P := gP.(*twistPoint)
+ P.cneg(uint(isEven))
+ return P
+}
+
+type groupMLSB struct{}
+
+func (e groupMLSB) ExtendedEltP() mlsb.EltP { return nil }
+func (e groupMLSB) Sqr(x mlsb.EltG) { x.(*twistPoint).Double() }
+func (e groupMLSB) Mul(x mlsb.EltG, y mlsb.EltP) { x.(*twistPoint).mixAddZ1(y.(*preTwistPointAffine)) }
+func (e groupMLSB) Identity() mlsb.EltG { return twistCurve{}.Identity() }
+func (e groupMLSB) NewEltP() mlsb.EltP { return &preTwistPointAffine{} }
+func (e groupMLSB) Lookup(a mlsb.EltP, v uint, s, u int32) {
+ Tabj := &tabFixMult[v]
+ P := a.(*preTwistPointAffine)
+ for k := range Tabj {
+ P.cmov(&Tabj[k], uint(subtle.ConstantTimeEq(int32(k), u)))
+ }
+ P.cneg(int(s >> 31))
+}
diff --git a/vendor/github.com/cloudflare/circl/internal/conv/conv.go b/vendor/github.com/cloudflare/circl/internal/conv/conv.go
new file mode 100644
index 000000000..649a8e931
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/conv/conv.go
@@ -0,0 +1,140 @@
+package conv
+
+import (
+ "encoding/binary"
+ "fmt"
+ "math/big"
+ "strings"
+)
+
+// BytesLe2Hex returns an hexadecimal string of a number stored in a
+// little-endian order slice x.
+func BytesLe2Hex(x []byte) string {
+ b := &strings.Builder{}
+ b.Grow(2*len(x) + 2)
+ fmt.Fprint(b, "0x")
+ if len(x) == 0 {
+ fmt.Fprint(b, "00")
+ }
+ for i := len(x) - 1; i >= 0; i-- {
+ fmt.Fprintf(b, "%02x", x[i])
+ }
+ return b.String()
+}
+
+// BytesLe2BigInt converts a little-endian slice x into a big-endian
+// math/big.Int.
+func BytesLe2BigInt(x []byte) *big.Int {
+ n := len(x)
+ b := new(big.Int)
+ if len(x) > 0 {
+ y := make([]byte, n)
+ for i := 0; i < n; i++ {
+ y[n-1-i] = x[i]
+ }
+ b.SetBytes(y)
+ }
+ return b
+}
+
+// BytesBe2Uint64Le converts a big-endian slice x to a little-endian slice of uint64.
+func BytesBe2Uint64Le(x []byte) []uint64 {
+ l := len(x)
+ z := make([]uint64, (l+7)/8)
+ blocks := l / 8
+ for i := 0; i < blocks; i++ {
+ z[i] = binary.BigEndian.Uint64(x[l-8*(i+1):])
+ }
+ remBytes := l % 8
+ for i := 0; i < remBytes; i++ {
+ z[blocks] |= uint64(x[l-1-8*blocks-i]) << uint(8*i)
+ }
+ return z
+}
+
+// BigInt2BytesLe stores a positive big.Int number x into a little-endian slice z.
+// The slice is modified if the bitlength of x <= 8*len(z) (padding with zeros).
+// If x does not fit in the slice or is negative, z is not modified.
+func BigInt2BytesLe(z []byte, x *big.Int) {
+ xLen := (x.BitLen() + 7) >> 3
+ zLen := len(z)
+ if zLen >= xLen && x.Sign() >= 0 {
+ y := x.Bytes()
+ for i := 0; i < xLen; i++ {
+ z[i] = y[xLen-1-i]
+ }
+ for i := xLen; i < zLen; i++ {
+ z[i] = 0
+ }
+ }
+}
+
+// Uint64Le2BigInt converts a little-endian slice x into a big number.
+func Uint64Le2BigInt(x []uint64) *big.Int {
+ n := len(x)
+ b := new(big.Int)
+ var bi big.Int
+ for i := n - 1; i >= 0; i-- {
+ bi.SetUint64(x[i])
+ b.Lsh(b, 64)
+ b.Add(b, &bi)
+ }
+ return b
+}
+
+// Uint64Le2BytesLe converts a little-endian slice x to a little-endian slice of bytes.
+func Uint64Le2BytesLe(x []uint64) []byte {
+ b := make([]byte, 8*len(x))
+ n := len(x)
+ for i := 0; i < n; i++ {
+ binary.LittleEndian.PutUint64(b[i*8:], x[i])
+ }
+ return b
+}
+
+// Uint64Le2BytesBe converts a little-endian slice x to a big-endian slice of bytes.
+func Uint64Le2BytesBe(x []uint64) []byte {
+ b := make([]byte, 8*len(x))
+ n := len(x)
+ for i := 0; i < n; i++ {
+ binary.BigEndian.PutUint64(b[i*8:], x[n-1-i])
+ }
+ return b
+}
+
+// Uint64Le2Hex returns an hexadecimal string of a number stored in a
+// little-endian order slice x.
+func Uint64Le2Hex(x []uint64) string {
+ b := new(strings.Builder)
+ b.Grow(16*len(x) + 2)
+ fmt.Fprint(b, "0x")
+ if len(x) == 0 {
+ fmt.Fprint(b, "00")
+ }
+ for i := len(x) - 1; i >= 0; i-- {
+ fmt.Fprintf(b, "%016x", x[i])
+ }
+ return b.String()
+}
+
+// BigInt2Uint64Le stores a positive big.Int number x into a little-endian slice z.
+// The slice is modified if the bitlength of x <= 8*len(z) (padding with zeros).
+// If x does not fit in the slice or is negative, z is not modified.
+func BigInt2Uint64Le(z []uint64, x *big.Int) {
+ xLen := (x.BitLen() + 63) >> 6 // number of 64-bit words
+ zLen := len(z)
+ if zLen >= xLen && x.Sign() > 0 {
+ var y, yi big.Int
+ y.Set(x)
+ two64 := big.NewInt(1)
+ two64.Lsh(two64, 64).Sub(two64, big.NewInt(1))
+ for i := 0; i < xLen; i++ {
+ yi.And(&y, two64)
+ z[i] = yi.Uint64()
+ y.Rsh(&y, 64)
+ }
+ }
+ for i := xLen; i < zLen; i++ {
+ z[i] = 0
+ }
+}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/doc.go b/vendor/github.com/cloudflare/circl/internal/sha3/doc.go
new file mode 100644
index 000000000..7e0230907
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/doc.go
@@ -0,0 +1,62 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package sha3 implements the SHA-3 fixed-output-length hash functions and
+// the SHAKE variable-output-length hash functions defined by FIPS-202.
+//
+// Both types of hash function use the "sponge" construction and the Keccak
+// permutation. For a detailed specification see http://keccak.noekeon.org/
+//
+// # Guidance
+//
+// If you aren't sure what function you need, use SHAKE256 with at least 64
+// bytes of output. The SHAKE instances are faster than the SHA3 instances;
+// the latter have to allocate memory to conform to the hash.Hash interface.
+//
+// If you need a secret-key MAC (message authentication code), prepend the
+// secret key to the input, hash with SHAKE256 and read at least 32 bytes of
+// output.
+//
+// # Security strengths
+//
+// The SHA3-x (x equals 224, 256, 384, or 512) functions have a security
+// strength against preimage attacks of x bits. Since they only produce "x"
+// bits of output, their collision-resistance is only "x/2" bits.
+//
+// The SHAKE-256 and -128 functions have a generic security strength of 256 and
+// 128 bits against all attacks, provided that at least 2x bits of their output
+// is used. Requesting more than 64 or 32 bytes of output, respectively, does
+// not increase the collision-resistance of the SHAKE functions.
+//
+// # The sponge construction
+//
+// A sponge builds a pseudo-random function from a public pseudo-random
+// permutation, by applying the permutation to a state of "rate + capacity"
+// bytes, but hiding "capacity" of the bytes.
+//
+// A sponge starts out with a zero state. To hash an input using a sponge, up
+// to "rate" bytes of the input are XORed into the sponge's state. The sponge
+// is then "full" and the permutation is applied to "empty" it. This process is
+// repeated until all the input has been "absorbed". The input is then padded.
+// The digest is "squeezed" from the sponge in the same way, except that output
+// is copied out instead of input being XORed in.
+//
+// A sponge is parameterized by its generic security strength, which is equal
+// to half its capacity; capacity + rate is equal to the permutation's width.
+// Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means
+// that the security strength of a sponge instance is equal to (1600 - bitrate) / 2.
+//
+// # Recommendations
+//
+// The SHAKE functions are recommended for most new uses. They can produce
+// output of arbitrary length. SHAKE256, with an output length of at least
+// 64 bytes, provides 256-bit security against all attacks. The Keccak team
+// recommends it for most applications upgrading from SHA2-512. (NIST chose a
+// much stronger, but much slower, sponge instance for SHA3-512.)
+//
+// The SHA-3 functions are "drop-in" replacements for the SHA-2 functions.
+// They produce output of the same length, with the same security strengths
+// against all attacks. This means, in particular, that SHA3-256 only has
+// 128-bit collision resistance, because its output length is 32 bytes.
+package sha3
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/hashes.go b/vendor/github.com/cloudflare/circl/internal/sha3/hashes.go
new file mode 100644
index 000000000..7d2365a76
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/hashes.go
@@ -0,0 +1,69 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+// This file provides functions for creating instances of the SHA-3
+// and SHAKE hash functions, as well as utility functions for hashing
+// bytes.
+
+// New224 creates a new SHA3-224 hash.
+// Its generic security strength is 224 bits against preimage attacks,
+// and 112 bits against collision attacks.
+func New224() State {
+ return State{rate: 144, outputLen: 28, dsbyte: 0x06}
+}
+
+// New256 creates a new SHA3-256 hash.
+// Its generic security strength is 256 bits against preimage attacks,
+// and 128 bits against collision attacks.
+func New256() State {
+ return State{rate: 136, outputLen: 32, dsbyte: 0x06}
+}
+
+// New384 creates a new SHA3-384 hash.
+// Its generic security strength is 384 bits against preimage attacks,
+// and 192 bits against collision attacks.
+func New384() State {
+ return State{rate: 104, outputLen: 48, dsbyte: 0x06}
+}
+
+// New512 creates a new SHA3-512 hash.
+// Its generic security strength is 512 bits against preimage attacks,
+// and 256 bits against collision attacks.
+func New512() State {
+ return State{rate: 72, outputLen: 64, dsbyte: 0x06}
+}
+
+// Sum224 returns the SHA3-224 digest of the data.
+func Sum224(data []byte) (digest [28]byte) {
+ h := New224()
+ _, _ = h.Write(data)
+ h.Sum(digest[:0])
+ return
+}
+
+// Sum256 returns the SHA3-256 digest of the data.
+func Sum256(data []byte) (digest [32]byte) {
+ h := New256()
+ _, _ = h.Write(data)
+ h.Sum(digest[:0])
+ return
+}
+
+// Sum384 returns the SHA3-384 digest of the data.
+func Sum384(data []byte) (digest [48]byte) {
+ h := New384()
+ _, _ = h.Write(data)
+ h.Sum(digest[:0])
+ return
+}
+
+// Sum512 returns the SHA3-512 digest of the data.
+func Sum512(data []byte) (digest [64]byte) {
+ h := New512()
+ _, _ = h.Write(data)
+ h.Sum(digest[:0])
+ return
+}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/keccakf.go b/vendor/github.com/cloudflare/circl/internal/sha3/keccakf.go
new file mode 100644
index 000000000..1755fd1e6
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/keccakf.go
@@ -0,0 +1,391 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+// KeccakF1600 applies the Keccak permutation to a 1600b-wide
+// state represented as a slice of 25 uint64s.
+// If turbo is true, applies the 12-round variant instead of the
+// regular 24-round variant.
+// nolint:funlen
+func KeccakF1600(a *[25]uint64, turbo bool) {
+ // Implementation translated from Keccak-inplace.c
+ // in the keccak reference code.
+ var t, bc0, bc1, bc2, bc3, bc4, d0, d1, d2, d3, d4 uint64
+
+ i := 0
+
+ if turbo {
+ i = 12
+ }
+
+ for ; i < 24; i += 4 {
+ // Combines the 5 steps in each round into 2 steps.
+ // Unrolls 4 rounds per loop and spreads some steps across rounds.
+
+ // Round 1
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[6] ^ d1
+ bc1 = t<<44 | t>>(64-44)
+ t = a[12] ^ d2
+ bc2 = t<<43 | t>>(64-43)
+ t = a[18] ^ d3
+ bc3 = t<<21 | t>>(64-21)
+ t = a[24] ^ d4
+ bc4 = t<<14 | t>>(64-14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ RC[i]
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc2 = t<<3 | t>>(64-3)
+ t = a[16] ^ d1
+ bc3 = t<<45 | t>>(64-45)
+ t = a[22] ^ d2
+ bc4 = t<<61 | t>>(64-61)
+ t = a[3] ^ d3
+ bc0 = t<<28 | t>>(64-28)
+ t = a[9] ^ d4
+ bc1 = t<<20 | t>>(64-20)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc4 = t<<18 | t>>(64-18)
+ t = a[1] ^ d1
+ bc0 = t<<1 | t>>(64-1)
+ t = a[7] ^ d2
+ bc1 = t<<6 | t>>(64-6)
+ t = a[13] ^ d3
+ bc2 = t<<25 | t>>(64-25)
+ t = a[19] ^ d4
+ bc3 = t<<8 | t>>(64-8)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc1 = t<<36 | t>>(64-36)
+ t = a[11] ^ d1
+ bc2 = t<<10 | t>>(64-10)
+ t = a[17] ^ d2
+ bc3 = t<<15 | t>>(64-15)
+ t = a[23] ^ d3
+ bc4 = t<<56 | t>>(64-56)
+ t = a[4] ^ d4
+ bc0 = t<<27 | t>>(64-27)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc3 = t<<41 | t>>(64-41)
+ t = a[21] ^ d1
+ bc4 = t<<2 | t>>(64-2)
+ t = a[2] ^ d2
+ bc0 = t<<62 | t>>(64-62)
+ t = a[8] ^ d3
+ bc1 = t<<55 | t>>(64-55)
+ t = a[14] ^ d4
+ bc2 = t<<39 | t>>(64-39)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ // Round 2
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[16] ^ d1
+ bc1 = t<<44 | t>>(64-44)
+ t = a[7] ^ d2
+ bc2 = t<<43 | t>>(64-43)
+ t = a[23] ^ d3
+ bc3 = t<<21 | t>>(64-21)
+ t = a[14] ^ d4
+ bc4 = t<<14 | t>>(64-14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ RC[i+1]
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc2 = t<<3 | t>>(64-3)
+ t = a[11] ^ d1
+ bc3 = t<<45 | t>>(64-45)
+ t = a[2] ^ d2
+ bc4 = t<<61 | t>>(64-61)
+ t = a[18] ^ d3
+ bc0 = t<<28 | t>>(64-28)
+ t = a[9] ^ d4
+ bc1 = t<<20 | t>>(64-20)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc4 = t<<18 | t>>(64-18)
+ t = a[6] ^ d1
+ bc0 = t<<1 | t>>(64-1)
+ t = a[22] ^ d2
+ bc1 = t<<6 | t>>(64-6)
+ t = a[13] ^ d3
+ bc2 = t<<25 | t>>(64-25)
+ t = a[4] ^ d4
+ bc3 = t<<8 | t>>(64-8)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc1 = t<<36 | t>>(64-36)
+ t = a[1] ^ d1
+ bc2 = t<<10 | t>>(64-10)
+ t = a[17] ^ d2
+ bc3 = t<<15 | t>>(64-15)
+ t = a[8] ^ d3
+ bc4 = t<<56 | t>>(64-56)
+ t = a[24] ^ d4
+ bc0 = t<<27 | t>>(64-27)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc3 = t<<41 | t>>(64-41)
+ t = a[21] ^ d1
+ bc4 = t<<2 | t>>(64-2)
+ t = a[12] ^ d2
+ bc0 = t<<62 | t>>(64-62)
+ t = a[3] ^ d3
+ bc1 = t<<55 | t>>(64-55)
+ t = a[19] ^ d4
+ bc2 = t<<39 | t>>(64-39)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ // Round 3
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[11] ^ d1
+ bc1 = t<<44 | t>>(64-44)
+ t = a[22] ^ d2
+ bc2 = t<<43 | t>>(64-43)
+ t = a[8] ^ d3
+ bc3 = t<<21 | t>>(64-21)
+ t = a[19] ^ d4
+ bc4 = t<<14 | t>>(64-14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ RC[i+2]
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc2 = t<<3 | t>>(64-3)
+ t = a[1] ^ d1
+ bc3 = t<<45 | t>>(64-45)
+ t = a[12] ^ d2
+ bc4 = t<<61 | t>>(64-61)
+ t = a[23] ^ d3
+ bc0 = t<<28 | t>>(64-28)
+ t = a[9] ^ d4
+ bc1 = t<<20 | t>>(64-20)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc4 = t<<18 | t>>(64-18)
+ t = a[16] ^ d1
+ bc0 = t<<1 | t>>(64-1)
+ t = a[2] ^ d2
+ bc1 = t<<6 | t>>(64-6)
+ t = a[13] ^ d3
+ bc2 = t<<25 | t>>(64-25)
+ t = a[24] ^ d4
+ bc3 = t<<8 | t>>(64-8)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc1 = t<<36 | t>>(64-36)
+ t = a[6] ^ d1
+ bc2 = t<<10 | t>>(64-10)
+ t = a[17] ^ d2
+ bc3 = t<<15 | t>>(64-15)
+ t = a[3] ^ d3
+ bc4 = t<<56 | t>>(64-56)
+ t = a[14] ^ d4
+ bc0 = t<<27 | t>>(64-27)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc3 = t<<41 | t>>(64-41)
+ t = a[21] ^ d1
+ bc4 = t<<2 | t>>(64-2)
+ t = a[7] ^ d2
+ bc0 = t<<62 | t>>(64-62)
+ t = a[18] ^ d3
+ bc1 = t<<55 | t>>(64-55)
+ t = a[4] ^ d4
+ bc2 = t<<39 | t>>(64-39)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ // Round 4
+ bc0 = a[0] ^ a[5] ^ a[10] ^ a[15] ^ a[20]
+ bc1 = a[1] ^ a[6] ^ a[11] ^ a[16] ^ a[21]
+ bc2 = a[2] ^ a[7] ^ a[12] ^ a[17] ^ a[22]
+ bc3 = a[3] ^ a[8] ^ a[13] ^ a[18] ^ a[23]
+ bc4 = a[4] ^ a[9] ^ a[14] ^ a[19] ^ a[24]
+ d0 = bc4 ^ (bc1<<1 | bc1>>63)
+ d1 = bc0 ^ (bc2<<1 | bc2>>63)
+ d2 = bc1 ^ (bc3<<1 | bc3>>63)
+ d3 = bc2 ^ (bc4<<1 | bc4>>63)
+ d4 = bc3 ^ (bc0<<1 | bc0>>63)
+
+ bc0 = a[0] ^ d0
+ t = a[1] ^ d1
+ bc1 = t<<44 | t>>(64-44)
+ t = a[2] ^ d2
+ bc2 = t<<43 | t>>(64-43)
+ t = a[3] ^ d3
+ bc3 = t<<21 | t>>(64-21)
+ t = a[4] ^ d4
+ bc4 = t<<14 | t>>(64-14)
+ a[0] = bc0 ^ (bc2 &^ bc1) ^ RC[i+3]
+ a[1] = bc1 ^ (bc3 &^ bc2)
+ a[2] = bc2 ^ (bc4 &^ bc3)
+ a[3] = bc3 ^ (bc0 &^ bc4)
+ a[4] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[5] ^ d0
+ bc2 = t<<3 | t>>(64-3)
+ t = a[6] ^ d1
+ bc3 = t<<45 | t>>(64-45)
+ t = a[7] ^ d2
+ bc4 = t<<61 | t>>(64-61)
+ t = a[8] ^ d3
+ bc0 = t<<28 | t>>(64-28)
+ t = a[9] ^ d4
+ bc1 = t<<20 | t>>(64-20)
+ a[5] = bc0 ^ (bc2 &^ bc1)
+ a[6] = bc1 ^ (bc3 &^ bc2)
+ a[7] = bc2 ^ (bc4 &^ bc3)
+ a[8] = bc3 ^ (bc0 &^ bc4)
+ a[9] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[10] ^ d0
+ bc4 = t<<18 | t>>(64-18)
+ t = a[11] ^ d1
+ bc0 = t<<1 | t>>(64-1)
+ t = a[12] ^ d2
+ bc1 = t<<6 | t>>(64-6)
+ t = a[13] ^ d3
+ bc2 = t<<25 | t>>(64-25)
+ t = a[14] ^ d4
+ bc3 = t<<8 | t>>(64-8)
+ a[10] = bc0 ^ (bc2 &^ bc1)
+ a[11] = bc1 ^ (bc3 &^ bc2)
+ a[12] = bc2 ^ (bc4 &^ bc3)
+ a[13] = bc3 ^ (bc0 &^ bc4)
+ a[14] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[15] ^ d0
+ bc1 = t<<36 | t>>(64-36)
+ t = a[16] ^ d1
+ bc2 = t<<10 | t>>(64-10)
+ t = a[17] ^ d2
+ bc3 = t<<15 | t>>(64-15)
+ t = a[18] ^ d3
+ bc4 = t<<56 | t>>(64-56)
+ t = a[19] ^ d4
+ bc0 = t<<27 | t>>(64-27)
+ a[15] = bc0 ^ (bc2 &^ bc1)
+ a[16] = bc1 ^ (bc3 &^ bc2)
+ a[17] = bc2 ^ (bc4 &^ bc3)
+ a[18] = bc3 ^ (bc0 &^ bc4)
+ a[19] = bc4 ^ (bc1 &^ bc0)
+
+ t = a[20] ^ d0
+ bc3 = t<<41 | t>>(64-41)
+ t = a[21] ^ d1
+ bc4 = t<<2 | t>>(64-2)
+ t = a[22] ^ d2
+ bc0 = t<<62 | t>>(64-62)
+ t = a[23] ^ d3
+ bc1 = t<<55 | t>>(64-55)
+ t = a[24] ^ d4
+ bc2 = t<<39 | t>>(64-39)
+ a[20] = bc0 ^ (bc2 &^ bc1)
+ a[21] = bc1 ^ (bc3 &^ bc2)
+ a[22] = bc2 ^ (bc4 &^ bc3)
+ a[23] = bc3 ^ (bc0 &^ bc4)
+ a[24] = bc4 ^ (bc1 &^ bc0)
+ }
+}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/rc.go b/vendor/github.com/cloudflare/circl/internal/sha3/rc.go
new file mode 100644
index 000000000..6a3df42f3
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/rc.go
@@ -0,0 +1,29 @@
+package sha3
+
+// RC stores the round constants for use in the ι step.
+var RC = [24]uint64{
+ 0x0000000000000001,
+ 0x0000000000008082,
+ 0x800000000000808A,
+ 0x8000000080008000,
+ 0x000000000000808B,
+ 0x0000000080000001,
+ 0x8000000080008081,
+ 0x8000000000008009,
+ 0x000000000000008A,
+ 0x0000000000000088,
+ 0x0000000080008009,
+ 0x000000008000000A,
+ 0x000000008000808B,
+ 0x800000000000008B,
+ 0x8000000000008089,
+ 0x8000000000008003,
+ 0x8000000000008002,
+ 0x8000000000000080,
+ 0x000000000000800A,
+ 0x800000008000000A,
+ 0x8000000080008081,
+ 0x8000000000008080,
+ 0x0000000080000001,
+ 0x8000000080008008,
+}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/sha3.go b/vendor/github.com/cloudflare/circl/internal/sha3/sha3.go
new file mode 100644
index 000000000..a0df5aa6c
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/sha3.go
@@ -0,0 +1,200 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+// spongeDirection indicates the direction bytes are flowing through the sponge.
+type spongeDirection int
+
+const (
+ // spongeAbsorbing indicates that the sponge is absorbing input.
+ spongeAbsorbing spongeDirection = iota
+ // spongeSqueezing indicates that the sponge is being squeezed.
+ spongeSqueezing
+)
+
+const (
+ // maxRate is the maximum size of the internal buffer. SHAKE-256
+ // currently needs the largest buffer.
+ maxRate = 168
+)
+
+func (d *State) buf() []byte {
+ return d.storage.asBytes()[d.bufo:d.bufe]
+}
+
+type State struct {
+ // Generic sponge components.
+ a [25]uint64 // main state of the hash
+ rate int // the number of bytes of state to use
+
+ bufo int // offset of buffer in storage
+ bufe int // end of buffer in storage
+
+ // dsbyte contains the "domain separation" bits and the first bit of
+ // the padding. Sections 6.1 and 6.2 of [1] separate the outputs of the
+ // SHA-3 and SHAKE functions by appending bitstrings to the message.
+ // Using a little-endian bit-ordering convention, these are "01" for SHA-3
+ // and "1111" for SHAKE, or 00000010b and 00001111b, respectively. Then the
+ // padding rule from section 5.1 is applied to pad the message to a multiple
+ // of the rate, which involves adding a "1" bit, zero or more "0" bits, and
+ // a final "1" bit. We merge the first "1" bit from the padding into dsbyte,
+ // giving 00000110b (0x06) and 00011111b (0x1f).
+ // [1] http://csrc.nist.gov/publications/drafts/fips-202/fips_202_draft.pdf
+ // "Draft FIPS 202: SHA-3 Standard: Permutation-Based Hash and
+ // Extendable-Output Functions (May 2014)"
+ dsbyte byte
+
+ storage storageBuf
+
+ // Specific to SHA-3 and SHAKE.
+ outputLen int // the default output size in bytes
+ state spongeDirection // whether the sponge is absorbing or squeezing
+ turbo bool // Whether we're using 12 rounds instead of 24
+}
+
+// BlockSize returns the rate of sponge underlying this hash function.
+func (d *State) BlockSize() int { return d.rate }
+
+// Size returns the output size of the hash function in bytes.
+func (d *State) Size() int { return d.outputLen }
+
+// Reset clears the internal state by zeroing the sponge state and
+// the byte buffer, and setting Sponge.state to absorbing.
+func (d *State) Reset() {
+ // Zero the permutation's state.
+ for i := range d.a {
+ d.a[i] = 0
+ }
+ d.state = spongeAbsorbing
+ d.bufo = 0
+ d.bufe = 0
+}
+
+func (d *State) clone() *State {
+ ret := *d
+ return &ret
+}
+
+// permute applies the KeccakF-1600 permutation. It handles
+// any input-output buffering.
+func (d *State) permute() {
+ switch d.state {
+ case spongeAbsorbing:
+ // If we're absorbing, we need to xor the input into the state
+ // before applying the permutation.
+ xorIn(d, d.buf())
+ d.bufe = 0
+ d.bufo = 0
+ KeccakF1600(&d.a, d.turbo)
+ case spongeSqueezing:
+ // If we're squeezing, we need to apply the permutation before
+ // copying more output.
+ KeccakF1600(&d.a, d.turbo)
+ d.bufe = d.rate
+ d.bufo = 0
+ copyOut(d, d.buf())
+ }
+}
+
+// pads appends the domain separation bits in dsbyte, applies
+// the multi-bitrate 10..1 padding rule, and permutes the state.
+func (d *State) padAndPermute(dsbyte byte) {
+ // Pad with this instance's domain-separator bits. We know that there's
+ // at least one byte of space in d.buf() because, if it were full,
+ // permute would have been called to empty it. dsbyte also contains the
+ // first one bit for the padding. See the comment in the state struct.
+ zerosStart := d.bufe + 1
+ d.bufe = d.rate
+ buf := d.buf()
+ buf[zerosStart-1] = dsbyte
+ for i := zerosStart; i < d.rate; i++ {
+ buf[i] = 0
+ }
+ // This adds the final one bit for the padding. Because of the way that
+ // bits are numbered from the LSB upwards, the final bit is the MSB of
+ // the last byte.
+ buf[d.rate-1] ^= 0x80
+ // Apply the permutation
+ d.permute()
+ d.state = spongeSqueezing
+ d.bufe = d.rate
+ copyOut(d, buf)
+}
+
+// Write absorbs more data into the hash's state. It produces an error
+// if more data is written to the ShakeHash after writing
+func (d *State) Write(p []byte) (written int, err error) {
+ if d.state != spongeAbsorbing {
+ panic("sha3: write to sponge after read")
+ }
+ written = len(p)
+
+ for len(p) > 0 {
+ bufl := d.bufe - d.bufo
+ if bufl == 0 && len(p) >= d.rate {
+ // The fast path; absorb a full "rate" bytes of input and apply the permutation.
+ xorIn(d, p[:d.rate])
+ p = p[d.rate:]
+ KeccakF1600(&d.a, d.turbo)
+ } else {
+ // The slow path; buffer the input until we can fill the sponge, and then xor it in.
+ todo := d.rate - bufl
+ if todo > len(p) {
+ todo = len(p)
+ }
+ d.bufe += todo
+ buf := d.buf()
+ copy(buf[bufl:], p[:todo])
+ p = p[todo:]
+
+ // If the sponge is full, apply the permutation.
+ if d.bufe == d.rate {
+ d.permute()
+ }
+ }
+ }
+
+ return written, nil
+}
+
+// Read squeezes an arbitrary number of bytes from the sponge.
+func (d *State) Read(out []byte) (n int, err error) {
+ // If we're still absorbing, pad and apply the permutation.
+ if d.state == spongeAbsorbing {
+ d.padAndPermute(d.dsbyte)
+ }
+
+ n = len(out)
+
+ // Now, do the squeezing.
+ for len(out) > 0 {
+ buf := d.buf()
+ n := copy(out, buf)
+ d.bufo += n
+ out = out[n:]
+
+ // Apply the permutation if we've squeezed the sponge dry.
+ if d.bufo == d.bufe {
+ d.permute()
+ }
+ }
+
+ return
+}
+
+// Sum applies padding to the hash state and then squeezes out the desired
+// number of output bytes.
+func (d *State) Sum(in []byte) []byte {
+ // Make a copy of the original hash so that caller can keep writing
+ // and summing.
+ dup := d.clone()
+ hash := make([]byte, dup.outputLen)
+ _, _ = dup.Read(hash)
+ return append(in, hash...)
+}
+
+func (d *State) IsAbsorbing() bool {
+ return d.state == spongeAbsorbing
+}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/sha3_s390x.s b/vendor/github.com/cloudflare/circl/internal/sha3/sha3_s390x.s
new file mode 100644
index 000000000..8a4458f63
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/sha3_s390x.s
@@ -0,0 +1,33 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !gccgo,!appengine
+
+#include "textflag.h"
+
+// func kimd(function code, chain *[200]byte, src []byte)
+TEXT ·kimd(SB), NOFRAME|NOSPLIT, $0-40
+ MOVD function+0(FP), R0
+ MOVD chain+8(FP), R1
+ LMG src+16(FP), R2, R3 // R2=base, R3=len
+
+continue:
+ WORD $0xB93E0002 // KIMD --, R2
+ BVS continue // continue if interrupted
+ MOVD $0, R0 // reset R0 for pre-go1.8 compilers
+ RET
+
+// func klmd(function code, chain *[200]byte, dst, src []byte)
+TEXT ·klmd(SB), NOFRAME|NOSPLIT, $0-64
+ // TODO: SHAKE support
+ MOVD function+0(FP), R0
+ MOVD chain+8(FP), R1
+ LMG dst+16(FP), R2, R3 // R2=base, R3=len
+ LMG src+40(FP), R4, R5 // R4=base, R5=len
+
+continue:
+ WORD $0xB93F0024 // KLMD R2, R4
+ BVS continue // continue if interrupted
+ MOVD $0, R0 // reset R0 for pre-go1.8 compilers
+ RET
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/shake.go b/vendor/github.com/cloudflare/circl/internal/sha3/shake.go
new file mode 100644
index 000000000..77817f758
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/shake.go
@@ -0,0 +1,119 @@
+// Copyright 2014 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package sha3
+
+// This file defines the ShakeHash interface, and provides
+// functions for creating SHAKE and cSHAKE instances, as well as utility
+// functions for hashing bytes to arbitrary-length output.
+//
+//
+// SHAKE implementation is based on FIPS PUB 202 [1]
+// cSHAKE implementations is based on NIST SP 800-185 [2]
+//
+// [1] https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf
+// [2] https://doi.org/10.6028/NIST.SP.800-185
+
+import (
+ "io"
+)
+
+// ShakeHash defines the interface to hash functions that
+// support arbitrary-length output.
+type ShakeHash interface {
+ // Write absorbs more data into the hash's state. It panics if input is
+ // written to it after output has been read from it.
+ io.Writer
+
+ // Read reads more output from the hash; reading affects the hash's
+ // state. (ShakeHash.Read is thus very different from Hash.Sum)
+ // It never returns an error.
+ io.Reader
+
+ // Clone returns a copy of the ShakeHash in its current state.
+ Clone() ShakeHash
+
+ // Reset resets the ShakeHash to its initial state.
+ Reset()
+}
+
+// Consts for configuring initial SHA-3 state
+const (
+ dsbyteShake = 0x1f
+ rate128 = 168
+ rate256 = 136
+)
+
+// Clone returns copy of SHAKE context within its current state.
+func (d *State) Clone() ShakeHash {
+ return d.clone()
+}
+
+// NewShake128 creates a new SHAKE128 variable-output-length ShakeHash.
+// Its generic security strength is 128 bits against all attacks if at
+// least 32 bytes of its output are used.
+func NewShake128() State {
+ return State{rate: rate128, dsbyte: dsbyteShake}
+}
+
+// NewTurboShake128 creates a new TurboSHAKE128 variable-output-length ShakeHash.
+// Its generic security strength is 128 bits against all attacks if at
+// least 32 bytes of its output are used.
+// D is the domain separation byte and must be between 0x01 and 0x7f inclusive.
+func NewTurboShake128(D byte) State {
+ if D == 0 || D > 0x7f {
+ panic("turboshake: D out of range")
+ }
+ return State{rate: rate128, dsbyte: D, turbo: true}
+}
+
+// NewShake256 creates a new SHAKE256 variable-output-length ShakeHash.
+// Its generic security strength is 256 bits against all attacks if
+// at least 64 bytes of its output are used.
+func NewShake256() State {
+ return State{rate: rate256, dsbyte: dsbyteShake}
+}
+
+// NewTurboShake256 creates a new TurboSHAKE256 variable-output-length ShakeHash.
+// Its generic security strength is 256 bits against all attacks if
+// at least 64 bytes of its output are used.
+// D is the domain separation byte and must be between 0x01 and 0x7f inclusive.
+func NewTurboShake256(D byte) State {
+ if D == 0 || D > 0x7f {
+ panic("turboshake: D out of range")
+ }
+ return State{rate: rate256, dsbyte: D, turbo: true}
+}
+
+// ShakeSum128 writes an arbitrary-length digest of data into hash.
+func ShakeSum128(hash, data []byte) {
+ h := NewShake128()
+ _, _ = h.Write(data)
+ _, _ = h.Read(hash)
+}
+
+// ShakeSum256 writes an arbitrary-length digest of data into hash.
+func ShakeSum256(hash, data []byte) {
+ h := NewShake256()
+ _, _ = h.Write(data)
+ _, _ = h.Read(hash)
+}
+
+// TurboShakeSum128 writes an arbitrary-length digest of data into hash.
+func TurboShakeSum128(hash, data []byte, D byte) {
+ h := NewTurboShake128(D)
+ _, _ = h.Write(data)
+ _, _ = h.Read(hash)
+}
+
+// TurboShakeSum256 writes an arbitrary-length digest of data into hash.
+func TurboShakeSum256(hash, data []byte, D byte) {
+ h := NewTurboShake256(D)
+ _, _ = h.Write(data)
+ _, _ = h.Read(hash)
+}
+
+func (d *State) SwitchDS(D byte) {
+ d.dsbyte = D
+}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/xor.go b/vendor/github.com/cloudflare/circl/internal/sha3/xor.go
new file mode 100644
index 000000000..1e2133745
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/xor.go
@@ -0,0 +1,15 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (!amd64 && !386 && !ppc64le) || appengine
+// +build !amd64,!386,!ppc64le appengine
+
+package sha3
+
+// A storageBuf is an aligned array of maxRate bytes.
+type storageBuf [maxRate]byte
+
+func (b *storageBuf) asBytes() *[maxRate]byte {
+ return (*[maxRate]byte)(b)
+}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/xor_generic.go b/vendor/github.com/cloudflare/circl/internal/sha3/xor_generic.go
new file mode 100644
index 000000000..2b0c66179
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/xor_generic.go
@@ -0,0 +1,33 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (!amd64 || appengine) && (!386 || appengine) && (!ppc64le || appengine)
+// +build !amd64 appengine
+// +build !386 appengine
+// +build !ppc64le appengine
+
+package sha3
+
+import "encoding/binary"
+
+// xorIn xors the bytes in buf into the state; it
+// makes no non-portable assumptions about memory layout
+// or alignment.
+func xorIn(d *State, buf []byte) {
+ n := len(buf) / 8
+
+ for i := 0; i < n; i++ {
+ a := binary.LittleEndian.Uint64(buf)
+ d.a[i] ^= a
+ buf = buf[8:]
+ }
+}
+
+// copyOut copies ulint64s to a byte buffer.
+func copyOut(d *State, b []byte) {
+ for i := 0; len(b) >= 8; i++ {
+ binary.LittleEndian.PutUint64(b, d.a[i])
+ b = b[8:]
+ }
+}
diff --git a/vendor/github.com/cloudflare/circl/internal/sha3/xor_unaligned.go b/vendor/github.com/cloudflare/circl/internal/sha3/xor_unaligned.go
new file mode 100644
index 000000000..052fc8d32
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/internal/sha3/xor_unaligned.go
@@ -0,0 +1,61 @@
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (amd64 || 386 || ppc64le) && !appengine
+// +build amd64 386 ppc64le
+// +build !appengine
+
+package sha3
+
+import "unsafe"
+
+// A storageBuf is an aligned array of maxRate bytes.
+type storageBuf [maxRate / 8]uint64
+
+func (b *storageBuf) asBytes() *[maxRate]byte {
+ return (*[maxRate]byte)(unsafe.Pointer(b))
+}
+
+// xorInuses unaligned reads and writes to update d.a to contain d.a
+// XOR buf.
+func xorIn(d *State, buf []byte) {
+ n := len(buf)
+ bw := (*[maxRate / 8]uint64)(unsafe.Pointer(&buf[0]))[: n/8 : n/8]
+ if n >= 72 {
+ d.a[0] ^= bw[0]
+ d.a[1] ^= bw[1]
+ d.a[2] ^= bw[2]
+ d.a[3] ^= bw[3]
+ d.a[4] ^= bw[4]
+ d.a[5] ^= bw[5]
+ d.a[6] ^= bw[6]
+ d.a[7] ^= bw[7]
+ d.a[8] ^= bw[8]
+ }
+ if n >= 104 {
+ d.a[9] ^= bw[9]
+ d.a[10] ^= bw[10]
+ d.a[11] ^= bw[11]
+ d.a[12] ^= bw[12]
+ }
+ if n >= 136 {
+ d.a[13] ^= bw[13]
+ d.a[14] ^= bw[14]
+ d.a[15] ^= bw[15]
+ d.a[16] ^= bw[16]
+ }
+ if n >= 144 {
+ d.a[17] ^= bw[17]
+ }
+ if n >= 168 {
+ d.a[18] ^= bw[18]
+ d.a[19] ^= bw[19]
+ d.a[20] ^= bw[20]
+ }
+}
+
+func copyOut(d *State, buf []byte) {
+ ab := (*[maxRate]uint8)(unsafe.Pointer(&d.a[0]))
+ copy(buf, ab[:])
+}
diff --git a/vendor/github.com/cloudflare/circl/math/fp25519/fp.go b/vendor/github.com/cloudflare/circl/math/fp25519/fp.go
new file mode 100644
index 000000000..57a50ff5e
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp25519/fp.go
@@ -0,0 +1,205 @@
+// Package fp25519 provides prime field arithmetic over GF(2^255-19).
+package fp25519
+
+import (
+ "errors"
+
+ "github.com/cloudflare/circl/internal/conv"
+)
+
+// Size in bytes of an element.
+const Size = 32
+
+// Elt is a prime field element.
+type Elt [Size]byte
+
+func (e Elt) String() string { return conv.BytesLe2Hex(e[:]) }
+
+// p is the prime modulus 2^255-19.
+var p = Elt{
+ 0xed, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f,
+}
+
+// P returns the prime modulus 2^255-19.
+func P() Elt { return p }
+
+// ToBytes stores in b the little-endian byte representation of x.
+func ToBytes(b []byte, x *Elt) error {
+ if len(b) != Size {
+ return errors.New("wrong size")
+ }
+ Modp(x)
+ copy(b, x[:])
+ return nil
+}
+
+// IsZero returns true if x is equal to 0.
+func IsZero(x *Elt) bool { Modp(x); return *x == Elt{} }
+
+// SetOne assigns x=1.
+func SetOne(x *Elt) { *x = Elt{}; x[0] = 1 }
+
+// Neg calculates z = -x.
+func Neg(z, x *Elt) { Sub(z, &p, x) }
+
+// InvSqrt calculates z = sqrt(x/y) iff x/y is a quadratic-residue, which is
+// indicated by returning isQR = true. Otherwise, when x/y is a quadratic
+// non-residue, z will have an undetermined value and isQR = false.
+func InvSqrt(z, x, y *Elt) (isQR bool) {
+ sqrtMinusOne := &Elt{
+ 0xb0, 0xa0, 0x0e, 0x4a, 0x27, 0x1b, 0xee, 0xc4,
+ 0x78, 0xe4, 0x2f, 0xad, 0x06, 0x18, 0x43, 0x2f,
+ 0xa7, 0xd7, 0xfb, 0x3d, 0x99, 0x00, 0x4d, 0x2b,
+ 0x0b, 0xdf, 0xc1, 0x4f, 0x80, 0x24, 0x83, 0x2b,
+ }
+ t0, t1, t2, t3 := &Elt{}, &Elt{}, &Elt{}, &Elt{}
+
+ Mul(t0, x, y) // t0 = u*v
+ Sqr(t1, y) // t1 = v^2
+ Mul(t2, t0, t1) // t2 = u*v^3
+ Sqr(t0, t1) // t0 = v^4
+ Mul(t1, t0, t2) // t1 = u*v^7
+
+ var Tab [4]*Elt
+ Tab[0] = &Elt{}
+ Tab[1] = &Elt{}
+ Tab[2] = t3
+ Tab[3] = t1
+
+ *Tab[0] = *t1
+ Sqr(Tab[0], Tab[0])
+ Sqr(Tab[1], Tab[0])
+ Sqr(Tab[1], Tab[1])
+ Mul(Tab[1], Tab[1], Tab[3])
+ Mul(Tab[0], Tab[0], Tab[1])
+ Sqr(Tab[0], Tab[0])
+ Mul(Tab[0], Tab[0], Tab[1])
+ Sqr(Tab[1], Tab[0])
+ for i := 0; i < 4; i++ {
+ Sqr(Tab[1], Tab[1])
+ }
+ Mul(Tab[1], Tab[1], Tab[0])
+ Sqr(Tab[2], Tab[1])
+ for i := 0; i < 4; i++ {
+ Sqr(Tab[2], Tab[2])
+ }
+ Mul(Tab[2], Tab[2], Tab[0])
+ Sqr(Tab[1], Tab[2])
+ for i := 0; i < 14; i++ {
+ Sqr(Tab[1], Tab[1])
+ }
+ Mul(Tab[1], Tab[1], Tab[2])
+ Sqr(Tab[2], Tab[1])
+ for i := 0; i < 29; i++ {
+ Sqr(Tab[2], Tab[2])
+ }
+ Mul(Tab[2], Tab[2], Tab[1])
+ Sqr(Tab[1], Tab[2])
+ for i := 0; i < 59; i++ {
+ Sqr(Tab[1], Tab[1])
+ }
+ Mul(Tab[1], Tab[1], Tab[2])
+ for i := 0; i < 5; i++ {
+ Sqr(Tab[1], Tab[1])
+ }
+ Mul(Tab[1], Tab[1], Tab[0])
+ Sqr(Tab[2], Tab[1])
+ for i := 0; i < 124; i++ {
+ Sqr(Tab[2], Tab[2])
+ }
+ Mul(Tab[2], Tab[2], Tab[1])
+ Sqr(Tab[2], Tab[2])
+ Sqr(Tab[2], Tab[2])
+ Mul(Tab[2], Tab[2], Tab[3])
+
+ Mul(z, t3, t2) // z = xy^(p+3)/8 = xy^3*(xy^7)^(p-5)/8
+ // Checking whether y z^2 == x
+ Sqr(t0, z) // t0 = z^2
+ Mul(t0, t0, y) // t0 = yz^2
+ Sub(t1, t0, x) // t1 = t0-u
+ Add(t2, t0, x) // t2 = t0+u
+ if IsZero(t1) {
+ return true
+ } else if IsZero(t2) {
+ Mul(z, z, sqrtMinusOne) // z = z*sqrt(-1)
+ return true
+ } else {
+ return false
+ }
+}
+
+// Inv calculates z = 1/x mod p.
+func Inv(z, x *Elt) {
+ x0, x1, x2 := &Elt{}, &Elt{}, &Elt{}
+ Sqr(x1, x)
+ Sqr(x0, x1)
+ Sqr(x0, x0)
+ Mul(x0, x0, x)
+ Mul(z, x0, x1)
+ Sqr(x1, z)
+ Mul(x0, x0, x1)
+ Sqr(x1, x0)
+ for i := 0; i < 4; i++ {
+ Sqr(x1, x1)
+ }
+ Mul(x0, x0, x1)
+ Sqr(x1, x0)
+ for i := 0; i < 9; i++ {
+ Sqr(x1, x1)
+ }
+ Mul(x1, x1, x0)
+ Sqr(x2, x1)
+ for i := 0; i < 19; i++ {
+ Sqr(x2, x2)
+ }
+ Mul(x2, x2, x1)
+ for i := 0; i < 10; i++ {
+ Sqr(x2, x2)
+ }
+ Mul(x2, x2, x0)
+ Sqr(x0, x2)
+ for i := 0; i < 49; i++ {
+ Sqr(x0, x0)
+ }
+ Mul(x0, x0, x2)
+ Sqr(x1, x0)
+ for i := 0; i < 99; i++ {
+ Sqr(x1, x1)
+ }
+ Mul(x1, x1, x0)
+ for i := 0; i < 50; i++ {
+ Sqr(x1, x1)
+ }
+ Mul(x1, x1, x2)
+ for i := 0; i < 5; i++ {
+ Sqr(x1, x1)
+ }
+ Mul(z, z, x1)
+}
+
+// Cmov assigns y to x if n is 1.
+func Cmov(x, y *Elt, n uint) { cmov(x, y, n) }
+
+// Cswap interchanges x and y if n is 1.
+func Cswap(x, y *Elt, n uint) { cswap(x, y, n) }
+
+// Add calculates z = x+y mod p.
+func Add(z, x, y *Elt) { add(z, x, y) }
+
+// Sub calculates z = x-y mod p.
+func Sub(z, x, y *Elt) { sub(z, x, y) }
+
+// AddSub calculates (x,y) = (x+y mod p, x-y mod p).
+func AddSub(x, y *Elt) { addsub(x, y) }
+
+// Mul calculates z = x*y mod p.
+func Mul(z, x, y *Elt) { mul(z, x, y) }
+
+// Sqr calculates z = x^2 mod p.
+func Sqr(z, x *Elt) { sqr(z, x) }
+
+// Modp ensures that z is between [0,p-1].
+func Modp(z *Elt) { modp(z) }
diff --git a/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.go b/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.go
new file mode 100644
index 000000000..057f0d280
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.go
@@ -0,0 +1,45 @@
+//go:build amd64 && !purego
+// +build amd64,!purego
+
+package fp25519
+
+import (
+ "golang.org/x/sys/cpu"
+)
+
+var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
+
+var _ = hasBmi2Adx
+
+func cmov(x, y *Elt, n uint) { cmovAmd64(x, y, n) }
+func cswap(x, y *Elt, n uint) { cswapAmd64(x, y, n) }
+func add(z, x, y *Elt) { addAmd64(z, x, y) }
+func sub(z, x, y *Elt) { subAmd64(z, x, y) }
+func addsub(x, y *Elt) { addsubAmd64(x, y) }
+func mul(z, x, y *Elt) { mulAmd64(z, x, y) }
+func sqr(z, x *Elt) { sqrAmd64(z, x) }
+func modp(z *Elt) { modpAmd64(z) }
+
+//go:noescape
+func cmovAmd64(x, y *Elt, n uint)
+
+//go:noescape
+func cswapAmd64(x, y *Elt, n uint)
+
+//go:noescape
+func addAmd64(z, x, y *Elt)
+
+//go:noescape
+func subAmd64(z, x, y *Elt)
+
+//go:noescape
+func addsubAmd64(x, y *Elt)
+
+//go:noescape
+func mulAmd64(z, x, y *Elt)
+
+//go:noescape
+func sqrAmd64(z, x *Elt)
+
+//go:noescape
+func modpAmd64(z *Elt)
diff --git a/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.h b/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.h
new file mode 100644
index 000000000..b884b584a
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp25519/fp_amd64.h
@@ -0,0 +1,351 @@
+// This code was imported from https://github.com/armfazh/rfc7748_precomputed
+
+// CHECK_BMI2ADX triggers bmi2adx if supported,
+// otherwise it fallbacks to legacy code.
+#define CHECK_BMI2ADX(label, legacy, bmi2adx) \
+ CMPB ·hasBmi2Adx(SB), $0 \
+ JE label \
+ bmi2adx \
+ RET \
+ label: \
+ legacy \
+ RET
+
+// cselect is a conditional move
+// if b=1: it copies y into x;
+// if b=0: x remains with the same value;
+// if b<> 0,1: undefined.
+// Uses: AX, DX, FLAGS
+// Instr: x86_64, cmov
+#define cselect(x,y,b) \
+ TESTQ b, b \
+ MOVQ 0+x, AX; MOVQ 0+y, DX; CMOVQNE DX, AX; MOVQ AX, 0+x; \
+ MOVQ 8+x, AX; MOVQ 8+y, DX; CMOVQNE DX, AX; MOVQ AX, 8+x; \
+ MOVQ 16+x, AX; MOVQ 16+y, DX; CMOVQNE DX, AX; MOVQ AX, 16+x; \
+ MOVQ 24+x, AX; MOVQ 24+y, DX; CMOVQNE DX, AX; MOVQ AX, 24+x;
+
+// cswap is a conditional swap
+// if b=1: x,y <- y,x;
+// if b=0: x,y remain with the same values;
+// if b<> 0,1: undefined.
+// Uses: AX, DX, R8, FLAGS
+// Instr: x86_64, cmov
+#define cswap(x,y,b) \
+ TESTQ b, b \
+ MOVQ 0+x, AX; MOVQ AX, R8; MOVQ 0+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 0+x; MOVQ DX, 0+y; \
+ MOVQ 8+x, AX; MOVQ AX, R8; MOVQ 8+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 8+x; MOVQ DX, 8+y; \
+ MOVQ 16+x, AX; MOVQ AX, R8; MOVQ 16+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 16+x; MOVQ DX, 16+y; \
+ MOVQ 24+x, AX; MOVQ AX, R8; MOVQ 24+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 24+x; MOVQ DX, 24+y;
+
+// additionLeg adds x and y and stores in z
+// Uses: AX, DX, R8-R11, FLAGS
+// Instr: x86_64, cmov
+#define additionLeg(z,x,y) \
+ MOVL $38, AX; \
+ MOVL $0, DX; \
+ MOVQ 0+x, R8; ADDQ 0+y, R8; \
+ MOVQ 8+x, R9; ADCQ 8+y, R9; \
+ MOVQ 16+x, R10; ADCQ 16+y, R10; \
+ MOVQ 24+x, R11; ADCQ 24+y, R11; \
+ CMOVQCS AX, DX; \
+ ADDQ DX, R8; \
+ ADCQ $0, R9; MOVQ R9, 8+z; \
+ ADCQ $0, R10; MOVQ R10, 16+z; \
+ ADCQ $0, R11; MOVQ R11, 24+z; \
+ MOVL $0, DX; \
+ CMOVQCS AX, DX; \
+ ADDQ DX, R8; MOVQ R8, 0+z;
+
+// additionAdx adds x and y and stores in z
+// Uses: AX, DX, R8-R11, FLAGS
+// Instr: x86_64, cmov, adx
+#define additionAdx(z,x,y) \
+ MOVL $38, AX; \
+ XORL DX, DX; \
+ MOVQ 0+x, R8; ADCXQ 0+y, R8; \
+ MOVQ 8+x, R9; ADCXQ 8+y, R9; \
+ MOVQ 16+x, R10; ADCXQ 16+y, R10; \
+ MOVQ 24+x, R11; ADCXQ 24+y, R11; \
+ CMOVQCS AX, DX ; \
+ XORL AX, AX; \
+ ADCXQ DX, R8; \
+ ADCXQ AX, R9; MOVQ R9, 8+z; \
+ ADCXQ AX, R10; MOVQ R10, 16+z; \
+ ADCXQ AX, R11; MOVQ R11, 24+z; \
+ MOVL $38, DX; \
+ CMOVQCS DX, AX; \
+ ADDQ AX, R8; MOVQ R8, 0+z;
+
+// subtraction subtracts y from x and stores in z
+// Uses: AX, DX, R8-R11, FLAGS
+// Instr: x86_64, cmov
+#define subtraction(z,x,y) \
+ MOVL $38, AX; \
+ MOVQ 0+x, R8; SUBQ 0+y, R8; \
+ MOVQ 8+x, R9; SBBQ 8+y, R9; \
+ MOVQ 16+x, R10; SBBQ 16+y, R10; \
+ MOVQ 24+x, R11; SBBQ 24+y, R11; \
+ MOVL $0, DX; \
+ CMOVQCS AX, DX; \
+ SUBQ DX, R8; \
+ SBBQ $0, R9; MOVQ R9, 8+z; \
+ SBBQ $0, R10; MOVQ R10, 16+z; \
+ SBBQ $0, R11; MOVQ R11, 24+z; \
+ MOVL $0, DX; \
+ CMOVQCS AX, DX; \
+ SUBQ DX, R8; MOVQ R8, 0+z;
+
+// integerMulAdx multiplies x and y and stores in z
+// Uses: AX, DX, R8-R15, FLAGS
+// Instr: x86_64, bmi2, adx
+#define integerMulAdx(z,x,y) \
+ MOVL $0,R15; \
+ MOVQ 0+y, DX; XORL AX, AX; \
+ MULXQ 0+x, AX, R8; MOVQ AX, 0+z; \
+ MULXQ 8+x, AX, R9; ADCXQ AX, R8; \
+ MULXQ 16+x, AX, R10; ADCXQ AX, R9; \
+ MULXQ 24+x, AX, R11; ADCXQ AX, R10; \
+ MOVL $0, AX;;;;;;;;; ADCXQ AX, R11; \
+ MOVQ 8+y, DX; XORL AX, AX; \
+ MULXQ 0+x, AX, R12; ADCXQ R8, AX; MOVQ AX, 8+z; \
+ MULXQ 8+x, AX, R13; ADCXQ R9, R12; ADOXQ AX, R12; \
+ MULXQ 16+x, AX, R14; ADCXQ R10, R13; ADOXQ AX, R13; \
+ MULXQ 24+x, AX, R15; ADCXQ R11, R14; ADOXQ AX, R14; \
+ MOVL $0, AX;;;;;;;;; ADCXQ AX, R15; ADOXQ AX, R15; \
+ MOVQ 16+y, DX; XORL AX, AX; \
+ MULXQ 0+x, AX, R8; ADCXQ R12, AX; MOVQ AX, 16+z; \
+ MULXQ 8+x, AX, R9; ADCXQ R13, R8; ADOXQ AX, R8; \
+ MULXQ 16+x, AX, R10; ADCXQ R14, R9; ADOXQ AX, R9; \
+ MULXQ 24+x, AX, R11; ADCXQ R15, R10; ADOXQ AX, R10; \
+ MOVL $0, AX;;;;;;;;; ADCXQ AX, R11; ADOXQ AX, R11; \
+ MOVQ 24+y, DX; XORL AX, AX; \
+ MULXQ 0+x, AX, R12; ADCXQ R8, AX; MOVQ AX, 24+z; \
+ MULXQ 8+x, AX, R13; ADCXQ R9, R12; ADOXQ AX, R12; MOVQ R12, 32+z; \
+ MULXQ 16+x, AX, R14; ADCXQ R10, R13; ADOXQ AX, R13; MOVQ R13, 40+z; \
+ MULXQ 24+x, AX, R15; ADCXQ R11, R14; ADOXQ AX, R14; MOVQ R14, 48+z; \
+ MOVL $0, AX;;;;;;;;; ADCXQ AX, R15; ADOXQ AX, R15; MOVQ R15, 56+z;
+
+// integerMulLeg multiplies x and y and stores in z
+// Uses: AX, DX, R8-R15, FLAGS
+// Instr: x86_64
+#define integerMulLeg(z,x,y) \
+ MOVQ 0+y, R8; \
+ MOVQ 0+x, AX; MULQ R8; MOVQ AX, 0+z; MOVQ DX, R15; \
+ MOVQ 8+x, AX; MULQ R8; MOVQ AX, R13; MOVQ DX, R10; \
+ MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; \
+ MOVQ 24+x, AX; MULQ R8; \
+ ADDQ R13, R15; \
+ ADCQ R14, R10; MOVQ R10, 16+z; \
+ ADCQ AX, R11; MOVQ R11, 24+z; \
+ ADCQ $0, DX; MOVQ DX, 32+z; \
+ MOVQ 8+y, R8; \
+ MOVQ 0+x, AX; MULQ R8; MOVQ AX, R12; MOVQ DX, R9; \
+ MOVQ 8+x, AX; MULQ R8; MOVQ AX, R13; MOVQ DX, R10; \
+ MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; \
+ MOVQ 24+x, AX; MULQ R8; \
+ ADDQ R12, R15; MOVQ R15, 8+z; \
+ ADCQ R13, R9; \
+ ADCQ R14, R10; \
+ ADCQ AX, R11; \
+ ADCQ $0, DX; \
+ ADCQ 16+z, R9; MOVQ R9, R15; \
+ ADCQ 24+z, R10; MOVQ R10, 24+z; \
+ ADCQ 32+z, R11; MOVQ R11, 32+z; \
+ ADCQ $0, DX; MOVQ DX, 40+z; \
+ MOVQ 16+y, R8; \
+ MOVQ 0+x, AX; MULQ R8; MOVQ AX, R12; MOVQ DX, R9; \
+ MOVQ 8+x, AX; MULQ R8; MOVQ AX, R13; MOVQ DX, R10; \
+ MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; \
+ MOVQ 24+x, AX; MULQ R8; \
+ ADDQ R12, R15; MOVQ R15, 16+z; \
+ ADCQ R13, R9; \
+ ADCQ R14, R10; \
+ ADCQ AX, R11; \
+ ADCQ $0, DX; \
+ ADCQ 24+z, R9; MOVQ R9, R15; \
+ ADCQ 32+z, R10; MOVQ R10, 32+z; \
+ ADCQ 40+z, R11; MOVQ R11, 40+z; \
+ ADCQ $0, DX; MOVQ DX, 48+z; \
+ MOVQ 24+y, R8; \
+ MOVQ 0+x, AX; MULQ R8; MOVQ AX, R12; MOVQ DX, R9; \
+ MOVQ 8+x, AX; MULQ R8; MOVQ AX, R13; MOVQ DX, R10; \
+ MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; \
+ MOVQ 24+x, AX; MULQ R8; \
+ ADDQ R12, R15; MOVQ R15, 24+z; \
+ ADCQ R13, R9; \
+ ADCQ R14, R10; \
+ ADCQ AX, R11; \
+ ADCQ $0, DX; \
+ ADCQ 32+z, R9; MOVQ R9, 32+z; \
+ ADCQ 40+z, R10; MOVQ R10, 40+z; \
+ ADCQ 48+z, R11; MOVQ R11, 48+z; \
+ ADCQ $0, DX; MOVQ DX, 56+z;
+
+// integerSqrLeg squares x and stores in z
+// Uses: AX, CX, DX, R8-R15, FLAGS
+// Instr: x86_64
+#define integerSqrLeg(z,x) \
+ MOVQ 0+x, R8; \
+ MOVQ 8+x, AX; MULQ R8; MOVQ AX, R9; MOVQ DX, R10; /* A[0]*A[1] */ \
+ MOVQ 16+x, AX; MULQ R8; MOVQ AX, R14; MOVQ DX, R11; /* A[0]*A[2] */ \
+ MOVQ 24+x, AX; MULQ R8; MOVQ AX, R15; MOVQ DX, R12; /* A[0]*A[3] */ \
+ MOVQ 24+x, R8; \
+ MOVQ 8+x, AX; MULQ R8; MOVQ AX, CX; MOVQ DX, R13; /* A[3]*A[1] */ \
+ MOVQ 16+x, AX; MULQ R8; /* A[3]*A[2] */ \
+ \
+ ADDQ R14, R10;\
+ ADCQ R15, R11; MOVL $0, R15;\
+ ADCQ CX, R12;\
+ ADCQ AX, R13;\
+ ADCQ $0, DX; MOVQ DX, R14;\
+ MOVQ 8+x, AX; MULQ 16+x;\
+ \
+ ADDQ AX, R11;\
+ ADCQ DX, R12;\
+ ADCQ $0, R13;\
+ ADCQ $0, R14;\
+ ADCQ $0, R15;\
+ \
+ SHLQ $1, R14, R15; MOVQ R15, 56+z;\
+ SHLQ $1, R13, R14; MOVQ R14, 48+z;\
+ SHLQ $1, R12, R13; MOVQ R13, 40+z;\
+ SHLQ $1, R11, R12; MOVQ R12, 32+z;\
+ SHLQ $1, R10, R11; MOVQ R11, 24+z;\
+ SHLQ $1, R9, R10; MOVQ R10, 16+z;\
+ SHLQ $1, R9; MOVQ R9, 8+z;\
+ \
+ MOVQ 0+x,AX; MULQ AX; MOVQ AX, 0+z; MOVQ DX, R9;\
+ MOVQ 8+x,AX; MULQ AX; MOVQ AX, R10; MOVQ DX, R11;\
+ MOVQ 16+x,AX; MULQ AX; MOVQ AX, R12; MOVQ DX, R13;\
+ MOVQ 24+x,AX; MULQ AX; MOVQ AX, R14; MOVQ DX, R15;\
+ \
+ ADDQ 8+z, R9; MOVQ R9, 8+z;\
+ ADCQ 16+z, R10; MOVQ R10, 16+z;\
+ ADCQ 24+z, R11; MOVQ R11, 24+z;\
+ ADCQ 32+z, R12; MOVQ R12, 32+z;\
+ ADCQ 40+z, R13; MOVQ R13, 40+z;\
+ ADCQ 48+z, R14; MOVQ R14, 48+z;\
+ ADCQ 56+z, R15; MOVQ R15, 56+z;
+
+// integerSqrAdx squares x and stores in z
+// Uses: AX, CX, DX, R8-R15, FLAGS
+// Instr: x86_64, bmi2, adx
+#define integerSqrAdx(z,x) \
+ MOVQ 0+x, DX; /* A[0] */ \
+ MULXQ 8+x, R8, R14; /* A[1]*A[0] */ XORL R15, R15; \
+ MULXQ 16+x, R9, R10; /* A[2]*A[0] */ ADCXQ R14, R9; \
+ MULXQ 24+x, AX, CX; /* A[3]*A[0] */ ADCXQ AX, R10; \
+ MOVQ 24+x, DX; /* A[3] */ \
+ MULXQ 8+x, R11, R12; /* A[1]*A[3] */ ADCXQ CX, R11; \
+ MULXQ 16+x, AX, R13; /* A[2]*A[3] */ ADCXQ AX, R12; \
+ MOVQ 8+x, DX; /* A[1] */ ADCXQ R15, R13; \
+ MULXQ 16+x, AX, CX; /* A[2]*A[1] */ MOVL $0, R14; \
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADCXQ R15, R14; \
+ XORL R15, R15; \
+ ADOXQ AX, R10; ADCXQ R8, R8; \
+ ADOXQ CX, R11; ADCXQ R9, R9; \
+ ADOXQ R15, R12; ADCXQ R10, R10; \
+ ADOXQ R15, R13; ADCXQ R11, R11; \
+ ADOXQ R15, R14; ADCXQ R12, R12; \
+ ;;;;;;;;;;;;;;; ADCXQ R13, R13; \
+ ;;;;;;;;;;;;;;; ADCXQ R14, R14; \
+ MOVQ 0+x, DX; MULXQ DX, AX, CX; /* A[0]^2 */ \
+ ;;;;;;;;;;;;;;; MOVQ AX, 0+z; \
+ ADDQ CX, R8; MOVQ R8, 8+z; \
+ MOVQ 8+x, DX; MULXQ DX, AX, CX; /* A[1]^2 */ \
+ ADCQ AX, R9; MOVQ R9, 16+z; \
+ ADCQ CX, R10; MOVQ R10, 24+z; \
+ MOVQ 16+x, DX; MULXQ DX, AX, CX; /* A[2]^2 */ \
+ ADCQ AX, R11; MOVQ R11, 32+z; \
+ ADCQ CX, R12; MOVQ R12, 40+z; \
+ MOVQ 24+x, DX; MULXQ DX, AX, CX; /* A[3]^2 */ \
+ ADCQ AX, R13; MOVQ R13, 48+z; \
+ ADCQ CX, R14; MOVQ R14, 56+z;
+
+// reduceFromDouble finds z congruent to x modulo p such that 0> 63)
+ // PUT BIT 255 IN CARRY FLAG AND CLEAR
+ x3 &^= 1 << 63
+
+ x0, c0 := bits.Add64(x0, cx, 0)
+ x1, c1 := bits.Add64(x1, 0, c0)
+ x2, c2 := bits.Add64(x2, 0, c1)
+ x3, _ = bits.Add64(x3, 0, c2)
+
+ // TEST FOR BIT 255 AGAIN; ONLY TRIGGERED ON OVERFLOW MODULO 2^255-19
+ // cx = C[255] ? 0 : 19
+ cx = uint64(19) &^ (-(x3 >> 63))
+ // CLEAR BIT 255
+ x3 &^= 1 << 63
+
+ x0, c0 = bits.Sub64(x0, cx, 0)
+ x1, c1 = bits.Sub64(x1, 0, c0)
+ x2, c2 = bits.Sub64(x2, 0, c1)
+ x3, _ = bits.Sub64(x3, 0, c2)
+
+ binary.LittleEndian.PutUint64(x[0*8:1*8], x0)
+ binary.LittleEndian.PutUint64(x[1*8:2*8], x1)
+ binary.LittleEndian.PutUint64(x[2*8:3*8], x2)
+ binary.LittleEndian.PutUint64(x[3*8:4*8], x3)
+}
+
+func red64(z *Elt, x0, x1, x2, x3, x4, x5, x6, x7 uint64) {
+ h0, l0 := bits.Mul64(x4, 38)
+ h1, l1 := bits.Mul64(x5, 38)
+ h2, l2 := bits.Mul64(x6, 38)
+ h3, l3 := bits.Mul64(x7, 38)
+
+ l1, c0 := bits.Add64(h0, l1, 0)
+ l2, c1 := bits.Add64(h1, l2, c0)
+ l3, c2 := bits.Add64(h2, l3, c1)
+ l4, _ := bits.Add64(h3, 0, c2)
+
+ l0, c0 = bits.Add64(l0, x0, 0)
+ l1, c1 = bits.Add64(l1, x1, c0)
+ l2, c2 = bits.Add64(l2, x2, c1)
+ l3, c3 := bits.Add64(l3, x3, c2)
+ l4, _ = bits.Add64(l4, 0, c3)
+
+ _, l4 = bits.Mul64(l4, 38)
+ l0, c0 = bits.Add64(l0, l4, 0)
+ z1, c1 := bits.Add64(l1, 0, c0)
+ z2, c2 := bits.Add64(l2, 0, c1)
+ z3, c3 := bits.Add64(l3, 0, c2)
+ z0, _ := bits.Add64(l0, (-c3)&38, 0)
+
+ binary.LittleEndian.PutUint64(z[0*8:1*8], z0)
+ binary.LittleEndian.PutUint64(z[1*8:2*8], z1)
+ binary.LittleEndian.PutUint64(z[2*8:3*8], z2)
+ binary.LittleEndian.PutUint64(z[3*8:4*8], z3)
+}
diff --git a/vendor/github.com/cloudflare/circl/math/fp25519/fp_noasm.go b/vendor/github.com/cloudflare/circl/math/fp25519/fp_noasm.go
new file mode 100644
index 000000000..26ca4d01b
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp25519/fp_noasm.go
@@ -0,0 +1,13 @@
+//go:build !amd64 || purego
+// +build !amd64 purego
+
+package fp25519
+
+func cmov(x, y *Elt, n uint) { cmovGeneric(x, y, n) }
+func cswap(x, y *Elt, n uint) { cswapGeneric(x, y, n) }
+func add(z, x, y *Elt) { addGeneric(z, x, y) }
+func sub(z, x, y *Elt) { subGeneric(z, x, y) }
+func addsub(x, y *Elt) { addsubGeneric(x, y) }
+func mul(z, x, y *Elt) { mulGeneric(z, x, y) }
+func sqr(z, x *Elt) { sqrGeneric(z, x) }
+func modp(z *Elt) { modpGeneric(z) }
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp.go b/vendor/github.com/cloudflare/circl/math/fp448/fp.go
new file mode 100644
index 000000000..a5e36600b
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp448/fp.go
@@ -0,0 +1,164 @@
+// Package fp448 provides prime field arithmetic over GF(2^448-2^224-1).
+package fp448
+
+import (
+ "errors"
+
+ "github.com/cloudflare/circl/internal/conv"
+)
+
+// Size in bytes of an element.
+const Size = 56
+
+// Elt is a prime field element.
+type Elt [Size]byte
+
+func (e Elt) String() string { return conv.BytesLe2Hex(e[:]) }
+
+// p is the prime modulus 2^448-2^224-1.
+var p = Elt{
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+}
+
+// P returns the prime modulus 2^448-2^224-1.
+func P() Elt { return p }
+
+// ToBytes stores in b the little-endian byte representation of x.
+func ToBytes(b []byte, x *Elt) error {
+ if len(b) != Size {
+ return errors.New("wrong size")
+ }
+ Modp(x)
+ copy(b, x[:])
+ return nil
+}
+
+// IsZero returns true if x is equal to 0.
+func IsZero(x *Elt) bool { Modp(x); return *x == Elt{} }
+
+// IsOne returns true if x is equal to 1.
+func IsOne(x *Elt) bool { Modp(x); return *x == Elt{1} }
+
+// SetOne assigns x=1.
+func SetOne(x *Elt) { *x = Elt{1} }
+
+// One returns the 1 element.
+func One() (x Elt) { x = Elt{1}; return }
+
+// Neg calculates z = -x.
+func Neg(z, x *Elt) { Sub(z, &p, x) }
+
+// Modp ensures that z is between [0,p-1].
+func Modp(z *Elt) { Sub(z, z, &p) }
+
+// InvSqrt calculates z = sqrt(x/y) iff x/y is a quadratic-residue. If so,
+// isQR = true; otherwise, isQR = false, since x/y is a quadratic non-residue,
+// and z = sqrt(-x/y).
+func InvSqrt(z, x, y *Elt) (isQR bool) {
+ // First note that x^(2(k+1)) = x^(p-1)/2 * x = legendre(x) * x
+ // so that's x if x is a quadratic residue and -x otherwise.
+ // Next, y^(6k+3) = y^(4k+2) * y^(2k+1) = y^(p-1) * y^((p-1)/2) = legendre(y).
+ // So the z we compute satisfies z^2 y = x^(2(k+1)) y^(6k+3) = legendre(x)*legendre(y).
+ // Thus if x and y are quadratic residues, then z is indeed sqrt(x/y).
+ t0, t1 := &Elt{}, &Elt{}
+ Mul(t0, x, y) // x*y
+ Sqr(t1, y) // y^2
+ Mul(t1, t0, t1) // x*y^3
+ powPminus3div4(z, t1) // (x*y^3)^k
+ Mul(z, z, t0) // z = x*y*(x*y^3)^k = x^(k+1) * y^(3k+1)
+
+ // Check if x/y is a quadratic residue
+ Sqr(t0, z) // z^2
+ Mul(t0, t0, y) // y*z^2
+ Sub(t0, t0, x) // y*z^2-x
+ return IsZero(t0)
+}
+
+// Inv calculates z = 1/x mod p.
+func Inv(z, x *Elt) {
+ // Calculates z = x^(4k+1) = x^(p-3+1) = x^(p-2) = x^-1, where k = (p-3)/4.
+ t := &Elt{}
+ powPminus3div4(t, x) // t = x^k
+ Sqr(t, t) // t = x^2k
+ Sqr(t, t) // t = x^4k
+ Mul(z, t, x) // z = x^(4k+1)
+}
+
+// powPminus3div4 calculates z = x^k mod p, where k = (p-3)/4.
+func powPminus3div4(z, x *Elt) {
+ x0, x1 := &Elt{}, &Elt{}
+ Sqr(z, x)
+ Mul(z, z, x)
+ Sqr(x0, z)
+ Mul(x0, x0, x)
+ Sqr(z, x0)
+ Sqr(z, z)
+ Sqr(z, z)
+ Mul(z, z, x0)
+ Sqr(x1, z)
+ for i := 0; i < 5; i++ {
+ Sqr(x1, x1)
+ }
+ Mul(x1, x1, z)
+ Sqr(z, x1)
+ for i := 0; i < 11; i++ {
+ Sqr(z, z)
+ }
+ Mul(z, z, x1)
+ Sqr(z, z)
+ Sqr(z, z)
+ Sqr(z, z)
+ Mul(z, z, x0)
+ Sqr(x1, z)
+ for i := 0; i < 26; i++ {
+ Sqr(x1, x1)
+ }
+ Mul(x1, x1, z)
+ Sqr(z, x1)
+ for i := 0; i < 53; i++ {
+ Sqr(z, z)
+ }
+ Mul(z, z, x1)
+ Sqr(z, z)
+ Sqr(z, z)
+ Sqr(z, z)
+ Mul(z, z, x0)
+ Sqr(x1, z)
+ for i := 0; i < 110; i++ {
+ Sqr(x1, x1)
+ }
+ Mul(x1, x1, z)
+ Sqr(z, x1)
+ Mul(z, z, x)
+ for i := 0; i < 223; i++ {
+ Sqr(z, z)
+ }
+ Mul(z, z, x1)
+}
+
+// Cmov assigns y to x if n is 1.
+func Cmov(x, y *Elt, n uint) { cmov(x, y, n) }
+
+// Cswap interchanges x and y if n is 1.
+func Cswap(x, y *Elt, n uint) { cswap(x, y, n) }
+
+// Add calculates z = x+y mod p.
+func Add(z, x, y *Elt) { add(z, x, y) }
+
+// Sub calculates z = x-y mod p.
+func Sub(z, x, y *Elt) { sub(z, x, y) }
+
+// AddSub calculates (x,y) = (x+y mod p, x-y mod p).
+func AddSub(x, y *Elt) { addsub(x, y) }
+
+// Mul calculates z = x*y mod p.
+func Mul(z, x, y *Elt) { mul(z, x, y) }
+
+// Sqr calculates z = x^2 mod p.
+func Sqr(z, x *Elt) { sqr(z, x) }
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.go b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.go
new file mode 100644
index 000000000..6a12209a7
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.go
@@ -0,0 +1,43 @@
+//go:build amd64 && !purego
+// +build amd64,!purego
+
+package fp448
+
+import (
+ "golang.org/x/sys/cpu"
+)
+
+var hasBmi2Adx = cpu.X86.HasBMI2 && cpu.X86.HasADX
+
+var _ = hasBmi2Adx
+
+func cmov(x, y *Elt, n uint) { cmovAmd64(x, y, n) }
+func cswap(x, y *Elt, n uint) { cswapAmd64(x, y, n) }
+func add(z, x, y *Elt) { addAmd64(z, x, y) }
+func sub(z, x, y *Elt) { subAmd64(z, x, y) }
+func addsub(x, y *Elt) { addsubAmd64(x, y) }
+func mul(z, x, y *Elt) { mulAmd64(z, x, y) }
+func sqr(z, x *Elt) { sqrAmd64(z, x) }
+
+/* Functions defined in fp_amd64.s */
+
+//go:noescape
+func cmovAmd64(x, y *Elt, n uint)
+
+//go:noescape
+func cswapAmd64(x, y *Elt, n uint)
+
+//go:noescape
+func addAmd64(z, x, y *Elt)
+
+//go:noescape
+func subAmd64(z, x, y *Elt)
+
+//go:noescape
+func addsubAmd64(x, y *Elt)
+
+//go:noescape
+func mulAmd64(z, x, y *Elt)
+
+//go:noescape
+func sqrAmd64(z, x *Elt)
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.h b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.h
new file mode 100644
index 000000000..536fe5bdf
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.h
@@ -0,0 +1,591 @@
+// This code was imported from https://github.com/armfazh/rfc7748_precomputed
+
+// CHECK_BMI2ADX triggers bmi2adx if supported,
+// otherwise it fallbacks to legacy code.
+#define CHECK_BMI2ADX(label, legacy, bmi2adx) \
+ CMPB ·hasBmi2Adx(SB), $0 \
+ JE label \
+ bmi2adx \
+ RET \
+ label: \
+ legacy \
+ RET
+
+// cselect is a conditional move
+// if b=1: it copies y into x;
+// if b=0: x remains with the same value;
+// if b<> 0,1: undefined.
+// Uses: AX, DX, FLAGS
+// Instr: x86_64, cmov
+#define cselect(x,y,b) \
+ TESTQ b, b \
+ MOVQ 0+x, AX; MOVQ 0+y, DX; CMOVQNE DX, AX; MOVQ AX, 0+x; \
+ MOVQ 8+x, AX; MOVQ 8+y, DX; CMOVQNE DX, AX; MOVQ AX, 8+x; \
+ MOVQ 16+x, AX; MOVQ 16+y, DX; CMOVQNE DX, AX; MOVQ AX, 16+x; \
+ MOVQ 24+x, AX; MOVQ 24+y, DX; CMOVQNE DX, AX; MOVQ AX, 24+x; \
+ MOVQ 32+x, AX; MOVQ 32+y, DX; CMOVQNE DX, AX; MOVQ AX, 32+x; \
+ MOVQ 40+x, AX; MOVQ 40+y, DX; CMOVQNE DX, AX; MOVQ AX, 40+x; \
+ MOVQ 48+x, AX; MOVQ 48+y, DX; CMOVQNE DX, AX; MOVQ AX, 48+x;
+
+// cswap is a conditional swap
+// if b=1: x,y <- y,x;
+// if b=0: x,y remain with the same values;
+// if b<> 0,1: undefined.
+// Uses: AX, DX, R8, FLAGS
+// Instr: x86_64, cmov
+#define cswap(x,y,b) \
+ TESTQ b, b \
+ MOVQ 0+x, AX; MOVQ AX, R8; MOVQ 0+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 0+x; MOVQ DX, 0+y; \
+ MOVQ 8+x, AX; MOVQ AX, R8; MOVQ 8+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 8+x; MOVQ DX, 8+y; \
+ MOVQ 16+x, AX; MOVQ AX, R8; MOVQ 16+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 16+x; MOVQ DX, 16+y; \
+ MOVQ 24+x, AX; MOVQ AX, R8; MOVQ 24+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 24+x; MOVQ DX, 24+y; \
+ MOVQ 32+x, AX; MOVQ AX, R8; MOVQ 32+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 32+x; MOVQ DX, 32+y; \
+ MOVQ 40+x, AX; MOVQ AX, R8; MOVQ 40+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 40+x; MOVQ DX, 40+y; \
+ MOVQ 48+x, AX; MOVQ AX, R8; MOVQ 48+y, DX; CMOVQNE DX, AX; CMOVQNE R8, DX; MOVQ AX, 48+x; MOVQ DX, 48+y;
+
+// additionLeg adds x and y and stores in z
+// Uses: AX, DX, R8-R14, FLAGS
+// Instr: x86_64
+#define additionLeg(z,x,y) \
+ MOVQ 0+x, R8; ADDQ 0+y, R8; \
+ MOVQ 8+x, R9; ADCQ 8+y, R9; \
+ MOVQ 16+x, R10; ADCQ 16+y, R10; \
+ MOVQ 24+x, R11; ADCQ 24+y, R11; \
+ MOVQ 32+x, R12; ADCQ 32+y, R12; \
+ MOVQ 40+x, R13; ADCQ 40+y, R13; \
+ MOVQ 48+x, R14; ADCQ 48+y, R14; \
+ MOVQ $0, AX; ADCQ $0, AX; \
+ MOVQ AX, DX; \
+ SHLQ $32, DX; \
+ ADDQ AX, R8; MOVQ $0, AX; \
+ ADCQ $0, R9; \
+ ADCQ $0, R10; \
+ ADCQ DX, R11; \
+ ADCQ $0, R12; \
+ ADCQ $0, R13; \
+ ADCQ $0, R14; \
+ ADCQ $0, AX; \
+ MOVQ AX, DX; \
+ SHLQ $32, DX; \
+ ADDQ AX, R8; MOVQ R8, 0+z; \
+ ADCQ $0, R9; MOVQ R9, 8+z; \
+ ADCQ $0, R10; MOVQ R10, 16+z; \
+ ADCQ DX, R11; MOVQ R11, 24+z; \
+ ADCQ $0, R12; MOVQ R12, 32+z; \
+ ADCQ $0, R13; MOVQ R13, 40+z; \
+ ADCQ $0, R14; MOVQ R14, 48+z;
+
+
+// additionAdx adds x and y and stores in z
+// Uses: AX, DX, R8-R15, FLAGS
+// Instr: x86_64, adx
+#define additionAdx(z,x,y) \
+ MOVL $32, R15; \
+ XORL DX, DX; \
+ MOVQ 0+x, R8; ADCXQ 0+y, R8; \
+ MOVQ 8+x, R9; ADCXQ 8+y, R9; \
+ MOVQ 16+x, R10; ADCXQ 16+y, R10; \
+ MOVQ 24+x, R11; ADCXQ 24+y, R11; \
+ MOVQ 32+x, R12; ADCXQ 32+y, R12; \
+ MOVQ 40+x, R13; ADCXQ 40+y, R13; \
+ MOVQ 48+x, R14; ADCXQ 48+y, R14; \
+ ;;;;;;;;;;;;;;; ADCXQ DX, DX; \
+ XORL AX, AX; \
+ ADCXQ DX, R8; SHLXQ R15, DX, DX; \
+ ADCXQ AX, R9; \
+ ADCXQ AX, R10; \
+ ADCXQ DX, R11; \
+ ADCXQ AX, R12; \
+ ADCXQ AX, R13; \
+ ADCXQ AX, R14; \
+ ADCXQ AX, AX; \
+ XORL DX, DX; \
+ ADCXQ AX, R8; MOVQ R8, 0+z; SHLXQ R15, AX, AX; \
+ ADCXQ DX, R9; MOVQ R9, 8+z; \
+ ADCXQ DX, R10; MOVQ R10, 16+z; \
+ ADCXQ AX, R11; MOVQ R11, 24+z; \
+ ADCXQ DX, R12; MOVQ R12, 32+z; \
+ ADCXQ DX, R13; MOVQ R13, 40+z; \
+ ADCXQ DX, R14; MOVQ R14, 48+z;
+
+// subtraction subtracts y from x and stores in z
+// Uses: AX, DX, R8-R14, FLAGS
+// Instr: x86_64
+#define subtraction(z,x,y) \
+ MOVQ 0+x, R8; SUBQ 0+y, R8; \
+ MOVQ 8+x, R9; SBBQ 8+y, R9; \
+ MOVQ 16+x, R10; SBBQ 16+y, R10; \
+ MOVQ 24+x, R11; SBBQ 24+y, R11; \
+ MOVQ 32+x, R12; SBBQ 32+y, R12; \
+ MOVQ 40+x, R13; SBBQ 40+y, R13; \
+ MOVQ 48+x, R14; SBBQ 48+y, R14; \
+ MOVQ $0, AX; SETCS AX; \
+ MOVQ AX, DX; \
+ SHLQ $32, DX; \
+ SUBQ AX, R8; MOVQ $0, AX; \
+ SBBQ $0, R9; \
+ SBBQ $0, R10; \
+ SBBQ DX, R11; \
+ SBBQ $0, R12; \
+ SBBQ $0, R13; \
+ SBBQ $0, R14; \
+ SETCS AX; \
+ MOVQ AX, DX; \
+ SHLQ $32, DX; \
+ SUBQ AX, R8; MOVQ R8, 0+z; \
+ SBBQ $0, R9; MOVQ R9, 8+z; \
+ SBBQ $0, R10; MOVQ R10, 16+z; \
+ SBBQ DX, R11; MOVQ R11, 24+z; \
+ SBBQ $0, R12; MOVQ R12, 32+z; \
+ SBBQ $0, R13; MOVQ R13, 40+z; \
+ SBBQ $0, R14; MOVQ R14, 48+z;
+
+// maddBmi2Adx multiplies x and y and accumulates in z
+// Uses: AX, DX, R15, FLAGS
+// Instr: x86_64, bmi2, adx
+#define maddBmi2Adx(z,x,y,i,r0,r1,r2,r3,r4,r5,r6) \
+ MOVQ i+y, DX; XORL AX, AX; \
+ MULXQ 0+x, AX, R8; ADOXQ AX, r0; ADCXQ R8, r1; MOVQ r0,i+z; \
+ MULXQ 8+x, AX, r0; ADOXQ AX, r1; ADCXQ r0, r2; MOVQ $0, R8; \
+ MULXQ 16+x, AX, r0; ADOXQ AX, r2; ADCXQ r0, r3; \
+ MULXQ 24+x, AX, r0; ADOXQ AX, r3; ADCXQ r0, r4; \
+ MULXQ 32+x, AX, r0; ADOXQ AX, r4; ADCXQ r0, r5; \
+ MULXQ 40+x, AX, r0; ADOXQ AX, r5; ADCXQ r0, r6; \
+ MULXQ 48+x, AX, r0; ADOXQ AX, r6; ADCXQ R8, r0; \
+ ;;;;;;;;;;;;;;;;;;; ADOXQ R8, r0;
+
+// integerMulAdx multiplies x and y and stores in z
+// Uses: AX, DX, R8-R15, FLAGS
+// Instr: x86_64, bmi2, adx
+#define integerMulAdx(z,x,y) \
+ MOVL $0,R15; \
+ MOVQ 0+y, DX; XORL AX, AX; MOVQ $0, R8; \
+ MULXQ 0+x, AX, R9; MOVQ AX, 0+z; \
+ MULXQ 8+x, AX, R10; ADCXQ AX, R9; \
+ MULXQ 16+x, AX, R11; ADCXQ AX, R10; \
+ MULXQ 24+x, AX, R12; ADCXQ AX, R11; \
+ MULXQ 32+x, AX, R13; ADCXQ AX, R12; \
+ MULXQ 40+x, AX, R14; ADCXQ AX, R13; \
+ MULXQ 48+x, AX, R15; ADCXQ AX, R14; \
+ ;;;;;;;;;;;;;;;;;;;; ADCXQ R8, R15; \
+ maddBmi2Adx(z,x,y, 8, R9,R10,R11,R12,R13,R14,R15) \
+ maddBmi2Adx(z,x,y,16,R10,R11,R12,R13,R14,R15, R9) \
+ maddBmi2Adx(z,x,y,24,R11,R12,R13,R14,R15, R9,R10) \
+ maddBmi2Adx(z,x,y,32,R12,R13,R14,R15, R9,R10,R11) \
+ maddBmi2Adx(z,x,y,40,R13,R14,R15, R9,R10,R11,R12) \
+ maddBmi2Adx(z,x,y,48,R14,R15, R9,R10,R11,R12,R13) \
+ MOVQ R15, 56+z; \
+ MOVQ R9, 64+z; \
+ MOVQ R10, 72+z; \
+ MOVQ R11, 80+z; \
+ MOVQ R12, 88+z; \
+ MOVQ R13, 96+z; \
+ MOVQ R14, 104+z;
+
+// maddLegacy multiplies x and y and accumulates in z
+// Uses: AX, DX, R15, FLAGS
+// Instr: x86_64
+#define maddLegacy(z,x,y,i) \
+ MOVQ i+y, R15; \
+ MOVQ 0+x, AX; MULQ R15; MOVQ AX, R8; ;;;;;;;;;;;; MOVQ DX, R9; \
+ MOVQ 8+x, AX; MULQ R15; ADDQ AX, R9; ADCQ $0, DX; MOVQ DX, R10; \
+ MOVQ 16+x, AX; MULQ R15; ADDQ AX, R10; ADCQ $0, DX; MOVQ DX, R11; \
+ MOVQ 24+x, AX; MULQ R15; ADDQ AX, R11; ADCQ $0, DX; MOVQ DX, R12; \
+ MOVQ 32+x, AX; MULQ R15; ADDQ AX, R12; ADCQ $0, DX; MOVQ DX, R13; \
+ MOVQ 40+x, AX; MULQ R15; ADDQ AX, R13; ADCQ $0, DX; MOVQ DX, R14; \
+ MOVQ 48+x, AX; MULQ R15; ADDQ AX, R14; ADCQ $0, DX; \
+ ADDQ 0+i+z, R8; MOVQ R8, 0+i+z; \
+ ADCQ 8+i+z, R9; MOVQ R9, 8+i+z; \
+ ADCQ 16+i+z, R10; MOVQ R10, 16+i+z; \
+ ADCQ 24+i+z, R11; MOVQ R11, 24+i+z; \
+ ADCQ 32+i+z, R12; MOVQ R12, 32+i+z; \
+ ADCQ 40+i+z, R13; MOVQ R13, 40+i+z; \
+ ADCQ 48+i+z, R14; MOVQ R14, 48+i+z; \
+ ADCQ $0, DX; MOVQ DX, 56+i+z;
+
+// integerMulLeg multiplies x and y and stores in z
+// Uses: AX, DX, R8-R15, FLAGS
+// Instr: x86_64
+#define integerMulLeg(z,x,y) \
+ MOVQ 0+y, R15; \
+ MOVQ 0+x, AX; MULQ R15; MOVQ AX, 0+z; ;;;;;;;;;;;; MOVQ DX, R8; \
+ MOVQ 8+x, AX; MULQ R15; ADDQ AX, R8; ADCQ $0, DX; MOVQ DX, R9; MOVQ R8, 8+z; \
+ MOVQ 16+x, AX; MULQ R15; ADDQ AX, R9; ADCQ $0, DX; MOVQ DX, R10; MOVQ R9, 16+z; \
+ MOVQ 24+x, AX; MULQ R15; ADDQ AX, R10; ADCQ $0, DX; MOVQ DX, R11; MOVQ R10, 24+z; \
+ MOVQ 32+x, AX; MULQ R15; ADDQ AX, R11; ADCQ $0, DX; MOVQ DX, R12; MOVQ R11, 32+z; \
+ MOVQ 40+x, AX; MULQ R15; ADDQ AX, R12; ADCQ $0, DX; MOVQ DX, R13; MOVQ R12, 40+z; \
+ MOVQ 48+x, AX; MULQ R15; ADDQ AX, R13; ADCQ $0, DX; MOVQ DX,56+z; MOVQ R13, 48+z; \
+ maddLegacy(z,x,y, 8) \
+ maddLegacy(z,x,y,16) \
+ maddLegacy(z,x,y,24) \
+ maddLegacy(z,x,y,32) \
+ maddLegacy(z,x,y,40) \
+ maddLegacy(z,x,y,48)
+
+// integerSqrLeg squares x and stores in z
+// Uses: AX, CX, DX, R8-R15, FLAGS
+// Instr: x86_64
+#define integerSqrLeg(z,x) \
+ XORL R15, R15; \
+ MOVQ 0+x, CX; \
+ MOVQ CX, AX; MULQ CX; MOVQ AX, 0+z; MOVQ DX, R8; \
+ ADDQ CX, CX; ADCQ $0, R15; \
+ MOVQ 8+x, AX; MULQ CX; ADDQ AX, R8; ADCQ $0, DX; MOVQ DX, R9; MOVQ R8, 8+z; \
+ MOVQ 16+x, AX; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; MOVQ DX, R10; \
+ MOVQ 24+x, AX; MULQ CX; ADDQ AX, R10; ADCQ $0, DX; MOVQ DX, R11; \
+ MOVQ 32+x, AX; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; MOVQ DX, R12; \
+ MOVQ 40+x, AX; MULQ CX; ADDQ AX, R12; ADCQ $0, DX; MOVQ DX, R13; \
+ MOVQ 48+x, AX; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; MOVQ DX, R14; \
+ \
+ MOVQ 8+x, CX; \
+ MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
+ ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; MOVQ R9,16+z; \
+ MOVQ R15, AX; NEGQ AX; ANDQ 8+x, AX; ADDQ AX, DX; ADCQ $0, R11; MOVQ DX, R8; \
+ ADDQ 8+x, CX; ADCQ $0, R15; \
+ MOVQ 16+x, AX; MULQ CX; ADDQ AX, R10; ADCQ $0, DX; ADDQ R8, R10; ADCQ $0, DX; MOVQ DX, R8; MOVQ R10, 24+z; \
+ MOVQ 24+x, AX; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; ADDQ R8, R11; ADCQ $0, DX; MOVQ DX, R8; \
+ MOVQ 32+x, AX; MULQ CX; ADDQ AX, R12; ADCQ $0, DX; ADDQ R8, R12; ADCQ $0, DX; MOVQ DX, R8; \
+ MOVQ 40+x, AX; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; ADDQ R8, R13; ADCQ $0, DX; MOVQ DX, R8; \
+ MOVQ 48+x, AX; MULQ CX; ADDQ AX, R14; ADCQ $0, DX; ADDQ R8, R14; ADCQ $0, DX; MOVQ DX, R9; \
+ \
+ MOVQ 16+x, CX; \
+ MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
+ ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; MOVQ R11, 32+z; \
+ MOVQ R15, AX; NEGQ AX; ANDQ 16+x,AX; ADDQ AX, DX; ADCQ $0, R13; MOVQ DX, R8; \
+ ADDQ 16+x, CX; ADCQ $0, R15; \
+ MOVQ 24+x, AX; MULQ CX; ADDQ AX, R12; ADCQ $0, DX; ADDQ R8, R12; ADCQ $0, DX; MOVQ DX, R8; MOVQ R12, 40+z; \
+ MOVQ 32+x, AX; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; ADDQ R8, R13; ADCQ $0, DX; MOVQ DX, R8; \
+ MOVQ 40+x, AX; MULQ CX; ADDQ AX, R14; ADCQ $0, DX; ADDQ R8, R14; ADCQ $0, DX; MOVQ DX, R8; \
+ MOVQ 48+x, AX; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; ADDQ R8, R9; ADCQ $0, DX; MOVQ DX,R10; \
+ \
+ MOVQ 24+x, CX; \
+ MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
+ ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; MOVQ R13, 48+z; \
+ MOVQ R15, AX; NEGQ AX; ANDQ 24+x,AX; ADDQ AX, DX; ADCQ $0, R9; MOVQ DX, R8; \
+ ADDQ 24+x, CX; ADCQ $0, R15; \
+ MOVQ 32+x, AX; MULQ CX; ADDQ AX, R14; ADCQ $0, DX; ADDQ R8, R14; ADCQ $0, DX; MOVQ DX, R8; MOVQ R14, 56+z; \
+ MOVQ 40+x, AX; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; ADDQ R8, R9; ADCQ $0, DX; MOVQ DX, R8; \
+ MOVQ 48+x, AX; MULQ CX; ADDQ AX, R10; ADCQ $0, DX; ADDQ R8, R10; ADCQ $0, DX; MOVQ DX,R11; \
+ \
+ MOVQ 32+x, CX; \
+ MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
+ ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R9; ADCQ $0, DX; MOVQ R9, 64+z; \
+ MOVQ R15, AX; NEGQ AX; ANDQ 32+x,AX; ADDQ AX, DX; ADCQ $0, R11; MOVQ DX, R8; \
+ ADDQ 32+x, CX; ADCQ $0, R15; \
+ MOVQ 40+x, AX; MULQ CX; ADDQ AX, R10; ADCQ $0, DX; ADDQ R8, R10; ADCQ $0, DX; MOVQ DX, R8; MOVQ R10, 72+z; \
+ MOVQ 48+x, AX; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; ADDQ R8, R11; ADCQ $0, DX; MOVQ DX,R12; \
+ \
+ XORL R13, R13; \
+ XORL R14, R14; \
+ MOVQ 40+x, CX; \
+ MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
+ ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R11; ADCQ $0, DX; MOVQ R11, 80+z; \
+ MOVQ R15, AX; NEGQ AX; ANDQ 40+x,AX; ADDQ AX, DX; ADCQ $0, R13; MOVQ DX, R8; \
+ ADDQ 40+x, CX; ADCQ $0, R15; \
+ MOVQ 48+x, AX; MULQ CX; ADDQ AX, R12; ADCQ $0, DX; ADDQ R8, R12; ADCQ $0, DX; MOVQ DX, R8; MOVQ R12, 88+z; \
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADDQ R8, R13; ADCQ $0,R14; \
+ \
+ XORL R9, R9; \
+ MOVQ 48+x, CX; \
+ MOVQ CX, AX; ADDQ R15, CX; MOVQ $0, R15; ADCQ $0, R15; \
+ ;;;;;;;;;;;;;; MULQ CX; ADDQ AX, R13; ADCQ $0, DX; MOVQ R13, 96+z; \
+ MOVQ R15, AX; NEGQ AX; ANDQ 48+x,AX; ADDQ AX, DX; ADCQ $0, R9; MOVQ DX, R8; \
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ADDQ R8,R14; ADCQ $0, R9; MOVQ R14, 104+z;
+
+
+// integerSqrAdx squares x and stores in z
+// Uses: AX, CX, DX, R8-R15, FLAGS
+// Instr: x86_64, bmi2, adx
+#define integerSqrAdx(z,x) \
+ XORL R15, R15; \
+ MOVQ 0+x, DX; \
+ ;;;;;;;;;;;;;; MULXQ DX, AX, R8; MOVQ AX, 0+z; \
+ ADDQ DX, DX; ADCQ $0, R15; CLC; \
+ MULXQ 8+x, AX, R9; ADCXQ AX, R8; MOVQ R8, 8+z; \
+ MULXQ 16+x, AX, R10; ADCXQ AX, R9; MOVQ $0, R8;\
+ MULXQ 24+x, AX, R11; ADCXQ AX, R10; \
+ MULXQ 32+x, AX, R12; ADCXQ AX, R11; \
+ MULXQ 40+x, AX, R13; ADCXQ AX, R12; \
+ MULXQ 48+x, AX, R14; ADCXQ AX, R13; \
+ ;;;;;;;;;;;;;;;;;;;; ADCXQ R8, R14; \
+ \
+ MOVQ 8+x, DX; \
+ MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
+ MULXQ AX, AX, CX; \
+ MOVQ R15, R8; NEGQ R8; ANDQ 8+x, R8; \
+ ADDQ AX, R9; MOVQ R9, 16+z; \
+ ADCQ CX, R8; \
+ ADCQ $0, R11; \
+ ADDQ 8+x, DX; \
+ ADCQ $0, R15; \
+ XORL R9, R9; ;;;;;;;;;;;;;;;;;;;;; ADOXQ R8, R10; \
+ MULXQ 16+x, AX, CX; ADCXQ AX, R10; ADOXQ CX, R11; MOVQ R10, 24+z; \
+ MULXQ 24+x, AX, CX; ADCXQ AX, R11; ADOXQ CX, R12; MOVQ $0, R10; \
+ MULXQ 32+x, AX, CX; ADCXQ AX, R12; ADOXQ CX, R13; \
+ MULXQ 40+x, AX, CX; ADCXQ AX, R13; ADOXQ CX, R14; \
+ MULXQ 48+x, AX, CX; ADCXQ AX, R14; ADOXQ CX, R9; \
+ ;;;;;;;;;;;;;;;;;;; ADCXQ R10, R9; \
+ \
+ MOVQ 16+x, DX; \
+ MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
+ MULXQ AX, AX, CX; \
+ MOVQ R15, R8; NEGQ R8; ANDQ 16+x, R8; \
+ ADDQ AX, R11; MOVQ R11, 32+z; \
+ ADCQ CX, R8; \
+ ADCQ $0, R13; \
+ ADDQ 16+x, DX; \
+ ADCQ $0, R15; \
+ XORL R11, R11; ;;;;;;;;;;;;;;;;;;; ADOXQ R8, R12; \
+ MULXQ 24+x, AX, CX; ADCXQ AX, R12; ADOXQ CX, R13; MOVQ R12, 40+z; \
+ MULXQ 32+x, AX, CX; ADCXQ AX, R13; ADOXQ CX, R14; MOVQ $0, R12; \
+ MULXQ 40+x, AX, CX; ADCXQ AX, R14; ADOXQ CX, R9; \
+ MULXQ 48+x, AX, CX; ADCXQ AX, R9; ADOXQ CX, R10; \
+ ;;;;;;;;;;;;;;;;;;; ADCXQ R11,R10; \
+ \
+ MOVQ 24+x, DX; \
+ MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
+ MULXQ AX, AX, CX; \
+ MOVQ R15, R8; NEGQ R8; ANDQ 24+x, R8; \
+ ADDQ AX, R13; MOVQ R13, 48+z; \
+ ADCQ CX, R8; \
+ ADCQ $0, R9; \
+ ADDQ 24+x, DX; \
+ ADCQ $0, R15; \
+ XORL R13, R13; ;;;;;;;;;;;;;;;;;;; ADOXQ R8, R14; \
+ MULXQ 32+x, AX, CX; ADCXQ AX, R14; ADOXQ CX, R9; MOVQ R14, 56+z; \
+ MULXQ 40+x, AX, CX; ADCXQ AX, R9; ADOXQ CX, R10; MOVQ $0, R14; \
+ MULXQ 48+x, AX, CX; ADCXQ AX, R10; ADOXQ CX, R11; \
+ ;;;;;;;;;;;;;;;;;;; ADCXQ R12,R11; \
+ \
+ MOVQ 32+x, DX; \
+ MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
+ MULXQ AX, AX, CX; \
+ MOVQ R15, R8; NEGQ R8; ANDQ 32+x, R8; \
+ ADDQ AX, R9; MOVQ R9, 64+z; \
+ ADCQ CX, R8; \
+ ADCQ $0, R11; \
+ ADDQ 32+x, DX; \
+ ADCQ $0, R15; \
+ XORL R9, R9; ;;;;;;;;;;;;;;;;;;;;; ADOXQ R8, R10; \
+ MULXQ 40+x, AX, CX; ADCXQ AX, R10; ADOXQ CX, R11; MOVQ R10, 72+z; \
+ MULXQ 48+x, AX, CX; ADCXQ AX, R11; ADOXQ CX, R12; \
+ ;;;;;;;;;;;;;;;;;;; ADCXQ R13,R12; \
+ \
+ MOVQ 40+x, DX; \
+ MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
+ MULXQ AX, AX, CX; \
+ MOVQ R15, R8; NEGQ R8; ANDQ 40+x, R8; \
+ ADDQ AX, R11; MOVQ R11, 80+z; \
+ ADCQ CX, R8; \
+ ADCQ $0, R13; \
+ ADDQ 40+x, DX; \
+ ADCQ $0, R15; \
+ XORL R11, R11; ;;;;;;;;;;;;;;;;;;; ADOXQ R8, R12; \
+ MULXQ 48+x, AX, CX; ADCXQ AX, R12; ADOXQ CX, R13; MOVQ R12, 88+z; \
+ ;;;;;;;;;;;;;;;;;;; ADCXQ R14,R13; \
+ \
+ MOVQ 48+x, DX; \
+ MOVQ DX, AX; ADDQ R15, DX; MOVQ $0, R15; ADCQ $0, R15; \
+ MULXQ AX, AX, CX; \
+ MOVQ R15, R8; NEGQ R8; ANDQ 48+x, R8; \
+ XORL R10, R10; ;;;;;;;;;;;;;; ADOXQ CX, R14; \
+ ;;;;;;;;;;;;;; ADCXQ AX, R13; ;;;;;;;;;;;;;; MOVQ R13, 96+z; \
+ ;;;;;;;;;;;;;; ADCXQ R8, R14; MOVQ R14, 104+z;
+
+// reduceFromDoubleLeg finds a z=x modulo p such that z<2^448 and stores in z
+// Uses: AX, R8-R15, FLAGS
+// Instr: x86_64
+#define reduceFromDoubleLeg(z,x) \
+ /* ( ,2C13,2C12,2C11,2C10|C10,C9,C8, C7) + (C6,...,C0) */ \
+ /* (r14, r13, r12, r11, r10,r9,r8,r15) */ \
+ MOVQ 80+x,AX; MOVQ AX,R10; \
+ MOVQ $0xFFFFFFFF00000000, R8; \
+ ANDQ R8,R10; \
+ \
+ MOVQ $0,R14; \
+ MOVQ 104+x,R13; SHLQ $1,R13,R14; \
+ MOVQ 96+x,R12; SHLQ $1,R12,R13; \
+ MOVQ 88+x,R11; SHLQ $1,R11,R12; \
+ MOVQ 72+x, R9; SHLQ $1,R10,R11; \
+ MOVQ 64+x, R8; SHLQ $1,R10; \
+ MOVQ $0xFFFFFFFF,R15; ANDQ R15,AX; ORQ AX,R10; \
+ MOVQ 56+x,R15; \
+ \
+ ADDQ 0+x,R15; MOVQ R15, 0+z; MOVQ 56+x,R15; \
+ ADCQ 8+x, R8; MOVQ R8, 8+z; MOVQ 64+x, R8; \
+ ADCQ 16+x, R9; MOVQ R9,16+z; MOVQ 72+x, R9; \
+ ADCQ 24+x,R10; MOVQ R10,24+z; MOVQ 80+x,R10; \
+ ADCQ 32+x,R11; MOVQ R11,32+z; MOVQ 88+x,R11; \
+ ADCQ 40+x,R12; MOVQ R12,40+z; MOVQ 96+x,R12; \
+ ADCQ 48+x,R13; MOVQ R13,48+z; MOVQ 104+x,R13; \
+ ADCQ $0,R14; \
+ /* (c10c9,c9c8,c8c7,c7c13,c13c12,c12c11,c11c10) + (c6,...,c0) */ \
+ /* ( r9, r8, r15, r13, r12, r11, r10) */ \
+ MOVQ R10, AX; \
+ SHRQ $32,R11,R10; \
+ SHRQ $32,R12,R11; \
+ SHRQ $32,R13,R12; \
+ SHRQ $32,R15,R13; \
+ SHRQ $32, R8,R15; \
+ SHRQ $32, R9, R8; \
+ SHRQ $32, AX, R9; \
+ \
+ ADDQ 0+z,R10; \
+ ADCQ 8+z,R11; \
+ ADCQ 16+z,R12; \
+ ADCQ 24+z,R13; \
+ ADCQ 32+z,R15; \
+ ADCQ 40+z, R8; \
+ ADCQ 48+z, R9; \
+ ADCQ $0,R14; \
+ /* ( c7) + (c6,...,c0) */ \
+ /* (r14) */ \
+ MOVQ R14, AX; SHLQ $32, AX; \
+ ADDQ R14,R10; MOVQ $0,R14; \
+ ADCQ $0,R11; \
+ ADCQ $0,R12; \
+ ADCQ AX,R13; \
+ ADCQ $0,R15; \
+ ADCQ $0, R8; \
+ ADCQ $0, R9; \
+ ADCQ $0,R14; \
+ /* ( c7) + (c6,...,c0) */ \
+ /* (r14) */ \
+ MOVQ R14, AX; SHLQ $32,AX; \
+ ADDQ R14,R10; MOVQ R10, 0+z; \
+ ADCQ $0,R11; MOVQ R11, 8+z; \
+ ADCQ $0,R12; MOVQ R12,16+z; \
+ ADCQ AX,R13; MOVQ R13,24+z; \
+ ADCQ $0,R15; MOVQ R15,32+z; \
+ ADCQ $0, R8; MOVQ R8,40+z; \
+ ADCQ $0, R9; MOVQ R9,48+z;
+
+// reduceFromDoubleAdx finds a z=x modulo p such that z<2^448 and stores in z
+// Uses: AX, R8-R15, FLAGS
+// Instr: x86_64, adx
+#define reduceFromDoubleAdx(z,x) \
+ /* ( ,2C13,2C12,2C11,2C10|C10,C9,C8, C7) + (C6,...,C0) */ \
+ /* (r14, r13, r12, r11, r10,r9,r8,r15) */ \
+ MOVQ 80+x,AX; MOVQ AX,R10; \
+ MOVQ $0xFFFFFFFF00000000, R8; \
+ ANDQ R8,R10; \
+ \
+ MOVQ $0,R14; \
+ MOVQ 104+x,R13; SHLQ $1,R13,R14; \
+ MOVQ 96+x,R12; SHLQ $1,R12,R13; \
+ MOVQ 88+x,R11; SHLQ $1,R11,R12; \
+ MOVQ 72+x, R9; SHLQ $1,R10,R11; \
+ MOVQ 64+x, R8; SHLQ $1,R10; \
+ MOVQ $0xFFFFFFFF,R15; ANDQ R15,AX; ORQ AX,R10; \
+ MOVQ 56+x,R15; \
+ \
+ XORL AX,AX; \
+ ADCXQ 0+x,R15; MOVQ R15, 0+z; MOVQ 56+x,R15; \
+ ADCXQ 8+x, R8; MOVQ R8, 8+z; MOVQ 64+x, R8; \
+ ADCXQ 16+x, R9; MOVQ R9,16+z; MOVQ 72+x, R9; \
+ ADCXQ 24+x,R10; MOVQ R10,24+z; MOVQ 80+x,R10; \
+ ADCXQ 32+x,R11; MOVQ R11,32+z; MOVQ 88+x,R11; \
+ ADCXQ 40+x,R12; MOVQ R12,40+z; MOVQ 96+x,R12; \
+ ADCXQ 48+x,R13; MOVQ R13,48+z; MOVQ 104+x,R13; \
+ ADCXQ AX,R14; \
+ /* (c10c9,c9c8,c8c7,c7c13,c13c12,c12c11,c11c10) + (c6,...,c0) */ \
+ /* ( r9, r8, r15, r13, r12, r11, r10) */ \
+ MOVQ R10, AX; \
+ SHRQ $32,R11,R10; \
+ SHRQ $32,R12,R11; \
+ SHRQ $32,R13,R12; \
+ SHRQ $32,R15,R13; \
+ SHRQ $32, R8,R15; \
+ SHRQ $32, R9, R8; \
+ SHRQ $32, AX, R9; \
+ \
+ XORL AX,AX; \
+ ADCXQ 0+z,R10; \
+ ADCXQ 8+z,R11; \
+ ADCXQ 16+z,R12; \
+ ADCXQ 24+z,R13; \
+ ADCXQ 32+z,R15; \
+ ADCXQ 40+z, R8; \
+ ADCXQ 48+z, R9; \
+ ADCXQ AX,R14; \
+ /* ( c7) + (c6,...,c0) */ \
+ /* (r14) */ \
+ MOVQ R14, AX; SHLQ $32, AX; \
+ CLC; \
+ ADCXQ R14,R10; MOVQ $0,R14; \
+ ADCXQ R14,R11; \
+ ADCXQ R14,R12; \
+ ADCXQ AX,R13; \
+ ADCXQ R14,R15; \
+ ADCXQ R14, R8; \
+ ADCXQ R14, R9; \
+ ADCXQ R14,R14; \
+ /* ( c7) + (c6,...,c0) */ \
+ /* (r14) */ \
+ MOVQ R14, AX; SHLQ $32, AX; \
+ CLC; \
+ ADCXQ R14,R10; MOVQ R10, 0+z; MOVQ $0,R14; \
+ ADCXQ R14,R11; MOVQ R11, 8+z; \
+ ADCXQ R14,R12; MOVQ R12,16+z; \
+ ADCXQ AX,R13; MOVQ R13,24+z; \
+ ADCXQ R14,R15; MOVQ R15,32+z; \
+ ADCXQ R14, R8; MOVQ R8,40+z; \
+ ADCXQ R14, R9; MOVQ R9,48+z;
+
+// addSub calculates two operations: x,y = x+y,x-y
+// Uses: AX, DX, R8-R15, FLAGS
+#define addSub(x,y) \
+ MOVQ 0+x, R8; ADDQ 0+y, R8; \
+ MOVQ 8+x, R9; ADCQ 8+y, R9; \
+ MOVQ 16+x, R10; ADCQ 16+y, R10; \
+ MOVQ 24+x, R11; ADCQ 24+y, R11; \
+ MOVQ 32+x, R12; ADCQ 32+y, R12; \
+ MOVQ 40+x, R13; ADCQ 40+y, R13; \
+ MOVQ 48+x, R14; ADCQ 48+y, R14; \
+ MOVQ $0, AX; ADCQ $0, AX; \
+ MOVQ AX, DX; \
+ SHLQ $32, DX; \
+ ADDQ AX, R8; MOVQ $0, AX; \
+ ADCQ $0, R9; \
+ ADCQ $0, R10; \
+ ADCQ DX, R11; \
+ ADCQ $0, R12; \
+ ADCQ $0, R13; \
+ ADCQ $0, R14; \
+ ADCQ $0, AX; \
+ MOVQ AX, DX; \
+ SHLQ $32, DX; \
+ ADDQ AX, R8; MOVQ 0+x,AX; MOVQ R8, 0+x; MOVQ AX, R8; \
+ ADCQ $0, R9; MOVQ 8+x,AX; MOVQ R9, 8+x; MOVQ AX, R9; \
+ ADCQ $0, R10; MOVQ 16+x,AX; MOVQ R10, 16+x; MOVQ AX, R10; \
+ ADCQ DX, R11; MOVQ 24+x,AX; MOVQ R11, 24+x; MOVQ AX, R11; \
+ ADCQ $0, R12; MOVQ 32+x,AX; MOVQ R12, 32+x; MOVQ AX, R12; \
+ ADCQ $0, R13; MOVQ 40+x,AX; MOVQ R13, 40+x; MOVQ AX, R13; \
+ ADCQ $0, R14; MOVQ 48+x,AX; MOVQ R14, 48+x; MOVQ AX, R14; \
+ SUBQ 0+y, R8; \
+ SBBQ 8+y, R9; \
+ SBBQ 16+y, R10; \
+ SBBQ 24+y, R11; \
+ SBBQ 32+y, R12; \
+ SBBQ 40+y, R13; \
+ SBBQ 48+y, R14; \
+ MOVQ $0, AX; SETCS AX; \
+ MOVQ AX, DX; \
+ SHLQ $32, DX; \
+ SUBQ AX, R8; MOVQ $0, AX; \
+ SBBQ $0, R9; \
+ SBBQ $0, R10; \
+ SBBQ DX, R11; \
+ SBBQ $0, R12; \
+ SBBQ $0, R13; \
+ SBBQ $0, R14; \
+ SETCS AX; \
+ MOVQ AX, DX; \
+ SHLQ $32, DX; \
+ SUBQ AX, R8; MOVQ R8, 0+y; \
+ SBBQ $0, R9; MOVQ R9, 8+y; \
+ SBBQ $0, R10; MOVQ R10, 16+y; \
+ SBBQ DX, R11; MOVQ R11, 24+y; \
+ SBBQ $0, R12; MOVQ R12, 32+y; \
+ SBBQ $0, R13; MOVQ R13, 40+y; \
+ SBBQ $0, R14; MOVQ R14, 48+y;
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s
new file mode 100644
index 000000000..3f1f07c98
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp448/fp_amd64.s
@@ -0,0 +1,75 @@
+//go:build amd64 && !purego
+// +build amd64,!purego
+
+#include "textflag.h"
+#include "fp_amd64.h"
+
+// func cmovAmd64(x, y *Elt, n uint)
+TEXT ·cmovAmd64(SB),NOSPLIT,$0-24
+ MOVQ x+0(FP), DI
+ MOVQ y+8(FP), SI
+ MOVQ n+16(FP), BX
+ cselect(0(DI),0(SI),BX)
+ RET
+
+// func cswapAmd64(x, y *Elt, n uint)
+TEXT ·cswapAmd64(SB),NOSPLIT,$0-24
+ MOVQ x+0(FP), DI
+ MOVQ y+8(FP), SI
+ MOVQ n+16(FP), BX
+ cswap(0(DI),0(SI),BX)
+ RET
+
+// func subAmd64(z, x, y *Elt)
+TEXT ·subAmd64(SB),NOSPLIT,$0-24
+ MOVQ z+0(FP), DI
+ MOVQ x+8(FP), SI
+ MOVQ y+16(FP), BX
+ subtraction(0(DI),0(SI),0(BX))
+ RET
+
+// func addsubAmd64(x, y *Elt)
+TEXT ·addsubAmd64(SB),NOSPLIT,$0-16
+ MOVQ x+0(FP), DI
+ MOVQ y+8(FP), SI
+ addSub(0(DI),0(SI))
+ RET
+
+#define addLegacy \
+ additionLeg(0(DI),0(SI),0(BX))
+#define addBmi2Adx \
+ additionAdx(0(DI),0(SI),0(BX))
+
+#define mulLegacy \
+ integerMulLeg(0(SP),0(SI),0(BX)) \
+ reduceFromDoubleLeg(0(DI),0(SP))
+#define mulBmi2Adx \
+ integerMulAdx(0(SP),0(SI),0(BX)) \
+ reduceFromDoubleAdx(0(DI),0(SP))
+
+#define sqrLegacy \
+ integerSqrLeg(0(SP),0(SI)) \
+ reduceFromDoubleLeg(0(DI),0(SP))
+#define sqrBmi2Adx \
+ integerSqrAdx(0(SP),0(SI)) \
+ reduceFromDoubleAdx(0(DI),0(SP))
+
+// func addAmd64(z, x, y *Elt)
+TEXT ·addAmd64(SB),NOSPLIT,$0-24
+ MOVQ z+0(FP), DI
+ MOVQ x+8(FP), SI
+ MOVQ y+16(FP), BX
+ CHECK_BMI2ADX(LADD, addLegacy, addBmi2Adx)
+
+// func mulAmd64(z, x, y *Elt)
+TEXT ·mulAmd64(SB),NOSPLIT,$112-24
+ MOVQ z+0(FP), DI
+ MOVQ x+8(FP), SI
+ MOVQ y+16(FP), BX
+ CHECK_BMI2ADX(LMUL, mulLegacy, mulBmi2Adx)
+
+// func sqrAmd64(z, x *Elt)
+TEXT ·sqrAmd64(SB),NOSPLIT,$112-16
+ MOVQ z+0(FP), DI
+ MOVQ x+8(FP), SI
+ CHECK_BMI2ADX(LSQR, sqrLegacy, sqrBmi2Adx)
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_generic.go b/vendor/github.com/cloudflare/circl/math/fp448/fp_generic.go
new file mode 100644
index 000000000..47a0b6320
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp448/fp_generic.go
@@ -0,0 +1,339 @@
+package fp448
+
+import (
+ "encoding/binary"
+ "math/bits"
+)
+
+func cmovGeneric(x, y *Elt, n uint) {
+ m := -uint64(n & 0x1)
+ x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
+ x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
+ x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
+ x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
+ x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
+ x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
+ x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
+
+ y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
+ y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
+ y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
+ y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
+ y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
+ y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
+ y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
+
+ x0 = (x0 &^ m) | (y0 & m)
+ x1 = (x1 &^ m) | (y1 & m)
+ x2 = (x2 &^ m) | (y2 & m)
+ x3 = (x3 &^ m) | (y3 & m)
+ x4 = (x4 &^ m) | (y4 & m)
+ x5 = (x5 &^ m) | (y5 & m)
+ x6 = (x6 &^ m) | (y6 & m)
+
+ binary.LittleEndian.PutUint64(x[0*8:1*8], x0)
+ binary.LittleEndian.PutUint64(x[1*8:2*8], x1)
+ binary.LittleEndian.PutUint64(x[2*8:3*8], x2)
+ binary.LittleEndian.PutUint64(x[3*8:4*8], x3)
+ binary.LittleEndian.PutUint64(x[4*8:5*8], x4)
+ binary.LittleEndian.PutUint64(x[5*8:6*8], x5)
+ binary.LittleEndian.PutUint64(x[6*8:7*8], x6)
+}
+
+func cswapGeneric(x, y *Elt, n uint) {
+ m := -uint64(n & 0x1)
+ x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
+ x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
+ x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
+ x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
+ x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
+ x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
+ x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
+
+ y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
+ y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
+ y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
+ y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
+ y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
+ y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
+ y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
+
+ t0 := m & (x0 ^ y0)
+ t1 := m & (x1 ^ y1)
+ t2 := m & (x2 ^ y2)
+ t3 := m & (x3 ^ y3)
+ t4 := m & (x4 ^ y4)
+ t5 := m & (x5 ^ y5)
+ t6 := m & (x6 ^ y6)
+ x0 ^= t0
+ x1 ^= t1
+ x2 ^= t2
+ x3 ^= t3
+ x4 ^= t4
+ x5 ^= t5
+ x6 ^= t6
+ y0 ^= t0
+ y1 ^= t1
+ y2 ^= t2
+ y3 ^= t3
+ y4 ^= t4
+ y5 ^= t5
+ y6 ^= t6
+
+ binary.LittleEndian.PutUint64(x[0*8:1*8], x0)
+ binary.LittleEndian.PutUint64(x[1*8:2*8], x1)
+ binary.LittleEndian.PutUint64(x[2*8:3*8], x2)
+ binary.LittleEndian.PutUint64(x[3*8:4*8], x3)
+ binary.LittleEndian.PutUint64(x[4*8:5*8], x4)
+ binary.LittleEndian.PutUint64(x[5*8:6*8], x5)
+ binary.LittleEndian.PutUint64(x[6*8:7*8], x6)
+
+ binary.LittleEndian.PutUint64(y[0*8:1*8], y0)
+ binary.LittleEndian.PutUint64(y[1*8:2*8], y1)
+ binary.LittleEndian.PutUint64(y[2*8:3*8], y2)
+ binary.LittleEndian.PutUint64(y[3*8:4*8], y3)
+ binary.LittleEndian.PutUint64(y[4*8:5*8], y4)
+ binary.LittleEndian.PutUint64(y[5*8:6*8], y5)
+ binary.LittleEndian.PutUint64(y[6*8:7*8], y6)
+}
+
+func addGeneric(z, x, y *Elt) {
+ x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
+ x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
+ x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
+ x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
+ x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
+ x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
+ x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
+
+ y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
+ y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
+ y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
+ y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
+ y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
+ y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
+ y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
+
+ z0, c0 := bits.Add64(x0, y0, 0)
+ z1, c1 := bits.Add64(x1, y1, c0)
+ z2, c2 := bits.Add64(x2, y2, c1)
+ z3, c3 := bits.Add64(x3, y3, c2)
+ z4, c4 := bits.Add64(x4, y4, c3)
+ z5, c5 := bits.Add64(x5, y5, c4)
+ z6, z7 := bits.Add64(x6, y6, c5)
+
+ z0, c0 = bits.Add64(z0, z7, 0)
+ z1, c1 = bits.Add64(z1, 0, c0)
+ z2, c2 = bits.Add64(z2, 0, c1)
+ z3, c3 = bits.Add64(z3, z7<<32, c2)
+ z4, c4 = bits.Add64(z4, 0, c3)
+ z5, c5 = bits.Add64(z5, 0, c4)
+ z6, z7 = bits.Add64(z6, 0, c5)
+
+ z0, c0 = bits.Add64(z0, z7, 0)
+ z1, c1 = bits.Add64(z1, 0, c0)
+ z2, c2 = bits.Add64(z2, 0, c1)
+ z3, c3 = bits.Add64(z3, z7<<32, c2)
+ z4, c4 = bits.Add64(z4, 0, c3)
+ z5, c5 = bits.Add64(z5, 0, c4)
+ z6, _ = bits.Add64(z6, 0, c5)
+
+ binary.LittleEndian.PutUint64(z[0*8:1*8], z0)
+ binary.LittleEndian.PutUint64(z[1*8:2*8], z1)
+ binary.LittleEndian.PutUint64(z[2*8:3*8], z2)
+ binary.LittleEndian.PutUint64(z[3*8:4*8], z3)
+ binary.LittleEndian.PutUint64(z[4*8:5*8], z4)
+ binary.LittleEndian.PutUint64(z[5*8:6*8], z5)
+ binary.LittleEndian.PutUint64(z[6*8:7*8], z6)
+}
+
+func subGeneric(z, x, y *Elt) {
+ x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
+ x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
+ x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
+ x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
+ x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
+ x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
+ x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
+
+ y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
+ y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
+ y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
+ y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
+ y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
+ y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
+ y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
+
+ z0, c0 := bits.Sub64(x0, y0, 0)
+ z1, c1 := bits.Sub64(x1, y1, c0)
+ z2, c2 := bits.Sub64(x2, y2, c1)
+ z3, c3 := bits.Sub64(x3, y3, c2)
+ z4, c4 := bits.Sub64(x4, y4, c3)
+ z5, c5 := bits.Sub64(x5, y5, c4)
+ z6, z7 := bits.Sub64(x6, y6, c5)
+
+ z0, c0 = bits.Sub64(z0, z7, 0)
+ z1, c1 = bits.Sub64(z1, 0, c0)
+ z2, c2 = bits.Sub64(z2, 0, c1)
+ z3, c3 = bits.Sub64(z3, z7<<32, c2)
+ z4, c4 = bits.Sub64(z4, 0, c3)
+ z5, c5 = bits.Sub64(z5, 0, c4)
+ z6, z7 = bits.Sub64(z6, 0, c5)
+
+ z0, c0 = bits.Sub64(z0, z7, 0)
+ z1, c1 = bits.Sub64(z1, 0, c0)
+ z2, c2 = bits.Sub64(z2, 0, c1)
+ z3, c3 = bits.Sub64(z3, z7<<32, c2)
+ z4, c4 = bits.Sub64(z4, 0, c3)
+ z5, c5 = bits.Sub64(z5, 0, c4)
+ z6, _ = bits.Sub64(z6, 0, c5)
+
+ binary.LittleEndian.PutUint64(z[0*8:1*8], z0)
+ binary.LittleEndian.PutUint64(z[1*8:2*8], z1)
+ binary.LittleEndian.PutUint64(z[2*8:3*8], z2)
+ binary.LittleEndian.PutUint64(z[3*8:4*8], z3)
+ binary.LittleEndian.PutUint64(z[4*8:5*8], z4)
+ binary.LittleEndian.PutUint64(z[5*8:6*8], z5)
+ binary.LittleEndian.PutUint64(z[6*8:7*8], z6)
+}
+
+func addsubGeneric(x, y *Elt) {
+ z := &Elt{}
+ addGeneric(z, x, y)
+ subGeneric(y, x, y)
+ *x = *z
+}
+
+func mulGeneric(z, x, y *Elt) {
+ x0 := binary.LittleEndian.Uint64(x[0*8 : 1*8])
+ x1 := binary.LittleEndian.Uint64(x[1*8 : 2*8])
+ x2 := binary.LittleEndian.Uint64(x[2*8 : 3*8])
+ x3 := binary.LittleEndian.Uint64(x[3*8 : 4*8])
+ x4 := binary.LittleEndian.Uint64(x[4*8 : 5*8])
+ x5 := binary.LittleEndian.Uint64(x[5*8 : 6*8])
+ x6 := binary.LittleEndian.Uint64(x[6*8 : 7*8])
+
+ y0 := binary.LittleEndian.Uint64(y[0*8 : 1*8])
+ y1 := binary.LittleEndian.Uint64(y[1*8 : 2*8])
+ y2 := binary.LittleEndian.Uint64(y[2*8 : 3*8])
+ y3 := binary.LittleEndian.Uint64(y[3*8 : 4*8])
+ y4 := binary.LittleEndian.Uint64(y[4*8 : 5*8])
+ y5 := binary.LittleEndian.Uint64(y[5*8 : 6*8])
+ y6 := binary.LittleEndian.Uint64(y[6*8 : 7*8])
+
+ yy := [7]uint64{y0, y1, y2, y3, y4, y5, y6}
+ zz := [7]uint64{}
+
+ yi := yy[0]
+ h0, l0 := bits.Mul64(x0, yi)
+ h1, l1 := bits.Mul64(x1, yi)
+ h2, l2 := bits.Mul64(x2, yi)
+ h3, l3 := bits.Mul64(x3, yi)
+ h4, l4 := bits.Mul64(x4, yi)
+ h5, l5 := bits.Mul64(x5, yi)
+ h6, l6 := bits.Mul64(x6, yi)
+
+ zz[0] = l0
+ a0, c0 := bits.Add64(h0, l1, 0)
+ a1, c1 := bits.Add64(h1, l2, c0)
+ a2, c2 := bits.Add64(h2, l3, c1)
+ a3, c3 := bits.Add64(h3, l4, c2)
+ a4, c4 := bits.Add64(h4, l5, c3)
+ a5, c5 := bits.Add64(h5, l6, c4)
+ a6, _ := bits.Add64(h6, 0, c5)
+
+ for i := 1; i < 7; i++ {
+ yi = yy[i]
+ h0, l0 = bits.Mul64(x0, yi)
+ h1, l1 = bits.Mul64(x1, yi)
+ h2, l2 = bits.Mul64(x2, yi)
+ h3, l3 = bits.Mul64(x3, yi)
+ h4, l4 = bits.Mul64(x4, yi)
+ h5, l5 = bits.Mul64(x5, yi)
+ h6, l6 = bits.Mul64(x6, yi)
+
+ zz[i], c0 = bits.Add64(a0, l0, 0)
+ a0, c1 = bits.Add64(a1, l1, c0)
+ a1, c2 = bits.Add64(a2, l2, c1)
+ a2, c3 = bits.Add64(a3, l3, c2)
+ a3, c4 = bits.Add64(a4, l4, c3)
+ a4, c5 = bits.Add64(a5, l5, c4)
+ a5, a6 = bits.Add64(a6, l6, c5)
+
+ a0, c0 = bits.Add64(a0, h0, 0)
+ a1, c1 = bits.Add64(a1, h1, c0)
+ a2, c2 = bits.Add64(a2, h2, c1)
+ a3, c3 = bits.Add64(a3, h3, c2)
+ a4, c4 = bits.Add64(a4, h4, c3)
+ a5, c5 = bits.Add64(a5, h5, c4)
+ a6, _ = bits.Add64(a6, h6, c5)
+ }
+ red64(z, &zz, &[7]uint64{a0, a1, a2, a3, a4, a5, a6})
+}
+
+func sqrGeneric(z, x *Elt) { mulGeneric(z, x, x) }
+
+func red64(z *Elt, l, h *[7]uint64) {
+ /* (2C13, 2C12, 2C11, 2C10|C10, C9, C8, C7) + (C6,...,C0) */
+ h0 := h[0]
+ h1 := h[1]
+ h2 := h[2]
+ h3 := ((h[3] & (0xFFFFFFFF << 32)) << 1) | (h[3] & 0xFFFFFFFF)
+ h4 := (h[3] >> 63) | (h[4] << 1)
+ h5 := (h[4] >> 63) | (h[5] << 1)
+ h6 := (h[5] >> 63) | (h[6] << 1)
+ h7 := (h[6] >> 63)
+
+ l0, c0 := bits.Add64(h0, l[0], 0)
+ l1, c1 := bits.Add64(h1, l[1], c0)
+ l2, c2 := bits.Add64(h2, l[2], c1)
+ l3, c3 := bits.Add64(h3, l[3], c2)
+ l4, c4 := bits.Add64(h4, l[4], c3)
+ l5, c5 := bits.Add64(h5, l[5], c4)
+ l6, c6 := bits.Add64(h6, l[6], c5)
+ l7, _ := bits.Add64(h7, 0, c6)
+
+ /* (C10C9, C9C8,C8C7,C7C13,C13C12,C12C11,C11C10) + (C6,...,C0) */
+ h0 = (h[3] >> 32) | (h[4] << 32)
+ h1 = (h[4] >> 32) | (h[5] << 32)
+ h2 = (h[5] >> 32) | (h[6] << 32)
+ h3 = (h[6] >> 32) | (h[0] << 32)
+ h4 = (h[0] >> 32) | (h[1] << 32)
+ h5 = (h[1] >> 32) | (h[2] << 32)
+ h6 = (h[2] >> 32) | (h[3] << 32)
+
+ l0, c0 = bits.Add64(l0, h0, 0)
+ l1, c1 = bits.Add64(l1, h1, c0)
+ l2, c2 = bits.Add64(l2, h2, c1)
+ l3, c3 = bits.Add64(l3, h3, c2)
+ l4, c4 = bits.Add64(l4, h4, c3)
+ l5, c5 = bits.Add64(l5, h5, c4)
+ l6, c6 = bits.Add64(l6, h6, c5)
+ l7, _ = bits.Add64(l7, 0, c6)
+
+ /* (C7) + (C6,...,C0) */
+ l0, c0 = bits.Add64(l0, l7, 0)
+ l1, c1 = bits.Add64(l1, 0, c0)
+ l2, c2 = bits.Add64(l2, 0, c1)
+ l3, c3 = bits.Add64(l3, l7<<32, c2)
+ l4, c4 = bits.Add64(l4, 0, c3)
+ l5, c5 = bits.Add64(l5, 0, c4)
+ l6, l7 = bits.Add64(l6, 0, c5)
+
+ /* (C7) + (C6,...,C0) */
+ l0, c0 = bits.Add64(l0, l7, 0)
+ l1, c1 = bits.Add64(l1, 0, c0)
+ l2, c2 = bits.Add64(l2, 0, c1)
+ l3, c3 = bits.Add64(l3, l7<<32, c2)
+ l4, c4 = bits.Add64(l4, 0, c3)
+ l5, c5 = bits.Add64(l5, 0, c4)
+ l6, _ = bits.Add64(l6, 0, c5)
+
+ binary.LittleEndian.PutUint64(z[0*8:1*8], l0)
+ binary.LittleEndian.PutUint64(z[1*8:2*8], l1)
+ binary.LittleEndian.PutUint64(z[2*8:3*8], l2)
+ binary.LittleEndian.PutUint64(z[3*8:4*8], l3)
+ binary.LittleEndian.PutUint64(z[4*8:5*8], l4)
+ binary.LittleEndian.PutUint64(z[5*8:6*8], l5)
+ binary.LittleEndian.PutUint64(z[6*8:7*8], l6)
+}
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fp_noasm.go b/vendor/github.com/cloudflare/circl/math/fp448/fp_noasm.go
new file mode 100644
index 000000000..a62225d29
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp448/fp_noasm.go
@@ -0,0 +1,12 @@
+//go:build !amd64 || purego
+// +build !amd64 purego
+
+package fp448
+
+func cmov(x, y *Elt, n uint) { cmovGeneric(x, y, n) }
+func cswap(x, y *Elt, n uint) { cswapGeneric(x, y, n) }
+func add(z, x, y *Elt) { addGeneric(z, x, y) }
+func sub(z, x, y *Elt) { subGeneric(z, x, y) }
+func addsub(x, y *Elt) { addsubGeneric(x, y) }
+func mul(z, x, y *Elt) { mulGeneric(z, x, y) }
+func sqr(z, x *Elt) { sqrGeneric(z, x) }
diff --git a/vendor/github.com/cloudflare/circl/math/fp448/fuzzer.go b/vendor/github.com/cloudflare/circl/math/fp448/fuzzer.go
new file mode 100644
index 000000000..2d7afc805
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/fp448/fuzzer.go
@@ -0,0 +1,75 @@
+//go:build gofuzz
+// +build gofuzz
+
+// How to run the fuzzer:
+//
+// $ go get -u github.com/dvyukov/go-fuzz/go-fuzz
+// $ go get -u github.com/dvyukov/go-fuzz/go-fuzz-build
+// $ go-fuzz-build -libfuzzer -func FuzzReduction -o lib.a
+// $ clang -fsanitize=fuzzer lib.a -o fu.exe
+// $ ./fu.exe
+package fp448
+
+import (
+ "encoding/binary"
+ "fmt"
+ "math/big"
+
+ "github.com/cloudflare/circl/internal/conv"
+)
+
+// FuzzReduction is a fuzzer target for red64 function, which reduces t
+// (112 bits) to a number t' (56 bits) congruent modulo p448.
+func FuzzReduction(data []byte) int {
+ if len(data) != 2*Size {
+ return -1
+ }
+ var got, want Elt
+ var lo, hi [7]uint64
+ a := data[:Size]
+ b := data[Size:]
+ lo[0] = binary.LittleEndian.Uint64(a[0*8 : 1*8])
+ lo[1] = binary.LittleEndian.Uint64(a[1*8 : 2*8])
+ lo[2] = binary.LittleEndian.Uint64(a[2*8 : 3*8])
+ lo[3] = binary.LittleEndian.Uint64(a[3*8 : 4*8])
+ lo[4] = binary.LittleEndian.Uint64(a[4*8 : 5*8])
+ lo[5] = binary.LittleEndian.Uint64(a[5*8 : 6*8])
+ lo[6] = binary.LittleEndian.Uint64(a[6*8 : 7*8])
+
+ hi[0] = binary.LittleEndian.Uint64(b[0*8 : 1*8])
+ hi[1] = binary.LittleEndian.Uint64(b[1*8 : 2*8])
+ hi[2] = binary.LittleEndian.Uint64(b[2*8 : 3*8])
+ hi[3] = binary.LittleEndian.Uint64(b[3*8 : 4*8])
+ hi[4] = binary.LittleEndian.Uint64(b[4*8 : 5*8])
+ hi[5] = binary.LittleEndian.Uint64(b[5*8 : 6*8])
+ hi[6] = binary.LittleEndian.Uint64(b[6*8 : 7*8])
+
+ red64(&got, &lo, &hi)
+
+ t := conv.BytesLe2BigInt(data[:2*Size])
+
+ two448 := big.NewInt(1)
+ two448.Lsh(two448, 448) // 2^448
+ mask448 := big.NewInt(1)
+ mask448.Sub(two448, mask448) // 2^448-1
+ two224plus1 := big.NewInt(1)
+ two224plus1.Lsh(two224plus1, 224)
+ two224plus1.Add(two224plus1, big.NewInt(1)) // 2^224+1
+
+ var loBig, hiBig big.Int
+ for t.Cmp(two448) >= 0 {
+ loBig.And(t, mask448)
+ hiBig.Rsh(t, 448)
+ t.Mul(&hiBig, two224plus1)
+ t.Add(t, &loBig)
+ }
+ conv.BigInt2BytesLe(want[:], t)
+
+ if got != want {
+ fmt.Printf("in: %v\n", conv.BytesLe2BigInt(data[:2*Size]))
+ fmt.Printf("got: %v\n", got)
+ fmt.Printf("want: %v\n", want)
+ panic("error found")
+ }
+ return 1
+}
diff --git a/vendor/github.com/cloudflare/circl/math/mlsbset/mlsbset.go b/vendor/github.com/cloudflare/circl/math/mlsbset/mlsbset.go
new file mode 100644
index 000000000..a43851b8b
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/mlsbset/mlsbset.go
@@ -0,0 +1,122 @@
+// Package mlsbset provides a constant-time exponentiation method with precomputation.
+//
+// References: "Efficient and secure algorithms for GLV-based scalar
+// multiplication and their implementation on GLV–GLS curves" by (Faz-Hernandez et al.)
+// - https://doi.org/10.1007/s13389-014-0085-7
+// - https://eprint.iacr.org/2013/158
+package mlsbset
+
+import (
+ "errors"
+ "fmt"
+ "math/big"
+
+ "github.com/cloudflare/circl/internal/conv"
+)
+
+// EltG is a group element.
+type EltG interface{}
+
+// EltP is a precomputed group element.
+type EltP interface{}
+
+// Group defines the operations required by MLSBSet exponentiation method.
+type Group interface {
+ Identity() EltG // Returns the identity of the group.
+ Sqr(x EltG) // Calculates x = x^2.
+ Mul(x EltG, y EltP) // Calculates x = x*y.
+ NewEltP() EltP // Returns an arbitrary precomputed element.
+ ExtendedEltP() EltP // Returns the precomputed element x^(2^(w*d)).
+ Lookup(a EltP, v uint, s, u int32) // Sets a = s*T[v][u].
+}
+
+// Params contains the parameters of the encoding.
+type Params struct {
+ T uint // T is the maximum size (in bits) of exponents.
+ V uint // V is the number of tables.
+ W uint // W is the window size.
+ E uint // E is the number of digits per table.
+ D uint // D is the number of digits in total.
+ L uint // L is the length of the code.
+}
+
+// Encoder allows to convert integers into valid powers.
+type Encoder struct{ p Params }
+
+// New produces an encoder of the MLSBSet algorithm.
+func New(t, v, w uint) (Encoder, error) {
+ if !(t > 1 && v >= 1 && w >= 2) {
+ return Encoder{}, errors.New("t>1, v>=1, w>=2")
+ }
+ e := (t + w*v - 1) / (w * v)
+ d := e * v
+ l := d * w
+ return Encoder{Params{t, v, w, e, d, l}}, nil
+}
+
+// Encode converts an odd integer k into a valid power for exponentiation.
+func (m Encoder) Encode(k []byte) (*Power, error) {
+ if len(k) == 0 {
+ return nil, errors.New("empty slice")
+ }
+ if !(len(k) <= int(m.p.L+7)>>3) {
+ return nil, errors.New("k too big")
+ }
+ if k[0]%2 == 0 {
+ return nil, errors.New("k must be odd")
+ }
+ ap := int((m.p.L+7)/8) - len(k)
+ k = append(k, make([]byte, ap)...)
+ s := m.signs(k)
+ b := make([]int32, m.p.L-m.p.D)
+ c := conv.BytesLe2BigInt(k)
+ c.Rsh(c, m.p.D)
+ var bi big.Int
+ for i := m.p.D; i < m.p.L; i++ {
+ c0 := int32(c.Bit(0))
+ b[i-m.p.D] = s[i%m.p.D] * c0
+ bi.SetInt64(int64(b[i-m.p.D] >> 1))
+ c.Rsh(c, 1)
+ c.Sub(c, &bi)
+ }
+ carry := int(c.Int64())
+ return &Power{m, s, b, carry}, nil
+}
+
+// signs calculates the set of signs.
+func (m Encoder) signs(k []byte) []int32 {
+ s := make([]int32, m.p.D)
+ s[m.p.D-1] = 1
+ for i := uint(1); i < m.p.D; i++ {
+ ki := int32((k[i>>3] >> (i & 0x7)) & 0x1)
+ s[i-1] = 2*ki - 1
+ }
+ return s
+}
+
+// GetParams returns the complementary parameters of the encoding.
+func (m Encoder) GetParams() Params { return m.p }
+
+// tableSize returns the size of each table.
+func (m Encoder) tableSize() uint { return 1 << (m.p.W - 1) }
+
+// Elts returns the total number of elements that must be precomputed.
+func (m Encoder) Elts() uint { return m.p.V * m.tableSize() }
+
+// IsExtended returns true if the element x^(2^(wd)) must be calculated.
+func (m Encoder) IsExtended() bool { q := m.p.T / (m.p.V * m.p.W); return m.p.T == q*m.p.V*m.p.W }
+
+// Ops returns the number of squares and multiplications executed during an exponentiation.
+func (m Encoder) Ops() (S uint, M uint) {
+ S = m.p.E
+ M = m.p.E * m.p.V
+ if m.IsExtended() {
+ M++
+ }
+ return
+}
+
+func (m Encoder) String() string {
+ return fmt.Sprintf("T: %v W: %v V: %v e: %v d: %v l: %v wv|t: %v",
+ m.p.T, m.p.W, m.p.V, m.p.E, m.p.D, m.p.L, m.IsExtended())
+}
diff --git a/vendor/github.com/cloudflare/circl/math/mlsbset/power.go b/vendor/github.com/cloudflare/circl/math/mlsbset/power.go
new file mode 100644
index 000000000..3f214c304
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/mlsbset/power.go
@@ -0,0 +1,64 @@
+package mlsbset
+
+import "fmt"
+
+// Power is a valid exponent produced by the MLSBSet encoding algorithm.
+type Power struct {
+ set Encoder // parameters of code.
+ s []int32 // set of signs.
+ b []int32 // set of digits.
+ c int // carry is {0,1}.
+}
+
+// Exp is calculates x^k, where x is a predetermined element of a group G.
+func (p *Power) Exp(G Group) EltG {
+ a, b := G.Identity(), G.NewEltP()
+ for e := int(p.set.p.E - 1); e >= 0; e-- {
+ G.Sqr(a)
+ for v := uint(0); v < p.set.p.V; v++ {
+ sgnElt, idElt := p.Digit(v, uint(e))
+ G.Lookup(b, v, sgnElt, idElt)
+ G.Mul(a, b)
+ }
+ }
+ if p.set.IsExtended() && p.c == 1 {
+ G.Mul(a, G.ExtendedEltP())
+ }
+ return a
+}
+
+// Digit returns the (v,e)-th digit and its sign.
+func (p *Power) Digit(v, e uint) (sgn, dig int32) {
+ sgn = p.bit(0, v, e)
+ dig = 0
+ for i := p.set.p.W - 1; i > 0; i-- {
+ dig = 2*dig + p.bit(i, v, e)
+ }
+ mask := dig >> 31
+ dig = (dig + mask) ^ mask
+ return sgn, dig
+}
+
+// bit returns the (w,v,e)-th bit of the code.
+func (p *Power) bit(w, v, e uint) int32 {
+ if !(w < p.set.p.W &&
+ v < p.set.p.V &&
+ e < p.set.p.E) {
+ panic(fmt.Errorf("indexes outside (%v,%v,%v)", w, v, e))
+ }
+ if w == 0 {
+ return p.s[p.set.p.E*v+e]
+ }
+ return p.b[p.set.p.D*(w-1)+p.set.p.E*v+e]
+}
+
+func (p *Power) String() string {
+ dig := ""
+ for j := uint(0); j < p.set.p.V; j++ {
+ for i := uint(0); i < p.set.p.E; i++ {
+ s, d := p.Digit(j, i)
+ dig += fmt.Sprintf("(%2v,%2v) = %+2v %+2v\n", j, i, s, d)
+ }
+ }
+ return fmt.Sprintf("len: %v\ncarry: %v\ndigits:\n%v", len(p.b)+len(p.s), p.c, dig)
+}
diff --git a/vendor/github.com/cloudflare/circl/math/primes.go b/vendor/github.com/cloudflare/circl/math/primes.go
new file mode 100644
index 000000000..158fd83a7
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/primes.go
@@ -0,0 +1,34 @@
+package math
+
+import (
+ "crypto/rand"
+ "io"
+ "math/big"
+)
+
+// IsSafePrime reports whether p is (probably) a safe prime.
+// The prime p=2*q+1 is safe prime if both p and q are primes.
+// Note that ProbablyPrime is not suitable for judging primes
+// that an adversary may have crafted to fool the test.
+func IsSafePrime(p *big.Int) bool {
+ pdiv2 := new(big.Int).Rsh(p, 1)
+ return p.ProbablyPrime(20) && pdiv2.ProbablyPrime(20)
+}
+
+// SafePrime returns a number of the given bit length that is a safe prime with high probability.
+// The number returned p=2*q+1 is a safe prime if both p and q are primes.
+// SafePrime will return error for any error returned by rand.Read or if bits < 2.
+func SafePrime(random io.Reader, bits int) (*big.Int, error) {
+ one := big.NewInt(1)
+ p := new(big.Int)
+ for {
+ q, err := rand.Prime(random, bits-1)
+ if err != nil {
+ return nil, err
+ }
+ p.Lsh(q, 1).Add(p, one)
+ if p.ProbablyPrime(20) {
+ return p, nil
+ }
+ }
+}
diff --git a/vendor/github.com/cloudflare/circl/math/wnaf.go b/vendor/github.com/cloudflare/circl/math/wnaf.go
new file mode 100644
index 000000000..94a1ec504
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/math/wnaf.go
@@ -0,0 +1,84 @@
+// Package math provides some utility functions for big integers.
+package math
+
+import "math/big"
+
+// SignedDigit obtains the signed-digit recoding of n and returns a list L of
+// digits such that n = sum( L[i]*2^(i*(w-1)) ), and each L[i] is an odd number
+// in the set {±1, ±3, ..., ±2^(w-1)-1}. The third parameter ensures that the
+// output has ceil(l/(w-1)) digits.
+//
+// Restrictions:
+// - n is odd and n > 0.
+// - 1 < w < 32.
+// - l >= bit length of n.
+//
+// References:
+// - Alg.6 in "Exponent Recoding and Regular Exponentiation Algorithms"
+// by Joye-Tunstall. http://doi.org/10.1007/978-3-642-02384-2_21
+// - Alg.6 in "Selecting Elliptic Curves for Cryptography: An Efficiency and
+// Security Analysis" by Bos et al. http://doi.org/10.1007/s13389-015-0097-y
+func SignedDigit(n *big.Int, w, l uint) []int32 {
+ if n.Sign() <= 0 || n.Bit(0) == 0 {
+ panic("n must be non-zero, odd, and positive")
+ }
+ if w <= 1 || w >= 32 {
+ panic("Verify that 1 < w < 32")
+ }
+ if uint(n.BitLen()) > l {
+ panic("n is too big to fit in l digits")
+ }
+ lenN := (l + (w - 1) - 1) / (w - 1) // ceil(l/(w-1))
+ L := make([]int32, lenN+1)
+ var k, v big.Int
+ k.Set(n)
+
+ var i uint
+ for i = 0; i < lenN; i++ {
+ words := k.Bits()
+ value := int32(words[0] & ((1 << w) - 1))
+ value -= int32(1) << (w - 1)
+ L[i] = value
+ v.SetInt64(int64(value))
+ k.Sub(&k, &v)
+ k.Rsh(&k, w-1)
+ }
+ L[i] = int32(k.Int64())
+ return L
+}
+
+// OmegaNAF obtains the window-w Non-Adjacent Form of a positive number n and
+// 1 < w < 32. The returned slice L holds n = sum( L[i]*2^i ).
+//
+// Reference:
+// - Alg.9 "Efficient arithmetic on Koblitz curves" by Solinas.
+// http://doi.org/10.1023/A:1008306223194
+func OmegaNAF(n *big.Int, w uint) (L []int32) {
+ if n.Sign() < 0 {
+ panic("n must be positive")
+ }
+ if w <= 1 || w >= 32 {
+ panic("Verify that 1 < w < 32")
+ }
+
+ L = make([]int32, n.BitLen()+1)
+ var k, v big.Int
+ k.Set(n)
+
+ i := 0
+ for ; k.Sign() > 0; i++ {
+ value := int32(0)
+ if k.Bit(0) == 1 {
+ words := k.Bits()
+ value = int32(words[0] & ((1 << w) - 1))
+ if value >= (int32(1) << (w - 1)) {
+ value -= int32(1) << w
+ }
+ v.SetInt64(int64(value))
+ k.Sub(&k, &v)
+ }
+ L[i] = value
+ k.Rsh(&k, 1)
+ }
+ return L[:i]
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/ed25519.go b/vendor/github.com/cloudflare/circl/sign/ed25519/ed25519.go
new file mode 100644
index 000000000..2c73c26fb
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed25519/ed25519.go
@@ -0,0 +1,453 @@
+// Package ed25519 implements Ed25519 signature scheme as described in RFC-8032.
+//
+// This package provides optimized implementations of the three signature
+// variants and maintaining closer compatibility with crypto/ed25519.
+//
+// | Scheme Name | Sign Function | Verification | Context |
+// |-------------|-------------------|---------------|-------------------|
+// | Ed25519 | Sign | Verify | None |
+// | Ed25519Ph | SignPh | VerifyPh | Yes, can be empty |
+// | Ed25519Ctx | SignWithCtx | VerifyWithCtx | Yes, non-empty |
+// | All above | (PrivateKey).Sign | VerifyAny | As above |
+//
+// Specific functions for sign and verify are defined. A generic signing
+// function for all schemes is available through the crypto.Signer interface,
+// which is implemented by the PrivateKey type. A correspond all-in-one
+// verification method is provided by the VerifyAny function.
+//
+// Signing with Ed25519Ph or Ed25519Ctx requires a context string for domain
+// separation. This parameter is passed using a SignerOptions struct defined
+// in this package. While Ed25519Ph accepts an empty context, Ed25519Ctx
+// enforces non-empty context strings.
+//
+// # Compatibility with crypto.ed25519
+//
+// These functions are compatible with the “Ed25519” function defined in
+// RFC-8032. However, unlike RFC 8032's formulation, this package's private
+// key representation includes a public key suffix to make multiple signing
+// operations with the same key more efficient. This package refers to the
+// RFC-8032 private key as the “seed”.
+//
+// References
+//
+// - RFC-8032: https://rfc-editor.org/rfc/rfc8032.txt
+// - Ed25519: https://ed25519.cr.yp.to/
+// - EdDSA: High-speed high-security signatures. https://doi.org/10.1007/s13389-012-0027-1
+package ed25519
+
+import (
+ "bytes"
+ "crypto"
+ cryptoRand "crypto/rand"
+ "crypto/sha512"
+ "crypto/subtle"
+ "errors"
+ "fmt"
+ "io"
+ "strconv"
+
+ "github.com/cloudflare/circl/sign"
+)
+
+const (
+ // ContextMaxSize is the maximum length (in bytes) allowed for context.
+ ContextMaxSize = 255
+ // PublicKeySize is the size, in bytes, of public keys as used in this package.
+ PublicKeySize = 32
+ // PrivateKeySize is the size, in bytes, of private keys as used in this package.
+ PrivateKeySize = 64
+ // SignatureSize is the size, in bytes, of signatures generated and verified by this package.
+ SignatureSize = 64
+ // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
+ SeedSize = 32
+)
+
+const (
+ paramB = 256 / 8 // Size of keys in bytes.
+)
+
+// SignerOptions implements crypto.SignerOpts and augments with parameters
+// that are specific to the Ed25519 signature schemes.
+type SignerOptions struct {
+ // Hash must be crypto.Hash(0) for Ed25519/Ed25519ctx, or crypto.SHA512
+ // for Ed25519ph.
+ crypto.Hash
+
+ // Context is an optional domain separation string for Ed25519ph and a
+ // must for Ed25519ctx. Its length must be less or equal than 255 bytes.
+ Context string
+
+ // Scheme is an identifier for choosing a signature scheme. The zero value
+ // is ED25519.
+ Scheme SchemeID
+}
+
+// SchemeID is an identifier for each signature scheme.
+type SchemeID uint
+
+const (
+ ED25519 SchemeID = iota
+ ED25519Ph
+ ED25519Ctx
+)
+
+// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer.
+type PrivateKey []byte
+
+// Equal reports whether priv and x have the same value.
+func (priv PrivateKey) Equal(x crypto.PrivateKey) bool {
+ xx, ok := x.(PrivateKey)
+ return ok && subtle.ConstantTimeCompare(priv, xx) == 1
+}
+
+// Public returns the PublicKey corresponding to priv.
+func (priv PrivateKey) Public() crypto.PublicKey {
+ publicKey := make(PublicKey, PublicKeySize)
+ copy(publicKey, priv[SeedSize:])
+ return publicKey
+}
+
+// Seed returns the private key seed corresponding to priv. It is provided for
+// interoperability with RFC 8032. RFC 8032's private keys correspond to seeds
+// in this package.
+func (priv PrivateKey) Seed() []byte {
+ seed := make([]byte, SeedSize)
+ copy(seed, priv[:SeedSize])
+ return seed
+}
+
+func (priv PrivateKey) Scheme() sign.Scheme { return sch }
+
+func (pub PublicKey) Scheme() sign.Scheme { return sch }
+
+func (priv PrivateKey) MarshalBinary() (data []byte, err error) {
+ privateKey := make(PrivateKey, PrivateKeySize)
+ copy(privateKey, priv)
+ return privateKey, nil
+}
+
+func (pub PublicKey) MarshalBinary() (data []byte, err error) {
+ publicKey := make(PublicKey, PublicKeySize)
+ copy(publicKey, pub)
+ return publicKey, nil
+}
+
+// Equal reports whether pub and x have the same value.
+func (pub PublicKey) Equal(x crypto.PublicKey) bool {
+ xx, ok := x.(PublicKey)
+ return ok && bytes.Equal(pub, xx)
+}
+
+// Sign creates a signature of a message with priv key.
+// This function is compatible with crypto.ed25519 and also supports the
+// three signature variants defined in RFC-8032, namely Ed25519 (or pure
+// EdDSA), Ed25519Ph, and Ed25519Ctx.
+// The opts.HashFunc() must return zero to specify either Ed25519 or Ed25519Ctx
+// variant. This can be achieved by passing crypto.Hash(0) as the value for
+// opts.
+// The opts.HashFunc() must return SHA512 to specify the Ed25519Ph variant.
+// This can be achieved by passing crypto.SHA512 as the value for opts.
+// Use a SignerOptions struct (defined in this package) to pass a context
+// string for signing.
+func (priv PrivateKey) Sign(
+ rand io.Reader,
+ message []byte,
+ opts crypto.SignerOpts,
+) (signature []byte, err error) {
+ var ctx string
+ var scheme SchemeID
+ if o, ok := opts.(SignerOptions); ok {
+ ctx = o.Context
+ scheme = o.Scheme
+ }
+
+ switch true {
+ case scheme == ED25519 && opts.HashFunc() == crypto.Hash(0):
+ return Sign(priv, message), nil
+ case scheme == ED25519Ph && opts.HashFunc() == crypto.SHA512:
+ return SignPh(priv, message, ctx), nil
+ case scheme == ED25519Ctx && opts.HashFunc() == crypto.Hash(0) && len(ctx) > 0:
+ return SignWithCtx(priv, message, ctx), nil
+ default:
+ return nil, errors.New("ed25519: bad hash algorithm")
+ }
+}
+
+// GenerateKey generates a public/private key pair using entropy from rand.
+// If rand is nil, crypto/rand.Reader will be used.
+func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) {
+ if rand == nil {
+ rand = cryptoRand.Reader
+ }
+
+ seed := make([]byte, SeedSize)
+ if _, err := io.ReadFull(rand, seed); err != nil {
+ return nil, nil, err
+ }
+
+ privateKey := NewKeyFromSeed(seed)
+ publicKey := make(PublicKey, PublicKeySize)
+ copy(publicKey, privateKey[SeedSize:])
+
+ return publicKey, privateKey, nil
+}
+
+// NewKeyFromSeed calculates a private key from a seed. It will panic if
+// len(seed) is not SeedSize. This function is provided for interoperability
+// with RFC 8032. RFC 8032's private keys correspond to seeds in this
+// package.
+func NewKeyFromSeed(seed []byte) PrivateKey {
+ privateKey := make(PrivateKey, PrivateKeySize)
+ newKeyFromSeed(privateKey, seed)
+ return privateKey
+}
+
+func newKeyFromSeed(privateKey, seed []byte) {
+ if l := len(seed); l != SeedSize {
+ panic("ed25519: bad seed length: " + strconv.Itoa(l))
+ }
+ var P pointR1
+ k := sha512.Sum512(seed)
+ clamp(k[:])
+ reduceModOrder(k[:paramB], false)
+ P.fixedMult(k[:paramB])
+ copy(privateKey[:SeedSize], seed)
+ _ = P.ToBytes(privateKey[SeedSize:])
+}
+
+func signAll(signature []byte, privateKey PrivateKey, message, ctx []byte, preHash bool) {
+ if l := len(privateKey); l != PrivateKeySize {
+ panic("ed25519: bad private key length: " + strconv.Itoa(l))
+ }
+
+ H := sha512.New()
+ var PHM []byte
+
+ if preHash {
+ _, _ = H.Write(message)
+ PHM = H.Sum(nil)
+ H.Reset()
+ } else {
+ PHM = message
+ }
+
+ // 1. Hash the 32-byte private key using SHA-512.
+ _, _ = H.Write(privateKey[:SeedSize])
+ h := H.Sum(nil)
+ clamp(h[:])
+ prefix, s := h[paramB:], h[:paramB]
+
+ // 2. Compute SHA-512(dom2(F, C) || prefix || PH(M))
+ H.Reset()
+
+ writeDom(H, ctx, preHash)
+
+ _, _ = H.Write(prefix)
+ _, _ = H.Write(PHM)
+ r := H.Sum(nil)
+ reduceModOrder(r[:], true)
+
+ // 3. Compute the point [r]B.
+ var P pointR1
+ P.fixedMult(r[:paramB])
+ R := (&[paramB]byte{})[:]
+ if err := P.ToBytes(R); err != nil {
+ panic(err)
+ }
+
+ // 4. Compute SHA512(dom2(F, C) || R || A || PH(M)).
+ H.Reset()
+
+ writeDom(H, ctx, preHash)
+
+ _, _ = H.Write(R)
+ _, _ = H.Write(privateKey[SeedSize:])
+ _, _ = H.Write(PHM)
+ hRAM := H.Sum(nil)
+
+ reduceModOrder(hRAM[:], true)
+
+ // 5. Compute S = (r + k * s) mod order.
+ S := (&[paramB]byte{})[:]
+ calculateS(S, r[:paramB], hRAM[:paramB], s)
+
+ // 6. The signature is the concatenation of R and S.
+ copy(signature[:paramB], R[:])
+ copy(signature[paramB:], S[:])
+}
+
+// Sign signs the message with privateKey and returns a signature.
+// This function supports the signature variant defined in RFC-8032: Ed25519,
+// also known as the pure version of EdDSA.
+// It will panic if len(privateKey) is not PrivateKeySize.
+func Sign(privateKey PrivateKey, message []byte) []byte {
+ signature := make([]byte, SignatureSize)
+ signAll(signature, privateKey, message, []byte(""), false)
+ return signature
+}
+
+// SignPh creates a signature of a message with private key and context.
+// This function supports the signature variant defined in RFC-8032: Ed25519ph,
+// meaning it internally hashes the message using SHA-512, and optionally
+// accepts a context string.
+// It will panic if len(privateKey) is not PrivateKeySize.
+// Context could be passed to this function, which length should be no more than
+// ContextMaxSize=255. It can be empty.
+func SignPh(privateKey PrivateKey, message []byte, ctx string) []byte {
+ if len(ctx) > ContextMaxSize {
+ panic(fmt.Errorf("ed25519: bad context length: %v", len(ctx)))
+ }
+
+ signature := make([]byte, SignatureSize)
+ signAll(signature, privateKey, message, []byte(ctx), true)
+ return signature
+}
+
+// SignWithCtx creates a signature of a message with private key and context.
+// This function supports the signature variant defined in RFC-8032: Ed25519ctx,
+// meaning it accepts a non-empty context string.
+// It will panic if len(privateKey) is not PrivateKeySize.
+// Context must be passed to this function, which length should be no more than
+// ContextMaxSize=255 and cannot be empty.
+func SignWithCtx(privateKey PrivateKey, message []byte, ctx string) []byte {
+ if len(ctx) == 0 || len(ctx) > ContextMaxSize {
+ panic(fmt.Errorf("ed25519: bad context length: %v > %v", len(ctx), ContextMaxSize))
+ }
+
+ signature := make([]byte, SignatureSize)
+ signAll(signature, privateKey, message, []byte(ctx), false)
+ return signature
+}
+
+func verify(public PublicKey, message, signature, ctx []byte, preHash bool) bool {
+ if len(public) != PublicKeySize ||
+ len(signature) != SignatureSize ||
+ !isLessThanOrder(signature[paramB:]) {
+ return false
+ }
+
+ var P pointR1
+ if ok := P.FromBytes(public); !ok {
+ return false
+ }
+
+ H := sha512.New()
+ var PHM []byte
+
+ if preHash {
+ _, _ = H.Write(message)
+ PHM = H.Sum(nil)
+ H.Reset()
+ } else {
+ PHM = message
+ }
+
+ R := signature[:paramB]
+
+ writeDom(H, ctx, preHash)
+
+ _, _ = H.Write(R)
+ _, _ = H.Write(public)
+ _, _ = H.Write(PHM)
+ hRAM := H.Sum(nil)
+ reduceModOrder(hRAM[:], true)
+
+ var Q pointR1
+ encR := (&[paramB]byte{})[:]
+ P.neg()
+ Q.doubleMult(&P, signature[paramB:], hRAM[:paramB])
+ _ = Q.ToBytes(encR)
+ return bytes.Equal(R, encR)
+}
+
+// VerifyAny returns true if the signature is valid. Failure cases are invalid
+// signature, or when the public key cannot be decoded.
+// This function supports all the three signature variants defined in RFC-8032,
+// namely Ed25519 (or pure EdDSA), Ed25519Ph, and Ed25519Ctx.
+// The opts.HashFunc() must return zero to specify either Ed25519 or Ed25519Ctx
+// variant. This can be achieved by passing crypto.Hash(0) as the value for opts.
+// The opts.HashFunc() must return SHA512 to specify the Ed25519Ph variant.
+// This can be achieved by passing crypto.SHA512 as the value for opts.
+// Use a SignerOptions struct to pass a context string for signing.
+func VerifyAny(public PublicKey, message, signature []byte, opts crypto.SignerOpts) bool {
+ var ctx string
+ var scheme SchemeID
+ if o, ok := opts.(SignerOptions); ok {
+ ctx = o.Context
+ scheme = o.Scheme
+ }
+
+ switch true {
+ case scheme == ED25519 && opts.HashFunc() == crypto.Hash(0):
+ return Verify(public, message, signature)
+ case scheme == ED25519Ph && opts.HashFunc() == crypto.SHA512:
+ return VerifyPh(public, message, signature, ctx)
+ case scheme == ED25519Ctx && opts.HashFunc() == crypto.Hash(0) && len(ctx) > 0:
+ return VerifyWithCtx(public, message, signature, ctx)
+ default:
+ return false
+ }
+}
+
+// Verify returns true if the signature is valid. Failure cases are invalid
+// signature, or when the public key cannot be decoded.
+// This function supports the signature variant defined in RFC-8032: Ed25519,
+// also known as the pure version of EdDSA.
+func Verify(public PublicKey, message, signature []byte) bool {
+ return verify(public, message, signature, []byte(""), false)
+}
+
+// VerifyPh returns true if the signature is valid. Failure cases are invalid
+// signature, or when the public key cannot be decoded.
+// This function supports the signature variant defined in RFC-8032: Ed25519ph,
+// meaning it internally hashes the message using SHA-512.
+// Context could be passed to this function, which length should be no more than
+// 255. It can be empty.
+func VerifyPh(public PublicKey, message, signature []byte, ctx string) bool {
+ return verify(public, message, signature, []byte(ctx), true)
+}
+
+// VerifyWithCtx returns true if the signature is valid. Failure cases are invalid
+// signature, or when the public key cannot be decoded, or when context is
+// not provided.
+// This function supports the signature variant defined in RFC-8032: Ed25519ctx,
+// meaning it does not handle prehashed messages. Non-empty context string must be
+// provided, and must not be more than 255 of length.
+func VerifyWithCtx(public PublicKey, message, signature []byte, ctx string) bool {
+ if len(ctx) == 0 || len(ctx) > ContextMaxSize {
+ return false
+ }
+
+ return verify(public, message, signature, []byte(ctx), false)
+}
+
+func clamp(k []byte) {
+ k[0] &= 248
+ k[paramB-1] = (k[paramB-1] & 127) | 64
+}
+
+// isLessThanOrder returns true if 0 <= x < order.
+func isLessThanOrder(x []byte) bool {
+ i := len(order) - 1
+ for i > 0 && x[i] == order[i] {
+ i--
+ }
+ return x[i] < order[i]
+}
+
+func writeDom(h io.Writer, ctx []byte, preHash bool) {
+ dom2 := "SigEd25519 no Ed25519 collisions"
+
+ if len(ctx) > 0 {
+ _, _ = h.Write([]byte(dom2))
+ if preHash {
+ _, _ = h.Write([]byte{byte(0x01), byte(len(ctx))})
+ } else {
+ _, _ = h.Write([]byte{byte(0x00), byte(len(ctx))})
+ }
+ _, _ = h.Write(ctx)
+ } else if preHash {
+ _, _ = h.Write([]byte(dom2))
+ _, _ = h.Write([]byte{0x01, 0x00})
+ }
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/modular.go b/vendor/github.com/cloudflare/circl/sign/ed25519/modular.go
new file mode 100644
index 000000000..10efafdca
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed25519/modular.go
@@ -0,0 +1,175 @@
+package ed25519
+
+import (
+ "encoding/binary"
+ "math/bits"
+)
+
+var order = [paramB]byte{
+ 0xed, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58,
+ 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10,
+}
+
+// isLessThan returns true if 0 <= x < y, and assumes that slices have the same length.
+func isLessThan(x, y []byte) bool {
+ i := len(x) - 1
+ for i > 0 && x[i] == y[i] {
+ i--
+ }
+ return x[i] < y[i]
+}
+
+// reduceModOrder calculates k = k mod order of the curve.
+func reduceModOrder(k []byte, is512Bit bool) {
+ var X [((2 * paramB) * 8) / 64]uint64
+ numWords := len(k) >> 3
+ for i := 0; i < numWords; i++ {
+ X[i] = binary.LittleEndian.Uint64(k[i*8 : (i+1)*8])
+ }
+ red512(&X, is512Bit)
+ for i := 0; i < numWords; i++ {
+ binary.LittleEndian.PutUint64(k[i*8:(i+1)*8], X[i])
+ }
+}
+
+// red512 calculates x = x mod Order of the curve.
+func red512(x *[8]uint64, full bool) {
+ // Implementation of Algs.(14.47)+(14.52) of Handbook of Applied
+ // Cryptography, by A. Menezes, P. van Oorschot, and S. Vanstone.
+ const (
+ ell0 = uint64(0x5812631a5cf5d3ed)
+ ell1 = uint64(0x14def9dea2f79cd6)
+ ell160 = uint64(0x812631a5cf5d3ed0)
+ ell161 = uint64(0x4def9dea2f79cd65)
+ ell162 = uint64(0x0000000000000001)
+ )
+
+ var c0, c1, c2, c3 uint64
+ r0, r1, r2, r3, r4 := x[0], x[1], x[2], x[3], uint64(0)
+
+ if full {
+ q0, q1, q2, q3 := x[4], x[5], x[6], x[7]
+
+ for i := 0; i < 3; i++ {
+ h0, s0 := bits.Mul64(q0, ell160)
+ h1, s1 := bits.Mul64(q1, ell160)
+ h2, s2 := bits.Mul64(q2, ell160)
+ h3, s3 := bits.Mul64(q3, ell160)
+
+ s1, c0 = bits.Add64(h0, s1, 0)
+ s2, c1 = bits.Add64(h1, s2, c0)
+ s3, c2 = bits.Add64(h2, s3, c1)
+ s4, _ := bits.Add64(h3, 0, c2)
+
+ h0, l0 := bits.Mul64(q0, ell161)
+ h1, l1 := bits.Mul64(q1, ell161)
+ h2, l2 := bits.Mul64(q2, ell161)
+ h3, l3 := bits.Mul64(q3, ell161)
+
+ l1, c0 = bits.Add64(h0, l1, 0)
+ l2, c1 = bits.Add64(h1, l2, c0)
+ l3, c2 = bits.Add64(h2, l3, c1)
+ l4, _ := bits.Add64(h3, 0, c2)
+
+ s1, c0 = bits.Add64(s1, l0, 0)
+ s2, c1 = bits.Add64(s2, l1, c0)
+ s3, c2 = bits.Add64(s3, l2, c1)
+ s4, c3 = bits.Add64(s4, l3, c2)
+ s5, s6 := bits.Add64(l4, 0, c3)
+
+ s2, c0 = bits.Add64(s2, q0, 0)
+ s3, c1 = bits.Add64(s3, q1, c0)
+ s4, c2 = bits.Add64(s4, q2, c1)
+ s5, c3 = bits.Add64(s5, q3, c2)
+ s6, s7 := bits.Add64(s6, 0, c3)
+
+ q := q0 | q1 | q2 | q3
+ m := -((q | -q) >> 63) // if q=0 then m=0...0 else m=1..1
+ s0 &= m
+ s1 &= m
+ s2 &= m
+ s3 &= m
+ q0, q1, q2, q3 = s4, s5, s6, s7
+
+ if (i+1)%2 == 0 {
+ r0, c0 = bits.Add64(r0, s0, 0)
+ r1, c1 = bits.Add64(r1, s1, c0)
+ r2, c2 = bits.Add64(r2, s2, c1)
+ r3, c3 = bits.Add64(r3, s3, c2)
+ r4, _ = bits.Add64(r4, 0, c3)
+ } else {
+ r0, c0 = bits.Sub64(r0, s0, 0)
+ r1, c1 = bits.Sub64(r1, s1, c0)
+ r2, c2 = bits.Sub64(r2, s2, c1)
+ r3, c3 = bits.Sub64(r3, s3, c2)
+ r4, _ = bits.Sub64(r4, 0, c3)
+ }
+ }
+
+ m := -(r4 >> 63)
+ r0, c0 = bits.Add64(r0, m&ell160, 0)
+ r1, c1 = bits.Add64(r1, m&ell161, c0)
+ r2, c2 = bits.Add64(r2, m&ell162, c1)
+ r3, c3 = bits.Add64(r3, 0, c2)
+ r4, _ = bits.Add64(r4, m&1, c3)
+ x[4], x[5], x[6], x[7] = 0, 0, 0, 0
+ }
+
+ q0 := (r4 << 4) | (r3 >> 60)
+ r3 &= (uint64(1) << 60) - 1
+
+ h0, s0 := bits.Mul64(ell0, q0)
+ h1, s1 := bits.Mul64(ell1, q0)
+ s1, c0 = bits.Add64(h0, s1, 0)
+ s2, _ := bits.Add64(h1, 0, c0)
+
+ r0, c0 = bits.Sub64(r0, s0, 0)
+ r1, c1 = bits.Sub64(r1, s1, c0)
+ r2, c2 = bits.Sub64(r2, s2, c1)
+ r3, _ = bits.Sub64(r3, 0, c2)
+
+ x[0], x[1], x[2], x[3] = r0, r1, r2, r3
+}
+
+// calculateS performs s = r+k*a mod Order of the curve.
+func calculateS(s, r, k, a []byte) {
+ K := [4]uint64{
+ binary.LittleEndian.Uint64(k[0*8 : 1*8]),
+ binary.LittleEndian.Uint64(k[1*8 : 2*8]),
+ binary.LittleEndian.Uint64(k[2*8 : 3*8]),
+ binary.LittleEndian.Uint64(k[3*8 : 4*8]),
+ }
+ S := [8]uint64{
+ binary.LittleEndian.Uint64(r[0*8 : 1*8]),
+ binary.LittleEndian.Uint64(r[1*8 : 2*8]),
+ binary.LittleEndian.Uint64(r[2*8 : 3*8]),
+ binary.LittleEndian.Uint64(r[3*8 : 4*8]),
+ }
+ var c3 uint64
+ for i := range K {
+ ai := binary.LittleEndian.Uint64(a[i*8 : (i+1)*8])
+
+ h0, l0 := bits.Mul64(K[0], ai)
+ h1, l1 := bits.Mul64(K[1], ai)
+ h2, l2 := bits.Mul64(K[2], ai)
+ h3, l3 := bits.Mul64(K[3], ai)
+
+ l1, c0 := bits.Add64(h0, l1, 0)
+ l2, c1 := bits.Add64(h1, l2, c0)
+ l3, c2 := bits.Add64(h2, l3, c1)
+ l4, _ := bits.Add64(h3, 0, c2)
+
+ S[i+0], c0 = bits.Add64(S[i+0], l0, 0)
+ S[i+1], c1 = bits.Add64(S[i+1], l1, c0)
+ S[i+2], c2 = bits.Add64(S[i+2], l2, c1)
+ S[i+3], c3 = bits.Add64(S[i+3], l3, c2)
+ S[i+4], _ = bits.Add64(S[i+4], l4, c3)
+ }
+ red512(&S, true)
+ binary.LittleEndian.PutUint64(s[0*8:1*8], S[0])
+ binary.LittleEndian.PutUint64(s[1*8:2*8], S[1])
+ binary.LittleEndian.PutUint64(s[2*8:3*8], S[2])
+ binary.LittleEndian.PutUint64(s[3*8:4*8], S[3])
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/mult.go b/vendor/github.com/cloudflare/circl/sign/ed25519/mult.go
new file mode 100644
index 000000000..3216aae30
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed25519/mult.go
@@ -0,0 +1,180 @@
+package ed25519
+
+import (
+ "crypto/subtle"
+ "encoding/binary"
+ "math/bits"
+
+ "github.com/cloudflare/circl/internal/conv"
+ "github.com/cloudflare/circl/math"
+ fp "github.com/cloudflare/circl/math/fp25519"
+)
+
+var paramD = fp.Elt{
+ 0xa3, 0x78, 0x59, 0x13, 0xca, 0x4d, 0xeb, 0x75,
+ 0xab, 0xd8, 0x41, 0x41, 0x4d, 0x0a, 0x70, 0x00,
+ 0x98, 0xe8, 0x79, 0x77, 0x79, 0x40, 0xc7, 0x8c,
+ 0x73, 0xfe, 0x6f, 0x2b, 0xee, 0x6c, 0x03, 0x52,
+}
+
+// mLSBRecoding parameters.
+const (
+ fxT = 257
+ fxV = 2
+ fxW = 3
+ fx2w1 = 1 << (uint(fxW) - 1)
+ numWords64 = (paramB * 8 / 64)
+)
+
+// mLSBRecoding is the odd-only modified LSB-set.
+//
+// Reference:
+//
+// "Efficient and secure algorithms for GLV-based scalar multiplication and
+// their implementation on GLV–GLS curves" by (Faz-Hernandez et al.)
+// http://doi.org/10.1007/s13389-014-0085-7.
+func mLSBRecoding(L []int8, k []byte) {
+ const ee = (fxT + fxW*fxV - 1) / (fxW * fxV)
+ const dd = ee * fxV
+ const ll = dd * fxW
+ if len(L) == (ll + 1) {
+ var m [numWords64 + 1]uint64
+ for i := 0; i < numWords64; i++ {
+ m[i] = binary.LittleEndian.Uint64(k[8*i : 8*i+8])
+ }
+ condAddOrderN(&m)
+ L[dd-1] = 1
+ for i := 0; i < dd-1; i++ {
+ kip1 := (m[(i+1)/64] >> (uint(i+1) % 64)) & 0x1
+ L[i] = int8(kip1<<1) - 1
+ }
+ { // right-shift by d
+ right := uint(dd % 64)
+ left := uint(64) - right
+ lim := ((numWords64+1)*64 - dd) / 64
+ j := dd / 64
+ for i := 0; i < lim; i++ {
+ m[i] = (m[i+j] >> right) | (m[i+j+1] << left)
+ }
+ m[lim] = m[lim+j] >> right
+ }
+ for i := dd; i < ll; i++ {
+ L[i] = L[i%dd] * int8(m[0]&0x1)
+ div2subY(m[:], int64(L[i]>>1), numWords64)
+ }
+ L[ll] = int8(m[0])
+ }
+}
+
+// absolute returns always a positive value.
+func absolute(x int32) int32 {
+ mask := x >> 31
+ return (x + mask) ^ mask
+}
+
+// condAddOrderN updates x = x+order if x is even, otherwise x remains unchanged.
+func condAddOrderN(x *[numWords64 + 1]uint64) {
+ isOdd := (x[0] & 0x1) - 1
+ c := uint64(0)
+ for i := 0; i < numWords64; i++ {
+ orderWord := binary.LittleEndian.Uint64(order[8*i : 8*i+8])
+ o := isOdd & orderWord
+ x0, c0 := bits.Add64(x[i], o, c)
+ x[i] = x0
+ c = c0
+ }
+ x[numWords64], _ = bits.Add64(x[numWords64], 0, c)
+}
+
+// div2subY update x = (x/2) - y.
+func div2subY(x []uint64, y int64, l int) {
+ s := uint64(y >> 63)
+ for i := 0; i < l-1; i++ {
+ x[i] = (x[i] >> 1) | (x[i+1] << 63)
+ }
+ x[l-1] = (x[l-1] >> 1)
+
+ b := uint64(0)
+ x0, b0 := bits.Sub64(x[0], uint64(y), b)
+ x[0] = x0
+ b = b0
+ for i := 1; i < l-1; i++ {
+ x0, b0 := bits.Sub64(x[i], s, b)
+ x[i] = x0
+ b = b0
+ }
+ x[l-1], _ = bits.Sub64(x[l-1], s, b)
+}
+
+func (P *pointR1) fixedMult(scalar []byte) {
+ if len(scalar) != paramB {
+ panic("wrong scalar size")
+ }
+ const ee = (fxT + fxW*fxV - 1) / (fxW * fxV)
+ const dd = ee * fxV
+ const ll = dd * fxW
+
+ L := make([]int8, ll+1)
+ mLSBRecoding(L[:], scalar)
+ S := &pointR3{}
+ P.SetIdentity()
+ for ii := ee - 1; ii >= 0; ii-- {
+ P.double()
+ for j := 0; j < fxV; j++ {
+ dig := L[fxW*dd-j*ee+ii-ee]
+ for i := (fxW-1)*dd - j*ee + ii - ee; i >= (2*dd - j*ee + ii - ee); i = i - dd {
+ dig = 2*dig + L[i]
+ }
+ idx := absolute(int32(dig))
+ sig := L[dd-j*ee+ii-ee]
+ Tabj := &tabSign[fxV-j-1]
+ for k := 0; k < fx2w1; k++ {
+ S.cmov(&Tabj[k], subtle.ConstantTimeEq(int32(k), idx))
+ }
+ S.cneg(subtle.ConstantTimeEq(int32(sig), -1))
+ P.mixAdd(S)
+ }
+ }
+}
+
+const (
+ omegaFix = 7
+ omegaVar = 5
+)
+
+// doubleMult returns P=mG+nQ.
+func (P *pointR1) doubleMult(Q *pointR1, m, n []byte) {
+ nafFix := math.OmegaNAF(conv.BytesLe2BigInt(m), omegaFix)
+ nafVar := math.OmegaNAF(conv.BytesLe2BigInt(n), omegaVar)
+
+ if len(nafFix) > len(nafVar) {
+ nafVar = append(nafVar, make([]int32, len(nafFix)-len(nafVar))...)
+ } else if len(nafFix) < len(nafVar) {
+ nafFix = append(nafFix, make([]int32, len(nafVar)-len(nafFix))...)
+ }
+
+ var TabQ [1 << (omegaVar - 2)]pointR2
+ Q.oddMultiples(TabQ[:])
+ P.SetIdentity()
+ for i := len(nafFix) - 1; i >= 0; i-- {
+ P.double()
+ // Generator point
+ if nafFix[i] != 0 {
+ idxM := absolute(nafFix[i]) >> 1
+ R := tabVerif[idxM]
+ if nafFix[i] < 0 {
+ R.neg()
+ }
+ P.mixAdd(&R)
+ }
+ // Variable input point
+ if nafVar[i] != 0 {
+ idxN := absolute(nafVar[i]) >> 1
+ S := TabQ[idxN]
+ if nafVar[i] < 0 {
+ S.neg()
+ }
+ P.add(&S)
+ }
+ }
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/point.go b/vendor/github.com/cloudflare/circl/sign/ed25519/point.go
new file mode 100644
index 000000000..374a69503
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed25519/point.go
@@ -0,0 +1,195 @@
+package ed25519
+
+import fp "github.com/cloudflare/circl/math/fp25519"
+
+type (
+ pointR1 struct{ x, y, z, ta, tb fp.Elt }
+ pointR2 struct {
+ pointR3
+ z2 fp.Elt
+ }
+)
+type pointR3 struct{ addYX, subYX, dt2 fp.Elt }
+
+func (P *pointR1) neg() {
+ fp.Neg(&P.x, &P.x)
+ fp.Neg(&P.ta, &P.ta)
+}
+
+func (P *pointR1) SetIdentity() {
+ P.x = fp.Elt{}
+ fp.SetOne(&P.y)
+ fp.SetOne(&P.z)
+ P.ta = fp.Elt{}
+ P.tb = fp.Elt{}
+}
+
+func (P *pointR1) toAffine() {
+ fp.Inv(&P.z, &P.z)
+ fp.Mul(&P.x, &P.x, &P.z)
+ fp.Mul(&P.y, &P.y, &P.z)
+ fp.Modp(&P.x)
+ fp.Modp(&P.y)
+ fp.SetOne(&P.z)
+ P.ta = P.x
+ P.tb = P.y
+}
+
+func (P *pointR1) ToBytes(k []byte) error {
+ P.toAffine()
+ var x [fp.Size]byte
+ err := fp.ToBytes(k[:fp.Size], &P.y)
+ if err != nil {
+ return err
+ }
+ err = fp.ToBytes(x[:], &P.x)
+ if err != nil {
+ return err
+ }
+ b := x[0] & 1
+ k[paramB-1] = k[paramB-1] | (b << 7)
+ return nil
+}
+
+func (P *pointR1) FromBytes(k []byte) bool {
+ if len(k) != paramB {
+ panic("wrong size")
+ }
+ signX := k[paramB-1] >> 7
+ copy(P.y[:], k[:fp.Size])
+ P.y[fp.Size-1] &= 0x7F
+ p := fp.P()
+ if !isLessThan(P.y[:], p[:]) {
+ return false
+ }
+
+ one, u, v := &fp.Elt{}, &fp.Elt{}, &fp.Elt{}
+ fp.SetOne(one)
+ fp.Sqr(u, &P.y) // u = y^2
+ fp.Mul(v, u, ¶mD) // v = dy^2
+ fp.Sub(u, u, one) // u = y^2-1
+ fp.Add(v, v, one) // v = dy^2+1
+ isQR := fp.InvSqrt(&P.x, u, v) // x = sqrt(u/v)
+ if !isQR {
+ return false
+ }
+ fp.Modp(&P.x) // x = x mod p
+ if fp.IsZero(&P.x) && signX == 1 {
+ return false
+ }
+ if signX != (P.x[0] & 1) {
+ fp.Neg(&P.x, &P.x)
+ }
+ P.ta = P.x
+ P.tb = P.y
+ fp.SetOne(&P.z)
+ return true
+}
+
+// double calculates 2P for curves with A=-1.
+func (P *pointR1) double() {
+ Px, Py, Pz, Pta, Ptb := &P.x, &P.y, &P.z, &P.ta, &P.tb
+ a, b, c, e, f, g, h := Px, Py, Pz, Pta, Px, Py, Ptb
+ fp.Add(e, Px, Py) // x+y
+ fp.Sqr(a, Px) // A = x^2
+ fp.Sqr(b, Py) // B = y^2
+ fp.Sqr(c, Pz) // z^2
+ fp.Add(c, c, c) // C = 2*z^2
+ fp.Add(h, a, b) // H = A+B
+ fp.Sqr(e, e) // (x+y)^2
+ fp.Sub(e, e, h) // E = (x+y)^2-A-B
+ fp.Sub(g, b, a) // G = B-A
+ fp.Sub(f, c, g) // F = C-G
+ fp.Mul(Pz, f, g) // Z = F * G
+ fp.Mul(Px, e, f) // X = E * F
+ fp.Mul(Py, g, h) // Y = G * H, T = E * H
+}
+
+func (P *pointR1) mixAdd(Q *pointR3) {
+ fp.Add(&P.z, &P.z, &P.z) // D = 2*z1
+ P.coreAddition(Q)
+}
+
+func (P *pointR1) add(Q *pointR2) {
+ fp.Mul(&P.z, &P.z, &Q.z2) // D = 2*z1*z2
+ P.coreAddition(&Q.pointR3)
+}
+
+// coreAddition calculates P=P+Q for curves with A=-1.
+func (P *pointR1) coreAddition(Q *pointR3) {
+ Px, Py, Pz, Pta, Ptb := &P.x, &P.y, &P.z, &P.ta, &P.tb
+ addYX2, subYX2, dt2 := &Q.addYX, &Q.subYX, &Q.dt2
+ a, b, c, d, e, f, g, h := Px, Py, &fp.Elt{}, Pz, Pta, Px, Py, Ptb
+ fp.Mul(c, Pta, Ptb) // t1 = ta*tb
+ fp.Sub(h, Py, Px) // y1-x1
+ fp.Add(b, Py, Px) // y1+x1
+ fp.Mul(a, h, subYX2) // A = (y1-x1)*(y2-x2)
+ fp.Mul(b, b, addYX2) // B = (y1+x1)*(y2+x2)
+ fp.Mul(c, c, dt2) // C = 2*D*t1*t2
+ fp.Sub(e, b, a) // E = B-A
+ fp.Add(h, b, a) // H = B+A
+ fp.Sub(f, d, c) // F = D-C
+ fp.Add(g, d, c) // G = D+C
+ fp.Mul(Pz, f, g) // Z = F * G
+ fp.Mul(Px, e, f) // X = E * F
+ fp.Mul(Py, g, h) // Y = G * H, T = E * H
+}
+
+func (P *pointR1) oddMultiples(T []pointR2) {
+ var R pointR2
+ n := len(T)
+ T[0].fromR1(P)
+ _2P := *P
+ _2P.double()
+ R.fromR1(&_2P)
+ for i := 1; i < n; i++ {
+ P.add(&R)
+ T[i].fromR1(P)
+ }
+}
+
+func (P *pointR1) isEqual(Q *pointR1) bool {
+ l, r := &fp.Elt{}, &fp.Elt{}
+ fp.Mul(l, &P.x, &Q.z)
+ fp.Mul(r, &Q.x, &P.z)
+ fp.Sub(l, l, r)
+ b := fp.IsZero(l)
+ fp.Mul(l, &P.y, &Q.z)
+ fp.Mul(r, &Q.y, &P.z)
+ fp.Sub(l, l, r)
+ b = b && fp.IsZero(l)
+ fp.Mul(l, &P.ta, &P.tb)
+ fp.Mul(l, l, &Q.z)
+ fp.Mul(r, &Q.ta, &Q.tb)
+ fp.Mul(r, r, &P.z)
+ fp.Sub(l, l, r)
+ b = b && fp.IsZero(l)
+ return b
+}
+
+func (P *pointR3) neg() {
+ P.addYX, P.subYX = P.subYX, P.addYX
+ fp.Neg(&P.dt2, &P.dt2)
+}
+
+func (P *pointR2) fromR1(Q *pointR1) {
+ fp.Add(&P.addYX, &Q.y, &Q.x)
+ fp.Sub(&P.subYX, &Q.y, &Q.x)
+ fp.Mul(&P.dt2, &Q.ta, &Q.tb)
+ fp.Mul(&P.dt2, &P.dt2, ¶mD)
+ fp.Add(&P.dt2, &P.dt2, &P.dt2)
+ fp.Add(&P.z2, &Q.z, &Q.z)
+}
+
+func (P *pointR3) cneg(b int) {
+ t := &fp.Elt{}
+ fp.Cswap(&P.addYX, &P.subYX, uint(b))
+ fp.Neg(t, &P.dt2)
+ fp.Cmov(&P.dt2, t, uint(b))
+}
+
+func (P *pointR3) cmov(Q *pointR3, b int) {
+ fp.Cmov(&P.addYX, &Q.addYX, uint(b))
+ fp.Cmov(&P.subYX, &Q.subYX, uint(b))
+ fp.Cmov(&P.dt2, &Q.dt2, uint(b))
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey.go b/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey.go
new file mode 100644
index 000000000..c3505b67a
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey.go
@@ -0,0 +1,9 @@
+//go:build go1.13
+// +build go1.13
+
+package ed25519
+
+import cryptoEd25519 "crypto/ed25519"
+
+// PublicKey is the type of Ed25519 public keys.
+type PublicKey cryptoEd25519.PublicKey
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey112.go b/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey112.go
new file mode 100644
index 000000000..d57d86eff
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed25519/pubkey112.go
@@ -0,0 +1,7 @@
+//go:build !go1.13
+// +build !go1.13
+
+package ed25519
+
+// PublicKey is the type of Ed25519 public keys.
+type PublicKey []byte
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/signapi.go b/vendor/github.com/cloudflare/circl/sign/ed25519/signapi.go
new file mode 100644
index 000000000..e4520f520
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed25519/signapi.go
@@ -0,0 +1,87 @@
+package ed25519
+
+import (
+ "crypto/rand"
+ "encoding/asn1"
+
+ "github.com/cloudflare/circl/sign"
+)
+
+var sch sign.Scheme = &scheme{}
+
+// Scheme returns a signature interface.
+func Scheme() sign.Scheme { return sch }
+
+type scheme struct{}
+
+func (*scheme) Name() string { return "Ed25519" }
+func (*scheme) PublicKeySize() int { return PublicKeySize }
+func (*scheme) PrivateKeySize() int { return PrivateKeySize }
+func (*scheme) SignatureSize() int { return SignatureSize }
+func (*scheme) SeedSize() int { return SeedSize }
+func (*scheme) TLSIdentifier() uint { return 0x0807 }
+func (*scheme) SupportsContext() bool { return false }
+func (*scheme) Oid() asn1.ObjectIdentifier {
+ return asn1.ObjectIdentifier{1, 3, 101, 112}
+}
+
+func (*scheme) GenerateKey() (sign.PublicKey, sign.PrivateKey, error) {
+ return GenerateKey(rand.Reader)
+}
+
+func (*scheme) Sign(
+ sk sign.PrivateKey,
+ message []byte,
+ opts *sign.SignatureOpts,
+) []byte {
+ priv, ok := sk.(PrivateKey)
+ if !ok {
+ panic(sign.ErrTypeMismatch)
+ }
+ if opts != nil && opts.Context != "" {
+ panic(sign.ErrContextNotSupported)
+ }
+ return Sign(priv, message)
+}
+
+func (*scheme) Verify(
+ pk sign.PublicKey,
+ message, signature []byte,
+ opts *sign.SignatureOpts,
+) bool {
+ pub, ok := pk.(PublicKey)
+ if !ok {
+ panic(sign.ErrTypeMismatch)
+ }
+ if opts != nil {
+ if opts.Context != "" {
+ panic(sign.ErrContextNotSupported)
+ }
+ }
+ return Verify(pub, message, signature)
+}
+
+func (*scheme) DeriveKey(seed []byte) (sign.PublicKey, sign.PrivateKey) {
+ privateKey := NewKeyFromSeed(seed)
+ publicKey := make(PublicKey, PublicKeySize)
+ copy(publicKey, privateKey[SeedSize:])
+ return publicKey, privateKey
+}
+
+func (*scheme) UnmarshalBinaryPublicKey(buf []byte) (sign.PublicKey, error) {
+ if len(buf) < PublicKeySize {
+ return nil, sign.ErrPubKeySize
+ }
+ pub := make(PublicKey, PublicKeySize)
+ copy(pub, buf[:PublicKeySize])
+ return pub, nil
+}
+
+func (*scheme) UnmarshalBinaryPrivateKey(buf []byte) (sign.PrivateKey, error) {
+ if len(buf) < PrivateKeySize {
+ return nil, sign.ErrPrivKeySize
+ }
+ priv := make(PrivateKey, PrivateKeySize)
+ copy(priv, buf[:PrivateKeySize])
+ return priv, nil
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed25519/tables.go b/vendor/github.com/cloudflare/circl/sign/ed25519/tables.go
new file mode 100644
index 000000000..8763b426f
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed25519/tables.go
@@ -0,0 +1,213 @@
+package ed25519
+
+import fp "github.com/cloudflare/circl/math/fp25519"
+
+var tabSign = [fxV][fx2w1]pointR3{
+ {
+ pointR3{
+ addYX: fp.Elt{0x85, 0x3b, 0x8c, 0xf5, 0xc6, 0x93, 0xbc, 0x2f, 0x19, 0x0e, 0x8c, 0xfb, 0xc6, 0x2d, 0x93, 0xcf, 0xc2, 0x42, 0x3d, 0x64, 0x98, 0x48, 0x0b, 0x27, 0x65, 0xba, 0xd4, 0x33, 0x3a, 0x9d, 0xcf, 0x07},
+ subYX: fp.Elt{0x3e, 0x91, 0x40, 0xd7, 0x05, 0x39, 0x10, 0x9d, 0xb3, 0xbe, 0x40, 0xd1, 0x05, 0x9f, 0x39, 0xfd, 0x09, 0x8a, 0x8f, 0x68, 0x34, 0x84, 0xc1, 0xa5, 0x67, 0x12, 0xf8, 0x98, 0x92, 0x2f, 0xfd, 0x44},
+ dt2: fp.Elt{0x68, 0xaa, 0x7a, 0x87, 0x05, 0x12, 0xc9, 0xab, 0x9e, 0xc4, 0xaa, 0xcc, 0x23, 0xe8, 0xd9, 0x26, 0x8c, 0x59, 0x43, 0xdd, 0xcb, 0x7d, 0x1b, 0x5a, 0xa8, 0x65, 0x0c, 0x9f, 0x68, 0x7b, 0x11, 0x6f},
+ },
+ {
+ addYX: fp.Elt{0x7c, 0xb0, 0x9e, 0xe6, 0xc5, 0xbf, 0xfa, 0x13, 0x8e, 0x0d, 0x22, 0xde, 0xc8, 0xd1, 0xce, 0x52, 0x02, 0xd5, 0x62, 0x31, 0x71, 0x0e, 0x8e, 0x9d, 0xb0, 0xd6, 0x00, 0xa5, 0x5a, 0x0e, 0xce, 0x72},
+ subYX: fp.Elt{0x1a, 0x8e, 0x5c, 0xdc, 0xa4, 0xb3, 0x6c, 0x51, 0x18, 0xa0, 0x09, 0x80, 0x9a, 0x46, 0x33, 0xd5, 0xe0, 0x3c, 0x4d, 0x3b, 0xfc, 0x49, 0xa2, 0x43, 0x29, 0xe1, 0x29, 0xa9, 0x93, 0xea, 0x7c, 0x35},
+ dt2: fp.Elt{0x08, 0x46, 0x6f, 0x68, 0x7f, 0x0b, 0x7c, 0x9e, 0xad, 0xba, 0x07, 0x61, 0x74, 0x83, 0x2f, 0xfc, 0x26, 0xd6, 0x09, 0xb9, 0x00, 0x34, 0x36, 0x4f, 0x01, 0xf3, 0x48, 0xdb, 0x43, 0xba, 0x04, 0x44},
+ },
+ {
+ addYX: fp.Elt{0x4c, 0xda, 0x0d, 0x13, 0x66, 0xfd, 0x82, 0x84, 0x9f, 0x75, 0x5b, 0xa2, 0x17, 0xfe, 0x34, 0xbf, 0x1f, 0xcb, 0xba, 0x90, 0x55, 0x80, 0x83, 0xfd, 0x63, 0xb9, 0x18, 0xf8, 0x5b, 0x5d, 0x94, 0x1e},
+ subYX: fp.Elt{0xb9, 0xdb, 0x6c, 0x04, 0x88, 0x22, 0xd8, 0x79, 0x83, 0x2f, 0x8d, 0x65, 0x6b, 0xd2, 0xab, 0x1b, 0xdd, 0x65, 0xe5, 0x93, 0x63, 0xf8, 0xa2, 0xd8, 0x3c, 0xf1, 0x4b, 0xc5, 0x99, 0xd1, 0xf2, 0x12},
+ dt2: fp.Elt{0x05, 0x4c, 0xb8, 0x3b, 0xfe, 0xf5, 0x9f, 0x2e, 0xd1, 0xb2, 0xb8, 0xff, 0xfe, 0x6d, 0xd9, 0x37, 0xe0, 0xae, 0xb4, 0x5a, 0x51, 0x80, 0x7e, 0x9b, 0x1d, 0xd1, 0x8d, 0x8c, 0x56, 0xb1, 0x84, 0x35},
+ },
+ {
+ addYX: fp.Elt{0x39, 0x71, 0x43, 0x34, 0xe3, 0x42, 0x45, 0xa1, 0xf2, 0x68, 0x71, 0xa7, 0xe8, 0x23, 0xfd, 0x9f, 0x86, 0x48, 0xff, 0xe5, 0x96, 0x74, 0xcf, 0x05, 0x49, 0xe2, 0xb3, 0x6c, 0x17, 0x77, 0x2f, 0x6d},
+ subYX: fp.Elt{0x73, 0x3f, 0xc1, 0xc7, 0x6a, 0x66, 0xa1, 0x20, 0xdd, 0x11, 0xfb, 0x7a, 0x6e, 0xa8, 0x51, 0xb8, 0x3f, 0x9d, 0xa2, 0x97, 0x84, 0xb5, 0xc7, 0x90, 0x7c, 0xab, 0x48, 0xd6, 0x84, 0xa3, 0xd5, 0x1a},
+ dt2: fp.Elt{0x63, 0x27, 0x3c, 0x49, 0x4b, 0xfc, 0x22, 0xf2, 0x0b, 0x50, 0xc2, 0x0f, 0xb4, 0x1f, 0x31, 0x0c, 0x2f, 0x53, 0xab, 0xaa, 0x75, 0x6f, 0xe0, 0x69, 0x39, 0x56, 0xe0, 0x3b, 0xb7, 0xa8, 0xbf, 0x45},
+ },
+ },
+ {
+ {
+ addYX: fp.Elt{0x00, 0x45, 0xd9, 0x0d, 0x58, 0x03, 0xfc, 0x29, 0x93, 0xec, 0xbb, 0x6f, 0xa4, 0x7a, 0xd2, 0xec, 0xf8, 0xa7, 0xe2, 0xc2, 0x5f, 0x15, 0x0a, 0x13, 0xd5, 0xa1, 0x06, 0xb7, 0x1a, 0x15, 0x6b, 0x41},
+ subYX: fp.Elt{0x85, 0x8c, 0xb2, 0x17, 0xd6, 0x3b, 0x0a, 0xd3, 0xea, 0x3b, 0x77, 0x39, 0xb7, 0x77, 0xd3, 0xc5, 0xbf, 0x5c, 0x6a, 0x1e, 0x8c, 0xe7, 0xc6, 0xc6, 0xc4, 0xb7, 0x2a, 0x8b, 0xf7, 0xb8, 0x61, 0x0d},
+ dt2: fp.Elt{0xb0, 0x36, 0xc1, 0xe9, 0xef, 0xd7, 0xa8, 0x56, 0x20, 0x4b, 0xe4, 0x58, 0xcd, 0xe5, 0x07, 0xbd, 0xab, 0xe0, 0x57, 0x1b, 0xda, 0x2f, 0xe6, 0xaf, 0xd2, 0xe8, 0x77, 0x42, 0xf7, 0x2a, 0x1a, 0x19},
+ },
+ {
+ addYX: fp.Elt{0x6a, 0x6d, 0x6d, 0xd1, 0xfa, 0xf5, 0x03, 0x30, 0xbd, 0x6d, 0xc2, 0xc8, 0xf5, 0x38, 0x80, 0x4f, 0xb2, 0xbe, 0xa1, 0x76, 0x50, 0x1a, 0x73, 0xf2, 0x78, 0x2b, 0x8e, 0x3a, 0x1e, 0x34, 0x47, 0x7b},
+ subYX: fp.Elt{0xc3, 0x2c, 0x36, 0xdc, 0xc5, 0x45, 0xbc, 0xef, 0x1b, 0x64, 0xd6, 0x65, 0x28, 0xe9, 0xda, 0x84, 0x13, 0xbe, 0x27, 0x8e, 0x3f, 0x98, 0x2a, 0x37, 0xee, 0x78, 0x97, 0xd6, 0xc0, 0x6f, 0xb4, 0x53},
+ dt2: fp.Elt{0x58, 0x5d, 0xa7, 0xa3, 0x68, 0xbb, 0x20, 0x30, 0x2e, 0x03, 0xe9, 0xb1, 0xd4, 0x90, 0x72, 0xe3, 0x71, 0xb2, 0x36, 0x3e, 0x73, 0xa0, 0x2e, 0x3d, 0xd1, 0x85, 0x33, 0x62, 0x4e, 0xa7, 0x7b, 0x31},
+ },
+ {
+ addYX: fp.Elt{0xbf, 0xc4, 0x38, 0x53, 0xfb, 0x68, 0xa9, 0x77, 0xce, 0x55, 0xf9, 0x05, 0xcb, 0xeb, 0xfb, 0x8c, 0x46, 0xc2, 0x32, 0x7c, 0xf0, 0xdb, 0xd7, 0x2c, 0x62, 0x8e, 0xdd, 0x54, 0x75, 0xcf, 0x3f, 0x33},
+ subYX: fp.Elt{0x49, 0x50, 0x1f, 0x4e, 0x6e, 0x55, 0x55, 0xde, 0x8c, 0x4e, 0x77, 0x96, 0x38, 0x3b, 0xfe, 0xb6, 0x43, 0x3c, 0x86, 0x69, 0xc2, 0x72, 0x66, 0x1f, 0x6b, 0xf9, 0x87, 0xbc, 0x4f, 0x37, 0x3e, 0x3c},
+ dt2: fp.Elt{0xd2, 0x2f, 0x06, 0x6b, 0x08, 0x07, 0x69, 0x77, 0xc0, 0x94, 0xcc, 0xae, 0x43, 0x00, 0x59, 0x6e, 0xa3, 0x63, 0xa8, 0xdd, 0xfa, 0x24, 0x18, 0xd0, 0x35, 0xc7, 0x78, 0xf7, 0x0d, 0xd4, 0x5a, 0x1e},
+ },
+ {
+ addYX: fp.Elt{0x45, 0xc1, 0x17, 0x51, 0xf8, 0xed, 0x7e, 0xc7, 0xa9, 0x1a, 0x11, 0x6e, 0x2d, 0xef, 0x0b, 0xd5, 0x3f, 0x98, 0xb0, 0xa3, 0x9d, 0x65, 0xf1, 0xcd, 0x53, 0x4a, 0x8a, 0x18, 0x70, 0x0a, 0x7f, 0x23},
+ subYX: fp.Elt{0xdd, 0xef, 0xbe, 0x3a, 0x31, 0xe0, 0xbc, 0xbe, 0x6d, 0x5d, 0x79, 0x87, 0xd6, 0xbe, 0x68, 0xe3, 0x59, 0x76, 0x8c, 0x86, 0x0e, 0x7a, 0x92, 0x13, 0x14, 0x8f, 0x67, 0xb3, 0xcb, 0x1a, 0x76, 0x76},
+ dt2: fp.Elt{0x56, 0x7a, 0x1c, 0x9d, 0xca, 0x96, 0xf9, 0xf9, 0x03, 0x21, 0xd4, 0xe8, 0xb3, 0xd5, 0xe9, 0x52, 0xc8, 0x54, 0x1e, 0x1b, 0x13, 0xb6, 0xfd, 0x47, 0x7d, 0x02, 0x32, 0x33, 0x27, 0xe2, 0x1f, 0x19},
+ },
+ },
+}
+
+var tabVerif = [1 << (omegaFix - 2)]pointR3{
+ { /* 1P */
+ addYX: fp.Elt{0x85, 0x3b, 0x8c, 0xf5, 0xc6, 0x93, 0xbc, 0x2f, 0x19, 0x0e, 0x8c, 0xfb, 0xc6, 0x2d, 0x93, 0xcf, 0xc2, 0x42, 0x3d, 0x64, 0x98, 0x48, 0x0b, 0x27, 0x65, 0xba, 0xd4, 0x33, 0x3a, 0x9d, 0xcf, 0x07},
+ subYX: fp.Elt{0x3e, 0x91, 0x40, 0xd7, 0x05, 0x39, 0x10, 0x9d, 0xb3, 0xbe, 0x40, 0xd1, 0x05, 0x9f, 0x39, 0xfd, 0x09, 0x8a, 0x8f, 0x68, 0x34, 0x84, 0xc1, 0xa5, 0x67, 0x12, 0xf8, 0x98, 0x92, 0x2f, 0xfd, 0x44},
+ dt2: fp.Elt{0x68, 0xaa, 0x7a, 0x87, 0x05, 0x12, 0xc9, 0xab, 0x9e, 0xc4, 0xaa, 0xcc, 0x23, 0xe8, 0xd9, 0x26, 0x8c, 0x59, 0x43, 0xdd, 0xcb, 0x7d, 0x1b, 0x5a, 0xa8, 0x65, 0x0c, 0x9f, 0x68, 0x7b, 0x11, 0x6f},
+ },
+ { /* 3P */
+ addYX: fp.Elt{0x30, 0x97, 0xee, 0x4c, 0xa8, 0xb0, 0x25, 0xaf, 0x8a, 0x4b, 0x86, 0xe8, 0x30, 0x84, 0x5a, 0x02, 0x32, 0x67, 0x01, 0x9f, 0x02, 0x50, 0x1b, 0xc1, 0xf4, 0xf8, 0x80, 0x9a, 0x1b, 0x4e, 0x16, 0x7a},
+ subYX: fp.Elt{0x65, 0xd2, 0xfc, 0xa4, 0xe8, 0x1f, 0x61, 0x56, 0x7d, 0xba, 0xc1, 0xe5, 0xfd, 0x53, 0xd3, 0x3b, 0xbd, 0xd6, 0x4b, 0x21, 0x1a, 0xf3, 0x31, 0x81, 0x62, 0xda, 0x5b, 0x55, 0x87, 0x15, 0xb9, 0x2a},
+ dt2: fp.Elt{0x89, 0xd8, 0xd0, 0x0d, 0x3f, 0x93, 0xae, 0x14, 0x62, 0xda, 0x35, 0x1c, 0x22, 0x23, 0x94, 0x58, 0x4c, 0xdb, 0xf2, 0x8c, 0x45, 0xe5, 0x70, 0xd1, 0xc6, 0xb4, 0xb9, 0x12, 0xaf, 0x26, 0x28, 0x5a},
+ },
+ { /* 5P */
+ addYX: fp.Elt{0x33, 0xbb, 0xa5, 0x08, 0x44, 0xbc, 0x12, 0xa2, 0x02, 0xed, 0x5e, 0xc7, 0xc3, 0x48, 0x50, 0x8d, 0x44, 0xec, 0xbf, 0x5a, 0x0c, 0xeb, 0x1b, 0xdd, 0xeb, 0x06, 0xe2, 0x46, 0xf1, 0xcc, 0x45, 0x29},
+ subYX: fp.Elt{0xba, 0xd6, 0x47, 0xa4, 0xc3, 0x82, 0x91, 0x7f, 0xb7, 0x29, 0x27, 0x4b, 0xd1, 0x14, 0x00, 0xd5, 0x87, 0xa0, 0x64, 0xb8, 0x1c, 0xf1, 0x3c, 0xe3, 0xf3, 0x55, 0x1b, 0xeb, 0x73, 0x7e, 0x4a, 0x15},
+ dt2: fp.Elt{0x85, 0x82, 0x2a, 0x81, 0xf1, 0xdb, 0xbb, 0xbc, 0xfc, 0xd1, 0xbd, 0xd0, 0x07, 0x08, 0x0e, 0x27, 0x2d, 0xa7, 0xbd, 0x1b, 0x0b, 0x67, 0x1b, 0xb4, 0x9a, 0xb6, 0x3b, 0x6b, 0x69, 0xbe, 0xaa, 0x43},
+ },
+ { /* 7P */
+ addYX: fp.Elt{0xbf, 0xa3, 0x4e, 0x94, 0xd0, 0x5c, 0x1a, 0x6b, 0xd2, 0xc0, 0x9d, 0xb3, 0x3a, 0x35, 0x70, 0x74, 0x49, 0x2e, 0x54, 0x28, 0x82, 0x52, 0xb2, 0x71, 0x7e, 0x92, 0x3c, 0x28, 0x69, 0xea, 0x1b, 0x46},
+ subYX: fp.Elt{0xb1, 0x21, 0x32, 0xaa, 0x9a, 0x2c, 0x6f, 0xba, 0xa7, 0x23, 0xba, 0x3b, 0x53, 0x21, 0xa0, 0x6c, 0x3a, 0x2c, 0x19, 0x92, 0x4f, 0x76, 0xea, 0x9d, 0xe0, 0x17, 0x53, 0x2e, 0x5d, 0xdd, 0x6e, 0x1d},
+ dt2: fp.Elt{0xa2, 0xb3, 0xb8, 0x01, 0xc8, 0x6d, 0x83, 0xf1, 0x9a, 0xa4, 0x3e, 0x05, 0x47, 0x5f, 0x03, 0xb3, 0xf3, 0xad, 0x77, 0x58, 0xba, 0x41, 0x9c, 0x52, 0xa7, 0x90, 0x0f, 0x6a, 0x1c, 0xbb, 0x9f, 0x7a},
+ },
+ { /* 9P */
+ addYX: fp.Elt{0x2f, 0x63, 0xa8, 0xa6, 0x8a, 0x67, 0x2e, 0x9b, 0xc5, 0x46, 0xbc, 0x51, 0x6f, 0x9e, 0x50, 0xa6, 0xb5, 0xf5, 0x86, 0xc6, 0xc9, 0x33, 0xb2, 0xce, 0x59, 0x7f, 0xdd, 0x8a, 0x33, 0xed, 0xb9, 0x34},
+ subYX: fp.Elt{0x64, 0x80, 0x9d, 0x03, 0x7e, 0x21, 0x6e, 0xf3, 0x9b, 0x41, 0x20, 0xf5, 0xb6, 0x81, 0xa0, 0x98, 0x44, 0xb0, 0x5e, 0xe7, 0x08, 0xc6, 0xcb, 0x96, 0x8f, 0x9c, 0xdc, 0xfa, 0x51, 0x5a, 0xc0, 0x49},
+ dt2: fp.Elt{0x1b, 0xaf, 0x45, 0x90, 0xbf, 0xe8, 0xb4, 0x06, 0x2f, 0xd2, 0x19, 0xa7, 0xe8, 0x83, 0xff, 0xe2, 0x16, 0xcf, 0xd4, 0x93, 0x29, 0xfc, 0xf6, 0xaa, 0x06, 0x8b, 0x00, 0x1b, 0x02, 0x72, 0xc1, 0x73},
+ },
+ { /* 11P */
+ addYX: fp.Elt{0xde, 0x2a, 0x80, 0x8a, 0x84, 0x00, 0xbf, 0x2f, 0x27, 0x2e, 0x30, 0x02, 0xcf, 0xfe, 0xd9, 0xe5, 0x06, 0x34, 0x70, 0x17, 0x71, 0x84, 0x3e, 0x11, 0xaf, 0x8f, 0x6d, 0x54, 0xe2, 0xaa, 0x75, 0x42},
+ subYX: fp.Elt{0x48, 0x43, 0x86, 0x49, 0x02, 0x5b, 0x5f, 0x31, 0x81, 0x83, 0x08, 0x77, 0x69, 0xb3, 0xd6, 0x3e, 0x95, 0xeb, 0x8d, 0x6a, 0x55, 0x75, 0xa0, 0xa3, 0x7f, 0xc7, 0xd5, 0x29, 0x80, 0x59, 0xab, 0x18},
+ dt2: fp.Elt{0xe9, 0x89, 0x60, 0xfd, 0xc5, 0x2c, 0x2b, 0xd8, 0xa4, 0xe4, 0x82, 0x32, 0xa1, 0xb4, 0x1e, 0x03, 0x22, 0x86, 0x1a, 0xb5, 0x99, 0x11, 0x31, 0x44, 0x48, 0xf9, 0x3d, 0xb5, 0x22, 0x55, 0xc6, 0x3d},
+ },
+ { /* 13P */
+ addYX: fp.Elt{0x6d, 0x7f, 0x00, 0xa2, 0x22, 0xc2, 0x70, 0xbf, 0xdb, 0xde, 0xbc, 0xb5, 0x9a, 0xb3, 0x84, 0xbf, 0x07, 0xba, 0x07, 0xfb, 0x12, 0x0e, 0x7a, 0x53, 0x41, 0xf2, 0x46, 0xc3, 0xee, 0xd7, 0x4f, 0x23},
+ subYX: fp.Elt{0x93, 0xbf, 0x7f, 0x32, 0x3b, 0x01, 0x6f, 0x50, 0x6b, 0x6f, 0x77, 0x9b, 0xc9, 0xeb, 0xfc, 0xae, 0x68, 0x59, 0xad, 0xaa, 0x32, 0xb2, 0x12, 0x9d, 0xa7, 0x24, 0x60, 0x17, 0x2d, 0x88, 0x67, 0x02},
+ dt2: fp.Elt{0x78, 0xa3, 0x2e, 0x73, 0x19, 0xa1, 0x60, 0x53, 0x71, 0xd4, 0x8d, 0xdf, 0xb1, 0xe6, 0x37, 0x24, 0x33, 0xe5, 0xa7, 0x91, 0xf8, 0x37, 0xef, 0xa2, 0x63, 0x78, 0x09, 0xaa, 0xfd, 0xa6, 0x7b, 0x49},
+ },
+ { /* 15P */
+ addYX: fp.Elt{0xa0, 0xea, 0xcf, 0x13, 0x03, 0xcc, 0xce, 0x24, 0x6d, 0x24, 0x9c, 0x18, 0x8d, 0xc2, 0x48, 0x86, 0xd0, 0xd4, 0xf2, 0xc1, 0xfa, 0xbd, 0xbd, 0x2d, 0x2b, 0xe7, 0x2d, 0xf1, 0x17, 0x29, 0xe2, 0x61},
+ subYX: fp.Elt{0x0b, 0xcf, 0x8c, 0x46, 0x86, 0xcd, 0x0b, 0x04, 0xd6, 0x10, 0x99, 0x2a, 0xa4, 0x9b, 0x82, 0xd3, 0x92, 0x51, 0xb2, 0x07, 0x08, 0x30, 0x08, 0x75, 0xbf, 0x5e, 0xd0, 0x18, 0x42, 0xcd, 0xb5, 0x43},
+ dt2: fp.Elt{0x16, 0xb5, 0xd0, 0x9b, 0x2f, 0x76, 0x9a, 0x5d, 0xee, 0xde, 0x3f, 0x37, 0x4e, 0xaf, 0x38, 0xeb, 0x70, 0x42, 0xd6, 0x93, 0x7d, 0x5a, 0x2e, 0x03, 0x42, 0xd8, 0xe4, 0x0a, 0x21, 0x61, 0x1d, 0x51},
+ },
+ { /* 17P */
+ addYX: fp.Elt{0x81, 0x9d, 0x0e, 0x95, 0xef, 0x76, 0xc6, 0x92, 0x4f, 0x04, 0xd7, 0xc0, 0xcd, 0x20, 0x46, 0xa5, 0x48, 0x12, 0x8f, 0x6f, 0x64, 0x36, 0x9b, 0xaa, 0xe3, 0x55, 0xb8, 0xdd, 0x24, 0x59, 0x32, 0x6d},
+ subYX: fp.Elt{0x87, 0xde, 0x20, 0x44, 0x48, 0x86, 0x13, 0x08, 0xb4, 0xed, 0x92, 0xb5, 0x16, 0xf0, 0x1c, 0x8a, 0x25, 0x2d, 0x94, 0x29, 0x27, 0x4e, 0xfa, 0x39, 0x10, 0x28, 0x48, 0xe2, 0x6f, 0xfe, 0xa7, 0x71},
+ dt2: fp.Elt{0x54, 0xc8, 0xc8, 0xa5, 0xb8, 0x82, 0x71, 0x6c, 0x03, 0x2a, 0x5f, 0xfe, 0x79, 0x14, 0xfd, 0x33, 0x0c, 0x8d, 0x77, 0x83, 0x18, 0x59, 0xcf, 0x72, 0xa9, 0xea, 0x9e, 0x55, 0xb6, 0xc4, 0x46, 0x47},
+ },
+ { /* 19P */
+ addYX: fp.Elt{0x2b, 0x9a, 0xc6, 0x6d, 0x3c, 0x7b, 0x77, 0xd3, 0x17, 0xf6, 0x89, 0x6f, 0x27, 0xb2, 0xfa, 0xde, 0xb5, 0x16, 0x3a, 0xb5, 0xf7, 0x1c, 0x65, 0x45, 0xb7, 0x9f, 0xfe, 0x34, 0xde, 0x51, 0x9a, 0x5c},
+ subYX: fp.Elt{0x47, 0x11, 0x74, 0x64, 0xc8, 0x46, 0x85, 0x34, 0x49, 0xc8, 0xfc, 0x0e, 0xdd, 0xae, 0x35, 0x7d, 0x32, 0xa3, 0x72, 0x06, 0x76, 0x9a, 0x93, 0xff, 0xd6, 0xe6, 0xb5, 0x7d, 0x49, 0x63, 0x96, 0x21},
+ dt2: fp.Elt{0x67, 0x0e, 0xf1, 0x79, 0xcf, 0xf1, 0x10, 0xf5, 0x5b, 0x51, 0x58, 0xe6, 0xa1, 0xda, 0xdd, 0xff, 0x77, 0x22, 0x14, 0x10, 0x17, 0xa7, 0xc3, 0x09, 0xbb, 0x23, 0x82, 0x60, 0x3c, 0x50, 0x04, 0x48},
+ },
+ { /* 21P */
+ addYX: fp.Elt{0xc7, 0x7f, 0xa3, 0x2c, 0xd0, 0x9e, 0x24, 0xc4, 0xab, 0xac, 0x15, 0xa6, 0xe3, 0xa0, 0x59, 0xa0, 0x23, 0x0e, 0x6e, 0xc9, 0xd7, 0x6e, 0xa9, 0x88, 0x6d, 0x69, 0x50, 0x16, 0xa5, 0x98, 0x33, 0x55},
+ subYX: fp.Elt{0x75, 0xd1, 0x36, 0x3a, 0xd2, 0x21, 0x68, 0x3b, 0x32, 0x9e, 0x9b, 0xe9, 0xa7, 0x0a, 0xb4, 0xbb, 0x47, 0x8a, 0x83, 0x20, 0xe4, 0x5c, 0x9e, 0x5d, 0x5e, 0x4c, 0xde, 0x58, 0x88, 0x09, 0x1e, 0x77},
+ dt2: fp.Elt{0xdf, 0x1e, 0x45, 0x78, 0xd2, 0xf5, 0x12, 0x9a, 0xcb, 0x9c, 0x89, 0x85, 0x79, 0x5d, 0xda, 0x3a, 0x08, 0x95, 0xa5, 0x9f, 0x2d, 0x4a, 0x7f, 0x47, 0x11, 0xa6, 0xf5, 0x8f, 0xd6, 0xd1, 0x5e, 0x5a},
+ },
+ { /* 23P */
+ addYX: fp.Elt{0x83, 0x0e, 0x15, 0xfe, 0x2a, 0x12, 0x95, 0x11, 0xd8, 0x35, 0x4b, 0x7e, 0x25, 0x9a, 0x20, 0xcf, 0x20, 0x1e, 0x71, 0x1e, 0x29, 0xf8, 0x87, 0x73, 0xf0, 0x92, 0xbf, 0xd8, 0x97, 0xb8, 0xac, 0x44},
+ subYX: fp.Elt{0x59, 0x73, 0x52, 0x58, 0xc5, 0xe0, 0xe5, 0xba, 0x7e, 0x9d, 0xdb, 0xca, 0x19, 0x5c, 0x2e, 0x39, 0xe9, 0xab, 0x1c, 0xda, 0x1e, 0x3c, 0x65, 0x28, 0x44, 0xdc, 0xef, 0x5f, 0x13, 0x60, 0x9b, 0x01},
+ dt2: fp.Elt{0x83, 0x4b, 0x13, 0x5e, 0x14, 0x68, 0x60, 0x1e, 0x16, 0x4c, 0x30, 0x24, 0x4f, 0xe6, 0xf5, 0xc4, 0xd7, 0x3e, 0x1a, 0xfc, 0xa8, 0x88, 0x6e, 0x50, 0x92, 0x2f, 0xad, 0xe6, 0xfd, 0x49, 0x0c, 0x15},
+ },
+ { /* 25P */
+ addYX: fp.Elt{0x38, 0x11, 0x47, 0x09, 0x95, 0xf2, 0x7b, 0x8e, 0x51, 0xa6, 0x75, 0x4f, 0x39, 0xef, 0x6f, 0x5d, 0xad, 0x08, 0xa7, 0x25, 0xc4, 0x79, 0xaf, 0x10, 0x22, 0x99, 0xb9, 0x5b, 0x07, 0x5a, 0x2b, 0x6b},
+ subYX: fp.Elt{0x68, 0xa8, 0xdc, 0x9c, 0x3c, 0x86, 0x49, 0xb8, 0xd0, 0x4a, 0x71, 0xb8, 0xdb, 0x44, 0x3f, 0xc8, 0x8d, 0x16, 0x36, 0x0c, 0x56, 0xe3, 0x3e, 0xfe, 0xc1, 0xfb, 0x05, 0x1e, 0x79, 0xd7, 0xa6, 0x78},
+ dt2: fp.Elt{0x76, 0xb9, 0xa0, 0x47, 0x4b, 0x70, 0xbf, 0x58, 0xd5, 0x48, 0x17, 0x74, 0x55, 0xb3, 0x01, 0xa6, 0x90, 0xf5, 0x42, 0xd5, 0xb1, 0x1f, 0x2b, 0xaa, 0x00, 0x5d, 0xd5, 0x4a, 0xfc, 0x7f, 0x5c, 0x72},
+ },
+ { /* 27P */
+ addYX: fp.Elt{0xb2, 0x99, 0xcf, 0xd1, 0x15, 0x67, 0x42, 0xe4, 0x34, 0x0d, 0xa2, 0x02, 0x11, 0xd5, 0x52, 0x73, 0x9f, 0x10, 0x12, 0x8b, 0x7b, 0x15, 0xd1, 0x23, 0xa3, 0xf3, 0xb1, 0x7c, 0x27, 0xc9, 0x4c, 0x79},
+ subYX: fp.Elt{0xc0, 0x98, 0xd0, 0x1c, 0xf7, 0x2b, 0x80, 0x91, 0x66, 0x63, 0x5e, 0xed, 0xa4, 0x6c, 0x41, 0xfe, 0x4c, 0x99, 0x02, 0x49, 0x71, 0x5d, 0x58, 0xdf, 0xe7, 0xfa, 0x55, 0xf8, 0x25, 0x46, 0xd5, 0x4c},
+ dt2: fp.Elt{0x53, 0x50, 0xac, 0xc2, 0x26, 0xc4, 0xf6, 0x4a, 0x58, 0x72, 0xf6, 0x32, 0xad, 0xed, 0x9a, 0xbc, 0x21, 0x10, 0x31, 0x0a, 0xf1, 0x32, 0xd0, 0x2a, 0x85, 0x8e, 0xcc, 0x6f, 0x7b, 0x35, 0x08, 0x70},
+ },
+ { /* 29P */
+ addYX: fp.Elt{0x01, 0x3f, 0x77, 0x38, 0x27, 0x67, 0x88, 0x0b, 0xfb, 0xcc, 0xfb, 0x95, 0xfa, 0xc8, 0xcc, 0xb8, 0xb6, 0x29, 0xad, 0xb9, 0xa3, 0xd5, 0x2d, 0x8d, 0x6a, 0x0f, 0xad, 0x51, 0x98, 0x7e, 0xef, 0x06},
+ subYX: fp.Elt{0x34, 0x4a, 0x58, 0x82, 0xbb, 0x9f, 0x1b, 0xd0, 0x2b, 0x79, 0xb4, 0xd2, 0x63, 0x64, 0xab, 0x47, 0x02, 0x62, 0x53, 0x48, 0x9c, 0x63, 0x31, 0xb6, 0x28, 0xd4, 0xd6, 0x69, 0x36, 0x2a, 0xa9, 0x13},
+ dt2: fp.Elt{0xe5, 0x7d, 0x57, 0xc0, 0x1c, 0x77, 0x93, 0xca, 0x5c, 0xdc, 0x35, 0x50, 0x1e, 0xe4, 0x40, 0x75, 0x71, 0xe0, 0x02, 0xd8, 0x01, 0x0f, 0x68, 0x24, 0x6a, 0xf8, 0x2a, 0x8a, 0xdf, 0x6d, 0x29, 0x3c},
+ },
+ { /* 31P */
+ addYX: fp.Elt{0x13, 0xa7, 0x14, 0xd9, 0xf9, 0x15, 0xad, 0xae, 0x12, 0xf9, 0x8f, 0x8c, 0xf9, 0x7b, 0x2f, 0xa9, 0x30, 0xd7, 0x53, 0x9f, 0x17, 0x23, 0xf8, 0xaf, 0xba, 0x77, 0x0c, 0x49, 0x93, 0xd3, 0x99, 0x7a},
+ subYX: fp.Elt{0x41, 0x25, 0x1f, 0xbb, 0x2e, 0x4d, 0xeb, 0xfc, 0x1f, 0xb9, 0xad, 0x40, 0xc7, 0x10, 0x95, 0xb8, 0x05, 0xad, 0xa1, 0xd0, 0x7d, 0xa3, 0x71, 0xfc, 0x7b, 0x71, 0x47, 0x07, 0x70, 0x2c, 0x89, 0x0a},
+ dt2: fp.Elt{0xe8, 0xa3, 0xbd, 0x36, 0x24, 0xed, 0x52, 0x8f, 0x94, 0x07, 0xe8, 0x57, 0x41, 0xc8, 0xa8, 0x77, 0xe0, 0x9c, 0x2f, 0x26, 0x63, 0x65, 0xa9, 0xa5, 0xd2, 0xf7, 0x02, 0x83, 0xd2, 0x62, 0x67, 0x28},
+ },
+ { /* 33P */
+ addYX: fp.Elt{0x25, 0x5b, 0xe3, 0x3c, 0x09, 0x36, 0x78, 0x4e, 0x97, 0xaa, 0x6b, 0xb2, 0x1d, 0x18, 0xe1, 0x82, 0x3f, 0xb8, 0xc7, 0xcb, 0xd3, 0x92, 0xc1, 0x0c, 0x3a, 0x9d, 0x9d, 0x6a, 0x04, 0xda, 0xf1, 0x32},
+ subYX: fp.Elt{0xbd, 0xf5, 0x2e, 0xce, 0x2b, 0x8e, 0x55, 0x7c, 0x63, 0xbc, 0x47, 0x67, 0xb4, 0x6c, 0x98, 0xe4, 0xb8, 0x89, 0xbb, 0x3b, 0x9f, 0x17, 0x4a, 0x15, 0x7a, 0x76, 0xf1, 0xd6, 0xa3, 0xf2, 0x86, 0x76},
+ dt2: fp.Elt{0x6a, 0x7c, 0x59, 0x6d, 0xa6, 0x12, 0x8d, 0xaa, 0x2b, 0x85, 0xd3, 0x04, 0x03, 0x93, 0x11, 0x8f, 0x22, 0xb0, 0x09, 0xc2, 0x73, 0xdc, 0x91, 0x3f, 0xa6, 0x28, 0xad, 0xa9, 0xf8, 0x05, 0x13, 0x56},
+ },
+ { /* 35P */
+ addYX: fp.Elt{0xd1, 0xae, 0x92, 0xec, 0x8d, 0x97, 0x0c, 0x10, 0xe5, 0x73, 0x6d, 0x4d, 0x43, 0xd5, 0x43, 0xca, 0x48, 0xba, 0x47, 0xd8, 0x22, 0x1b, 0x13, 0x83, 0x2c, 0x4d, 0x5d, 0xe3, 0x53, 0xec, 0xaa},
+ subYX: fp.Elt{0xd5, 0xc0, 0xb0, 0xe7, 0x28, 0xcc, 0x22, 0x67, 0x53, 0x5c, 0x07, 0xdb, 0xbb, 0xe9, 0x9d, 0x70, 0x61, 0x0a, 0x01, 0xd7, 0xa7, 0x8d, 0xf6, 0xca, 0x6c, 0xcc, 0x57, 0x2c, 0xef, 0x1a, 0x0a, 0x03},
+ dt2: fp.Elt{0xaa, 0xd2, 0x3a, 0x00, 0x73, 0xf7, 0xb1, 0x7b, 0x08, 0x66, 0x21, 0x2b, 0x80, 0x29, 0x3f, 0x0b, 0x3e, 0xd2, 0x0e, 0x52, 0x86, 0xdc, 0x21, 0x78, 0x80, 0x54, 0x06, 0x24, 0x1c, 0x9c, 0xbe, 0x20},
+ },
+ { /* 37P */
+ addYX: fp.Elt{0xa6, 0x73, 0x96, 0x24, 0xd8, 0x87, 0x53, 0xe1, 0x93, 0xe4, 0x46, 0xf5, 0x2d, 0xbc, 0x43, 0x59, 0xb5, 0x63, 0x6f, 0xc3, 0x81, 0x9a, 0x7f, 0x1c, 0xde, 0xc1, 0x0a, 0x1f, 0x36, 0xb3, 0x0a, 0x75},
+ subYX: fp.Elt{0x60, 0x5e, 0x02, 0xe2, 0x4a, 0xe4, 0xe0, 0x20, 0x38, 0xb9, 0xdc, 0xcb, 0x2f, 0x3b, 0x3b, 0xb0, 0x1c, 0x0d, 0x5a, 0xf9, 0x9c, 0x63, 0x5d, 0x10, 0x11, 0xe3, 0x67, 0x50, 0x54, 0x4c, 0x76, 0x69},
+ dt2: fp.Elt{0x37, 0x10, 0xf8, 0xa2, 0x83, 0x32, 0x8a, 0x1e, 0xf1, 0xcb, 0x7f, 0xbd, 0x23, 0xda, 0x2e, 0x6f, 0x63, 0x25, 0x2e, 0xac, 0x5b, 0xd1, 0x2f, 0xb7, 0x40, 0x50, 0x07, 0xb7, 0x3f, 0x6b, 0xf9, 0x54},
+ },
+ { /* 39P */
+ addYX: fp.Elt{0x79, 0x92, 0x66, 0x29, 0x04, 0xf2, 0xad, 0x0f, 0x4a, 0x72, 0x7d, 0x7d, 0x04, 0xa2, 0xdd, 0x3a, 0xf1, 0x60, 0x57, 0x8c, 0x82, 0x94, 0x3d, 0x6f, 0x9e, 0x53, 0xb7, 0x2b, 0xc5, 0xe9, 0x7f, 0x3d},
+ subYX: fp.Elt{0xcd, 0x1e, 0xb1, 0x16, 0xc6, 0xaf, 0x7d, 0x17, 0x79, 0x64, 0x57, 0xfa, 0x9c, 0x4b, 0x76, 0x89, 0x85, 0xe7, 0xec, 0xe6, 0x10, 0xa1, 0xa8, 0xb7, 0xf0, 0xdb, 0x85, 0xbe, 0x9f, 0x83, 0xe6, 0x78},
+ dt2: fp.Elt{0x6b, 0x85, 0xb8, 0x37, 0xf7, 0x2d, 0x33, 0x70, 0x8a, 0x17, 0x1a, 0x04, 0x43, 0x5d, 0xd0, 0x75, 0x22, 0x9e, 0xe5, 0xa0, 0x4a, 0xf7, 0x0f, 0x32, 0x42, 0x82, 0x08, 0x50, 0xf3, 0x68, 0xf2, 0x70},
+ },
+ { /* 41P */
+ addYX: fp.Elt{0x47, 0x5f, 0x80, 0xb1, 0x83, 0x45, 0x86, 0x66, 0x19, 0x7c, 0xdd, 0x60, 0xd1, 0xc5, 0x35, 0xf5, 0x06, 0xb0, 0x4c, 0x1e, 0xb7, 0x4e, 0x87, 0xe9, 0xd9, 0x89, 0xd8, 0xfa, 0x5c, 0x34, 0x0d, 0x7c},
+ subYX: fp.Elt{0x55, 0xf3, 0xdc, 0x70, 0x20, 0x11, 0x24, 0x23, 0x17, 0xe1, 0xfc, 0xe7, 0x7e, 0xc9, 0x0c, 0x38, 0x98, 0xb6, 0x52, 0x35, 0xed, 0xde, 0x1d, 0xb3, 0xb9, 0xc4, 0xb8, 0x39, 0xc0, 0x56, 0x4e, 0x40},
+ dt2: fp.Elt{0x8a, 0x33, 0x78, 0x8c, 0x4b, 0x1f, 0x1f, 0x59, 0xe1, 0xb5, 0xe0, 0x67, 0xb1, 0x6a, 0x36, 0xa0, 0x44, 0x3d, 0x5f, 0xb4, 0x52, 0x41, 0xbc, 0x5c, 0x77, 0xc7, 0xae, 0x2a, 0x76, 0x54, 0xd7, 0x20},
+ },
+ { /* 43P */
+ addYX: fp.Elt{0x58, 0xb7, 0x3b, 0xc7, 0x6f, 0xc3, 0x8f, 0x5e, 0x9a, 0xbb, 0x3c, 0x36, 0xa5, 0x43, 0xe5, 0xac, 0x22, 0xc9, 0x3b, 0x90, 0x7d, 0x4a, 0x93, 0xa9, 0x62, 0xec, 0xce, 0xf3, 0x46, 0x1e, 0x8f, 0x2b},
+ subYX: fp.Elt{0x43, 0xf5, 0xb9, 0x35, 0xb1, 0xfe, 0x74, 0x9d, 0x6c, 0x95, 0x8c, 0xde, 0xf1, 0x7d, 0xb3, 0x84, 0xa9, 0x8b, 0x13, 0x57, 0x07, 0x2b, 0x32, 0xe9, 0xe1, 0x4c, 0x0b, 0x79, 0xa8, 0xad, 0xb8, 0x38},
+ dt2: fp.Elt{0x5d, 0xf9, 0x51, 0xdf, 0x9c, 0x4a, 0xc0, 0xb5, 0xac, 0xde, 0x1f, 0xcb, 0xae, 0x52, 0x39, 0x2b, 0xda, 0x66, 0x8b, 0x32, 0x8b, 0x6d, 0x10, 0x1d, 0x53, 0x19, 0xba, 0xce, 0x32, 0xeb, 0x9a, 0x04},
+ },
+ { /* 45P */
+ addYX: fp.Elt{0x31, 0x79, 0xfc, 0x75, 0x0b, 0x7d, 0x50, 0xaa, 0xd3, 0x25, 0x67, 0x7a, 0x4b, 0x92, 0xef, 0x0f, 0x30, 0x39, 0x6b, 0x39, 0x2b, 0x54, 0x82, 0x1d, 0xfc, 0x74, 0xf6, 0x30, 0x75, 0xe1, 0x5e, 0x79},
+ subYX: fp.Elt{0x7e, 0xfe, 0xdc, 0x63, 0x3c, 0x7d, 0x76, 0xd7, 0x40, 0x6e, 0x85, 0x97, 0x48, 0x59, 0x9c, 0x20, 0x13, 0x7c, 0x4f, 0xe1, 0x61, 0x68, 0x67, 0xb6, 0xfc, 0x25, 0xd6, 0xc8, 0xe0, 0x65, 0xc6, 0x51},
+ dt2: fp.Elt{0x81, 0xbd, 0xec, 0x52, 0x0a, 0x5b, 0x4a, 0x25, 0xe7, 0xaf, 0x34, 0xe0, 0x6e, 0x1f, 0x41, 0x5d, 0x31, 0x4a, 0xee, 0xca, 0x0d, 0x4d, 0xa2, 0xe6, 0x77, 0x44, 0xc5, 0x9d, 0xf4, 0x9b, 0xd1, 0x6c},
+ },
+ { /* 47P */
+ addYX: fp.Elt{0x86, 0xc3, 0xaf, 0x65, 0x21, 0x61, 0xfe, 0x1f, 0x10, 0x1b, 0xd5, 0xb8, 0x88, 0x2a, 0x2a, 0x08, 0xaa, 0x0b, 0x99, 0x20, 0x7e, 0x62, 0xf6, 0x76, 0xe7, 0x43, 0x9e, 0x42, 0xa7, 0xb3, 0x01, 0x5e},
+ subYX: fp.Elt{0xa3, 0x9c, 0x17, 0x52, 0x90, 0x61, 0x87, 0x7e, 0x85, 0x9f, 0x2c, 0x0b, 0x06, 0x0a, 0x1d, 0x57, 0x1e, 0x71, 0x99, 0x84, 0xa8, 0xba, 0xa2, 0x80, 0x38, 0xe6, 0xb2, 0x40, 0xdb, 0xf3, 0x20, 0x75},
+ dt2: fp.Elt{0xa1, 0x57, 0x93, 0xd3, 0xe3, 0x0b, 0xb5, 0x3d, 0xa5, 0x94, 0x9e, 0x59, 0xdd, 0x6c, 0x7b, 0x96, 0x6e, 0x1e, 0x31, 0xdf, 0x64, 0x9a, 0x30, 0x1a, 0x86, 0xc9, 0xf3, 0xce, 0x9c, 0x2c, 0x09, 0x71},
+ },
+ { /* 49P */
+ addYX: fp.Elt{0xcf, 0x1d, 0x05, 0x74, 0xac, 0xd8, 0x6b, 0x85, 0x1e, 0xaa, 0xb7, 0x55, 0x08, 0xa4, 0xf6, 0x03, 0xeb, 0x3c, 0x74, 0xc9, 0xcb, 0xe7, 0x4a, 0x3a, 0xde, 0xab, 0x37, 0x71, 0xbb, 0xa5, 0x73, 0x41},
+ subYX: fp.Elt{0x8c, 0x91, 0x64, 0x03, 0x3f, 0x52, 0xd8, 0x53, 0x1c, 0x6b, 0xab, 0x3f, 0xf4, 0x04, 0xb4, 0xa2, 0xa4, 0xe5, 0x81, 0x66, 0x9e, 0x4a, 0x0b, 0x08, 0xa7, 0x7b, 0x25, 0xd0, 0x03, 0x5b, 0xa1, 0x0e},
+ dt2: fp.Elt{0x8a, 0x21, 0xf9, 0xf0, 0x31, 0x6e, 0xc5, 0x17, 0x08, 0x47, 0xfc, 0x1a, 0x2b, 0x6e, 0x69, 0x5a, 0x76, 0xf1, 0xb2, 0xf4, 0x68, 0x16, 0x93, 0xf7, 0x67, 0x3a, 0x4e, 0x4a, 0x61, 0x65, 0xc5, 0x5f},
+ },
+ { /* 51P */
+ addYX: fp.Elt{0x8e, 0x98, 0x90, 0x77, 0xe6, 0xe1, 0x92, 0x48, 0x22, 0xd7, 0x5c, 0x1c, 0x0f, 0x95, 0xd5, 0x01, 0xed, 0x3e, 0x92, 0xe5, 0x9a, 0x81, 0xb0, 0xe3, 0x1b, 0x65, 0x46, 0x9d, 0x40, 0xc7, 0x14, 0x32},
+ subYX: fp.Elt{0xe5, 0x7a, 0x6d, 0xc4, 0x0d, 0x57, 0x6e, 0x13, 0x8f, 0xdc, 0xf8, 0x54, 0xcc, 0xaa, 0xd0, 0x0f, 0x86, 0xad, 0x0d, 0x31, 0x03, 0x9f, 0x54, 0x59, 0xa1, 0x4a, 0x45, 0x4c, 0x41, 0x1c, 0x71, 0x62},
+ dt2: fp.Elt{0x70, 0x17, 0x65, 0x06, 0x74, 0x82, 0x29, 0x13, 0x36, 0x94, 0x27, 0x8a, 0x66, 0xa0, 0xa4, 0x3b, 0x3c, 0x22, 0x5d, 0x18, 0xec, 0xb8, 0xb6, 0xd9, 0x3c, 0x83, 0xcb, 0x3e, 0x07, 0x94, 0xea, 0x5b},
+ },
+ { /* 53P */
+ addYX: fp.Elt{0xf8, 0xd2, 0x43, 0xf3, 0x63, 0xce, 0x70, 0xb4, 0xf1, 0xe8, 0x43, 0x05, 0x8f, 0xba, 0x67, 0x00, 0x6f, 0x7b, 0x11, 0xa2, 0xa1, 0x51, 0xda, 0x35, 0x2f, 0xbd, 0xf1, 0x44, 0x59, 0x78, 0xd0, 0x4a},
+ subYX: fp.Elt{0xe4, 0x9b, 0xc8, 0x12, 0x09, 0xbf, 0x1d, 0x64, 0x9c, 0x57, 0x6e, 0x7d, 0x31, 0x8b, 0xf3, 0xac, 0x65, 0xb0, 0x97, 0xf6, 0x02, 0x9e, 0xfe, 0xab, 0xec, 0x1e, 0xf6, 0x48, 0xc1, 0xd5, 0xac, 0x3a},
+ dt2: fp.Elt{0x01, 0x83, 0x31, 0xc3, 0x34, 0x3b, 0x8e, 0x85, 0x26, 0x68, 0x31, 0x07, 0x47, 0xc0, 0x99, 0xdc, 0x8c, 0xa8, 0x9d, 0xd3, 0x2e, 0x5b, 0x08, 0x34, 0x3d, 0x85, 0x02, 0xd9, 0xb1, 0x0c, 0xff, 0x3a},
+ },
+ { /* 55P */
+ addYX: fp.Elt{0x05, 0x35, 0xc5, 0xf4, 0x0b, 0x43, 0x26, 0x92, 0x83, 0x22, 0x1f, 0x26, 0x13, 0x9c, 0xe4, 0x68, 0xc6, 0x27, 0xd3, 0x8f, 0x78, 0x33, 0xef, 0x09, 0x7f, 0x9e, 0xd9, 0x2b, 0x73, 0x9f, 0xcf, 0x2c},
+ subYX: fp.Elt{0x5e, 0x40, 0x20, 0x3a, 0xeb, 0xc7, 0xc5, 0x87, 0xc9, 0x56, 0xad, 0xed, 0xef, 0x11, 0xe3, 0x8e, 0xf9, 0xd5, 0x29, 0xad, 0x48, 0x2e, 0x25, 0x29, 0x1d, 0x25, 0xcd, 0xf4, 0x86, 0x7e, 0x0e, 0x11},
+ dt2: fp.Elt{0xe4, 0xf5, 0x03, 0xd6, 0x9e, 0xd8, 0xc0, 0x57, 0x0c, 0x20, 0xb0, 0xf0, 0x28, 0x86, 0x88, 0x12, 0xb7, 0x3b, 0x2e, 0xa0, 0x09, 0x27, 0x17, 0x53, 0x37, 0x3a, 0x69, 0xb9, 0xe0, 0x57, 0xc5, 0x05},
+ },
+ { /* 57P */
+ addYX: fp.Elt{0xb0, 0x0e, 0xc2, 0x89, 0xb0, 0xbb, 0x76, 0xf7, 0x5c, 0xd8, 0x0f, 0xfa, 0xf6, 0x5b, 0xf8, 0x61, 0xfb, 0x21, 0x44, 0x63, 0x4e, 0x3f, 0xb9, 0xb6, 0x05, 0x12, 0x86, 0x41, 0x08, 0xef, 0x9f, 0x28},
+ subYX: fp.Elt{0x6f, 0x7e, 0xc9, 0x1f, 0x31, 0xce, 0xf9, 0xd8, 0xae, 0xfd, 0xf9, 0x11, 0x30, 0x26, 0x3f, 0x7a, 0xdd, 0x25, 0xed, 0x8b, 0xa0, 0x7e, 0x5b, 0xe1, 0x5a, 0x87, 0xe9, 0x8f, 0x17, 0x4c, 0x15, 0x6e},
+ dt2: fp.Elt{0xbf, 0x9a, 0xd6, 0xfe, 0x36, 0x63, 0x61, 0xcf, 0x4f, 0xc9, 0x35, 0x83, 0xe7, 0xe4, 0x16, 0x9b, 0xe7, 0x7f, 0x3a, 0x75, 0x65, 0x97, 0x78, 0x13, 0x19, 0xa3, 0x5c, 0xa9, 0x42, 0xf6, 0xfb, 0x6a},
+ },
+ { /* 59P */
+ addYX: fp.Elt{0xcc, 0xa8, 0x13, 0xf9, 0x70, 0x50, 0xe5, 0x5d, 0x61, 0xf5, 0x0c, 0x2b, 0x7b, 0x16, 0x1d, 0x7d, 0x89, 0xd4, 0xea, 0x90, 0xb6, 0x56, 0x29, 0xda, 0xd9, 0x1e, 0x80, 0xdb, 0xce, 0x93, 0xc0, 0x12},
+ subYX: fp.Elt{0xc1, 0xd2, 0xf5, 0x62, 0x0c, 0xde, 0xa8, 0x7d, 0x9a, 0x7b, 0x0e, 0xb0, 0xa4, 0x3d, 0xfc, 0x98, 0xe0, 0x70, 0xad, 0x0d, 0xda, 0x6a, 0xeb, 0x7d, 0xc4, 0x38, 0x50, 0xb9, 0x51, 0xb8, 0xb4, 0x0d},
+ dt2: fp.Elt{0x0f, 0x19, 0xb8, 0x08, 0x93, 0x7f, 0x14, 0xfc, 0x10, 0xe3, 0x1a, 0xa1, 0xa0, 0x9d, 0x96, 0x06, 0xfd, 0xd7, 0xc7, 0xda, 0x72, 0x55, 0xe7, 0xce, 0xe6, 0x5c, 0x63, 0xc6, 0x99, 0x87, 0xaa, 0x33},
+ },
+ { /* 61P */
+ addYX: fp.Elt{0xb1, 0x6c, 0x15, 0xfc, 0x88, 0xf5, 0x48, 0x83, 0x27, 0x6d, 0x0a, 0x1a, 0x9b, 0xba, 0xa2, 0x6d, 0xb6, 0x5a, 0xca, 0x87, 0x5c, 0x2d, 0x26, 0xe2, 0xa6, 0x89, 0xd5, 0xc8, 0xc1, 0xd0, 0x2c, 0x21},
+ subYX: fp.Elt{0xf2, 0x5c, 0x08, 0xbd, 0x1e, 0xf5, 0x0f, 0xaf, 0x1f, 0x3f, 0xd3, 0x67, 0x89, 0x1a, 0xf5, 0x78, 0x3c, 0x03, 0x60, 0x50, 0xe1, 0xbf, 0xc2, 0x6e, 0x86, 0x1a, 0xe2, 0xe8, 0x29, 0x6f, 0x3c, 0x23},
+ dt2: fp.Elt{0x81, 0xc7, 0x18, 0x7f, 0x10, 0xd5, 0xf4, 0xd2, 0x28, 0x9d, 0x7e, 0x52, 0xf2, 0xcd, 0x2e, 0x12, 0x41, 0x33, 0x3d, 0x3d, 0x2a, 0x86, 0x0a, 0xa7, 0xe3, 0x4c, 0x91, 0x11, 0x89, 0x77, 0xb7, 0x1d},
+ },
+ { /* 63P */
+ addYX: fp.Elt{0xb6, 0x1a, 0x70, 0xdd, 0x69, 0x47, 0x39, 0xb3, 0xa5, 0x8d, 0xcf, 0x19, 0xd4, 0xde, 0xb8, 0xe2, 0x52, 0xc8, 0x2a, 0xfd, 0x61, 0x41, 0xdf, 0x15, 0xbe, 0x24, 0x7d, 0x01, 0x8a, 0xca, 0xe2, 0x7a},
+ subYX: fp.Elt{0x6f, 0xc2, 0x6b, 0x7c, 0x39, 0x52, 0xf3, 0xdd, 0x13, 0x01, 0xd5, 0x53, 0xcc, 0xe2, 0x97, 0x7a, 0x30, 0xa3, 0x79, 0xbf, 0x3a, 0xf4, 0x74, 0x7c, 0xfc, 0xad, 0xe2, 0x26, 0xad, 0x97, 0xad, 0x31},
+ dt2: fp.Elt{0x62, 0xb9, 0x20, 0x09, 0xed, 0x17, 0xe8, 0xb7, 0x9d, 0xda, 0x19, 0x3f, 0xcc, 0x18, 0x85, 0x1e, 0x64, 0x0a, 0x56, 0x25, 0x4f, 0xc1, 0x91, 0xe4, 0x83, 0x2c, 0x62, 0xa6, 0x53, 0xfc, 0xd1, 0x1e},
+ },
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go b/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go
new file mode 100644
index 000000000..c368b181b
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed448/ed448.go
@@ -0,0 +1,411 @@
+// Package ed448 implements Ed448 signature scheme as described in RFC-8032.
+//
+// This package implements two signature variants.
+//
+// | Scheme Name | Sign Function | Verification | Context |
+// |-------------|-------------------|---------------|-------------------|
+// | Ed448 | Sign | Verify | Yes, can be empty |
+// | Ed448Ph | SignPh | VerifyPh | Yes, can be empty |
+// | All above | (PrivateKey).Sign | VerifyAny | As above |
+//
+// Specific functions for sign and verify are defined. A generic signing
+// function for all schemes is available through the crypto.Signer interface,
+// which is implemented by the PrivateKey type. A correspond all-in-one
+// verification method is provided by the VerifyAny function.
+//
+// Both schemes require a context string for domain separation. This parameter
+// is passed using a SignerOptions struct defined in this package.
+//
+// References:
+//
+// - RFC8032: https://rfc-editor.org/rfc/rfc8032.txt
+// - EdDSA for more curves: https://eprint.iacr.org/2015/677
+// - High-speed high-security signatures: https://doi.org/10.1007/s13389-012-0027-1
+package ed448
+
+import (
+ "bytes"
+ "crypto"
+ cryptoRand "crypto/rand"
+ "crypto/subtle"
+ "errors"
+ "fmt"
+ "io"
+ "strconv"
+
+ "github.com/cloudflare/circl/ecc/goldilocks"
+ "github.com/cloudflare/circl/internal/sha3"
+ "github.com/cloudflare/circl/sign"
+)
+
+const (
+ // ContextMaxSize is the maximum length (in bytes) allowed for context.
+ ContextMaxSize = 255
+ // PublicKeySize is the length in bytes of Ed448 public keys.
+ PublicKeySize = 57
+ // PrivateKeySize is the length in bytes of Ed448 private keys.
+ PrivateKeySize = 114
+ // SignatureSize is the length in bytes of signatures.
+ SignatureSize = 114
+ // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
+ SeedSize = 57
+)
+
+const (
+ paramB = 456 / 8 // Size of keys in bytes.
+ hashSize = 2 * paramB // Size of the hash function's output.
+)
+
+// SignerOptions implements crypto.SignerOpts and augments with parameters
+// that are specific to the Ed448 signature schemes.
+type SignerOptions struct {
+ // Hash must be crypto.Hash(0) for both Ed448 and Ed448Ph.
+ crypto.Hash
+
+ // Context is an optional domain separation string for signing.
+ // Its length must be less or equal than 255 bytes.
+ Context string
+
+ // Scheme is an identifier for choosing a signature scheme.
+ Scheme SchemeID
+}
+
+// SchemeID is an identifier for each signature scheme.
+type SchemeID uint
+
+const (
+ ED448 SchemeID = iota
+ ED448Ph
+)
+
+// PublicKey is the type of Ed448 public keys.
+type PublicKey []byte
+
+// Equal reports whether pub and x have the same value.
+func (pub PublicKey) Equal(x crypto.PublicKey) bool {
+ xx, ok := x.(PublicKey)
+ return ok && bytes.Equal(pub, xx)
+}
+
+// PrivateKey is the type of Ed448 private keys. It implements crypto.Signer.
+type PrivateKey []byte
+
+// Equal reports whether priv and x have the same value.
+func (priv PrivateKey) Equal(x crypto.PrivateKey) bool {
+ xx, ok := x.(PrivateKey)
+ return ok && subtle.ConstantTimeCompare(priv, xx) == 1
+}
+
+// Public returns the PublicKey corresponding to priv.
+func (priv PrivateKey) Public() crypto.PublicKey {
+ publicKey := make([]byte, PublicKeySize)
+ copy(publicKey, priv[SeedSize:])
+ return PublicKey(publicKey)
+}
+
+// Seed returns the private key seed corresponding to priv. It is provided for
+// interoperability with RFC 8032. RFC 8032's private keys correspond to seeds
+// in this package.
+func (priv PrivateKey) Seed() []byte {
+ seed := make([]byte, SeedSize)
+ copy(seed, priv[:SeedSize])
+ return seed
+}
+
+func (priv PrivateKey) Scheme() sign.Scheme { return sch }
+
+func (pub PublicKey) Scheme() sign.Scheme { return sch }
+
+func (priv PrivateKey) MarshalBinary() (data []byte, err error) {
+ privateKey := make(PrivateKey, PrivateKeySize)
+ copy(privateKey, priv)
+ return privateKey, nil
+}
+
+func (pub PublicKey) MarshalBinary() (data []byte, err error) {
+ publicKey := make(PublicKey, PublicKeySize)
+ copy(publicKey, pub)
+ return publicKey, nil
+}
+
+// Sign creates a signature of a message given a key pair.
+// This function supports all the two signature variants defined in RFC-8032,
+// namely Ed448 (or pure EdDSA) and Ed448Ph.
+// The opts.HashFunc() must return zero to the specify Ed448 variant. This can
+// be achieved by passing crypto.Hash(0) as the value for opts.
+// Use an Options struct to pass a bool indicating that the ed448Ph variant
+// should be used.
+// The struct can also be optionally used to pass a context string for signing.
+func (priv PrivateKey) Sign(
+ rand io.Reader,
+ message []byte,
+ opts crypto.SignerOpts,
+) (signature []byte, err error) {
+ var ctx string
+ var scheme SchemeID
+
+ if o, ok := opts.(SignerOptions); ok {
+ ctx = o.Context
+ scheme = o.Scheme
+ }
+
+ switch true {
+ case scheme == ED448 && opts.HashFunc() == crypto.Hash(0):
+ return Sign(priv, message, ctx), nil
+ case scheme == ED448Ph && opts.HashFunc() == crypto.Hash(0):
+ return SignPh(priv, message, ctx), nil
+ default:
+ return nil, errors.New("ed448: bad hash algorithm")
+ }
+}
+
+// GenerateKey generates a public/private key pair using entropy from rand.
+// If rand is nil, crypto/rand.Reader will be used.
+func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) {
+ if rand == nil {
+ rand = cryptoRand.Reader
+ }
+
+ seed := make(PrivateKey, SeedSize)
+ if _, err := io.ReadFull(rand, seed); err != nil {
+ return nil, nil, err
+ }
+
+ privateKey := NewKeyFromSeed(seed)
+ publicKey := make([]byte, PublicKeySize)
+ copy(publicKey, privateKey[SeedSize:])
+
+ return publicKey, privateKey, nil
+}
+
+// NewKeyFromSeed calculates a private key from a seed. It will panic if
+// len(seed) is not SeedSize. This function is provided for interoperability
+// with RFC 8032. RFC 8032's private keys correspond to seeds in this
+// package.
+func NewKeyFromSeed(seed []byte) PrivateKey {
+ privateKey := make([]byte, PrivateKeySize)
+ newKeyFromSeed(privateKey, seed)
+ return privateKey
+}
+
+func newKeyFromSeed(privateKey, seed []byte) {
+ if l := len(seed); l != SeedSize {
+ panic("ed448: bad seed length: " + strconv.Itoa(l))
+ }
+
+ var h [hashSize]byte
+ H := sha3.NewShake256()
+ _, _ = H.Write(seed)
+ _, _ = H.Read(h[:])
+ s := &goldilocks.Scalar{}
+ deriveSecretScalar(s, h[:paramB])
+
+ copy(privateKey[:SeedSize], seed)
+ _ = goldilocks.Curve{}.ScalarBaseMult(s).ToBytes(privateKey[SeedSize:])
+}
+
+func signAll(signature []byte, privateKey PrivateKey, message, ctx []byte, preHash bool) {
+ if len(ctx) > ContextMaxSize {
+ panic(fmt.Errorf("ed448: bad context length: %v", len(ctx)))
+ }
+
+ H := sha3.NewShake256()
+ var PHM []byte
+
+ if preHash {
+ var h [64]byte
+ _, _ = H.Write(message)
+ _, _ = H.Read(h[:])
+ PHM = h[:]
+ H.Reset()
+ } else {
+ PHM = message
+ }
+
+ // 1. Hash the 57-byte private key using SHAKE256(x, 114).
+ var h [hashSize]byte
+ _, _ = H.Write(privateKey[:SeedSize])
+ _, _ = H.Read(h[:])
+ s := &goldilocks.Scalar{}
+ deriveSecretScalar(s, h[:paramB])
+ prefix := h[paramB:]
+
+ // 2. Compute SHAKE256(dom4(F, C) || prefix || PH(M), 114).
+ var rPM [hashSize]byte
+ H.Reset()
+
+ writeDom(&H, ctx, preHash)
+
+ _, _ = H.Write(prefix)
+ _, _ = H.Write(PHM)
+ _, _ = H.Read(rPM[:])
+
+ // 3. Compute the point [r]B.
+ r := &goldilocks.Scalar{}
+ r.FromBytes(rPM[:])
+ R := (&[paramB]byte{})[:]
+ if err := (goldilocks.Curve{}.ScalarBaseMult(r).ToBytes(R)); err != nil {
+ panic(err)
+ }
+ // 4. Compute SHAKE256(dom4(F, C) || R || A || PH(M), 114)
+ var hRAM [hashSize]byte
+ H.Reset()
+
+ writeDom(&H, ctx, preHash)
+
+ _, _ = H.Write(R)
+ _, _ = H.Write(privateKey[SeedSize:])
+ _, _ = H.Write(PHM)
+ _, _ = H.Read(hRAM[:])
+
+ // 5. Compute S = (r + k * s) mod order.
+ k := &goldilocks.Scalar{}
+ k.FromBytes(hRAM[:])
+ S := &goldilocks.Scalar{}
+ S.Mul(k, s)
+ S.Add(S, r)
+
+ // 6. The signature is the concatenation of R and S.
+ copy(signature[:paramB], R[:])
+ copy(signature[paramB:], S[:])
+}
+
+// Sign signs the message with privateKey and returns a signature.
+// This function supports the signature variant defined in RFC-8032: Ed448,
+// also known as the pure version of EdDSA.
+// It will panic if len(privateKey) is not PrivateKeySize.
+func Sign(priv PrivateKey, message []byte, ctx string) []byte {
+ signature := make([]byte, SignatureSize)
+ signAll(signature, priv, message, []byte(ctx), false)
+ return signature
+}
+
+// SignPh creates a signature of a message given a keypair.
+// This function supports the signature variant defined in RFC-8032: Ed448ph,
+// meaning it internally hashes the message using SHAKE-256.
+// Context could be passed to this function, which length should be no more than
+// 255. It can be empty.
+func SignPh(priv PrivateKey, message []byte, ctx string) []byte {
+ signature := make([]byte, SignatureSize)
+ signAll(signature, priv, message, []byte(ctx), true)
+ return signature
+}
+
+func verify(public PublicKey, message, signature, ctx []byte, preHash bool) bool {
+ if len(public) != PublicKeySize ||
+ len(signature) != SignatureSize ||
+ len(ctx) > ContextMaxSize ||
+ !isLessThanOrder(signature[paramB:]) {
+ return false
+ }
+
+ P, err := goldilocks.FromBytes(public)
+ if err != nil {
+ return false
+ }
+
+ H := sha3.NewShake256()
+ var PHM []byte
+
+ if preHash {
+ var h [64]byte
+ _, _ = H.Write(message)
+ _, _ = H.Read(h[:])
+ PHM = h[:]
+ H.Reset()
+ } else {
+ PHM = message
+ }
+
+ var hRAM [hashSize]byte
+ R := signature[:paramB]
+
+ writeDom(&H, ctx, preHash)
+
+ _, _ = H.Write(R)
+ _, _ = H.Write(public)
+ _, _ = H.Write(PHM)
+ _, _ = H.Read(hRAM[:])
+
+ k := &goldilocks.Scalar{}
+ k.FromBytes(hRAM[:])
+ S := &goldilocks.Scalar{}
+ S.FromBytes(signature[paramB:])
+
+ encR := (&[paramB]byte{})[:]
+ P.Neg()
+ _ = goldilocks.Curve{}.CombinedMult(S, k, P).ToBytes(encR)
+ return bytes.Equal(R, encR)
+}
+
+// VerifyAny returns true if the signature is valid. Failure cases are invalid
+// signature, or when the public key cannot be decoded.
+// This function supports all the two signature variants defined in RFC-8032,
+// namely Ed448 (or pure EdDSA) and Ed448Ph.
+// The opts.HashFunc() must return zero, this can be achieved by passing
+// crypto.Hash(0) as the value for opts.
+// Use a SignerOptions struct to pass a context string for signing.
+func VerifyAny(public PublicKey, message, signature []byte, opts crypto.SignerOpts) bool {
+ var ctx string
+ var scheme SchemeID
+ if o, ok := opts.(SignerOptions); ok {
+ ctx = o.Context
+ scheme = o.Scheme
+ }
+
+ switch true {
+ case scheme == ED448 && opts.HashFunc() == crypto.Hash(0):
+ return Verify(public, message, signature, ctx)
+ case scheme == ED448Ph && opts.HashFunc() == crypto.Hash(0):
+ return VerifyPh(public, message, signature, ctx)
+ default:
+ return false
+ }
+}
+
+// Verify returns true if the signature is valid. Failure cases are invalid
+// signature, or when the public key cannot be decoded.
+// This function supports the signature variant defined in RFC-8032: Ed448,
+// also known as the pure version of EdDSA.
+func Verify(public PublicKey, message, signature []byte, ctx string) bool {
+ return verify(public, message, signature, []byte(ctx), false)
+}
+
+// VerifyPh returns true if the signature is valid. Failure cases are invalid
+// signature, or when the public key cannot be decoded.
+// This function supports the signature variant defined in RFC-8032: Ed448ph,
+// meaning it internally hashes the message using SHAKE-256.
+// Context could be passed to this function, which length should be no more than
+// 255. It can be empty.
+func VerifyPh(public PublicKey, message, signature []byte, ctx string) bool {
+ return verify(public, message, signature, []byte(ctx), true)
+}
+
+func deriveSecretScalar(s *goldilocks.Scalar, h []byte) {
+ h[0] &= 0xFC // The two least significant bits of the first octet are cleared,
+ h[paramB-1] = 0x00 // all eight bits the last octet are cleared, and
+ h[paramB-2] |= 0x80 // the highest bit of the second to last octet is set.
+ s.FromBytes(h[:paramB])
+}
+
+// isLessThanOrder returns true if 0 <= x < order and if the last byte of x is zero.
+func isLessThanOrder(x []byte) bool {
+ order := goldilocks.Curve{}.Order()
+ i := len(order) - 1
+ for i > 0 && x[i] == order[i] {
+ i--
+ }
+ return x[paramB-1] == 0 && x[i] < order[i]
+}
+
+func writeDom(h io.Writer, ctx []byte, preHash bool) {
+ dom4 := "SigEd448"
+ _, _ = h.Write([]byte(dom4))
+
+ if preHash {
+ _, _ = h.Write([]byte{byte(0x01), byte(len(ctx))})
+ } else {
+ _, _ = h.Write([]byte{byte(0x00), byte(len(ctx))})
+ }
+ _, _ = h.Write(ctx)
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/ed448/signapi.go b/vendor/github.com/cloudflare/circl/sign/ed448/signapi.go
new file mode 100644
index 000000000..22da8bc0a
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/ed448/signapi.go
@@ -0,0 +1,87 @@
+package ed448
+
+import (
+ "crypto/rand"
+ "encoding/asn1"
+
+ "github.com/cloudflare/circl/sign"
+)
+
+var sch sign.Scheme = &scheme{}
+
+// Scheme returns a signature interface.
+func Scheme() sign.Scheme { return sch }
+
+type scheme struct{}
+
+func (*scheme) Name() string { return "Ed448" }
+func (*scheme) PublicKeySize() int { return PublicKeySize }
+func (*scheme) PrivateKeySize() int { return PrivateKeySize }
+func (*scheme) SignatureSize() int { return SignatureSize }
+func (*scheme) SeedSize() int { return SeedSize }
+func (*scheme) TLSIdentifier() uint { return 0x0808 }
+func (*scheme) SupportsContext() bool { return true }
+func (*scheme) Oid() asn1.ObjectIdentifier {
+ return asn1.ObjectIdentifier{1, 3, 101, 113}
+}
+
+func (*scheme) GenerateKey() (sign.PublicKey, sign.PrivateKey, error) {
+ return GenerateKey(rand.Reader)
+}
+
+func (*scheme) Sign(
+ sk sign.PrivateKey,
+ message []byte,
+ opts *sign.SignatureOpts,
+) []byte {
+ priv, ok := sk.(PrivateKey)
+ if !ok {
+ panic(sign.ErrTypeMismatch)
+ }
+ ctx := ""
+ if opts != nil {
+ ctx = opts.Context
+ }
+ return Sign(priv, message, ctx)
+}
+
+func (*scheme) Verify(
+ pk sign.PublicKey,
+ message, signature []byte,
+ opts *sign.SignatureOpts,
+) bool {
+ pub, ok := pk.(PublicKey)
+ if !ok {
+ panic(sign.ErrTypeMismatch)
+ }
+ ctx := ""
+ if opts != nil {
+ ctx = opts.Context
+ }
+ return Verify(pub, message, signature, ctx)
+}
+
+func (*scheme) DeriveKey(seed []byte) (sign.PublicKey, sign.PrivateKey) {
+ privateKey := NewKeyFromSeed(seed)
+ publicKey := make(PublicKey, PublicKeySize)
+ copy(publicKey, privateKey[SeedSize:])
+ return publicKey, privateKey
+}
+
+func (*scheme) UnmarshalBinaryPublicKey(buf []byte) (sign.PublicKey, error) {
+ if len(buf) < PublicKeySize {
+ return nil, sign.ErrPubKeySize
+ }
+ pub := make(PublicKey, PublicKeySize)
+ copy(pub, buf[:PublicKeySize])
+ return pub, nil
+}
+
+func (*scheme) UnmarshalBinaryPrivateKey(buf []byte) (sign.PrivateKey, error) {
+ if len(buf) < PrivateKeySize {
+ return nil, sign.ErrPrivKeySize
+ }
+ priv := make(PrivateKey, PrivateKeySize)
+ copy(priv, buf[:PrivateKeySize])
+ return priv, nil
+}
diff --git a/vendor/github.com/cloudflare/circl/sign/sign.go b/vendor/github.com/cloudflare/circl/sign/sign.go
new file mode 100644
index 000000000..557d6f096
--- /dev/null
+++ b/vendor/github.com/cloudflare/circl/sign/sign.go
@@ -0,0 +1,113 @@
+// Package sign provides unified interfaces for signature schemes.
+//
+// A register of schemes is available in the package
+//
+// github.com/cloudflare/circl/sign/schemes
+package sign
+
+import (
+ "crypto"
+ "encoding"
+ "errors"
+)
+
+type SignatureOpts struct {
+ // If non-empty, includes the given context in the signature if supported
+ // and will cause an error during signing otherwise.
+ Context string
+}
+
+// A public key is used to verify a signature set by the corresponding private
+// key.
+type PublicKey interface {
+ // Returns the signature scheme for this public key.
+ Scheme() Scheme
+ Equal(crypto.PublicKey) bool
+ encoding.BinaryMarshaler
+ crypto.PublicKey
+}
+
+// A private key allows one to create signatures.
+type PrivateKey interface {
+ // Returns the signature scheme for this private key.
+ Scheme() Scheme
+ Equal(crypto.PrivateKey) bool
+ // For compatibility with Go standard library
+ crypto.Signer
+ crypto.PrivateKey
+ encoding.BinaryMarshaler
+}
+
+// A Scheme represents a specific instance of a signature scheme.
+type Scheme interface {
+ // Name of the scheme.
+ Name() string
+
+ // GenerateKey creates a new key-pair.
+ GenerateKey() (PublicKey, PrivateKey, error)
+
+ // Creates a signature using the PrivateKey on the given message and
+ // returns the signature. opts are additional options which can be nil.
+ //
+ // Panics if key is nil or wrong type or opts context is not supported.
+ Sign(sk PrivateKey, message []byte, opts *SignatureOpts) []byte
+
+ // Checks whether the given signature is a valid signature set by
+ // the private key corresponding to the given public key on the
+ // given message. opts are additional options which can be nil.
+ //
+ // Panics if key is nil or wrong type or opts context is not supported.
+ Verify(pk PublicKey, message []byte, signature []byte, opts *SignatureOpts) bool
+
+ // Deterministically derives a keypair from a seed. If you're unsure,
+ // you're better off using GenerateKey().
+ //
+ // Panics if seed is not of length SeedSize().
+ DeriveKey(seed []byte) (PublicKey, PrivateKey)
+
+ // Unmarshals a PublicKey from the provided buffer.
+ UnmarshalBinaryPublicKey([]byte) (PublicKey, error)
+
+ // Unmarshals a PublicKey from the provided buffer.
+ UnmarshalBinaryPrivateKey([]byte) (PrivateKey, error)
+
+ // Size of binary marshalled public keys.
+ PublicKeySize() int
+
+ // Size of binary marshalled public keys.
+ PrivateKeySize() int
+
+ // Size of signatures.
+ SignatureSize() int
+
+ // Size of seeds.
+ SeedSize() int
+
+ // Returns whether contexts are supported.
+ SupportsContext() bool
+}
+
+var (
+ // ErrTypeMismatch is the error used if types of, for instance, private
+ // and public keys don't match.
+ ErrTypeMismatch = errors.New("types mismatch")
+
+ // ErrSeedSize is the error used if the provided seed is of the wrong
+ // size.
+ ErrSeedSize = errors.New("wrong seed size")
+
+ // ErrPubKeySize is the error used if the provided public key is of
+ // the wrong size.
+ ErrPubKeySize = errors.New("wrong size for public key")
+
+ // ErrPrivKeySize is the error used if the provided private key is of
+ // the wrong size.
+ ErrPrivKeySize = errors.New("wrong size for private key")
+
+ // ErrContextNotSupported is the error used if a context is not
+ // supported.
+ ErrContextNotSupported = errors.New("context not supported")
+
+ // ErrContextTooLong is the error used if the context string is too long.
+ ErrContextTooLong = errors.New("context string too long")
+)
diff --git a/vendor/github.com/cncf/xds/go/LICENSE b/vendor/github.com/cncf/xds/go/LICENSE
new file mode 100644
index 000000000..261eeb9e9
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/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/github.com/cncf/xds/go/udpa/annotations/migrate.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.go
new file mode 100644
index 000000000..0281b3ee5
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.go
@@ -0,0 +1,411 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: udpa/annotations/migrate.proto
+
+package annotations
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type MigrateAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"`
+}
+
+func (x *MigrateAnnotation) Reset() {
+ *x = MigrateAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_udpa_annotations_migrate_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MigrateAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MigrateAnnotation) ProtoMessage() {}
+
+func (x *MigrateAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_udpa_annotations_migrate_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MigrateAnnotation.ProtoReflect.Descriptor instead.
+func (*MigrateAnnotation) Descriptor() ([]byte, []int) {
+ return file_udpa_annotations_migrate_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *MigrateAnnotation) GetRename() string {
+ if x != nil {
+ return x.Rename
+ }
+ return ""
+}
+
+type FieldMigrateAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"`
+ OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"`
+}
+
+func (x *FieldMigrateAnnotation) Reset() {
+ *x = FieldMigrateAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_udpa_annotations_migrate_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FieldMigrateAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldMigrateAnnotation) ProtoMessage() {}
+
+func (x *FieldMigrateAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_udpa_annotations_migrate_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FieldMigrateAnnotation.ProtoReflect.Descriptor instead.
+func (*FieldMigrateAnnotation) Descriptor() ([]byte, []int) {
+ return file_udpa_annotations_migrate_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *FieldMigrateAnnotation) GetRename() string {
+ if x != nil {
+ return x.Rename
+ }
+ return ""
+}
+
+func (x *FieldMigrateAnnotation) GetOneofPromotion() string {
+ if x != nil {
+ return x.OneofPromotion
+ }
+ return ""
+}
+
+type FileMigrateAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"`
+}
+
+func (x *FileMigrateAnnotation) Reset() {
+ *x = FileMigrateAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_udpa_annotations_migrate_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FileMigrateAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileMigrateAnnotation) ProtoMessage() {}
+
+func (x *FileMigrateAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_udpa_annotations_migrate_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FileMigrateAnnotation.ProtoReflect.Descriptor instead.
+func (*FileMigrateAnnotation) Descriptor() ([]byte, []int) {
+ return file_udpa_annotations_migrate_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *FileMigrateAnnotation) GetMoveToPackage() string {
+ if x != nil {
+ return x.MoveToPackage
+ }
+ return ""
+}
+
+var file_udpa_annotations_migrate_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.MessageOptions)(nil),
+ ExtensionType: (*MigrateAnnotation)(nil),
+ Field: 171962766,
+ Name: "udpa.annotations.message_migrate",
+ Tag: "bytes,171962766,opt,name=message_migrate",
+ Filename: "udpa/annotations/migrate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
+ ExtensionType: (*FieldMigrateAnnotation)(nil),
+ Field: 171962766,
+ Name: "udpa.annotations.field_migrate",
+ Tag: "bytes,171962766,opt,name=field_migrate",
+ Filename: "udpa/annotations/migrate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.EnumOptions)(nil),
+ ExtensionType: (*MigrateAnnotation)(nil),
+ Field: 171962766,
+ Name: "udpa.annotations.enum_migrate",
+ Tag: "bytes,171962766,opt,name=enum_migrate",
+ Filename: "udpa/annotations/migrate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
+ ExtensionType: (*MigrateAnnotation)(nil),
+ Field: 171962766,
+ Name: "udpa.annotations.enum_value_migrate",
+ Tag: "bytes,171962766,opt,name=enum_value_migrate",
+ Filename: "udpa/annotations/migrate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.FileOptions)(nil),
+ ExtensionType: (*FileMigrateAnnotation)(nil),
+ Field: 171962766,
+ Name: "udpa.annotations.file_migrate",
+ Tag: "bytes,171962766,opt,name=file_migrate",
+ Filename: "udpa/annotations/migrate.proto",
+ },
+}
+
+// Extension fields to descriptorpb.MessageOptions.
+var (
+ // optional udpa.annotations.MigrateAnnotation message_migrate = 171962766;
+ E_MessageMigrate = &file_udpa_annotations_migrate_proto_extTypes[0]
+)
+
+// Extension fields to descriptorpb.FieldOptions.
+var (
+ // optional udpa.annotations.FieldMigrateAnnotation field_migrate = 171962766;
+ E_FieldMigrate = &file_udpa_annotations_migrate_proto_extTypes[1]
+)
+
+// Extension fields to descriptorpb.EnumOptions.
+var (
+ // optional udpa.annotations.MigrateAnnotation enum_migrate = 171962766;
+ E_EnumMigrate = &file_udpa_annotations_migrate_proto_extTypes[2]
+)
+
+// Extension fields to descriptorpb.EnumValueOptions.
+var (
+ // optional udpa.annotations.MigrateAnnotation enum_value_migrate = 171962766;
+ E_EnumValueMigrate = &file_udpa_annotations_migrate_proto_extTypes[3]
+)
+
+// Extension fields to descriptorpb.FileOptions.
+var (
+ // optional udpa.annotations.FileMigrateAnnotation file_migrate = 171962766;
+ E_FileMigrate = &file_udpa_annotations_migrate_proto_extTypes[4]
+)
+
+var File_udpa_annotations_migrate_proto protoreflect.FileDescriptor
+
+var file_udpa_annotations_migrate_proto_rawDesc = []byte{
+ 0x0a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d,
+ 0x65, 0x22, 0x59, 0x0a, 0x16, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74,
+ 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72,
+ 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x70, 0x72, 0x6f,
+ 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x6e,
+ 0x65, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x15,
+ 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x74, 0x6f,
+ 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
+ 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x3a, 0x70, 0x0a,
+ 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
+ 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x75, 0x64, 0x70,
+ 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x69,
+ 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a,
+ 0x6f, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
+ 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69, 0x65, 0x6c,
+ 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
+ 0x3a, 0x67, 0x0a, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
+ 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x8e,
+ 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61,
+ 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x65, 0x6e,
+ 0x75, 0x6d, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x77, 0x0a, 0x12, 0x65, 0x6e, 0x75,
+ 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12,
+ 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x75, 0x64,
+ 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x4d,
+ 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x10, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61,
+ 0x74, 0x65, 0x3a, 0x6b, 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61,
+ 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x8e, 0xe3, 0xff, 0x51, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x75, 0x64, 0x70, 0x61,
+ 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69, 0x6c,
+ 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x42,
+ 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
+ 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
+}
+
+var (
+ file_udpa_annotations_migrate_proto_rawDescOnce sync.Once
+ file_udpa_annotations_migrate_proto_rawDescData = file_udpa_annotations_migrate_proto_rawDesc
+)
+
+func file_udpa_annotations_migrate_proto_rawDescGZIP() []byte {
+ file_udpa_annotations_migrate_proto_rawDescOnce.Do(func() {
+ file_udpa_annotations_migrate_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_migrate_proto_rawDescData)
+ })
+ return file_udpa_annotations_migrate_proto_rawDescData
+}
+
+var file_udpa_annotations_migrate_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_udpa_annotations_migrate_proto_goTypes = []interface{}{
+ (*MigrateAnnotation)(nil), // 0: udpa.annotations.MigrateAnnotation
+ (*FieldMigrateAnnotation)(nil), // 1: udpa.annotations.FieldMigrateAnnotation
+ (*FileMigrateAnnotation)(nil), // 2: udpa.annotations.FileMigrateAnnotation
+ (*descriptorpb.MessageOptions)(nil), // 3: google.protobuf.MessageOptions
+ (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions
+ (*descriptorpb.EnumOptions)(nil), // 5: google.protobuf.EnumOptions
+ (*descriptorpb.EnumValueOptions)(nil), // 6: google.protobuf.EnumValueOptions
+ (*descriptorpb.FileOptions)(nil), // 7: google.protobuf.FileOptions
+}
+var file_udpa_annotations_migrate_proto_depIdxs = []int32{
+ 3, // 0: udpa.annotations.message_migrate:extendee -> google.protobuf.MessageOptions
+ 4, // 1: udpa.annotations.field_migrate:extendee -> google.protobuf.FieldOptions
+ 5, // 2: udpa.annotations.enum_migrate:extendee -> google.protobuf.EnumOptions
+ 6, // 3: udpa.annotations.enum_value_migrate:extendee -> google.protobuf.EnumValueOptions
+ 7, // 4: udpa.annotations.file_migrate:extendee -> google.protobuf.FileOptions
+ 0, // 5: udpa.annotations.message_migrate:type_name -> udpa.annotations.MigrateAnnotation
+ 1, // 6: udpa.annotations.field_migrate:type_name -> udpa.annotations.FieldMigrateAnnotation
+ 0, // 7: udpa.annotations.enum_migrate:type_name -> udpa.annotations.MigrateAnnotation
+ 0, // 8: udpa.annotations.enum_value_migrate:type_name -> udpa.annotations.MigrateAnnotation
+ 2, // 9: udpa.annotations.file_migrate:type_name -> udpa.annotations.FileMigrateAnnotation
+ 10, // [10:10] is the sub-list for method output_type
+ 10, // [10:10] is the sub-list for method input_type
+ 5, // [5:10] is the sub-list for extension type_name
+ 0, // [0:5] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_udpa_annotations_migrate_proto_init() }
+func file_udpa_annotations_migrate_proto_init() {
+ if File_udpa_annotations_migrate_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_udpa_annotations_migrate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MigrateAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_udpa_annotations_migrate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FieldMigrateAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_udpa_annotations_migrate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FileMigrateAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_udpa_annotations_migrate_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 5,
+ NumServices: 0,
+ },
+ GoTypes: file_udpa_annotations_migrate_proto_goTypes,
+ DependencyIndexes: file_udpa_annotations_migrate_proto_depIdxs,
+ MessageInfos: file_udpa_annotations_migrate_proto_msgTypes,
+ ExtensionInfos: file_udpa_annotations_migrate_proto_extTypes,
+ }.Build()
+ File_udpa_annotations_migrate_proto = out.File
+ file_udpa_annotations_migrate_proto_rawDesc = nil
+ file_udpa_annotations_migrate_proto_goTypes = nil
+ file_udpa_annotations_migrate_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.validate.go
new file mode 100644
index 000000000..38196d5eb
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/migrate.pb.validate.go
@@ -0,0 +1,350 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: udpa/annotations/migrate.proto
+
+package annotations
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on MigrateAnnotation with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *MigrateAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MigrateAnnotationMultiError, or nil if none found.
+func (m *MigrateAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MigrateAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Rename
+
+ if len(errors) > 0 {
+ return MigrateAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// MigrateAnnotationMultiError is an error wrapping multiple validation errors
+// returned by MigrateAnnotation.ValidateAll() if the designated constraints
+// aren't met.
+type MigrateAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MigrateAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MigrateAnnotationMultiError) AllErrors() []error { return m }
+
+// MigrateAnnotationValidationError is the validation error returned by
+// MigrateAnnotation.Validate if the designated constraints aren't met.
+type MigrateAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MigrateAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MigrateAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MigrateAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MigrateAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MigrateAnnotationValidationError) ErrorName() string {
+ return "MigrateAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MigrateAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMigrateAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MigrateAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MigrateAnnotationValidationError{}
+
+// Validate checks the field values on FieldMigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *FieldMigrateAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FieldMigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FieldMigrateAnnotationMultiError, or nil if none found.
+func (m *FieldMigrateAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FieldMigrateAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Rename
+
+ // no validation rules for OneofPromotion
+
+ if len(errors) > 0 {
+ return FieldMigrateAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// FieldMigrateAnnotationMultiError is an error wrapping multiple validation
+// errors returned by FieldMigrateAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type FieldMigrateAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FieldMigrateAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FieldMigrateAnnotationMultiError) AllErrors() []error { return m }
+
+// FieldMigrateAnnotationValidationError is the validation error returned by
+// FieldMigrateAnnotation.Validate if the designated constraints aren't met.
+type FieldMigrateAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FieldMigrateAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FieldMigrateAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FieldMigrateAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FieldMigrateAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FieldMigrateAnnotationValidationError) ErrorName() string {
+ return "FieldMigrateAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FieldMigrateAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFieldMigrateAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FieldMigrateAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FieldMigrateAnnotationValidationError{}
+
+// Validate checks the field values on FileMigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *FileMigrateAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FileMigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FileMigrateAnnotationMultiError, or nil if none found.
+func (m *FileMigrateAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FileMigrateAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for MoveToPackage
+
+ if len(errors) > 0 {
+ return FileMigrateAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// FileMigrateAnnotationMultiError is an error wrapping multiple validation
+// errors returned by FileMigrateAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type FileMigrateAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FileMigrateAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FileMigrateAnnotationMultiError) AllErrors() []error { return m }
+
+// FileMigrateAnnotationValidationError is the validation error returned by
+// FileMigrateAnnotation.Validate if the designated constraints aren't met.
+type FileMigrateAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FileMigrateAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FileMigrateAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FileMigrateAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FileMigrateAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FileMigrateAnnotationValidationError) ErrorName() string {
+ return "FileMigrateAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FileMigrateAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFileMigrateAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FileMigrateAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FileMigrateAnnotationValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.go
new file mode 100644
index 000000000..cf858bd97
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.go
@@ -0,0 +1,196 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: udpa/annotations/security.proto
+
+package annotations
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type FieldSecurityAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"`
+ ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"`
+}
+
+func (x *FieldSecurityAnnotation) Reset() {
+ *x = FieldSecurityAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_udpa_annotations_security_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FieldSecurityAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldSecurityAnnotation) ProtoMessage() {}
+
+func (x *FieldSecurityAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_udpa_annotations_security_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FieldSecurityAnnotation.ProtoReflect.Descriptor instead.
+func (*FieldSecurityAnnotation) Descriptor() ([]byte, []int) {
+ return file_udpa_annotations_security_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FieldSecurityAnnotation) GetConfigureForUntrustedDownstream() bool {
+ if x != nil {
+ return x.ConfigureForUntrustedDownstream
+ }
+ return false
+}
+
+func (x *FieldSecurityAnnotation) GetConfigureForUntrustedUpstream() bool {
+ if x != nil {
+ return x.ConfigureForUntrustedUpstream
+ }
+ return false
+}
+
+var file_udpa_annotations_security_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
+ ExtensionType: (*FieldSecurityAnnotation)(nil),
+ Field: 11122993,
+ Name: "udpa.annotations.security",
+ Tag: "bytes,11122993,opt,name=security",
+ Filename: "udpa/annotations/security.proto",
+ },
+}
+
+// Extension fields to descriptorpb.FieldOptions.
+var (
+ // optional udpa.annotations.FieldSecurityAnnotation security = 11122993;
+ E_Security = &file_udpa_annotations_security_proto_extTypes[0]
+)
+
+var File_udpa_annotations_security_proto protoreflect.FileDescriptor
+
+var file_udpa_annotations_security_proto_rawDesc = []byte{
+ 0x0a, 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65,
+ 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x4b, 0x0a, 0x22, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6f,
+ 0x72, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e,
+ 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1f, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x6e, 0x74, 0x72, 0x75, 0x73,
+ 0x74, 0x65, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x47, 0x0a,
+ 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75,
+ 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61,
+ 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
+ 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x55, 0x70,
+ 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x67, 0x0a, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69,
+ 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0xb1, 0xf2, 0xa6, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x75, 0x64, 0x70,
+ 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x46, 0x69,
+ 0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x42,
+ 0x31, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x08, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67,
+ 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_udpa_annotations_security_proto_rawDescOnce sync.Once
+ file_udpa_annotations_security_proto_rawDescData = file_udpa_annotations_security_proto_rawDesc
+)
+
+func file_udpa_annotations_security_proto_rawDescGZIP() []byte {
+ file_udpa_annotations_security_proto_rawDescOnce.Do(func() {
+ file_udpa_annotations_security_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_security_proto_rawDescData)
+ })
+ return file_udpa_annotations_security_proto_rawDescData
+}
+
+var file_udpa_annotations_security_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_udpa_annotations_security_proto_goTypes = []interface{}{
+ (*FieldSecurityAnnotation)(nil), // 0: udpa.annotations.FieldSecurityAnnotation
+ (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
+}
+var file_udpa_annotations_security_proto_depIdxs = []int32{
+ 1, // 0: udpa.annotations.security:extendee -> google.protobuf.FieldOptions
+ 0, // 1: udpa.annotations.security:type_name -> udpa.annotations.FieldSecurityAnnotation
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 1, // [1:2] is the sub-list for extension type_name
+ 0, // [0:1] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_udpa_annotations_security_proto_init() }
+func file_udpa_annotations_security_proto_init() {
+ if File_udpa_annotations_security_proto != nil {
+ return
+ }
+ file_udpa_annotations_status_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_udpa_annotations_security_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FieldSecurityAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_udpa_annotations_security_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_udpa_annotations_security_proto_goTypes,
+ DependencyIndexes: file_udpa_annotations_security_proto_depIdxs,
+ MessageInfos: file_udpa_annotations_security_proto_msgTypes,
+ ExtensionInfos: file_udpa_annotations_security_proto_extTypes,
+ }.Build()
+ File_udpa_annotations_security_proto = out.File
+ file_udpa_annotations_security_proto_rawDesc = nil
+ file_udpa_annotations_security_proto_goTypes = nil
+ file_udpa_annotations_security_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.validate.go
new file mode 100644
index 000000000..acc9bd7a1
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/security.pb.validate.go
@@ -0,0 +1,142 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: udpa/annotations/security.proto
+
+package annotations
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on FieldSecurityAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *FieldSecurityAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FieldSecurityAnnotation with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FieldSecurityAnnotationMultiError, or nil if none found.
+func (m *FieldSecurityAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FieldSecurityAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for ConfigureForUntrustedDownstream
+
+ // no validation rules for ConfigureForUntrustedUpstream
+
+ if len(errors) > 0 {
+ return FieldSecurityAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// FieldSecurityAnnotationMultiError is an error wrapping multiple validation
+// errors returned by FieldSecurityAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type FieldSecurityAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FieldSecurityAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FieldSecurityAnnotationMultiError) AllErrors() []error { return m }
+
+// FieldSecurityAnnotationValidationError is the validation error returned by
+// FieldSecurityAnnotation.Validate if the designated constraints aren't met.
+type FieldSecurityAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FieldSecurityAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FieldSecurityAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FieldSecurityAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FieldSecurityAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FieldSecurityAnnotationValidationError) ErrorName() string {
+ return "FieldSecurityAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FieldSecurityAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFieldSecurityAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FieldSecurityAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FieldSecurityAnnotationValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.go
new file mode 100644
index 000000000..2d5c78dc2
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.go
@@ -0,0 +1,93 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: udpa/annotations/sensitive.proto
+
+package annotations
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+var file_udpa_annotations_sensitive_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 76569463,
+ Name: "udpa.annotations.sensitive",
+ Tag: "varint,76569463,opt,name=sensitive",
+ Filename: "udpa/annotations/sensitive.proto",
+ },
+}
+
+// Extension fields to descriptorpb.FieldOptions.
+var (
+ // optional bool sensitive = 76569463;
+ E_Sensitive = &file_udpa_annotations_sensitive_proto_extTypes[0]
+)
+
+var File_udpa_annotations_sensitive_proto protoreflect.FileDescriptor
+
+var file_udpa_annotations_sensitive_proto_rawDesc = []byte{
+ 0x0a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3e, 0x0a, 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74,
+ 0x69, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0xf7, 0xb6, 0xc1, 0x24, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x65, 0x6e,
+ 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f,
+ 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var file_udpa_annotations_sensitive_proto_goTypes = []interface{}{
+ (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions
+}
+var file_udpa_annotations_sensitive_proto_depIdxs = []int32{
+ 0, // 0: udpa.annotations.sensitive:extendee -> google.protobuf.FieldOptions
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 0, // [0:1] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_udpa_annotations_sensitive_proto_init() }
+func file_udpa_annotations_sensitive_proto_init() {
+ if File_udpa_annotations_sensitive_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_udpa_annotations_sensitive_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 0,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_udpa_annotations_sensitive_proto_goTypes,
+ DependencyIndexes: file_udpa_annotations_sensitive_proto_depIdxs,
+ ExtensionInfos: file_udpa_annotations_sensitive_proto_extTypes,
+ }.Build()
+ File_udpa_annotations_sensitive_proto = out.File
+ file_udpa_annotations_sensitive_proto_rawDesc = nil
+ file_udpa_annotations_sensitive_proto_goTypes = nil
+ file_udpa_annotations_sensitive_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.validate.go
new file mode 100644
index 000000000..f3fa61974
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/sensitive.pb.validate.go
@@ -0,0 +1,36 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: udpa/annotations/sensitive.proto
+
+package annotations
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.go
new file mode 100644
index 000000000..c96818b17
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.go
@@ -0,0 +1,253 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: udpa/annotations/status.proto
+
+package annotations
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PackageVersionStatus int32
+
+const (
+ PackageVersionStatus_UNKNOWN PackageVersionStatus = 0
+ PackageVersionStatus_FROZEN PackageVersionStatus = 1
+ PackageVersionStatus_ACTIVE PackageVersionStatus = 2
+ PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = 3
+)
+
+// Enum value maps for PackageVersionStatus.
+var (
+ PackageVersionStatus_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "FROZEN",
+ 2: "ACTIVE",
+ 3: "NEXT_MAJOR_VERSION_CANDIDATE",
+ }
+ PackageVersionStatus_value = map[string]int32{
+ "UNKNOWN": 0,
+ "FROZEN": 1,
+ "ACTIVE": 2,
+ "NEXT_MAJOR_VERSION_CANDIDATE": 3,
+ }
+)
+
+func (x PackageVersionStatus) Enum() *PackageVersionStatus {
+ p := new(PackageVersionStatus)
+ *p = x
+ return p
+}
+
+func (x PackageVersionStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PackageVersionStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_udpa_annotations_status_proto_enumTypes[0].Descriptor()
+}
+
+func (PackageVersionStatus) Type() protoreflect.EnumType {
+ return &file_udpa_annotations_status_proto_enumTypes[0]
+}
+
+func (x PackageVersionStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use PackageVersionStatus.Descriptor instead.
+func (PackageVersionStatus) EnumDescriptor() ([]byte, []int) {
+ return file_udpa_annotations_status_proto_rawDescGZIP(), []int{0}
+}
+
+type StatusAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
+ PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=udpa.annotations.PackageVersionStatus" json:"package_version_status,omitempty"`
+}
+
+func (x *StatusAnnotation) Reset() {
+ *x = StatusAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_udpa_annotations_status_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StatusAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StatusAnnotation) ProtoMessage() {}
+
+func (x *StatusAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_udpa_annotations_status_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StatusAnnotation.ProtoReflect.Descriptor instead.
+func (*StatusAnnotation) Descriptor() ([]byte, []int) {
+ return file_udpa_annotations_status_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *StatusAnnotation) GetWorkInProgress() bool {
+ if x != nil {
+ return x.WorkInProgress
+ }
+ return false
+}
+
+func (x *StatusAnnotation) GetPackageVersionStatus() PackageVersionStatus {
+ if x != nil {
+ return x.PackageVersionStatus
+ }
+ return PackageVersionStatus_UNKNOWN
+}
+
+var file_udpa_annotations_status_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.FileOptions)(nil),
+ ExtensionType: (*StatusAnnotation)(nil),
+ Field: 222707719,
+ Name: "udpa.annotations.file_status",
+ Tag: "bytes,222707719,opt,name=file_status",
+ Filename: "udpa/annotations/status.proto",
+ },
+}
+
+// Extension fields to descriptorpb.FileOptions.
+var (
+ // optional udpa.annotations.StatusAnnotation file_status = 222707719;
+ E_FileStatus = &file_udpa_annotations_status_proto_extTypes[0]
+)
+
+var File_udpa_annotations_status_proto protoreflect.FileDescriptor
+
+var file_udpa_annotations_status_proto_rawDesc = []byte{
+ 0x0a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
+ 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b,
+ 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65,
+ 0x73, 0x73, 0x12, 0x5c, 0x0a, 0x16, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x14, 0x70, 0x61, 0x63, 0x6b,
+ 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x2a, 0x5d, 0x0a, 0x14, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
+ 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, 0x4f, 0x5a, 0x45, 0x4e, 0x10,
+ 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x20, 0x0a,
+ 0x1c, 0x4e, 0x45, 0x58, 0x54, 0x5f, 0x4d, 0x41, 0x4a, 0x4f, 0x52, 0x5f, 0x56, 0x45, 0x52, 0x53,
+ 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x3a,
+ 0x64, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x87, 0x80, 0x99,
+ 0x6a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_udpa_annotations_status_proto_rawDescOnce sync.Once
+ file_udpa_annotations_status_proto_rawDescData = file_udpa_annotations_status_proto_rawDesc
+)
+
+func file_udpa_annotations_status_proto_rawDescGZIP() []byte {
+ file_udpa_annotations_status_proto_rawDescOnce.Do(func() {
+ file_udpa_annotations_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_status_proto_rawDescData)
+ })
+ return file_udpa_annotations_status_proto_rawDescData
+}
+
+var file_udpa_annotations_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_udpa_annotations_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_udpa_annotations_status_proto_goTypes = []interface{}{
+ (PackageVersionStatus)(0), // 0: udpa.annotations.PackageVersionStatus
+ (*StatusAnnotation)(nil), // 1: udpa.annotations.StatusAnnotation
+ (*descriptorpb.FileOptions)(nil), // 2: google.protobuf.FileOptions
+}
+var file_udpa_annotations_status_proto_depIdxs = []int32{
+ 0, // 0: udpa.annotations.StatusAnnotation.package_version_status:type_name -> udpa.annotations.PackageVersionStatus
+ 2, // 1: udpa.annotations.file_status:extendee -> google.protobuf.FileOptions
+ 1, // 2: udpa.annotations.file_status:type_name -> udpa.annotations.StatusAnnotation
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 2, // [2:3] is the sub-list for extension type_name
+ 1, // [1:2] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_udpa_annotations_status_proto_init() }
+func file_udpa_annotations_status_proto_init() {
+ if File_udpa_annotations_status_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_udpa_annotations_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StatusAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_udpa_annotations_status_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_udpa_annotations_status_proto_goTypes,
+ DependencyIndexes: file_udpa_annotations_status_proto_depIdxs,
+ EnumInfos: file_udpa_annotations_status_proto_enumTypes,
+ MessageInfos: file_udpa_annotations_status_proto_msgTypes,
+ ExtensionInfos: file_udpa_annotations_status_proto_extTypes,
+ }.Build()
+ File_udpa_annotations_status_proto = out.File
+ file_udpa_annotations_status_proto_rawDesc = nil
+ file_udpa_annotations_status_proto_goTypes = nil
+ file_udpa_annotations_status_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.validate.go
new file mode 100644
index 000000000..5633a8383
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/status.pb.validate.go
@@ -0,0 +1,140 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: udpa/annotations/status.proto
+
+package annotations
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on StatusAnnotation with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *StatusAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StatusAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// StatusAnnotationMultiError, or nil if none found.
+func (m *StatusAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StatusAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for WorkInProgress
+
+ // no validation rules for PackageVersionStatus
+
+ if len(errors) > 0 {
+ return StatusAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// StatusAnnotationMultiError is an error wrapping multiple validation errors
+// returned by StatusAnnotation.ValidateAll() if the designated constraints
+// aren't met.
+type StatusAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StatusAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StatusAnnotationMultiError) AllErrors() []error { return m }
+
+// StatusAnnotationValidationError is the validation error returned by
+// StatusAnnotation.Validate if the designated constraints aren't met.
+type StatusAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StatusAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StatusAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StatusAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StatusAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StatusAnnotationValidationError) ErrorName() string { return "StatusAnnotationValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StatusAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStatusAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StatusAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StatusAnnotationValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.go b/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.go
new file mode 100644
index 000000000..b3ab9e346
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.go
@@ -0,0 +1,179 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: udpa/annotations/versioning.proto
+
+package annotations
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type VersioningAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"`
+}
+
+func (x *VersioningAnnotation) Reset() {
+ *x = VersioningAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_udpa_annotations_versioning_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VersioningAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VersioningAnnotation) ProtoMessage() {}
+
+func (x *VersioningAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_udpa_annotations_versioning_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VersioningAnnotation.ProtoReflect.Descriptor instead.
+func (*VersioningAnnotation) Descriptor() ([]byte, []int) {
+ return file_udpa_annotations_versioning_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *VersioningAnnotation) GetPreviousMessageType() string {
+ if x != nil {
+ return x.PreviousMessageType
+ }
+ return ""
+}
+
+var file_udpa_annotations_versioning_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.MessageOptions)(nil),
+ ExtensionType: (*VersioningAnnotation)(nil),
+ Field: 7881811,
+ Name: "udpa.annotations.versioning",
+ Tag: "bytes,7881811,opt,name=versioning",
+ Filename: "udpa/annotations/versioning.proto",
+ },
+}
+
+// Extension fields to descriptorpb.MessageOptions.
+var (
+ // optional udpa.annotations.VersioningAnnotation versioning = 7881811;
+ E_Versioning = &file_udpa_annotations_versioning_proto_extTypes[0]
+)
+
+var File_udpa_annotations_versioning_proto protoreflect.FileDescriptor
+
+var file_udpa_annotations_versioning_proto_rawDesc = []byte{
+ 0x0a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
+ 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x32, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f, 0x6d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13,
+ 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54,
+ 0x79, 0x70, 0x65, 0x3a, 0x6a, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
+ 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0xd3, 0x88, 0xe1, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x75, 0x64,
+ 0x70, 0x61, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x56,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42,
+ 0x29, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
+ 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
+}
+
+var (
+ file_udpa_annotations_versioning_proto_rawDescOnce sync.Once
+ file_udpa_annotations_versioning_proto_rawDescData = file_udpa_annotations_versioning_proto_rawDesc
+)
+
+func file_udpa_annotations_versioning_proto_rawDescGZIP() []byte {
+ file_udpa_annotations_versioning_proto_rawDescOnce.Do(func() {
+ file_udpa_annotations_versioning_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_annotations_versioning_proto_rawDescData)
+ })
+ return file_udpa_annotations_versioning_proto_rawDescData
+}
+
+var file_udpa_annotations_versioning_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_udpa_annotations_versioning_proto_goTypes = []interface{}{
+ (*VersioningAnnotation)(nil), // 0: udpa.annotations.VersioningAnnotation
+ (*descriptorpb.MessageOptions)(nil), // 1: google.protobuf.MessageOptions
+}
+var file_udpa_annotations_versioning_proto_depIdxs = []int32{
+ 1, // 0: udpa.annotations.versioning:extendee -> google.protobuf.MessageOptions
+ 0, // 1: udpa.annotations.versioning:type_name -> udpa.annotations.VersioningAnnotation
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 1, // [1:2] is the sub-list for extension type_name
+ 0, // [0:1] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_udpa_annotations_versioning_proto_init() }
+func file_udpa_annotations_versioning_proto_init() {
+ if File_udpa_annotations_versioning_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_udpa_annotations_versioning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VersioningAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_udpa_annotations_versioning_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_udpa_annotations_versioning_proto_goTypes,
+ DependencyIndexes: file_udpa_annotations_versioning_proto_depIdxs,
+ MessageInfos: file_udpa_annotations_versioning_proto_msgTypes,
+ ExtensionInfos: file_udpa_annotations_versioning_proto_extTypes,
+ }.Build()
+ File_udpa_annotations_versioning_proto = out.File
+ file_udpa_annotations_versioning_proto_rawDesc = nil
+ file_udpa_annotations_versioning_proto_goTypes = nil
+ file_udpa_annotations_versioning_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.validate.go
new file mode 100644
index 000000000..5fd86baff
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/annotations/versioning.pb.validate.go
@@ -0,0 +1,140 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: udpa/annotations/versioning.proto
+
+package annotations
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on VersioningAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *VersioningAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on VersioningAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// VersioningAnnotationMultiError, or nil if none found.
+func (m *VersioningAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *VersioningAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for PreviousMessageType
+
+ if len(errors) > 0 {
+ return VersioningAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// VersioningAnnotationMultiError is an error wrapping multiple validation
+// errors returned by VersioningAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type VersioningAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m VersioningAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m VersioningAnnotationMultiError) AllErrors() []error { return m }
+
+// VersioningAnnotationValidationError is the validation error returned by
+// VersioningAnnotation.Validate if the designated constraints aren't met.
+type VersioningAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e VersioningAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e VersioningAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e VersioningAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e VersioningAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e VersioningAnnotationValidationError) ErrorName() string {
+ return "VersioningAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e VersioningAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sVersioningAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = VersioningAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = VersioningAnnotationValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/udpa/type/v1/typed_struct.pb.go b/vendor/github.com/cncf/xds/go/udpa/type/v1/typed_struct.pb.go
new file mode 100644
index 000000000..e8f23f785
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/type/v1/typed_struct.pb.go
@@ -0,0 +1,164 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: udpa/type/v1/typed_struct.proto
+
+package v1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type TypedStruct struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
+ Value *structpb.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *TypedStruct) Reset() {
+ *x = TypedStruct{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_udpa_type_v1_typed_struct_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TypedStruct) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TypedStruct) ProtoMessage() {}
+
+func (x *TypedStruct) ProtoReflect() protoreflect.Message {
+ mi := &file_udpa_type_v1_typed_struct_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TypedStruct.ProtoReflect.Descriptor instead.
+func (*TypedStruct) Descriptor() ([]byte, []int) {
+ return file_udpa_type_v1_typed_struct_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TypedStruct) GetTypeUrl() string {
+ if x != nil {
+ return x.TypeUrl
+ }
+ return ""
+}
+
+func (x *TypedStruct) GetValue() *structpb.Struct {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+var File_udpa_type_v1_typed_struct_proto protoreflect.FileDescriptor
+
+var file_udpa_type_v1_typed_struct_proto_rawDesc = []byte{
+ 0x0a, 0x1f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x74,
+ 0x79, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x0c, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x1a,
+ 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a,
+ 0x0b, 0x54, 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08,
+ 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+ 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x57, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x75, 0x64, 0x70, 0x61, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x10, 0x54, 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f,
+ 0x67, 0x6f, 0x2f, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x31, 0x62,
+ 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_udpa_type_v1_typed_struct_proto_rawDescOnce sync.Once
+ file_udpa_type_v1_typed_struct_proto_rawDescData = file_udpa_type_v1_typed_struct_proto_rawDesc
+)
+
+func file_udpa_type_v1_typed_struct_proto_rawDescGZIP() []byte {
+ file_udpa_type_v1_typed_struct_proto_rawDescOnce.Do(func() {
+ file_udpa_type_v1_typed_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_udpa_type_v1_typed_struct_proto_rawDescData)
+ })
+ return file_udpa_type_v1_typed_struct_proto_rawDescData
+}
+
+var file_udpa_type_v1_typed_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_udpa_type_v1_typed_struct_proto_goTypes = []interface{}{
+ (*TypedStruct)(nil), // 0: udpa.type.v1.TypedStruct
+ (*structpb.Struct)(nil), // 1: google.protobuf.Struct
+}
+var file_udpa_type_v1_typed_struct_proto_depIdxs = []int32{
+ 1, // 0: udpa.type.v1.TypedStruct.value:type_name -> google.protobuf.Struct
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_udpa_type_v1_typed_struct_proto_init() }
+func file_udpa_type_v1_typed_struct_proto_init() {
+ if File_udpa_type_v1_typed_struct_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_udpa_type_v1_typed_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TypedStruct); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_udpa_type_v1_typed_struct_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_udpa_type_v1_typed_struct_proto_goTypes,
+ DependencyIndexes: file_udpa_type_v1_typed_struct_proto_depIdxs,
+ MessageInfos: file_udpa_type_v1_typed_struct_proto_msgTypes,
+ }.Build()
+ File_udpa_type_v1_typed_struct_proto = out.File
+ file_udpa_type_v1_typed_struct_proto_rawDesc = nil
+ file_udpa_type_v1_typed_struct_proto_goTypes = nil
+ file_udpa_type_v1_typed_struct_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/udpa/type/v1/typed_struct.pb.validate.go b/vendor/github.com/cncf/xds/go/udpa/type/v1/typed_struct.pb.validate.go
new file mode 100644
index 000000000..e336fb4a7
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/udpa/type/v1/typed_struct.pb.validate.go
@@ -0,0 +1,166 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: udpa/type/v1/typed_struct.proto
+
+package v1
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on TypedStruct with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *TypedStruct) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TypedStruct with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in TypedStructMultiError, or
+// nil if none found.
+func (m *TypedStruct) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TypedStruct) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for TypeUrl
+
+ if all {
+ switch v := interface{}(m.GetValue()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TypedStructValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TypedStructValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TypedStructValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return TypedStructMultiError(errors)
+ }
+
+ return nil
+}
+
+// TypedStructMultiError is an error wrapping multiple validation errors
+// returned by TypedStruct.ValidateAll() if the designated constraints aren't met.
+type TypedStructMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TypedStructMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TypedStructMultiError) AllErrors() []error { return m }
+
+// TypedStructValidationError is the validation error returned by
+// TypedStruct.Validate if the designated constraints aren't met.
+type TypedStructValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TypedStructValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TypedStructValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TypedStructValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TypedStructValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TypedStructValidationError) ErrorName() string { return "TypedStructValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TypedStructValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTypedStruct.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TypedStructValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TypedStructValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.go
new file mode 100644
index 000000000..705a71e88
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.go
@@ -0,0 +1,412 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/annotations/v3/migrate.proto
+
+package v3
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type MigrateAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"`
+}
+
+func (x *MigrateAnnotation) Reset() {
+ *x = MigrateAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_annotations_v3_migrate_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MigrateAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MigrateAnnotation) ProtoMessage() {}
+
+func (x *MigrateAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_annotations_v3_migrate_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MigrateAnnotation.ProtoReflect.Descriptor instead.
+func (*MigrateAnnotation) Descriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_migrate_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *MigrateAnnotation) GetRename() string {
+ if x != nil {
+ return x.Rename
+ }
+ return ""
+}
+
+type FieldMigrateAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Rename string `protobuf:"bytes,1,opt,name=rename,proto3" json:"rename,omitempty"`
+ OneofPromotion string `protobuf:"bytes,2,opt,name=oneof_promotion,json=oneofPromotion,proto3" json:"oneof_promotion,omitempty"`
+}
+
+func (x *FieldMigrateAnnotation) Reset() {
+ *x = FieldMigrateAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_annotations_v3_migrate_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FieldMigrateAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldMigrateAnnotation) ProtoMessage() {}
+
+func (x *FieldMigrateAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_annotations_v3_migrate_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FieldMigrateAnnotation.ProtoReflect.Descriptor instead.
+func (*FieldMigrateAnnotation) Descriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_migrate_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *FieldMigrateAnnotation) GetRename() string {
+ if x != nil {
+ return x.Rename
+ }
+ return ""
+}
+
+func (x *FieldMigrateAnnotation) GetOneofPromotion() string {
+ if x != nil {
+ return x.OneofPromotion
+ }
+ return ""
+}
+
+type FileMigrateAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MoveToPackage string `protobuf:"bytes,2,opt,name=move_to_package,json=moveToPackage,proto3" json:"move_to_package,omitempty"`
+}
+
+func (x *FileMigrateAnnotation) Reset() {
+ *x = FileMigrateAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_annotations_v3_migrate_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FileMigrateAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileMigrateAnnotation) ProtoMessage() {}
+
+func (x *FileMigrateAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_annotations_v3_migrate_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FileMigrateAnnotation.ProtoReflect.Descriptor instead.
+func (*FileMigrateAnnotation) Descriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_migrate_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *FileMigrateAnnotation) GetMoveToPackage() string {
+ if x != nil {
+ return x.MoveToPackage
+ }
+ return ""
+}
+
+var file_xds_annotations_v3_migrate_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.MessageOptions)(nil),
+ ExtensionType: (*MigrateAnnotation)(nil),
+ Field: 112948430,
+ Name: "xds.annotations.v3.message_migrate",
+ Tag: "bytes,112948430,opt,name=message_migrate",
+ Filename: "xds/annotations/v3/migrate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
+ ExtensionType: (*FieldMigrateAnnotation)(nil),
+ Field: 112948430,
+ Name: "xds.annotations.v3.field_migrate",
+ Tag: "bytes,112948430,opt,name=field_migrate",
+ Filename: "xds/annotations/v3/migrate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.EnumOptions)(nil),
+ ExtensionType: (*MigrateAnnotation)(nil),
+ Field: 112948430,
+ Name: "xds.annotations.v3.enum_migrate",
+ Tag: "bytes,112948430,opt,name=enum_migrate",
+ Filename: "xds/annotations/v3/migrate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.EnumValueOptions)(nil),
+ ExtensionType: (*MigrateAnnotation)(nil),
+ Field: 112948430,
+ Name: "xds.annotations.v3.enum_value_migrate",
+ Tag: "bytes,112948430,opt,name=enum_value_migrate",
+ Filename: "xds/annotations/v3/migrate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.FileOptions)(nil),
+ ExtensionType: (*FileMigrateAnnotation)(nil),
+ Field: 112948430,
+ Name: "xds.annotations.v3.file_migrate",
+ Tag: "bytes,112948430,opt,name=file_migrate",
+ Filename: "xds/annotations/v3/migrate.proto",
+ },
+}
+
+// Extension fields to descriptorpb.MessageOptions.
+var (
+ // optional xds.annotations.v3.MigrateAnnotation message_migrate = 112948430;
+ E_MessageMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[0]
+)
+
+// Extension fields to descriptorpb.FieldOptions.
+var (
+ // optional xds.annotations.v3.FieldMigrateAnnotation field_migrate = 112948430;
+ E_FieldMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[1]
+)
+
+// Extension fields to descriptorpb.EnumOptions.
+var (
+ // optional xds.annotations.v3.MigrateAnnotation enum_migrate = 112948430;
+ E_EnumMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[2]
+)
+
+// Extension fields to descriptorpb.EnumValueOptions.
+var (
+ // optional xds.annotations.v3.MigrateAnnotation enum_value_migrate = 112948430;
+ E_EnumValueMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[3]
+)
+
+// Extension fields to descriptorpb.FileOptions.
+var (
+ // optional xds.annotations.v3.FileMigrateAnnotation file_migrate = 112948430;
+ E_FileMigrate = &file_xds_annotations_v3_migrate_proto_extTypes[4]
+)
+
+var File_xds_annotations_v3_migrate_proto protoreflect.FileDescriptor
+
+var file_xds_annotations_v3_migrate_proto_rawDesc = []byte{
+ 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x11, 0x4d, 0x69, 0x67, 0x72,
+ 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a,
+ 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72,
+ 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x59, 0x0a, 0x16, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69,
+ 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x06, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x6e, 0x65, 0x6f, 0x66,
+ 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0e, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x50, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x69, 0x6f, 0x6e,
+ 0x22, 0x3f, 0x0a, 0x15, 0x46, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x6f, 0x76,
+ 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x6f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
+ 0x65, 0x3a, 0x72, 0x0a, 0x0f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6d, 0x69, 0x67,
+ 0x72, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25,
+ 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4d, 0x69,
+ 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x71, 0x0a, 0x0d, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d,
+ 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a,
+ 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65,
+ 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c,
+ 0x64, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x69, 0x0a, 0x0c, 0x65, 0x6e, 0x75, 0x6d,
+ 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x25, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x4d, 0x69, 0x67, 0x72,
+ 0x61, 0x74, 0x65, 0x3a, 0x79, 0x0a, 0x12, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed,
+ 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61,
+ 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x65, 0x6e,
+ 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x3a, 0x6d,
+ 0x0a, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x12, 0x1c,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xce, 0xe9, 0xed,
+ 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4d,
+ 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x42, 0x2b, 0x5a,
+ 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66,
+ 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
+}
+
+var (
+ file_xds_annotations_v3_migrate_proto_rawDescOnce sync.Once
+ file_xds_annotations_v3_migrate_proto_rawDescData = file_xds_annotations_v3_migrate_proto_rawDesc
+)
+
+func file_xds_annotations_v3_migrate_proto_rawDescGZIP() []byte {
+ file_xds_annotations_v3_migrate_proto_rawDescOnce.Do(func() {
+ file_xds_annotations_v3_migrate_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_migrate_proto_rawDescData)
+ })
+ return file_xds_annotations_v3_migrate_proto_rawDescData
+}
+
+var file_xds_annotations_v3_migrate_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_xds_annotations_v3_migrate_proto_goTypes = []interface{}{
+ (*MigrateAnnotation)(nil), // 0: xds.annotations.v3.MigrateAnnotation
+ (*FieldMigrateAnnotation)(nil), // 1: xds.annotations.v3.FieldMigrateAnnotation
+ (*FileMigrateAnnotation)(nil), // 2: xds.annotations.v3.FileMigrateAnnotation
+ (*descriptorpb.MessageOptions)(nil), // 3: google.protobuf.MessageOptions
+ (*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions
+ (*descriptorpb.EnumOptions)(nil), // 5: google.protobuf.EnumOptions
+ (*descriptorpb.EnumValueOptions)(nil), // 6: google.protobuf.EnumValueOptions
+ (*descriptorpb.FileOptions)(nil), // 7: google.protobuf.FileOptions
+}
+var file_xds_annotations_v3_migrate_proto_depIdxs = []int32{
+ 3, // 0: xds.annotations.v3.message_migrate:extendee -> google.protobuf.MessageOptions
+ 4, // 1: xds.annotations.v3.field_migrate:extendee -> google.protobuf.FieldOptions
+ 5, // 2: xds.annotations.v3.enum_migrate:extendee -> google.protobuf.EnumOptions
+ 6, // 3: xds.annotations.v3.enum_value_migrate:extendee -> google.protobuf.EnumValueOptions
+ 7, // 4: xds.annotations.v3.file_migrate:extendee -> google.protobuf.FileOptions
+ 0, // 5: xds.annotations.v3.message_migrate:type_name -> xds.annotations.v3.MigrateAnnotation
+ 1, // 6: xds.annotations.v3.field_migrate:type_name -> xds.annotations.v3.FieldMigrateAnnotation
+ 0, // 7: xds.annotations.v3.enum_migrate:type_name -> xds.annotations.v3.MigrateAnnotation
+ 0, // 8: xds.annotations.v3.enum_value_migrate:type_name -> xds.annotations.v3.MigrateAnnotation
+ 2, // 9: xds.annotations.v3.file_migrate:type_name -> xds.annotations.v3.FileMigrateAnnotation
+ 10, // [10:10] is the sub-list for method output_type
+ 10, // [10:10] is the sub-list for method input_type
+ 5, // [5:10] is the sub-list for extension type_name
+ 0, // [0:5] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_xds_annotations_v3_migrate_proto_init() }
+func file_xds_annotations_v3_migrate_proto_init() {
+ if File_xds_annotations_v3_migrate_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_annotations_v3_migrate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MigrateAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_annotations_v3_migrate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FieldMigrateAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_annotations_v3_migrate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FileMigrateAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_annotations_v3_migrate_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 5,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_annotations_v3_migrate_proto_goTypes,
+ DependencyIndexes: file_xds_annotations_v3_migrate_proto_depIdxs,
+ MessageInfos: file_xds_annotations_v3_migrate_proto_msgTypes,
+ ExtensionInfos: file_xds_annotations_v3_migrate_proto_extTypes,
+ }.Build()
+ File_xds_annotations_v3_migrate_proto = out.File
+ file_xds_annotations_v3_migrate_proto_rawDesc = nil
+ file_xds_annotations_v3_migrate_proto_goTypes = nil
+ file_xds_annotations_v3_migrate_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.validate.go
new file mode 100644
index 000000000..d57d77824
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/migrate.pb.validate.go
@@ -0,0 +1,350 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/annotations/v3/migrate.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on MigrateAnnotation with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *MigrateAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MigrateAnnotationMultiError, or nil if none found.
+func (m *MigrateAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MigrateAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Rename
+
+ if len(errors) > 0 {
+ return MigrateAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// MigrateAnnotationMultiError is an error wrapping multiple validation errors
+// returned by MigrateAnnotation.ValidateAll() if the designated constraints
+// aren't met.
+type MigrateAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MigrateAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MigrateAnnotationMultiError) AllErrors() []error { return m }
+
+// MigrateAnnotationValidationError is the validation error returned by
+// MigrateAnnotation.Validate if the designated constraints aren't met.
+type MigrateAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MigrateAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MigrateAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MigrateAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MigrateAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MigrateAnnotationValidationError) ErrorName() string {
+ return "MigrateAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MigrateAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMigrateAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MigrateAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MigrateAnnotationValidationError{}
+
+// Validate checks the field values on FieldMigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *FieldMigrateAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FieldMigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FieldMigrateAnnotationMultiError, or nil if none found.
+func (m *FieldMigrateAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FieldMigrateAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Rename
+
+ // no validation rules for OneofPromotion
+
+ if len(errors) > 0 {
+ return FieldMigrateAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// FieldMigrateAnnotationMultiError is an error wrapping multiple validation
+// errors returned by FieldMigrateAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type FieldMigrateAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FieldMigrateAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FieldMigrateAnnotationMultiError) AllErrors() []error { return m }
+
+// FieldMigrateAnnotationValidationError is the validation error returned by
+// FieldMigrateAnnotation.Validate if the designated constraints aren't met.
+type FieldMigrateAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FieldMigrateAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FieldMigrateAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FieldMigrateAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FieldMigrateAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FieldMigrateAnnotationValidationError) ErrorName() string {
+ return "FieldMigrateAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FieldMigrateAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFieldMigrateAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FieldMigrateAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FieldMigrateAnnotationValidationError{}
+
+// Validate checks the field values on FileMigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *FileMigrateAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FileMigrateAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FileMigrateAnnotationMultiError, or nil if none found.
+func (m *FileMigrateAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FileMigrateAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for MoveToPackage
+
+ if len(errors) > 0 {
+ return FileMigrateAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// FileMigrateAnnotationMultiError is an error wrapping multiple validation
+// errors returned by FileMigrateAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type FileMigrateAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FileMigrateAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FileMigrateAnnotationMultiError) AllErrors() []error { return m }
+
+// FileMigrateAnnotationValidationError is the validation error returned by
+// FileMigrateAnnotation.Validate if the designated constraints aren't met.
+type FileMigrateAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FileMigrateAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FileMigrateAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FileMigrateAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FileMigrateAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FileMigrateAnnotationValidationError) ErrorName() string {
+ return "FileMigrateAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FileMigrateAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFileMigrateAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FileMigrateAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FileMigrateAnnotationValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.go
new file mode 100644
index 000000000..0278e5165
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.go
@@ -0,0 +1,197 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/annotations/v3/security.proto
+
+package v3
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type FieldSecurityAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ConfigureForUntrustedDownstream bool `protobuf:"varint,1,opt,name=configure_for_untrusted_downstream,json=configureForUntrustedDownstream,proto3" json:"configure_for_untrusted_downstream,omitempty"`
+ ConfigureForUntrustedUpstream bool `protobuf:"varint,2,opt,name=configure_for_untrusted_upstream,json=configureForUntrustedUpstream,proto3" json:"configure_for_untrusted_upstream,omitempty"`
+}
+
+func (x *FieldSecurityAnnotation) Reset() {
+ *x = FieldSecurityAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_annotations_v3_security_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FieldSecurityAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldSecurityAnnotation) ProtoMessage() {}
+
+func (x *FieldSecurityAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_annotations_v3_security_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FieldSecurityAnnotation.ProtoReflect.Descriptor instead.
+func (*FieldSecurityAnnotation) Descriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_security_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FieldSecurityAnnotation) GetConfigureForUntrustedDownstream() bool {
+ if x != nil {
+ return x.ConfigureForUntrustedDownstream
+ }
+ return false
+}
+
+func (x *FieldSecurityAnnotation) GetConfigureForUntrustedUpstream() bool {
+ if x != nil {
+ return x.ConfigureForUntrustedUpstream
+ }
+ return false
+}
+
+var file_xds_annotations_v3_security_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
+ ExtensionType: (*FieldSecurityAnnotation)(nil),
+ Field: 99044135,
+ Name: "xds.annotations.v3.security",
+ Tag: "bytes,99044135,opt,name=security",
+ Filename: "xds/annotations/v3/security.proto",
+ },
+}
+
+// Extension fields to descriptorpb.FieldOptions.
+var (
+ // optional xds.annotations.v3.FieldSecurityAnnotation security = 99044135;
+ E_Security = &file_xds_annotations_v3_security_proto_extTypes[0]
+)
+
+var File_xds_annotations_v3_security_proto protoreflect.FileDescriptor
+
+var file_xds_annotations_v3_security_proto_rawDesc = []byte{
+ 0x0a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x46,
+ 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x22, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x75, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65,
+ 0x64, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x1f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x46, 0x6f, 0x72,
+ 0x55, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72,
+ 0x65, 0x61, 0x6d, 0x12, 0x47, 0x0a, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65,
+ 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x75, 0x6e, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x75,
+ 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1d, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x65, 0x46, 0x6f, 0x72, 0x55, 0x6e, 0x74, 0x72, 0x75,
+ 0x73, 0x74, 0x65, 0x64, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x3a, 0x69, 0x0a, 0x08,
+ 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa7, 0x96, 0x9d, 0x2f, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x65, 0x63, 0x75, 0x72,
+ 0x69, 0x74, 0x79, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73,
+ 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x42, 0x33, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08,
+ 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
+ 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_annotations_v3_security_proto_rawDescOnce sync.Once
+ file_xds_annotations_v3_security_proto_rawDescData = file_xds_annotations_v3_security_proto_rawDesc
+)
+
+func file_xds_annotations_v3_security_proto_rawDescGZIP() []byte {
+ file_xds_annotations_v3_security_proto_rawDescOnce.Do(func() {
+ file_xds_annotations_v3_security_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_security_proto_rawDescData)
+ })
+ return file_xds_annotations_v3_security_proto_rawDescData
+}
+
+var file_xds_annotations_v3_security_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_annotations_v3_security_proto_goTypes = []interface{}{
+ (*FieldSecurityAnnotation)(nil), // 0: xds.annotations.v3.FieldSecurityAnnotation
+ (*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
+}
+var file_xds_annotations_v3_security_proto_depIdxs = []int32{
+ 1, // 0: xds.annotations.v3.security:extendee -> google.protobuf.FieldOptions
+ 0, // 1: xds.annotations.v3.security:type_name -> xds.annotations.v3.FieldSecurityAnnotation
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 1, // [1:2] is the sub-list for extension type_name
+ 0, // [0:1] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_xds_annotations_v3_security_proto_init() }
+func file_xds_annotations_v3_security_proto_init() {
+ if File_xds_annotations_v3_security_proto != nil {
+ return
+ }
+ file_xds_annotations_v3_status_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_annotations_v3_security_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FieldSecurityAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_annotations_v3_security_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_annotations_v3_security_proto_goTypes,
+ DependencyIndexes: file_xds_annotations_v3_security_proto_depIdxs,
+ MessageInfos: file_xds_annotations_v3_security_proto_msgTypes,
+ ExtensionInfos: file_xds_annotations_v3_security_proto_extTypes,
+ }.Build()
+ File_xds_annotations_v3_security_proto = out.File
+ file_xds_annotations_v3_security_proto_rawDesc = nil
+ file_xds_annotations_v3_security_proto_goTypes = nil
+ file_xds_annotations_v3_security_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.validate.go
new file mode 100644
index 000000000..ac0143f27
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/security.pb.validate.go
@@ -0,0 +1,142 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/annotations/v3/security.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on FieldSecurityAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *FieldSecurityAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FieldSecurityAnnotation with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FieldSecurityAnnotationMultiError, or nil if none found.
+func (m *FieldSecurityAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FieldSecurityAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for ConfigureForUntrustedDownstream
+
+ // no validation rules for ConfigureForUntrustedUpstream
+
+ if len(errors) > 0 {
+ return FieldSecurityAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// FieldSecurityAnnotationMultiError is an error wrapping multiple validation
+// errors returned by FieldSecurityAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type FieldSecurityAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FieldSecurityAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FieldSecurityAnnotationMultiError) AllErrors() []error { return m }
+
+// FieldSecurityAnnotationValidationError is the validation error returned by
+// FieldSecurityAnnotation.Validate if the designated constraints aren't met.
+type FieldSecurityAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FieldSecurityAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FieldSecurityAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FieldSecurityAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FieldSecurityAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FieldSecurityAnnotationValidationError) ErrorName() string {
+ return "FieldSecurityAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FieldSecurityAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFieldSecurityAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FieldSecurityAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FieldSecurityAnnotationValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.go
new file mode 100644
index 000000000..57161aab4
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.go
@@ -0,0 +1,93 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/annotations/v3/sensitive.proto
+
+package v3
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+var file_xds_annotations_v3_sensitive_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 61008053,
+ Name: "xds.annotations.v3.sensitive",
+ Tag: "varint,61008053,opt,name=sensitive",
+ Filename: "xds/annotations/v3/sensitive.proto",
+ },
+}
+
+// Extension fields to descriptorpb.FieldOptions.
+var (
+ // optional bool sensitive = 61008053;
+ E_Sensitive = &file_xds_annotations_v3_sensitive_proto_extTypes[0]
+)
+
+var File_xds_annotations_v3_sensitive_proto protoreflect.FileDescriptor
+
+var file_xds_annotations_v3_sensitive_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x3e, 0x0a, 0x09, 0x73, 0x65,
+ 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb5, 0xd1, 0x8b, 0x1d, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x09, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64,
+ 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var file_xds_annotations_v3_sensitive_proto_goTypes = []interface{}{
+ (*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions
+}
+var file_xds_annotations_v3_sensitive_proto_depIdxs = []int32{
+ 0, // 0: xds.annotations.v3.sensitive:extendee -> google.protobuf.FieldOptions
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 0, // [0:1] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_xds_annotations_v3_sensitive_proto_init() }
+func file_xds_annotations_v3_sensitive_proto_init() {
+ if File_xds_annotations_v3_sensitive_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_annotations_v3_sensitive_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 0,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_annotations_v3_sensitive_proto_goTypes,
+ DependencyIndexes: file_xds_annotations_v3_sensitive_proto_depIdxs,
+ ExtensionInfos: file_xds_annotations_v3_sensitive_proto_extTypes,
+ }.Build()
+ File_xds_annotations_v3_sensitive_proto = out.File
+ file_xds_annotations_v3_sensitive_proto_rawDesc = nil
+ file_xds_annotations_v3_sensitive_proto_goTypes = nil
+ file_xds_annotations_v3_sensitive_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.validate.go
new file mode 100644
index 000000000..c101d3acc
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/sensitive.pb.validate.go
@@ -0,0 +1,36 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/annotations/v3/sensitive.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.go
new file mode 100644
index 000000000..255d109fc
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.go
@@ -0,0 +1,495 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/annotations/v3/status.proto
+
+package v3
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PackageVersionStatus int32
+
+const (
+ PackageVersionStatus_UNKNOWN PackageVersionStatus = 0
+ PackageVersionStatus_FROZEN PackageVersionStatus = 1
+ PackageVersionStatus_ACTIVE PackageVersionStatus = 2
+ PackageVersionStatus_NEXT_MAJOR_VERSION_CANDIDATE PackageVersionStatus = 3
+)
+
+// Enum value maps for PackageVersionStatus.
+var (
+ PackageVersionStatus_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "FROZEN",
+ 2: "ACTIVE",
+ 3: "NEXT_MAJOR_VERSION_CANDIDATE",
+ }
+ PackageVersionStatus_value = map[string]int32{
+ "UNKNOWN": 0,
+ "FROZEN": 1,
+ "ACTIVE": 2,
+ "NEXT_MAJOR_VERSION_CANDIDATE": 3,
+ }
+)
+
+func (x PackageVersionStatus) Enum() *PackageVersionStatus {
+ p := new(PackageVersionStatus)
+ *p = x
+ return p
+}
+
+func (x PackageVersionStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PackageVersionStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_xds_annotations_v3_status_proto_enumTypes[0].Descriptor()
+}
+
+func (PackageVersionStatus) Type() protoreflect.EnumType {
+ return &file_xds_annotations_v3_status_proto_enumTypes[0]
+}
+
+func (x PackageVersionStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use PackageVersionStatus.Descriptor instead.
+func (PackageVersionStatus) EnumDescriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{0}
+}
+
+type FileStatusAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
+}
+
+func (x *FileStatusAnnotation) Reset() {
+ *x = FileStatusAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_annotations_v3_status_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FileStatusAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileStatusAnnotation) ProtoMessage() {}
+
+func (x *FileStatusAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_annotations_v3_status_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FileStatusAnnotation.ProtoReflect.Descriptor instead.
+func (*FileStatusAnnotation) Descriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FileStatusAnnotation) GetWorkInProgress() bool {
+ if x != nil {
+ return x.WorkInProgress
+ }
+ return false
+}
+
+type MessageStatusAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
+}
+
+func (x *MessageStatusAnnotation) Reset() {
+ *x = MessageStatusAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_annotations_v3_status_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MessageStatusAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageStatusAnnotation) ProtoMessage() {}
+
+func (x *MessageStatusAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_annotations_v3_status_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MessageStatusAnnotation.ProtoReflect.Descriptor instead.
+func (*MessageStatusAnnotation) Descriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *MessageStatusAnnotation) GetWorkInProgress() bool {
+ if x != nil {
+ return x.WorkInProgress
+ }
+ return false
+}
+
+type FieldStatusAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
+}
+
+func (x *FieldStatusAnnotation) Reset() {
+ *x = FieldStatusAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_annotations_v3_status_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FieldStatusAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldStatusAnnotation) ProtoMessage() {}
+
+func (x *FieldStatusAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_annotations_v3_status_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FieldStatusAnnotation.ProtoReflect.Descriptor instead.
+func (*FieldStatusAnnotation) Descriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *FieldStatusAnnotation) GetWorkInProgress() bool {
+ if x != nil {
+ return x.WorkInProgress
+ }
+ return false
+}
+
+type StatusAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ WorkInProgress bool `protobuf:"varint,1,opt,name=work_in_progress,json=workInProgress,proto3" json:"work_in_progress,omitempty"`
+ PackageVersionStatus PackageVersionStatus `protobuf:"varint,2,opt,name=package_version_status,json=packageVersionStatus,proto3,enum=xds.annotations.v3.PackageVersionStatus" json:"package_version_status,omitempty"`
+}
+
+func (x *StatusAnnotation) Reset() {
+ *x = StatusAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_annotations_v3_status_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StatusAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StatusAnnotation) ProtoMessage() {}
+
+func (x *StatusAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_annotations_v3_status_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StatusAnnotation.ProtoReflect.Descriptor instead.
+func (*StatusAnnotation) Descriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_status_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *StatusAnnotation) GetWorkInProgress() bool {
+ if x != nil {
+ return x.WorkInProgress
+ }
+ return false
+}
+
+func (x *StatusAnnotation) GetPackageVersionStatus() PackageVersionStatus {
+ if x != nil {
+ return x.PackageVersionStatus
+ }
+ return PackageVersionStatus_UNKNOWN
+}
+
+var file_xds_annotations_v3_status_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.FileOptions)(nil),
+ ExtensionType: (*FileStatusAnnotation)(nil),
+ Field: 226829418,
+ Name: "xds.annotations.v3.file_status",
+ Tag: "bytes,226829418,opt,name=file_status",
+ Filename: "xds/annotations/v3/status.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.MessageOptions)(nil),
+ ExtensionType: (*MessageStatusAnnotation)(nil),
+ Field: 226829418,
+ Name: "xds.annotations.v3.message_status",
+ Tag: "bytes,226829418,opt,name=message_status",
+ Filename: "xds/annotations/v3/status.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
+ ExtensionType: (*FieldStatusAnnotation)(nil),
+ Field: 226829418,
+ Name: "xds.annotations.v3.field_status",
+ Tag: "bytes,226829418,opt,name=field_status",
+ Filename: "xds/annotations/v3/status.proto",
+ },
+}
+
+// Extension fields to descriptorpb.FileOptions.
+var (
+ // optional xds.annotations.v3.FileStatusAnnotation file_status = 226829418;
+ E_FileStatus = &file_xds_annotations_v3_status_proto_extTypes[0]
+)
+
+// Extension fields to descriptorpb.MessageOptions.
+var (
+ // optional xds.annotations.v3.MessageStatusAnnotation message_status = 226829418;
+ E_MessageStatus = &file_xds_annotations_v3_status_proto_extTypes[1]
+)
+
+// Extension fields to descriptorpb.FieldOptions.
+var (
+ // optional xds.annotations.v3.FieldStatusAnnotation field_status = 226829418;
+ E_FieldStatus = &file_xds_annotations_v3_status_proto_extTypes[2]
+)
+
+var File_xds_annotations_v3_status_proto protoreflect.FileDescriptor
+
+var file_xds_annotations_v3_status_proto_rawDesc = []byte{
+ 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f,
+ 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x40, 0x0a, 0x14, 0x46, 0x69, 0x6c, 0x65, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72,
+ 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49,
+ 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x43, 0x0a, 0x17, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69, 0x6e, 0x5f,
+ 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e,
+ 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x22, 0x41,
+ 0x0a, 0x15, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f,
+ 0x69, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73,
+ 0x73, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x5f, 0x69,
+ 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x50, 0x72, 0x6f, 0x67, 0x72, 0x65, 0x73, 0x73,
+ 0x12, 0x5e, 0x0a, 0x16, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x14, 0x70, 0x61, 0x63, 0x6b,
+ 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x2a, 0x5d, 0x0a, 0x14, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e,
+ 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x52, 0x4f, 0x5a, 0x45, 0x4e, 0x10,
+ 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, 0x12, 0x20, 0x0a,
+ 0x1c, 0x4e, 0x45, 0x58, 0x54, 0x5f, 0x4d, 0x41, 0x4a, 0x4f, 0x52, 0x5f, 0x56, 0x45, 0x52, 0x53,
+ 0x49, 0x4f, 0x4e, 0x5f, 0x43, 0x41, 0x4e, 0x44, 0x49, 0x44, 0x41, 0x54, 0x45, 0x10, 0x03, 0x3a,
+ 0x6a, 0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xea, 0xc8, 0x94,
+ 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x76, 0x0a, 0x0e, 0x6d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1f, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xea,
+ 0xc8, 0x94, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x3a, 0x6e, 0x0a, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0xea, 0xc8, 0x94, 0x6c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x78, 0x64,
+ 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33,
+ 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x41, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64,
+ 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_annotations_v3_status_proto_rawDescOnce sync.Once
+ file_xds_annotations_v3_status_proto_rawDescData = file_xds_annotations_v3_status_proto_rawDesc
+)
+
+func file_xds_annotations_v3_status_proto_rawDescGZIP() []byte {
+ file_xds_annotations_v3_status_proto_rawDescOnce.Do(func() {
+ file_xds_annotations_v3_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_status_proto_rawDescData)
+ })
+ return file_xds_annotations_v3_status_proto_rawDescData
+}
+
+var file_xds_annotations_v3_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_xds_annotations_v3_status_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_xds_annotations_v3_status_proto_goTypes = []interface{}{
+ (PackageVersionStatus)(0), // 0: xds.annotations.v3.PackageVersionStatus
+ (*FileStatusAnnotation)(nil), // 1: xds.annotations.v3.FileStatusAnnotation
+ (*MessageStatusAnnotation)(nil), // 2: xds.annotations.v3.MessageStatusAnnotation
+ (*FieldStatusAnnotation)(nil), // 3: xds.annotations.v3.FieldStatusAnnotation
+ (*StatusAnnotation)(nil), // 4: xds.annotations.v3.StatusAnnotation
+ (*descriptorpb.FileOptions)(nil), // 5: google.protobuf.FileOptions
+ (*descriptorpb.MessageOptions)(nil), // 6: google.protobuf.MessageOptions
+ (*descriptorpb.FieldOptions)(nil), // 7: google.protobuf.FieldOptions
+}
+var file_xds_annotations_v3_status_proto_depIdxs = []int32{
+ 0, // 0: xds.annotations.v3.StatusAnnotation.package_version_status:type_name -> xds.annotations.v3.PackageVersionStatus
+ 5, // 1: xds.annotations.v3.file_status:extendee -> google.protobuf.FileOptions
+ 6, // 2: xds.annotations.v3.message_status:extendee -> google.protobuf.MessageOptions
+ 7, // 3: xds.annotations.v3.field_status:extendee -> google.protobuf.FieldOptions
+ 1, // 4: xds.annotations.v3.file_status:type_name -> xds.annotations.v3.FileStatusAnnotation
+ 2, // 5: xds.annotations.v3.message_status:type_name -> xds.annotations.v3.MessageStatusAnnotation
+ 3, // 6: xds.annotations.v3.field_status:type_name -> xds.annotations.v3.FieldStatusAnnotation
+ 7, // [7:7] is the sub-list for method output_type
+ 7, // [7:7] is the sub-list for method input_type
+ 4, // [4:7] is the sub-list for extension type_name
+ 1, // [1:4] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_xds_annotations_v3_status_proto_init() }
+func file_xds_annotations_v3_status_proto_init() {
+ if File_xds_annotations_v3_status_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_annotations_v3_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FileStatusAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_annotations_v3_status_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MessageStatusAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_annotations_v3_status_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FieldStatusAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_annotations_v3_status_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StatusAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_annotations_v3_status_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 4,
+ NumExtensions: 3,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_annotations_v3_status_proto_goTypes,
+ DependencyIndexes: file_xds_annotations_v3_status_proto_depIdxs,
+ EnumInfos: file_xds_annotations_v3_status_proto_enumTypes,
+ MessageInfos: file_xds_annotations_v3_status_proto_msgTypes,
+ ExtensionInfos: file_xds_annotations_v3_status_proto_extTypes,
+ }.Build()
+ File_xds_annotations_v3_status_proto = out.File
+ file_xds_annotations_v3_status_proto_rawDesc = nil
+ file_xds_annotations_v3_status_proto_goTypes = nil
+ file_xds_annotations_v3_status_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.validate.go
new file mode 100644
index 000000000..a87dbee8d
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/status.pb.validate.go
@@ -0,0 +1,452 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/annotations/v3/status.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on FileStatusAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *FileStatusAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FileStatusAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FileStatusAnnotationMultiError, or nil if none found.
+func (m *FileStatusAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FileStatusAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for WorkInProgress
+
+ if len(errors) > 0 {
+ return FileStatusAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// FileStatusAnnotationMultiError is an error wrapping multiple validation
+// errors returned by FileStatusAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type FileStatusAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FileStatusAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FileStatusAnnotationMultiError) AllErrors() []error { return m }
+
+// FileStatusAnnotationValidationError is the validation error returned by
+// FileStatusAnnotation.Validate if the designated constraints aren't met.
+type FileStatusAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FileStatusAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FileStatusAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FileStatusAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FileStatusAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FileStatusAnnotationValidationError) ErrorName() string {
+ return "FileStatusAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FileStatusAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFileStatusAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FileStatusAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FileStatusAnnotationValidationError{}
+
+// Validate checks the field values on MessageStatusAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *MessageStatusAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MessageStatusAnnotation with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MessageStatusAnnotationMultiError, or nil if none found.
+func (m *MessageStatusAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MessageStatusAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for WorkInProgress
+
+ if len(errors) > 0 {
+ return MessageStatusAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// MessageStatusAnnotationMultiError is an error wrapping multiple validation
+// errors returned by MessageStatusAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type MessageStatusAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MessageStatusAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MessageStatusAnnotationMultiError) AllErrors() []error { return m }
+
+// MessageStatusAnnotationValidationError is the validation error returned by
+// MessageStatusAnnotation.Validate if the designated constraints aren't met.
+type MessageStatusAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MessageStatusAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MessageStatusAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MessageStatusAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MessageStatusAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MessageStatusAnnotationValidationError) ErrorName() string {
+ return "MessageStatusAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MessageStatusAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMessageStatusAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MessageStatusAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MessageStatusAnnotationValidationError{}
+
+// Validate checks the field values on FieldStatusAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *FieldStatusAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FieldStatusAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FieldStatusAnnotationMultiError, or nil if none found.
+func (m *FieldStatusAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FieldStatusAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for WorkInProgress
+
+ if len(errors) > 0 {
+ return FieldStatusAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// FieldStatusAnnotationMultiError is an error wrapping multiple validation
+// errors returned by FieldStatusAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type FieldStatusAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FieldStatusAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FieldStatusAnnotationMultiError) AllErrors() []error { return m }
+
+// FieldStatusAnnotationValidationError is the validation error returned by
+// FieldStatusAnnotation.Validate if the designated constraints aren't met.
+type FieldStatusAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FieldStatusAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FieldStatusAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FieldStatusAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FieldStatusAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FieldStatusAnnotationValidationError) ErrorName() string {
+ return "FieldStatusAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FieldStatusAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFieldStatusAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FieldStatusAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FieldStatusAnnotationValidationError{}
+
+// Validate checks the field values on StatusAnnotation with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *StatusAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StatusAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// StatusAnnotationMultiError, or nil if none found.
+func (m *StatusAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StatusAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for WorkInProgress
+
+ // no validation rules for PackageVersionStatus
+
+ if len(errors) > 0 {
+ return StatusAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// StatusAnnotationMultiError is an error wrapping multiple validation errors
+// returned by StatusAnnotation.ValidateAll() if the designated constraints
+// aren't met.
+type StatusAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StatusAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StatusAnnotationMultiError) AllErrors() []error { return m }
+
+// StatusAnnotationValidationError is the validation error returned by
+// StatusAnnotation.Validate if the designated constraints aren't met.
+type StatusAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StatusAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StatusAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StatusAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StatusAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StatusAnnotationValidationError) ErrorName() string { return "StatusAnnotationValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StatusAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStatusAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StatusAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StatusAnnotationValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.go
new file mode 100644
index 000000000..2de032f15
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.go
@@ -0,0 +1,179 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/annotations/v3/versioning.proto
+
+package v3
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type VersioningAnnotation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PreviousMessageType string `protobuf:"bytes,1,opt,name=previous_message_type,json=previousMessageType,proto3" json:"previous_message_type,omitempty"`
+}
+
+func (x *VersioningAnnotation) Reset() {
+ *x = VersioningAnnotation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_annotations_v3_versioning_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *VersioningAnnotation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*VersioningAnnotation) ProtoMessage() {}
+
+func (x *VersioningAnnotation) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_annotations_v3_versioning_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use VersioningAnnotation.ProtoReflect.Descriptor instead.
+func (*VersioningAnnotation) Descriptor() ([]byte, []int) {
+ return file_xds_annotations_v3_versioning_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *VersioningAnnotation) GetPreviousMessageType() string {
+ if x != nil {
+ return x.PreviousMessageType
+ }
+ return ""
+}
+
+var file_xds_annotations_v3_versioning_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.MessageOptions)(nil),
+ ExtensionType: (*VersioningAnnotation)(nil),
+ Field: 92389011,
+ Name: "xds.annotations.v3.versioning",
+ Tag: "bytes,92389011,opt,name=versioning",
+ Filename: "xds/annotations/v3/versioning.proto",
+ },
+}
+
+// Extension fields to descriptorpb.MessageOptions.
+var (
+ // optional xds.annotations.v3.VersioningAnnotation versioning = 92389011;
+ E_Versioning = &file_xds_annotations_v3_versioning_proto_extTypes[0]
+)
+
+var File_xds_annotations_v3_versioning_proto protoreflect.FileDescriptor
+
+var file_xds_annotations_v3_versioning_proto_rawDesc = []byte{
+ 0x0a, 0x23, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4a, 0x0a, 0x14, 0x56,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x5f,
+ 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x13, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x4d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x6c, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x93, 0xfd, 0x86, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x41,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0x2b, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f,
+ 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_annotations_v3_versioning_proto_rawDescOnce sync.Once
+ file_xds_annotations_v3_versioning_proto_rawDescData = file_xds_annotations_v3_versioning_proto_rawDesc
+)
+
+func file_xds_annotations_v3_versioning_proto_rawDescGZIP() []byte {
+ file_xds_annotations_v3_versioning_proto_rawDescOnce.Do(func() {
+ file_xds_annotations_v3_versioning_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_annotations_v3_versioning_proto_rawDescData)
+ })
+ return file_xds_annotations_v3_versioning_proto_rawDescData
+}
+
+var file_xds_annotations_v3_versioning_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_annotations_v3_versioning_proto_goTypes = []interface{}{
+ (*VersioningAnnotation)(nil), // 0: xds.annotations.v3.VersioningAnnotation
+ (*descriptorpb.MessageOptions)(nil), // 1: google.protobuf.MessageOptions
+}
+var file_xds_annotations_v3_versioning_proto_depIdxs = []int32{
+ 1, // 0: xds.annotations.v3.versioning:extendee -> google.protobuf.MessageOptions
+ 0, // 1: xds.annotations.v3.versioning:type_name -> xds.annotations.v3.VersioningAnnotation
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 1, // [1:2] is the sub-list for extension type_name
+ 0, // [0:1] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_xds_annotations_v3_versioning_proto_init() }
+func file_xds_annotations_v3_versioning_proto_init() {
+ if File_xds_annotations_v3_versioning_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_annotations_v3_versioning_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*VersioningAnnotation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_annotations_v3_versioning_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 1,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_annotations_v3_versioning_proto_goTypes,
+ DependencyIndexes: file_xds_annotations_v3_versioning_proto_depIdxs,
+ MessageInfos: file_xds_annotations_v3_versioning_proto_msgTypes,
+ ExtensionInfos: file_xds_annotations_v3_versioning_proto_extTypes,
+ }.Build()
+ File_xds_annotations_v3_versioning_proto = out.File
+ file_xds_annotations_v3_versioning_proto_rawDesc = nil
+ file_xds_annotations_v3_versioning_proto_goTypes = nil
+ file_xds_annotations_v3_versioning_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.validate.go
new file mode 100644
index 000000000..042c266e1
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/annotations/v3/versioning.pb.validate.go
@@ -0,0 +1,140 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/annotations/v3/versioning.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on VersioningAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *VersioningAnnotation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on VersioningAnnotation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// VersioningAnnotationMultiError, or nil if none found.
+func (m *VersioningAnnotation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *VersioningAnnotation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for PreviousMessageType
+
+ if len(errors) > 0 {
+ return VersioningAnnotationMultiError(errors)
+ }
+
+ return nil
+}
+
+// VersioningAnnotationMultiError is an error wrapping multiple validation
+// errors returned by VersioningAnnotation.ValidateAll() if the designated
+// constraints aren't met.
+type VersioningAnnotationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m VersioningAnnotationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m VersioningAnnotationMultiError) AllErrors() []error { return m }
+
+// VersioningAnnotationValidationError is the validation error returned by
+// VersioningAnnotation.Validate if the designated constraints aren't met.
+type VersioningAnnotationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e VersioningAnnotationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e VersioningAnnotationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e VersioningAnnotationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e VersioningAnnotationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e VersioningAnnotationValidationError) ErrorName() string {
+ return "VersioningAnnotationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e VersioningAnnotationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sVersioningAnnotation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = VersioningAnnotationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = VersioningAnnotationValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.go
new file mode 100644
index 000000000..3058286d5
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.go
@@ -0,0 +1,153 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/core/v3/authority.proto
+
+package v3
+
+import (
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Authority struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *Authority) Reset() {
+ *x = Authority{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_authority_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Authority) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Authority) ProtoMessage() {}
+
+func (x *Authority) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_authority_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Authority.ProtoReflect.Descriptor instead.
+func (*Authority) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_authority_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Authority) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+var File_xds_core_v3_authority_proto protoreflect.FileDescriptor
+
+var file_xds_core_v3_authority_proto_rawDesc = []byte{
+ 0x0a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x75,
+ 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78,
+ 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
+ 0x79, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0x56,
+ 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
+ 0x42, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
+ 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63,
+ 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_core_v3_authority_proto_rawDescOnce sync.Once
+ file_xds_core_v3_authority_proto_rawDescData = file_xds_core_v3_authority_proto_rawDesc
+)
+
+func file_xds_core_v3_authority_proto_rawDescGZIP() []byte {
+ file_xds_core_v3_authority_proto_rawDescOnce.Do(func() {
+ file_xds_core_v3_authority_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_authority_proto_rawDescData)
+ })
+ return file_xds_core_v3_authority_proto_rawDescData
+}
+
+var file_xds_core_v3_authority_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_core_v3_authority_proto_goTypes = []interface{}{
+ (*Authority)(nil), // 0: xds.core.v3.Authority
+}
+var file_xds_core_v3_authority_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_xds_core_v3_authority_proto_init() }
+func file_xds_core_v3_authority_proto_init() {
+ if File_xds_core_v3_authority_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_core_v3_authority_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Authority); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_core_v3_authority_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_core_v3_authority_proto_goTypes,
+ DependencyIndexes: file_xds_core_v3_authority_proto_depIdxs,
+ MessageInfos: file_xds_core_v3_authority_proto_msgTypes,
+ }.Build()
+ File_xds_core_v3_authority_proto = out.File
+ file_xds_core_v3_authority_proto_rawDesc = nil
+ file_xds_core_v3_authority_proto_goTypes = nil
+ file_xds_core_v3_authority_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.validate.go
new file mode 100644
index 000000000..94317c2af
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/authority.pb.validate.go
@@ -0,0 +1,146 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/core/v3/authority.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Authority with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Authority) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Authority with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in AuthorityMultiError, or nil
+// if none found.
+func (m *Authority) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Authority) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := AuthorityValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return AuthorityMultiError(errors)
+ }
+
+ return nil
+}
+
+// AuthorityMultiError is an error wrapping multiple validation errors returned
+// by Authority.ValidateAll() if the designated constraints aren't met.
+type AuthorityMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m AuthorityMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m AuthorityMultiError) AllErrors() []error { return m }
+
+// AuthorityValidationError is the validation error returned by
+// Authority.Validate if the designated constraints aren't met.
+type AuthorityValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e AuthorityValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e AuthorityValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e AuthorityValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e AuthorityValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e AuthorityValidationError) ErrorName() string { return "AuthorityValidationError" }
+
+// Error satisfies the builtin error interface
+func (e AuthorityValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sAuthority.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = AuthorityValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = AuthorityValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go
new file mode 100644
index 000000000..0e339b589
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.go
@@ -0,0 +1,172 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/core/v3/cidr.proto
+
+package v3
+
+import (
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CidrRange struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ AddressPrefix string `protobuf:"bytes,1,opt,name=address_prefix,json=addressPrefix,proto3" json:"address_prefix,omitempty"`
+ PrefixLen *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=prefix_len,json=prefixLen,proto3" json:"prefix_len,omitempty"`
+}
+
+func (x *CidrRange) Reset() {
+ *x = CidrRange{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_cidr_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CidrRange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CidrRange) ProtoMessage() {}
+
+func (x *CidrRange) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_cidr_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CidrRange.ProtoReflect.Descriptor instead.
+func (*CidrRange) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_cidr_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CidrRange) GetAddressPrefix() string {
+ if x != nil {
+ return x.AddressPrefix
+ }
+ return ""
+}
+
+func (x *CidrRange) GetPrefixLen() *wrapperspb.UInt32Value {
+ if x != nil {
+ return x.PrefixLen
+ }
+ return nil
+}
+
+var File_xds_core_v3_cidr_proto protoreflect.FileDescriptor
+
+var file_xds_core_v3_cidr_proto_rawDesc = []byte{
+ 0x0a, 0x16, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x69,
+ 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f,
+ 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0x82, 0x01, 0x0a, 0x09, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x2e, 0x0a,
+ 0x0e, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d,
+ 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x45, 0x0a,
+ 0x0a, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42,
+ 0x08, 0xfa, 0x42, 0x05, 0x2a, 0x03, 0x18, 0x80, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x66, 0x69,
+ 0x78, 0x4c, 0x65, 0x6e, 0x42, 0x56, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16,
+ 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63,
+ 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67,
+ 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f,
+ 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_core_v3_cidr_proto_rawDescOnce sync.Once
+ file_xds_core_v3_cidr_proto_rawDescData = file_xds_core_v3_cidr_proto_rawDesc
+)
+
+func file_xds_core_v3_cidr_proto_rawDescGZIP() []byte {
+ file_xds_core_v3_cidr_proto_rawDescOnce.Do(func() {
+ file_xds_core_v3_cidr_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_cidr_proto_rawDescData)
+ })
+ return file_xds_core_v3_cidr_proto_rawDescData
+}
+
+var file_xds_core_v3_cidr_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_core_v3_cidr_proto_goTypes = []interface{}{
+ (*CidrRange)(nil), // 0: xds.core.v3.CidrRange
+ (*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value
+}
+var file_xds_core_v3_cidr_proto_depIdxs = []int32{
+ 1, // 0: xds.core.v3.CidrRange.prefix_len:type_name -> google.protobuf.UInt32Value
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_xds_core_v3_cidr_proto_init() }
+func file_xds_core_v3_cidr_proto_init() {
+ if File_xds_core_v3_cidr_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_core_v3_cidr_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CidrRange); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_core_v3_cidr_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_core_v3_cidr_proto_goTypes,
+ DependencyIndexes: file_xds_core_v3_cidr_proto_depIdxs,
+ MessageInfos: file_xds_core_v3_cidr_proto_msgTypes,
+ }.Build()
+ File_xds_core_v3_cidr_proto = out.File
+ file_xds_core_v3_cidr_proto_rawDesc = nil
+ file_xds_core_v3_cidr_proto_goTypes = nil
+ file_xds_core_v3_cidr_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go
new file mode 100644
index 000000000..43327f56b
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/cidr.pb.validate.go
@@ -0,0 +1,161 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/core/v3/cidr.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on CidrRange with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *CidrRange) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CidrRange with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in CidrRangeMultiError, or nil
+// if none found.
+func (m *CidrRange) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CidrRange) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetAddressPrefix()) < 1 {
+ err := CidrRangeValidationError{
+ field: "AddressPrefix",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if wrapper := m.GetPrefixLen(); wrapper != nil {
+
+ if wrapper.GetValue() > 128 {
+ err := CidrRangeValidationError{
+ field: "PrefixLen",
+ reason: "value must be less than or equal to 128",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return CidrRangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// CidrRangeMultiError is an error wrapping multiple validation errors returned
+// by CidrRange.ValidateAll() if the designated constraints aren't met.
+type CidrRangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CidrRangeMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CidrRangeMultiError) AllErrors() []error { return m }
+
+// CidrRangeValidationError is the validation error returned by
+// CidrRange.Validate if the designated constraints aren't met.
+type CidrRangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CidrRangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CidrRangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CidrRangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CidrRangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CidrRangeValidationError) ErrorName() string { return "CidrRangeValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CidrRangeValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCidrRange.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CidrRangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CidrRangeValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.go
new file mode 100644
index 000000000..0d45b961b
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.go
@@ -0,0 +1,297 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/core/v3/collection_entry.proto
+
+package v3
+
+import (
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CollectionEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to ResourceSpecifier:
+ //
+ // *CollectionEntry_Locator
+ // *CollectionEntry_InlineEntry_
+ ResourceSpecifier isCollectionEntry_ResourceSpecifier `protobuf_oneof:"resource_specifier"`
+}
+
+func (x *CollectionEntry) Reset() {
+ *x = CollectionEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_collection_entry_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CollectionEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CollectionEntry) ProtoMessage() {}
+
+func (x *CollectionEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_collection_entry_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CollectionEntry.ProtoReflect.Descriptor instead.
+func (*CollectionEntry) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_collection_entry_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *CollectionEntry) GetResourceSpecifier() isCollectionEntry_ResourceSpecifier {
+ if m != nil {
+ return m.ResourceSpecifier
+ }
+ return nil
+}
+
+func (x *CollectionEntry) GetLocator() *ResourceLocator {
+ if x, ok := x.GetResourceSpecifier().(*CollectionEntry_Locator); ok {
+ return x.Locator
+ }
+ return nil
+}
+
+func (x *CollectionEntry) GetInlineEntry() *CollectionEntry_InlineEntry {
+ if x, ok := x.GetResourceSpecifier().(*CollectionEntry_InlineEntry_); ok {
+ return x.InlineEntry
+ }
+ return nil
+}
+
+type isCollectionEntry_ResourceSpecifier interface {
+ isCollectionEntry_ResourceSpecifier()
+}
+
+type CollectionEntry_Locator struct {
+ Locator *ResourceLocator `protobuf:"bytes,1,opt,name=locator,proto3,oneof"`
+}
+
+type CollectionEntry_InlineEntry_ struct {
+ InlineEntry *CollectionEntry_InlineEntry `protobuf:"bytes,2,opt,name=inline_entry,json=inlineEntry,proto3,oneof"`
+}
+
+func (*CollectionEntry_Locator) isCollectionEntry_ResourceSpecifier() {}
+
+func (*CollectionEntry_InlineEntry_) isCollectionEntry_ResourceSpecifier() {}
+
+type CollectionEntry_InlineEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+ Resource *anypb.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
+}
+
+func (x *CollectionEntry_InlineEntry) Reset() {
+ *x = CollectionEntry_InlineEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_collection_entry_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CollectionEntry_InlineEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CollectionEntry_InlineEntry) ProtoMessage() {}
+
+func (x *CollectionEntry_InlineEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_collection_entry_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CollectionEntry_InlineEntry.ProtoReflect.Descriptor instead.
+func (*CollectionEntry_InlineEntry) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_collection_entry_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *CollectionEntry_InlineEntry) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CollectionEntry_InlineEntry) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *CollectionEntry_InlineEntry) GetResource() *anypb.Any {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+var File_xds_core_v3_collection_entry_proto protoreflect.FileDescriptor
+
+var file_xds_core_v3_collection_entry_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f,
+ 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
+ 0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64,
+ 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33,
+ 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x78,
+ 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x02, 0x0a, 0x0f, 0x43,
+ 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x38,
+ 0x0a, 0x07, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1c, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52,
+ 0x07, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x4d, 0x0a, 0x0c, 0x69, 0x6e, 0x6c, 0x69,
+ 0x6e, 0x65, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28,
+ 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6c,
+ 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2e, 0x49, 0x6e, 0x6c,
+ 0x69, 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x48, 0x00, 0x52, 0x0b, 0x69, 0x6e, 0x6c, 0x69,
+ 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x1a, 0x8b, 0x01, 0x0a, 0x0b, 0x49, 0x6e, 0x6c, 0x69,
+ 0x6e, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x30, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1c, 0xfa, 0x42, 0x19, 0x72, 0x17, 0x32, 0x15, 0x5e, 0x5b,
+ 0x30, 0x2d, 0x39, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5f, 0x5c, 0x2d, 0x5c, 0x2e, 0x7e, 0x3a,
+ 0x5d, 0x2b, 0x24, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x19, 0x0a, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01,
+ 0x42, 0x5c, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
+ 0x76, 0x33, 0x42, 0x14, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e,
+ 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f,
+ 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_core_v3_collection_entry_proto_rawDescOnce sync.Once
+ file_xds_core_v3_collection_entry_proto_rawDescData = file_xds_core_v3_collection_entry_proto_rawDesc
+)
+
+func file_xds_core_v3_collection_entry_proto_rawDescGZIP() []byte {
+ file_xds_core_v3_collection_entry_proto_rawDescOnce.Do(func() {
+ file_xds_core_v3_collection_entry_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_collection_entry_proto_rawDescData)
+ })
+ return file_xds_core_v3_collection_entry_proto_rawDescData
+}
+
+var file_xds_core_v3_collection_entry_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_xds_core_v3_collection_entry_proto_goTypes = []interface{}{
+ (*CollectionEntry)(nil), // 0: xds.core.v3.CollectionEntry
+ (*CollectionEntry_InlineEntry)(nil), // 1: xds.core.v3.CollectionEntry.InlineEntry
+ (*ResourceLocator)(nil), // 2: xds.core.v3.ResourceLocator
+ (*anypb.Any)(nil), // 3: google.protobuf.Any
+}
+var file_xds_core_v3_collection_entry_proto_depIdxs = []int32{
+ 2, // 0: xds.core.v3.CollectionEntry.locator:type_name -> xds.core.v3.ResourceLocator
+ 1, // 1: xds.core.v3.CollectionEntry.inline_entry:type_name -> xds.core.v3.CollectionEntry.InlineEntry
+ 3, // 2: xds.core.v3.CollectionEntry.InlineEntry.resource:type_name -> google.protobuf.Any
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_xds_core_v3_collection_entry_proto_init() }
+func file_xds_core_v3_collection_entry_proto_init() {
+ if File_xds_core_v3_collection_entry_proto != nil {
+ return
+ }
+ file_xds_core_v3_resource_locator_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_core_v3_collection_entry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CollectionEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_core_v3_collection_entry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CollectionEntry_InlineEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_xds_core_v3_collection_entry_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*CollectionEntry_Locator)(nil),
+ (*CollectionEntry_InlineEntry_)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_core_v3_collection_entry_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_core_v3_collection_entry_proto_goTypes,
+ DependencyIndexes: file_xds_core_v3_collection_entry_proto_depIdxs,
+ MessageInfos: file_xds_core_v3_collection_entry_proto_msgTypes,
+ }.Build()
+ File_xds_core_v3_collection_entry_proto = out.File
+ file_xds_core_v3_collection_entry_proto_rawDesc = nil
+ file_xds_core_v3_collection_entry_proto_goTypes = nil
+ file_xds_core_v3_collection_entry_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.validate.go
new file mode 100644
index 000000000..610990b7f
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/collection_entry.pb.validate.go
@@ -0,0 +1,383 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/core/v3/collection_entry.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on CollectionEntry with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *CollectionEntry) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CollectionEntry with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CollectionEntryMultiError, or nil if none found.
+func (m *CollectionEntry) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CollectionEntry) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofResourceSpecifierPresent := false
+ switch v := m.ResourceSpecifier.(type) {
+ case *CollectionEntry_Locator:
+ if v == nil {
+ err := CollectionEntryValidationError{
+ field: "ResourceSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofResourceSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetLocator()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CollectionEntryValidationError{
+ field: "Locator",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CollectionEntryValidationError{
+ field: "Locator",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLocator()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CollectionEntryValidationError{
+ field: "Locator",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CollectionEntry_InlineEntry_:
+ if v == nil {
+ err := CollectionEntryValidationError{
+ field: "ResourceSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofResourceSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetInlineEntry()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CollectionEntryValidationError{
+ field: "InlineEntry",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CollectionEntryValidationError{
+ field: "InlineEntry",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetInlineEntry()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CollectionEntryValidationError{
+ field: "InlineEntry",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofResourceSpecifierPresent {
+ err := CollectionEntryValidationError{
+ field: "ResourceSpecifier",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return CollectionEntryMultiError(errors)
+ }
+
+ return nil
+}
+
+// CollectionEntryMultiError is an error wrapping multiple validation errors
+// returned by CollectionEntry.ValidateAll() if the designated constraints
+// aren't met.
+type CollectionEntryMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CollectionEntryMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CollectionEntryMultiError) AllErrors() []error { return m }
+
+// CollectionEntryValidationError is the validation error returned by
+// CollectionEntry.Validate if the designated constraints aren't met.
+type CollectionEntryValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CollectionEntryValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CollectionEntryValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CollectionEntryValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CollectionEntryValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CollectionEntryValidationError) ErrorName() string { return "CollectionEntryValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CollectionEntryValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCollectionEntry.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CollectionEntryValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CollectionEntryValidationError{}
+
+// Validate checks the field values on CollectionEntry_InlineEntry with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *CollectionEntry_InlineEntry) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CollectionEntry_InlineEntry with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CollectionEntry_InlineEntryMultiError, or nil if none found.
+func (m *CollectionEntry_InlineEntry) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CollectionEntry_InlineEntry) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if !_CollectionEntry_InlineEntry_Name_Pattern.MatchString(m.GetName()) {
+ err := CollectionEntry_InlineEntryValidationError{
+ field: "Name",
+ reason: "value does not match regex pattern \"^[0-9a-zA-Z_\\\\-\\\\.~:]+$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for Version
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CollectionEntry_InlineEntryValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CollectionEntry_InlineEntryValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CollectionEntry_InlineEntryValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return CollectionEntry_InlineEntryMultiError(errors)
+ }
+
+ return nil
+}
+
+// CollectionEntry_InlineEntryMultiError is an error wrapping multiple
+// validation errors returned by CollectionEntry_InlineEntry.ValidateAll() if
+// the designated constraints aren't met.
+type CollectionEntry_InlineEntryMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CollectionEntry_InlineEntryMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CollectionEntry_InlineEntryMultiError) AllErrors() []error { return m }
+
+// CollectionEntry_InlineEntryValidationError is the validation error returned
+// by CollectionEntry_InlineEntry.Validate if the designated constraints
+// aren't met.
+type CollectionEntry_InlineEntryValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CollectionEntry_InlineEntryValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CollectionEntry_InlineEntryValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CollectionEntry_InlineEntryValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CollectionEntry_InlineEntryValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CollectionEntry_InlineEntryValidationError) ErrorName() string {
+ return "CollectionEntry_InlineEntryValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CollectionEntry_InlineEntryValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCollectionEntry_InlineEntry.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CollectionEntry_InlineEntryValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CollectionEntry_InlineEntryValidationError{}
+
+var _CollectionEntry_InlineEntry_Name_Pattern = regexp.MustCompile("^[0-9a-zA-Z_\\-\\.~:]+$")
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.go
new file mode 100644
index 000000000..714ab4367
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.go
@@ -0,0 +1,160 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/core/v3/context_params.proto
+
+package v3
+
+import (
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ContextParams struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Params map[string]string `protobuf:"bytes,1,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *ContextParams) Reset() {
+ *x = ContextParams{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_context_params_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ContextParams) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ContextParams) ProtoMessage() {}
+
+func (x *ContextParams) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_context_params_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ContextParams.ProtoReflect.Descriptor instead.
+func (*ContextParams) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_context_params_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ContextParams) GetParams() map[string]string {
+ if x != nil {
+ return x.Params
+ }
+ return nil
+}
+
+var File_xds_core_v3_context_params_proto protoreflect.FileDescriptor
+
+var file_xds_core_v3_context_params_proto_rawDesc = []byte{
+ 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a,
+ 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x8a, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61,
+ 0x6d, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
+ 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x50,
+ 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
+ 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x5a, 0xd2,
+ 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42,
+ 0x12, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64,
+ 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
+}
+
+var (
+ file_xds_core_v3_context_params_proto_rawDescOnce sync.Once
+ file_xds_core_v3_context_params_proto_rawDescData = file_xds_core_v3_context_params_proto_rawDesc
+)
+
+func file_xds_core_v3_context_params_proto_rawDescGZIP() []byte {
+ file_xds_core_v3_context_params_proto_rawDescOnce.Do(func() {
+ file_xds_core_v3_context_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_context_params_proto_rawDescData)
+ })
+ return file_xds_core_v3_context_params_proto_rawDescData
+}
+
+var file_xds_core_v3_context_params_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_xds_core_v3_context_params_proto_goTypes = []interface{}{
+ (*ContextParams)(nil), // 0: xds.core.v3.ContextParams
+ nil, // 1: xds.core.v3.ContextParams.ParamsEntry
+}
+var file_xds_core_v3_context_params_proto_depIdxs = []int32{
+ 1, // 0: xds.core.v3.ContextParams.params:type_name -> xds.core.v3.ContextParams.ParamsEntry
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_xds_core_v3_context_params_proto_init() }
+func file_xds_core_v3_context_params_proto_init() {
+ if File_xds_core_v3_context_params_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_core_v3_context_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ContextParams); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_core_v3_context_params_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_core_v3_context_params_proto_goTypes,
+ DependencyIndexes: file_xds_core_v3_context_params_proto_depIdxs,
+ MessageInfos: file_xds_core_v3_context_params_proto_msgTypes,
+ }.Build()
+ File_xds_core_v3_context_params_proto = out.File
+ file_xds_core_v3_context_params_proto_rawDesc = nil
+ file_xds_core_v3_context_params_proto_goTypes = nil
+ file_xds_core_v3_context_params_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.validate.go
new file mode 100644
index 000000000..1c9accaa3
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/context_params.pb.validate.go
@@ -0,0 +1,138 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/core/v3/context_params.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on ContextParams with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ContextParams) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ContextParams with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ContextParamsMultiError, or
+// nil if none found.
+func (m *ContextParams) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ContextParams) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Params
+
+ if len(errors) > 0 {
+ return ContextParamsMultiError(errors)
+ }
+
+ return nil
+}
+
+// ContextParamsMultiError is an error wrapping multiple validation errors
+// returned by ContextParams.ValidateAll() if the designated constraints
+// aren't met.
+type ContextParamsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ContextParamsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ContextParamsMultiError) AllErrors() []error { return m }
+
+// ContextParamsValidationError is the validation error returned by
+// ContextParams.Validate if the designated constraints aren't met.
+type ContextParamsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ContextParamsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ContextParamsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ContextParamsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ContextParamsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ContextParamsValidationError) ErrorName() string { return "ContextParamsValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ContextParamsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sContextParams.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ContextParamsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ContextParamsValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.go
new file mode 100644
index 000000000..be4ea10c6
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.go
@@ -0,0 +1,167 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/core/v3/extension.proto
+
+package v3
+
+import (
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type TypedExtensionConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ TypedConfig *anypb.Any `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3" json:"typed_config,omitempty"`
+}
+
+func (x *TypedExtensionConfig) Reset() {
+ *x = TypedExtensionConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_extension_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TypedExtensionConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TypedExtensionConfig) ProtoMessage() {}
+
+func (x *TypedExtensionConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_extension_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TypedExtensionConfig.ProtoReflect.Descriptor instead.
+func (*TypedExtensionConfig) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_extension_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TypedExtensionConfig) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *TypedExtensionConfig) GetTypedConfig() *anypb.Any {
+ if x != nil {
+ return x.TypedConfig
+ }
+ return nil
+}
+
+var File_xds_core_v3_extension_proto protoreflect.FileDescriptor
+
+var file_xds_core_v3_extension_proto_rawDesc = []byte{
+ 0x0a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78,
+ 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x76,
+ 0x0a, 0x14, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x42,
+ 0x08, 0xfa, 0x42, 0x05, 0xa2, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x4e, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
+ 0x42, 0x0e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
+ 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63,
+ 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_core_v3_extension_proto_rawDescOnce sync.Once
+ file_xds_core_v3_extension_proto_rawDescData = file_xds_core_v3_extension_proto_rawDesc
+)
+
+func file_xds_core_v3_extension_proto_rawDescGZIP() []byte {
+ file_xds_core_v3_extension_proto_rawDescOnce.Do(func() {
+ file_xds_core_v3_extension_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_extension_proto_rawDescData)
+ })
+ return file_xds_core_v3_extension_proto_rawDescData
+}
+
+var file_xds_core_v3_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_core_v3_extension_proto_goTypes = []interface{}{
+ (*TypedExtensionConfig)(nil), // 0: xds.core.v3.TypedExtensionConfig
+ (*anypb.Any)(nil), // 1: google.protobuf.Any
+}
+var file_xds_core_v3_extension_proto_depIdxs = []int32{
+ 1, // 0: xds.core.v3.TypedExtensionConfig.typed_config:type_name -> google.protobuf.Any
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_xds_core_v3_extension_proto_init() }
+func file_xds_core_v3_extension_proto_init() {
+ if File_xds_core_v3_extension_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_core_v3_extension_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TypedExtensionConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_core_v3_extension_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_core_v3_extension_proto_goTypes,
+ DependencyIndexes: file_xds_core_v3_extension_proto_depIdxs,
+ MessageInfos: file_xds_core_v3_extension_proto_msgTypes,
+ }.Build()
+ File_xds_core_v3_extension_proto = out.File
+ file_xds_core_v3_extension_proto_rawDesc = nil
+ file_xds_core_v3_extension_proto_goTypes = nil
+ file_xds_core_v3_extension_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.validate.go
new file mode 100644
index 000000000..839f3fef7
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/extension.pb.validate.go
@@ -0,0 +1,164 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/core/v3/extension.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on TypedExtensionConfig with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *TypedExtensionConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TypedExtensionConfig with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// TypedExtensionConfigMultiError, or nil if none found.
+func (m *TypedExtensionConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TypedExtensionConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := TypedExtensionConfigValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetTypedConfig() == nil {
+ err := TypedExtensionConfigValidationError{
+ field: "TypedConfig",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if a := m.GetTypedConfig(); a != nil {
+
+ }
+
+ if len(errors) > 0 {
+ return TypedExtensionConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// TypedExtensionConfigMultiError is an error wrapping multiple validation
+// errors returned by TypedExtensionConfig.ValidateAll() if the designated
+// constraints aren't met.
+type TypedExtensionConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TypedExtensionConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TypedExtensionConfigMultiError) AllErrors() []error { return m }
+
+// TypedExtensionConfigValidationError is the validation error returned by
+// TypedExtensionConfig.Validate if the designated constraints aren't met.
+type TypedExtensionConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TypedExtensionConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TypedExtensionConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TypedExtensionConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TypedExtensionConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TypedExtensionConfigValidationError) ErrorName() string {
+ return "TypedExtensionConfigValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TypedExtensionConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTypedExtensionConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TypedExtensionConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TypedExtensionConfigValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.go
new file mode 100644
index 000000000..641e3411a
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.go
@@ -0,0 +1,182 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/core/v3/resource.proto
+
+package v3
+
+import (
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Resource struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+ Resource *anypb.Any `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
+}
+
+func (x *Resource) Reset() {
+ *x = Resource{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_resource_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Resource) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Resource) ProtoMessage() {}
+
+func (x *Resource) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_resource_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Resource.ProtoReflect.Descriptor instead.
+func (*Resource) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_resource_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Resource) GetName() *ResourceName {
+ if x != nil {
+ return x.Name
+ }
+ return nil
+}
+
+func (x *Resource) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *Resource) GetResource() *anypb.Any {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+var File_xds_core_v3_resource_proto protoreflect.FileDescriptor
+
+var file_xds_core_v3_resource_proto_rawDesc = []byte{
+ 0x0a, 0x1a, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64,
+ 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f,
+ 0x76, 0x33, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x12, 0x2d, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x19, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x08,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x55,
+ 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
+ 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
+ 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
+ 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f,
+ 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_core_v3_resource_proto_rawDescOnce sync.Once
+ file_xds_core_v3_resource_proto_rawDescData = file_xds_core_v3_resource_proto_rawDesc
+)
+
+func file_xds_core_v3_resource_proto_rawDescGZIP() []byte {
+ file_xds_core_v3_resource_proto_rawDescOnce.Do(func() {
+ file_xds_core_v3_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_resource_proto_rawDescData)
+ })
+ return file_xds_core_v3_resource_proto_rawDescData
+}
+
+var file_xds_core_v3_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_core_v3_resource_proto_goTypes = []interface{}{
+ (*Resource)(nil), // 0: xds.core.v3.Resource
+ (*ResourceName)(nil), // 1: xds.core.v3.ResourceName
+ (*anypb.Any)(nil), // 2: google.protobuf.Any
+}
+var file_xds_core_v3_resource_proto_depIdxs = []int32{
+ 1, // 0: xds.core.v3.Resource.name:type_name -> xds.core.v3.ResourceName
+ 2, // 1: xds.core.v3.Resource.resource:type_name -> google.protobuf.Any
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_xds_core_v3_resource_proto_init() }
+func file_xds_core_v3_resource_proto_init() {
+ if File_xds_core_v3_resource_proto != nil {
+ return
+ }
+ file_xds_core_v3_resource_name_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_core_v3_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Resource); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_core_v3_resource_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_core_v3_resource_proto_goTypes,
+ DependencyIndexes: file_xds_core_v3_resource_proto_depIdxs,
+ MessageInfos: file_xds_core_v3_resource_proto_msgTypes,
+ }.Build()
+ File_xds_core_v3_resource_proto = out.File
+ file_xds_core_v3_resource_proto_rawDesc = nil
+ file_xds_core_v3_resource_proto_goTypes = nil
+ file_xds_core_v3_resource_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.validate.go
new file mode 100644
index 000000000..dc972171c
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/resource.pb.validate.go
@@ -0,0 +1,195 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/core/v3/resource.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Resource with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Resource) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Resource with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ResourceMultiError, or nil
+// if none found.
+func (m *Resource) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Resource) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetName()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Name",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Name",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetName()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceValidationError{
+ field: "Name",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Version
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ResourceMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResourceMultiError is an error wrapping multiple validation errors returned
+// by Resource.ValidateAll() if the designated constraints aren't met.
+type ResourceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResourceMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResourceMultiError) AllErrors() []error { return m }
+
+// ResourceValidationError is the validation error returned by
+// Resource.Validate if the designated constraints aren't met.
+type ResourceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResourceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResourceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResourceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResourceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResourceValidationError) ErrorName() string { return "ResourceValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResourceValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResource.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResourceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResourceValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.go
new file mode 100644
index 000000000..3f99d4bee
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.go
@@ -0,0 +1,406 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/core/v3/resource_locator.proto
+
+package v3
+
+import (
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ResourceLocator_Scheme int32
+
+const (
+ ResourceLocator_XDSTP ResourceLocator_Scheme = 0
+ ResourceLocator_HTTP ResourceLocator_Scheme = 1
+ ResourceLocator_FILE ResourceLocator_Scheme = 2
+)
+
+// Enum value maps for ResourceLocator_Scheme.
+var (
+ ResourceLocator_Scheme_name = map[int32]string{
+ 0: "XDSTP",
+ 1: "HTTP",
+ 2: "FILE",
+ }
+ ResourceLocator_Scheme_value = map[string]int32{
+ "XDSTP": 0,
+ "HTTP": 1,
+ "FILE": 2,
+ }
+)
+
+func (x ResourceLocator_Scheme) Enum() *ResourceLocator_Scheme {
+ p := new(ResourceLocator_Scheme)
+ *p = x
+ return p
+}
+
+func (x ResourceLocator_Scheme) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ResourceLocator_Scheme) Descriptor() protoreflect.EnumDescriptor {
+ return file_xds_core_v3_resource_locator_proto_enumTypes[0].Descriptor()
+}
+
+func (ResourceLocator_Scheme) Type() protoreflect.EnumType {
+ return &file_xds_core_v3_resource_locator_proto_enumTypes[0]
+}
+
+func (x ResourceLocator_Scheme) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ResourceLocator_Scheme.Descriptor instead.
+func (ResourceLocator_Scheme) EnumDescriptor() ([]byte, []int) {
+ return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0, 0}
+}
+
+type ResourceLocator struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Scheme ResourceLocator_Scheme `protobuf:"varint,1,opt,name=scheme,proto3,enum=xds.core.v3.ResourceLocator_Scheme" json:"scheme,omitempty"`
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
+ Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"`
+ ResourceType string `protobuf:"bytes,4,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
+ // Types that are assignable to ContextParamSpecifier:
+ //
+ // *ResourceLocator_ExactContext
+ ContextParamSpecifier isResourceLocator_ContextParamSpecifier `protobuf_oneof:"context_param_specifier"`
+ Directives []*ResourceLocator_Directive `protobuf:"bytes,6,rep,name=directives,proto3" json:"directives,omitempty"`
+}
+
+func (x *ResourceLocator) Reset() {
+ *x = ResourceLocator{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_resource_locator_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ResourceLocator) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceLocator) ProtoMessage() {}
+
+func (x *ResourceLocator) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_resource_locator_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceLocator.ProtoReflect.Descriptor instead.
+func (*ResourceLocator) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ResourceLocator) GetScheme() ResourceLocator_Scheme {
+ if x != nil {
+ return x.Scheme
+ }
+ return ResourceLocator_XDSTP
+}
+
+func (x *ResourceLocator) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *ResourceLocator) GetAuthority() string {
+ if x != nil {
+ return x.Authority
+ }
+ return ""
+}
+
+func (x *ResourceLocator) GetResourceType() string {
+ if x != nil {
+ return x.ResourceType
+ }
+ return ""
+}
+
+func (m *ResourceLocator) GetContextParamSpecifier() isResourceLocator_ContextParamSpecifier {
+ if m != nil {
+ return m.ContextParamSpecifier
+ }
+ return nil
+}
+
+func (x *ResourceLocator) GetExactContext() *ContextParams {
+ if x, ok := x.GetContextParamSpecifier().(*ResourceLocator_ExactContext); ok {
+ return x.ExactContext
+ }
+ return nil
+}
+
+func (x *ResourceLocator) GetDirectives() []*ResourceLocator_Directive {
+ if x != nil {
+ return x.Directives
+ }
+ return nil
+}
+
+type isResourceLocator_ContextParamSpecifier interface {
+ isResourceLocator_ContextParamSpecifier()
+}
+
+type ResourceLocator_ExactContext struct {
+ ExactContext *ContextParams `protobuf:"bytes,5,opt,name=exact_context,json=exactContext,proto3,oneof"`
+}
+
+func (*ResourceLocator_ExactContext) isResourceLocator_ContextParamSpecifier() {}
+
+type ResourceLocator_Directive struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Directive:
+ //
+ // *ResourceLocator_Directive_Alt
+ // *ResourceLocator_Directive_Entry
+ Directive isResourceLocator_Directive_Directive `protobuf_oneof:"directive"`
+}
+
+func (x *ResourceLocator_Directive) Reset() {
+ *x = ResourceLocator_Directive{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_resource_locator_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ResourceLocator_Directive) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceLocator_Directive) ProtoMessage() {}
+
+func (x *ResourceLocator_Directive) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_resource_locator_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceLocator_Directive.ProtoReflect.Descriptor instead.
+func (*ResourceLocator_Directive) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_resource_locator_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (m *ResourceLocator_Directive) GetDirective() isResourceLocator_Directive_Directive {
+ if m != nil {
+ return m.Directive
+ }
+ return nil
+}
+
+func (x *ResourceLocator_Directive) GetAlt() *ResourceLocator {
+ if x, ok := x.GetDirective().(*ResourceLocator_Directive_Alt); ok {
+ return x.Alt
+ }
+ return nil
+}
+
+func (x *ResourceLocator_Directive) GetEntry() string {
+ if x, ok := x.GetDirective().(*ResourceLocator_Directive_Entry); ok {
+ return x.Entry
+ }
+ return ""
+}
+
+type isResourceLocator_Directive_Directive interface {
+ isResourceLocator_Directive_Directive()
+}
+
+type ResourceLocator_Directive_Alt struct {
+ Alt *ResourceLocator `protobuf:"bytes,1,opt,name=alt,proto3,oneof"`
+}
+
+type ResourceLocator_Directive_Entry struct {
+ Entry string `protobuf:"bytes,2,opt,name=entry,proto3,oneof"`
+}
+
+func (*ResourceLocator_Directive_Alt) isResourceLocator_Directive_Directive() {}
+
+func (*ResourceLocator_Directive_Entry) isResourceLocator_Directive_Directive() {}
+
+var File_xds_core_v3_resource_locator_proto protoreflect.FileDescriptor
+
+var file_xds_core_v3_resource_locator_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
+ 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x04,
+ 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f,
+ 0x72, 0x12, 0x45, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0e, 0x32, 0x23, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01,
+ 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68,
+ 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74,
+ 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
+ 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x54, 0x79, 0x70, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x63, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64,
+ 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x78, 0x61, 0x63, 0x74,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x46, 0x0a, 0x0a, 0x64, 0x69, 0x72, 0x65, 0x63,
+ 0x74, 0x69, 0x76, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x78, 0x64,
+ 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74,
+ 0x69, 0x76, 0x65, 0x52, 0x0a, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x73, 0x1a,
+ 0x88, 0x01, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x30, 0x0a,
+ 0x03, 0x61, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x78, 0x64, 0x73,
+ 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6c, 0x74, 0x12,
+ 0x37, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f,
+ 0xfa, 0x42, 0x1c, 0x72, 0x1a, 0x10, 0x01, 0x32, 0x16, 0x5e, 0x5b, 0x30, 0x2d, 0x39, 0x61, 0x2d,
+ 0x7a, 0x41, 0x2d, 0x5a, 0x5f, 0x5c, 0x2d, 0x5c, 0x2e, 0x2f, 0x7e, 0x3a, 0x5d, 0x2b, 0x24, 0x48,
+ 0x00, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x10, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65,
+ 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x27, 0x0a, 0x06, 0x53, 0x63,
+ 0x68, 0x65, 0x6d, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x58, 0x44, 0x53, 0x54, 0x50, 0x10, 0x00, 0x12,
+ 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x49, 0x4c,
+ 0x45, 0x10, 0x02, 0x42, 0x19, 0x0a, 0x17, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70,
+ 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x42, 0x5c,
+ 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
+ 0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f,
+ 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f,
+ 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_core_v3_resource_locator_proto_rawDescOnce sync.Once
+ file_xds_core_v3_resource_locator_proto_rawDescData = file_xds_core_v3_resource_locator_proto_rawDesc
+)
+
+func file_xds_core_v3_resource_locator_proto_rawDescGZIP() []byte {
+ file_xds_core_v3_resource_locator_proto_rawDescOnce.Do(func() {
+ file_xds_core_v3_resource_locator_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_resource_locator_proto_rawDescData)
+ })
+ return file_xds_core_v3_resource_locator_proto_rawDescData
+}
+
+var file_xds_core_v3_resource_locator_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_xds_core_v3_resource_locator_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_xds_core_v3_resource_locator_proto_goTypes = []interface{}{
+ (ResourceLocator_Scheme)(0), // 0: xds.core.v3.ResourceLocator.Scheme
+ (*ResourceLocator)(nil), // 1: xds.core.v3.ResourceLocator
+ (*ResourceLocator_Directive)(nil), // 2: xds.core.v3.ResourceLocator.Directive
+ (*ContextParams)(nil), // 3: xds.core.v3.ContextParams
+}
+var file_xds_core_v3_resource_locator_proto_depIdxs = []int32{
+ 0, // 0: xds.core.v3.ResourceLocator.scheme:type_name -> xds.core.v3.ResourceLocator.Scheme
+ 3, // 1: xds.core.v3.ResourceLocator.exact_context:type_name -> xds.core.v3.ContextParams
+ 2, // 2: xds.core.v3.ResourceLocator.directives:type_name -> xds.core.v3.ResourceLocator.Directive
+ 1, // 3: xds.core.v3.ResourceLocator.Directive.alt:type_name -> xds.core.v3.ResourceLocator
+ 4, // [4:4] is the sub-list for method output_type
+ 4, // [4:4] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
+}
+
+func init() { file_xds_core_v3_resource_locator_proto_init() }
+func file_xds_core_v3_resource_locator_proto_init() {
+ if File_xds_core_v3_resource_locator_proto != nil {
+ return
+ }
+ file_xds_core_v3_context_params_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_core_v3_resource_locator_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ResourceLocator); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_core_v3_resource_locator_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ResourceLocator_Directive); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_xds_core_v3_resource_locator_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*ResourceLocator_ExactContext)(nil),
+ }
+ file_xds_core_v3_resource_locator_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*ResourceLocator_Directive_Alt)(nil),
+ (*ResourceLocator_Directive_Entry)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_core_v3_resource_locator_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_core_v3_resource_locator_proto_goTypes,
+ DependencyIndexes: file_xds_core_v3_resource_locator_proto_depIdxs,
+ EnumInfos: file_xds_core_v3_resource_locator_proto_enumTypes,
+ MessageInfos: file_xds_core_v3_resource_locator_proto_msgTypes,
+ }.Build()
+ File_xds_core_v3_resource_locator_proto = out.File
+ file_xds_core_v3_resource_locator_proto_rawDesc = nil
+ file_xds_core_v3_resource_locator_proto_goTypes = nil
+ file_xds_core_v3_resource_locator_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.validate.go
new file mode 100644
index 000000000..1686e98d1
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_locator.pb.validate.go
@@ -0,0 +1,439 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/core/v3/resource_locator.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on ResourceLocator with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *ResourceLocator) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ResourceLocator with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ResourceLocatorMultiError, or nil if none found.
+func (m *ResourceLocator) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ResourceLocator) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := ResourceLocator_Scheme_name[int32(m.GetScheme())]; !ok {
+ err := ResourceLocatorValidationError{
+ field: "Scheme",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for Id
+
+ // no validation rules for Authority
+
+ if utf8.RuneCountInString(m.GetResourceType()) < 1 {
+ err := ResourceLocatorValidationError{
+ field: "ResourceType",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetDirectives() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceLocatorValidationError{
+ field: fmt.Sprintf("Directives[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceLocatorValidationError{
+ field: fmt.Sprintf("Directives[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceLocatorValidationError{
+ field: fmt.Sprintf("Directives[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ switch v := m.ContextParamSpecifier.(type) {
+ case *ResourceLocator_ExactContext:
+ if v == nil {
+ err := ResourceLocatorValidationError{
+ field: "ContextParamSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetExactContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceLocatorValidationError{
+ field: "ExactContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceLocatorValidationError{
+ field: "ExactContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetExactContext()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceLocatorValidationError{
+ field: "ExactContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return ResourceLocatorMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResourceLocatorMultiError is an error wrapping multiple validation errors
+// returned by ResourceLocator.ValidateAll() if the designated constraints
+// aren't met.
+type ResourceLocatorMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResourceLocatorMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResourceLocatorMultiError) AllErrors() []error { return m }
+
+// ResourceLocatorValidationError is the validation error returned by
+// ResourceLocator.Validate if the designated constraints aren't met.
+type ResourceLocatorValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResourceLocatorValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResourceLocatorValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResourceLocatorValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResourceLocatorValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResourceLocatorValidationError) ErrorName() string { return "ResourceLocatorValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResourceLocatorValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResourceLocator.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResourceLocatorValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResourceLocatorValidationError{}
+
+// Validate checks the field values on ResourceLocator_Directive with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ResourceLocator_Directive) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ResourceLocator_Directive with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ResourceLocator_DirectiveMultiError, or nil if none found.
+func (m *ResourceLocator_Directive) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ResourceLocator_Directive) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofDirectivePresent := false
+ switch v := m.Directive.(type) {
+ case *ResourceLocator_Directive_Alt:
+ if v == nil {
+ err := ResourceLocator_DirectiveValidationError{
+ field: "Directive",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofDirectivePresent = true
+
+ if all {
+ switch v := interface{}(m.GetAlt()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceLocator_DirectiveValidationError{
+ field: "Alt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceLocator_DirectiveValidationError{
+ field: "Alt",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAlt()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceLocator_DirectiveValidationError{
+ field: "Alt",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ResourceLocator_Directive_Entry:
+ if v == nil {
+ err := ResourceLocator_DirectiveValidationError{
+ field: "Directive",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofDirectivePresent = true
+
+ if utf8.RuneCountInString(m.GetEntry()) < 1 {
+ err := ResourceLocator_DirectiveValidationError{
+ field: "Entry",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_ResourceLocator_Directive_Entry_Pattern.MatchString(m.GetEntry()) {
+ err := ResourceLocator_DirectiveValidationError{
+ field: "Entry",
+ reason: "value does not match regex pattern \"^[0-9a-zA-Z_\\\\-\\\\./~:]+$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofDirectivePresent {
+ err := ResourceLocator_DirectiveValidationError{
+ field: "Directive",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ResourceLocator_DirectiveMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResourceLocator_DirectiveMultiError is an error wrapping multiple validation
+// errors returned by ResourceLocator_Directive.ValidateAll() if the
+// designated constraints aren't met.
+type ResourceLocator_DirectiveMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResourceLocator_DirectiveMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResourceLocator_DirectiveMultiError) AllErrors() []error { return m }
+
+// ResourceLocator_DirectiveValidationError is the validation error returned by
+// ResourceLocator_Directive.Validate if the designated constraints aren't met.
+type ResourceLocator_DirectiveValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResourceLocator_DirectiveValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResourceLocator_DirectiveValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResourceLocator_DirectiveValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResourceLocator_DirectiveValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResourceLocator_DirectiveValidationError) ErrorName() string {
+ return "ResourceLocator_DirectiveValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ResourceLocator_DirectiveValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResourceLocator_Directive.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResourceLocator_DirectiveValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResourceLocator_DirectiveValidationError{}
+
+var _ResourceLocator_Directive_Entry_Pattern = regexp.MustCompile("^[0-9a-zA-Z_\\-\\./~:]+$")
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.go
new file mode 100644
index 000000000..3d42818b7
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.go
@@ -0,0 +1,190 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/core/v3/resource_name.proto
+
+package v3
+
+import (
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ResourceName struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
+ ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"`
+ Context *ContextParams `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"`
+}
+
+func (x *ResourceName) Reset() {
+ *x = ResourceName{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_core_v3_resource_name_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ResourceName) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceName) ProtoMessage() {}
+
+func (x *ResourceName) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_core_v3_resource_name_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceName.ProtoReflect.Descriptor instead.
+func (*ResourceName) Descriptor() ([]byte, []int) {
+ return file_xds_core_v3_resource_name_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ResourceName) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *ResourceName) GetAuthority() string {
+ if x != nil {
+ return x.Authority
+ }
+ return ""
+}
+
+func (x *ResourceName) GetResourceType() string {
+ if x != nil {
+ return x.ResourceType
+ }
+ return ""
+}
+
+func (x *ResourceName) GetContext() *ContextParams {
+ if x != nil {
+ return x.Context
+ }
+ return nil
+}
+
+var File_xds_core_v3_resource_name_proto protoreflect.FileDescriptor
+
+var file_xds_core_v3_resource_name_proto_rawDesc = []byte{
+ 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1f,
+ 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x20, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x01, 0x0a, 0x0c, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x0d, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63,
+ 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x61,
+ 0x72, 0x61, 0x6d, 0x73, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x59, 0xd2,
+ 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x42,
+ 0x11, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73,
+ 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_core_v3_resource_name_proto_rawDescOnce sync.Once
+ file_xds_core_v3_resource_name_proto_rawDescData = file_xds_core_v3_resource_name_proto_rawDesc
+)
+
+func file_xds_core_v3_resource_name_proto_rawDescGZIP() []byte {
+ file_xds_core_v3_resource_name_proto_rawDescOnce.Do(func() {
+ file_xds_core_v3_resource_name_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_core_v3_resource_name_proto_rawDescData)
+ })
+ return file_xds_core_v3_resource_name_proto_rawDescData
+}
+
+var file_xds_core_v3_resource_name_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_core_v3_resource_name_proto_goTypes = []interface{}{
+ (*ResourceName)(nil), // 0: xds.core.v3.ResourceName
+ (*ContextParams)(nil), // 1: xds.core.v3.ContextParams
+}
+var file_xds_core_v3_resource_name_proto_depIdxs = []int32{
+ 1, // 0: xds.core.v3.ResourceName.context:type_name -> xds.core.v3.ContextParams
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_xds_core_v3_resource_name_proto_init() }
+func file_xds_core_v3_resource_name_proto_init() {
+ if File_xds_core_v3_resource_name_proto != nil {
+ return
+ }
+ file_xds_core_v3_context_params_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_core_v3_resource_name_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ResourceName); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_core_v3_resource_name_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_core_v3_resource_name_proto_goTypes,
+ DependencyIndexes: file_xds_core_v3_resource_name_proto_depIdxs,
+ MessageInfos: file_xds_core_v3_resource_name_proto_msgTypes,
+ }.Build()
+ File_xds_core_v3_resource_name_proto = out.File
+ file_xds_core_v3_resource_name_proto_rawDesc = nil
+ file_xds_core_v3_resource_name_proto_goTypes = nil
+ file_xds_core_v3_resource_name_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.validate.go
new file mode 100644
index 000000000..270e921bc
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/core/v3/resource_name.pb.validate.go
@@ -0,0 +1,179 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/core/v3/resource_name.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on ResourceName with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ResourceName) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ResourceName with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ResourceNameMultiError, or
+// nil if none found.
+func (m *ResourceName) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ResourceName) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Id
+
+ // no validation rules for Authority
+
+ if utf8.RuneCountInString(m.GetResourceType()) < 1 {
+ err := ResourceNameValidationError{
+ field: "ResourceType",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceNameValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceNameValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetContext()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceNameValidationError{
+ field: "Context",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ResourceNameMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResourceNameMultiError is an error wrapping multiple validation errors
+// returned by ResourceName.ValidateAll() if the designated constraints aren't met.
+type ResourceNameMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResourceNameMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResourceNameMultiError) AllErrors() []error { return m }
+
+// ResourceNameValidationError is the validation error returned by
+// ResourceName.Validate if the designated constraints aren't met.
+type ResourceNameValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResourceNameValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResourceNameValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResourceNameValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResourceNameValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResourceNameValidationError) ErrorName() string { return "ResourceNameValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResourceNameValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResourceName.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResourceNameValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResourceNameValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.go b/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.go
new file mode 100644
index 000000000..74899339b
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.go
@@ -0,0 +1,272 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/data/orca/v3/orca_load_report.proto
+
+package v3
+
+import (
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type OrcaLoadReport struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ CpuUtilization float64 `protobuf:"fixed64,1,opt,name=cpu_utilization,json=cpuUtilization,proto3" json:"cpu_utilization,omitempty"`
+ MemUtilization float64 `protobuf:"fixed64,2,opt,name=mem_utilization,json=memUtilization,proto3" json:"mem_utilization,omitempty"`
+ // Deprecated: Marked as deprecated in xds/data/orca/v3/orca_load_report.proto.
+ Rps uint64 `protobuf:"varint,3,opt,name=rps,proto3" json:"rps,omitempty"`
+ RequestCost map[string]float64 `protobuf:"bytes,4,rep,name=request_cost,json=requestCost,proto3" json:"request_cost,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
+ Utilization map[string]float64 `protobuf:"bytes,5,rep,name=utilization,proto3" json:"utilization,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
+ RpsFractional float64 `protobuf:"fixed64,6,opt,name=rps_fractional,json=rpsFractional,proto3" json:"rps_fractional,omitempty"`
+ Eps float64 `protobuf:"fixed64,7,opt,name=eps,proto3" json:"eps,omitempty"`
+ NamedMetrics map[string]float64 `protobuf:"bytes,8,rep,name=named_metrics,json=namedMetrics,proto3" json:"named_metrics,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
+ ApplicationUtilization float64 `protobuf:"fixed64,9,opt,name=application_utilization,json=applicationUtilization,proto3" json:"application_utilization,omitempty"`
+}
+
+func (x *OrcaLoadReport) Reset() {
+ *x = OrcaLoadReport{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_data_orca_v3_orca_load_report_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OrcaLoadReport) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OrcaLoadReport) ProtoMessage() {}
+
+func (x *OrcaLoadReport) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_data_orca_v3_orca_load_report_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OrcaLoadReport.ProtoReflect.Descriptor instead.
+func (*OrcaLoadReport) Descriptor() ([]byte, []int) {
+ return file_xds_data_orca_v3_orca_load_report_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *OrcaLoadReport) GetCpuUtilization() float64 {
+ if x != nil {
+ return x.CpuUtilization
+ }
+ return 0
+}
+
+func (x *OrcaLoadReport) GetMemUtilization() float64 {
+ if x != nil {
+ return x.MemUtilization
+ }
+ return 0
+}
+
+// Deprecated: Marked as deprecated in xds/data/orca/v3/orca_load_report.proto.
+func (x *OrcaLoadReport) GetRps() uint64 {
+ if x != nil {
+ return x.Rps
+ }
+ return 0
+}
+
+func (x *OrcaLoadReport) GetRequestCost() map[string]float64 {
+ if x != nil {
+ return x.RequestCost
+ }
+ return nil
+}
+
+func (x *OrcaLoadReport) GetUtilization() map[string]float64 {
+ if x != nil {
+ return x.Utilization
+ }
+ return nil
+}
+
+func (x *OrcaLoadReport) GetRpsFractional() float64 {
+ if x != nil {
+ return x.RpsFractional
+ }
+ return 0
+}
+
+func (x *OrcaLoadReport) GetEps() float64 {
+ if x != nil {
+ return x.Eps
+ }
+ return 0
+}
+
+func (x *OrcaLoadReport) GetNamedMetrics() map[string]float64 {
+ if x != nil {
+ return x.NamedMetrics
+ }
+ return nil
+}
+
+func (x *OrcaLoadReport) GetApplicationUtilization() float64 {
+ if x != nil {
+ return x.ApplicationUtilization
+ }
+ return 0
+}
+
+var File_xds_data_orca_v3_orca_load_report_proto protoreflect.FileDescriptor
+
+var file_xds_data_orca_v3_orca_load_report_proto_rawDesc = []byte{
+ 0x0a, 0x27, 0x78, 0x64, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6f, 0x72, 0x63, 0x61, 0x2f,
+ 0x76, 0x33, 0x2f, 0x6f, 0x72, 0x63, 0x61, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70,
+ 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x78, 0x64, 0x73, 0x2e, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa6, 0x06, 0x0a, 0x0e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61,
+ 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x37, 0x0a, 0x0f, 0x63, 0x70, 0x75, 0x5f, 0x75,
+ 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01,
+ 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x52, 0x0e, 0x63, 0x70, 0x75, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x40, 0x0a, 0x0f, 0x6d, 0x65, 0x6d, 0x5f, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12,
+ 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x52, 0x0e, 0x6d, 0x65, 0x6d, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x03, 0x72, 0x70, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x42,
+ 0x02, 0x18, 0x01, 0x52, 0x03, 0x72, 0x70, 0x73, 0x12, 0x54, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31,
+ 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x76,
+ 0x33, 0x2e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
+ 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x71,
+ 0x0a, 0x0b, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f,
+ 0x72, 0x63, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52,
+ 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x1c, 0xfa, 0x42, 0x19, 0x9a, 0x01, 0x16, 0x2a, 0x14,
+ 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x3f, 0x29, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x52, 0x0b, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x35, 0x0a, 0x0e, 0x72, 0x70, 0x73, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09,
+ 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x0d, 0x72, 0x70, 0x73, 0x46, 0x72,
+ 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x03, 0x65, 0x70, 0x73, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x03, 0x65, 0x70, 0x73, 0x12, 0x57, 0x0a, 0x0d, 0x6e, 0x61,
+ 0x6d, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x63,
+ 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70,
+ 0x6f, 0x72, 0x74, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72,
+ 0x69, 0x63, 0x73, 0x12, 0x47, 0x0a, 0x17, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09,
+ 0x20, 0x01, 0x28, 0x01, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x12, 0x09, 0x29, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x52, 0x16, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x3e, 0x0a, 0x10,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10,
+ 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
+ 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11,
+ 0x4e, 0x61, 0x6d, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x45, 0x6e, 0x74, 0x72,
+ 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
+ 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x5d, 0x0a,
+ 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e,
+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x13, 0x4f, 0x72,
+ 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f,
+ 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6f, 0x72, 0x63, 0x61, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_data_orca_v3_orca_load_report_proto_rawDescOnce sync.Once
+ file_xds_data_orca_v3_orca_load_report_proto_rawDescData = file_xds_data_orca_v3_orca_load_report_proto_rawDesc
+)
+
+func file_xds_data_orca_v3_orca_load_report_proto_rawDescGZIP() []byte {
+ file_xds_data_orca_v3_orca_load_report_proto_rawDescOnce.Do(func() {
+ file_xds_data_orca_v3_orca_load_report_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_data_orca_v3_orca_load_report_proto_rawDescData)
+ })
+ return file_xds_data_orca_v3_orca_load_report_proto_rawDescData
+}
+
+var file_xds_data_orca_v3_orca_load_report_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_xds_data_orca_v3_orca_load_report_proto_goTypes = []interface{}{
+ (*OrcaLoadReport)(nil), // 0: xds.data.orca.v3.OrcaLoadReport
+ nil, // 1: xds.data.orca.v3.OrcaLoadReport.RequestCostEntry
+ nil, // 2: xds.data.orca.v3.OrcaLoadReport.UtilizationEntry
+ nil, // 3: xds.data.orca.v3.OrcaLoadReport.NamedMetricsEntry
+}
+var file_xds_data_orca_v3_orca_load_report_proto_depIdxs = []int32{
+ 1, // 0: xds.data.orca.v3.OrcaLoadReport.request_cost:type_name -> xds.data.orca.v3.OrcaLoadReport.RequestCostEntry
+ 2, // 1: xds.data.orca.v3.OrcaLoadReport.utilization:type_name -> xds.data.orca.v3.OrcaLoadReport.UtilizationEntry
+ 3, // 2: xds.data.orca.v3.OrcaLoadReport.named_metrics:type_name -> xds.data.orca.v3.OrcaLoadReport.NamedMetricsEntry
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_xds_data_orca_v3_orca_load_report_proto_init() }
+func file_xds_data_orca_v3_orca_load_report_proto_init() {
+ if File_xds_data_orca_v3_orca_load_report_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_data_orca_v3_orca_load_report_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OrcaLoadReport); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_data_orca_v3_orca_load_report_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_data_orca_v3_orca_load_report_proto_goTypes,
+ DependencyIndexes: file_xds_data_orca_v3_orca_load_report_proto_depIdxs,
+ MessageInfos: file_xds_data_orca_v3_orca_load_report_proto_msgTypes,
+ }.Build()
+ File_xds_data_orca_v3_orca_load_report_proto = out.File
+ file_xds_data_orca_v3_orca_load_report_proto_rawDesc = nil
+ file_xds_data_orca_v3_orca_load_report_proto_goTypes = nil
+ file_xds_data_orca_v3_orca_load_report_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.validate.go
new file mode 100644
index 000000000..8dd55330a
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/data/orca/v3/orca_load_report.pb.validate.go
@@ -0,0 +1,225 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/data/orca/v3/orca_load_report.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on OrcaLoadReport with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *OrcaLoadReport) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on OrcaLoadReport with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in OrcaLoadReportMultiError,
+// or nil if none found.
+func (m *OrcaLoadReport) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *OrcaLoadReport) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetCpuUtilization() < 0 {
+ err := OrcaLoadReportValidationError{
+ field: "CpuUtilization",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if val := m.GetMemUtilization(); val < 0 || val > 1 {
+ err := OrcaLoadReportValidationError{
+ field: "MemUtilization",
+ reason: "value must be inside range [0, 1]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for Rps
+
+ // no validation rules for RequestCost
+
+ {
+ sorted_keys := make([]string, len(m.GetUtilization()))
+ i := 0
+ for key := range m.GetUtilization() {
+ sorted_keys[i] = key
+ i++
+ }
+ sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] })
+ for _, key := range sorted_keys {
+ val := m.GetUtilization()[key]
+ _ = val
+
+ // no validation rules for Utilization[key]
+
+ if val := val; val < 0 || val > 1 {
+ err := OrcaLoadReportValidationError{
+ field: fmt.Sprintf("Utilization[%v]", key),
+ reason: "value must be inside range [0, 1]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+ }
+
+ if m.GetRpsFractional() < 0 {
+ err := OrcaLoadReportValidationError{
+ field: "RpsFractional",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetEps() < 0 {
+ err := OrcaLoadReportValidationError{
+ field: "Eps",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for NamedMetrics
+
+ if m.GetApplicationUtilization() < 0 {
+ err := OrcaLoadReportValidationError{
+ field: "ApplicationUtilization",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return OrcaLoadReportMultiError(errors)
+ }
+
+ return nil
+}
+
+// OrcaLoadReportMultiError is an error wrapping multiple validation errors
+// returned by OrcaLoadReport.ValidateAll() if the designated constraints
+// aren't met.
+type OrcaLoadReportMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m OrcaLoadReportMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m OrcaLoadReportMultiError) AllErrors() []error { return m }
+
+// OrcaLoadReportValidationError is the validation error returned by
+// OrcaLoadReport.Validate if the designated constraints aren't met.
+type OrcaLoadReportValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e OrcaLoadReportValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e OrcaLoadReportValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e OrcaLoadReportValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e OrcaLoadReportValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e OrcaLoadReportValidationError) ErrorName() string { return "OrcaLoadReportValidationError" }
+
+// Error satisfies the builtin error interface
+func (e OrcaLoadReportValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sOrcaLoadReport.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = OrcaLoadReportValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = OrcaLoadReportValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/service/orca/v3/orca.pb.go b/vendor/github.com/cncf/xds/go/xds/service/orca/v3/orca.pb.go
new file mode 100644
index 000000000..463f4ed33
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/service/orca/v3/orca.pb.go
@@ -0,0 +1,182 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/service/orca/v3/orca.proto
+
+package v3
+
+import (
+ v3 "github.com/cncf/xds/go/xds/data/orca/v3"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type OrcaLoadReportRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ReportInterval *durationpb.Duration `protobuf:"bytes,1,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"`
+ RequestCostNames []string `protobuf:"bytes,2,rep,name=request_cost_names,json=requestCostNames,proto3" json:"request_cost_names,omitempty"`
+}
+
+func (x *OrcaLoadReportRequest) Reset() {
+ *x = OrcaLoadReportRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_service_orca_v3_orca_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OrcaLoadReportRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OrcaLoadReportRequest) ProtoMessage() {}
+
+func (x *OrcaLoadReportRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_service_orca_v3_orca_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OrcaLoadReportRequest.ProtoReflect.Descriptor instead.
+func (*OrcaLoadReportRequest) Descriptor() ([]byte, []int) {
+ return file_xds_service_orca_v3_orca_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *OrcaLoadReportRequest) GetReportInterval() *durationpb.Duration {
+ if x != nil {
+ return x.ReportInterval
+ }
+ return nil
+}
+
+func (x *OrcaLoadReportRequest) GetRequestCostNames() []string {
+ if x != nil {
+ return x.RequestCostNames
+ }
+ return nil
+}
+
+var File_xds_service_orca_v3_orca_proto protoreflect.FileDescriptor
+
+var file_xds_service_orca_v3_orca_proto_rawDesc = []byte{
+ 0x0a, 0x1e, 0x78, 0x64, 0x73, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6f, 0x72,
+ 0x63, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6f, 0x72,
+ 0x63, 0x61, 0x2e, 0x76, 0x33, 0x1a, 0x27, 0x78, 0x64, 0x73, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x2f,
+ 0x6f, 0x72, 0x63, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x72, 0x63, 0x61, 0x5f, 0x6c, 0x6f, 0x61,
+ 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
+ 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89,
+ 0x01, 0x0a, 0x15, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f,
+ 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x72, 0x65,
+ 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x2c, 0x0a, 0x12,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x43, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x32, 0x75, 0x0a, 0x0e, 0x4f, 0x70,
+ 0x65, 0x6e, 0x52, 0x63, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x63, 0x0a, 0x11,
+ 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x6f, 0x72, 0x65, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63,
+ 0x73, 0x12, 0x2a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
+ 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64,
+ 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
+ 0x78, 0x64, 0x73, 0x2e, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x6f, 0x72, 0x63, 0x61, 0x2e, 0x76, 0x33,
+ 0x2e, 0x4f, 0x72, 0x63, 0x61, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x30,
+ 0x01, 0x42, 0x59, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x78, 0x64, 0x73, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6f, 0x72, 0x63, 0x61,
+ 0x2e, 0x76, 0x33, 0x42, 0x09, 0x4f, 0x72, 0x63, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
+ 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63,
+ 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x73, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6f, 0x72, 0x63, 0x61, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_service_orca_v3_orca_proto_rawDescOnce sync.Once
+ file_xds_service_orca_v3_orca_proto_rawDescData = file_xds_service_orca_v3_orca_proto_rawDesc
+)
+
+func file_xds_service_orca_v3_orca_proto_rawDescGZIP() []byte {
+ file_xds_service_orca_v3_orca_proto_rawDescOnce.Do(func() {
+ file_xds_service_orca_v3_orca_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_service_orca_v3_orca_proto_rawDescData)
+ })
+ return file_xds_service_orca_v3_orca_proto_rawDescData
+}
+
+var file_xds_service_orca_v3_orca_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_service_orca_v3_orca_proto_goTypes = []interface{}{
+ (*OrcaLoadReportRequest)(nil), // 0: xds.service.orca.v3.OrcaLoadReportRequest
+ (*durationpb.Duration)(nil), // 1: google.protobuf.Duration
+ (*v3.OrcaLoadReport)(nil), // 2: xds.data.orca.v3.OrcaLoadReport
+}
+var file_xds_service_orca_v3_orca_proto_depIdxs = []int32{
+ 1, // 0: xds.service.orca.v3.OrcaLoadReportRequest.report_interval:type_name -> google.protobuf.Duration
+ 0, // 1: xds.service.orca.v3.OpenRcaService.StreamCoreMetrics:input_type -> xds.service.orca.v3.OrcaLoadReportRequest
+ 2, // 2: xds.service.orca.v3.OpenRcaService.StreamCoreMetrics:output_type -> xds.data.orca.v3.OrcaLoadReport
+ 2, // [2:3] is the sub-list for method output_type
+ 1, // [1:2] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_xds_service_orca_v3_orca_proto_init() }
+func file_xds_service_orca_v3_orca_proto_init() {
+ if File_xds_service_orca_v3_orca_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_service_orca_v3_orca_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OrcaLoadReportRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_service_orca_v3_orca_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_xds_service_orca_v3_orca_proto_goTypes,
+ DependencyIndexes: file_xds_service_orca_v3_orca_proto_depIdxs,
+ MessageInfos: file_xds_service_orca_v3_orca_proto_msgTypes,
+ }.Build()
+ File_xds_service_orca_v3_orca_proto = out.File
+ file_xds_service_orca_v3_orca_proto_rawDesc = nil
+ file_xds_service_orca_v3_orca_proto_goTypes = nil
+ file_xds_service_orca_v3_orca_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/service/orca/v3/orca.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/service/orca/v3/orca.pb.validate.go
new file mode 100644
index 000000000..8949e8372
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/service/orca/v3/orca.pb.validate.go
@@ -0,0 +1,167 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/service/orca/v3/orca.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on OrcaLoadReportRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *OrcaLoadReportRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on OrcaLoadReportRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// OrcaLoadReportRequestMultiError, or nil if none found.
+func (m *OrcaLoadReportRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *OrcaLoadReportRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetReportInterval()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, OrcaLoadReportRequestValidationError{
+ field: "ReportInterval",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, OrcaLoadReportRequestValidationError{
+ field: "ReportInterval",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetReportInterval()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return OrcaLoadReportRequestValidationError{
+ field: "ReportInterval",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return OrcaLoadReportRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// OrcaLoadReportRequestMultiError is an error wrapping multiple validation
+// errors returned by OrcaLoadReportRequest.ValidateAll() if the designated
+// constraints aren't met.
+type OrcaLoadReportRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m OrcaLoadReportRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m OrcaLoadReportRequestMultiError) AllErrors() []error { return m }
+
+// OrcaLoadReportRequestValidationError is the validation error returned by
+// OrcaLoadReportRequest.Validate if the designated constraints aren't met.
+type OrcaLoadReportRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e OrcaLoadReportRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e OrcaLoadReportRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e OrcaLoadReportRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e OrcaLoadReportRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e OrcaLoadReportRequestValidationError) ErrorName() string {
+ return "OrcaLoadReportRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e OrcaLoadReportRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sOrcaLoadReportRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = OrcaLoadReportRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = OrcaLoadReportRequestValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/service/orca/v3/orca_grpc.pb.go b/vendor/github.com/cncf/xds/go/xds/service/orca/v3/orca_grpc.pb.go
new file mode 100644
index 000000000..6cecac149
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/service/orca/v3/orca_grpc.pb.go
@@ -0,0 +1,135 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc v5.27.0--rc2
+// source: xds/service/orca/v3/orca.proto
+
+package v3
+
+import (
+ context "context"
+ v3 "github.com/cncf/xds/go/xds/data/orca/v3"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ OpenRcaService_StreamCoreMetrics_FullMethodName = "/xds.service.orca.v3.OpenRcaService/StreamCoreMetrics"
+)
+
+// OpenRcaServiceClient is the client API for OpenRcaService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type OpenRcaServiceClient interface {
+ StreamCoreMetrics(ctx context.Context, in *OrcaLoadReportRequest, opts ...grpc.CallOption) (OpenRcaService_StreamCoreMetricsClient, error)
+}
+
+type openRcaServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewOpenRcaServiceClient(cc grpc.ClientConnInterface) OpenRcaServiceClient {
+ return &openRcaServiceClient{cc}
+}
+
+func (c *openRcaServiceClient) StreamCoreMetrics(ctx context.Context, in *OrcaLoadReportRequest, opts ...grpc.CallOption) (OpenRcaService_StreamCoreMetricsClient, error) {
+ stream, err := c.cc.NewStream(ctx, &OpenRcaService_ServiceDesc.Streams[0], OpenRcaService_StreamCoreMetrics_FullMethodName, opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &openRcaServiceStreamCoreMetricsClient{stream}
+ if err := x.ClientStream.SendMsg(in); err != nil {
+ return nil, err
+ }
+ if err := x.ClientStream.CloseSend(); err != nil {
+ return nil, err
+ }
+ return x, nil
+}
+
+type OpenRcaService_StreamCoreMetricsClient interface {
+ Recv() (*v3.OrcaLoadReport, error)
+ grpc.ClientStream
+}
+
+type openRcaServiceStreamCoreMetricsClient struct {
+ grpc.ClientStream
+}
+
+func (x *openRcaServiceStreamCoreMetricsClient) Recv() (*v3.OrcaLoadReport, error) {
+ m := new(v3.OrcaLoadReport)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+// OpenRcaServiceServer is the server API for OpenRcaService service.
+// All implementations should embed UnimplementedOpenRcaServiceServer
+// for forward compatibility
+type OpenRcaServiceServer interface {
+ StreamCoreMetrics(*OrcaLoadReportRequest, OpenRcaService_StreamCoreMetricsServer) error
+}
+
+// UnimplementedOpenRcaServiceServer should be embedded to have forward compatible implementations.
+type UnimplementedOpenRcaServiceServer struct {
+}
+
+func (UnimplementedOpenRcaServiceServer) StreamCoreMetrics(*OrcaLoadReportRequest, OpenRcaService_StreamCoreMetricsServer) error {
+ return status.Errorf(codes.Unimplemented, "method StreamCoreMetrics not implemented")
+}
+
+// UnsafeOpenRcaServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to OpenRcaServiceServer will
+// result in compilation errors.
+type UnsafeOpenRcaServiceServer interface {
+ mustEmbedUnimplementedOpenRcaServiceServer()
+}
+
+func RegisterOpenRcaServiceServer(s grpc.ServiceRegistrar, srv OpenRcaServiceServer) {
+ s.RegisterService(&OpenRcaService_ServiceDesc, srv)
+}
+
+func _OpenRcaService_StreamCoreMetrics_Handler(srv interface{}, stream grpc.ServerStream) error {
+ m := new(OrcaLoadReportRequest)
+ if err := stream.RecvMsg(m); err != nil {
+ return err
+ }
+ return srv.(OpenRcaServiceServer).StreamCoreMetrics(m, &openRcaServiceStreamCoreMetricsServer{stream})
+}
+
+type OpenRcaService_StreamCoreMetricsServer interface {
+ Send(*v3.OrcaLoadReport) error
+ grpc.ServerStream
+}
+
+type openRcaServiceStreamCoreMetricsServer struct {
+ grpc.ServerStream
+}
+
+func (x *openRcaServiceStreamCoreMetricsServer) Send(m *v3.OrcaLoadReport) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+// OpenRcaService_ServiceDesc is the grpc.ServiceDesc for OpenRcaService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var OpenRcaService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "xds.service.orca.v3.OpenRcaService",
+ HandlerType: (*OpenRcaServiceServer)(nil),
+ Methods: []grpc.MethodDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "StreamCoreMetrics",
+ Handler: _OpenRcaService_StreamCoreMetrics_Handler,
+ ServerStreams: true,
+ },
+ },
+ Metadata: "xds/service/orca/v3/orca.proto",
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go
new file mode 100644
index 000000000..7299227a3
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.go
@@ -0,0 +1,168 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/matcher/v3/cel.proto
+
+package v3
+
+import (
+ v3 "github.com/cncf/xds/go/xds/type/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CelMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExprMatch *v3.CelExpression `protobuf:"bytes,1,opt,name=expr_match,json=exprMatch,proto3" json:"expr_match,omitempty"`
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+}
+
+func (x *CelMatcher) Reset() {
+ *x = CelMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_cel_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CelMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CelMatcher) ProtoMessage() {}
+
+func (x *CelMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_cel_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CelMatcher.ProtoReflect.Descriptor instead.
+func (*CelMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_cel_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CelMatcher) GetExprMatch() *v3.CelExpression {
+ if x != nil {
+ return x.ExprMatch
+ }
+ return nil
+}
+
+func (x *CelMatcher) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+var File_xds_type_matcher_v3_cel_proto protoreflect.FileDescriptor
+
+var file_xds_type_matcher_v3_cel_proto_rawDesc = []byte{
+ 0x0a, 0x1d, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
+ 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76,
+ 0x33, 0x2f, 0x63, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x73, 0x0a, 0x0a, 0x43, 0x65, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x12, 0x43, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69,
+ 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x65, 0x78,
+ 0x70, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x58, 0x0a, 0x1e, 0x63, 0x6f, 0x6d,
+ 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x43, 0x65, 0x6c,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f,
+ 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_matcher_v3_cel_proto_rawDescOnce sync.Once
+ file_xds_type_matcher_v3_cel_proto_rawDescData = file_xds_type_matcher_v3_cel_proto_rawDesc
+)
+
+func file_xds_type_matcher_v3_cel_proto_rawDescGZIP() []byte {
+ file_xds_type_matcher_v3_cel_proto_rawDescOnce.Do(func() {
+ file_xds_type_matcher_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_cel_proto_rawDescData)
+ })
+ return file_xds_type_matcher_v3_cel_proto_rawDescData
+}
+
+var file_xds_type_matcher_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_type_matcher_v3_cel_proto_goTypes = []interface{}{
+ (*CelMatcher)(nil), // 0: xds.type.matcher.v3.CelMatcher
+ (*v3.CelExpression)(nil), // 1: xds.type.v3.CelExpression
+}
+var file_xds_type_matcher_v3_cel_proto_depIdxs = []int32{
+ 1, // 0: xds.type.matcher.v3.CelMatcher.expr_match:type_name -> xds.type.v3.CelExpression
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_matcher_v3_cel_proto_init() }
+func file_xds_type_matcher_v3_cel_proto_init() {
+ if File_xds_type_matcher_v3_cel_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_matcher_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CelMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_matcher_v3_cel_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_matcher_v3_cel_proto_goTypes,
+ DependencyIndexes: file_xds_type_matcher_v3_cel_proto_depIdxs,
+ MessageInfos: file_xds_type_matcher_v3_cel_proto_msgTypes,
+ }.Build()
+ File_xds_type_matcher_v3_cel_proto = out.File
+ file_xds_type_matcher_v3_cel_proto_rawDesc = nil
+ file_xds_type_matcher_v3_cel_proto_goTypes = nil
+ file_xds_type_matcher_v3_cel_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go
new file mode 100644
index 000000000..091267b0c
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/cel.pb.validate.go
@@ -0,0 +1,177 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/matcher/v3/cel.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on CelMatcher with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *CelMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CelMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in CelMatcherMultiError, or
+// nil if none found.
+func (m *CelMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CelMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetExprMatch() == nil {
+ err := CelMatcherValidationError{
+ field: "ExprMatch",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetExprMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CelMatcherValidationError{
+ field: "ExprMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CelMatcherValidationError{
+ field: "ExprMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetExprMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CelMatcherValidationError{
+ field: "ExprMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Description
+
+ if len(errors) > 0 {
+ return CelMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// CelMatcherMultiError is an error wrapping multiple validation errors
+// returned by CelMatcher.ValidateAll() if the designated constraints aren't met.
+type CelMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CelMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CelMatcherMultiError) AllErrors() []error { return m }
+
+// CelMatcherValidationError is the validation error returned by
+// CelMatcher.Validate if the designated constraints aren't met.
+type CelMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CelMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CelMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CelMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CelMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CelMatcherValidationError) ErrorName() string { return "CelMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CelMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCelMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CelMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CelMatcherValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go
new file mode 100644
index 000000000..5f72c8d11
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.go
@@ -0,0 +1,242 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/matcher/v3/domain.proto
+
+package v3
+
+import (
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ServerNameMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ DomainMatchers []*ServerNameMatcher_DomainMatcher `protobuf:"bytes,1,rep,name=domain_matchers,json=domainMatchers,proto3" json:"domain_matchers,omitempty"`
+}
+
+func (x *ServerNameMatcher) Reset() {
+ *x = ServerNameMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ServerNameMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServerNameMatcher) ProtoMessage() {}
+
+func (x *ServerNameMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServerNameMatcher.ProtoReflect.Descriptor instead.
+func (*ServerNameMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ServerNameMatcher) GetDomainMatchers() []*ServerNameMatcher_DomainMatcher {
+ if x != nil {
+ return x.DomainMatchers
+ }
+ return nil
+}
+
+type ServerNameMatcher_DomainMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Domains []string `protobuf:"bytes,1,rep,name=domains,proto3" json:"domains,omitempty"`
+ OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
+}
+
+func (x *ServerNameMatcher_DomainMatcher) Reset() {
+ *x = ServerNameMatcher_DomainMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ServerNameMatcher_DomainMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ServerNameMatcher_DomainMatcher) ProtoMessage() {}
+
+func (x *ServerNameMatcher_DomainMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_domain_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ServerNameMatcher_DomainMatcher.ProtoReflect.Descriptor instead.
+func (*ServerNameMatcher_DomainMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_domain_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *ServerNameMatcher_DomainMatcher) GetDomains() []string {
+ if x != nil {
+ return x.Domains
+ }
+ return nil
+}
+
+func (x *ServerNameMatcher_DomainMatcher) GetOnMatch() *Matcher_OnMatch {
+ if x != nil {
+ return x.OnMatch
+ }
+ return nil
+}
+
+var File_xds_type_matcher_v3_domain_proto protoreflect.FileDescriptor
+
+var file_xds_type_matcher_v3_domain_proto_rawDesc = []byte{
+ 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79,
+ 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe8, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e,
+ 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5d, 0x0a, 0x0f, 0x64, 0x6f,
+ 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
+ 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x6d, 0x61,
+ 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0e, 0x64, 0x6f, 0x6d, 0x61, 0x69,
+ 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x74, 0x0a, 0x0d, 0x44, 0x6f, 0x6d,
+ 0x61, 0x69, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x22, 0x0a, 0x07, 0x64, 0x6f,
+ 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05,
+ 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3f,
+ 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f,
+ 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42,
+ 0x6e, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65,
+ 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f,
+ 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62,
+ 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_matcher_v3_domain_proto_rawDescOnce sync.Once
+ file_xds_type_matcher_v3_domain_proto_rawDescData = file_xds_type_matcher_v3_domain_proto_rawDesc
+)
+
+func file_xds_type_matcher_v3_domain_proto_rawDescGZIP() []byte {
+ file_xds_type_matcher_v3_domain_proto_rawDescOnce.Do(func() {
+ file_xds_type_matcher_v3_domain_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_domain_proto_rawDescData)
+ })
+ return file_xds_type_matcher_v3_domain_proto_rawDescData
+}
+
+var file_xds_type_matcher_v3_domain_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_xds_type_matcher_v3_domain_proto_goTypes = []interface{}{
+ (*ServerNameMatcher)(nil), // 0: xds.type.matcher.v3.ServerNameMatcher
+ (*ServerNameMatcher_DomainMatcher)(nil), // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher
+ (*Matcher_OnMatch)(nil), // 2: xds.type.matcher.v3.Matcher.OnMatch
+}
+var file_xds_type_matcher_v3_domain_proto_depIdxs = []int32{
+ 1, // 0: xds.type.matcher.v3.ServerNameMatcher.domain_matchers:type_name -> xds.type.matcher.v3.ServerNameMatcher.DomainMatcher
+ 2, // 1: xds.type.matcher.v3.ServerNameMatcher.DomainMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_matcher_v3_domain_proto_init() }
+func file_xds_type_matcher_v3_domain_proto_init() {
+ if File_xds_type_matcher_v3_domain_proto != nil {
+ return
+ }
+ file_xds_type_matcher_v3_matcher_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_matcher_v3_domain_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ServerNameMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_domain_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ServerNameMatcher_DomainMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_matcher_v3_domain_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_matcher_v3_domain_proto_goTypes,
+ DependencyIndexes: file_xds_type_matcher_v3_domain_proto_depIdxs,
+ MessageInfos: file_xds_type_matcher_v3_domain_proto_msgTypes,
+ }.Build()
+ File_xds_type_matcher_v3_domain_proto = out.File
+ file_xds_type_matcher_v3_domain_proto_rawDesc = nil
+ file_xds_type_matcher_v3_domain_proto_goTypes = nil
+ file_xds_type_matcher_v3_domain_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go
new file mode 100644
index 000000000..e95bdfa28
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/domain.pb.validate.go
@@ -0,0 +1,315 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/matcher/v3/domain.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on ServerNameMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *ServerNameMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ServerNameMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ServerNameMatcherMultiError, or nil if none found.
+func (m *ServerNameMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ServerNameMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetDomainMatchers() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ServerNameMatcherValidationError{
+ field: fmt.Sprintf("DomainMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ServerNameMatcherValidationError{
+ field: fmt.Sprintf("DomainMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ServerNameMatcherValidationError{
+ field: fmt.Sprintf("DomainMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ServerNameMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// ServerNameMatcherMultiError is an error wrapping multiple validation errors
+// returned by ServerNameMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type ServerNameMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ServerNameMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ServerNameMatcherMultiError) AllErrors() []error { return m }
+
+// ServerNameMatcherValidationError is the validation error returned by
+// ServerNameMatcher.Validate if the designated constraints aren't met.
+type ServerNameMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ServerNameMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ServerNameMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ServerNameMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ServerNameMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ServerNameMatcherValidationError) ErrorName() string {
+ return "ServerNameMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ServerNameMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sServerNameMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ServerNameMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ServerNameMatcherValidationError{}
+
+// Validate checks the field values on ServerNameMatcher_DomainMatcher with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ServerNameMatcher_DomainMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ServerNameMatcher_DomainMatcher with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// ServerNameMatcher_DomainMatcherMultiError, or nil if none found.
+func (m *ServerNameMatcher_DomainMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ServerNameMatcher_DomainMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetDomains()) < 1 {
+ err := ServerNameMatcher_DomainMatcherValidationError{
+ field: "Domains",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOnMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ServerNameMatcher_DomainMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ServerNameMatcher_DomainMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ServerNameMatcher_DomainMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ServerNameMatcher_DomainMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// ServerNameMatcher_DomainMatcherMultiError is an error wrapping multiple
+// validation errors returned by ServerNameMatcher_DomainMatcher.ValidateAll()
+// if the designated constraints aren't met.
+type ServerNameMatcher_DomainMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ServerNameMatcher_DomainMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ServerNameMatcher_DomainMatcherMultiError) AllErrors() []error { return m }
+
+// ServerNameMatcher_DomainMatcherValidationError is the validation error
+// returned by ServerNameMatcher_DomainMatcher.Validate if the designated
+// constraints aren't met.
+type ServerNameMatcher_DomainMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ServerNameMatcher_DomainMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ServerNameMatcher_DomainMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ServerNameMatcher_DomainMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ServerNameMatcher_DomainMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ServerNameMatcher_DomainMatcherValidationError) ErrorName() string {
+ return "ServerNameMatcher_DomainMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ServerNameMatcher_DomainMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sServerNameMatcher_DomainMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ServerNameMatcher_DomainMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ServerNameMatcher_DomainMatcherValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go
new file mode 100644
index 000000000..4393bb7e2
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.go
@@ -0,0 +1,140 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/matcher/v3/http_inputs.proto
+
+package v3
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type HttpAttributesCelMatchInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *HttpAttributesCelMatchInput) Reset() {
+ *x = HttpAttributesCelMatchInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpAttributesCelMatchInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpAttributesCelMatchInput) ProtoMessage() {}
+
+func (x *HttpAttributesCelMatchInput) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpAttributesCelMatchInput.ProtoReflect.Descriptor instead.
+func (*HttpAttributesCelMatchInput) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{0}
+}
+
+var File_xds_type_matcher_v3_http_inputs_proto protoreflect.FileDescriptor
+
+var file_xds_type_matcher_v3_http_inputs_proto_rawDesc = []byte{
+ 0x0a, 0x25, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x22, 0x1d, 0x0a, 0x1b,
+ 0x48, 0x74, 0x74, 0x70, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x43, 0x65,
+ 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x42, 0x5f, 0x0a, 0x1e, 0x63,
+ 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48,
+ 0x74, 0x74, 0x70, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
+ 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63,
+ 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70,
+ 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce sync.Once
+ file_xds_type_matcher_v3_http_inputs_proto_rawDescData = file_xds_type_matcher_v3_http_inputs_proto_rawDesc
+)
+
+func file_xds_type_matcher_v3_http_inputs_proto_rawDescGZIP() []byte {
+ file_xds_type_matcher_v3_http_inputs_proto_rawDescOnce.Do(func() {
+ file_xds_type_matcher_v3_http_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_http_inputs_proto_rawDescData)
+ })
+ return file_xds_type_matcher_v3_http_inputs_proto_rawDescData
+}
+
+var file_xds_type_matcher_v3_http_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_type_matcher_v3_http_inputs_proto_goTypes = []interface{}{
+ (*HttpAttributesCelMatchInput)(nil), // 0: xds.type.matcher.v3.HttpAttributesCelMatchInput
+}
+var file_xds_type_matcher_v3_http_inputs_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_matcher_v3_http_inputs_proto_init() }
+func file_xds_type_matcher_v3_http_inputs_proto_init() {
+ if File_xds_type_matcher_v3_http_inputs_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_matcher_v3_http_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpAttributesCelMatchInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_matcher_v3_http_inputs_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_matcher_v3_http_inputs_proto_goTypes,
+ DependencyIndexes: file_xds_type_matcher_v3_http_inputs_proto_depIdxs,
+ MessageInfos: file_xds_type_matcher_v3_http_inputs_proto_msgTypes,
+ }.Build()
+ File_xds_type_matcher_v3_http_inputs_proto = out.File
+ file_xds_type_matcher_v3_http_inputs_proto_rawDesc = nil
+ file_xds_type_matcher_v3_http_inputs_proto_goTypes = nil
+ file_xds_type_matcher_v3_http_inputs_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go
new file mode 100644
index 000000000..5d8742927
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/http_inputs.pb.validate.go
@@ -0,0 +1,139 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/matcher/v3/http_inputs.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on HttpAttributesCelMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HttpAttributesCelMatchInput) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpAttributesCelMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// HttpAttributesCelMatchInputMultiError, or nil if none found.
+func (m *HttpAttributesCelMatchInput) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpAttributesCelMatchInput) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return HttpAttributesCelMatchInputMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpAttributesCelMatchInputMultiError is an error wrapping multiple
+// validation errors returned by HttpAttributesCelMatchInput.ValidateAll() if
+// the designated constraints aren't met.
+type HttpAttributesCelMatchInputMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpAttributesCelMatchInputMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpAttributesCelMatchInputMultiError) AllErrors() []error { return m }
+
+// HttpAttributesCelMatchInputValidationError is the validation error returned
+// by HttpAttributesCelMatchInput.Validate if the designated constraints
+// aren't met.
+type HttpAttributesCelMatchInputValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpAttributesCelMatchInputValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpAttributesCelMatchInputValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpAttributesCelMatchInputValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpAttributesCelMatchInputValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpAttributesCelMatchInputValidationError) ErrorName() string {
+ return "HttpAttributesCelMatchInputValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpAttributesCelMatchInputValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpAttributesCelMatchInput.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpAttributesCelMatchInputValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpAttributesCelMatchInputValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go
new file mode 100644
index 000000000..fdb659946
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.go
@@ -0,0 +1,256 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/matcher/v3/ip.proto
+
+package v3
+
+import (
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ v3 "github.com/cncf/xds/go/xds/core/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type IPMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RangeMatchers []*IPMatcher_IPRangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"`
+}
+
+func (x *IPMatcher) Reset() {
+ *x = IPMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IPMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IPMatcher) ProtoMessage() {}
+
+func (x *IPMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IPMatcher.ProtoReflect.Descriptor instead.
+func (*IPMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *IPMatcher) GetRangeMatchers() []*IPMatcher_IPRangeMatcher {
+ if x != nil {
+ return x.RangeMatchers
+ }
+ return nil
+}
+
+type IPMatcher_IPRangeMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Ranges []*v3.CidrRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"`
+ OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
+ Exclusive bool `protobuf:"varint,3,opt,name=exclusive,proto3" json:"exclusive,omitempty"`
+}
+
+func (x *IPMatcher_IPRangeMatcher) Reset() {
+ *x = IPMatcher_IPRangeMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IPMatcher_IPRangeMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IPMatcher_IPRangeMatcher) ProtoMessage() {}
+
+func (x *IPMatcher_IPRangeMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_ip_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use IPMatcher_IPRangeMatcher.ProtoReflect.Descriptor instead.
+func (*IPMatcher_IPRangeMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_ip_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *IPMatcher_IPRangeMatcher) GetRanges() []*v3.CidrRange {
+ if x != nil {
+ return x.Ranges
+ }
+ return nil
+}
+
+func (x *IPMatcher_IPRangeMatcher) GetOnMatch() *Matcher_OnMatch {
+ if x != nil {
+ return x.OnMatch
+ }
+ return nil
+}
+
+func (x *IPMatcher_IPRangeMatcher) GetExclusive() bool {
+ if x != nil {
+ return x.Exclusive
+ }
+ return false
+}
+
+var File_xds_type_matcher_v3_ip_proto protoreflect.FileDescriptor
+
+var file_xds_type_matcher_v3_ip_proto_rawDesc = []byte{
+ 0x0a, 0x1c, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x69, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x13,
+ 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76,
+ 0x33, 0x2f, 0x63, 0x69, 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x78, 0x64,
+ 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76,
+ 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x09, 0x49, 0x50, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d,
+ 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x49,
+ 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72,
+ 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0xa9, 0x01, 0x0a,
+ 0x0e, 0x49, 0x50, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12,
+ 0x38, 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x16, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69,
+ 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08,
+ 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64,
+ 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76,
+ 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78,
+ 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x65,
+ 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x42, 0x66, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02,
+ 0x08, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78,
+ 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x42, 0x0e, 0x49, 0x50, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73,
+ 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_matcher_v3_ip_proto_rawDescOnce sync.Once
+ file_xds_type_matcher_v3_ip_proto_rawDescData = file_xds_type_matcher_v3_ip_proto_rawDesc
+)
+
+func file_xds_type_matcher_v3_ip_proto_rawDescGZIP() []byte {
+ file_xds_type_matcher_v3_ip_proto_rawDescOnce.Do(func() {
+ file_xds_type_matcher_v3_ip_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_ip_proto_rawDescData)
+ })
+ return file_xds_type_matcher_v3_ip_proto_rawDescData
+}
+
+var file_xds_type_matcher_v3_ip_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_xds_type_matcher_v3_ip_proto_goTypes = []interface{}{
+ (*IPMatcher)(nil), // 0: xds.type.matcher.v3.IPMatcher
+ (*IPMatcher_IPRangeMatcher)(nil), // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher
+ (*v3.CidrRange)(nil), // 2: xds.core.v3.CidrRange
+ (*Matcher_OnMatch)(nil), // 3: xds.type.matcher.v3.Matcher.OnMatch
+}
+var file_xds_type_matcher_v3_ip_proto_depIdxs = []int32{
+ 1, // 0: xds.type.matcher.v3.IPMatcher.range_matchers:type_name -> xds.type.matcher.v3.IPMatcher.IPRangeMatcher
+ 2, // 1: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.ranges:type_name -> xds.core.v3.CidrRange
+ 3, // 2: xds.type.matcher.v3.IPMatcher.IPRangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_matcher_v3_ip_proto_init() }
+func file_xds_type_matcher_v3_ip_proto_init() {
+ if File_xds_type_matcher_v3_ip_proto != nil {
+ return
+ }
+ file_xds_type_matcher_v3_matcher_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_matcher_v3_ip_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IPMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_ip_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IPMatcher_IPRangeMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_matcher_v3_ip_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_matcher_v3_ip_proto_goTypes,
+ DependencyIndexes: file_xds_type_matcher_v3_ip_proto_depIdxs,
+ MessageInfos: file_xds_type_matcher_v3_ip_proto_msgTypes,
+ }.Build()
+ File_xds_type_matcher_v3_ip_proto = out.File
+ file_xds_type_matcher_v3_ip_proto_rawDesc = nil
+ file_xds_type_matcher_v3_ip_proto_goTypes = nil
+ file_xds_type_matcher_v3_ip_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go
new file mode 100644
index 000000000..c1fca03bc
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/ip.pb.validate.go
@@ -0,0 +1,347 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/matcher/v3/ip.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on IPMatcher with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *IPMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IPMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in IPMatcherMultiError, or nil
+// if none found.
+func (m *IPMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IPMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetRangeMatchers() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IPMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IPMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IPMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return IPMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// IPMatcherMultiError is an error wrapping multiple validation errors returned
+// by IPMatcher.ValidateAll() if the designated constraints aren't met.
+type IPMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IPMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m IPMatcherMultiError) AllErrors() []error { return m }
+
+// IPMatcherValidationError is the validation error returned by
+// IPMatcher.Validate if the designated constraints aren't met.
+type IPMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IPMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IPMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IPMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IPMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IPMatcherValidationError) ErrorName() string { return "IPMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e IPMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sIPMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IPMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IPMatcherValidationError{}
+
+// Validate checks the field values on IPMatcher_IPRangeMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *IPMatcher_IPRangeMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on IPMatcher_IPRangeMatcher with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// IPMatcher_IPRangeMatcherMultiError, or nil if none found.
+func (m *IPMatcher_IPRangeMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *IPMatcher_IPRangeMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetRanges()) < 1 {
+ err := IPMatcher_IPRangeMatcherValidationError{
+ field: "Ranges",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetRanges() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IPMatcher_IPRangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IPMatcher_IPRangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IPMatcher_IPRangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetOnMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, IPMatcher_IPRangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, IPMatcher_IPRangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return IPMatcher_IPRangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Exclusive
+
+ if len(errors) > 0 {
+ return IPMatcher_IPRangeMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// IPMatcher_IPRangeMatcherMultiError is an error wrapping multiple validation
+// errors returned by IPMatcher_IPRangeMatcher.ValidateAll() if the designated
+// constraints aren't met.
+type IPMatcher_IPRangeMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m IPMatcher_IPRangeMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m IPMatcher_IPRangeMatcherMultiError) AllErrors() []error { return m }
+
+// IPMatcher_IPRangeMatcherValidationError is the validation error returned by
+// IPMatcher_IPRangeMatcher.Validate if the designated constraints aren't met.
+type IPMatcher_IPRangeMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e IPMatcher_IPRangeMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e IPMatcher_IPRangeMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e IPMatcher_IPRangeMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e IPMatcher_IPRangeMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e IPMatcher_IPRangeMatcherValidationError) ErrorName() string {
+ return "IPMatcher_IPRangeMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e IPMatcher_IPRangeMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sIPMatcher_IPRangeMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = IPMatcher_IPRangeMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = IPMatcher_IPRangeMatcherValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go
new file mode 100644
index 000000000..d94b03b55
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.go
@@ -0,0 +1,1056 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/matcher/v3/matcher.proto
+
+package v3
+
+import (
+ v3 "github.com/cncf/xds/go/xds/core/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Matcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to MatcherType:
+ //
+ // *Matcher_MatcherList_
+ // *Matcher_MatcherTree_
+ MatcherType isMatcher_MatcherType `protobuf_oneof:"matcher_type"`
+ OnNoMatch *Matcher_OnMatch `protobuf:"bytes,3,opt,name=on_no_match,json=onNoMatch,proto3" json:"on_no_match,omitempty"`
+}
+
+func (x *Matcher) Reset() {
+ *x = Matcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Matcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Matcher) ProtoMessage() {}
+
+func (x *Matcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Matcher.ProtoReflect.Descriptor instead.
+func (*Matcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *Matcher) GetMatcherType() isMatcher_MatcherType {
+ if m != nil {
+ return m.MatcherType
+ }
+ return nil
+}
+
+func (x *Matcher) GetMatcherList() *Matcher_MatcherList {
+ if x, ok := x.GetMatcherType().(*Matcher_MatcherList_); ok {
+ return x.MatcherList
+ }
+ return nil
+}
+
+func (x *Matcher) GetMatcherTree() *Matcher_MatcherTree {
+ if x, ok := x.GetMatcherType().(*Matcher_MatcherTree_); ok {
+ return x.MatcherTree
+ }
+ return nil
+}
+
+func (x *Matcher) GetOnNoMatch() *Matcher_OnMatch {
+ if x != nil {
+ return x.OnNoMatch
+ }
+ return nil
+}
+
+type isMatcher_MatcherType interface {
+ isMatcher_MatcherType()
+}
+
+type Matcher_MatcherList_ struct {
+ MatcherList *Matcher_MatcherList `protobuf:"bytes,1,opt,name=matcher_list,json=matcherList,proto3,oneof"`
+}
+
+type Matcher_MatcherTree_ struct {
+ MatcherTree *Matcher_MatcherTree `protobuf:"bytes,2,opt,name=matcher_tree,json=matcherTree,proto3,oneof"`
+}
+
+func (*Matcher_MatcherList_) isMatcher_MatcherType() {}
+
+func (*Matcher_MatcherTree_) isMatcher_MatcherType() {}
+
+type Matcher_OnMatch struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to OnMatch:
+ //
+ // *Matcher_OnMatch_Matcher
+ // *Matcher_OnMatch_Action
+ OnMatch isMatcher_OnMatch_OnMatch `protobuf_oneof:"on_match"`
+}
+
+func (x *Matcher_OnMatch) Reset() {
+ *x = Matcher_OnMatch{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Matcher_OnMatch) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Matcher_OnMatch) ProtoMessage() {}
+
+func (x *Matcher_OnMatch) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Matcher_OnMatch.ProtoReflect.Descriptor instead.
+func (*Matcher_OnMatch) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (m *Matcher_OnMatch) GetOnMatch() isMatcher_OnMatch_OnMatch {
+ if m != nil {
+ return m.OnMatch
+ }
+ return nil
+}
+
+func (x *Matcher_OnMatch) GetMatcher() *Matcher {
+ if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Matcher); ok {
+ return x.Matcher
+ }
+ return nil
+}
+
+func (x *Matcher_OnMatch) GetAction() *v3.TypedExtensionConfig {
+ if x, ok := x.GetOnMatch().(*Matcher_OnMatch_Action); ok {
+ return x.Action
+ }
+ return nil
+}
+
+type isMatcher_OnMatch_OnMatch interface {
+ isMatcher_OnMatch_OnMatch()
+}
+
+type Matcher_OnMatch_Matcher struct {
+ Matcher *Matcher `protobuf:"bytes,1,opt,name=matcher,proto3,oneof"`
+}
+
+type Matcher_OnMatch_Action struct {
+ Action *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=action,proto3,oneof"`
+}
+
+func (*Matcher_OnMatch_Matcher) isMatcher_OnMatch_OnMatch() {}
+
+func (*Matcher_OnMatch_Action) isMatcher_OnMatch_OnMatch() {}
+
+type Matcher_MatcherList struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Matchers []*Matcher_MatcherList_FieldMatcher `protobuf:"bytes,1,rep,name=matchers,proto3" json:"matchers,omitempty"`
+}
+
+func (x *Matcher_MatcherList) Reset() {
+ *x = Matcher_MatcherList{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Matcher_MatcherList) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Matcher_MatcherList) ProtoMessage() {}
+
+func (x *Matcher_MatcherList) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Matcher_MatcherList.ProtoReflect.Descriptor instead.
+func (*Matcher_MatcherList) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1}
+}
+
+func (x *Matcher_MatcherList) GetMatchers() []*Matcher_MatcherList_FieldMatcher {
+ if x != nil {
+ return x.Matchers
+ }
+ return nil
+}
+
+type Matcher_MatcherTree struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
+ // Types that are assignable to TreeType:
+ //
+ // *Matcher_MatcherTree_ExactMatchMap
+ // *Matcher_MatcherTree_PrefixMatchMap
+ // *Matcher_MatcherTree_CustomMatch
+ TreeType isMatcher_MatcherTree_TreeType `protobuf_oneof:"tree_type"`
+}
+
+func (x *Matcher_MatcherTree) Reset() {
+ *x = Matcher_MatcherTree{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Matcher_MatcherTree) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Matcher_MatcherTree) ProtoMessage() {}
+
+func (x *Matcher_MatcherTree) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Matcher_MatcherTree.ProtoReflect.Descriptor instead.
+func (*Matcher_MatcherTree) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 2}
+}
+
+func (x *Matcher_MatcherTree) GetInput() *v3.TypedExtensionConfig {
+ if x != nil {
+ return x.Input
+ }
+ return nil
+}
+
+func (m *Matcher_MatcherTree) GetTreeType() isMatcher_MatcherTree_TreeType {
+ if m != nil {
+ return m.TreeType
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherTree) GetExactMatchMap() *Matcher_MatcherTree_MatchMap {
+ if x, ok := x.GetTreeType().(*Matcher_MatcherTree_ExactMatchMap); ok {
+ return x.ExactMatchMap
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherTree) GetPrefixMatchMap() *Matcher_MatcherTree_MatchMap {
+ if x, ok := x.GetTreeType().(*Matcher_MatcherTree_PrefixMatchMap); ok {
+ return x.PrefixMatchMap
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherTree) GetCustomMatch() *v3.TypedExtensionConfig {
+ if x, ok := x.GetTreeType().(*Matcher_MatcherTree_CustomMatch); ok {
+ return x.CustomMatch
+ }
+ return nil
+}
+
+type isMatcher_MatcherTree_TreeType interface {
+ isMatcher_MatcherTree_TreeType()
+}
+
+type Matcher_MatcherTree_ExactMatchMap struct {
+ ExactMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,2,opt,name=exact_match_map,json=exactMatchMap,proto3,oneof"`
+}
+
+type Matcher_MatcherTree_PrefixMatchMap struct {
+ PrefixMatchMap *Matcher_MatcherTree_MatchMap `protobuf:"bytes,3,opt,name=prefix_match_map,json=prefixMatchMap,proto3,oneof"`
+}
+
+type Matcher_MatcherTree_CustomMatch struct {
+ CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,4,opt,name=custom_match,json=customMatch,proto3,oneof"`
+}
+
+func (*Matcher_MatcherTree_ExactMatchMap) isMatcher_MatcherTree_TreeType() {}
+
+func (*Matcher_MatcherTree_PrefixMatchMap) isMatcher_MatcherTree_TreeType() {}
+
+func (*Matcher_MatcherTree_CustomMatch) isMatcher_MatcherTree_TreeType() {}
+
+type Matcher_MatcherList_Predicate struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to MatchType:
+ //
+ // *Matcher_MatcherList_Predicate_SinglePredicate_
+ // *Matcher_MatcherList_Predicate_OrMatcher
+ // *Matcher_MatcherList_Predicate_AndMatcher
+ // *Matcher_MatcherList_Predicate_NotMatcher
+ MatchType isMatcher_MatcherList_Predicate_MatchType `protobuf_oneof:"match_type"`
+}
+
+func (x *Matcher_MatcherList_Predicate) Reset() {
+ *x = Matcher_MatcherList_Predicate{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Matcher_MatcherList_Predicate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Matcher_MatcherList_Predicate) ProtoMessage() {}
+
+func (x *Matcher_MatcherList_Predicate) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Matcher_MatcherList_Predicate.ProtoReflect.Descriptor instead.
+func (*Matcher_MatcherList_Predicate) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0}
+}
+
+func (m *Matcher_MatcherList_Predicate) GetMatchType() isMatcher_MatcherList_Predicate_MatchType {
+ if m != nil {
+ return m.MatchType
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherList_Predicate) GetSinglePredicate() *Matcher_MatcherList_Predicate_SinglePredicate {
+ if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_SinglePredicate_); ok {
+ return x.SinglePredicate
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherList_Predicate) GetOrMatcher() *Matcher_MatcherList_Predicate_PredicateList {
+ if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_OrMatcher); ok {
+ return x.OrMatcher
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherList_Predicate) GetAndMatcher() *Matcher_MatcherList_Predicate_PredicateList {
+ if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_AndMatcher); ok {
+ return x.AndMatcher
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherList_Predicate) GetNotMatcher() *Matcher_MatcherList_Predicate {
+ if x, ok := x.GetMatchType().(*Matcher_MatcherList_Predicate_NotMatcher); ok {
+ return x.NotMatcher
+ }
+ return nil
+}
+
+type isMatcher_MatcherList_Predicate_MatchType interface {
+ isMatcher_MatcherList_Predicate_MatchType()
+}
+
+type Matcher_MatcherList_Predicate_SinglePredicate_ struct {
+ SinglePredicate *Matcher_MatcherList_Predicate_SinglePredicate `protobuf:"bytes,1,opt,name=single_predicate,json=singlePredicate,proto3,oneof"`
+}
+
+type Matcher_MatcherList_Predicate_OrMatcher struct {
+ OrMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,2,opt,name=or_matcher,json=orMatcher,proto3,oneof"`
+}
+
+type Matcher_MatcherList_Predicate_AndMatcher struct {
+ AndMatcher *Matcher_MatcherList_Predicate_PredicateList `protobuf:"bytes,3,opt,name=and_matcher,json=andMatcher,proto3,oneof"`
+}
+
+type Matcher_MatcherList_Predicate_NotMatcher struct {
+ NotMatcher *Matcher_MatcherList_Predicate `protobuf:"bytes,4,opt,name=not_matcher,json=notMatcher,proto3,oneof"`
+}
+
+func (*Matcher_MatcherList_Predicate_SinglePredicate_) isMatcher_MatcherList_Predicate_MatchType() {}
+
+func (*Matcher_MatcherList_Predicate_OrMatcher) isMatcher_MatcherList_Predicate_MatchType() {}
+
+func (*Matcher_MatcherList_Predicate_AndMatcher) isMatcher_MatcherList_Predicate_MatchType() {}
+
+func (*Matcher_MatcherList_Predicate_NotMatcher) isMatcher_MatcherList_Predicate_MatchType() {}
+
+type Matcher_MatcherList_FieldMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Predicate *Matcher_MatcherList_Predicate `protobuf:"bytes,1,opt,name=predicate,proto3" json:"predicate,omitempty"`
+ OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
+}
+
+func (x *Matcher_MatcherList_FieldMatcher) Reset() {
+ *x = Matcher_MatcherList_FieldMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Matcher_MatcherList_FieldMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Matcher_MatcherList_FieldMatcher) ProtoMessage() {}
+
+func (x *Matcher_MatcherList_FieldMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Matcher_MatcherList_FieldMatcher.ProtoReflect.Descriptor instead.
+func (*Matcher_MatcherList_FieldMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 1}
+}
+
+func (x *Matcher_MatcherList_FieldMatcher) GetPredicate() *Matcher_MatcherList_Predicate {
+ if x != nil {
+ return x.Predicate
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherList_FieldMatcher) GetOnMatch() *Matcher_OnMatch {
+ if x != nil {
+ return x.OnMatch
+ }
+ return nil
+}
+
+type Matcher_MatcherList_Predicate_SinglePredicate struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Input *v3.TypedExtensionConfig `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
+ // Types that are assignable to Matcher:
+ //
+ // *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch
+ // *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch
+ Matcher isMatcher_MatcherList_Predicate_SinglePredicate_Matcher `protobuf_oneof:"matcher"`
+}
+
+func (x *Matcher_MatcherList_Predicate_SinglePredicate) Reset() {
+ *x = Matcher_MatcherList_Predicate_SinglePredicate{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Matcher_MatcherList_Predicate_SinglePredicate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Matcher_MatcherList_Predicate_SinglePredicate) ProtoMessage() {}
+
+func (x *Matcher_MatcherList_Predicate_SinglePredicate) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Matcher_MatcherList_Predicate_SinglePredicate.ProtoReflect.Descriptor instead.
+func (*Matcher_MatcherList_Predicate_SinglePredicate) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 0}
+}
+
+func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetInput() *v3.TypedExtensionConfig {
+ if x != nil {
+ return x.Input
+ }
+ return nil
+}
+
+func (m *Matcher_MatcherList_Predicate_SinglePredicate) GetMatcher() isMatcher_MatcherList_Predicate_SinglePredicate_Matcher {
+ if m != nil {
+ return m.Matcher
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetValueMatch() *StringMatcher {
+ if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch); ok {
+ return x.ValueMatch
+ }
+ return nil
+}
+
+func (x *Matcher_MatcherList_Predicate_SinglePredicate) GetCustomMatch() *v3.TypedExtensionConfig {
+ if x, ok := x.GetMatcher().(*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch); ok {
+ return x.CustomMatch
+ }
+ return nil
+}
+
+type isMatcher_MatcherList_Predicate_SinglePredicate_Matcher interface {
+ isMatcher_MatcherList_Predicate_SinglePredicate_Matcher()
+}
+
+type Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch struct {
+ ValueMatch *StringMatcher `protobuf:"bytes,2,opt,name=value_match,json=valueMatch,proto3,oneof"`
+}
+
+type Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch struct {
+ CustomMatch *v3.TypedExtensionConfig `protobuf:"bytes,3,opt,name=custom_match,json=customMatch,proto3,oneof"`
+}
+
+func (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() {
+}
+
+func (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch) isMatcher_MatcherList_Predicate_SinglePredicate_Matcher() {
+}
+
+type Matcher_MatcherList_Predicate_PredicateList struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Predicate []*Matcher_MatcherList_Predicate `protobuf:"bytes,1,rep,name=predicate,proto3" json:"predicate,omitempty"`
+}
+
+func (x *Matcher_MatcherList_Predicate_PredicateList) Reset() {
+ *x = Matcher_MatcherList_Predicate_PredicateList{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Matcher_MatcherList_Predicate_PredicateList) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Matcher_MatcherList_Predicate_PredicateList) ProtoMessage() {}
+
+func (x *Matcher_MatcherList_Predicate_PredicateList) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Matcher_MatcherList_Predicate_PredicateList.ProtoReflect.Descriptor instead.
+func (*Matcher_MatcherList_Predicate_PredicateList) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 1, 0, 1}
+}
+
+func (x *Matcher_MatcherList_Predicate_PredicateList) GetPredicate() []*Matcher_MatcherList_Predicate {
+ if x != nil {
+ return x.Predicate
+ }
+ return nil
+}
+
+type Matcher_MatcherTree_MatchMap struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Map map[string]*Matcher_OnMatch `protobuf:"bytes,1,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *Matcher_MatcherTree_MatchMap) Reset() {
+ *x = Matcher_MatcherTree_MatchMap{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Matcher_MatcherTree_MatchMap) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Matcher_MatcherTree_MatchMap) ProtoMessage() {}
+
+func (x *Matcher_MatcherTree_MatchMap) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_matcher_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Matcher_MatcherTree_MatchMap.ProtoReflect.Descriptor instead.
+func (*Matcher_MatcherTree_MatchMap) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_matcher_proto_rawDescGZIP(), []int{0, 2, 0}
+}
+
+func (x *Matcher_MatcherTree_MatchMap) GetMap() map[string]*Matcher_OnMatch {
+ if x != nil {
+ return x.Map
+ }
+ return nil
+}
+
+var File_xds_type_matcher_v3_matcher_proto protoreflect.FileDescriptor
+
+var file_xds_type_matcher_v3_matcher_proto_rawDesc = []byte{
+ 0x0a, 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f,
+ 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
+ 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0xf6, 0x0f, 0x0a, 0x07, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0c,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0b,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4d, 0x0a, 0x0c, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x28, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x6f, 0x6e,
+ 0x5f, 0x6e, 0x6f, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x09, 0x6f, 0x6e, 0x4e, 0x6f, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x1a, 0x91, 0x01, 0x0a, 0x07, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x38, 0x0a, 0x07,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
+ 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3b, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72,
+ 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x61, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12,
+ 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xb6, 0x08, 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74,
+ 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa,
+ 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x73, 0x1a, 0x91, 0x06, 0x0a, 0x09, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12,
+ 0x6f, 0x0a, 0x10, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63,
+ 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x78, 0x64, 0x73, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c,
+ 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x69,
+ 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52,
+ 0x0f, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65,
+ 0x12, 0x61, 0x0a, 0x0a, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50,
+ 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61,
+ 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x09, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x12, 0x63, 0x0a, 0x0b, 0x61, 0x6e, 0x64, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c, 0x69,
+ 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x2e, 0x50, 0x72, 0x65,
+ 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x6e,
+ 0x64, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x55, 0x0a, 0x0b, 0x6e, 0x6f, 0x74, 0x5f,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e,
+ 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74,
+ 0x65, 0x48, 0x00, 0x52, 0x0a, 0x6e, 0x6f, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x1a,
+ 0xf3, 0x01, 0x0a, 0x0f, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63,
+ 0x61, 0x74, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
+ 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52,
+ 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x45, 0x0a, 0x0b, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x78, 0x64,
+ 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76,
+ 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48,
+ 0x00, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x46, 0x0a,
+ 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
+ 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x6b, 0x0a, 0x0d, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61,
+ 0x74, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63,
+ 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x64, 0x73, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c,
+ 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa,
+ 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61,
+ 0x74, 0x65, 0x42, 0x11, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0xb5, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5a, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63,
+ 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x78, 0x64, 0x73, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x4c,
+ 0x69, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x42, 0x08, 0xfa,
+ 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x61,
+ 0x74, 0x65, 0x12, 0x49, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a,
+ 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x1a, 0xa9, 0x04,
+ 0x0a, 0x0b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x41, 0x0a,
+ 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78,
+ 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64,
+ 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42,
+ 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x69, 0x6e, 0x70, 0x75, 0x74,
+ 0x12, 0x5b, 0x0a, 0x0f, 0x65, 0x78, 0x61, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f,
+ 0x6d, 0x61, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54,
+ 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0d,
+ 0x65, 0x78, 0x61, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x5d, 0x0a,
+ 0x10, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6d, 0x61,
+ 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65,
+ 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x72,
+ 0x65, 0x66, 0x69, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61, 0x70, 0x12, 0x46, 0x0a, 0x0c,
+ 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
+ 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x1a, 0xc0, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61,
+ 0x70, 0x12, 0x56, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a,
+ 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x61,
+ 0x70, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x9a,
+ 0x01, 0x02, 0x08, 0x01, 0x52, 0x03, 0x6d, 0x61, 0x70, 0x1a, 0x5c, 0x0a, 0x08, 0x4d, 0x61, 0x70,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x3a, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x52, 0x05, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x09, 0x74, 0x72, 0x65, 0x65, 0x5f,
+ 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x42, 0x5c, 0x0a, 0x1e, 0x63, 0x6f, 0x6d,
+ 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73,
+ 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_matcher_v3_matcher_proto_rawDescOnce sync.Once
+ file_xds_type_matcher_v3_matcher_proto_rawDescData = file_xds_type_matcher_v3_matcher_proto_rawDesc
+)
+
+func file_xds_type_matcher_v3_matcher_proto_rawDescGZIP() []byte {
+ file_xds_type_matcher_v3_matcher_proto_rawDescOnce.Do(func() {
+ file_xds_type_matcher_v3_matcher_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_matcher_proto_rawDescData)
+ })
+ return file_xds_type_matcher_v3_matcher_proto_rawDescData
+}
+
+var file_xds_type_matcher_v3_matcher_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_xds_type_matcher_v3_matcher_proto_goTypes = []interface{}{
+ (*Matcher)(nil), // 0: xds.type.matcher.v3.Matcher
+ (*Matcher_OnMatch)(nil), // 1: xds.type.matcher.v3.Matcher.OnMatch
+ (*Matcher_MatcherList)(nil), // 2: xds.type.matcher.v3.Matcher.MatcherList
+ (*Matcher_MatcherTree)(nil), // 3: xds.type.matcher.v3.Matcher.MatcherTree
+ (*Matcher_MatcherList_Predicate)(nil), // 4: xds.type.matcher.v3.Matcher.MatcherList.Predicate
+ (*Matcher_MatcherList_FieldMatcher)(nil), // 5: xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher
+ (*Matcher_MatcherList_Predicate_SinglePredicate)(nil), // 6: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate
+ (*Matcher_MatcherList_Predicate_PredicateList)(nil), // 7: xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList
+ (*Matcher_MatcherTree_MatchMap)(nil), // 8: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap
+ nil, // 9: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry
+ (*v3.TypedExtensionConfig)(nil), // 10: xds.core.v3.TypedExtensionConfig
+ (*StringMatcher)(nil), // 11: xds.type.matcher.v3.StringMatcher
+}
+var file_xds_type_matcher_v3_matcher_proto_depIdxs = []int32{
+ 2, // 0: xds.type.matcher.v3.Matcher.matcher_list:type_name -> xds.type.matcher.v3.Matcher.MatcherList
+ 3, // 1: xds.type.matcher.v3.Matcher.matcher_tree:type_name -> xds.type.matcher.v3.Matcher.MatcherTree
+ 1, // 2: xds.type.matcher.v3.Matcher.on_no_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
+ 0, // 3: xds.type.matcher.v3.Matcher.OnMatch.matcher:type_name -> xds.type.matcher.v3.Matcher
+ 10, // 4: xds.type.matcher.v3.Matcher.OnMatch.action:type_name -> xds.core.v3.TypedExtensionConfig
+ 5, // 5: xds.type.matcher.v3.Matcher.MatcherList.matchers:type_name -> xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher
+ 10, // 6: xds.type.matcher.v3.Matcher.MatcherTree.input:type_name -> xds.core.v3.TypedExtensionConfig
+ 8, // 7: xds.type.matcher.v3.Matcher.MatcherTree.exact_match_map:type_name -> xds.type.matcher.v3.Matcher.MatcherTree.MatchMap
+ 8, // 8: xds.type.matcher.v3.Matcher.MatcherTree.prefix_match_map:type_name -> xds.type.matcher.v3.Matcher.MatcherTree.MatchMap
+ 10, // 9: xds.type.matcher.v3.Matcher.MatcherTree.custom_match:type_name -> xds.core.v3.TypedExtensionConfig
+ 6, // 10: xds.type.matcher.v3.Matcher.MatcherList.Predicate.single_predicate:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate
+ 7, // 11: xds.type.matcher.v3.Matcher.MatcherList.Predicate.or_matcher:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList
+ 7, // 12: xds.type.matcher.v3.Matcher.MatcherList.Predicate.and_matcher:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList
+ 4, // 13: xds.type.matcher.v3.Matcher.MatcherList.Predicate.not_matcher:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate
+ 4, // 14: xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher.predicate:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate
+ 1, // 15: xds.type.matcher.v3.Matcher.MatcherList.FieldMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
+ 10, // 16: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.input:type_name -> xds.core.v3.TypedExtensionConfig
+ 11, // 17: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.value_match:type_name -> xds.type.matcher.v3.StringMatcher
+ 10, // 18: xds.type.matcher.v3.Matcher.MatcherList.Predicate.SinglePredicate.custom_match:type_name -> xds.core.v3.TypedExtensionConfig
+ 4, // 19: xds.type.matcher.v3.Matcher.MatcherList.Predicate.PredicateList.predicate:type_name -> xds.type.matcher.v3.Matcher.MatcherList.Predicate
+ 9, // 20: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.map:type_name -> xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry
+ 1, // 21: xds.type.matcher.v3.Matcher.MatcherTree.MatchMap.MapEntry.value:type_name -> xds.type.matcher.v3.Matcher.OnMatch
+ 22, // [22:22] is the sub-list for method output_type
+ 22, // [22:22] is the sub-list for method input_type
+ 22, // [22:22] is the sub-list for extension type_name
+ 22, // [22:22] is the sub-list for extension extendee
+ 0, // [0:22] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_matcher_v3_matcher_proto_init() }
+func file_xds_type_matcher_v3_matcher_proto_init() {
+ if File_xds_type_matcher_v3_matcher_proto != nil {
+ return
+ }
+ file_xds_type_matcher_v3_string_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Matcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Matcher_OnMatch); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Matcher_MatcherList); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Matcher_MatcherTree); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Matcher_MatcherList_Predicate); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Matcher_MatcherList_FieldMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Matcher_MatcherList_Predicate_SinglePredicate); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Matcher_MatcherList_Predicate_PredicateList); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Matcher_MatcherTree_MatchMap); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*Matcher_MatcherList_)(nil),
+ (*Matcher_MatcherTree_)(nil),
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*Matcher_OnMatch_Matcher)(nil),
+ (*Matcher_OnMatch_Action)(nil),
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[3].OneofWrappers = []interface{}{
+ (*Matcher_MatcherTree_ExactMatchMap)(nil),
+ (*Matcher_MatcherTree_PrefixMatchMap)(nil),
+ (*Matcher_MatcherTree_CustomMatch)(nil),
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[4].OneofWrappers = []interface{}{
+ (*Matcher_MatcherList_Predicate_SinglePredicate_)(nil),
+ (*Matcher_MatcherList_Predicate_OrMatcher)(nil),
+ (*Matcher_MatcherList_Predicate_AndMatcher)(nil),
+ (*Matcher_MatcherList_Predicate_NotMatcher)(nil),
+ }
+ file_xds_type_matcher_v3_matcher_proto_msgTypes[6].OneofWrappers = []interface{}{
+ (*Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch)(nil),
+ (*Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_matcher_v3_matcher_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 10,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_matcher_v3_matcher_proto_goTypes,
+ DependencyIndexes: file_xds_type_matcher_v3_matcher_proto_depIdxs,
+ MessageInfos: file_xds_type_matcher_v3_matcher_proto_msgTypes,
+ }.Build()
+ File_xds_type_matcher_v3_matcher_proto = out.File
+ file_xds_type_matcher_v3_matcher_proto_rawDesc = nil
+ file_xds_type_matcher_v3_matcher_proto_goTypes = nil
+ file_xds_type_matcher_v3_matcher_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go
new file mode 100644
index 000000000..60b721f5f
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/matcher.pb.validate.go
@@ -0,0 +1,1913 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/matcher/v3/matcher.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Matcher with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Matcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Matcher with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in MatcherMultiError, or nil if none found.
+func (m *Matcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Matcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetOnNoMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MatcherValidationError{
+ field: "OnNoMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MatcherValidationError{
+ field: "OnNoMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOnNoMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MatcherValidationError{
+ field: "OnNoMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ switch v := m.MatcherType.(type) {
+ case *Matcher_MatcherList_:
+ if v == nil {
+ err := MatcherValidationError{
+ field: "MatcherType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetMatcherList()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MatcherValidationError{
+ field: "MatcherList",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MatcherValidationError{
+ field: "MatcherList",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMatcherList()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MatcherValidationError{
+ field: "MatcherList",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Matcher_MatcherTree_:
+ if v == nil {
+ err := MatcherValidationError{
+ field: "MatcherType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetMatcherTree()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MatcherValidationError{
+ field: "MatcherTree",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MatcherValidationError{
+ field: "MatcherTree",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMatcherTree()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MatcherValidationError{
+ field: "MatcherTree",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return MatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// MatcherMultiError is an error wrapping multiple validation errors returned
+// by Matcher.ValidateAll() if the designated constraints aren't met.
+type MatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MatcherMultiError) AllErrors() []error { return m }
+
+// MatcherValidationError is the validation error returned by Matcher.Validate
+// if the designated constraints aren't met.
+type MatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MatcherValidationError) ErrorName() string { return "MatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e MatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MatcherValidationError{}
+
+// Validate checks the field values on Matcher_OnMatch with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *Matcher_OnMatch) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Matcher_OnMatch with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Matcher_OnMatchMultiError, or nil if none found.
+func (m *Matcher_OnMatch) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Matcher_OnMatch) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofOnMatchPresent := false
+ switch v := m.OnMatch.(type) {
+ case *Matcher_OnMatch_Matcher:
+ if v == nil {
+ err := Matcher_OnMatchValidationError{
+ field: "OnMatch",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofOnMatchPresent = true
+
+ if all {
+ switch v := interface{}(m.GetMatcher()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_OnMatchValidationError{
+ field: "Matcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_OnMatchValidationError{
+ field: "Matcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_OnMatchValidationError{
+ field: "Matcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Matcher_OnMatch_Action:
+ if v == nil {
+ err := Matcher_OnMatchValidationError{
+ field: "OnMatch",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofOnMatchPresent = true
+
+ if all {
+ switch v := interface{}(m.GetAction()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_OnMatchValidationError{
+ field: "Action",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_OnMatchValidationError{
+ field: "Action",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAction()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_OnMatchValidationError{
+ field: "Action",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofOnMatchPresent {
+ err := Matcher_OnMatchValidationError{
+ field: "OnMatch",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return Matcher_OnMatchMultiError(errors)
+ }
+
+ return nil
+}
+
+// Matcher_OnMatchMultiError is an error wrapping multiple validation errors
+// returned by Matcher_OnMatch.ValidateAll() if the designated constraints
+// aren't met.
+type Matcher_OnMatchMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Matcher_OnMatchMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Matcher_OnMatchMultiError) AllErrors() []error { return m }
+
+// Matcher_OnMatchValidationError is the validation error returned by
+// Matcher_OnMatch.Validate if the designated constraints aren't met.
+type Matcher_OnMatchValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Matcher_OnMatchValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Matcher_OnMatchValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Matcher_OnMatchValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Matcher_OnMatchValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Matcher_OnMatchValidationError) ErrorName() string { return "Matcher_OnMatchValidationError" }
+
+// Error satisfies the builtin error interface
+func (e Matcher_OnMatchValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMatcher_OnMatch.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Matcher_OnMatchValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Matcher_OnMatchValidationError{}
+
+// Validate checks the field values on Matcher_MatcherList with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Matcher_MatcherList) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Matcher_MatcherList with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Matcher_MatcherListMultiError, or nil if none found.
+func (m *Matcher_MatcherList) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Matcher_MatcherList) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetMatchers()) < 1 {
+ err := Matcher_MatcherListValidationError{
+ field: "Matchers",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetMatchers() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherListValidationError{
+ field: fmt.Sprintf("Matchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherListValidationError{
+ field: fmt.Sprintf("Matchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherListValidationError{
+ field: fmt.Sprintf("Matchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Matcher_MatcherListMultiError(errors)
+ }
+
+ return nil
+}
+
+// Matcher_MatcherListMultiError is an error wrapping multiple validation
+// errors returned by Matcher_MatcherList.ValidateAll() if the designated
+// constraints aren't met.
+type Matcher_MatcherListMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Matcher_MatcherListMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Matcher_MatcherListMultiError) AllErrors() []error { return m }
+
+// Matcher_MatcherListValidationError is the validation error returned by
+// Matcher_MatcherList.Validate if the designated constraints aren't met.
+type Matcher_MatcherListValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Matcher_MatcherListValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Matcher_MatcherListValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Matcher_MatcherListValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Matcher_MatcherListValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Matcher_MatcherListValidationError) ErrorName() string {
+ return "Matcher_MatcherListValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Matcher_MatcherListValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMatcher_MatcherList.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Matcher_MatcherListValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Matcher_MatcherListValidationError{}
+
+// Validate checks the field values on Matcher_MatcherTree with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Matcher_MatcherTree) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Matcher_MatcherTree with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Matcher_MatcherTreeMultiError, or nil if none found.
+func (m *Matcher_MatcherTree) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Matcher_MatcherTree) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetInput() == nil {
+ err := Matcher_MatcherTreeValidationError{
+ field: "Input",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetInput()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherTreeValidationError{
+ field: "Input",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherTreeValidationError{
+ field: "Input",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherTreeValidationError{
+ field: "Input",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ oneofTreeTypePresent := false
+ switch v := m.TreeType.(type) {
+ case *Matcher_MatcherTree_ExactMatchMap:
+ if v == nil {
+ err := Matcher_MatcherTreeValidationError{
+ field: "TreeType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTreeTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetExactMatchMap()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherTreeValidationError{
+ field: "ExactMatchMap",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherTreeValidationError{
+ field: "ExactMatchMap",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetExactMatchMap()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherTreeValidationError{
+ field: "ExactMatchMap",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Matcher_MatcherTree_PrefixMatchMap:
+ if v == nil {
+ err := Matcher_MatcherTreeValidationError{
+ field: "TreeType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTreeTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetPrefixMatchMap()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherTreeValidationError{
+ field: "PrefixMatchMap",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherTreeValidationError{
+ field: "PrefixMatchMap",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPrefixMatchMap()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherTreeValidationError{
+ field: "PrefixMatchMap",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Matcher_MatcherTree_CustomMatch:
+ if v == nil {
+ err := Matcher_MatcherTreeValidationError{
+ field: "TreeType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTreeTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetCustomMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherTreeValidationError{
+ field: "CustomMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherTreeValidationError{
+ field: "CustomMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherTreeValidationError{
+ field: "CustomMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofTreeTypePresent {
+ err := Matcher_MatcherTreeValidationError{
+ field: "TreeType",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return Matcher_MatcherTreeMultiError(errors)
+ }
+
+ return nil
+}
+
+// Matcher_MatcherTreeMultiError is an error wrapping multiple validation
+// errors returned by Matcher_MatcherTree.ValidateAll() if the designated
+// constraints aren't met.
+type Matcher_MatcherTreeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Matcher_MatcherTreeMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Matcher_MatcherTreeMultiError) AllErrors() []error { return m }
+
+// Matcher_MatcherTreeValidationError is the validation error returned by
+// Matcher_MatcherTree.Validate if the designated constraints aren't met.
+type Matcher_MatcherTreeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Matcher_MatcherTreeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Matcher_MatcherTreeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Matcher_MatcherTreeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Matcher_MatcherTreeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Matcher_MatcherTreeValidationError) ErrorName() string {
+ return "Matcher_MatcherTreeValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Matcher_MatcherTreeValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMatcher_MatcherTree.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Matcher_MatcherTreeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Matcher_MatcherTreeValidationError{}
+
+// Validate checks the field values on Matcher_MatcherList_Predicate with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Matcher_MatcherList_Predicate) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Matcher_MatcherList_Predicate with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// Matcher_MatcherList_PredicateMultiError, or nil if none found.
+func (m *Matcher_MatcherList_Predicate) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Matcher_MatcherList_Predicate) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofMatchTypePresent := false
+ switch v := m.MatchType.(type) {
+ case *Matcher_MatcherList_Predicate_SinglePredicate_:
+ if v == nil {
+ err := Matcher_MatcherList_PredicateValidationError{
+ field: "MatchType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetSinglePredicate()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_PredicateValidationError{
+ field: "SinglePredicate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_PredicateValidationError{
+ field: "SinglePredicate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSinglePredicate()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_PredicateValidationError{
+ field: "SinglePredicate",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Matcher_MatcherList_Predicate_OrMatcher:
+ if v == nil {
+ err := Matcher_MatcherList_PredicateValidationError{
+ field: "MatchType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetOrMatcher()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_PredicateValidationError{
+ field: "OrMatcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_PredicateValidationError{
+ field: "OrMatcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOrMatcher()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_PredicateValidationError{
+ field: "OrMatcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Matcher_MatcherList_Predicate_AndMatcher:
+ if v == nil {
+ err := Matcher_MatcherList_PredicateValidationError{
+ field: "MatchType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetAndMatcher()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_PredicateValidationError{
+ field: "AndMatcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_PredicateValidationError{
+ field: "AndMatcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAndMatcher()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_PredicateValidationError{
+ field: "AndMatcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Matcher_MatcherList_Predicate_NotMatcher:
+ if v == nil {
+ err := Matcher_MatcherList_PredicateValidationError{
+ field: "MatchType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetNotMatcher()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_PredicateValidationError{
+ field: "NotMatcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_PredicateValidationError{
+ field: "NotMatcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNotMatcher()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_PredicateValidationError{
+ field: "NotMatcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofMatchTypePresent {
+ err := Matcher_MatcherList_PredicateValidationError{
+ field: "MatchType",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return Matcher_MatcherList_PredicateMultiError(errors)
+ }
+
+ return nil
+}
+
+// Matcher_MatcherList_PredicateMultiError is an error wrapping multiple
+// validation errors returned by Matcher_MatcherList_Predicate.ValidateAll()
+// if the designated constraints aren't met.
+type Matcher_MatcherList_PredicateMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Matcher_MatcherList_PredicateMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Matcher_MatcherList_PredicateMultiError) AllErrors() []error { return m }
+
+// Matcher_MatcherList_PredicateValidationError is the validation error
+// returned by Matcher_MatcherList_Predicate.Validate if the designated
+// constraints aren't met.
+type Matcher_MatcherList_PredicateValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Matcher_MatcherList_PredicateValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Matcher_MatcherList_PredicateValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Matcher_MatcherList_PredicateValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Matcher_MatcherList_PredicateValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Matcher_MatcherList_PredicateValidationError) ErrorName() string {
+ return "Matcher_MatcherList_PredicateValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Matcher_MatcherList_PredicateValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMatcher_MatcherList_Predicate.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Matcher_MatcherList_PredicateValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Matcher_MatcherList_PredicateValidationError{}
+
+// Validate checks the field values on Matcher_MatcherList_FieldMatcher with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *Matcher_MatcherList_FieldMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Matcher_MatcherList_FieldMatcher with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// Matcher_MatcherList_FieldMatcherMultiError, or nil if none found.
+func (m *Matcher_MatcherList_FieldMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Matcher_MatcherList_FieldMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetPredicate() == nil {
+ err := Matcher_MatcherList_FieldMatcherValidationError{
+ field: "Predicate",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPredicate()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{
+ field: "Predicate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{
+ field: "Predicate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPredicate()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_FieldMatcherValidationError{
+ field: "Predicate",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetOnMatch() == nil {
+ err := Matcher_MatcherList_FieldMatcherValidationError{
+ field: "OnMatch",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOnMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_FieldMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_FieldMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return Matcher_MatcherList_FieldMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// Matcher_MatcherList_FieldMatcherMultiError is an error wrapping multiple
+// validation errors returned by
+// Matcher_MatcherList_FieldMatcher.ValidateAll() if the designated
+// constraints aren't met.
+type Matcher_MatcherList_FieldMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Matcher_MatcherList_FieldMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Matcher_MatcherList_FieldMatcherMultiError) AllErrors() []error { return m }
+
+// Matcher_MatcherList_FieldMatcherValidationError is the validation error
+// returned by Matcher_MatcherList_FieldMatcher.Validate if the designated
+// constraints aren't met.
+type Matcher_MatcherList_FieldMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Matcher_MatcherList_FieldMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Matcher_MatcherList_FieldMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Matcher_MatcherList_FieldMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Matcher_MatcherList_FieldMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Matcher_MatcherList_FieldMatcherValidationError) ErrorName() string {
+ return "Matcher_MatcherList_FieldMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Matcher_MatcherList_FieldMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMatcher_MatcherList_FieldMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Matcher_MatcherList_FieldMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Matcher_MatcherList_FieldMatcherValidationError{}
+
+// Validate checks the field values on
+// Matcher_MatcherList_Predicate_SinglePredicate with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Matcher_MatcherList_Predicate_SinglePredicate) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// Matcher_MatcherList_Predicate_SinglePredicate with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// Matcher_MatcherList_Predicate_SinglePredicateMultiError, or nil if none found.
+func (m *Matcher_MatcherList_Predicate_SinglePredicate) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Matcher_MatcherList_Predicate_SinglePredicate) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetInput() == nil {
+ err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "Input",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetInput()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "Input",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "Input",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetInput()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "Input",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ oneofMatcherPresent := false
+ switch v := m.Matcher.(type) {
+ case *Matcher_MatcherList_Predicate_SinglePredicate_ValueMatch:
+ if v == nil {
+ err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "Matcher",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatcherPresent = true
+
+ if all {
+ switch v := interface{}(m.GetValueMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "ValueMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "ValueMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValueMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "ValueMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Matcher_MatcherList_Predicate_SinglePredicate_CustomMatch:
+ if v == nil {
+ err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "Matcher",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatcherPresent = true
+
+ if all {
+ switch v := interface{}(m.GetCustomMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "CustomMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "CustomMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCustomMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "CustomMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofMatcherPresent {
+ err := Matcher_MatcherList_Predicate_SinglePredicateValidationError{
+ field: "Matcher",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return Matcher_MatcherList_Predicate_SinglePredicateMultiError(errors)
+ }
+
+ return nil
+}
+
+// Matcher_MatcherList_Predicate_SinglePredicateMultiError is an error wrapping
+// multiple validation errors returned by
+// Matcher_MatcherList_Predicate_SinglePredicate.ValidateAll() if the
+// designated constraints aren't met.
+type Matcher_MatcherList_Predicate_SinglePredicateMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Matcher_MatcherList_Predicate_SinglePredicateMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Matcher_MatcherList_Predicate_SinglePredicateMultiError) AllErrors() []error { return m }
+
+// Matcher_MatcherList_Predicate_SinglePredicateValidationError is the
+// validation error returned by
+// Matcher_MatcherList_Predicate_SinglePredicate.Validate if the designated
+// constraints aren't met.
+type Matcher_MatcherList_Predicate_SinglePredicateValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) ErrorName() string {
+ return "Matcher_MatcherList_Predicate_SinglePredicateValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Matcher_MatcherList_Predicate_SinglePredicateValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMatcher_MatcherList_Predicate_SinglePredicate.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Matcher_MatcherList_Predicate_SinglePredicateValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Matcher_MatcherList_Predicate_SinglePredicateValidationError{}
+
+// Validate checks the field values on
+// Matcher_MatcherList_Predicate_PredicateList with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Matcher_MatcherList_Predicate_PredicateList) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// Matcher_MatcherList_Predicate_PredicateList with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// Matcher_MatcherList_Predicate_PredicateListMultiError, or nil if none found.
+func (m *Matcher_MatcherList_Predicate_PredicateList) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Matcher_MatcherList_Predicate_PredicateList) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetPredicate()) < 2 {
+ err := Matcher_MatcherList_Predicate_PredicateListValidationError{
+ field: "Predicate",
+ reason: "value must contain at least 2 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetPredicate() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherList_Predicate_PredicateListValidationError{
+ field: fmt.Sprintf("Predicate[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherList_Predicate_PredicateListValidationError{
+ field: fmt.Sprintf("Predicate[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherList_Predicate_PredicateListValidationError{
+ field: fmt.Sprintf("Predicate[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Matcher_MatcherList_Predicate_PredicateListMultiError(errors)
+ }
+
+ return nil
+}
+
+// Matcher_MatcherList_Predicate_PredicateListMultiError is an error wrapping
+// multiple validation errors returned by
+// Matcher_MatcherList_Predicate_PredicateList.ValidateAll() if the designated
+// constraints aren't met.
+type Matcher_MatcherList_Predicate_PredicateListMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Matcher_MatcherList_Predicate_PredicateListMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Matcher_MatcherList_Predicate_PredicateListMultiError) AllErrors() []error { return m }
+
+// Matcher_MatcherList_Predicate_PredicateListValidationError is the validation
+// error returned by Matcher_MatcherList_Predicate_PredicateList.Validate if
+// the designated constraints aren't met.
+type Matcher_MatcherList_Predicate_PredicateListValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Matcher_MatcherList_Predicate_PredicateListValidationError) ErrorName() string {
+ return "Matcher_MatcherList_Predicate_PredicateListValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Matcher_MatcherList_Predicate_PredicateListValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMatcher_MatcherList_Predicate_PredicateList.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Matcher_MatcherList_Predicate_PredicateListValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Matcher_MatcherList_Predicate_PredicateListValidationError{}
+
+// Validate checks the field values on Matcher_MatcherTree_MatchMap with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Matcher_MatcherTree_MatchMap) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Matcher_MatcherTree_MatchMap with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Matcher_MatcherTree_MatchMapMultiError, or nil if none found.
+func (m *Matcher_MatcherTree_MatchMap) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Matcher_MatcherTree_MatchMap) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetMap()) < 1 {
+ err := Matcher_MatcherTree_MatchMapValidationError{
+ field: "Map",
+ reason: "value must contain at least 1 pair(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ {
+ sorted_keys := make([]string, len(m.GetMap()))
+ i := 0
+ for key := range m.GetMap() {
+ sorted_keys[i] = key
+ i++
+ }
+ sort.Slice(sorted_keys, func(i, j int) bool { return sorted_keys[i] < sorted_keys[j] })
+ for _, key := range sorted_keys {
+ val := m.GetMap()[key]
+ _ = val
+
+ // no validation rules for Map[key]
+
+ if all {
+ switch v := interface{}(val).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Matcher_MatcherTree_MatchMapValidationError{
+ field: fmt.Sprintf("Map[%v]", key),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Matcher_MatcherTree_MatchMapValidationError{
+ field: fmt.Sprintf("Map[%v]", key),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(val).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Matcher_MatcherTree_MatchMapValidationError{
+ field: fmt.Sprintf("Map[%v]", key),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+ }
+
+ if len(errors) > 0 {
+ return Matcher_MatcherTree_MatchMapMultiError(errors)
+ }
+
+ return nil
+}
+
+// Matcher_MatcherTree_MatchMapMultiError is an error wrapping multiple
+// validation errors returned by Matcher_MatcherTree_MatchMap.ValidateAll() if
+// the designated constraints aren't met.
+type Matcher_MatcherTree_MatchMapMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Matcher_MatcherTree_MatchMapMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Matcher_MatcherTree_MatchMapMultiError) AllErrors() []error { return m }
+
+// Matcher_MatcherTree_MatchMapValidationError is the validation error returned
+// by Matcher_MatcherTree_MatchMap.Validate if the designated constraints
+// aren't met.
+type Matcher_MatcherTree_MatchMapValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Matcher_MatcherTree_MatchMapValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Matcher_MatcherTree_MatchMapValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Matcher_MatcherTree_MatchMapValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Matcher_MatcherTree_MatchMapValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Matcher_MatcherTree_MatchMapValidationError) ErrorName() string {
+ return "Matcher_MatcherTree_MatchMapValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Matcher_MatcherTree_MatchMapValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMatcher_MatcherTree_MatchMap.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Matcher_MatcherTree_MatchMapValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Matcher_MatcherTree_MatchMapValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go
new file mode 100644
index 000000000..2861768da
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.go
@@ -0,0 +1,539 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/matcher/v3/range.proto
+
+package v3
+
+import (
+ v3 "github.com/cncf/xds/go/xds/type/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Int64RangeMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RangeMatchers []*Int64RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"`
+}
+
+func (x *Int64RangeMatcher) Reset() {
+ *x = Int64RangeMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int64RangeMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int64RangeMatcher) ProtoMessage() {}
+
+func (x *Int64RangeMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int64RangeMatcher.ProtoReflect.Descriptor instead.
+func (*Int64RangeMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Int64RangeMatcher) GetRangeMatchers() []*Int64RangeMatcher_RangeMatcher {
+ if x != nil {
+ return x.RangeMatchers
+ }
+ return nil
+}
+
+type Int32RangeMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RangeMatchers []*Int32RangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"`
+}
+
+func (x *Int32RangeMatcher) Reset() {
+ *x = Int32RangeMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int32RangeMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int32RangeMatcher) ProtoMessage() {}
+
+func (x *Int32RangeMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int32RangeMatcher.ProtoReflect.Descriptor instead.
+func (*Int32RangeMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Int32RangeMatcher) GetRangeMatchers() []*Int32RangeMatcher_RangeMatcher {
+ if x != nil {
+ return x.RangeMatchers
+ }
+ return nil
+}
+
+type DoubleRangeMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RangeMatchers []*DoubleRangeMatcher_RangeMatcher `protobuf:"bytes,1,rep,name=range_matchers,json=rangeMatchers,proto3" json:"range_matchers,omitempty"`
+}
+
+func (x *DoubleRangeMatcher) Reset() {
+ *x = DoubleRangeMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DoubleRangeMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DoubleRangeMatcher) ProtoMessage() {}
+
+func (x *DoubleRangeMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DoubleRangeMatcher.ProtoReflect.Descriptor instead.
+func (*DoubleRangeMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DoubleRangeMatcher) GetRangeMatchers() []*DoubleRangeMatcher_RangeMatcher {
+ if x != nil {
+ return x.RangeMatchers
+ }
+ return nil
+}
+
+type Int64RangeMatcher_RangeMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Ranges []*v3.Int64Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"`
+ OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
+}
+
+func (x *Int64RangeMatcher_RangeMatcher) Reset() {
+ *x = Int64RangeMatcher_RangeMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int64RangeMatcher_RangeMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int64RangeMatcher_RangeMatcher) ProtoMessage() {}
+
+func (x *Int64RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int64RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead.
+func (*Int64RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *Int64RangeMatcher_RangeMatcher) GetRanges() []*v3.Int64Range {
+ if x != nil {
+ return x.Ranges
+ }
+ return nil
+}
+
+func (x *Int64RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch {
+ if x != nil {
+ return x.OnMatch
+ }
+ return nil
+}
+
+type Int32RangeMatcher_RangeMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Ranges []*v3.Int32Range `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"`
+ OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
+}
+
+func (x *Int32RangeMatcher_RangeMatcher) Reset() {
+ *x = Int32RangeMatcher_RangeMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int32RangeMatcher_RangeMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int32RangeMatcher_RangeMatcher) ProtoMessage() {}
+
+func (x *Int32RangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int32RangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead.
+func (*Int32RangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{1, 0}
+}
+
+func (x *Int32RangeMatcher_RangeMatcher) GetRanges() []*v3.Int32Range {
+ if x != nil {
+ return x.Ranges
+ }
+ return nil
+}
+
+func (x *Int32RangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch {
+ if x != nil {
+ return x.OnMatch
+ }
+ return nil
+}
+
+type DoubleRangeMatcher_RangeMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Ranges []*v3.DoubleRange `protobuf:"bytes,1,rep,name=ranges,proto3" json:"ranges,omitempty"`
+ OnMatch *Matcher_OnMatch `protobuf:"bytes,2,opt,name=on_match,json=onMatch,proto3" json:"on_match,omitempty"`
+}
+
+func (x *DoubleRangeMatcher_RangeMatcher) Reset() {
+ *x = DoubleRangeMatcher_RangeMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DoubleRangeMatcher_RangeMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DoubleRangeMatcher_RangeMatcher) ProtoMessage() {}
+
+func (x *DoubleRangeMatcher_RangeMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_range_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DoubleRangeMatcher_RangeMatcher.ProtoReflect.Descriptor instead.
+func (*DoubleRangeMatcher_RangeMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_range_proto_rawDescGZIP(), []int{2, 0}
+}
+
+func (x *DoubleRangeMatcher_RangeMatcher) GetRanges() []*v3.DoubleRange {
+ if x != nil {
+ return x.Ranges
+ }
+ return nil
+}
+
+func (x *DoubleRangeMatcher_RangeMatcher) GetOnMatch() *Matcher_OnMatch {
+ if x != nil {
+ return x.OnMatch
+ }
+ return nil
+}
+
+var File_xds_type_matcher_v3_range_proto protoreflect.FileDescriptor
+
+var file_xds_type_matcher_v3_range_proto_rawDesc = []byte{
+ 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65,
+ 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x21, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x11,
+ 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e,
+ 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d,
+ 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01,
+ 0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39,
+ 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17,
+ 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74,
+ 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08,
+ 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64,
+ 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76,
+ 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xfc, 0x01, 0x0a, 0x11, 0x49,
+ 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x12, 0x5a, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x49,
+ 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d, 0x72,
+ 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8a, 0x01, 0x0a,
+ 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x39, 0x0a,
+ 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e,
+ 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x49, 0x6e, 0x74, 0x33,
+ 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01,
+ 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e, 0x5f, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78, 0x64, 0x73,
+ 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33,
+ 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x22, 0xff, 0x01, 0x0a, 0x12, 0x44, 0x6f,
+ 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x12, 0x5b, 0x0a, 0x0e, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44,
+ 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0d,
+ 0x72, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x1a, 0x8b, 0x01,
+ 0x0a, 0x0c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3a,
+ 0x0a, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18,
+ 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75,
+ 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02,
+ 0x08, 0x01, 0x52, 0x06, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x78,
+ 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x52, 0x07, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x5a, 0x0a, 0x1e, 0x63,
+ 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52,
+ 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73,
+ 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_matcher_v3_range_proto_rawDescOnce sync.Once
+ file_xds_type_matcher_v3_range_proto_rawDescData = file_xds_type_matcher_v3_range_proto_rawDesc
+)
+
+func file_xds_type_matcher_v3_range_proto_rawDescGZIP() []byte {
+ file_xds_type_matcher_v3_range_proto_rawDescOnce.Do(func() {
+ file_xds_type_matcher_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_range_proto_rawDescData)
+ })
+ return file_xds_type_matcher_v3_range_proto_rawDescData
+}
+
+var file_xds_type_matcher_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
+var file_xds_type_matcher_v3_range_proto_goTypes = []interface{}{
+ (*Int64RangeMatcher)(nil), // 0: xds.type.matcher.v3.Int64RangeMatcher
+ (*Int32RangeMatcher)(nil), // 1: xds.type.matcher.v3.Int32RangeMatcher
+ (*DoubleRangeMatcher)(nil), // 2: xds.type.matcher.v3.DoubleRangeMatcher
+ (*Int64RangeMatcher_RangeMatcher)(nil), // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher
+ (*Int32RangeMatcher_RangeMatcher)(nil), // 4: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher
+ (*DoubleRangeMatcher_RangeMatcher)(nil), // 5: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher
+ (*v3.Int64Range)(nil), // 6: xds.type.v3.Int64Range
+ (*Matcher_OnMatch)(nil), // 7: xds.type.matcher.v3.Matcher.OnMatch
+ (*v3.Int32Range)(nil), // 8: xds.type.v3.Int32Range
+ (*v3.DoubleRange)(nil), // 9: xds.type.v3.DoubleRange
+}
+var file_xds_type_matcher_v3_range_proto_depIdxs = []int32{
+ 3, // 0: xds.type.matcher.v3.Int64RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher
+ 4, // 1: xds.type.matcher.v3.Int32RangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher
+ 5, // 2: xds.type.matcher.v3.DoubleRangeMatcher.range_matchers:type_name -> xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher
+ 6, // 3: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int64Range
+ 7, // 4: xds.type.matcher.v3.Int64RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
+ 8, // 5: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.Int32Range
+ 7, // 6: xds.type.matcher.v3.Int32RangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
+ 9, // 7: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.ranges:type_name -> xds.type.v3.DoubleRange
+ 7, // 8: xds.type.matcher.v3.DoubleRangeMatcher.RangeMatcher.on_match:type_name -> xds.type.matcher.v3.Matcher.OnMatch
+ 9, // [9:9] is the sub-list for method output_type
+ 9, // [9:9] is the sub-list for method input_type
+ 9, // [9:9] is the sub-list for extension type_name
+ 9, // [9:9] is the sub-list for extension extendee
+ 0, // [0:9] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_matcher_v3_range_proto_init() }
+func file_xds_type_matcher_v3_range_proto_init() {
+ if File_xds_type_matcher_v3_range_proto != nil {
+ return
+ }
+ file_xds_type_matcher_v3_matcher_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_matcher_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int64RangeMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int32RangeMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DoubleRangeMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_range_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int64RangeMatcher_RangeMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_range_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int32RangeMatcher_RangeMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_range_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DoubleRangeMatcher_RangeMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_matcher_v3_range_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 6,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_matcher_v3_range_proto_goTypes,
+ DependencyIndexes: file_xds_type_matcher_v3_range_proto_depIdxs,
+ MessageInfos: file_xds_type_matcher_v3_range_proto_msgTypes,
+ }.Build()
+ File_xds_type_matcher_v3_range_proto = out.File
+ file_xds_type_matcher_v3_range_proto_rawDesc = nil
+ file_xds_type_matcher_v3_range_proto_goTypes = nil
+ file_xds_type_matcher_v3_range_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go
new file mode 100644
index 000000000..8cb598643
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/range.pb.validate.go
@@ -0,0 +1,975 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/matcher/v3/range.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Int64RangeMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *Int64RangeMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Int64RangeMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Int64RangeMatcherMultiError, or nil if none found.
+func (m *Int64RangeMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Int64RangeMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetRangeMatchers() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Int64RangeMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Int64RangeMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Int64RangeMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Int64RangeMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// Int64RangeMatcherMultiError is an error wrapping multiple validation errors
+// returned by Int64RangeMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type Int64RangeMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Int64RangeMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Int64RangeMatcherMultiError) AllErrors() []error { return m }
+
+// Int64RangeMatcherValidationError is the validation error returned by
+// Int64RangeMatcher.Validate if the designated constraints aren't met.
+type Int64RangeMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Int64RangeMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Int64RangeMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Int64RangeMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Int64RangeMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Int64RangeMatcherValidationError) ErrorName() string {
+ return "Int64RangeMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Int64RangeMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInt64RangeMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Int64RangeMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Int64RangeMatcherValidationError{}
+
+// Validate checks the field values on Int32RangeMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *Int32RangeMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Int32RangeMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Int32RangeMatcherMultiError, or nil if none found.
+func (m *Int32RangeMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Int32RangeMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetRangeMatchers() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Int32RangeMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Int32RangeMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Int32RangeMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return Int32RangeMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// Int32RangeMatcherMultiError is an error wrapping multiple validation errors
+// returned by Int32RangeMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type Int32RangeMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Int32RangeMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Int32RangeMatcherMultiError) AllErrors() []error { return m }
+
+// Int32RangeMatcherValidationError is the validation error returned by
+// Int32RangeMatcher.Validate if the designated constraints aren't met.
+type Int32RangeMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Int32RangeMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Int32RangeMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Int32RangeMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Int32RangeMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Int32RangeMatcherValidationError) ErrorName() string {
+ return "Int32RangeMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Int32RangeMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInt32RangeMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Int32RangeMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Int32RangeMatcherValidationError{}
+
+// Validate checks the field values on DoubleRangeMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *DoubleRangeMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DoubleRangeMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// DoubleRangeMatcherMultiError, or nil if none found.
+func (m *DoubleRangeMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DoubleRangeMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetRangeMatchers() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DoubleRangeMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DoubleRangeMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DoubleRangeMatcherValidationError{
+ field: fmt.Sprintf("RangeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return DoubleRangeMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// DoubleRangeMatcherMultiError is an error wrapping multiple validation errors
+// returned by DoubleRangeMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type DoubleRangeMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DoubleRangeMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DoubleRangeMatcherMultiError) AllErrors() []error { return m }
+
+// DoubleRangeMatcherValidationError is the validation error returned by
+// DoubleRangeMatcher.Validate if the designated constraints aren't met.
+type DoubleRangeMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DoubleRangeMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DoubleRangeMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DoubleRangeMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DoubleRangeMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DoubleRangeMatcherValidationError) ErrorName() string {
+ return "DoubleRangeMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DoubleRangeMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDoubleRangeMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DoubleRangeMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DoubleRangeMatcherValidationError{}
+
+// Validate checks the field values on Int64RangeMatcher_RangeMatcher with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Int64RangeMatcher_RangeMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Int64RangeMatcher_RangeMatcher with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// Int64RangeMatcher_RangeMatcherMultiError, or nil if none found.
+func (m *Int64RangeMatcher_RangeMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Int64RangeMatcher_RangeMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetRanges()) < 1 {
+ err := Int64RangeMatcher_RangeMatcherValidationError{
+ field: "Ranges",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetRanges() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Int64RangeMatcher_RangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Int64RangeMatcher_RangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Int64RangeMatcher_RangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetOnMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Int64RangeMatcher_RangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Int64RangeMatcher_RangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Int64RangeMatcher_RangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return Int64RangeMatcher_RangeMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// Int64RangeMatcher_RangeMatcherMultiError is an error wrapping multiple
+// validation errors returned by Int64RangeMatcher_RangeMatcher.ValidateAll()
+// if the designated constraints aren't met.
+type Int64RangeMatcher_RangeMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Int64RangeMatcher_RangeMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Int64RangeMatcher_RangeMatcherMultiError) AllErrors() []error { return m }
+
+// Int64RangeMatcher_RangeMatcherValidationError is the validation error
+// returned by Int64RangeMatcher_RangeMatcher.Validate if the designated
+// constraints aren't met.
+type Int64RangeMatcher_RangeMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Int64RangeMatcher_RangeMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Int64RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Int64RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Int64RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Int64RangeMatcher_RangeMatcherValidationError) ErrorName() string {
+ return "Int64RangeMatcher_RangeMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Int64RangeMatcher_RangeMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInt64RangeMatcher_RangeMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Int64RangeMatcher_RangeMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Int64RangeMatcher_RangeMatcherValidationError{}
+
+// Validate checks the field values on Int32RangeMatcher_RangeMatcher with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Int32RangeMatcher_RangeMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Int32RangeMatcher_RangeMatcher with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// Int32RangeMatcher_RangeMatcherMultiError, or nil if none found.
+func (m *Int32RangeMatcher_RangeMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Int32RangeMatcher_RangeMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetRanges()) < 1 {
+ err := Int32RangeMatcher_RangeMatcherValidationError{
+ field: "Ranges",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetRanges() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Int32RangeMatcher_RangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Int32RangeMatcher_RangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Int32RangeMatcher_RangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetOnMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, Int32RangeMatcher_RangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, Int32RangeMatcher_RangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return Int32RangeMatcher_RangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return Int32RangeMatcher_RangeMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// Int32RangeMatcher_RangeMatcherMultiError is an error wrapping multiple
+// validation errors returned by Int32RangeMatcher_RangeMatcher.ValidateAll()
+// if the designated constraints aren't met.
+type Int32RangeMatcher_RangeMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Int32RangeMatcher_RangeMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Int32RangeMatcher_RangeMatcherMultiError) AllErrors() []error { return m }
+
+// Int32RangeMatcher_RangeMatcherValidationError is the validation error
+// returned by Int32RangeMatcher_RangeMatcher.Validate if the designated
+// constraints aren't met.
+type Int32RangeMatcher_RangeMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Int32RangeMatcher_RangeMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Int32RangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Int32RangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Int32RangeMatcher_RangeMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Int32RangeMatcher_RangeMatcherValidationError) ErrorName() string {
+ return "Int32RangeMatcher_RangeMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Int32RangeMatcher_RangeMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInt32RangeMatcher_RangeMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Int32RangeMatcher_RangeMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Int32RangeMatcher_RangeMatcherValidationError{}
+
+// Validate checks the field values on DoubleRangeMatcher_RangeMatcher with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *DoubleRangeMatcher_RangeMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DoubleRangeMatcher_RangeMatcher with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// DoubleRangeMatcher_RangeMatcherMultiError, or nil if none found.
+func (m *DoubleRangeMatcher_RangeMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DoubleRangeMatcher_RangeMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetRanges()) < 1 {
+ err := DoubleRangeMatcher_RangeMatcherValidationError{
+ field: "Ranges",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetRanges() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DoubleRangeMatcher_RangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DoubleRangeMatcher_RangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DoubleRangeMatcher_RangeMatcherValidationError{
+ field: fmt.Sprintf("Ranges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetOnMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DoubleRangeMatcher_RangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DoubleRangeMatcher_RangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOnMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DoubleRangeMatcher_RangeMatcherValidationError{
+ field: "OnMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return DoubleRangeMatcher_RangeMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// DoubleRangeMatcher_RangeMatcherMultiError is an error wrapping multiple
+// validation errors returned by DoubleRangeMatcher_RangeMatcher.ValidateAll()
+// if the designated constraints aren't met.
+type DoubleRangeMatcher_RangeMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DoubleRangeMatcher_RangeMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DoubleRangeMatcher_RangeMatcherMultiError) AllErrors() []error { return m }
+
+// DoubleRangeMatcher_RangeMatcherValidationError is the validation error
+// returned by DoubleRangeMatcher_RangeMatcher.Validate if the designated
+// constraints aren't met.
+type DoubleRangeMatcher_RangeMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DoubleRangeMatcher_RangeMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DoubleRangeMatcher_RangeMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DoubleRangeMatcher_RangeMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DoubleRangeMatcher_RangeMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DoubleRangeMatcher_RangeMatcherValidationError) ErrorName() string {
+ return "DoubleRangeMatcher_RangeMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DoubleRangeMatcher_RangeMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDoubleRangeMatcher_RangeMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DoubleRangeMatcher_RangeMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DoubleRangeMatcher_RangeMatcherValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go
new file mode 100644
index 000000000..3dcf303ac
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.go
@@ -0,0 +1,242 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/matcher/v3/regex.proto
+
+package v3
+
+import (
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type RegexMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to EngineType:
+ //
+ // *RegexMatcher_GoogleRe2
+ EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"`
+ Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"`
+}
+
+func (x *RegexMatcher) Reset() {
+ *x = RegexMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegexMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegexMatcher) ProtoMessage() {}
+
+func (x *RegexMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead.
+func (*RegexMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType {
+ if m != nil {
+ return m.EngineType
+ }
+ return nil
+}
+
+func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 {
+ if x, ok := x.GetEngineType().(*RegexMatcher_GoogleRe2); ok {
+ return x.GoogleRe2
+ }
+ return nil
+}
+
+func (x *RegexMatcher) GetRegex() string {
+ if x != nil {
+ return x.Regex
+ }
+ return ""
+}
+
+type isRegexMatcher_EngineType interface {
+ isRegexMatcher_EngineType()
+}
+
+type RegexMatcher_GoogleRe2 struct {
+ GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"`
+}
+
+func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {}
+
+type RegexMatcher_GoogleRE2 struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *RegexMatcher_GoogleRE2) Reset() {
+ *x = RegexMatcher_GoogleRE2{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegexMatcher_GoogleRE2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegexMatcher_GoogleRE2) ProtoMessage() {}
+
+func (x *RegexMatcher_GoogleRE2) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_regex_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead.
+func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0, 0}
+}
+
+var File_xds_type_matcher_v3_regex_proto protoreflect.FileDescriptor
+
+var file_xds_type_matcher_v3_regex_proto_rawDesc = []byte{
+ 0x0a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
+ 0xa6, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x12, 0x56, 0x0a, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45,
+ 0x32, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x32, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65,
+ 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
+ 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x1a, 0x0b, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x52, 0x45, 0x32, 0x42, 0x12, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x5a, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x65, 0x67, 0x65,
+ 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f,
+ 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_matcher_v3_regex_proto_rawDescOnce sync.Once
+ file_xds_type_matcher_v3_regex_proto_rawDescData = file_xds_type_matcher_v3_regex_proto_rawDesc
+)
+
+func file_xds_type_matcher_v3_regex_proto_rawDescGZIP() []byte {
+ file_xds_type_matcher_v3_regex_proto_rawDescOnce.Do(func() {
+ file_xds_type_matcher_v3_regex_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_regex_proto_rawDescData)
+ })
+ return file_xds_type_matcher_v3_regex_proto_rawDescData
+}
+
+var file_xds_type_matcher_v3_regex_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_xds_type_matcher_v3_regex_proto_goTypes = []interface{}{
+ (*RegexMatcher)(nil), // 0: xds.type.matcher.v3.RegexMatcher
+ (*RegexMatcher_GoogleRE2)(nil), // 1: xds.type.matcher.v3.RegexMatcher.GoogleRE2
+}
+var file_xds_type_matcher_v3_regex_proto_depIdxs = []int32{
+ 1, // 0: xds.type.matcher.v3.RegexMatcher.google_re2:type_name -> xds.type.matcher.v3.RegexMatcher.GoogleRE2
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_matcher_v3_regex_proto_init() }
+func file_xds_type_matcher_v3_regex_proto_init() {
+ if File_xds_type_matcher_v3_regex_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_matcher_v3_regex_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegexMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_regex_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegexMatcher_GoogleRE2); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_xds_type_matcher_v3_regex_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*RegexMatcher_GoogleRe2)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_matcher_v3_regex_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_matcher_v3_regex_proto_goTypes,
+ DependencyIndexes: file_xds_type_matcher_v3_regex_proto_depIdxs,
+ MessageInfos: file_xds_type_matcher_v3_regex_proto_msgTypes,
+ }.Build()
+ File_xds_type_matcher_v3_regex_proto = out.File
+ file_xds_type_matcher_v3_regex_proto_rawDesc = nil
+ file_xds_type_matcher_v3_regex_proto_goTypes = nil
+ file_xds_type_matcher_v3_regex_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go
new file mode 100644
index 000000000..8b7682964
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/regex.pb.validate.go
@@ -0,0 +1,317 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/matcher/v3/regex.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on RegexMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *RegexMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RegexMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in RegexMatcherMultiError, or
+// nil if none found.
+func (m *RegexMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RegexMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetRegex()) < 1 {
+ err := RegexMatcherValidationError{
+ field: "Regex",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ oneofEngineTypePresent := false
+ switch v := m.EngineType.(type) {
+ case *RegexMatcher_GoogleRe2:
+ if v == nil {
+ err := RegexMatcherValidationError{
+ field: "EngineType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofEngineTypePresent = true
+
+ if m.GetGoogleRe2() == nil {
+ err := RegexMatcherValidationError{
+ field: "GoogleRe2",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetGoogleRe2()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RegexMatcherValidationError{
+ field: "GoogleRe2",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RegexMatcherValidationError{
+ field: "GoogleRe2",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RegexMatcherValidationError{
+ field: "GoogleRe2",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofEngineTypePresent {
+ err := RegexMatcherValidationError{
+ field: "EngineType",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return RegexMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// RegexMatcherMultiError is an error wrapping multiple validation errors
+// returned by RegexMatcher.ValidateAll() if the designated constraints aren't met.
+type RegexMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RegexMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RegexMatcherMultiError) AllErrors() []error { return m }
+
+// RegexMatcherValidationError is the validation error returned by
+// RegexMatcher.Validate if the designated constraints aren't met.
+type RegexMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RegexMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RegexMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RegexMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RegexMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RegexMatcherValidationError) ErrorName() string { return "RegexMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e RegexMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRegexMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RegexMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RegexMatcherValidationError{}
+
+// Validate checks the field values on RegexMatcher_GoogleRE2 with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *RegexMatcher_GoogleRE2) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RegexMatcher_GoogleRE2 with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// RegexMatcher_GoogleRE2MultiError, or nil if none found.
+func (m *RegexMatcher_GoogleRE2) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RegexMatcher_GoogleRE2) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return RegexMatcher_GoogleRE2MultiError(errors)
+ }
+
+ return nil
+}
+
+// RegexMatcher_GoogleRE2MultiError is an error wrapping multiple validation
+// errors returned by RegexMatcher_GoogleRE2.ValidateAll() if the designated
+// constraints aren't met.
+type RegexMatcher_GoogleRE2MultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RegexMatcher_GoogleRE2MultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RegexMatcher_GoogleRE2MultiError) AllErrors() []error { return m }
+
+// RegexMatcher_GoogleRE2ValidationError is the validation error returned by
+// RegexMatcher_GoogleRE2.Validate if the designated constraints aren't met.
+type RegexMatcher_GoogleRE2ValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RegexMatcher_GoogleRE2ValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RegexMatcher_GoogleRE2ValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RegexMatcher_GoogleRE2ValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RegexMatcher_GoogleRE2ValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RegexMatcher_GoogleRE2ValidationError) ErrorName() string {
+ return "RegexMatcher_GoogleRE2ValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e RegexMatcher_GoogleRE2ValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRegexMatcher_GoogleRE2.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RegexMatcher_GoogleRE2ValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RegexMatcher_GoogleRE2ValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go
new file mode 100644
index 000000000..f9067918c
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.go
@@ -0,0 +1,353 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/matcher/v3/string.proto
+
+package v3
+
+import (
+ v3 "github.com/cncf/xds/go/xds/core/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type StringMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to MatchPattern:
+ //
+ // *StringMatcher_Exact
+ // *StringMatcher_Prefix
+ // *StringMatcher_Suffix
+ // *StringMatcher_SafeRegex
+ // *StringMatcher_Contains
+ // *StringMatcher_Custom
+ MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"`
+ IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"`
+}
+
+func (x *StringMatcher) Reset() {
+ *x = StringMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_string_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StringMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringMatcher) ProtoMessage() {}
+
+func (x *StringMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_string_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead.
+func (*StringMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_string_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern {
+ if m != nil {
+ return m.MatchPattern
+ }
+ return nil
+}
+
+func (x *StringMatcher) GetExact() string {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Exact); ok {
+ return x.Exact
+ }
+ return ""
+}
+
+func (x *StringMatcher) GetPrefix() string {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Prefix); ok {
+ return x.Prefix
+ }
+ return ""
+}
+
+func (x *StringMatcher) GetSuffix() string {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Suffix); ok {
+ return x.Suffix
+ }
+ return ""
+}
+
+func (x *StringMatcher) GetSafeRegex() *RegexMatcher {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_SafeRegex); ok {
+ return x.SafeRegex
+ }
+ return nil
+}
+
+func (x *StringMatcher) GetContains() string {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Contains); ok {
+ return x.Contains
+ }
+ return ""
+}
+
+func (x *StringMatcher) GetCustom() *v3.TypedExtensionConfig {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Custom); ok {
+ return x.Custom
+ }
+ return nil
+}
+
+func (x *StringMatcher) GetIgnoreCase() bool {
+ if x != nil {
+ return x.IgnoreCase
+ }
+ return false
+}
+
+type isStringMatcher_MatchPattern interface {
+ isStringMatcher_MatchPattern()
+}
+
+type StringMatcher_Exact struct {
+ Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"`
+}
+
+type StringMatcher_Prefix struct {
+ Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"`
+}
+
+type StringMatcher_Suffix struct {
+ Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"`
+}
+
+type StringMatcher_SafeRegex struct {
+ SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"`
+}
+
+type StringMatcher_Contains struct {
+ Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"`
+}
+
+type StringMatcher_Custom struct {
+ Custom *v3.TypedExtensionConfig `protobuf:"bytes,8,opt,name=custom,proto3,oneof"`
+}
+
+func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_Custom) isStringMatcher_MatchPattern() {}
+
+type ListStringMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"`
+}
+
+func (x *ListStringMatcher) Reset() {
+ *x = ListStringMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_matcher_v3_string_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListStringMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListStringMatcher) ProtoMessage() {}
+
+func (x *ListStringMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_matcher_v3_string_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListStringMatcher.ProtoReflect.Descriptor instead.
+func (*ListStringMatcher) Descriptor() ([]byte, []int) {
+ return file_xds_type_matcher_v3_string_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListStringMatcher) GetPatterns() []*StringMatcher {
+ if x != nil {
+ return x.Patterns
+ }
+ return nil
+}
+
+var File_xds_type_matcher_v3_string_proto protoreflect.FileDescriptor
+
+var file_xds_type_matcher_v3_string_proto_rawDesc = []byte{
+ 0x0a, 0x20, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x13, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1b, 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72,
+ 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f,
+ 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6,
+ 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48,
+ 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x12, 0x21, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66,
+ 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10,
+ 0x01, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x06, 0x73,
+ 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
+ 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x4c,
+ 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48,
+ 0x00, 0x52, 0x09, 0x73, 0x61, 0x66, 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x08,
+ 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07,
+ 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61,
+ 0x69, 0x6e, 0x73, 0x12, 0x3b, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
+ 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73,
+ 0x65, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65,
+ 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x5d, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x48, 0x0a, 0x08,
+ 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22,
+ 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x08, 0x70, 0x61,
+ 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x42, 0x5b, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f,
+ 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_matcher_v3_string_proto_rawDescOnce sync.Once
+ file_xds_type_matcher_v3_string_proto_rawDescData = file_xds_type_matcher_v3_string_proto_rawDesc
+)
+
+func file_xds_type_matcher_v3_string_proto_rawDescGZIP() []byte {
+ file_xds_type_matcher_v3_string_proto_rawDescOnce.Do(func() {
+ file_xds_type_matcher_v3_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_matcher_v3_string_proto_rawDescData)
+ })
+ return file_xds_type_matcher_v3_string_proto_rawDescData
+}
+
+var file_xds_type_matcher_v3_string_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_xds_type_matcher_v3_string_proto_goTypes = []interface{}{
+ (*StringMatcher)(nil), // 0: xds.type.matcher.v3.StringMatcher
+ (*ListStringMatcher)(nil), // 1: xds.type.matcher.v3.ListStringMatcher
+ (*RegexMatcher)(nil), // 2: xds.type.matcher.v3.RegexMatcher
+ (*v3.TypedExtensionConfig)(nil), // 3: xds.core.v3.TypedExtensionConfig
+}
+var file_xds_type_matcher_v3_string_proto_depIdxs = []int32{
+ 2, // 0: xds.type.matcher.v3.StringMatcher.safe_regex:type_name -> xds.type.matcher.v3.RegexMatcher
+ 3, // 1: xds.type.matcher.v3.StringMatcher.custom:type_name -> xds.core.v3.TypedExtensionConfig
+ 0, // 2: xds.type.matcher.v3.ListStringMatcher.patterns:type_name -> xds.type.matcher.v3.StringMatcher
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_matcher_v3_string_proto_init() }
+func file_xds_type_matcher_v3_string_proto_init() {
+ if File_xds_type_matcher_v3_string_proto != nil {
+ return
+ }
+ file_xds_type_matcher_v3_regex_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_matcher_v3_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StringMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_matcher_v3_string_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListStringMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_xds_type_matcher_v3_string_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*StringMatcher_Exact)(nil),
+ (*StringMatcher_Prefix)(nil),
+ (*StringMatcher_Suffix)(nil),
+ (*StringMatcher_SafeRegex)(nil),
+ (*StringMatcher_Contains)(nil),
+ (*StringMatcher_Custom)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_matcher_v3_string_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_matcher_v3_string_proto_goTypes,
+ DependencyIndexes: file_xds_type_matcher_v3_string_proto_depIdxs,
+ MessageInfos: file_xds_type_matcher_v3_string_proto_msgTypes,
+ }.Build()
+ File_xds_type_matcher_v3_string_proto = out.File
+ file_xds_type_matcher_v3_string_proto_rawDesc = nil
+ file_xds_type_matcher_v3_string_proto_goTypes = nil
+ file_xds_type_matcher_v3_string_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go
new file mode 100644
index 000000000..339d3b631
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/matcher/v3/string.pb.validate.go
@@ -0,0 +1,481 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/matcher/v3/string.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on StringMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *StringMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StringMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in StringMatcherMultiError, or
+// nil if none found.
+func (m *StringMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StringMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for IgnoreCase
+
+ oneofMatchPatternPresent := false
+ switch v := m.MatchPattern.(type) {
+ case *StringMatcher_Exact:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+ // no validation rules for Exact
+ case *StringMatcher_Prefix:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if utf8.RuneCountInString(m.GetPrefix()) < 1 {
+ err := StringMatcherValidationError{
+ field: "Prefix",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ case *StringMatcher_Suffix:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if utf8.RuneCountInString(m.GetSuffix()) < 1 {
+ err := StringMatcherValidationError{
+ field: "Suffix",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ case *StringMatcher_SafeRegex:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if m.GetSafeRegex() == nil {
+ err := StringMatcherValidationError{
+ field: "SafeRegex",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSafeRegex()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StringMatcherValidationError{
+ field: "SafeRegex",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StringMatcherValidationError{
+ field: "SafeRegex",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StringMatcherValidationError{
+ field: "SafeRegex",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *StringMatcher_Contains:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if utf8.RuneCountInString(m.GetContains()) < 1 {
+ err := StringMatcherValidationError{
+ field: "Contains",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ case *StringMatcher_Custom:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if all {
+ switch v := interface{}(m.GetCustom()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StringMatcherValidationError{
+ field: "Custom",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StringMatcherValidationError{
+ field: "Custom",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StringMatcherValidationError{
+ field: "Custom",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofMatchPatternPresent {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return StringMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// StringMatcherMultiError is an error wrapping multiple validation errors
+// returned by StringMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type StringMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StringMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StringMatcherMultiError) AllErrors() []error { return m }
+
+// StringMatcherValidationError is the validation error returned by
+// StringMatcher.Validate if the designated constraints aren't met.
+type StringMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StringMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StringMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StringMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StringMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StringMatcherValidationError) ErrorName() string { return "StringMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StringMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStringMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StringMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StringMatcherValidationError{}
+
+// Validate checks the field values on ListStringMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *ListStringMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ListStringMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ListStringMatcherMultiError, or nil if none found.
+func (m *ListStringMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ListStringMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetPatterns()) < 1 {
+ err := ListStringMatcherValidationError{
+ field: "Patterns",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetPatterns() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ListStringMatcherValidationError{
+ field: fmt.Sprintf("Patterns[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ListStringMatcherValidationError{
+ field: fmt.Sprintf("Patterns[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ListStringMatcherValidationError{
+ field: fmt.Sprintf("Patterns[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ListStringMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// ListStringMatcherMultiError is an error wrapping multiple validation errors
+// returned by ListStringMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type ListStringMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ListStringMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ListStringMatcherMultiError) AllErrors() []error { return m }
+
+// ListStringMatcherValidationError is the validation error returned by
+// ListStringMatcher.Validate if the designated constraints aren't met.
+type ListStringMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ListStringMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ListStringMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ListStringMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ListStringMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ListStringMatcherValidationError) ErrorName() string {
+ return "ListStringMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ListStringMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sListStringMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ListStringMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ListStringMatcherValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go
new file mode 100644
index 000000000..c7d42d4a9
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.go
@@ -0,0 +1,330 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/v3/cel.proto
+
+package v3
+
+import (
+ expr "cel.dev/expr"
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ v1alpha1 "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CelExpression struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to ExprSpecifier:
+ //
+ // *CelExpression_ParsedExpr
+ // *CelExpression_CheckedExpr
+ ExprSpecifier isCelExpression_ExprSpecifier `protobuf_oneof:"expr_specifier"`
+ CelExprParsed *expr.ParsedExpr `protobuf:"bytes,3,opt,name=cel_expr_parsed,json=celExprParsed,proto3" json:"cel_expr_parsed,omitempty"`
+ CelExprChecked *expr.CheckedExpr `protobuf:"bytes,4,opt,name=cel_expr_checked,json=celExprChecked,proto3" json:"cel_expr_checked,omitempty"`
+}
+
+func (x *CelExpression) Reset() {
+ *x = CelExpression{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_v3_cel_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CelExpression) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CelExpression) ProtoMessage() {}
+
+func (x *CelExpression) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_v3_cel_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CelExpression.ProtoReflect.Descriptor instead.
+func (*CelExpression) Descriptor() ([]byte, []int) {
+ return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *CelExpression) GetExprSpecifier() isCelExpression_ExprSpecifier {
+ if m != nil {
+ return m.ExprSpecifier
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
+func (x *CelExpression) GetParsedExpr() *v1alpha1.ParsedExpr {
+ if x, ok := x.GetExprSpecifier().(*CelExpression_ParsedExpr); ok {
+ return x.ParsedExpr
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
+func (x *CelExpression) GetCheckedExpr() *v1alpha1.CheckedExpr {
+ if x, ok := x.GetExprSpecifier().(*CelExpression_CheckedExpr); ok {
+ return x.CheckedExpr
+ }
+ return nil
+}
+
+func (x *CelExpression) GetCelExprParsed() *expr.ParsedExpr {
+ if x != nil {
+ return x.CelExprParsed
+ }
+ return nil
+}
+
+func (x *CelExpression) GetCelExprChecked() *expr.CheckedExpr {
+ if x != nil {
+ return x.CelExprChecked
+ }
+ return nil
+}
+
+type isCelExpression_ExprSpecifier interface {
+ isCelExpression_ExprSpecifier()
+}
+
+type CelExpression_ParsedExpr struct {
+ // Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
+ ParsedExpr *v1alpha1.ParsedExpr `protobuf:"bytes,1,opt,name=parsed_expr,json=parsedExpr,proto3,oneof"`
+}
+
+type CelExpression_CheckedExpr struct {
+ // Deprecated: Marked as deprecated in xds/type/v3/cel.proto.
+ CheckedExpr *v1alpha1.CheckedExpr `protobuf:"bytes,2,opt,name=checked_expr,json=checkedExpr,proto3,oneof"`
+}
+
+func (*CelExpression_ParsedExpr) isCelExpression_ExprSpecifier() {}
+
+func (*CelExpression_CheckedExpr) isCelExpression_ExprSpecifier() {}
+
+type CelExtractString struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ExprExtract *CelExpression `protobuf:"bytes,1,opt,name=expr_extract,json=exprExtract,proto3" json:"expr_extract,omitempty"`
+ DefaultValue *wrapperspb.StringValue `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+}
+
+func (x *CelExtractString) Reset() {
+ *x = CelExtractString{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_v3_cel_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CelExtractString) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CelExtractString) ProtoMessage() {}
+
+func (x *CelExtractString) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_v3_cel_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CelExtractString.ProtoReflect.Descriptor instead.
+func (*CelExtractString) Descriptor() ([]byte, []int) {
+ return file_xds_type_v3_cel_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CelExtractString) GetExprExtract() *CelExpression {
+ if x != nil {
+ return x.ExprExtract
+ }
+ return nil
+}
+
+func (x *CelExtractString) GetDefaultValue() *wrapperspb.StringValue {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return nil
+}
+
+var File_xds_type_v3_cel_proto protoreflect.FileDescriptor
+
+var file_xds_type_v3_cel_proto_rawDesc = []byte{
+ 0x0a, 0x15, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65,
+ 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x26, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
+ 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63,
+ 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x63, 0x65, 0x6c, 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x63, 0x68,
+ 0x65, 0x63, 0x6b, 0x65, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x63, 0x65, 0x6c,
+ 0x2f, 0x65, 0x78, 0x70, 0x72, 0x2f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x1f, 0x78, 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x02, 0x0a,
+ 0x0d, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x4b,
+ 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69,
+ 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50,
+ 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52,
+ 0x0a, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x4e, 0x0a, 0x0c, 0x63,
+ 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x65,
+ 0x78, 0x70, 0x72, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65,
+ 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x42, 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x0b,
+ 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x12, 0x3c, 0x0a, 0x0f, 0x63,
+ 0x65, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e,
+ 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0d, 0x63, 0x65, 0x6c, 0x45,
+ 0x78, 0x70, 0x72, 0x50, 0x61, 0x72, 0x73, 0x65, 0x64, 0x12, 0x3f, 0x0a, 0x10, 0x63, 0x65, 0x6c,
+ 0x5f, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x65, 0x6c, 0x2e, 0x65, 0x78, 0x70, 0x72, 0x2e, 0x43,
+ 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x45, 0x78, 0x70, 0x72, 0x52, 0x0e, 0x63, 0x65, 0x6c, 0x45,
+ 0x78, 0x70, 0x72, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x65, 0x64, 0x42, 0x10, 0x0a, 0x0e, 0x65, 0x78,
+ 0x70, 0x72, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x9e, 0x01, 0x0a,
+ 0x10, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x12, 0x47, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x72, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x6c, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73,
+ 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x65,
+ 0x78, 0x70, 0x72, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x41, 0x0a, 0x0d, 0x64, 0x65,
+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
+ 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0xd2,
+ 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42,
+ 0x08, 0x43, 0x65, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73,
+ 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62,
+ 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_v3_cel_proto_rawDescOnce sync.Once
+ file_xds_type_v3_cel_proto_rawDescData = file_xds_type_v3_cel_proto_rawDesc
+)
+
+func file_xds_type_v3_cel_proto_rawDescGZIP() []byte {
+ file_xds_type_v3_cel_proto_rawDescOnce.Do(func() {
+ file_xds_type_v3_cel_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_cel_proto_rawDescData)
+ })
+ return file_xds_type_v3_cel_proto_rawDescData
+}
+
+var file_xds_type_v3_cel_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_xds_type_v3_cel_proto_goTypes = []interface{}{
+ (*CelExpression)(nil), // 0: xds.type.v3.CelExpression
+ (*CelExtractString)(nil), // 1: xds.type.v3.CelExtractString
+ (*v1alpha1.ParsedExpr)(nil), // 2: google.api.expr.v1alpha1.ParsedExpr
+ (*v1alpha1.CheckedExpr)(nil), // 3: google.api.expr.v1alpha1.CheckedExpr
+ (*expr.ParsedExpr)(nil), // 4: cel.expr.ParsedExpr
+ (*expr.CheckedExpr)(nil), // 5: cel.expr.CheckedExpr
+ (*wrapperspb.StringValue)(nil), // 6: google.protobuf.StringValue
+}
+var file_xds_type_v3_cel_proto_depIdxs = []int32{
+ 2, // 0: xds.type.v3.CelExpression.parsed_expr:type_name -> google.api.expr.v1alpha1.ParsedExpr
+ 3, // 1: xds.type.v3.CelExpression.checked_expr:type_name -> google.api.expr.v1alpha1.CheckedExpr
+ 4, // 2: xds.type.v3.CelExpression.cel_expr_parsed:type_name -> cel.expr.ParsedExpr
+ 5, // 3: xds.type.v3.CelExpression.cel_expr_checked:type_name -> cel.expr.CheckedExpr
+ 0, // 4: xds.type.v3.CelExtractString.expr_extract:type_name -> xds.type.v3.CelExpression
+ 6, // 5: xds.type.v3.CelExtractString.default_value:type_name -> google.protobuf.StringValue
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_v3_cel_proto_init() }
+func file_xds_type_v3_cel_proto_init() {
+ if File_xds_type_v3_cel_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_v3_cel_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CelExpression); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_v3_cel_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CelExtractString); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_xds_type_v3_cel_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*CelExpression_ParsedExpr)(nil),
+ (*CelExpression_CheckedExpr)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_v3_cel_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_v3_cel_proto_goTypes,
+ DependencyIndexes: file_xds_type_v3_cel_proto_depIdxs,
+ MessageInfos: file_xds_type_v3_cel_proto_msgTypes,
+ }.Build()
+ File_xds_type_v3_cel_proto = out.File
+ file_xds_type_v3_cel_proto_rawDesc = nil
+ file_xds_type_v3_cel_proto_goTypes = nil
+ file_xds_type_v3_cel_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go
new file mode 100644
index 000000000..0855edee9
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/v3/cel.pb.validate.go
@@ -0,0 +1,450 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/v3/cel.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on CelExpression with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *CelExpression) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CelExpression with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in CelExpressionMultiError, or
+// nil if none found.
+func (m *CelExpression) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CelExpression) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetCelExprParsed()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CelExpressionValidationError{
+ field: "CelExprParsed",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CelExpressionValidationError{
+ field: "CelExprParsed",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCelExprParsed()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CelExpressionValidationError{
+ field: "CelExprParsed",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCelExprChecked()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CelExpressionValidationError{
+ field: "CelExprChecked",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CelExpressionValidationError{
+ field: "CelExprChecked",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCelExprChecked()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CelExpressionValidationError{
+ field: "CelExprChecked",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ switch v := m.ExprSpecifier.(type) {
+ case *CelExpression_ParsedExpr:
+ if v == nil {
+ err := CelExpressionValidationError{
+ field: "ExprSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetParsedExpr()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CelExpressionValidationError{
+ field: "ParsedExpr",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CelExpressionValidationError{
+ field: "ParsedExpr",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetParsedExpr()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CelExpressionValidationError{
+ field: "ParsedExpr",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CelExpression_CheckedExpr:
+ if v == nil {
+ err := CelExpressionValidationError{
+ field: "ExprSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCheckedExpr()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CelExpressionValidationError{
+ field: "CheckedExpr",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CelExpressionValidationError{
+ field: "CheckedExpr",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCheckedExpr()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CelExpressionValidationError{
+ field: "CheckedExpr",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return CelExpressionMultiError(errors)
+ }
+
+ return nil
+}
+
+// CelExpressionMultiError is an error wrapping multiple validation errors
+// returned by CelExpression.ValidateAll() if the designated constraints
+// aren't met.
+type CelExpressionMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CelExpressionMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CelExpressionMultiError) AllErrors() []error { return m }
+
+// CelExpressionValidationError is the validation error returned by
+// CelExpression.Validate if the designated constraints aren't met.
+type CelExpressionValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CelExpressionValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CelExpressionValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CelExpressionValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CelExpressionValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CelExpressionValidationError) ErrorName() string { return "CelExpressionValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CelExpressionValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCelExpression.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CelExpressionValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CelExpressionValidationError{}
+
+// Validate checks the field values on CelExtractString with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *CelExtractString) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CelExtractString with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CelExtractStringMultiError, or nil if none found.
+func (m *CelExtractString) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CelExtractString) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetExprExtract() == nil {
+ err := CelExtractStringValidationError{
+ field: "ExprExtract",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetExprExtract()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CelExtractStringValidationError{
+ field: "ExprExtract",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CelExtractStringValidationError{
+ field: "ExprExtract",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetExprExtract()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CelExtractStringValidationError{
+ field: "ExprExtract",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetDefaultValue()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CelExtractStringValidationError{
+ field: "DefaultValue",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CelExtractStringValidationError{
+ field: "DefaultValue",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDefaultValue()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CelExtractStringValidationError{
+ field: "DefaultValue",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return CelExtractStringMultiError(errors)
+ }
+
+ return nil
+}
+
+// CelExtractStringMultiError is an error wrapping multiple validation errors
+// returned by CelExtractString.ValidateAll() if the designated constraints
+// aren't met.
+type CelExtractStringMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CelExtractStringMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CelExtractStringMultiError) AllErrors() []error { return m }
+
+// CelExtractStringValidationError is the validation error returned by
+// CelExtractString.Validate if the designated constraints aren't met.
+type CelExtractStringValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CelExtractStringValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CelExtractStringValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CelExtractStringValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CelExtractStringValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CelExtractStringValidationError) ErrorName() string { return "CelExtractStringValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CelExtractStringValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCelExtractString.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CelExtractStringValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CelExtractStringValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go
new file mode 100644
index 000000000..ca9d3e1b7
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.go
@@ -0,0 +1,298 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/v3/range.proto
+
+package v3
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Int64Range struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
+ End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
+}
+
+func (x *Int64Range) Reset() {
+ *x = Int64Range{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_v3_range_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int64Range) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int64Range) ProtoMessage() {}
+
+func (x *Int64Range) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_v3_range_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int64Range.ProtoReflect.Descriptor instead.
+func (*Int64Range) Descriptor() ([]byte, []int) {
+ return file_xds_type_v3_range_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Int64Range) GetStart() int64 {
+ if x != nil {
+ return x.Start
+ }
+ return 0
+}
+
+func (x *Int64Range) GetEnd() int64 {
+ if x != nil {
+ return x.End
+ }
+ return 0
+}
+
+type Int32Range struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
+ End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
+}
+
+func (x *Int32Range) Reset() {
+ *x = Int32Range{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_v3_range_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int32Range) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int32Range) ProtoMessage() {}
+
+func (x *Int32Range) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_v3_range_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int32Range.ProtoReflect.Descriptor instead.
+func (*Int32Range) Descriptor() ([]byte, []int) {
+ return file_xds_type_v3_range_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Int32Range) GetStart() int32 {
+ if x != nil {
+ return x.Start
+ }
+ return 0
+}
+
+func (x *Int32Range) GetEnd() int32 {
+ if x != nil {
+ return x.End
+ }
+ return 0
+}
+
+type DoubleRange struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"`
+ End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"`
+}
+
+func (x *DoubleRange) Reset() {
+ *x = DoubleRange{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_v3_range_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DoubleRange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DoubleRange) ProtoMessage() {}
+
+func (x *DoubleRange) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_v3_range_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead.
+func (*DoubleRange) Descriptor() ([]byte, []int) {
+ return file_xds_type_v3_range_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DoubleRange) GetStart() float64 {
+ if x != nil {
+ return x.Start
+ }
+ return 0
+}
+
+func (x *DoubleRange) GetEnd() float64 {
+ if x != nil {
+ return x.End
+ }
+ return 0
+}
+
+var File_xds_type_v3_range_proto protoreflect.FileDescriptor
+
+var file_xds_type_v3_range_proto_rawDesc = []byte{
+ 0x0a, 0x17, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61,
+ 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x22, 0x34, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52,
+ 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x34, 0x0a, 0x0a,
+ 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74,
+ 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74,
+ 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65,
+ 0x6e, 0x64, 0x22, 0x35, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67,
+ 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01,
+ 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x42, 0x4a, 0x0a, 0x16, 0x63, 0x6f, 0x6d,
+ 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
+ 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6e,
+ 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79,
+ 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_v3_range_proto_rawDescOnce sync.Once
+ file_xds_type_v3_range_proto_rawDescData = file_xds_type_v3_range_proto_rawDesc
+)
+
+func file_xds_type_v3_range_proto_rawDescGZIP() []byte {
+ file_xds_type_v3_range_proto_rawDescOnce.Do(func() {
+ file_xds_type_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_range_proto_rawDescData)
+ })
+ return file_xds_type_v3_range_proto_rawDescData
+}
+
+var file_xds_type_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_xds_type_v3_range_proto_goTypes = []interface{}{
+ (*Int64Range)(nil), // 0: xds.type.v3.Int64Range
+ (*Int32Range)(nil), // 1: xds.type.v3.Int32Range
+ (*DoubleRange)(nil), // 2: xds.type.v3.DoubleRange
+}
+var file_xds_type_v3_range_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_v3_range_proto_init() }
+func file_xds_type_v3_range_proto_init() {
+ if File_xds_type_v3_range_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int64Range); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int32Range); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_xds_type_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DoubleRange); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_v3_range_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_v3_range_proto_goTypes,
+ DependencyIndexes: file_xds_type_v3_range_proto_depIdxs,
+ MessageInfos: file_xds_type_v3_range_proto_msgTypes,
+ }.Build()
+ File_xds_type_v3_range_proto = out.File
+ file_xds_type_v3_range_proto_rawDesc = nil
+ file_xds_type_v3_range_proto_goTypes = nil
+ file_xds_type_v3_range_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go
new file mode 100644
index 000000000..ccaf418e5
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/v3/range.pb.validate.go
@@ -0,0 +1,345 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/v3/range.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Int64Range with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Int64Range) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Int64Range with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in Int64RangeMultiError, or
+// nil if none found.
+func (m *Int64Range) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Int64Range) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Start
+
+ // no validation rules for End
+
+ if len(errors) > 0 {
+ return Int64RangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// Int64RangeMultiError is an error wrapping multiple validation errors
+// returned by Int64Range.ValidateAll() if the designated constraints aren't met.
+type Int64RangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Int64RangeMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Int64RangeMultiError) AllErrors() []error { return m }
+
+// Int64RangeValidationError is the validation error returned by
+// Int64Range.Validate if the designated constraints aren't met.
+type Int64RangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Int64RangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Int64RangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Int64RangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Int64RangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Int64RangeValidationError) ErrorName() string { return "Int64RangeValidationError" }
+
+// Error satisfies the builtin error interface
+func (e Int64RangeValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInt64Range.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Int64RangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Int64RangeValidationError{}
+
+// Validate checks the field values on Int32Range with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Int32Range) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Int32Range with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in Int32RangeMultiError, or
+// nil if none found.
+func (m *Int32Range) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Int32Range) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Start
+
+ // no validation rules for End
+
+ if len(errors) > 0 {
+ return Int32RangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// Int32RangeMultiError is an error wrapping multiple validation errors
+// returned by Int32Range.ValidateAll() if the designated constraints aren't met.
+type Int32RangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Int32RangeMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Int32RangeMultiError) AllErrors() []error { return m }
+
+// Int32RangeValidationError is the validation error returned by
+// Int32Range.Validate if the designated constraints aren't met.
+type Int32RangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Int32RangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Int32RangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Int32RangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Int32RangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Int32RangeValidationError) ErrorName() string { return "Int32RangeValidationError" }
+
+// Error satisfies the builtin error interface
+func (e Int32RangeValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInt32Range.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Int32RangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Int32RangeValidationError{}
+
+// Validate checks the field values on DoubleRange with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *DoubleRange) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DoubleRange with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in DoubleRangeMultiError, or
+// nil if none found.
+func (m *DoubleRange) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DoubleRange) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Start
+
+ // no validation rules for End
+
+ if len(errors) > 0 {
+ return DoubleRangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// DoubleRangeMultiError is an error wrapping multiple validation errors
+// returned by DoubleRange.ValidateAll() if the designated constraints aren't met.
+type DoubleRangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DoubleRangeMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DoubleRangeMultiError) AllErrors() []error { return m }
+
+// DoubleRangeValidationError is the validation error returned by
+// DoubleRange.Validate if the designated constraints aren't met.
+type DoubleRangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DoubleRangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DoubleRangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DoubleRangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DoubleRangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DoubleRangeValidationError) ErrorName() string { return "DoubleRangeValidationError" }
+
+// Error satisfies the builtin error interface
+func (e DoubleRangeValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDoubleRange.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DoubleRangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DoubleRangeValidationError{}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go
new file mode 100644
index 000000000..72ec85ed6
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.go
@@ -0,0 +1,163 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.33.0
+// protoc v5.27.0--rc2
+// source: xds/type/v3/typed_struct.proto
+
+package v3
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ structpb "google.golang.org/protobuf/types/known/structpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type TypedStruct struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
+ Value *structpb.Struct `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *TypedStruct) Reset() {
+ *x = TypedStruct{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TypedStruct) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TypedStruct) ProtoMessage() {}
+
+func (x *TypedStruct) ProtoReflect() protoreflect.Message {
+ mi := &file_xds_type_v3_typed_struct_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TypedStruct.ProtoReflect.Descriptor instead.
+func (*TypedStruct) Descriptor() ([]byte, []int) {
+ return file_xds_type_v3_typed_struct_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TypedStruct) GetTypeUrl() string {
+ if x != nil {
+ return x.TypeUrl
+ }
+ return ""
+}
+
+func (x *TypedStruct) GetValue() *structpb.Struct {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+var File_xds_type_v3_typed_struct_proto protoreflect.FileDescriptor
+
+var file_xds_type_v3_typed_struct_proto_rawDesc = []byte{
+ 0x0a, 0x1e, 0x78, 0x64, 0x73, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x79,
+ 0x70, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x0b, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1c, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73,
+ 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x57, 0x0a, 0x0b, 0x54,
+ 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79,
+ 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79,
+ 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x42, 0x50, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x78, 0x64, 0x73, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10,
+ 0x54, 0x79, 0x70, 0x65, 0x64, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x50, 0x01, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
+ 0x6e, 0x63, 0x66, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x67, 0x6f, 0x2f, 0x78, 0x64, 0x73, 0x2f, 0x74,
+ 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_xds_type_v3_typed_struct_proto_rawDescOnce sync.Once
+ file_xds_type_v3_typed_struct_proto_rawDescData = file_xds_type_v3_typed_struct_proto_rawDesc
+)
+
+func file_xds_type_v3_typed_struct_proto_rawDescGZIP() []byte {
+ file_xds_type_v3_typed_struct_proto_rawDescOnce.Do(func() {
+ file_xds_type_v3_typed_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_xds_type_v3_typed_struct_proto_rawDescData)
+ })
+ return file_xds_type_v3_typed_struct_proto_rawDescData
+}
+
+var file_xds_type_v3_typed_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_xds_type_v3_typed_struct_proto_goTypes = []interface{}{
+ (*TypedStruct)(nil), // 0: xds.type.v3.TypedStruct
+ (*structpb.Struct)(nil), // 1: google.protobuf.Struct
+}
+var file_xds_type_v3_typed_struct_proto_depIdxs = []int32{
+ 1, // 0: xds.type.v3.TypedStruct.value:type_name -> google.protobuf.Struct
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_xds_type_v3_typed_struct_proto_init() }
+func file_xds_type_v3_typed_struct_proto_init() {
+ if File_xds_type_v3_typed_struct_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_xds_type_v3_typed_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TypedStruct); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_xds_type_v3_typed_struct_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_xds_type_v3_typed_struct_proto_goTypes,
+ DependencyIndexes: file_xds_type_v3_typed_struct_proto_depIdxs,
+ MessageInfos: file_xds_type_v3_typed_struct_proto_msgTypes,
+ }.Build()
+ File_xds_type_v3_typed_struct_proto = out.File
+ file_xds_type_v3_typed_struct_proto_rawDesc = nil
+ file_xds_type_v3_typed_struct_proto_goTypes = nil
+ file_xds_type_v3_typed_struct_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go
new file mode 100644
index 000000000..f39bce906
--- /dev/null
+++ b/vendor/github.com/cncf/xds/go/xds/type/v3/typed_struct.pb.validate.go
@@ -0,0 +1,166 @@
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: xds/type/v3/typed_struct.proto
+
+package v3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on TypedStruct with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *TypedStruct) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TypedStruct with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in TypedStructMultiError, or
+// nil if none found.
+func (m *TypedStruct) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TypedStruct) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for TypeUrl
+
+ if all {
+ switch v := interface{}(m.GetValue()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TypedStructValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TypedStructValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TypedStructValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return TypedStructMultiError(errors)
+ }
+
+ return nil
+}
+
+// TypedStructMultiError is an error wrapping multiple validation errors
+// returned by TypedStruct.ValidateAll() if the designated constraints aren't met.
+type TypedStructMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TypedStructMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TypedStructMultiError) AllErrors() []error { return m }
+
+// TypedStructValidationError is the validation error returned by
+// TypedStruct.Validate if the designated constraints aren't met.
+type TypedStructValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TypedStructValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TypedStructValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TypedStructValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TypedStructValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TypedStructValidationError) ErrorName() string { return "TypedStructValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TypedStructValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTypedStruct.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TypedStructValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TypedStructValidationError{}
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md b/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
new file mode 100644
index 000000000..1cade6cef
--- /dev/null
+++ b/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Brian Goff
+
+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/cpuguy83/go-md2man/v2/md2man/debug.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/debug.go
new file mode 100644
index 000000000..0ec4b12c7
--- /dev/null
+++ b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/debug.go
@@ -0,0 +1,62 @@
+package md2man
+
+import (
+ "fmt"
+ "io"
+ "os"
+ "strings"
+
+ "github.com/russross/blackfriday/v2"
+)
+
+func fmtListFlags(flags blackfriday.ListType) string {
+ knownFlags := []struct {
+ name string
+ flag blackfriday.ListType
+ }{
+ {"ListTypeOrdered", blackfriday.ListTypeOrdered},
+ {"ListTypeDefinition", blackfriday.ListTypeDefinition},
+ {"ListTypeTerm", blackfriday.ListTypeTerm},
+ {"ListItemContainsBlock", blackfriday.ListItemContainsBlock},
+ {"ListItemBeginningOfList", blackfriday.ListItemBeginningOfList},
+ {"ListItemEndOfList", blackfriday.ListItemEndOfList},
+ }
+
+ var f []string
+ for _, kf := range knownFlags {
+ if flags&kf.flag != 0 {
+ f = append(f, kf.name)
+ flags &^= kf.flag
+ }
+ }
+ if flags != 0 {
+ f = append(f, fmt.Sprintf("Unknown(%#x)", flags))
+ }
+ return strings.Join(f, "|")
+}
+
+type debugDecorator struct {
+ blackfriday.Renderer
+}
+
+func depth(node *blackfriday.Node) int {
+ d := 0
+ for n := node.Parent; n != nil; n = n.Parent {
+ d++
+ }
+ return d
+}
+
+func (d *debugDecorator) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
+ fmt.Fprintf(os.Stderr, "%s%s %v %v\n",
+ strings.Repeat(" ", depth(node)),
+ map[bool]string{true: "+", false: "-"}[entering],
+ node,
+ fmtListFlags(node.ListFlags))
+ var b strings.Builder
+ status := d.Renderer.RenderNode(io.MultiWriter(&b, w), node, entering)
+ if b.Len() > 0 {
+ fmt.Fprintf(os.Stderr, ">> %q\n", b.String())
+ }
+ return status
+}
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
new file mode 100644
index 000000000..62d91b77d
--- /dev/null
+++ b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
@@ -0,0 +1,23 @@
+package md2man
+
+import (
+ "os"
+ "strconv"
+
+ "github.com/russross/blackfriday/v2"
+)
+
+// Render converts a markdown document into a roff formatted document.
+func Render(doc []byte) []byte {
+ renderer := NewRoffRenderer()
+ var r blackfriday.Renderer = renderer
+ if v, _ := strconv.ParseBool(os.Getenv("MD2MAN_DEBUG")); v {
+ r = &debugDecorator{Renderer: r}
+ }
+
+ return blackfriday.Run(doc,
+ []blackfriday.Option{
+ blackfriday.WithRenderer(r),
+ blackfriday.WithExtensions(renderer.GetExtensions()),
+ }...)
+}
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
new file mode 100644
index 000000000..96a80c99b
--- /dev/null
+++ b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
@@ -0,0 +1,417 @@
+package md2man
+
+import (
+ "bufio"
+ "bytes"
+ "fmt"
+ "io"
+ "os"
+ "strings"
+
+ "github.com/russross/blackfriday/v2"
+)
+
+// roffRenderer implements the blackfriday.Renderer interface for creating
+// roff format (manpages) from markdown text
+type roffRenderer struct {
+ listCounters []int
+ firstHeader bool
+ listDepth int
+}
+
+const (
+ titleHeader = ".TH "
+ topLevelHeader = "\n\n.SH "
+ secondLevelHdr = "\n.SH "
+ otherHeader = "\n.SS "
+ crTag = "\n"
+ emphTag = "\\fI"
+ emphCloseTag = "\\fP"
+ strongTag = "\\fB"
+ strongCloseTag = "\\fP"
+ breakTag = "\n.br\n"
+ paraTag = "\n.PP\n"
+ hruleTag = "\n.ti 0\n\\l'\\n(.lu'\n"
+ linkTag = "\n\\[la]"
+ linkCloseTag = "\\[ra]"
+ codespanTag = "\\fB"
+ codespanCloseTag = "\\fR"
+ codeTag = "\n.EX\n"
+ codeCloseTag = ".EE\n" // Do not prepend a newline character since code blocks, by definition, include a newline already (or at least as how blackfriday gives us on).
+ quoteTag = "\n.PP\n.RS\n"
+ quoteCloseTag = "\n.RE\n"
+ listTag = "\n.RS\n"
+ listCloseTag = ".RE\n"
+ dtTag = "\n.TP\n"
+ dd2Tag = "\n"
+ tableStart = "\n.TS\nallbox;\n"
+ tableEnd = ".TE\n"
+ tableCellStart = "T{\n"
+ tableCellEnd = "\nT}\n"
+ tablePreprocessor = `'\" t`
+)
+
+// NewRoffRenderer creates a new blackfriday Renderer for generating roff documents
+// from markdown
+func NewRoffRenderer() *roffRenderer { // nolint: golint
+ return &roffRenderer{}
+}
+
+// GetExtensions returns the list of extensions used by this renderer implementation
+func (*roffRenderer) GetExtensions() blackfriday.Extensions {
+ return blackfriday.NoIntraEmphasis |
+ blackfriday.Tables |
+ blackfriday.FencedCode |
+ blackfriday.SpaceHeadings |
+ blackfriday.Footnotes |
+ blackfriday.Titleblock |
+ blackfriday.DefinitionLists
+}
+
+// RenderHeader handles outputting the header at document start
+func (r *roffRenderer) RenderHeader(w io.Writer, ast *blackfriday.Node) {
+ // We need to walk the tree to check if there are any tables.
+ // If there are, we need to enable the roff table preprocessor.
+ ast.Walk(func(node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
+ if node.Type == blackfriday.Table {
+ out(w, tablePreprocessor+"\n")
+ return blackfriday.Terminate
+ }
+ return blackfriday.GoToNext
+ })
+
+ // disable hyphenation
+ out(w, ".nh\n")
+}
+
+// RenderFooter handles outputting the footer at the document end; the roff
+// renderer has no footer information
+func (r *roffRenderer) RenderFooter(w io.Writer, ast *blackfriday.Node) {
+}
+
+// RenderNode is called for each node in a markdown document; based on the node
+// type the equivalent roff output is sent to the writer
+func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
+ walkAction := blackfriday.GoToNext
+
+ switch node.Type {
+ case blackfriday.Text:
+ // Special case: format the NAME section as required for proper whatis parsing.
+ // Refer to the lexgrog(1) and groff_man(7) manual pages for details.
+ if node.Parent != nil &&
+ node.Parent.Type == blackfriday.Paragraph &&
+ node.Parent.Prev != nil &&
+ node.Parent.Prev.Type == blackfriday.Heading &&
+ node.Parent.Prev.FirstChild != nil &&
+ bytes.EqualFold(node.Parent.Prev.FirstChild.Literal, []byte("NAME")) {
+ before, after, found := bytesCut(node.Literal, []byte(" - "))
+ escapeSpecialChars(w, before)
+ if found {
+ out(w, ` \- `)
+ escapeSpecialChars(w, after)
+ }
+ } else {
+ escapeSpecialChars(w, node.Literal)
+ }
+ case blackfriday.Softbreak:
+ out(w, crTag)
+ case blackfriday.Hardbreak:
+ out(w, breakTag)
+ case blackfriday.Emph:
+ if entering {
+ out(w, emphTag)
+ } else {
+ out(w, emphCloseTag)
+ }
+ case blackfriday.Strong:
+ if entering {
+ out(w, strongTag)
+ } else {
+ out(w, strongCloseTag)
+ }
+ case blackfriday.Link:
+ // Don't render the link text for automatic links, because this
+ // will only duplicate the URL in the roff output.
+ // See https://daringfireball.net/projects/markdown/syntax#autolink
+ if !bytes.Equal(node.LinkData.Destination, node.FirstChild.Literal) {
+ out(w, string(node.FirstChild.Literal))
+ }
+ // Hyphens in a link must be escaped to avoid word-wrap in the rendered man page.
+ escapedLink := strings.ReplaceAll(string(node.LinkData.Destination), "-", "\\-")
+ out(w, linkTag+escapedLink+linkCloseTag)
+ walkAction = blackfriday.SkipChildren
+ case blackfriday.Image:
+ // ignore images
+ walkAction = blackfriday.SkipChildren
+ case blackfriday.Code:
+ out(w, codespanTag)
+ escapeSpecialChars(w, node.Literal)
+ out(w, codespanCloseTag)
+ case blackfriday.Document:
+ break
+ case blackfriday.Paragraph:
+ if entering {
+ if r.listDepth > 0 {
+ // roff .PP markers break lists
+ if node.Prev != nil { // continued paragraph
+ if node.Prev.Type == blackfriday.List && node.Prev.ListFlags&blackfriday.ListTypeDefinition == 0 {
+ out(w, ".IP\n")
+ } else {
+ out(w, crTag)
+ }
+ }
+ } else if node.Prev != nil && node.Prev.Type == blackfriday.Heading {
+ out(w, crTag)
+ } else {
+ out(w, paraTag)
+ }
+ } else {
+ if node.Next == nil || node.Next.Type != blackfriday.List {
+ out(w, crTag)
+ }
+ }
+ case blackfriday.BlockQuote:
+ if entering {
+ out(w, quoteTag)
+ } else {
+ out(w, quoteCloseTag)
+ }
+ case blackfriday.Heading:
+ r.handleHeading(w, node, entering)
+ case blackfriday.HorizontalRule:
+ out(w, hruleTag)
+ case blackfriday.List:
+ r.handleList(w, node, entering)
+ case blackfriday.Item:
+ r.handleItem(w, node, entering)
+ case blackfriday.CodeBlock:
+ out(w, codeTag)
+ escapeSpecialChars(w, node.Literal)
+ out(w, codeCloseTag)
+ case blackfriday.Table:
+ r.handleTable(w, node, entering)
+ case blackfriday.TableHead:
+ case blackfriday.TableBody:
+ case blackfriday.TableRow:
+ // no action as cell entries do all the nroff formatting
+ return blackfriday.GoToNext
+ case blackfriday.TableCell:
+ r.handleTableCell(w, node, entering)
+ case blackfriday.HTMLSpan:
+ // ignore other HTML tags
+ case blackfriday.HTMLBlock:
+ if bytes.HasPrefix(node.Literal, []byte("
+// | ||
+// | |\---->
+// | |
+// | \---->
+// |
+// \---->
+//
+// Each 'a=b' key-value pair constitutes an 'element' of the header field.
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the header field to extract the value from.
+ //
+ // .. note::
+ //
+ // If the header appears multiple times only the first value is used.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The element separator (e.g., ';' separates 'a;b;c;d').
+ // Default: empty string. This causes the entirety of the header field to be extracted.
+ // If this field is set to an empty string and 'index' is used in the oneof below, 'index'
+ // must be set to 0.
+ ElementSeparator string `protobuf:"bytes,2,opt,name=element_separator,json=elementSeparator,proto3" json:"element_separator,omitempty"`
+ // Types that are assignable to ExtractType:
+ //
+ // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index
+ // *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element
+ ExtractType isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType `protobuf_oneof:"extract_type"`
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Reset() {
+ *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ProtoMessage() {}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.ProtoReflect.Descriptor instead.
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescGZIP(), []int{5, 0, 0, 0}
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetElementSeparator() string {
+ if x != nil {
+ return x.ElementSeparator
+ }
+ return ""
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetExtractType() isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType {
+ if m != nil {
+ return m.ExtractType
+ }
+ return nil
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetIndex() uint32 {
+ if x, ok := x.GetExtractType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index); ok {
+ return x.Index
+ }
+ return 0
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) GetElement() *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement {
+ if x, ok := x.GetExtractType().(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element); ok {
+ return x.Element
+ }
+ return nil
+}
+
+type isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType interface {
+ isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType()
+}
+
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index struct {
+ // Specifies the zero based index of the element to extract.
+ // Note Envoy concatenates multiple values of the same header key into a comma separated
+ // string, the splitting always happens after the concatenation.
+ Index uint32 `protobuf:"varint,3,opt,name=index,proto3,oneof"`
+}
+
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element struct {
+ // Specifies the key value pair to extract the value from.
+ Element *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement `protobuf:"bytes,4,opt,name=element,proto3,oneof"`
+}
+
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index) isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType() {
+}
+
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element) isScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_ExtractType() {
+}
+
+// Specifies a header field's key value pair to match on.
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The separator between key and value (e.g., '=' separates 'k=v;...').
+ // If an element is an empty string, the element is ignored.
+ // If an element contains no separator, the whole element is parsed as key and the
+ // fragment value is an empty string.
+ // If there are multiple values for a matched key, the first value is returned.
+ Separator string `protobuf:"bytes,1,opt,name=separator,proto3" json:"separator,omitempty"`
+ // The key to match on.
+ Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Reset() {
+ *x = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ProtoMessage() {}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[20]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.ProtoReflect.Descriptor instead.
+func (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescGZIP(), []int{5, 0, 0, 0, 0}
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) GetSeparator() string {
+ if x != nil {
+ return x.Separator
+ }
+ return ""
+}
+
+func (x *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+var File_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDesc = []byte{
+ 0x0a, 0x59, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f,
+ 0x72, 0x6b, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74,
+ 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
+ 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3b, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69,
+ 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74,
+ 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61,
+ 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67,
+ 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61,
+ 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65,
+ 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x73,
+ 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f,
+ 0x74, 0x72, 0x61, 0x63, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x74, 0x72,
+ 0x61, 0x63, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x70,
+ 0x61, 0x74, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f,
+ 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f,
+ 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61,
+ 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65,
+ 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72,
+ 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75,
+ 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x75,
+ 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75,
+ 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x42, 0x0a, 0x15, 0x48, 0x74,
+ 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x72, 0x12, 0x85, 0x01, 0x0a, 0x0a, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x5f, 0x74, 0x79,
+ 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x5c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74,
+ 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x64,
+ 0x65, 0x63, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01,
+ 0x52, 0x09, 0x63, 0x6f, 0x64, 0x65, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0b, 0x73,
+ 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50,
+ 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x54, 0x0a, 0x03, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65,
+ 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33,
+ 0x2e, 0x52, 0x64, 0x73, 0x48, 0x00, 0x52, 0x03, 0x72, 0x64, 0x73, 0x12, 0x4e, 0x0a, 0x0c, 0x72,
+ 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0b,
+ 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x70, 0x0a, 0x0d, 0x73,
+ 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x1f, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x49, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65,
+ 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33,
+ 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52,
+ 0x0c, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x6a, 0x0a,
+ 0x0c, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e,
+ 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76,
+ 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x0b, 0x68, 0x74,
+ 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x40, 0x0a, 0x0e, 0x61, 0x64, 0x64,
+ 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0c, 0x61,
+ 0x64, 0x64, 0x55, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x74, 0x0a, 0x07, 0x74,
+ 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
+ 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
+ 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e,
+ 0x67, 0x12, 0x73, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x68, 0x74, 0x74, 0x70,
+ 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x23, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48,
+ 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x19, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x6f, 0x6e, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4a, 0x0a, 0x22, 0x68, 0x74, 0x74, 0x70, 0x31, 0x5f,
+ 0x73, 0x61, 0x66, 0x65, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x3a, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x1e, 0x68, 0x74, 0x74, 0x70, 0x31, 0x53, 0x61, 0x66, 0x65, 0x4d, 0x61, 0x78,
+ 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x5e, 0x0a, 0x15, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x31, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x13, 0x68,
+ 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x12, 0x69, 0x0a, 0x16, 0x68, 0x74, 0x74, 0x70, 0x32, 0x5f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x32, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x07,
+ 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x32, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x60, 0x0a,
+ 0x16, 0x68, 0x74, 0x74, 0x70, 0x33, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x2c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72,
+ 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x33, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63,
+ 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x14, 0x68, 0x74, 0x74, 0x70, 0x33,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
+ 0x2c, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc8, 0x01, 0x00, 0xc0, 0x01,
+ 0x02, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0xb9, 0x01,
+ 0x0a, 0x1c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x22,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x6d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e,
+ 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48,
+ 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x1a, 0x73,
+ 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73,
+ 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x72, 0x0a, 0x1c, 0x73, 0x63, 0x68,
+ 0x65, 0x6d, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x30, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63,
+ 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x48, 0x65, 0x61,
+ 0x64, 0x65, 0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x1a, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54,
+ 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5d, 0x0a,
+ 0x16, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61,
+ 0x64, 0x65, 0x72, 0x73, 0x5f, 0x6b, 0x62, 0x18, 0x1d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07,
+ 0x2a, 0x05, 0x18, 0x80, 0x40, 0x20, 0x00, 0x52, 0x13, 0x6d, 0x61, 0x78, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x4b, 0x62, 0x12, 0x52, 0x0a, 0x13,
+ 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x69, 0x64, 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+ 0x6f, 0x75, 0x74, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x11, 0x73,
+ 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
+ 0x12, 0x4b, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+ 0x6f, 0x75, 0x74, 0x18, 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x0e, 0x72,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x62, 0x0a,
+ 0x17, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0f, 0xfa, 0x42, 0x05, 0xaa, 0x01,
+ 0x02, 0x32, 0x00, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x15, 0x72, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75,
+ 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f,
+ 0x75, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x64, 0x72, 0x61, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75,
+ 0x74, 0x12, 0x4d, 0x0a, 0x15, 0x64, 0x65, 0x6c, 0x61, 0x79, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x6f,
+ 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x64, 0x65, 0x6c,
+ 0x61, 0x79, 0x65, 0x64, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
+ 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x18, 0x0d,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33,
+ 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x52, 0x09, 0x61, 0x63, 0x63, 0x65,
+ 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x12, 0x6d, 0x0a, 0x19, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f,
+ 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76,
+ 0x61, 0x6c, 0x18, 0x36, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x42, 0x17, 0xfa, 0x42, 0x09, 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84,
+ 0x3d, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, 0x16, 0x61, 0x63,
+ 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65,
+ 0x72, 0x76, 0x61, 0x6c, 0x12, 0x50, 0x0a, 0x1f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x61, 0x63,
+ 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x65, 0x77, 0x5f,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x37, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x92,
+ 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, 0x1a, 0x66, 0x6c, 0x75, 0x73,
+ 0x68, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x4f, 0x6e, 0x4e, 0x65, 0x77, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x94, 0x01, 0x0a, 0x12, 0x61, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x38, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x66, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e,
+ 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76,
+ 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x48, 0x63, 0x6d, 0x41, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x4c, 0x6f, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x10, 0x61, 0x63, 0x63,
+ 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x51, 0x0a,
+ 0x12, 0x75, 0x73, 0x65, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72,
+ 0x65, 0x73, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0x8a, 0x93, 0xb7, 0x2a, 0x02, 0x08, 0x01, 0x52, 0x10,
+ 0x75, 0x73, 0x65, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
+ 0x12, 0x2f, 0x0a, 0x14, 0x78, 0x66, 0x66, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x72, 0x75, 0x73,
+ 0x74, 0x65, 0x64, 0x5f, 0x68, 0x6f, 0x70, 0x73, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11,
+ 0x78, 0x66, 0x66, 0x4e, 0x75, 0x6d, 0x54, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x48, 0x6f, 0x70,
+ 0x73, 0x12, 0x73, 0x0a, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x69, 0x70,
+ 0x5f, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x2e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
+ 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x1d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61,
+ 0x6c, 0x49, 0x70, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x73, 0x0a, 0x20, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x5f,
+ 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x34, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
+ 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x1d, 0x65, 0x61,
+ 0x72, 0x6c, 0x79, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x17,
+ 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x19, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x68, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
+ 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70,
+ 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+ 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
+ 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
+ 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x26,
+ 0x0a, 0x0f, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x78, 0x66, 0x66, 0x5f, 0x61, 0x70, 0x70, 0x65, 0x6e,
+ 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x73, 0x6b, 0x69, 0x70, 0x58, 0x66, 0x66,
+ 0x41, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x12, 0x1d, 0x0a, 0x03, 0x76, 0x69, 0x61, 0x18, 0x16, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc8, 0x01, 0x00, 0xc0, 0x01, 0x02,
+ 0x52, 0x03, 0x76, 0x69, 0x61, 0x12, 0x4a, 0x0a, 0x13, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x65, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x0f, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x11,
+ 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
+ 0x64, 0x12, 0x3f, 0x0a, 0x1c, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x5f, 0x65, 0x78,
+ 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69,
+ 0x64, 0x18, 0x20, 0x20, 0x01, 0x28, 0x08, 0x52, 0x19, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76,
+ 0x65, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x49, 0x64, 0x12, 0x47, 0x0a, 0x21, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x5f, 0x73, 0x65, 0x74,
+ 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x72,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x25, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1c, 0x61,
+ 0x6c, 0x77, 0x61, 0x79, 0x73, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49,
+ 0x64, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xb4, 0x01, 0x0a, 0x1b,
+ 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63,
+ 0x65, 0x72, 0x74, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28,
+ 0x0e, 0x32, 0x6b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74,
+ 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e,
+ 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61,
+ 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x08,
+ 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x18, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72,
+ 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69,
+ 0x6c, 0x73, 0x12, 0xb4, 0x01, 0x0a, 0x1f, 0x73, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65,
+ 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x64,
+ 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x6e, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
+ 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
+ 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e,
+ 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x52, 0x1b, 0x73, 0x65,
+ 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65,
+ 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x70, 0x72, 0x6f,
+ 0x78, 0x79, 0x5f, 0x31, 0x30, 0x30, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x18,
+ 0x12, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x31, 0x30, 0x30, 0x43,
+ 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x12, 0x65, 0x0a, 0x31, 0x72, 0x65, 0x70, 0x72, 0x65,
+ 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x70, 0x76, 0x34, 0x5f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65,
+ 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x61, 0x73, 0x5f, 0x69, 0x70, 0x76, 0x34,
+ 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x76, 0x36, 0x18, 0x14, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x2a, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x49, 0x70, 0x76,
+ 0x34, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x41, 0x73,
+ 0x49, 0x70, 0x76, 0x34, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x64, 0x49, 0x70, 0x76, 0x36, 0x12, 0x89,
+ 0x01, 0x0a, 0x0f, 0x75, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x73, 0x18, 0x17, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x60, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74,
+ 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x67,
+ 0x72, 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x75, 0x70, 0x67, 0x72,
+ 0x61, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x6e, 0x6f,
+ 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x1e, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0d,
+ 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x23, 0x0a,
+ 0x0d, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x21,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x6c, 0x61, 0x73, 0x68,
+ 0x65, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x20, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x77, 0x69, 0x74, 0x68,
+ 0x5f, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73,
+ 0x5f, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x2d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x6f, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
+ 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70,
+ 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+ 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65,
+ 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x1c,
+ 0x70, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x53,
+ 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x81, 0x01, 0x0a,
+ 0x14, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x5f, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x24, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66,
+ 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68,
+ 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x12, 0x7b, 0x0a, 0x12, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x72, 0x65, 0x70, 0x6c, 0x79, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x26, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
+ 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x52, 0x65, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x6c, 0x6f, 0x63,
+ 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x50, 0x0a,
+ 0x18, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f,
+ 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x27, 0x20, 0x01, 0x28, 0x08, 0x42,
+ 0x17, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x11, 0x12, 0x0f, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x52, 0x15, 0x73, 0x74, 0x72, 0x69, 0x70, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74, 0x12,
+ 0x2f, 0x0a, 0x13, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x61, 0x6e, 0x79, 0x5f, 0x68, 0x6f, 0x73,
+ 0x74, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x2a, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x10,
+ 0x73, 0x74, 0x72, 0x69, 0x70, 0x41, 0x6e, 0x79, 0x48, 0x6f, 0x73, 0x74, 0x50, 0x6f, 0x72, 0x74,
+ 0x12, 0x69, 0x0a, 0x24, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72,
+ 0x5f, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x68, 0x74, 0x74, 0x70,
+ 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1f, 0x73, 0x74, 0x72, 0x65,
+ 0x61, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4f, 0x6e, 0x49, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x48, 0x74, 0x74, 0x70, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0xa9, 0x01, 0x0a, 0x1a,
+ 0x70, 0x61, 0x74, 0x68, 0x5f, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x2b, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x6b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77,
+ 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48,
+ 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e,
+ 0x61, 0x67, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x18, 0x70,
+ 0x61, 0x74, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x0a, 0x17, 0x73, 0x74, 0x72, 0x69, 0x70,
+ 0x5f, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x5f, 0x64,
+ 0x6f, 0x74, 0x18, 0x2f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x74, 0x72, 0x69, 0x70, 0x54,
+ 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x48, 0x6f, 0x73, 0x74, 0x44, 0x6f, 0x74, 0x12, 0x94,
+ 0x01, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x31, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x64, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
+ 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
+ 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x6f, 0x0a, 0x1e, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x68,
+ 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x32, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72,
+ 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x1b, 0x74, 0x79, 0x70, 0x65, 0x64,
+ 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x35, 0x0a, 0x17, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64,
+ 0x5f, 0x78, 0x5f, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x72,
+ 0x74, 0x18, 0x33, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x58,
+ 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x32, 0x0a,
+ 0x15, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6f, 0x76,
+ 0x65, 0x72, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x39, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x70,
+ 0x70, 0x65, 0x6e, 0x64, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4f, 0x76, 0x65, 0x72, 0x6c, 0x6f, 0x61,
+ 0x64, 0x12, 0x68, 0x0a, 0x23, 0x61, 0x64, 0x64, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x35, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x1f, 0x61, 0x64, 0x64, 0x50,
+ 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x43, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0xc2, 0x05, 0x0a, 0x07,
+ 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e,
+ 0x74, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33,
+ 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
+ 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x64,
+ 0x6f, 0x6d, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76,
+ 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x61, 0x6e, 0x64, 0x6f,
+ 0x6d, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x41, 0x0a, 0x10, 0x6f, 0x76, 0x65,
+ 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0f, 0x6f, 0x76, 0x65,
+ 0x72, 0x61, 0x6c, 0x6c, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07,
+ 0x76, 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76,
+ 0x65, 0x72, 0x62, 0x6f, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61,
+ 0x74, 0x68, 0x5f, 0x74, 0x61, 0x67, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x07, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x74, 0x68, 0x54, 0x61, 0x67, 0x4c, 0x65, 0x6e,
+ 0x67, 0x74, 0x68, 0x12, 0x41, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74, 0x61,
+ 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33,
+ 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74,
+ 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x65, 0x2e, 0x76, 0x33,
+ 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x08, 0x70,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x13, 0x73, 0x70, 0x61, 0x77, 0x6e,
+ 0x5f, 0x75, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x52, 0x11, 0x73, 0x70, 0x61, 0x77, 0x6e, 0x55, 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x53,
+ 0x70, 0x61, 0x6e, 0x22, 0x28, 0x0a, 0x0d, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10,
+ 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x47, 0x52, 0x45, 0x53, 0x53, 0x10, 0x01, 0x3a, 0x5b, 0x9a,
+ 0xc5, 0x88, 0x1e, 0x56, 0x0a, 0x54, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
+ 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74,
+ 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67,
+ 0x65, 0x72, 0x2e, 0x54, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02,
+ 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x18, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f,
+ 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x74, 0x61, 0x67, 0x73,
+ 0x1a, 0xe7, 0x01, 0x0a, 0x15, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64,
+ 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x6e,
+ 0x69, 0x78, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x0b, 0x75, 0x6e, 0x69, 0x78, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a,
+ 0x0b, 0x63, 0x69, 0x64, 0x72, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69, 0x64, 0x72, 0x52, 0x61,
+ 0x6e, 0x67, 0x65, 0x52, 0x0a, 0x63, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x3a,
+ 0x69, 0x9a, 0xc5, 0x88, 0x1e, 0x64, 0x0a, 0x62, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77,
+ 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48,
+ 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e,
+ 0x61, 0x67, 0x65, 0x72, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x64, 0x64,
+ 0x72, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0x98, 0x02, 0x0a, 0x1b, 0x53,
+ 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43,
+ 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x73, 0x75,
+ 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f,
+ 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74,
+ 0x12, 0x12, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
+ 0x63, 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x05, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x6e,
+ 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x6e, 0x73, 0x12, 0x10, 0x0a, 0x03,
+ 0x75, 0x72, 0x69, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x75, 0x72, 0x69, 0x3a, 0x6f,
+ 0x9a, 0xc5, 0x88, 0x1e, 0x6a, 0x0a, 0x68, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f,
+ 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74,
+ 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c,
+ 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x4a,
+ 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0xae, 0x02, 0x0a, 0x0d, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64,
+ 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x67, 0x72, 0x61,
+ 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75,
+ 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x61, 0x0a, 0x07, 0x66, 0x69,
+ 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66,
+ 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68,
+ 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69,
+ 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x12, 0x34, 0x0a,
+ 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62,
+ 0x6c, 0x65, 0x64, 0x3a, 0x61, 0x9a, 0xc5, 0x88, 0x1e, 0x5c, 0x0a, 0x5a, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e,
+ 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e,
+ 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xe5, 0x01, 0x0a, 0x18, 0x50, 0x61, 0x74, 0x68, 0x4e,
+ 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x12, 0x63, 0x0a, 0x19, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e,
+ 0x67, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68,
+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18,
+ 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66,
+ 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x64, 0x0a, 0x1a, 0x68, 0x74, 0x74, 0x70,
+ 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72,
+ 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76,
+ 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x18, 0x68, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72,
+ 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xe4,
+ 0x02, 0x0a, 0x11, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x64,
+ 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x72, 0x65,
+ 0x6d, 0x6f, 0x76, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x51, 0x0a, 0x25, 0x72,
+ 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x74,
+ 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x72, 0x65, 0x6d, 0x6f,
+ 0x76, 0x65, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x72, 0x6d,
+ 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x32,
+ 0x0a, 0x15, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x72,
+ 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6c, 0x61,
+ 0x67, 0x73, 0x12, 0x41, 0x0a, 0x1d, 0x73, 0x65, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x65, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x63,
+ 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x73, 0x65, 0x74, 0x52, 0x65,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x5f, 0x6e, 0x6f, 0x64,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x75, 0x73,
+ 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x6c, 0x69, 0x74, 0x65, 0x72,
+ 0x61, 0x6c, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x10, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x50, 0x72,
+ 0x6f, 0x78, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x78, 0x79,
+ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x1a, 0x9d, 0x02, 0x0a, 0x13, 0x48, 0x63, 0x6d, 0x41, 0x63, 0x63,
+ 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x62, 0x0a,
+ 0x19, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x66, 0x6c, 0x75, 0x73,
+ 0x68, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0c, 0xfa, 0x42, 0x09,
+ 0xaa, 0x01, 0x06, 0x32, 0x04, 0x10, 0xc0, 0x84, 0x3d, 0x52, 0x16, 0x61, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x4c, 0x6f, 0x67, 0x46, 0x6c, 0x75, 0x73, 0x68, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61,
+ 0x6c, 0x12, 0x43, 0x0a, 0x1f, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x5f, 0x6c, 0x6f, 0x67, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x72, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1a, 0x66, 0x6c, 0x75, 0x73,
+ 0x68, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67, 0x4f, 0x6e, 0x4e, 0x65, 0x77, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5d, 0x0a, 0x2c, 0x66, 0x6c, 0x75, 0x73, 0x68, 0x5f,
+ 0x6c, 0x6f, 0x67, 0x5f, 0x6f, 0x6e, 0x5f, 0x74, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x73, 0x75,
+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x5f, 0x65, 0x73, 0x74, 0x61, 0x62,
+ 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x27, 0x66, 0x6c,
+ 0x75, 0x73, 0x68, 0x4c, 0x6f, 0x67, 0x4f, 0x6e, 0x54, 0x75, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x75,
+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x45, 0x73, 0x74, 0x61, 0x62, 0x6c,
+ 0x69, 0x73, 0x68, 0x65, 0x64, 0x22, 0x36, 0x0a, 0x09, 0x43, 0x6f, 0x64, 0x65, 0x63, 0x54, 0x79,
+ 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05,
+ 0x48, 0x54, 0x54, 0x50, 0x31, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32,
+ 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x33, 0x10, 0x03, 0x22, 0x53, 0x0a,
+ 0x1a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x54, 0x72, 0x61,
+ 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0d, 0x0a, 0x09, 0x4f,
+ 0x56, 0x45, 0x52, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41, 0x50,
+ 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x49, 0x46, 0x5f, 0x41, 0x42, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x01,
+ 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x41, 0x53, 0x53, 0x5f, 0x54, 0x48, 0x52, 0x4f, 0x55, 0x47, 0x48,
+ 0x10, 0x02, 0x22, 0x79, 0x0a, 0x18, 0x46, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x12, 0x0c,
+ 0x0a, 0x08, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, 0x45, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c,
+ 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01, 0x12, 0x12,
+ 0x0a, 0x0e, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44,
+ 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x41, 0x4e, 0x49, 0x54, 0x49, 0x5a, 0x45, 0x5f, 0x53,
+ 0x45, 0x54, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x57, 0x41, 0x59, 0x53, 0x5f, 0x46,
+ 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x22, 0xa0, 0x01,
+ 0x0a, 0x1c, 0x50, 0x61, 0x74, 0x68, 0x57, 0x69, 0x74, 0x68, 0x45, 0x73, 0x63, 0x61, 0x70, 0x65,
+ 0x64, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23,
+ 0x0a, 0x1f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x54, 0x49, 0x4f, 0x4e,
+ 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x43, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c,
+ 0x54, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x45, 0x50, 0x5f, 0x55, 0x4e, 0x43, 0x48,
+ 0x41, 0x4e, 0x47, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x45, 0x4a, 0x45, 0x43,
+ 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x55,
+ 0x4e, 0x45, 0x53, 0x43, 0x41, 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x44, 0x49,
+ 0x52, 0x45, 0x43, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x4e, 0x45, 0x53, 0x43, 0x41,
+ 0x50, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x04,
+ 0x3a, 0x53, 0x9a, 0xc5, 0x88, 0x1e, 0x4e, 0x0a, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74,
+ 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e,
+ 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61,
+ 0x6e, 0x61, 0x67, 0x65, 0x72, 0x42, 0x16, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x73,
+ 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x11, 0x0a,
+ 0x0f, 0x73, 0x74, 0x72, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65,
+ 0x4a, 0x04, 0x08, 0x1b, 0x10, 0x1c, 0x4a, 0x04, 0x08, 0x0b, 0x10, 0x0c, 0x52, 0x0c, 0x69, 0x64,
+ 0x6c, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0xca, 0x01, 0x0a, 0x10, 0x4c,
+ 0x6f, 0x63, 0x61, 0x6c, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
+ 0x65, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77,
+ 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x07, 0x6d,
+ 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x12, 0x4f, 0x0a, 0x0b, 0x62, 0x6f, 0x64, 0x79, 0x5f, 0x66,
+ 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
+ 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46,
+ 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x62, 0x6f, 0x64,
+ 0x79, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x9c, 0x03, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x06, 0x66, 0x69,
+ 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
+ 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x67,
+ 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01,
+ 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4a, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0xfa, 0x42, 0x08,
+ 0x2a, 0x06, 0x10, 0xd8, 0x04, 0x28, 0xc8, 0x01, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x43, 0x6f, 0x64, 0x65, 0x12, 0x34, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x60, 0x0a, 0x14, 0x62, 0x6f,
+ 0x64, 0x79, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x5f, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69,
+ 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e,
+ 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x6f, 0x72, 0x6d,
+ 0x61, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x62, 0x6f, 0x64, 0x79, 0x46, 0x6f,
+ 0x72, 0x6d, 0x61, 0x74, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x58, 0x0a, 0x0e,
+ 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, 0x05,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x09, 0xfa,
+ 0x42, 0x06, 0x92, 0x01, 0x03, 0x10, 0xe8, 0x07, 0x52, 0x0c, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72,
+ 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x22, 0xc7, 0x01, 0x0a, 0x03, 0x52, 0x64, 0x73, 0x12, 0x51,
+ 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01,
+ 0x02, 0x10, 0x01, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x6f,
+ 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x3a, 0x41, 0x9a,
+ 0xc5, 0x88, 0x1e, 0x3c, 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
+ 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x64, 0x73,
+ 0x22, 0xf7, 0x01, 0x0a, 0x1d, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69,
+ 0x73, 0x74, 0x12, 0x79, 0x0a, 0x1b, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75,
+ 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e,
+ 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02,
+ 0x08, 0x01, 0x52, 0x19, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x5b, 0x9a,
+ 0xc5, 0x88, 0x1e, 0x56, 0x0a, 0x54, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
+ 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f,
+ 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x22, 0xe5, 0x0e, 0x0a, 0x0c, 0x53,
+ 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02,
+ 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x8f, 0x01, 0x0a, 0x11, 0x73, 0x63, 0x6f,
+ 0x70, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x59, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e,
+ 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e,
+ 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42,
+ 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x73, 0x63, 0x6f, 0x70, 0x65,
+ 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x11, 0x72, 0x64,
+ 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x0f, 0x72, 0x64, 0x73, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0xa5, 0x01, 0x0a, 0x20, 0x73,
+ 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x5a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73,
+ 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
+ 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73,
+ 0x74, 0x48, 0x00, 0x52, 0x1d, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69,
+ 0x73, 0x74, 0x12, 0x67, 0x0a, 0x0a, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x64, 0x73,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
+ 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+ 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x48, 0x00,
+ 0x52, 0x09, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x1a, 0xdf, 0x09, 0x0a, 0x0f,
+ 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12,
+ 0x91, 0x01, 0x0a, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x69, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e,
+ 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e,
+ 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76,
+ 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53,
+ 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46,
+ 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x42, 0x08,
+ 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x09, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x1a, 0xdb, 0x07, 0x0a, 0x0f, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74,
+ 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x12, 0xb6, 0x01, 0x0a, 0x16, 0x68, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74,
+ 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x7e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74,
+ 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75,
+ 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c,
+ 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c,
+ 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45,
+ 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x14, 0x68, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72,
+ 0x1a, 0x95, 0x05, 0x0a, 0x14, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01,
+ 0xc8, 0x01, 0x00, 0xc0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11,
+ 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f,
+ 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x53, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x69, 0x6e, 0x64,
+ 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65,
+ 0x78, 0x12, 0xa5, 0x01, 0x0a, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x88, 0x01, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e,
+ 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e,
+ 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e,
+ 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e,
+ 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61,
+ 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x76, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x00,
+ 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0xdb, 0x01, 0x0a, 0x09, 0x4b, 0x76,
+ 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x09, 0x73, 0x65, 0x70, 0x61, 0x72,
+ 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
+ 0x02, 0x10, 0x01, 0x52, 0x09, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x19,
+ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
+ 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x8b, 0x01, 0x9a, 0xc5, 0x88, 0x1e,
+ 0x85, 0x01, 0x0a, 0x82, 0x01, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
+ 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70,
+ 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65,
+ 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e,
+ 0x74, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x76,
+ 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x7f, 0x9a, 0xc5, 0x88, 0x1e, 0x7a, 0x0a, 0x78,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c,
+ 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75,
+ 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c,
+ 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69, 0x6c,
+ 0x64, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x45,
+ 0x78, 0x74, 0x72, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x42, 0x0e, 0x0a, 0x0c, 0x65, 0x78, 0x74, 0x72,
+ 0x61, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x6a, 0x9a, 0xc5, 0x88, 0x1e, 0x65, 0x0a,
+ 0x63, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69,
+ 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74,
+ 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e,
+ 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f,
+ 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69,
+ 0x6c, 0x64, 0x65, 0x72, 0x2e, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x75, 0x69,
+ 0x6c, 0x64, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42,
+ 0x01, 0x3a, 0x5a, 0x9a, 0xc5, 0x88, 0x1e, 0x55, 0x0a, 0x53, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65,
+ 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x53, 0x63,
+ 0x6f, 0x70, 0x65, 0x4b, 0x65, 0x79, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x3a, 0x4a, 0x9a,
+ 0xc5, 0x88, 0x1e, 0x45, 0x0a, 0x43, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
+ 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f,
+ 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x42, 0x17, 0x0a, 0x10, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8,
+ 0x42, 0x01, 0x22, 0xf1, 0x01, 0x0a, 0x09, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73,
+ 0x12, 0x65, 0x0a, 0x18, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x64, 0x73, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01,
+ 0x52, 0x15, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x72, 0x64, 0x73, 0x5f,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f,
+ 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x3a, 0x47, 0x9a,
+ 0xc5, 0x88, 0x1e, 0x42, 0x0a, 0x40, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
+ 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x6f,
+ 0x70, 0x65, 0x64, 0x52, 0x64, 0x73, 0x22, 0xe8, 0x02, 0x0a, 0x0a, 0x48, 0x74, 0x74, 0x70, 0x46,
+ 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00,
+ 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58, 0x0a,
+ 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
+ 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x45,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x48, 0x00, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x69,
+ 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x69, 0x73, 0x61,
+ 0x62, 0x6c, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x64, 0x69, 0x73, 0x61,
+ 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x48, 0x9a, 0xc5, 0x88, 0x1e, 0x43, 0x0a, 0x41, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
+ 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f,
+ 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72,
+ 0x2e, 0x76, 0x32, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x42, 0x0d,
+ 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08,
+ 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x22, 0x9f, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65,
+ 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x3a, 0x50, 0x9a, 0xc5, 0x88, 0x1e, 0x4b, 0x0a, 0x49, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x6e, 0x65,
+ 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x32,
+ 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x44, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x22, 0x8e, 0x01, 0x0a, 0x20, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x4d, 0x6f, 0x62,
+ 0x69, 0x6c, 0x65, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x12, 0x6a, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x52, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74,
+ 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x68, 0x74, 0x74, 0x70,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
+ 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x52, 0x06, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x42, 0xef, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a,
+ 0x49, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2e,
+ 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x1a, 0x48, 0x74, 0x74, 0x70,
+ 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+ 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x7c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f,
+ 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65,
+ 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
+ 0x6b, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x68, 0x74, 0x74,
+ 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x61, 0x6e,
+ 0x61, 0x67, 0x65, 0x72, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescOnce sync.Once
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescData = file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDesc
+)
+
+func file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescData)
+ })
+ return file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDescData
+}
+
+var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
+var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes = make([]protoimpl.MessageInfo, 21)
+var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_goTypes = []interface{}{
+ (HttpConnectionManager_CodecType)(0), // 0: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.CodecType
+ (HttpConnectionManager_ServerHeaderTransformation)(0), // 1: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ServerHeaderTransformation
+ (HttpConnectionManager_ForwardClientCertDetails)(0), // 2: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ForwardClientCertDetails
+ (HttpConnectionManager_PathWithEscapedSlashesAction)(0), // 3: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathWithEscapedSlashesAction
+ (HttpConnectionManager_Tracing_OperationName)(0), // 4: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.OperationName
+ (*HttpConnectionManager)(nil), // 5: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
+ (*LocalReplyConfig)(nil), // 6: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig
+ (*ResponseMapper)(nil), // 7: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper
+ (*Rds)(nil), // 8: envoy.extensions.filters.network.http_connection_manager.v3.Rds
+ (*ScopedRouteConfigurationsList)(nil), // 9: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList
+ (*ScopedRoutes)(nil), // 10: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes
+ (*ScopedRds)(nil), // 11: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds
+ (*HttpFilter)(nil), // 12: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter
+ (*RequestIDExtension)(nil), // 13: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension
+ (*EnvoyMobileHttpConnectionManager)(nil), // 14: envoy.extensions.filters.network.http_connection_manager.v3.EnvoyMobileHttpConnectionManager
+ (*HttpConnectionManager_Tracing)(nil), // 15: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing
+ (*HttpConnectionManager_InternalAddressConfig)(nil), // 16: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig
+ (*HttpConnectionManager_SetCurrentClientCertDetails)(nil), // 17: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails
+ (*HttpConnectionManager_UpgradeConfig)(nil), // 18: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig
+ (*HttpConnectionManager_PathNormalizationOptions)(nil), // 19: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions
+ (*HttpConnectionManager_ProxyStatusConfig)(nil), // 20: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ProxyStatusConfig
+ (*HttpConnectionManager_HcmAccessLogOptions)(nil), // 21: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.HcmAccessLogOptions
+ (*ScopedRoutes_ScopeKeyBuilder)(nil), // 22: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder)(nil), // 23: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor)(nil), // 24: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement)(nil), // 25: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement
+ (*v32.RouteConfiguration)(nil), // 26: envoy.config.route.v3.RouteConfiguration
+ (*wrapperspb.BoolValue)(nil), // 27: google.protobuf.BoolValue
+ (*v3.HttpProtocolOptions)(nil), // 28: envoy.config.core.v3.HttpProtocolOptions
+ (*v3.Http1ProtocolOptions)(nil), // 29: envoy.config.core.v3.Http1ProtocolOptions
+ (*v3.Http2ProtocolOptions)(nil), // 30: envoy.config.core.v3.Http2ProtocolOptions
+ (*v3.Http3ProtocolOptions)(nil), // 31: envoy.config.core.v3.Http3ProtocolOptions
+ (*v3.SchemeHeaderTransformation)(nil), // 32: envoy.config.core.v3.SchemeHeaderTransformation
+ (*wrapperspb.UInt32Value)(nil), // 33: google.protobuf.UInt32Value
+ (*durationpb.Duration)(nil), // 34: google.protobuf.Duration
+ (*v31.AccessLog)(nil), // 35: envoy.config.accesslog.v3.AccessLog
+ (*v3.TypedExtensionConfig)(nil), // 36: envoy.config.core.v3.TypedExtensionConfig
+ (*v3.SubstitutionFormatString)(nil), // 37: envoy.config.core.v3.SubstitutionFormatString
+ (*v31.AccessLogFilter)(nil), // 38: envoy.config.accesslog.v3.AccessLogFilter
+ (*v3.DataSource)(nil), // 39: envoy.config.core.v3.DataSource
+ (*v3.HeaderValueOption)(nil), // 40: envoy.config.core.v3.HeaderValueOption
+ (*v3.ConfigSource)(nil), // 41: envoy.config.core.v3.ConfigSource
+ (*v32.ScopedRouteConfiguration)(nil), // 42: envoy.config.route.v3.ScopedRouteConfiguration
+ (*anypb.Any)(nil), // 43: google.protobuf.Any
+ (*v3.ExtensionConfigSource)(nil), // 44: envoy.config.core.v3.ExtensionConfigSource
+ (*v33.Percent)(nil), // 45: envoy.type.v3.Percent
+ (*v34.CustomTag)(nil), // 46: envoy.type.tracing.v3.CustomTag
+ (*v35.Tracing_Http)(nil), // 47: envoy.config.trace.v3.Tracing.Http
+ (*v3.CidrRange)(nil), // 48: envoy.config.core.v3.CidrRange
+ (*v36.PathTransformation)(nil), // 49: envoy.type.http.v3.PathTransformation
+}
+var file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_depIdxs = []int32{
+ 0, // 0: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.codec_type:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.CodecType
+ 8, // 1: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.rds:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.Rds
+ 26, // 2: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.route_config:type_name -> envoy.config.route.v3.RouteConfiguration
+ 10, // 3: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.scoped_routes:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes
+ 12, // 4: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http_filters:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter
+ 27, // 5: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.add_user_agent:type_name -> google.protobuf.BoolValue
+ 15, // 6: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.tracing:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing
+ 28, // 7: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options:type_name -> envoy.config.core.v3.HttpProtocolOptions
+ 29, // 8: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http_protocol_options:type_name -> envoy.config.core.v3.Http1ProtocolOptions
+ 30, // 9: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http2_protocol_options:type_name -> envoy.config.core.v3.Http2ProtocolOptions
+ 31, // 10: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.http3_protocol_options:type_name -> envoy.config.core.v3.Http3ProtocolOptions
+ 1, // 11: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.server_header_transformation:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ServerHeaderTransformation
+ 32, // 12: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.scheme_header_transformation:type_name -> envoy.config.core.v3.SchemeHeaderTransformation
+ 33, // 13: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.max_request_headers_kb:type_name -> google.protobuf.UInt32Value
+ 34, // 14: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_idle_timeout:type_name -> google.protobuf.Duration
+ 34, // 15: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_timeout:type_name -> google.protobuf.Duration
+ 34, // 16: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_headers_timeout:type_name -> google.protobuf.Duration
+ 34, // 17: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.drain_timeout:type_name -> google.protobuf.Duration
+ 34, // 18: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.delayed_close_timeout:type_name -> google.protobuf.Duration
+ 35, // 19: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.access_log:type_name -> envoy.config.accesslog.v3.AccessLog
+ 34, // 20: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.access_log_flush_interval:type_name -> google.protobuf.Duration
+ 21, // 21: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.access_log_options:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.HcmAccessLogOptions
+ 27, // 22: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.use_remote_address:type_name -> google.protobuf.BoolValue
+ 36, // 23: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.original_ip_detection_extensions:type_name -> envoy.config.core.v3.TypedExtensionConfig
+ 36, // 24: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.early_header_mutation_extensions:type_name -> envoy.config.core.v3.TypedExtensionConfig
+ 16, // 25: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.internal_address_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig
+ 27, // 26: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.generate_request_id:type_name -> google.protobuf.BoolValue
+ 2, // 27: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.forward_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ForwardClientCertDetails
+ 17, // 28: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.set_current_client_cert_details:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails
+ 18, // 29: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.upgrade_configs:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig
+ 27, // 30: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.normalize_path:type_name -> google.protobuf.BoolValue
+ 3, // 31: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.path_with_escaped_slashes_action:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathWithEscapedSlashesAction
+ 13, // 32: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.request_id_extension:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension
+ 6, // 33: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.local_reply_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig
+ 27, // 34: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.stream_error_on_invalid_http_message:type_name -> google.protobuf.BoolValue
+ 19, // 35: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.path_normalization_options:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions
+ 20, // 36: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.proxy_status_config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.ProxyStatusConfig
+ 36, // 37: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.typed_header_validation_config:type_name -> envoy.config.core.v3.TypedExtensionConfig
+ 27, // 38: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.add_proxy_protocol_connection_state:type_name -> google.protobuf.BoolValue
+ 7, // 39: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.mappers:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper
+ 37, // 40: envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.body_format:type_name -> envoy.config.core.v3.SubstitutionFormatString
+ 38, // 41: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.filter:type_name -> envoy.config.accesslog.v3.AccessLogFilter
+ 33, // 42: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.status_code:type_name -> google.protobuf.UInt32Value
+ 39, // 43: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body:type_name -> envoy.config.core.v3.DataSource
+ 37, // 44: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.body_format_override:type_name -> envoy.config.core.v3.SubstitutionFormatString
+ 40, // 45: envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper.headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption
+ 41, // 46: envoy.extensions.filters.network.http_connection_manager.v3.Rds.config_source:type_name -> envoy.config.core.v3.ConfigSource
+ 42, // 47: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList.scoped_route_configurations:type_name -> envoy.config.route.v3.ScopedRouteConfiguration
+ 22, // 48: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scope_key_builder:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder
+ 41, // 49: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.rds_config_source:type_name -> envoy.config.core.v3.ConfigSource
+ 9, // 50: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_route_configurations_list:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList
+ 11, // 51: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.scoped_rds:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds
+ 41, // 52: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds.scoped_rds_config_source:type_name -> envoy.config.core.v3.ConfigSource
+ 43, // 53: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.typed_config:type_name -> google.protobuf.Any
+ 44, // 54: envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter.config_discovery:type_name -> envoy.config.core.v3.ExtensionConfigSource
+ 43, // 55: envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension.typed_config:type_name -> google.protobuf.Any
+ 5, // 56: envoy.extensions.filters.network.http_connection_manager.v3.EnvoyMobileHttpConnectionManager.config:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
+ 45, // 57: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.client_sampling:type_name -> envoy.type.v3.Percent
+ 45, // 58: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.random_sampling:type_name -> envoy.type.v3.Percent
+ 45, // 59: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.overall_sampling:type_name -> envoy.type.v3.Percent
+ 33, // 60: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.max_path_tag_length:type_name -> google.protobuf.UInt32Value
+ 46, // 61: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.custom_tags:type_name -> envoy.type.tracing.v3.CustomTag
+ 47, // 62: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.provider:type_name -> envoy.config.trace.v3.Tracing.Http
+ 27, // 63: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing.spawn_upstream_span:type_name -> google.protobuf.BoolValue
+ 48, // 64: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig.cidr_ranges:type_name -> envoy.config.core.v3.CidrRange
+ 27, // 65: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails.subject:type_name -> google.protobuf.BoolValue
+ 12, // 66: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.filters:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter
+ 27, // 67: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig.enabled:type_name -> google.protobuf.BoolValue
+ 49, // 68: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions.forwarding_transformation:type_name -> envoy.type.http.v3.PathTransformation
+ 49, // 69: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions.http_filter_transformation:type_name -> envoy.type.http.v3.PathTransformation
+ 34, // 70: envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.HcmAccessLogOptions.access_log_flush_interval:type_name -> google.protobuf.Duration
+ 23, // 71: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.fragments:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder
+ 24, // 72: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.header_value_extractor:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor
+ 25, // 73: envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.element:type_name -> envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement
+ 74, // [74:74] is the sub-list for method output_type
+ 74, // [74:74] is the sub-list for method input_type
+ 74, // [74:74] is the sub-list for extension type_name
+ 74, // [74:74] is the sub-list for extension extendee
+ 0, // [0:74] is the sub-list for field type_name
+}
+
+func init() {
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_init()
+}
+func file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_init() {
+ if File_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpConnectionManager); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocalReplyConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ResponseMapper); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Rds); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ScopedRouteConfigurationsList); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ScopedRoutes); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ScopedRds); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpFilter); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RequestIDExtension); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*EnvoyMobileHttpConnectionManager); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpConnectionManager_Tracing); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpConnectionManager_InternalAddressConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpConnectionManager_SetCurrentClientCertDetails); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpConnectionManager_UpgradeConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpConnectionManager_PathNormalizationOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpConnectionManager_ProxyStatusConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpConnectionManager_HcmAccessLogOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ScopedRoutes_ScopeKeyBuilder); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*HttpConnectionManager_Rds)(nil),
+ (*HttpConnectionManager_RouteConfig)(nil),
+ (*HttpConnectionManager_ScopedRoutes)(nil),
+ (*HttpConnectionManager_StripAnyHostPort)(nil),
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[5].OneofWrappers = []interface{}{
+ (*ScopedRoutes_ScopedRouteConfigurationsList)(nil),
+ (*ScopedRoutes_ScopedRds)(nil),
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[7].OneofWrappers = []interface{}{
+ (*HttpFilter_TypedConfig)(nil),
+ (*HttpFilter_ConfigDiscovery)(nil),
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[15].OneofWrappers = []interface{}{
+ (*HttpConnectionManager_ProxyStatusConfig_UseNodeId)(nil),
+ (*HttpConnectionManager_ProxyStatusConfig_LiteralProxyName)(nil),
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[18].OneofWrappers = []interface{}{
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_)(nil),
+ }
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes[19].OneofWrappers = []interface{}{
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index)(nil),
+ (*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDesc,
+ NumEnums: 5,
+ NumMessages: 21,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_depIdxs,
+ EnumInfos: file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_enumTypes,
+ MessageInfos: file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto = out.File
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_rawDesc = nil
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_goTypes = nil
+ file_envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go
new file mode 100644
index 000000000..094e7faaf
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.pb.validate.go
@@ -0,0 +1,4812 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
+
+package http_connection_managerv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on HttpConnectionManager with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HttpConnectionManager) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpConnectionManager with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// HttpConnectionManagerMultiError, or nil if none found.
+func (m *HttpConnectionManager) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpConnectionManager) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := HttpConnectionManager_CodecType_name[int32(m.GetCodecType())]; !ok {
+ err := HttpConnectionManagerValidationError{
+ field: "CodecType",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if utf8.RuneCountInString(m.GetStatPrefix()) < 1 {
+ err := HttpConnectionManagerValidationError{
+ field: "StatPrefix",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetHttpFilters() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("HttpFilters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("HttpFilters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("HttpFilters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetAddUserAgent()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "AddUserAgent",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "AddUserAgent",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAddUserAgent()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "AddUserAgent",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetTracing()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "Tracing",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "Tracing",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTracing()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "Tracing",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCommonHttpProtocolOptions()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "CommonHttpProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "CommonHttpProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCommonHttpProtocolOptions()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "CommonHttpProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Http1SafeMaxConnectionDuration
+
+ if all {
+ switch v := interface{}(m.GetHttpProtocolOptions()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "HttpProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "HttpProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetHttpProtocolOptions()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "HttpProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetHttp2ProtocolOptions()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "Http2ProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "Http2ProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetHttp2ProtocolOptions()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "Http2ProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetHttp3ProtocolOptions()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "Http3ProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "Http3ProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetHttp3ProtocolOptions()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "Http3ProtocolOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if !_HttpConnectionManager_ServerName_Pattern.MatchString(m.GetServerName()) {
+ err := HttpConnectionManagerValidationError{
+ field: "ServerName",
+ reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := HttpConnectionManager_ServerHeaderTransformation_name[int32(m.GetServerHeaderTransformation())]; !ok {
+ err := HttpConnectionManagerValidationError{
+ field: "ServerHeaderTransformation",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSchemeHeaderTransformation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "SchemeHeaderTransformation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "SchemeHeaderTransformation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSchemeHeaderTransformation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "SchemeHeaderTransformation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if wrapper := m.GetMaxRequestHeadersKb(); wrapper != nil {
+
+ if val := wrapper.GetValue(); val <= 0 || val > 8192 {
+ err := HttpConnectionManagerValidationError{
+ field: "MaxRequestHeadersKb",
+ reason: "value must be inside range (0, 8192]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetStreamIdleTimeout()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "StreamIdleTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "StreamIdleTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStreamIdleTimeout()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "StreamIdleTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetRequestTimeout()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "RequestTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "RequestTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequestTimeout()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "RequestTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if d := m.GetRequestHeadersTimeout(); d != nil {
+ dur, err := d.AsDuration(), d.CheckValid()
+ if err != nil {
+ err = HttpConnectionManagerValidationError{
+ field: "RequestHeadersTimeout",
+ reason: "value is not a valid duration",
+ cause: err,
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ } else {
+
+ gte := time.Duration(0*time.Second + 0*time.Nanosecond)
+
+ if dur < gte {
+ err := HttpConnectionManagerValidationError{
+ field: "RequestHeadersTimeout",
+ reason: "value must be greater than or equal to 0s",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetDrainTimeout()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "DrainTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "DrainTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDrainTimeout()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "DrainTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetDelayedCloseTimeout()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "DelayedCloseTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "DelayedCloseTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDelayedCloseTimeout()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "DelayedCloseTimeout",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetAccessLog() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("AccessLog[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("AccessLog[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("AccessLog[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if d := m.GetAccessLogFlushInterval(); d != nil {
+ dur, err := d.AsDuration(), d.CheckValid()
+ if err != nil {
+ err = HttpConnectionManagerValidationError{
+ field: "AccessLogFlushInterval",
+ reason: "value is not a valid duration",
+ cause: err,
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ } else {
+
+ gte := time.Duration(0*time.Second + 1000000*time.Nanosecond)
+
+ if dur < gte {
+ err := HttpConnectionManagerValidationError{
+ field: "AccessLogFlushInterval",
+ reason: "value must be greater than or equal to 1ms",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+ }
+
+ // no validation rules for FlushAccessLogOnNewRequest
+
+ if all {
+ switch v := interface{}(m.GetAccessLogOptions()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "AccessLogOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "AccessLogOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAccessLogOptions()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "AccessLogOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetUseRemoteAddress()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "UseRemoteAddress",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "UseRemoteAddress",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetUseRemoteAddress()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "UseRemoteAddress",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for XffNumTrustedHops
+
+ for idx, item := range m.GetOriginalIpDetectionExtensions() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("OriginalIpDetectionExtensions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("OriginalIpDetectionExtensions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("OriginalIpDetectionExtensions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetEarlyHeaderMutationExtensions() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("EarlyHeaderMutationExtensions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("EarlyHeaderMutationExtensions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("EarlyHeaderMutationExtensions[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetInternalAddressConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "InternalAddressConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "InternalAddressConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetInternalAddressConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "InternalAddressConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for SkipXffAppend
+
+ if !_HttpConnectionManager_Via_Pattern.MatchString(m.GetVia()) {
+ err := HttpConnectionManagerValidationError{
+ field: "Via",
+ reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetGenerateRequestId()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "GenerateRequestId",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "GenerateRequestId",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetGenerateRequestId()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "GenerateRequestId",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for PreserveExternalRequestId
+
+ // no validation rules for AlwaysSetRequestIdInResponse
+
+ if _, ok := HttpConnectionManager_ForwardClientCertDetails_name[int32(m.GetForwardClientCertDetails())]; !ok {
+ err := HttpConnectionManagerValidationError{
+ field: "ForwardClientCertDetails",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSetCurrentClientCertDetails()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "SetCurrentClientCertDetails",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "SetCurrentClientCertDetails",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSetCurrentClientCertDetails()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "SetCurrentClientCertDetails",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Proxy_100Continue
+
+ // no validation rules for RepresentIpv4RemoteAddressAsIpv4MappedIpv6
+
+ for idx, item := range m.GetUpgradeConfigs() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("UpgradeConfigs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("UpgradeConfigs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: fmt.Sprintf("UpgradeConfigs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetNormalizePath()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "NormalizePath",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "NormalizePath",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNormalizePath()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "NormalizePath",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for MergeSlashes
+
+ // no validation rules for PathWithEscapedSlashesAction
+
+ if all {
+ switch v := interface{}(m.GetRequestIdExtension()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "RequestIdExtension",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "RequestIdExtension",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequestIdExtension()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "RequestIdExtension",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetLocalReplyConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "LocalReplyConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "LocalReplyConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLocalReplyConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "LocalReplyConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for StripMatchingHostPort
+
+ if all {
+ switch v := interface{}(m.GetStreamErrorOnInvalidHttpMessage()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "StreamErrorOnInvalidHttpMessage",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "StreamErrorOnInvalidHttpMessage",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStreamErrorOnInvalidHttpMessage()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "StreamErrorOnInvalidHttpMessage",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetPathNormalizationOptions()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "PathNormalizationOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "PathNormalizationOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPathNormalizationOptions()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "PathNormalizationOptions",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for StripTrailingHostDot
+
+ if all {
+ switch v := interface{}(m.GetProxyStatusConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "ProxyStatusConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "ProxyStatusConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetProxyStatusConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "ProxyStatusConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetTypedHeaderValidationConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "TypedHeaderValidationConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "TypedHeaderValidationConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTypedHeaderValidationConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "TypedHeaderValidationConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for AppendXForwardedPort
+
+ // no validation rules for AppendLocalOverload
+
+ if all {
+ switch v := interface{}(m.GetAddProxyProtocolConnectionState()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "AddProxyProtocolConnectionState",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "AddProxyProtocolConnectionState",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAddProxyProtocolConnectionState()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "AddProxyProtocolConnectionState",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ oneofRouteSpecifierPresent := false
+ switch v := m.RouteSpecifier.(type) {
+ case *HttpConnectionManager_Rds:
+ if v == nil {
+ err := HttpConnectionManagerValidationError{
+ field: "RouteSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofRouteSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetRds()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "Rds",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "Rds",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRds()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "Rds",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *HttpConnectionManager_RouteConfig:
+ if v == nil {
+ err := HttpConnectionManagerValidationError{
+ field: "RouteSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofRouteSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetRouteConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "RouteConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "RouteConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "RouteConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *HttpConnectionManager_ScopedRoutes:
+ if v == nil {
+ err := HttpConnectionManagerValidationError{
+ field: "RouteSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofRouteSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetScopedRoutes()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "ScopedRoutes",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManagerValidationError{
+ field: "ScopedRoutes",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetScopedRoutes()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManagerValidationError{
+ field: "ScopedRoutes",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofRouteSpecifierPresent {
+ err := HttpConnectionManagerValidationError{
+ field: "RouteSpecifier",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ switch v := m.StripPortMode.(type) {
+ case *HttpConnectionManager_StripAnyHostPort:
+ if v == nil {
+ err := HttpConnectionManagerValidationError{
+ field: "StripPortMode",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for StripAnyHostPort
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return HttpConnectionManagerMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpConnectionManagerMultiError is an error wrapping multiple validation
+// errors returned by HttpConnectionManager.ValidateAll() if the designated
+// constraints aren't met.
+type HttpConnectionManagerMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpConnectionManagerMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpConnectionManagerMultiError) AllErrors() []error { return m }
+
+// HttpConnectionManagerValidationError is the validation error returned by
+// HttpConnectionManager.Validate if the designated constraints aren't met.
+type HttpConnectionManagerValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpConnectionManagerValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpConnectionManagerValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpConnectionManagerValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpConnectionManagerValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpConnectionManagerValidationError) ErrorName() string {
+ return "HttpConnectionManagerValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpConnectionManagerValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpConnectionManager.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpConnectionManagerValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpConnectionManagerValidationError{}
+
+var _HttpConnectionManager_ServerName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
+
+var _HttpConnectionManager_Via_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
+
+// Validate checks the field values on LocalReplyConfig with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *LocalReplyConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LocalReplyConfig with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// LocalReplyConfigMultiError, or nil if none found.
+func (m *LocalReplyConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LocalReplyConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetMappers() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LocalReplyConfigValidationError{
+ field: fmt.Sprintf("Mappers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LocalReplyConfigValidationError{
+ field: fmt.Sprintf("Mappers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LocalReplyConfigValidationError{
+ field: fmt.Sprintf("Mappers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetBodyFormat()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LocalReplyConfigValidationError{
+ field: "BodyFormat",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LocalReplyConfigValidationError{
+ field: "BodyFormat",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetBodyFormat()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LocalReplyConfigValidationError{
+ field: "BodyFormat",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return LocalReplyConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// LocalReplyConfigMultiError is an error wrapping multiple validation errors
+// returned by LocalReplyConfig.ValidateAll() if the designated constraints
+// aren't met.
+type LocalReplyConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LocalReplyConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LocalReplyConfigMultiError) AllErrors() []error { return m }
+
+// LocalReplyConfigValidationError is the validation error returned by
+// LocalReplyConfig.Validate if the designated constraints aren't met.
+type LocalReplyConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LocalReplyConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LocalReplyConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LocalReplyConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LocalReplyConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LocalReplyConfigValidationError) ErrorName() string { return "LocalReplyConfigValidationError" }
+
+// Error satisfies the builtin error interface
+func (e LocalReplyConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sLocalReplyConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LocalReplyConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LocalReplyConfigValidationError{}
+
+// Validate checks the field values on ResponseMapper with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ResponseMapper) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ResponseMapper with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ResponseMapperMultiError,
+// or nil if none found.
+func (m *ResponseMapper) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ResponseMapper) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetFilter() == nil {
+ err := ResponseMapperValidationError{
+ field: "Filter",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetFilter()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResponseMapperValidationError{
+ field: "Filter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResponseMapperValidationError{
+ field: "Filter",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetFilter()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResponseMapperValidationError{
+ field: "Filter",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if wrapper := m.GetStatusCode(); wrapper != nil {
+
+ if val := wrapper.GetValue(); val < 200 || val >= 600 {
+ err := ResponseMapperValidationError{
+ field: "StatusCode",
+ reason: "value must be inside range [200, 600)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetBody()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResponseMapperValidationError{
+ field: "Body",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResponseMapperValidationError{
+ field: "Body",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetBody()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResponseMapperValidationError{
+ field: "Body",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetBodyFormatOverride()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResponseMapperValidationError{
+ field: "BodyFormatOverride",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResponseMapperValidationError{
+ field: "BodyFormatOverride",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetBodyFormatOverride()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResponseMapperValidationError{
+ field: "BodyFormatOverride",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetHeadersToAdd()) > 1000 {
+ err := ResponseMapperValidationError{
+ field: "HeadersToAdd",
+ reason: "value must contain no more than 1000 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetHeadersToAdd() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResponseMapperValidationError{
+ field: fmt.Sprintf("HeadersToAdd[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResponseMapperValidationError{
+ field: fmt.Sprintf("HeadersToAdd[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResponseMapperValidationError{
+ field: fmt.Sprintf("HeadersToAdd[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ResponseMapperMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResponseMapperMultiError is an error wrapping multiple validation errors
+// returned by ResponseMapper.ValidateAll() if the designated constraints
+// aren't met.
+type ResponseMapperMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResponseMapperMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResponseMapperMultiError) AllErrors() []error { return m }
+
+// ResponseMapperValidationError is the validation error returned by
+// ResponseMapper.Validate if the designated constraints aren't met.
+type ResponseMapperValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResponseMapperValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResponseMapperValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResponseMapperValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResponseMapperValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResponseMapperValidationError) ErrorName() string { return "ResponseMapperValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResponseMapperValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResponseMapper.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResponseMapperValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResponseMapperValidationError{}
+
+// Validate checks the field values on Rds with the rules defined in the proto
+// definition for this message. If any rules are violated, the first error
+// encountered is returned, or nil if there are no violations.
+func (m *Rds) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Rds with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in RdsMultiError, or nil if none found.
+func (m *Rds) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Rds) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetConfigSource() == nil {
+ err := RdsValidationError{
+ field: "ConfigSource",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetConfigSource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RdsValidationError{
+ field: "ConfigSource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RdsValidationError{
+ field: "ConfigSource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConfigSource()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RdsValidationError{
+ field: "ConfigSource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for RouteConfigName
+
+ if len(errors) > 0 {
+ return RdsMultiError(errors)
+ }
+
+ return nil
+}
+
+// RdsMultiError is an error wrapping multiple validation errors returned by
+// Rds.ValidateAll() if the designated constraints aren't met.
+type RdsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RdsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RdsMultiError) AllErrors() []error { return m }
+
+// RdsValidationError is the validation error returned by Rds.Validate if the
+// designated constraints aren't met.
+type RdsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RdsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RdsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RdsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RdsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RdsValidationError) ErrorName() string { return "RdsValidationError" }
+
+// Error satisfies the builtin error interface
+func (e RdsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRds.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RdsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RdsValidationError{}
+
+// Validate checks the field values on ScopedRouteConfigurationsList with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ScopedRouteConfigurationsList) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ScopedRouteConfigurationsList with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// ScopedRouteConfigurationsListMultiError, or nil if none found.
+func (m *ScopedRouteConfigurationsList) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ScopedRouteConfigurationsList) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetScopedRouteConfigurations()) < 1 {
+ err := ScopedRouteConfigurationsListValidationError{
+ field: "ScopedRouteConfigurations",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetScopedRouteConfigurations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ScopedRouteConfigurationsListValidationError{
+ field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ScopedRouteConfigurationsListValidationError{
+ field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ScopedRouteConfigurationsListValidationError{
+ field: fmt.Sprintf("ScopedRouteConfigurations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ScopedRouteConfigurationsListMultiError(errors)
+ }
+
+ return nil
+}
+
+// ScopedRouteConfigurationsListMultiError is an error wrapping multiple
+// validation errors returned by ScopedRouteConfigurationsList.ValidateAll()
+// if the designated constraints aren't met.
+type ScopedRouteConfigurationsListMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ScopedRouteConfigurationsListMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ScopedRouteConfigurationsListMultiError) AllErrors() []error { return m }
+
+// ScopedRouteConfigurationsListValidationError is the validation error
+// returned by ScopedRouteConfigurationsList.Validate if the designated
+// constraints aren't met.
+type ScopedRouteConfigurationsListValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ScopedRouteConfigurationsListValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ScopedRouteConfigurationsListValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ScopedRouteConfigurationsListValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ScopedRouteConfigurationsListValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ScopedRouteConfigurationsListValidationError) ErrorName() string {
+ return "ScopedRouteConfigurationsListValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ScopedRouteConfigurationsListValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sScopedRouteConfigurationsList.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ScopedRouteConfigurationsListValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ScopedRouteConfigurationsListValidationError{}
+
+// Validate checks the field values on ScopedRoutes with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ScopedRoutes) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ScopedRoutes with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ScopedRoutesMultiError, or
+// nil if none found.
+func (m *ScopedRoutes) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ScopedRoutes) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := ScopedRoutesValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetScopeKeyBuilder() == nil {
+ err := ScopedRoutesValidationError{
+ field: "ScopeKeyBuilder",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetScopeKeyBuilder()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ScopedRoutesValidationError{
+ field: "ScopeKeyBuilder",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ScopedRoutesValidationError{
+ field: "ScopeKeyBuilder",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetScopeKeyBuilder()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ScopedRoutesValidationError{
+ field: "ScopeKeyBuilder",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetRdsConfigSource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ScopedRoutesValidationError{
+ field: "RdsConfigSource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ScopedRoutesValidationError{
+ field: "RdsConfigSource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRdsConfigSource()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ScopedRoutesValidationError{
+ field: "RdsConfigSource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ oneofConfigSpecifierPresent := false
+ switch v := m.ConfigSpecifier.(type) {
+ case *ScopedRoutes_ScopedRouteConfigurationsList:
+ if v == nil {
+ err := ScopedRoutesValidationError{
+ field: "ConfigSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofConfigSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetScopedRouteConfigurationsList()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ScopedRoutesValidationError{
+ field: "ScopedRouteConfigurationsList",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ScopedRoutesValidationError{
+ field: "ScopedRouteConfigurationsList",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetScopedRouteConfigurationsList()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ScopedRoutesValidationError{
+ field: "ScopedRouteConfigurationsList",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ScopedRoutes_ScopedRds:
+ if v == nil {
+ err := ScopedRoutesValidationError{
+ field: "ConfigSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofConfigSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetScopedRds()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ScopedRoutesValidationError{
+ field: "ScopedRds",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ScopedRoutesValidationError{
+ field: "ScopedRds",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetScopedRds()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ScopedRoutesValidationError{
+ field: "ScopedRds",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofConfigSpecifierPresent {
+ err := ScopedRoutesValidationError{
+ field: "ConfigSpecifier",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ScopedRoutesMultiError(errors)
+ }
+
+ return nil
+}
+
+// ScopedRoutesMultiError is an error wrapping multiple validation errors
+// returned by ScopedRoutes.ValidateAll() if the designated constraints aren't met.
+type ScopedRoutesMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ScopedRoutesMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ScopedRoutesMultiError) AllErrors() []error { return m }
+
+// ScopedRoutesValidationError is the validation error returned by
+// ScopedRoutes.Validate if the designated constraints aren't met.
+type ScopedRoutesValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ScopedRoutesValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ScopedRoutesValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ScopedRoutesValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ScopedRoutesValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ScopedRoutesValidationError) ErrorName() string { return "ScopedRoutesValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ScopedRoutesValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sScopedRoutes.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ScopedRoutesValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ScopedRoutesValidationError{}
+
+// Validate checks the field values on ScopedRds with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ScopedRds) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ScopedRds with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ScopedRdsMultiError, or nil
+// if none found.
+func (m *ScopedRds) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ScopedRds) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetScopedRdsConfigSource() == nil {
+ err := ScopedRdsValidationError{
+ field: "ScopedRdsConfigSource",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetScopedRdsConfigSource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ScopedRdsValidationError{
+ field: "ScopedRdsConfigSource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ScopedRdsValidationError{
+ field: "ScopedRdsConfigSource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetScopedRdsConfigSource()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ScopedRdsValidationError{
+ field: "ScopedRdsConfigSource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for SrdsResourcesLocator
+
+ if len(errors) > 0 {
+ return ScopedRdsMultiError(errors)
+ }
+
+ return nil
+}
+
+// ScopedRdsMultiError is an error wrapping multiple validation errors returned
+// by ScopedRds.ValidateAll() if the designated constraints aren't met.
+type ScopedRdsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ScopedRdsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ScopedRdsMultiError) AllErrors() []error { return m }
+
+// ScopedRdsValidationError is the validation error returned by
+// ScopedRds.Validate if the designated constraints aren't met.
+type ScopedRdsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ScopedRdsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ScopedRdsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ScopedRdsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ScopedRdsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ScopedRdsValidationError) ErrorName() string { return "ScopedRdsValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ScopedRdsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sScopedRds.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ScopedRdsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ScopedRdsValidationError{}
+
+// Validate checks the field values on HttpFilter with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *HttpFilter) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpFilter with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in HttpFilterMultiError, or
+// nil if none found.
+func (m *HttpFilter) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpFilter) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := HttpFilterValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for IsOptional
+
+ // no validation rules for Disabled
+
+ switch v := m.ConfigType.(type) {
+ case *HttpFilter_TypedConfig:
+ if v == nil {
+ err := HttpFilterValidationError{
+ field: "ConfigType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetTypedConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpFilterValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpFilterValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpFilterValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *HttpFilter_ConfigDiscovery:
+ if v == nil {
+ err := HttpFilterValidationError{
+ field: "ConfigType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetConfigDiscovery()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpFilterValidationError{
+ field: "ConfigDiscovery",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpFilterValidationError{
+ field: "ConfigDiscovery",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConfigDiscovery()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpFilterValidationError{
+ field: "ConfigDiscovery",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return HttpFilterMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpFilterMultiError is an error wrapping multiple validation errors
+// returned by HttpFilter.ValidateAll() if the designated constraints aren't met.
+type HttpFilterMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpFilterMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpFilterMultiError) AllErrors() []error { return m }
+
+// HttpFilterValidationError is the validation error returned by
+// HttpFilter.Validate if the designated constraints aren't met.
+type HttpFilterValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpFilterValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpFilterValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpFilterValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpFilterValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpFilterValidationError) ErrorName() string { return "HttpFilterValidationError" }
+
+// Error satisfies the builtin error interface
+func (e HttpFilterValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpFilter.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpFilterValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpFilterValidationError{}
+
+// Validate checks the field values on RequestIDExtension with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *RequestIDExtension) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RequestIDExtension with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// RequestIDExtensionMultiError, or nil if none found.
+func (m *RequestIDExtension) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RequestIDExtension) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetTypedConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RequestIDExtensionValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RequestIDExtensionValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RequestIDExtensionValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return RequestIDExtensionMultiError(errors)
+ }
+
+ return nil
+}
+
+// RequestIDExtensionMultiError is an error wrapping multiple validation errors
+// returned by RequestIDExtension.ValidateAll() if the designated constraints
+// aren't met.
+type RequestIDExtensionMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RequestIDExtensionMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RequestIDExtensionMultiError) AllErrors() []error { return m }
+
+// RequestIDExtensionValidationError is the validation error returned by
+// RequestIDExtension.Validate if the designated constraints aren't met.
+type RequestIDExtensionValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RequestIDExtensionValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RequestIDExtensionValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RequestIDExtensionValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RequestIDExtensionValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RequestIDExtensionValidationError) ErrorName() string {
+ return "RequestIDExtensionValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e RequestIDExtensionValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRequestIDExtension.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RequestIDExtensionValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RequestIDExtensionValidationError{}
+
+// Validate checks the field values on EnvoyMobileHttpConnectionManager with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *EnvoyMobileHttpConnectionManager) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on EnvoyMobileHttpConnectionManager with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// EnvoyMobileHttpConnectionManagerMultiError, or nil if none found.
+func (m *EnvoyMobileHttpConnectionManager) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *EnvoyMobileHttpConnectionManager) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, EnvoyMobileHttpConnectionManagerValidationError{
+ field: "Config",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, EnvoyMobileHttpConnectionManagerValidationError{
+ field: "Config",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return EnvoyMobileHttpConnectionManagerValidationError{
+ field: "Config",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return EnvoyMobileHttpConnectionManagerMultiError(errors)
+ }
+
+ return nil
+}
+
+// EnvoyMobileHttpConnectionManagerMultiError is an error wrapping multiple
+// validation errors returned by
+// EnvoyMobileHttpConnectionManager.ValidateAll() if the designated
+// constraints aren't met.
+type EnvoyMobileHttpConnectionManagerMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m EnvoyMobileHttpConnectionManagerMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m EnvoyMobileHttpConnectionManagerMultiError) AllErrors() []error { return m }
+
+// EnvoyMobileHttpConnectionManagerValidationError is the validation error
+// returned by EnvoyMobileHttpConnectionManager.Validate if the designated
+// constraints aren't met.
+type EnvoyMobileHttpConnectionManagerValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e EnvoyMobileHttpConnectionManagerValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e EnvoyMobileHttpConnectionManagerValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e EnvoyMobileHttpConnectionManagerValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e EnvoyMobileHttpConnectionManagerValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e EnvoyMobileHttpConnectionManagerValidationError) ErrorName() string {
+ return "EnvoyMobileHttpConnectionManagerValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e EnvoyMobileHttpConnectionManagerValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sEnvoyMobileHttpConnectionManager.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = EnvoyMobileHttpConnectionManagerValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = EnvoyMobileHttpConnectionManagerValidationError{}
+
+// Validate checks the field values on HttpConnectionManager_Tracing with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HttpConnectionManager_Tracing) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpConnectionManager_Tracing with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// HttpConnectionManager_TracingMultiError, or nil if none found.
+func (m *HttpConnectionManager_Tracing) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpConnectionManager_Tracing) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetClientSampling()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "ClientSampling",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "ClientSampling",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetClientSampling()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_TracingValidationError{
+ field: "ClientSampling",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetRandomSampling()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "RandomSampling",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "RandomSampling",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRandomSampling()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_TracingValidationError{
+ field: "RandomSampling",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOverallSampling()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "OverallSampling",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "OverallSampling",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOverallSampling()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_TracingValidationError{
+ field: "OverallSampling",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Verbose
+
+ if all {
+ switch v := interface{}(m.GetMaxPathTagLength()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "MaxPathTagLength",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "MaxPathTagLength",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMaxPathTagLength()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_TracingValidationError{
+ field: "MaxPathTagLength",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetCustomTags() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: fmt.Sprintf("CustomTags[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: fmt.Sprintf("CustomTags[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_TracingValidationError{
+ field: fmt.Sprintf("CustomTags[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetProvider()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "Provider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "Provider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetProvider()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_TracingValidationError{
+ field: "Provider",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetSpawnUpstreamSpan()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "SpawnUpstreamSpan",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_TracingValidationError{
+ field: "SpawnUpstreamSpan",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSpawnUpstreamSpan()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_TracingValidationError{
+ field: "SpawnUpstreamSpan",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return HttpConnectionManager_TracingMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpConnectionManager_TracingMultiError is an error wrapping multiple
+// validation errors returned by HttpConnectionManager_Tracing.ValidateAll()
+// if the designated constraints aren't met.
+type HttpConnectionManager_TracingMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpConnectionManager_TracingMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpConnectionManager_TracingMultiError) AllErrors() []error { return m }
+
+// HttpConnectionManager_TracingValidationError is the validation error
+// returned by HttpConnectionManager_Tracing.Validate if the designated
+// constraints aren't met.
+type HttpConnectionManager_TracingValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpConnectionManager_TracingValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpConnectionManager_TracingValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpConnectionManager_TracingValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpConnectionManager_TracingValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpConnectionManager_TracingValidationError) ErrorName() string {
+ return "HttpConnectionManager_TracingValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpConnectionManager_TracingValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpConnectionManager_Tracing.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpConnectionManager_TracingValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpConnectionManager_TracingValidationError{}
+
+// Validate checks the field values on
+// HttpConnectionManager_InternalAddressConfig with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *HttpConnectionManager_InternalAddressConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// HttpConnectionManager_InternalAddressConfig with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// HttpConnectionManager_InternalAddressConfigMultiError, or nil if none found.
+func (m *HttpConnectionManager_InternalAddressConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpConnectionManager_InternalAddressConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for UnixSockets
+
+ for idx, item := range m.GetCidrRanges() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_InternalAddressConfigValidationError{
+ field: fmt.Sprintf("CidrRanges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_InternalAddressConfigValidationError{
+ field: fmt.Sprintf("CidrRanges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_InternalAddressConfigValidationError{
+ field: fmt.Sprintf("CidrRanges[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return HttpConnectionManager_InternalAddressConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpConnectionManager_InternalAddressConfigMultiError is an error wrapping
+// multiple validation errors returned by
+// HttpConnectionManager_InternalAddressConfig.ValidateAll() if the designated
+// constraints aren't met.
+type HttpConnectionManager_InternalAddressConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpConnectionManager_InternalAddressConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpConnectionManager_InternalAddressConfigMultiError) AllErrors() []error { return m }
+
+// HttpConnectionManager_InternalAddressConfigValidationError is the validation
+// error returned by HttpConnectionManager_InternalAddressConfig.Validate if
+// the designated constraints aren't met.
+type HttpConnectionManager_InternalAddressConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpConnectionManager_InternalAddressConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpConnectionManager_InternalAddressConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpConnectionManager_InternalAddressConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpConnectionManager_InternalAddressConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpConnectionManager_InternalAddressConfigValidationError) ErrorName() string {
+ return "HttpConnectionManager_InternalAddressConfigValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpConnectionManager_InternalAddressConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpConnectionManager_InternalAddressConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpConnectionManager_InternalAddressConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpConnectionManager_InternalAddressConfigValidationError{}
+
+// Validate checks the field values on
+// HttpConnectionManager_SetCurrentClientCertDetails with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *HttpConnectionManager_SetCurrentClientCertDetails) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// HttpConnectionManager_SetCurrentClientCertDetails with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in
+// HttpConnectionManager_SetCurrentClientCertDetailsMultiError, or nil if none found.
+func (m *HttpConnectionManager_SetCurrentClientCertDetails) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpConnectionManager_SetCurrentClientCertDetails) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetSubject()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_SetCurrentClientCertDetailsValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_SetCurrentClientCertDetailsValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSubject()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_SetCurrentClientCertDetailsValidationError{
+ field: "Subject",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Cert
+
+ // no validation rules for Chain
+
+ // no validation rules for Dns
+
+ // no validation rules for Uri
+
+ if len(errors) > 0 {
+ return HttpConnectionManager_SetCurrentClientCertDetailsMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpConnectionManager_SetCurrentClientCertDetailsMultiError is an error
+// wrapping multiple validation errors returned by
+// HttpConnectionManager_SetCurrentClientCertDetails.ValidateAll() if the
+// designated constraints aren't met.
+type HttpConnectionManager_SetCurrentClientCertDetailsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpConnectionManager_SetCurrentClientCertDetailsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpConnectionManager_SetCurrentClientCertDetailsMultiError) AllErrors() []error { return m }
+
+// HttpConnectionManager_SetCurrentClientCertDetailsValidationError is the
+// validation error returned by
+// HttpConnectionManager_SetCurrentClientCertDetails.Validate if the
+// designated constraints aren't met.
+type HttpConnectionManager_SetCurrentClientCertDetailsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Cause() error {
+ return e.cause
+}
+
+// Key function returns key value.
+func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) ErrorName() string {
+ return "HttpConnectionManager_SetCurrentClientCertDetailsValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpConnectionManager_SetCurrentClientCertDetailsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpConnectionManager_SetCurrentClientCertDetails.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpConnectionManager_SetCurrentClientCertDetailsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpConnectionManager_SetCurrentClientCertDetailsValidationError{}
+
+// Validate checks the field values on HttpConnectionManager_UpgradeConfig with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *HttpConnectionManager_UpgradeConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpConnectionManager_UpgradeConfig
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// HttpConnectionManager_UpgradeConfigMultiError, or nil if none found.
+func (m *HttpConnectionManager_UpgradeConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpConnectionManager_UpgradeConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for UpgradeType
+
+ for idx, item := range m.GetFilters() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{
+ field: fmt.Sprintf("Filters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{
+ field: fmt.Sprintf("Filters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_UpgradeConfigValidationError{
+ field: fmt.Sprintf("Filters[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetEnabled()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{
+ field: "Enabled",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_UpgradeConfigValidationError{
+ field: "Enabled",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEnabled()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_UpgradeConfigValidationError{
+ field: "Enabled",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return HttpConnectionManager_UpgradeConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpConnectionManager_UpgradeConfigMultiError is an error wrapping multiple
+// validation errors returned by
+// HttpConnectionManager_UpgradeConfig.ValidateAll() if the designated
+// constraints aren't met.
+type HttpConnectionManager_UpgradeConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpConnectionManager_UpgradeConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpConnectionManager_UpgradeConfigMultiError) AllErrors() []error { return m }
+
+// HttpConnectionManager_UpgradeConfigValidationError is the validation error
+// returned by HttpConnectionManager_UpgradeConfig.Validate if the designated
+// constraints aren't met.
+type HttpConnectionManager_UpgradeConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpConnectionManager_UpgradeConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpConnectionManager_UpgradeConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpConnectionManager_UpgradeConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpConnectionManager_UpgradeConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpConnectionManager_UpgradeConfigValidationError) ErrorName() string {
+ return "HttpConnectionManager_UpgradeConfigValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpConnectionManager_UpgradeConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpConnectionManager_UpgradeConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpConnectionManager_UpgradeConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpConnectionManager_UpgradeConfigValidationError{}
+
+// Validate checks the field values on
+// HttpConnectionManager_PathNormalizationOptions with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *HttpConnectionManager_PathNormalizationOptions) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// HttpConnectionManager_PathNormalizationOptions with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in
+// HttpConnectionManager_PathNormalizationOptionsMultiError, or nil if none found.
+func (m *HttpConnectionManager_PathNormalizationOptions) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpConnectionManager_PathNormalizationOptions) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetForwardingTransformation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_PathNormalizationOptionsValidationError{
+ field: "ForwardingTransformation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_PathNormalizationOptionsValidationError{
+ field: "ForwardingTransformation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetForwardingTransformation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_PathNormalizationOptionsValidationError{
+ field: "ForwardingTransformation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetHttpFilterTransformation()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HttpConnectionManager_PathNormalizationOptionsValidationError{
+ field: "HttpFilterTransformation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HttpConnectionManager_PathNormalizationOptionsValidationError{
+ field: "HttpFilterTransformation",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetHttpFilterTransformation()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HttpConnectionManager_PathNormalizationOptionsValidationError{
+ field: "HttpFilterTransformation",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return HttpConnectionManager_PathNormalizationOptionsMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpConnectionManager_PathNormalizationOptionsMultiError is an error
+// wrapping multiple validation errors returned by
+// HttpConnectionManager_PathNormalizationOptions.ValidateAll() if the
+// designated constraints aren't met.
+type HttpConnectionManager_PathNormalizationOptionsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpConnectionManager_PathNormalizationOptionsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpConnectionManager_PathNormalizationOptionsMultiError) AllErrors() []error { return m }
+
+// HttpConnectionManager_PathNormalizationOptionsValidationError is the
+// validation error returned by
+// HttpConnectionManager_PathNormalizationOptions.Validate if the designated
+// constraints aren't met.
+type HttpConnectionManager_PathNormalizationOptionsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpConnectionManager_PathNormalizationOptionsValidationError) ErrorName() string {
+ return "HttpConnectionManager_PathNormalizationOptionsValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpConnectionManager_PathNormalizationOptionsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpConnectionManager_PathNormalizationOptions.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpConnectionManager_PathNormalizationOptionsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpConnectionManager_PathNormalizationOptionsValidationError{}
+
+// Validate checks the field values on HttpConnectionManager_ProxyStatusConfig
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *HttpConnectionManager_ProxyStatusConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// HttpConnectionManager_ProxyStatusConfig with the rules defined in the proto
+// definition for this message. If any rules are violated, the result is a
+// list of violation errors wrapped in
+// HttpConnectionManager_ProxyStatusConfigMultiError, or nil if none found.
+func (m *HttpConnectionManager_ProxyStatusConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpConnectionManager_ProxyStatusConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for RemoveDetails
+
+ // no validation rules for RemoveConnectionTerminationDetails
+
+ // no validation rules for RemoveResponseFlags
+
+ // no validation rules for SetRecommendedResponseCode
+
+ switch v := m.ProxyName.(type) {
+ case *HttpConnectionManager_ProxyStatusConfig_UseNodeId:
+ if v == nil {
+ err := HttpConnectionManager_ProxyStatusConfigValidationError{
+ field: "ProxyName",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for UseNodeId
+ case *HttpConnectionManager_ProxyStatusConfig_LiteralProxyName:
+ if v == nil {
+ err := HttpConnectionManager_ProxyStatusConfigValidationError{
+ field: "ProxyName",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for LiteralProxyName
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return HttpConnectionManager_ProxyStatusConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpConnectionManager_ProxyStatusConfigMultiError is an error wrapping
+// multiple validation errors returned by
+// HttpConnectionManager_ProxyStatusConfig.ValidateAll() if the designated
+// constraints aren't met.
+type HttpConnectionManager_ProxyStatusConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpConnectionManager_ProxyStatusConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpConnectionManager_ProxyStatusConfigMultiError) AllErrors() []error { return m }
+
+// HttpConnectionManager_ProxyStatusConfigValidationError is the validation
+// error returned by HttpConnectionManager_ProxyStatusConfig.Validate if the
+// designated constraints aren't met.
+type HttpConnectionManager_ProxyStatusConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpConnectionManager_ProxyStatusConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpConnectionManager_ProxyStatusConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpConnectionManager_ProxyStatusConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpConnectionManager_ProxyStatusConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpConnectionManager_ProxyStatusConfigValidationError) ErrorName() string {
+ return "HttpConnectionManager_ProxyStatusConfigValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpConnectionManager_ProxyStatusConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpConnectionManager_ProxyStatusConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpConnectionManager_ProxyStatusConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpConnectionManager_ProxyStatusConfigValidationError{}
+
+// Validate checks the field values on
+// HttpConnectionManager_HcmAccessLogOptions with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *HttpConnectionManager_HcmAccessLogOptions) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// HttpConnectionManager_HcmAccessLogOptions with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// HttpConnectionManager_HcmAccessLogOptionsMultiError, or nil if none found.
+func (m *HttpConnectionManager_HcmAccessLogOptions) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpConnectionManager_HcmAccessLogOptions) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if d := m.GetAccessLogFlushInterval(); d != nil {
+ dur, err := d.AsDuration(), d.CheckValid()
+ if err != nil {
+ err = HttpConnectionManager_HcmAccessLogOptionsValidationError{
+ field: "AccessLogFlushInterval",
+ reason: "value is not a valid duration",
+ cause: err,
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ } else {
+
+ gte := time.Duration(0*time.Second + 1000000*time.Nanosecond)
+
+ if dur < gte {
+ err := HttpConnectionManager_HcmAccessLogOptionsValidationError{
+ field: "AccessLogFlushInterval",
+ reason: "value must be greater than or equal to 1ms",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+ }
+
+ // no validation rules for FlushAccessLogOnNewRequest
+
+ // no validation rules for FlushLogOnTunnelSuccessfullyEstablished
+
+ if len(errors) > 0 {
+ return HttpConnectionManager_HcmAccessLogOptionsMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpConnectionManager_HcmAccessLogOptionsMultiError is an error wrapping
+// multiple validation errors returned by
+// HttpConnectionManager_HcmAccessLogOptions.ValidateAll() if the designated
+// constraints aren't met.
+type HttpConnectionManager_HcmAccessLogOptionsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpConnectionManager_HcmAccessLogOptionsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpConnectionManager_HcmAccessLogOptionsMultiError) AllErrors() []error { return m }
+
+// HttpConnectionManager_HcmAccessLogOptionsValidationError is the validation
+// error returned by HttpConnectionManager_HcmAccessLogOptions.Validate if the
+// designated constraints aren't met.
+type HttpConnectionManager_HcmAccessLogOptionsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpConnectionManager_HcmAccessLogOptionsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpConnectionManager_HcmAccessLogOptionsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpConnectionManager_HcmAccessLogOptionsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpConnectionManager_HcmAccessLogOptionsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpConnectionManager_HcmAccessLogOptionsValidationError) ErrorName() string {
+ return "HttpConnectionManager_HcmAccessLogOptionsValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpConnectionManager_HcmAccessLogOptionsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpConnectionManager_HcmAccessLogOptions.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpConnectionManager_HcmAccessLogOptionsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpConnectionManager_HcmAccessLogOptionsValidationError{}
+
+// Validate checks the field values on ScopedRoutes_ScopeKeyBuilder with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ScopedRoutes_ScopeKeyBuilder) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ScopedRoutes_ScopeKeyBuilder with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ScopedRoutes_ScopeKeyBuilderMultiError, or nil if none found.
+func (m *ScopedRoutes_ScopeKeyBuilder) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetFragments()) < 1 {
+ err := ScopedRoutes_ScopeKeyBuilderValidationError{
+ field: "Fragments",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetFragments() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ScopedRoutes_ScopeKeyBuilderValidationError{
+ field: fmt.Sprintf("Fragments[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ScopedRoutes_ScopeKeyBuilderValidationError{
+ field: fmt.Sprintf("Fragments[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ScopedRoutes_ScopeKeyBuilderValidationError{
+ field: fmt.Sprintf("Fragments[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ScopedRoutes_ScopeKeyBuilderMultiError(errors)
+ }
+
+ return nil
+}
+
+// ScopedRoutes_ScopeKeyBuilderMultiError is an error wrapping multiple
+// validation errors returned by ScopedRoutes_ScopeKeyBuilder.ValidateAll() if
+// the designated constraints aren't met.
+type ScopedRoutes_ScopeKeyBuilderMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ScopedRoutes_ScopeKeyBuilderMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ScopedRoutes_ScopeKeyBuilderMultiError) AllErrors() []error { return m }
+
+// ScopedRoutes_ScopeKeyBuilderValidationError is the validation error returned
+// by ScopedRoutes_ScopeKeyBuilder.Validate if the designated constraints
+// aren't met.
+type ScopedRoutes_ScopeKeyBuilderValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ScopedRoutes_ScopeKeyBuilderValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ScopedRoutes_ScopeKeyBuilderValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ScopedRoutes_ScopeKeyBuilderValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ScopedRoutes_ScopeKeyBuilderValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ScopedRoutes_ScopeKeyBuilderValidationError) ErrorName() string {
+ return "ScopedRoutes_ScopeKeyBuilderValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ScopedRoutes_ScopeKeyBuilderValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sScopedRoutes_ScopeKeyBuilder.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ScopedRoutes_ScopeKeyBuilderValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ScopedRoutes_ScopeKeyBuilderValidationError{}
+
+// Validate checks the field values on
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError, or nil if none found.
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofTypePresent := false
+ switch v := m.Type.(type) {
+ case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_:
+ if v == nil {
+ err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetHeaderValueExtractor()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{
+ field: "HeaderValueExtractor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{
+ field: "HeaderValueExtractor",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetHeaderValueExtractor()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{
+ field: "HeaderValueExtractor",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofTypePresent {
+ err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{
+ field: "Type",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError(errors)
+ }
+
+ return nil
+}
+
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError is an error wrapping
+// multiple validation errors returned by
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.ValidateAll() if the
+// designated constraints aren't met.
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilderMultiError) AllErrors() []error { return m }
+
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError is the
+// validation error returned by
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder.Validate if the designated
+// constraints aren't met.
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) ErrorName() string {
+ return "ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sScopedRoutes_ScopeKeyBuilder_FragmentBuilder.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ScopedRoutes_ScopeKeyBuilder_FragmentBuilderValidationError{}
+
+// Validate checks the field values on
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError,
+// or nil if none found.
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Name_Pattern.MatchString(m.GetName()) {
+ err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{
+ field: "Name",
+ reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for ElementSeparator
+
+ switch v := m.ExtractType.(type) {
+ case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index:
+ if v == nil {
+ err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{
+ field: "ExtractType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for Index
+ case *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element:
+ if v == nil {
+ err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{
+ field: "ExtractType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetElement()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{
+ field: "Element",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{
+ field: "Element",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetElement()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{
+ field: "Element",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError(errors)
+ }
+
+ return nil
+}
+
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError
+// is an error wrapping multiple validation errors returned by
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.ValidateAll()
+// if the designated constraints aren't met.
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorMultiError) AllErrors() []error {
+ return m
+}
+
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError
+// is the validation error returned by
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.Validate
+// if the designated constraints aren't met.
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Cause() error {
+ return e.cause
+}
+
+// Key function returns key value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Key() bool {
+ return e.key
+}
+
+// ErrorName returns error name.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) ErrorName() string {
+ return "ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractorValidationError{}
+
+var _ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
+
+// Validate checks the field values on
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError,
+// or nil if none found.
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetSeparator()) < 1 {
+ err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{
+ field: "Separator",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if utf8.RuneCountInString(m.GetKey()) < 1 {
+ err := ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{
+ field: "Key",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError(errors)
+ }
+
+ return nil
+}
+
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError
+// is an error wrapping multiple validation errors returned by
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.ValidateAll()
+// if the designated constraints aren't met.
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementMultiError) AllErrors() []error {
+ return m
+}
+
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError
+// is the validation error returned by
+// ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.Validate
+// if the designated constraints aren't met.
+type ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Cause() error {
+ return e.cause
+}
+
+// Key function returns key value.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Key() bool {
+ return e.key
+}
+
+// ErrorName returns error name.
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) ErrorName() string {
+ return "ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElementValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager_vtproto.pb.go
new file mode 100644
index 000000000..3ecbe1295
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager_vtproto.pb.go
@@ -0,0 +1,3470 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
+
+package http_connection_managerv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ anypb "github.com/planetscale/vtprotobuf/types/known/anypb"
+ durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
+ wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *HttpConnectionManager_Tracing) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpConnectionManager_Tracing) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_Tracing) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.SpawnUpstreamSpan != nil {
+ size, err := (*wrapperspb.BoolValue)(m.SpawnUpstreamSpan).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x52
+ }
+ if m.Provider != nil {
+ if vtmsg, ok := interface{}(m.Provider).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Provider)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x4a
+ }
+ if len(m.CustomTags) > 0 {
+ for iNdEx := len(m.CustomTags) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.CustomTags[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.CustomTags[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x42
+ }
+ }
+ if m.MaxPathTagLength != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.MaxPathTagLength).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.Verbose {
+ i--
+ if m.Verbose {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x30
+ }
+ if m.OverallSampling != nil {
+ if vtmsg, ok := interface{}(m.OverallSampling).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.OverallSampling)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.RandomSampling != nil {
+ if vtmsg, ok := interface{}(m.RandomSampling).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.RandomSampling)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.ClientSampling != nil {
+ if vtmsg, ok := interface{}(m.ClientSampling).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ClientSampling)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpConnectionManager_InternalAddressConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpConnectionManager_InternalAddressConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_InternalAddressConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.CidrRanges) > 0 {
+ for iNdEx := len(m.CidrRanges) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.CidrRanges[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.CidrRanges[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.UnixSockets {
+ i--
+ if m.UnixSockets {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpConnectionManager_SetCurrentClientCertDetails) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpConnectionManager_SetCurrentClientCertDetails) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_SetCurrentClientCertDetails) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Chain {
+ i--
+ if m.Chain {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x30
+ }
+ if m.Uri {
+ i--
+ if m.Uri {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ }
+ if m.Dns {
+ i--
+ if m.Dns {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if m.Cert {
+ i--
+ if m.Cert {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.Subject != nil {
+ size, err := (*wrapperspb.BoolValue)(m.Subject).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpConnectionManager_UpgradeConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpConnectionManager_UpgradeConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_UpgradeConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Enabled != nil {
+ size, err := (*wrapperspb.BoolValue)(m.Enabled).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Filters) > 0 {
+ for iNdEx := len(m.Filters) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Filters[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.UpgradeType) > 0 {
+ i -= len(m.UpgradeType)
+ copy(dAtA[i:], m.UpgradeType)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.UpgradeType)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpConnectionManager_PathNormalizationOptions) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpConnectionManager_PathNormalizationOptions) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_PathNormalizationOptions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.HttpFilterTransformation != nil {
+ if vtmsg, ok := interface{}(m.HttpFilterTransformation).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.HttpFilterTransformation)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.ForwardingTransformation != nil {
+ if vtmsg, ok := interface{}(m.ForwardingTransformation).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ForwardingTransformation)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpConnectionManager_ProxyStatusConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpConnectionManager_ProxyStatusConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_ProxyStatusConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.ProxyName.(*HttpConnectionManager_ProxyStatusConfig_LiteralProxyName); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.ProxyName.(*HttpConnectionManager_ProxyStatusConfig_UseNodeId); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.SetRecommendedResponseCode {
+ i--
+ if m.SetRecommendedResponseCode {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if m.RemoveResponseFlags {
+ i--
+ if m.RemoveResponseFlags {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.RemoveConnectionTerminationDetails {
+ i--
+ if m.RemoveConnectionTerminationDetails {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.RemoveDetails {
+ i--
+ if m.RemoveDetails {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpConnectionManager_ProxyStatusConfig_UseNodeId) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_ProxyStatusConfig_UseNodeId) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.UseNodeId {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ return len(dAtA) - i, nil
+}
+func (m *HttpConnectionManager_ProxyStatusConfig_LiteralProxyName) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_ProxyStatusConfig_LiteralProxyName) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.LiteralProxyName)
+ copy(dAtA[i:], m.LiteralProxyName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LiteralProxyName)))
+ i--
+ dAtA[i] = 0x32
+ return len(dAtA) - i, nil
+}
+func (m *HttpConnectionManager_HcmAccessLogOptions) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpConnectionManager_HcmAccessLogOptions) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_HcmAccessLogOptions) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.FlushLogOnTunnelSuccessfullyEstablished {
+ i--
+ if m.FlushLogOnTunnelSuccessfullyEstablished {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.FlushAccessLogOnNewRequest {
+ i--
+ if m.FlushAccessLogOnNewRequest {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.AccessLogFlushInterval != nil {
+ size, err := (*durationpb.Duration)(m.AccessLogFlushInterval).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpConnectionManager) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpConnectionManager) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Http1SafeMaxConnectionDuration {
+ i--
+ if m.Http1SafeMaxConnectionDuration {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0xd0
+ }
+ if m.AppendLocalOverload {
+ i--
+ if m.AppendLocalOverload {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0xc8
+ }
+ if m.AccessLogOptions != nil {
+ size, err := m.AccessLogOptions.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0xc2
+ }
+ if m.FlushAccessLogOnNewRequest {
+ i--
+ if m.FlushAccessLogOnNewRequest {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0xb8
+ }
+ if m.AccessLogFlushInterval != nil {
+ size, err := (*durationpb.Duration)(m.AccessLogFlushInterval).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0xb2
+ }
+ if m.AddProxyProtocolConnectionState != nil {
+ size, err := (*wrapperspb.BoolValue)(m.AddProxyProtocolConnectionState).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0xaa
+ }
+ if len(m.EarlyHeaderMutationExtensions) > 0 {
+ for iNdEx := len(m.EarlyHeaderMutationExtensions) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.EarlyHeaderMutationExtensions[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.EarlyHeaderMutationExtensions[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0xa2
+ }
+ }
+ if m.AppendXForwardedPort {
+ i--
+ if m.AppendXForwardedPort {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0x98
+ }
+ if m.TypedHeaderValidationConfig != nil {
+ if vtmsg, ok := interface{}(m.TypedHeaderValidationConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.TypedHeaderValidationConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0x92
+ }
+ if m.ProxyStatusConfig != nil {
+ size, err := m.ProxyStatusConfig.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0x8a
+ }
+ if m.SchemeHeaderTransformation != nil {
+ if vtmsg, ok := interface{}(m.SchemeHeaderTransformation).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.SchemeHeaderTransformation)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x3
+ i--
+ dAtA[i] = 0x82
+ }
+ if m.StripTrailingHostDot {
+ i--
+ if m.StripTrailingHostDot {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xf8
+ }
+ if len(m.OriginalIpDetectionExtensions) > 0 {
+ for iNdEx := len(m.OriginalIpDetectionExtensions) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.OriginalIpDetectionExtensions[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.OriginalIpDetectionExtensions[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xf2
+ }
+ }
+ if m.PathWithEscapedSlashesAction != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.PathWithEscapedSlashesAction))
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xe8
+ }
+ if m.Http3ProtocolOptions != nil {
+ if vtmsg, ok := interface{}(m.Http3ProtocolOptions).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Http3ProtocolOptions)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xe2
+ }
+ if m.PathNormalizationOptions != nil {
+ size, err := m.PathNormalizationOptions.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xda
+ }
+ if msg, ok := m.StripPortMode.(*HttpConnectionManager_StripAnyHostPort); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.RequestHeadersTimeout != nil {
+ size, err := (*durationpb.Duration)(m.RequestHeadersTimeout).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xca
+ }
+ if m.StreamErrorOnInvalidHttpMessage != nil {
+ size, err := (*wrapperspb.BoolValue)(m.StreamErrorOnInvalidHttpMessage).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xc2
+ }
+ if m.StripMatchingHostPort {
+ i--
+ if m.StripMatchingHostPort {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xb8
+ }
+ if m.LocalReplyConfig != nil {
+ size, err := m.LocalReplyConfig.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xb2
+ }
+ if m.AlwaysSetRequestIdInResponse {
+ i--
+ if m.AlwaysSetRequestIdInResponse {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xa8
+ }
+ if m.RequestIdExtension != nil {
+ size, err := m.RequestIdExtension.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xa2
+ }
+ if m.CommonHttpProtocolOptions != nil {
+ if vtmsg, ok := interface{}(m.CommonHttpProtocolOptions).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.CommonHttpProtocolOptions)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0x9a
+ }
+ if m.ServerHeaderTransformation != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ServerHeaderTransformation))
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0x90
+ }
+ if m.MergeSlashes {
+ i--
+ if m.MergeSlashes {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0x88
+ }
+ if m.PreserveExternalRequestId {
+ i--
+ if m.PreserveExternalRequestId {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0x80
+ }
+ if msg, ok := m.RouteSpecifier.(*HttpConnectionManager_ScopedRoutes); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.NormalizePath != nil {
+ size, err := (*wrapperspb.BoolValue)(m.NormalizePath).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xf2
+ }
+ if m.MaxRequestHeadersKb != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.MaxRequestHeadersKb).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xea
+ }
+ if m.RequestTimeout != nil {
+ size, err := (*durationpb.Duration)(m.RequestTimeout).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xe2
+ }
+ if m.DelayedCloseTimeout != nil {
+ size, err := (*durationpb.Duration)(m.DelayedCloseTimeout).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xd2
+ }
+ if m.InternalAddressConfig != nil {
+ size, err := m.InternalAddressConfig.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xca
+ }
+ if m.StreamIdleTimeout != nil {
+ size, err := (*durationpb.Duration)(m.StreamIdleTimeout).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xc2
+ }
+ if len(m.UpgradeConfigs) > 0 {
+ for iNdEx := len(m.UpgradeConfigs) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.UpgradeConfigs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xba
+ }
+ }
+ if len(m.Via) > 0 {
+ i -= len(m.Via)
+ copy(dAtA[i:], m.Via)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Via)))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xb2
+ }
+ if m.SkipXffAppend {
+ i--
+ if m.SkipXffAppend {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xa8
+ }
+ if m.RepresentIpv4RemoteAddressAsIpv4MappedIpv6 {
+ i--
+ if m.RepresentIpv4RemoteAddressAsIpv4MappedIpv6 {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xa0
+ }
+ if m.XffNumTrustedHops != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.XffNumTrustedHops))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x98
+ }
+ if m.Proxy_100Continue {
+ i--
+ if m.Proxy_100Continue {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x90
+ }
+ if m.SetCurrentClientCertDetails != nil {
+ size, err := m.SetCurrentClientCertDetails.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x8a
+ }
+ if m.ForwardClientCertDetails != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ForwardClientCertDetails))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x80
+ }
+ if m.GenerateRequestId != nil {
+ size, err := (*wrapperspb.BoolValue)(m.GenerateRequestId).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x7a
+ }
+ if m.UseRemoteAddress != nil {
+ size, err := (*wrapperspb.BoolValue)(m.UseRemoteAddress).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x72
+ }
+ if len(m.AccessLog) > 0 {
+ for iNdEx := len(m.AccessLog) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.AccessLog[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.AccessLog[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x6a
+ }
+ }
+ if m.DrainTimeout != nil {
+ size, err := (*durationpb.Duration)(m.DrainTimeout).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x62
+ }
+ if len(m.ServerName) > 0 {
+ i -= len(m.ServerName)
+ copy(dAtA[i:], m.ServerName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ServerName)))
+ i--
+ dAtA[i] = 0x52
+ }
+ if m.Http2ProtocolOptions != nil {
+ if vtmsg, ok := interface{}(m.Http2ProtocolOptions).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Http2ProtocolOptions)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x4a
+ }
+ if m.HttpProtocolOptions != nil {
+ if vtmsg, ok := interface{}(m.HttpProtocolOptions).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.HttpProtocolOptions)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x42
+ }
+ if m.Tracing != nil {
+ size, err := m.Tracing.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.AddUserAgent != nil {
+ size, err := (*wrapperspb.BoolValue)(m.AddUserAgent).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.HttpFilters) > 0 {
+ for iNdEx := len(m.HttpFilters) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.HttpFilters[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ }
+ if msg, ok := m.RouteSpecifier.(*HttpConnectionManager_RouteConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.RouteSpecifier.(*HttpConnectionManager_Rds); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.StatPrefix) > 0 {
+ i -= len(m.StatPrefix)
+ copy(dAtA[i:], m.StatPrefix)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StatPrefix)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.CodecType != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.CodecType))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpConnectionManager_Rds) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_Rds) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Rds != nil {
+ size, err := m.Rds.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *HttpConnectionManager_RouteConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_RouteConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RouteConfig != nil {
+ if vtmsg, ok := interface{}(m.RouteConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.RouteConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *HttpConnectionManager_ScopedRoutes) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_ScopedRoutes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ScopedRoutes != nil {
+ size, err := m.ScopedRoutes.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xfa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0xfa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *HttpConnectionManager_StripAnyHostPort) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpConnectionManager_StripAnyHostPort) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.StripAnyHostPort {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x2
+ i--
+ dAtA[i] = 0xd0
+ return len(dAtA) - i, nil
+}
+func (m *LocalReplyConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalReplyConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *LocalReplyConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.BodyFormat != nil {
+ if vtmsg, ok := interface{}(m.BodyFormat).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.BodyFormat)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Mappers) > 0 {
+ for iNdEx := len(m.Mappers) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Mappers[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ResponseMapper) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResponseMapper) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ResponseMapper) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.HeadersToAdd) > 0 {
+ for iNdEx := len(m.HeadersToAdd) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.HeadersToAdd[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.HeadersToAdd[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ }
+ if m.BodyFormatOverride != nil {
+ if vtmsg, ok := interface{}(m.BodyFormatOverride).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.BodyFormatOverride)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Body != nil {
+ if vtmsg, ok := interface{}(m.Body).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Body)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.StatusCode != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.StatusCode).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Filter != nil {
+ if vtmsg, ok := interface{}(m.Filter).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Filter)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Rds) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Rds) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Rds) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.RouteConfigName) > 0 {
+ i -= len(m.RouteConfigName)
+ copy(dAtA[i:], m.RouteConfigName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RouteConfigName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.ConfigSource != nil {
+ if vtmsg, ok := interface{}(m.ConfigSource).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ConfigSource)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ScopedRouteConfigurationsList) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScopedRouteConfigurationsList) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRouteConfigurationsList) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ScopedRouteConfigurations) > 0 {
+ for iNdEx := len(m.ScopedRouteConfigurations) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.ScopedRouteConfigurations[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ScopedRouteConfigurations[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Key) > 0 {
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Separator) > 0 {
+ i -= len(m.Separator)
+ copy(dAtA[i:], m.Separator)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Separator)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.ExtractType.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.ExtractType.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.ElementSeparator) > 0 {
+ i -= len(m.ElementSeparator)
+ copy(dAtA[i:], m.ElementSeparator)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ElementSeparator)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Index))
+ i--
+ dAtA[i] = 0x18
+ return len(dAtA) - i, nil
+}
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Element != nil {
+ size, err := m.Element.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Type.(*ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.HeaderValueExtractor != nil {
+ size, err := m.HeaderValueExtractor.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ScopedRoutes_ScopeKeyBuilder) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Fragments) > 0 {
+ for iNdEx := len(m.Fragments) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Fragments[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ScopedRoutes) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScopedRoutes) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.ConfigSpecifier.(*ScopedRoutes_ScopedRds); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.ConfigSpecifier.(*ScopedRoutes_ScopedRouteConfigurationsList); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.RdsConfigSource != nil {
+ if vtmsg, ok := interface{}(m.RdsConfigSource).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.RdsConfigSource)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.ScopeKeyBuilder != nil {
+ size, err := m.ScopeKeyBuilder.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ScopedRoutes_ScopedRouteConfigurationsList) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes_ScopedRouteConfigurationsList) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ScopedRouteConfigurationsList != nil {
+ size, err := m.ScopedRouteConfigurationsList.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ScopedRoutes_ScopedRds) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRoutes_ScopedRds) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ScopedRds != nil {
+ size, err := m.ScopedRds.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x2a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ScopedRds) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ScopedRds) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ScopedRds) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.SrdsResourcesLocator) > 0 {
+ i -= len(m.SrdsResourcesLocator)
+ copy(dAtA[i:], m.SrdsResourcesLocator)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SrdsResourcesLocator)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.ScopedRdsConfigSource != nil {
+ if vtmsg, ok := interface{}(m.ScopedRdsConfigSource).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ScopedRdsConfigSource)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpFilter) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpFilter) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpFilter) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Disabled {
+ i--
+ if m.Disabled {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x38
+ }
+ if m.IsOptional {
+ i--
+ if m.IsOptional {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x30
+ }
+ if msg, ok := m.ConfigType.(*HttpFilter_ConfigDiscovery); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.ConfigType.(*HttpFilter_TypedConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpFilter_TypedConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpFilter_TypedConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.TypedConfig != nil {
+ size, err := (*anypb.Any)(m.TypedConfig).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *HttpFilter_ConfigDiscovery) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpFilter_ConfigDiscovery) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ConfigDiscovery != nil {
+ if vtmsg, ok := interface{}(m.ConfigDiscovery).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ConfigDiscovery)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x2a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x2a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *RequestIDExtension) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RequestIDExtension) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RequestIDExtension) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.TypedConfig != nil {
+ size, err := (*anypb.Any)(m.TypedConfig).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *EnvoyMobileHttpConnectionManager) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *EnvoyMobileHttpConnectionManager) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *EnvoyMobileHttpConnectionManager) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Config != nil {
+ size, err := m.Config.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpConnectionManager_Tracing) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ClientSampling != nil {
+ if size, ok := interface{}(m.ClientSampling).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ClientSampling)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.RandomSampling != nil {
+ if size, ok := interface{}(m.RandomSampling).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.RandomSampling)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OverallSampling != nil {
+ if size, ok := interface{}(m.OverallSampling).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.OverallSampling)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Verbose {
+ n += 2
+ }
+ if m.MaxPathTagLength != nil {
+ l = (*wrapperspb.UInt32Value)(m.MaxPathTagLength).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.CustomTags) > 0 {
+ for _, e := range m.CustomTags {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.Provider != nil {
+ if size, ok := interface{}(m.Provider).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Provider)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.SpawnUpstreamSpan != nil {
+ l = (*wrapperspb.BoolValue)(m.SpawnUpstreamSpan).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpConnectionManager_InternalAddressConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.UnixSockets {
+ n += 2
+ }
+ if len(m.CidrRanges) > 0 {
+ for _, e := range m.CidrRanges {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpConnectionManager_SetCurrentClientCertDetails) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Subject != nil {
+ l = (*wrapperspb.BoolValue)(m.Subject).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Cert {
+ n += 2
+ }
+ if m.Dns {
+ n += 2
+ }
+ if m.Uri {
+ n += 2
+ }
+ if m.Chain {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpConnectionManager_UpgradeConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.UpgradeType)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Filters) > 0 {
+ for _, e := range m.Filters {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.Enabled != nil {
+ l = (*wrapperspb.BoolValue)(m.Enabled).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpConnectionManager_PathNormalizationOptions) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ForwardingTransformation != nil {
+ if size, ok := interface{}(m.ForwardingTransformation).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ForwardingTransformation)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.HttpFilterTransformation != nil {
+ if size, ok := interface{}(m.HttpFilterTransformation).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.HttpFilterTransformation)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpConnectionManager_ProxyStatusConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RemoveDetails {
+ n += 2
+ }
+ if m.RemoveConnectionTerminationDetails {
+ n += 2
+ }
+ if m.RemoveResponseFlags {
+ n += 2
+ }
+ if m.SetRecommendedResponseCode {
+ n += 2
+ }
+ if vtmsg, ok := m.ProxyName.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpConnectionManager_ProxyStatusConfig_UseNodeId) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *HttpConnectionManager_ProxyStatusConfig_LiteralProxyName) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.LiteralProxyName)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *HttpConnectionManager_HcmAccessLogOptions) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.AccessLogFlushInterval != nil {
+ l = (*durationpb.Duration)(m.AccessLogFlushInterval).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.FlushAccessLogOnNewRequest {
+ n += 2
+ }
+ if m.FlushLogOnTunnelSuccessfullyEstablished {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpConnectionManager) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CodecType != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.CodecType))
+ }
+ l = len(m.StatPrefix)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.RouteSpecifier.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if len(m.HttpFilters) > 0 {
+ for _, e := range m.HttpFilters {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.AddUserAgent != nil {
+ l = (*wrapperspb.BoolValue)(m.AddUserAgent).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Tracing != nil {
+ l = m.Tracing.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.HttpProtocolOptions != nil {
+ if size, ok := interface{}(m.HttpProtocolOptions).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.HttpProtocolOptions)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Http2ProtocolOptions != nil {
+ if size, ok := interface{}(m.Http2ProtocolOptions).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Http2ProtocolOptions)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ServerName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.DrainTimeout != nil {
+ l = (*durationpb.Duration)(m.DrainTimeout).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.AccessLog) > 0 {
+ for _, e := range m.AccessLog {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.UseRemoteAddress != nil {
+ l = (*wrapperspb.BoolValue)(m.UseRemoteAddress).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.GenerateRequestId != nil {
+ l = (*wrapperspb.BoolValue)(m.GenerateRequestId).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ForwardClientCertDetails != 0 {
+ n += 2 + protohelpers.SizeOfVarint(uint64(m.ForwardClientCertDetails))
+ }
+ if m.SetCurrentClientCertDetails != nil {
+ l = m.SetCurrentClientCertDetails.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Proxy_100Continue {
+ n += 3
+ }
+ if m.XffNumTrustedHops != 0 {
+ n += 2 + protohelpers.SizeOfVarint(uint64(m.XffNumTrustedHops))
+ }
+ if m.RepresentIpv4RemoteAddressAsIpv4MappedIpv6 {
+ n += 3
+ }
+ if m.SkipXffAppend {
+ n += 3
+ }
+ l = len(m.Via)
+ if l > 0 {
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.UpgradeConfigs) > 0 {
+ for _, e := range m.UpgradeConfigs {
+ l = e.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.StreamIdleTimeout != nil {
+ l = (*durationpb.Duration)(m.StreamIdleTimeout).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.InternalAddressConfig != nil {
+ l = m.InternalAddressConfig.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.DelayedCloseTimeout != nil {
+ l = (*durationpb.Duration)(m.DelayedCloseTimeout).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.RequestTimeout != nil {
+ l = (*durationpb.Duration)(m.RequestTimeout).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.MaxRequestHeadersKb != nil {
+ l = (*wrapperspb.UInt32Value)(m.MaxRequestHeadersKb).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.NormalizePath != nil {
+ l = (*wrapperspb.BoolValue)(m.NormalizePath).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.PreserveExternalRequestId {
+ n += 3
+ }
+ if m.MergeSlashes {
+ n += 3
+ }
+ if m.ServerHeaderTransformation != 0 {
+ n += 2 + protohelpers.SizeOfVarint(uint64(m.ServerHeaderTransformation))
+ }
+ if m.CommonHttpProtocolOptions != nil {
+ if size, ok := interface{}(m.CommonHttpProtocolOptions).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.CommonHttpProtocolOptions)
+ }
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.RequestIdExtension != nil {
+ l = m.RequestIdExtension.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.AlwaysSetRequestIdInResponse {
+ n += 3
+ }
+ if m.LocalReplyConfig != nil {
+ l = m.LocalReplyConfig.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.StripMatchingHostPort {
+ n += 3
+ }
+ if m.StreamErrorOnInvalidHttpMessage != nil {
+ l = (*wrapperspb.BoolValue)(m.StreamErrorOnInvalidHttpMessage).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.RequestHeadersTimeout != nil {
+ l = (*durationpb.Duration)(m.RequestHeadersTimeout).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.StripPortMode.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if m.PathNormalizationOptions != nil {
+ l = m.PathNormalizationOptions.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Http3ProtocolOptions != nil {
+ if size, ok := interface{}(m.Http3ProtocolOptions).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Http3ProtocolOptions)
+ }
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.PathWithEscapedSlashesAction != 0 {
+ n += 2 + protohelpers.SizeOfVarint(uint64(m.PathWithEscapedSlashesAction))
+ }
+ if len(m.OriginalIpDetectionExtensions) > 0 {
+ for _, e := range m.OriginalIpDetectionExtensions {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.StripTrailingHostDot {
+ n += 3
+ }
+ if m.SchemeHeaderTransformation != nil {
+ if size, ok := interface{}(m.SchemeHeaderTransformation).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.SchemeHeaderTransformation)
+ }
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ProxyStatusConfig != nil {
+ l = m.ProxyStatusConfig.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.TypedHeaderValidationConfig != nil {
+ if size, ok := interface{}(m.TypedHeaderValidationConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.TypedHeaderValidationConfig)
+ }
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.AppendXForwardedPort {
+ n += 3
+ }
+ if len(m.EarlyHeaderMutationExtensions) > 0 {
+ for _, e := range m.EarlyHeaderMutationExtensions {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.AddProxyProtocolConnectionState != nil {
+ l = (*wrapperspb.BoolValue)(m.AddProxyProtocolConnectionState).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.AccessLogFlushInterval != nil {
+ l = (*durationpb.Duration)(m.AccessLogFlushInterval).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.FlushAccessLogOnNewRequest {
+ n += 3
+ }
+ if m.AccessLogOptions != nil {
+ l = m.AccessLogOptions.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.AppendLocalOverload {
+ n += 3
+ }
+ if m.Http1SafeMaxConnectionDuration {
+ n += 3
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpConnectionManager_Rds) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Rds != nil {
+ l = m.Rds.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *HttpConnectionManager_RouteConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RouteConfig != nil {
+ if size, ok := interface{}(m.RouteConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.RouteConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *HttpConnectionManager_ScopedRoutes) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ScopedRoutes != nil {
+ l = m.ScopedRoutes.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 3
+ }
+ return n
+}
+func (m *HttpConnectionManager_StripAnyHostPort) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 3
+ return n
+}
+func (m *LocalReplyConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Mappers) > 0 {
+ for _, e := range m.Mappers {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.BodyFormat != nil {
+ if size, ok := interface{}(m.BodyFormat).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.BodyFormat)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ResponseMapper) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Filter != nil {
+ if size, ok := interface{}(m.Filter).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Filter)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.StatusCode != nil {
+ l = (*wrapperspb.UInt32Value)(m.StatusCode).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Body != nil {
+ if size, ok := interface{}(m.Body).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Body)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.BodyFormatOverride != nil {
+ if size, ok := interface{}(m.BodyFormatOverride).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.BodyFormatOverride)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.HeadersToAdd) > 0 {
+ for _, e := range m.HeadersToAdd {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Rds) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ConfigSource != nil {
+ if size, ok := interface{}(m.ConfigSource).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ConfigSource)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.RouteConfigName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ScopedRouteConfigurationsList) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.ScopedRouteConfigurations) > 0 {
+ for _, e := range m.ScopedRouteConfigurations {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Separator)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Key)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ElementSeparator)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.ExtractType.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Index) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Index))
+ return n
+}
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_Element) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Element != nil {
+ l = m.Element.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.HeaderValueExtractor != nil {
+ l = m.HeaderValueExtractor.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ScopedRoutes_ScopeKeyBuilder) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Fragments) > 0 {
+ for _, e := range m.Fragments {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ScopedRoutes) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ScopeKeyBuilder != nil {
+ l = m.ScopeKeyBuilder.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.RdsConfigSource != nil {
+ if size, ok := interface{}(m.RdsConfigSource).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.RdsConfigSource)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.ConfigSpecifier.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ScopedRoutes_ScopedRouteConfigurationsList) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ScopedRouteConfigurationsList != nil {
+ l = m.ScopedRouteConfigurationsList.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ScopedRoutes_ScopedRds) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ScopedRds != nil {
+ l = m.ScopedRds.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ScopedRds) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ScopedRdsConfigSource != nil {
+ if size, ok := interface{}(m.ScopedRdsConfigSource).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ScopedRdsConfigSource)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.SrdsResourcesLocator)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpFilter) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.ConfigType.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if m.IsOptional {
+ n += 2
+ }
+ if m.Disabled {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpFilter_TypedConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.TypedConfig != nil {
+ l = (*anypb.Any)(m.TypedConfig).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *HttpFilter_ConfigDiscovery) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ConfigDiscovery != nil {
+ if size, ok := interface{}(m.ConfigDiscovery).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ConfigDiscovery)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *RequestIDExtension) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.TypedConfig != nil {
+ l = (*anypb.Any)(m.TypedConfig).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *EnvoyMobileHttpConnectionManager) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Config != nil {
+ l = m.Config.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.pb.go
new file mode 100644
index 000000000..d21286cf8
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.pb.go
@@ -0,0 +1,320 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto
+
+package client_side_weighted_round_robinv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Configuration for the client_side_weighted_round_robin LB policy.
+//
+// This policy differs from the built-in ROUND_ROBIN policy in terms of
+// how the endpoint weights are determined. In the ROUND_ROBIN policy,
+// the endpoint weights are sent by the control plane via EDS. However,
+// in this policy, the endpoint weights are instead determined via qps (queries
+// per second), eps (errors per second), and utilization metrics sent by the
+// endpoint using the Open Request Cost Aggregation (ORCA) protocol. Utilization
+// is determined by using the ORCA application_utilization field, if set, or
+// else falling back to the cpu_utilization field. All queries count toward qps,
+// regardless of result. Only failed queries count toward eps. A config
+// parameter error_utilization_penalty controls the penalty to adjust endpoint
+// weights using eps and qps. The weight of a given endpoint is computed as:
+// “qps / (utilization + eps/qps * error_utilization_penalty)“.
+//
+// See the :ref:`load balancing architecture
+// overview` for more information.
+//
+// [#next-free-field: 8]
+type ClientSideWeightedRoundRobin struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Whether to enable out-of-band utilization reporting collection from
+ // the endpoints. By default, per-request utilization reporting is used.
+ EnableOobLoadReport *wrapperspb.BoolValue `protobuf:"bytes,1,opt,name=enable_oob_load_report,json=enableOobLoadReport,proto3" json:"enable_oob_load_report,omitempty"`
+ // Load reporting interval to request from the server. Note that the
+ // server may not provide reports as frequently as the client requests.
+ // Used only when enable_oob_load_report is true. Default is 10 seconds.
+ OobReportingPeriod *durationpb.Duration `protobuf:"bytes,2,opt,name=oob_reporting_period,json=oobReportingPeriod,proto3" json:"oob_reporting_period,omitempty"`
+ // A given endpoint must report load metrics continuously for at least
+ // this long before the endpoint weight will be used. This avoids
+ // churn when the set of endpoint addresses changes. Takes effect
+ // both immediately after we establish a connection to an endpoint and
+ // after weight_expiration_period has caused us to stop using the most
+ // recent load metrics. Default is 10 seconds.
+ BlackoutPeriod *durationpb.Duration `protobuf:"bytes,3,opt,name=blackout_period,json=blackoutPeriod,proto3" json:"blackout_period,omitempty"`
+ // If a given endpoint has not reported load metrics in this long,
+ // then we stop using the reported weight. This ensures that we do
+ // not continue to use very stale weights. Once we stop using a stale
+ // value, if we later start seeing fresh reports again, the
+ // blackout_period applies. Defaults to 3 minutes.
+ WeightExpirationPeriod *durationpb.Duration `protobuf:"bytes,4,opt,name=weight_expiration_period,json=weightExpirationPeriod,proto3" json:"weight_expiration_period,omitempty"`
+ // How often endpoint weights are recalculated. Values less than 100ms are
+ // capped at 100ms. Default is 1 second.
+ WeightUpdatePeriod *durationpb.Duration `protobuf:"bytes,5,opt,name=weight_update_period,json=weightUpdatePeriod,proto3" json:"weight_update_period,omitempty"`
+ // The multiplier used to adjust endpoint weights with the error rate
+ // calculated as eps/qps. Configuration is rejected if this value is negative.
+ // Default is 1.0.
+ ErrorUtilizationPenalty *wrapperspb.FloatValue `protobuf:"bytes,6,opt,name=error_utilization_penalty,json=errorUtilizationPenalty,proto3" json:"error_utilization_penalty,omitempty"`
+ // By default, endpoint weight is computed based on the :ref:`application_utilization ` field reported by the endpoint.
+ // If that field is not set, then utilization will instead be computed by taking the max of the values of the metrics specified here.
+ // For map fields in the ORCA proto, the string will be of the form “.“. For example, the string “named_metrics.foo“ will mean to look for the key “foo“ in the ORCA :ref:`named_metrics ` field.
+ // If none of the specified metrics are present in the load report, then :ref:`cpu_utilization ` is used instead.
+ MetricNamesForComputingUtilization []string `protobuf:"bytes,7,rep,name=metric_names_for_computing_utilization,json=metricNamesForComputingUtilization,proto3" json:"metric_names_for_computing_utilization,omitempty"`
+}
+
+func (x *ClientSideWeightedRoundRobin) Reset() {
+ *x = ClientSideWeightedRoundRobin{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ClientSideWeightedRoundRobin) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClientSideWeightedRoundRobin) ProtoMessage() {}
+
+func (x *ClientSideWeightedRoundRobin) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ClientSideWeightedRoundRobin.ProtoReflect.Descriptor instead.
+func (*ClientSideWeightedRoundRobin) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ClientSideWeightedRoundRobin) GetEnableOobLoadReport() *wrapperspb.BoolValue {
+ if x != nil {
+ return x.EnableOobLoadReport
+ }
+ return nil
+}
+
+func (x *ClientSideWeightedRoundRobin) GetOobReportingPeriod() *durationpb.Duration {
+ if x != nil {
+ return x.OobReportingPeriod
+ }
+ return nil
+}
+
+func (x *ClientSideWeightedRoundRobin) GetBlackoutPeriod() *durationpb.Duration {
+ if x != nil {
+ return x.BlackoutPeriod
+ }
+ return nil
+}
+
+func (x *ClientSideWeightedRoundRobin) GetWeightExpirationPeriod() *durationpb.Duration {
+ if x != nil {
+ return x.WeightExpirationPeriod
+ }
+ return nil
+}
+
+func (x *ClientSideWeightedRoundRobin) GetWeightUpdatePeriod() *durationpb.Duration {
+ if x != nil {
+ return x.WeightUpdatePeriod
+ }
+ return nil
+}
+
+func (x *ClientSideWeightedRoundRobin) GetErrorUtilizationPenalty() *wrapperspb.FloatValue {
+ if x != nil {
+ return x.ErrorUtilizationPenalty
+ }
+ return nil
+}
+
+func (x *ClientSideWeightedRoundRobin) GetMetricNamesForComputingUtilization() []string {
+ if x != nil {
+ return x.MetricNamesForComputingUtilization
+ }
+ return nil
+}
+
+var File_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDesc = []byte{
+ 0x0a, 0x73, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e,
+ 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e,
+ 0x74, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f,
+ 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x63,
+ 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68,
+ 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x4c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c,
+ 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e,
+ 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67,
+ 0x68, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e,
+ 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x04, 0x0a, 0x1c,
+ 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x64, 0x65, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74,
+ 0x65, 0x64, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x12, 0x4f, 0x0a, 0x16,
+ 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6f, 0x6f, 0x62, 0x5f, 0x6c, 0x6f, 0x61, 0x64, 0x5f,
+ 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42,
+ 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
+ 0x4f, 0x6f, 0x62, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x4b, 0x0a,
+ 0x14, 0x6f, 0x6f, 0x62, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70,
+ 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x6f, 0x6f, 0x62, 0x52, 0x65, 0x70, 0x6f, 0x72,
+ 0x74, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x42, 0x0a, 0x0f, 0x62, 0x6c,
+ 0x61, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0e,
+ 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, 0x53,
+ 0x0a, 0x18, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x77, 0x65, 0x69,
+ 0x67, 0x68, 0x74, 0x45, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65, 0x72,
+ 0x69, 0x6f, 0x64, 0x12, 0x4b, 0x0a, 0x14, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x77, 0x65,
+ 0x69, 0x67, 0x68, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64,
+ 0x12, 0x63, 0x0a, 0x19, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x0a, 0x05, 0x2d, 0x00, 0x00, 0x00, 0x00, 0x52, 0x17, 0x65, 0x72,
+ 0x72, 0x6f, 0x72, 0x55, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x65,
+ 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x12, 0x52, 0x0a, 0x26, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74,
+ 0x69, 0x6e, 0x67, 0x5f, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x22, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4e, 0x61, 0x6d,
+ 0x65, 0x73, 0x46, 0x6f, 0x72, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x55, 0x74,
+ 0x69, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xa2, 0x02, 0xba, 0x80, 0xc8, 0xd1,
+ 0x06, 0x02, 0x10, 0x02, 0x0a, 0x5a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72,
+ 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63,
+ 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x63, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65,
+ 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2e, 0x76, 0x33,
+ 0x42, 0x21, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x69, 0x64, 0x65, 0x57, 0x65, 0x69, 0x67,
+ 0x68, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x6f, 0x62, 0x69, 0x6e, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x96, 0x01, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f,
+ 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70,
+ 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73,
+ 0x69, 0x64, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75,
+ 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64,
+ 0x5f, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x72, 0x6f, 0x62, 0x69, 0x6e, 0x76, 0x33, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDescOnce sync.Once
+ file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDescData = file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDesc
+)
+
+func file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDescData)
+ })
+ return file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDescData
+}
+
+var file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_goTypes = []interface{}{
+ (*ClientSideWeightedRoundRobin)(nil), // 0: envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin
+ (*wrapperspb.BoolValue)(nil), // 1: google.protobuf.BoolValue
+ (*durationpb.Duration)(nil), // 2: google.protobuf.Duration
+ (*wrapperspb.FloatValue)(nil), // 3: google.protobuf.FloatValue
+}
+var file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_depIdxs = []int32{
+ 1, // 0: envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin.enable_oob_load_report:type_name -> google.protobuf.BoolValue
+ 2, // 1: envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin.oob_reporting_period:type_name -> google.protobuf.Duration
+ 2, // 2: envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin.blackout_period:type_name -> google.protobuf.Duration
+ 2, // 3: envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin.weight_expiration_period:type_name -> google.protobuf.Duration
+ 2, // 4: envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin.weight_update_period:type_name -> google.protobuf.Duration
+ 3, // 5: envoy.extensions.load_balancing_policies.client_side_weighted_round_robin.v3.ClientSideWeightedRoundRobin.error_utilization_penalty:type_name -> google.protobuf.FloatValue
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() {
+ file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_init()
+}
+func file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_init() {
+ if File_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ClientSideWeightedRoundRobin); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_depIdxs,
+ MessageInfos: file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto = out.File
+ file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_rawDesc = nil
+ file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_goTypes = nil
+ file_envoy_extensions_load_balancing_policies_client_side_weighted_round_robin_v3_client_side_weighted_round_robin_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.pb.validate.go
new file mode 100644
index 000000000..0d6a6ca7e
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.pb.validate.go
@@ -0,0 +1,300 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto
+
+package client_side_weighted_round_robinv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on ClientSideWeightedRoundRobin with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ClientSideWeightedRoundRobin) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ClientSideWeightedRoundRobin with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ClientSideWeightedRoundRobinMultiError, or nil if none found.
+func (m *ClientSideWeightedRoundRobin) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ClientSideWeightedRoundRobin) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetEnableOobLoadReport()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "EnableOobLoadReport",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "EnableOobLoadReport",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEnableOobLoadReport()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientSideWeightedRoundRobinValidationError{
+ field: "EnableOobLoadReport",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOobReportingPeriod()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "OobReportingPeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "OobReportingPeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOobReportingPeriod()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientSideWeightedRoundRobinValidationError{
+ field: "OobReportingPeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetBlackoutPeriod()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "BlackoutPeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "BlackoutPeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetBlackoutPeriod()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientSideWeightedRoundRobinValidationError{
+ field: "BlackoutPeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetWeightExpirationPeriod()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "WeightExpirationPeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "WeightExpirationPeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetWeightExpirationPeriod()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientSideWeightedRoundRobinValidationError{
+ field: "WeightExpirationPeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetWeightUpdatePeriod()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "WeightUpdatePeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientSideWeightedRoundRobinValidationError{
+ field: "WeightUpdatePeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetWeightUpdatePeriod()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientSideWeightedRoundRobinValidationError{
+ field: "WeightUpdatePeriod",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if wrapper := m.GetErrorUtilizationPenalty(); wrapper != nil {
+
+ if wrapper.GetValue() < 0 {
+ err := ClientSideWeightedRoundRobinValidationError{
+ field: "ErrorUtilizationPenalty",
+ reason: "value must be greater than or equal to 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ClientSideWeightedRoundRobinMultiError(errors)
+ }
+
+ return nil
+}
+
+// ClientSideWeightedRoundRobinMultiError is an error wrapping multiple
+// validation errors returned by ClientSideWeightedRoundRobin.ValidateAll() if
+// the designated constraints aren't met.
+type ClientSideWeightedRoundRobinMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ClientSideWeightedRoundRobinMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ClientSideWeightedRoundRobinMultiError) AllErrors() []error { return m }
+
+// ClientSideWeightedRoundRobinValidationError is the validation error returned
+// by ClientSideWeightedRoundRobin.Validate if the designated constraints
+// aren't met.
+type ClientSideWeightedRoundRobinValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ClientSideWeightedRoundRobinValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ClientSideWeightedRoundRobinValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ClientSideWeightedRoundRobinValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ClientSideWeightedRoundRobinValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ClientSideWeightedRoundRobinValidationError) ErrorName() string {
+ return "ClientSideWeightedRoundRobinValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ClientSideWeightedRoundRobinValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sClientSideWeightedRoundRobin.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ClientSideWeightedRoundRobinValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ClientSideWeightedRoundRobinValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin_vtproto.pb.go
new file mode 100644
index 000000000..f7e73831a
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin_vtproto.pb.go
@@ -0,0 +1,163 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.proto
+
+package client_side_weighted_round_robinv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
+ wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *ClientSideWeightedRoundRobin) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClientSideWeightedRoundRobin) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ClientSideWeightedRoundRobin) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.MetricNamesForComputingUtilization) > 0 {
+ for iNdEx := len(m.MetricNamesForComputingUtilization) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.MetricNamesForComputingUtilization[iNdEx])
+ copy(dAtA[i:], m.MetricNamesForComputingUtilization[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.MetricNamesForComputingUtilization[iNdEx])))
+ i--
+ dAtA[i] = 0x3a
+ }
+ }
+ if m.ErrorUtilizationPenalty != nil {
+ size, err := (*wrapperspb.FloatValue)(m.ErrorUtilizationPenalty).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ }
+ if m.WeightUpdatePeriod != nil {
+ size, err := (*durationpb.Duration)(m.WeightUpdatePeriod).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.WeightExpirationPeriod != nil {
+ size, err := (*durationpb.Duration)(m.WeightExpirationPeriod).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.BlackoutPeriod != nil {
+ size, err := (*durationpb.Duration)(m.BlackoutPeriod).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.OobReportingPeriod != nil {
+ size, err := (*durationpb.Duration)(m.OobReportingPeriod).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.EnableOobLoadReport != nil {
+ size, err := (*wrapperspb.BoolValue)(m.EnableOobLoadReport).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ClientSideWeightedRoundRobin) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.EnableOobLoadReport != nil {
+ l = (*wrapperspb.BoolValue)(m.EnableOobLoadReport).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OobReportingPeriod != nil {
+ l = (*durationpb.Duration)(m.OobReportingPeriod).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.BlackoutPeriod != nil {
+ l = (*durationpb.Duration)(m.BlackoutPeriod).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.WeightExpirationPeriod != nil {
+ l = (*durationpb.Duration)(m.WeightExpirationPeriod).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.WeightUpdatePeriod != nil {
+ l = (*durationpb.Duration)(m.WeightUpdatePeriod).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ErrorUtilizationPenalty != nil {
+ l = (*wrapperspb.FloatValue)(m.ErrorUtilizationPenalty).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.MetricNamesForComputingUtilization) > 0 {
+ for _, s := range m.MetricNamesForComputingUtilization {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3/common.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3/common.pb.go
new file mode 100644
index 000000000..726732605
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3/common.pb.go
@@ -0,0 +1,617 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/load_balancing_policies/common/v3/common.proto
+
+package commonv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ v31 "github.com/envoyproxy/go-control-plane/envoy/type/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type LocalityLbConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to LocalityConfigSpecifier:
+ //
+ // *LocalityLbConfig_ZoneAwareLbConfig_
+ // *LocalityLbConfig_LocalityWeightedLbConfig_
+ LocalityConfigSpecifier isLocalityLbConfig_LocalityConfigSpecifier `protobuf_oneof:"locality_config_specifier"`
+}
+
+func (x *LocalityLbConfig) Reset() {
+ *x = LocalityLbConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocalityLbConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocalityLbConfig) ProtoMessage() {}
+
+func (x *LocalityLbConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LocalityLbConfig.ProtoReflect.Descriptor instead.
+func (*LocalityLbConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *LocalityLbConfig) GetLocalityConfigSpecifier() isLocalityLbConfig_LocalityConfigSpecifier {
+ if m != nil {
+ return m.LocalityConfigSpecifier
+ }
+ return nil
+}
+
+func (x *LocalityLbConfig) GetZoneAwareLbConfig() *LocalityLbConfig_ZoneAwareLbConfig {
+ if x, ok := x.GetLocalityConfigSpecifier().(*LocalityLbConfig_ZoneAwareLbConfig_); ok {
+ return x.ZoneAwareLbConfig
+ }
+ return nil
+}
+
+func (x *LocalityLbConfig) GetLocalityWeightedLbConfig() *LocalityLbConfig_LocalityWeightedLbConfig {
+ if x, ok := x.GetLocalityConfigSpecifier().(*LocalityLbConfig_LocalityWeightedLbConfig_); ok {
+ return x.LocalityWeightedLbConfig
+ }
+ return nil
+}
+
+type isLocalityLbConfig_LocalityConfigSpecifier interface {
+ isLocalityLbConfig_LocalityConfigSpecifier()
+}
+
+type LocalityLbConfig_ZoneAwareLbConfig_ struct {
+ // Configuration for local zone aware load balancing.
+ ZoneAwareLbConfig *LocalityLbConfig_ZoneAwareLbConfig `protobuf:"bytes,1,opt,name=zone_aware_lb_config,json=zoneAwareLbConfig,proto3,oneof"`
+}
+
+type LocalityLbConfig_LocalityWeightedLbConfig_ struct {
+ // Enable locality weighted load balancing.
+ LocalityWeightedLbConfig *LocalityLbConfig_LocalityWeightedLbConfig `protobuf:"bytes,2,opt,name=locality_weighted_lb_config,json=localityWeightedLbConfig,proto3,oneof"`
+}
+
+func (*LocalityLbConfig_ZoneAwareLbConfig_) isLocalityLbConfig_LocalityConfigSpecifier() {}
+
+func (*LocalityLbConfig_LocalityWeightedLbConfig_) isLocalityLbConfig_LocalityConfigSpecifier() {}
+
+// Configuration for :ref:`slow start mode `.
+type SlowStartConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Represents the size of slow start window.
+ // If set, the newly created host remains in slow start mode starting from its creation time
+ // for the duration of slow start window.
+ SlowStartWindow *durationpb.Duration `protobuf:"bytes,1,opt,name=slow_start_window,json=slowStartWindow,proto3" json:"slow_start_window,omitempty"`
+ // This parameter controls the speed of traffic increase over the slow start window. Defaults to 1.0,
+ // so that endpoint would get linearly increasing amount of traffic.
+ // When increasing the value for this parameter, the speed of traffic ramp-up increases non-linearly.
+ // The value of aggression parameter should be greater than 0.0.
+ // By tuning the parameter, is possible to achieve polynomial or exponential shape of ramp-up curve.
+ //
+ // During slow start window, effective weight of an endpoint would be scaled with time factor and aggression:
+ // “new_weight = weight * max(min_weight_percent, time_factor ^ (1 / aggression))“,
+ // where “time_factor=(time_since_start_seconds / slow_start_time_seconds)“.
+ //
+ // As time progresses, more and more traffic would be sent to endpoint, which is in slow start window.
+ // Once host exits slow start, time_factor and aggression no longer affect its weight.
+ Aggression *v3.RuntimeDouble `protobuf:"bytes,2,opt,name=aggression,proto3" json:"aggression,omitempty"`
+ // Configures the minimum percentage of origin weight that avoids too small new weight,
+ // which may cause endpoints in slow start mode receive no traffic in slow start window.
+ // If not specified, the default is 10%.
+ MinWeightPercent *v31.Percent `protobuf:"bytes,3,opt,name=min_weight_percent,json=minWeightPercent,proto3" json:"min_weight_percent,omitempty"`
+}
+
+func (x *SlowStartConfig) Reset() {
+ *x = SlowStartConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SlowStartConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SlowStartConfig) ProtoMessage() {}
+
+func (x *SlowStartConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SlowStartConfig.ProtoReflect.Descriptor instead.
+func (*SlowStartConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *SlowStartConfig) GetSlowStartWindow() *durationpb.Duration {
+ if x != nil {
+ return x.SlowStartWindow
+ }
+ return nil
+}
+
+func (x *SlowStartConfig) GetAggression() *v3.RuntimeDouble {
+ if x != nil {
+ return x.Aggression
+ }
+ return nil
+}
+
+func (x *SlowStartConfig) GetMinWeightPercent() *v31.Percent {
+ if x != nil {
+ return x.MinWeightPercent
+ }
+ return nil
+}
+
+// Common Configuration for all consistent hashing load balancers (MaglevLb, RingHashLb, etc.)
+type ConsistentHashingLbConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // If set to “true“, the cluster will use hostname instead of the resolved
+ // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address.
+ UseHostnameForHashing bool `protobuf:"varint,1,opt,name=use_hostname_for_hashing,json=useHostnameForHashing,proto3" json:"use_hostname_for_hashing,omitempty"`
+ // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150
+ // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster.
+ // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200.
+ // Minimum is 100.
+ //
+ // Applies to both Ring Hash and Maglev load balancers.
+ //
+ // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified
+ // “hash_balance_factor“, requests to any upstream host are capped at “hash_balance_factor/100“ times the average number of requests
+ // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing
+ // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify
+ // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the
+ // cascading overflow effect when choosing the next host in the ring/table).
+ //
+ // If weights are specified on the hosts, they are respected.
+ //
+ // This is an O(N) algorithm, unlike other load balancers. Using a lower “hash_balance_factor“ results in more hosts
+ // being probed, so use a higher value if you require better performance.
+ HashBalanceFactor *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=hash_balance_factor,json=hashBalanceFactor,proto3" json:"hash_balance_factor,omitempty"`
+}
+
+func (x *ConsistentHashingLbConfig) Reset() {
+ *x = ConsistentHashingLbConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ConsistentHashingLbConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConsistentHashingLbConfig) ProtoMessage() {}
+
+func (x *ConsistentHashingLbConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ConsistentHashingLbConfig.ProtoReflect.Descriptor instead.
+func (*ConsistentHashingLbConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ConsistentHashingLbConfig) GetUseHostnameForHashing() bool {
+ if x != nil {
+ return x.UseHostnameForHashing
+ }
+ return false
+}
+
+func (x *ConsistentHashingLbConfig) GetHashBalanceFactor() *wrapperspb.UInt32Value {
+ if x != nil {
+ return x.HashBalanceFactor
+ }
+ return nil
+}
+
+// Configuration for :ref:`zone aware routing
+// `.
+type LocalityLbConfig_ZoneAwareLbConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Configures percentage of requests that will be considered for zone aware routing
+ // if zone aware routing is configured. If not specified, the default is 100%.
+ // * :ref:`runtime values `.
+ // * :ref:`Zone aware routing support `.
+ RoutingEnabled *v31.Percent `protobuf:"bytes,1,opt,name=routing_enabled,json=routingEnabled,proto3" json:"routing_enabled,omitempty"`
+ // Configures minimum upstream cluster size required for zone aware routing
+ // If upstream cluster size is less than specified, zone aware routing is not performed
+ // even if zone aware routing is configured. If not specified, the default is 6.
+ // * :ref:`runtime values `.
+ // * :ref:`Zone aware routing support `.
+ MinClusterSize *wrapperspb.UInt64Value `protobuf:"bytes,2,opt,name=min_cluster_size,json=minClusterSize,proto3" json:"min_cluster_size,omitempty"`
+ // If set to true, Envoy will not consider any hosts when the cluster is in :ref:`panic
+ // mode`. Instead, the cluster will fail all
+ // requests as if all hosts are unhealthy. This can help avoid potentially overwhelming a
+ // failing service.
+ FailTrafficOnPanic bool `protobuf:"varint,3,opt,name=fail_traffic_on_panic,json=failTrafficOnPanic,proto3" json:"fail_traffic_on_panic,omitempty"`
+}
+
+func (x *LocalityLbConfig_ZoneAwareLbConfig) Reset() {
+ *x = LocalityLbConfig_ZoneAwareLbConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocalityLbConfig_ZoneAwareLbConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocalityLbConfig_ZoneAwareLbConfig) ProtoMessage() {}
+
+func (x *LocalityLbConfig_ZoneAwareLbConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LocalityLbConfig_ZoneAwareLbConfig.ProtoReflect.Descriptor instead.
+func (*LocalityLbConfig_ZoneAwareLbConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *LocalityLbConfig_ZoneAwareLbConfig) GetRoutingEnabled() *v31.Percent {
+ if x != nil {
+ return x.RoutingEnabled
+ }
+ return nil
+}
+
+func (x *LocalityLbConfig_ZoneAwareLbConfig) GetMinClusterSize() *wrapperspb.UInt64Value {
+ if x != nil {
+ return x.MinClusterSize
+ }
+ return nil
+}
+
+func (x *LocalityLbConfig_ZoneAwareLbConfig) GetFailTrafficOnPanic() bool {
+ if x != nil {
+ return x.FailTrafficOnPanic
+ }
+ return false
+}
+
+// Configuration for :ref:`locality weighted load balancing
+// `
+type LocalityLbConfig_LocalityWeightedLbConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *LocalityLbConfig_LocalityWeightedLbConfig) Reset() {
+ *x = LocalityLbConfig_LocalityWeightedLbConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocalityLbConfig_LocalityWeightedLbConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocalityLbConfig_LocalityWeightedLbConfig) ProtoMessage() {}
+
+func (x *LocalityLbConfig_LocalityWeightedLbConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LocalityLbConfig_LocalityWeightedLbConfig.ProtoReflect.Descriptor instead.
+func (*LocalityLbConfig_LocalityWeightedLbConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescGZIP(), []int{0, 1}
+}
+
+var File_envoy_extensions_load_balancing_policies_common_v3_common_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDesc = []byte{
+ 0x0a, 0x3f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e,
+ 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+ 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x32, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69,
+ 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79,
+ 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x04, 0x0a, 0x10,
+ 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x12, 0x89, 0x01, 0x0a, 0x14, 0x7a, 0x6f, 0x6e, 0x65, 0x5f, 0x61, 0x77, 0x61, 0x72, 0x65, 0x5f,
+ 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x56, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e,
+ 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+ 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x5a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c,
+ 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x11, 0x7a, 0x6f, 0x6e, 0x65, 0x41,
+ 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x9e, 0x01, 0x0a,
+ 0x1b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74,
+ 0x65, 0x64, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x5d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e,
+ 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79,
+ 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74,
+ 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x48, 0x00, 0x52, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69,
+ 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x1a, 0xcf, 0x01,
+ 0x0a, 0x11, 0x5a, 0x6f, 0x6e, 0x65, 0x41, 0x77, 0x61, 0x72, 0x65, 0x4c, 0x62, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x3f, 0x0a, 0x0f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x65,
+ 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72,
+ 0x63, 0x65, 0x6e, 0x74, 0x52, 0x0e, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61,
+ 0x62, 0x6c, 0x65, 0x64, 0x12, 0x46, 0x0a, 0x10, 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73,
+ 0x74, 0x65, 0x72, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0e, 0x6d, 0x69,
+ 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x31, 0x0a, 0x15,
+ 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x5f, 0x6f, 0x6e, 0x5f,
+ 0x70, 0x61, 0x6e, 0x69, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x66, 0x61, 0x69,
+ 0x6c, 0x54, 0x72, 0x61, 0x66, 0x66, 0x69, 0x63, 0x4f, 0x6e, 0x50, 0x61, 0x6e, 0x69, 0x63, 0x1a,
+ 0x1a, 0x0a, 0x18, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68,
+ 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x20, 0x0a, 0x19, 0x6c,
+ 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73,
+ 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xe3, 0x01,
+ 0x0a, 0x0f, 0x53, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x12, 0x45, 0x0a, 0x11, 0x73, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f,
+ 0x77, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
+ 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x73, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61,
+ 0x72, 0x74, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x67, 0x67, 0x72,
+ 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65,
+ 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x6f, 0x75, 0x62, 0x6c,
+ 0x65, 0x52, 0x0a, 0x61, 0x67, 0x67, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a,
+ 0x12, 0x6d, 0x69, 0x6e, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x63,
+ 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e,
+ 0x74, 0x52, 0x10, 0x6d, 0x69, 0x6e, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x50, 0x65, 0x72, 0x63,
+ 0x65, 0x6e, 0x74, 0x22, 0xab, 0x01, 0x0a, 0x19, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65,
+ 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x12, 0x37, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d,
+ 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x15, 0x75, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
+ 0x46, 0x6f, 0x72, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x55, 0x0a, 0x13, 0x68, 0x61,
+ 0x73, 0x68, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f,
+ 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x64, 0x52, 0x11,
+ 0x68, 0x61, 0x73, 0x68, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f,
+ 0x72, 0x42, 0xbd, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x40, 0x69, 0x6f,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61,
+ 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69,
+ 0x63, 0x69, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x42, 0x0b,
+ 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x62, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70,
+ 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d,
+ 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61,
+ 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x76,
+ 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescOnce sync.Once
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescData = file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDesc
+)
+
+func file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescData)
+ })
+ return file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDescData
+}
+
+var file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_envoy_extensions_load_balancing_policies_common_v3_common_proto_goTypes = []interface{}{
+ (*LocalityLbConfig)(nil), // 0: envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig
+ (*SlowStartConfig)(nil), // 1: envoy.extensions.load_balancing_policies.common.v3.SlowStartConfig
+ (*ConsistentHashingLbConfig)(nil), // 2: envoy.extensions.load_balancing_policies.common.v3.ConsistentHashingLbConfig
+ (*LocalityLbConfig_ZoneAwareLbConfig)(nil), // 3: envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.ZoneAwareLbConfig
+ (*LocalityLbConfig_LocalityWeightedLbConfig)(nil), // 4: envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.LocalityWeightedLbConfig
+ (*durationpb.Duration)(nil), // 5: google.protobuf.Duration
+ (*v3.RuntimeDouble)(nil), // 6: envoy.config.core.v3.RuntimeDouble
+ (*v31.Percent)(nil), // 7: envoy.type.v3.Percent
+ (*wrapperspb.UInt32Value)(nil), // 8: google.protobuf.UInt32Value
+ (*wrapperspb.UInt64Value)(nil), // 9: google.protobuf.UInt64Value
+}
+var file_envoy_extensions_load_balancing_policies_common_v3_common_proto_depIdxs = []int32{
+ 3, // 0: envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.zone_aware_lb_config:type_name -> envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.ZoneAwareLbConfig
+ 4, // 1: envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.locality_weighted_lb_config:type_name -> envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.LocalityWeightedLbConfig
+ 5, // 2: envoy.extensions.load_balancing_policies.common.v3.SlowStartConfig.slow_start_window:type_name -> google.protobuf.Duration
+ 6, // 3: envoy.extensions.load_balancing_policies.common.v3.SlowStartConfig.aggression:type_name -> envoy.config.core.v3.RuntimeDouble
+ 7, // 4: envoy.extensions.load_balancing_policies.common.v3.SlowStartConfig.min_weight_percent:type_name -> envoy.type.v3.Percent
+ 8, // 5: envoy.extensions.load_balancing_policies.common.v3.ConsistentHashingLbConfig.hash_balance_factor:type_name -> google.protobuf.UInt32Value
+ 7, // 6: envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.ZoneAwareLbConfig.routing_enabled:type_name -> envoy.type.v3.Percent
+ 9, // 7: envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.ZoneAwareLbConfig.min_cluster_size:type_name -> google.protobuf.UInt64Value
+ 8, // [8:8] is the sub-list for method output_type
+ 8, // [8:8] is the sub-list for method input_type
+ 8, // [8:8] is the sub-list for extension type_name
+ 8, // [8:8] is the sub-list for extension extendee
+ 0, // [0:8] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_load_balancing_policies_common_v3_common_proto_init() }
+func file_envoy_extensions_load_balancing_policies_common_v3_common_proto_init() {
+ if File_envoy_extensions_load_balancing_policies_common_v3_common_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocalityLbConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SlowStartConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConsistentHashingLbConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocalityLbConfig_ZoneAwareLbConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocalityLbConfig_LocalityWeightedLbConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*LocalityLbConfig_ZoneAwareLbConfig_)(nil),
+ (*LocalityLbConfig_LocalityWeightedLbConfig_)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_load_balancing_policies_common_v3_common_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_load_balancing_policies_common_v3_common_proto_depIdxs,
+ MessageInfos: file_envoy_extensions_load_balancing_policies_common_v3_common_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_load_balancing_policies_common_v3_common_proto = out.File
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_rawDesc = nil
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_goTypes = nil
+ file_envoy_extensions_load_balancing_policies_common_v3_common_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3/common.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3/common.pb.validate.go
new file mode 100644
index 000000000..2aa2f26da
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3/common.pb.validate.go
@@ -0,0 +1,814 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/common/v3/common.proto
+
+package commonv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on LocalityLbConfig with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *LocalityLbConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LocalityLbConfig with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// LocalityLbConfigMultiError, or nil if none found.
+func (m *LocalityLbConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LocalityLbConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofLocalityConfigSpecifierPresent := false
+ switch v := m.LocalityConfigSpecifier.(type) {
+ case *LocalityLbConfig_ZoneAwareLbConfig_:
+ if v == nil {
+ err := LocalityLbConfigValidationError{
+ field: "LocalityConfigSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofLocalityConfigSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetZoneAwareLbConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LocalityLbConfigValidationError{
+ field: "ZoneAwareLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LocalityLbConfigValidationError{
+ field: "ZoneAwareLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetZoneAwareLbConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LocalityLbConfigValidationError{
+ field: "ZoneAwareLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *LocalityLbConfig_LocalityWeightedLbConfig_:
+ if v == nil {
+ err := LocalityLbConfigValidationError{
+ field: "LocalityConfigSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofLocalityConfigSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetLocalityWeightedLbConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LocalityLbConfigValidationError{
+ field: "LocalityWeightedLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LocalityLbConfigValidationError{
+ field: "LocalityWeightedLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLocalityWeightedLbConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LocalityLbConfigValidationError{
+ field: "LocalityWeightedLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofLocalityConfigSpecifierPresent {
+ err := LocalityLbConfigValidationError{
+ field: "LocalityConfigSpecifier",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return LocalityLbConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// LocalityLbConfigMultiError is an error wrapping multiple validation errors
+// returned by LocalityLbConfig.ValidateAll() if the designated constraints
+// aren't met.
+type LocalityLbConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LocalityLbConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LocalityLbConfigMultiError) AllErrors() []error { return m }
+
+// LocalityLbConfigValidationError is the validation error returned by
+// LocalityLbConfig.Validate if the designated constraints aren't met.
+type LocalityLbConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LocalityLbConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LocalityLbConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LocalityLbConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LocalityLbConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LocalityLbConfigValidationError) ErrorName() string { return "LocalityLbConfigValidationError" }
+
+// Error satisfies the builtin error interface
+func (e LocalityLbConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sLocalityLbConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LocalityLbConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LocalityLbConfigValidationError{}
+
+// Validate checks the field values on SlowStartConfig with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *SlowStartConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SlowStartConfig with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// SlowStartConfigMultiError, or nil if none found.
+func (m *SlowStartConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SlowStartConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetSlowStartWindow()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SlowStartConfigValidationError{
+ field: "SlowStartWindow",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SlowStartConfigValidationError{
+ field: "SlowStartWindow",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSlowStartWindow()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SlowStartConfigValidationError{
+ field: "SlowStartWindow",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetAggression()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SlowStartConfigValidationError{
+ field: "Aggression",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SlowStartConfigValidationError{
+ field: "Aggression",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAggression()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SlowStartConfigValidationError{
+ field: "Aggression",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetMinWeightPercent()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SlowStartConfigValidationError{
+ field: "MinWeightPercent",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SlowStartConfigValidationError{
+ field: "MinWeightPercent",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMinWeightPercent()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SlowStartConfigValidationError{
+ field: "MinWeightPercent",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return SlowStartConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// SlowStartConfigMultiError is an error wrapping multiple validation errors
+// returned by SlowStartConfig.ValidateAll() if the designated constraints
+// aren't met.
+type SlowStartConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SlowStartConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SlowStartConfigMultiError) AllErrors() []error { return m }
+
+// SlowStartConfigValidationError is the validation error returned by
+// SlowStartConfig.Validate if the designated constraints aren't met.
+type SlowStartConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SlowStartConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SlowStartConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SlowStartConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SlowStartConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SlowStartConfigValidationError) ErrorName() string { return "SlowStartConfigValidationError" }
+
+// Error satisfies the builtin error interface
+func (e SlowStartConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSlowStartConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SlowStartConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SlowStartConfigValidationError{}
+
+// Validate checks the field values on ConsistentHashingLbConfig with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ConsistentHashingLbConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ConsistentHashingLbConfig with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ConsistentHashingLbConfigMultiError, or nil if none found.
+func (m *ConsistentHashingLbConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ConsistentHashingLbConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for UseHostnameForHashing
+
+ if wrapper := m.GetHashBalanceFactor(); wrapper != nil {
+
+ if wrapper.GetValue() < 100 {
+ err := ConsistentHashingLbConfigValidationError{
+ field: "HashBalanceFactor",
+ reason: "value must be greater than or equal to 100",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ConsistentHashingLbConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// ConsistentHashingLbConfigMultiError is an error wrapping multiple validation
+// errors returned by ConsistentHashingLbConfig.ValidateAll() if the
+// designated constraints aren't met.
+type ConsistentHashingLbConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ConsistentHashingLbConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ConsistentHashingLbConfigMultiError) AllErrors() []error { return m }
+
+// ConsistentHashingLbConfigValidationError is the validation error returned by
+// ConsistentHashingLbConfig.Validate if the designated constraints aren't met.
+type ConsistentHashingLbConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ConsistentHashingLbConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ConsistentHashingLbConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ConsistentHashingLbConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ConsistentHashingLbConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ConsistentHashingLbConfigValidationError) ErrorName() string {
+ return "ConsistentHashingLbConfigValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ConsistentHashingLbConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sConsistentHashingLbConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ConsistentHashingLbConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ConsistentHashingLbConfigValidationError{}
+
+// Validate checks the field values on LocalityLbConfig_ZoneAwareLbConfig with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *LocalityLbConfig_ZoneAwareLbConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LocalityLbConfig_ZoneAwareLbConfig
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// LocalityLbConfig_ZoneAwareLbConfigMultiError, or nil if none found.
+func (m *LocalityLbConfig_ZoneAwareLbConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LocalityLbConfig_ZoneAwareLbConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetRoutingEnabled()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LocalityLbConfig_ZoneAwareLbConfigValidationError{
+ field: "RoutingEnabled",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LocalityLbConfig_ZoneAwareLbConfigValidationError{
+ field: "RoutingEnabled",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRoutingEnabled()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LocalityLbConfig_ZoneAwareLbConfigValidationError{
+ field: "RoutingEnabled",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetMinClusterSize()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LocalityLbConfig_ZoneAwareLbConfigValidationError{
+ field: "MinClusterSize",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LocalityLbConfig_ZoneAwareLbConfigValidationError{
+ field: "MinClusterSize",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMinClusterSize()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LocalityLbConfig_ZoneAwareLbConfigValidationError{
+ field: "MinClusterSize",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for FailTrafficOnPanic
+
+ if len(errors) > 0 {
+ return LocalityLbConfig_ZoneAwareLbConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// LocalityLbConfig_ZoneAwareLbConfigMultiError is an error wrapping multiple
+// validation errors returned by
+// LocalityLbConfig_ZoneAwareLbConfig.ValidateAll() if the designated
+// constraints aren't met.
+type LocalityLbConfig_ZoneAwareLbConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LocalityLbConfig_ZoneAwareLbConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LocalityLbConfig_ZoneAwareLbConfigMultiError) AllErrors() []error { return m }
+
+// LocalityLbConfig_ZoneAwareLbConfigValidationError is the validation error
+// returned by LocalityLbConfig_ZoneAwareLbConfig.Validate if the designated
+// constraints aren't met.
+type LocalityLbConfig_ZoneAwareLbConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LocalityLbConfig_ZoneAwareLbConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LocalityLbConfig_ZoneAwareLbConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LocalityLbConfig_ZoneAwareLbConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LocalityLbConfig_ZoneAwareLbConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LocalityLbConfig_ZoneAwareLbConfigValidationError) ErrorName() string {
+ return "LocalityLbConfig_ZoneAwareLbConfigValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e LocalityLbConfig_ZoneAwareLbConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sLocalityLbConfig_ZoneAwareLbConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LocalityLbConfig_ZoneAwareLbConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LocalityLbConfig_ZoneAwareLbConfigValidationError{}
+
+// Validate checks the field values on
+// LocalityLbConfig_LocalityWeightedLbConfig with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *LocalityLbConfig_LocalityWeightedLbConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// LocalityLbConfig_LocalityWeightedLbConfig with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// LocalityLbConfig_LocalityWeightedLbConfigMultiError, or nil if none found.
+func (m *LocalityLbConfig_LocalityWeightedLbConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LocalityLbConfig_LocalityWeightedLbConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return LocalityLbConfig_LocalityWeightedLbConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// LocalityLbConfig_LocalityWeightedLbConfigMultiError is an error wrapping
+// multiple validation errors returned by
+// LocalityLbConfig_LocalityWeightedLbConfig.ValidateAll() if the designated
+// constraints aren't met.
+type LocalityLbConfig_LocalityWeightedLbConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LocalityLbConfig_LocalityWeightedLbConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LocalityLbConfig_LocalityWeightedLbConfigMultiError) AllErrors() []error { return m }
+
+// LocalityLbConfig_LocalityWeightedLbConfigValidationError is the validation
+// error returned by LocalityLbConfig_LocalityWeightedLbConfig.Validate if the
+// designated constraints aren't met.
+type LocalityLbConfig_LocalityWeightedLbConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LocalityLbConfig_LocalityWeightedLbConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LocalityLbConfig_LocalityWeightedLbConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LocalityLbConfig_LocalityWeightedLbConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LocalityLbConfig_LocalityWeightedLbConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LocalityLbConfig_LocalityWeightedLbConfigValidationError) ErrorName() string {
+ return "LocalityLbConfig_LocalityWeightedLbConfigValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e LocalityLbConfig_LocalityWeightedLbConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sLocalityLbConfig_LocalityWeightedLbConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LocalityLbConfig_LocalityWeightedLbConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LocalityLbConfig_LocalityWeightedLbConfigValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3/common_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3/common_vtproto.pb.go
new file mode 100644
index 000000000..ad3021a24
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3/common_vtproto.pb.go
@@ -0,0 +1,492 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/common/v3/common.proto
+
+package commonv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
+ wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *LocalityLbConfig_ZoneAwareLbConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalityLbConfig_ZoneAwareLbConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *LocalityLbConfig_ZoneAwareLbConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.FailTrafficOnPanic {
+ i--
+ if m.FailTrafficOnPanic {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.MinClusterSize != nil {
+ size, err := (*wrapperspb.UInt64Value)(m.MinClusterSize).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.RoutingEnabled != nil {
+ if vtmsg, ok := interface{}(m.RoutingEnabled).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.RoutingEnabled)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LocalityLbConfig_LocalityWeightedLbConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalityLbConfig_LocalityWeightedLbConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *LocalityLbConfig_LocalityWeightedLbConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LocalityLbConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LocalityLbConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *LocalityLbConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.LocalityConfigSpecifier.(*LocalityLbConfig_LocalityWeightedLbConfig_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.LocalityConfigSpecifier.(*LocalityLbConfig_ZoneAwareLbConfig_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LocalityLbConfig_ZoneAwareLbConfig_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *LocalityLbConfig_ZoneAwareLbConfig_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ZoneAwareLbConfig != nil {
+ size, err := m.ZoneAwareLbConfig.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *LocalityLbConfig_LocalityWeightedLbConfig_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *LocalityLbConfig_LocalityWeightedLbConfig_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.LocalityWeightedLbConfig != nil {
+ size, err := m.LocalityWeightedLbConfig.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *SlowStartConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SlowStartConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *SlowStartConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.MinWeightPercent != nil {
+ if vtmsg, ok := interface{}(m.MinWeightPercent).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.MinWeightPercent)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Aggression != nil {
+ if vtmsg, ok := interface{}(m.Aggression).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Aggression)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.SlowStartWindow != nil {
+ size, err := (*durationpb.Duration)(m.SlowStartWindow).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ConsistentHashingLbConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ConsistentHashingLbConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ConsistentHashingLbConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.HashBalanceFactor != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.HashBalanceFactor).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.UseHostnameForHashing {
+ i--
+ if m.UseHostnameForHashing {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LocalityLbConfig_ZoneAwareLbConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RoutingEnabled != nil {
+ if size, ok := interface{}(m.RoutingEnabled).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.RoutingEnabled)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.MinClusterSize != nil {
+ l = (*wrapperspb.UInt64Value)(m.MinClusterSize).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.FailTrafficOnPanic {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *LocalityLbConfig_LocalityWeightedLbConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *LocalityLbConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.LocalityConfigSpecifier.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *LocalityLbConfig_ZoneAwareLbConfig_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ZoneAwareLbConfig != nil {
+ l = m.ZoneAwareLbConfig.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *LocalityLbConfig_LocalityWeightedLbConfig_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.LocalityWeightedLbConfig != nil {
+ l = m.LocalityWeightedLbConfig.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *SlowStartConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.SlowStartWindow != nil {
+ l = (*durationpb.Duration)(m.SlowStartWindow).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Aggression != nil {
+ if size, ok := interface{}(m.Aggression).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Aggression)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.MinWeightPercent != nil {
+ if size, ok := interface{}(m.MinWeightPercent).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.MinWeightPercent)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ConsistentHashingLbConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.UseHostnameForHashing {
+ n += 2
+ }
+ if m.HashBalanceFactor != nil {
+ l = (*wrapperspb.UInt32Value)(m.HashBalanceFactor).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.go
new file mode 100644
index 000000000..819df3d7b
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.go
@@ -0,0 +1,383 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto
+
+package least_requestv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/go-control-plane/envoy/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ v31 "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Available methods for selecting the host set from which to return the host with the
+// fewest active requests.
+type LeastRequest_SelectionMethod int32
+
+const (
+ // Return host with fewest requests from a set of “choice_count“ randomly selected hosts.
+ // Best selection method for most scenarios.
+ LeastRequest_N_CHOICES LeastRequest_SelectionMethod = 0
+ // Return host with fewest requests from all hosts.
+ // Useful in some niche use cases involving low request rates and one of:
+ // (example 1) low request limits on workloads, or (example 2) few hosts.
+ //
+ // Example 1: Consider a workload type that can only accept one connection at a time.
+ // If such workloads are deployed across many hosts, only a small percentage of those
+ // workloads have zero connections at any given time, and the rate of new connections is low,
+ // the “FULL_SCAN“ method is more likely to select a suitable host than “N_CHOICES“.
+ //
+ // Example 2: Consider a workload type that is only deployed on 2 hosts. With default settings,
+ // the “N_CHOICES“ method will return the host with more active requests 25% of the time.
+ // If the request rate is sufficiently low, the behavior of always selecting the host with least
+ // requests as of the last metrics refresh may be preferable.
+ LeastRequest_FULL_SCAN LeastRequest_SelectionMethod = 1
+)
+
+// Enum value maps for LeastRequest_SelectionMethod.
+var (
+ LeastRequest_SelectionMethod_name = map[int32]string{
+ 0: "N_CHOICES",
+ 1: "FULL_SCAN",
+ }
+ LeastRequest_SelectionMethod_value = map[string]int32{
+ "N_CHOICES": 0,
+ "FULL_SCAN": 1,
+ }
+)
+
+func (x LeastRequest_SelectionMethod) Enum() *LeastRequest_SelectionMethod {
+ p := new(LeastRequest_SelectionMethod)
+ *p = x
+ return p
+}
+
+func (x LeastRequest_SelectionMethod) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (LeastRequest_SelectionMethod) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_enumTypes[0].Descriptor()
+}
+
+func (LeastRequest_SelectionMethod) Type() protoreflect.EnumType {
+ return &file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_enumTypes[0]
+}
+
+func (x LeastRequest_SelectionMethod) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use LeastRequest_SelectionMethod.Descriptor instead.
+func (LeastRequest_SelectionMethod) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescGZIP(), []int{0, 0}
+}
+
+// This configuration allows the built-in LEAST_REQUEST LB policy to be configured via the LB policy
+// extension point. See the :ref:`load balancing architecture overview
+// ` for more information.
+// [#next-free-field: 7]
+type LeastRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The number of random healthy hosts from which the host with the fewest active requests will
+ // be chosen. Defaults to 2 so that we perform two-choice selection if the field is not set.
+ // Only applies to the “N_CHOICES“ selection method.
+ ChoiceCount *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=choice_count,json=choiceCount,proto3" json:"choice_count,omitempty"`
+ // The following formula is used to calculate the dynamic weights when hosts have different load
+ // balancing weights:
+ //
+ // “weight = load_balancing_weight / (active_requests + 1)^active_request_bias“
+ //
+ // The larger the active request bias is, the more aggressively active requests will lower the
+ // effective weight when all host weights are not equal.
+ //
+ // “active_request_bias“ must be greater than or equal to 0.0.
+ //
+ // When “active_request_bias == 0.0“ the Least Request Load Balancer doesn't consider the number
+ // of active requests at the time it picks a host and behaves like the Round Robin Load
+ // Balancer.
+ //
+ // When “active_request_bias > 0.0“ the Least Request Load Balancer scales the load balancing
+ // weight by the number of active requests at the time it does a pick.
+ //
+ // The value is cached for performance reasons and refreshed whenever one of the Load Balancer's
+ // host sets changes, e.g., whenever there is a host membership update or a host load balancing
+ // weight change.
+ //
+ // .. note::
+ //
+ // This setting only takes effect if all host weights are not equal.
+ ActiveRequestBias *v3.RuntimeDouble `protobuf:"bytes,2,opt,name=active_request_bias,json=activeRequestBias,proto3" json:"active_request_bias,omitempty"`
+ // Configuration for slow start mode.
+ // If this configuration is not set, slow start will not be not enabled.
+ SlowStartConfig *v31.SlowStartConfig `protobuf:"bytes,3,opt,name=slow_start_config,json=slowStartConfig,proto3" json:"slow_start_config,omitempty"`
+ // Configuration for local zone aware load balancing or locality weighted load balancing.
+ LocalityLbConfig *v31.LocalityLbConfig `protobuf:"bytes,4,opt,name=locality_lb_config,json=localityLbConfig,proto3" json:"locality_lb_config,omitempty"`
+ // [#not-implemented-hide:]
+ // Unused. Replaced by the `selection_method` enum for better extensibility.
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto.
+ EnableFullScan *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=enable_full_scan,json=enableFullScan,proto3" json:"enable_full_scan,omitempty"`
+ // Method for selecting the host set from which to return the host with the fewest active requests.
+ //
+ // Defaults to “N_CHOICES“.
+ SelectionMethod LeastRequest_SelectionMethod `protobuf:"varint,6,opt,name=selection_method,json=selectionMethod,proto3,enum=envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest_SelectionMethod" json:"selection_method,omitempty"`
+}
+
+func (x *LeastRequest) Reset() {
+ *x = LeastRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LeastRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LeastRequest) ProtoMessage() {}
+
+func (x *LeastRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LeastRequest.ProtoReflect.Descriptor instead.
+func (*LeastRequest) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *LeastRequest) GetChoiceCount() *wrapperspb.UInt32Value {
+ if x != nil {
+ return x.ChoiceCount
+ }
+ return nil
+}
+
+func (x *LeastRequest) GetActiveRequestBias() *v3.RuntimeDouble {
+ if x != nil {
+ return x.ActiveRequestBias
+ }
+ return nil
+}
+
+func (x *LeastRequest) GetSlowStartConfig() *v31.SlowStartConfig {
+ if x != nil {
+ return x.SlowStartConfig
+ }
+ return nil
+}
+
+func (x *LeastRequest) GetLocalityLbConfig() *v31.LocalityLbConfig {
+ if x != nil {
+ return x.LocalityLbConfig
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto.
+func (x *LeastRequest) GetEnableFullScan() *wrapperspb.BoolValue {
+ if x != nil {
+ return x.EnableFullScan
+ }
+ return nil
+}
+
+func (x *LeastRequest) GetSelectionMethod() LeastRequest_SelectionMethod {
+ if x != nil {
+ return x.SelectionMethod
+ }
+ return LeastRequest_N_CHOICES
+}
+
+var File_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDesc = []byte{
+ 0x0a, 0x4d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e,
+ 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x65, 0x61, 0x73, 0x74,
+ 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x65, 0x61, 0x73,
+ 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
+ 0x39, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67,
+ 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f,
+ 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33,
+ 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x3f, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f,
+ 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c,
+ 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x76, 0x33, 0x2f,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72,
+ 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x05, 0x0a, 0x0c, 0x4c, 0x65,
+ 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x48, 0x0a, 0x0c, 0x63, 0x68,
+ 0x6f, 0x69, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07,
+ 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x02, 0x52, 0x0b, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x43,
+ 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x53, 0x0a, 0x13, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x72,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
+ 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x11, 0x61, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x42, 0x69, 0x61, 0x73, 0x12, 0x6f, 0x0a, 0x11, 0x73, 0x6c, 0x6f,
+ 0x77, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x43, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c,
+ 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x6c, 0x6f, 0x77, 0x53, 0x74,
+ 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0f, 0x73, 0x6c, 0x6f, 0x77, 0x53,
+ 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x72, 0x0a, 0x12, 0x6c, 0x6f,
+ 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62,
+ 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
+ 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61,
+ 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x6c, 0x6f,
+ 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51,
+ 0x0a, 0x10, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x73, 0x63,
+ 0x61, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56,
+ 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18,
+ 0x01, 0x52, 0x0e, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x46, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x61,
+ 0x6e, 0x12, 0x8c, 0x01, 0x0a, 0x10, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x57, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70,
+ 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
+ 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52,
+ 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
+ 0x22, 0x2f, 0x0a, 0x0f, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74,
+ 0x68, 0x6f, 0x64, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x5f, 0x43, 0x48, 0x4f, 0x49, 0x43, 0x45, 0x53,
+ 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x55, 0x4c, 0x4c, 0x5f, 0x53, 0x43, 0x41, 0x4e, 0x10,
+ 0x01, 0x42, 0xd8, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x47, 0x69, 0x6f,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61,
+ 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69,
+ 0x63, 0x69, 0x65, 0x73, 0x2e, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x11, 0x4c, 0x65, 0x61, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x70, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78,
+ 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61,
+ 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69,
+ 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x6c, 0x65, 0x61, 0x73,
+ 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x65, 0x61,
+ 0x73, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescOnce sync.Once
+ file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescData = file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDesc
+)
+
+func file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescData)
+ })
+ return file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDescData
+}
+
+var file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_goTypes = []interface{}{
+ (LeastRequest_SelectionMethod)(0), // 0: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.SelectionMethod
+ (*LeastRequest)(nil), // 1: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest
+ (*wrapperspb.UInt32Value)(nil), // 2: google.protobuf.UInt32Value
+ (*v3.RuntimeDouble)(nil), // 3: envoy.config.core.v3.RuntimeDouble
+ (*v31.SlowStartConfig)(nil), // 4: envoy.extensions.load_balancing_policies.common.v3.SlowStartConfig
+ (*v31.LocalityLbConfig)(nil), // 5: envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig
+ (*wrapperspb.BoolValue)(nil), // 6: google.protobuf.BoolValue
+}
+var file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_depIdxs = []int32{
+ 2, // 0: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.choice_count:type_name -> google.protobuf.UInt32Value
+ 3, // 1: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.active_request_bias:type_name -> envoy.config.core.v3.RuntimeDouble
+ 4, // 2: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.slow_start_config:type_name -> envoy.extensions.load_balancing_policies.common.v3.SlowStartConfig
+ 5, // 3: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.locality_lb_config:type_name -> envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig
+ 6, // 4: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.enable_full_scan:type_name -> google.protobuf.BoolValue
+ 0, // 5: envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.selection_method:type_name -> envoy.extensions.load_balancing_policies.least_request.v3.LeastRequest.SelectionMethod
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() {
+ file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_init()
+}
+func file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_init() {
+ if File_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LeastRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_depIdxs,
+ EnumInfos: file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_enumTypes,
+ MessageInfos: file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto = out.File
+ file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_rawDesc = nil
+ file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_goTypes = nil
+ file_envoy_extensions_load_balancing_policies_least_request_v3_least_request_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.validate.go
new file mode 100644
index 000000000..75a3a2c2e
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3/least_request.pb.validate.go
@@ -0,0 +1,278 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto
+
+package least_requestv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on LeastRequest with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *LeastRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LeastRequest with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in LeastRequestMultiError, or
+// nil if none found.
+func (m *LeastRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LeastRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if wrapper := m.GetChoiceCount(); wrapper != nil {
+
+ if wrapper.GetValue() < 2 {
+ err := LeastRequestValidationError{
+ field: "ChoiceCount",
+ reason: "value must be greater than or equal to 2",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetActiveRequestBias()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LeastRequestValidationError{
+ field: "ActiveRequestBias",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LeastRequestValidationError{
+ field: "ActiveRequestBias",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetActiveRequestBias()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LeastRequestValidationError{
+ field: "ActiveRequestBias",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetSlowStartConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LeastRequestValidationError{
+ field: "SlowStartConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LeastRequestValidationError{
+ field: "SlowStartConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSlowStartConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LeastRequestValidationError{
+ field: "SlowStartConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetLocalityLbConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LeastRequestValidationError{
+ field: "LocalityLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LeastRequestValidationError{
+ field: "LocalityLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLocalityLbConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LeastRequestValidationError{
+ field: "LocalityLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetEnableFullScan()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LeastRequestValidationError{
+ field: "EnableFullScan",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LeastRequestValidationError{
+ field: "EnableFullScan",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEnableFullScan()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LeastRequestValidationError{
+ field: "EnableFullScan",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if _, ok := LeastRequest_SelectionMethod_name[int32(m.GetSelectionMethod())]; !ok {
+ err := LeastRequestValidationError{
+ field: "SelectionMethod",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return LeastRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// LeastRequestMultiError is an error wrapping multiple validation errors
+// returned by LeastRequest.ValidateAll() if the designated constraints aren't met.
+type LeastRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LeastRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LeastRequestMultiError) AllErrors() []error { return m }
+
+// LeastRequestValidationError is the validation error returned by
+// LeastRequest.Validate if the designated constraints aren't met.
+type LeastRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LeastRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LeastRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LeastRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LeastRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LeastRequestValidationError) ErrorName() string { return "LeastRequestValidationError" }
+
+// Error satisfies the builtin error interface
+func (e LeastRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sLeastRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LeastRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LeastRequestValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3/least_request_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3/least_request_vtproto.pb.go
new file mode 100644
index 000000000..a7abe001b
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/least_request/v3/least_request_vtproto.pb.go
@@ -0,0 +1,196 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/least_request/v3/least_request.proto
+
+package least_requestv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *LeastRequest) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LeastRequest) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *LeastRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.SelectionMethod != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SelectionMethod))
+ i--
+ dAtA[i] = 0x30
+ }
+ if m.EnableFullScan != nil {
+ size, err := (*wrapperspb.BoolValue)(m.EnableFullScan).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.LocalityLbConfig != nil {
+ if vtmsg, ok := interface{}(m.LocalityLbConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.LocalityLbConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.SlowStartConfig != nil {
+ if vtmsg, ok := interface{}(m.SlowStartConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.SlowStartConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.ActiveRequestBias != nil {
+ if vtmsg, ok := interface{}(m.ActiveRequestBias).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ActiveRequestBias)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.ChoiceCount != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.ChoiceCount).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LeastRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ChoiceCount != nil {
+ l = (*wrapperspb.UInt32Value)(m.ChoiceCount).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ActiveRequestBias != nil {
+ if size, ok := interface{}(m.ActiveRequestBias).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ActiveRequestBias)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.SlowStartConfig != nil {
+ if size, ok := interface{}(m.SlowStartConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.SlowStartConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.LocalityLbConfig != nil {
+ if size, ok := interface{}(m.LocalityLbConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.LocalityLbConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.EnableFullScan != nil {
+ l = (*wrapperspb.BoolValue)(m.EnableFullScan).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.SelectionMethod != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.SelectionMethod))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.pb.go
new file mode 100644
index 000000000..7468da4ac
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.pb.go
@@ -0,0 +1,169 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto
+
+package pick_firstv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// This configuration allows the built-in PICK_FIRST LB policy to be configured
+// via the LB policy extension point.
+type PickFirst struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // If set to true, instructs the LB policy to shuffle the list of addresses
+ // received from the name resolver before attempting to connect to them.
+ ShuffleAddressList bool `protobuf:"varint,1,opt,name=shuffle_address_list,json=shuffleAddressList,proto3" json:"shuffle_address_list,omitempty"`
+}
+
+func (x *PickFirst) Reset() {
+ *x = PickFirst{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PickFirst) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PickFirst) ProtoMessage() {}
+
+func (x *PickFirst) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PickFirst.ProtoReflect.Descriptor instead.
+func (*PickFirst) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PickFirst) GetShuffleAddressList() bool {
+ if x != nil {
+ return x.ShuffleAddressList
+ }
+ return false
+}
+
+var File_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDesc = []byte{
+ 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e,
+ 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x69, 0x63, 0x6b, 0x5f,
+ 0x66, 0x69, 0x72, 0x73, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x69, 0x63, 0x6b, 0x5f, 0x66, 0x69,
+ 0x72, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64,
+ 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63,
+ 0x69, 0x65, 0x73, 0x2e, 0x70, 0x69, 0x63, 0x6b, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x2e, 0x76,
+ 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x3d, 0x0a, 0x09, 0x50, 0x69, 0x63, 0x6b, 0x46, 0x69, 0x72, 0x73, 0x74, 0x12, 0x30, 0x0a,
+ 0x14, 0x73, 0x68, 0x75, 0x66, 0x66, 0x6c, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
+ 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x73, 0x68, 0x75,
+ 0x66, 0x66, 0x6c, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x42,
+ 0xcc, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x44, 0x69, 0x6f, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f,
+ 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69,
+ 0x65, 0x73, 0x2e, 0x70, 0x69, 0x63, 0x6b, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x2e, 0x76, 0x33,
+ 0x42, 0x0e, 0x50, 0x69, 0x63, 0x6b, 0x46, 0x69, 0x72, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x50, 0x01, 0x5a, 0x6a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e,
+ 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64,
+ 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63,
+ 0x69, 0x65, 0x73, 0x2f, 0x70, 0x69, 0x63, 0x6b, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x2f, 0x76,
+ 0x33, 0x3b, 0x70, 0x69, 0x63, 0x6b, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x76, 0x33, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDescOnce sync.Once
+ file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDescData = file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDesc
+)
+
+func file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDescData)
+ })
+ return file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDescData
+}
+
+var file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_goTypes = []interface{}{
+ (*PickFirst)(nil), // 0: envoy.extensions.load_balancing_policies.pick_first.v3.PickFirst
+}
+var file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_init() }
+func file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_init() {
+ if File_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PickFirst); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_depIdxs,
+ MessageInfos: file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto = out.File
+ file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_rawDesc = nil
+ file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_goTypes = nil
+ file_envoy_extensions_load_balancing_policies_pick_first_v3_pick_first_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.pb.validate.go
new file mode 100644
index 000000000..d142fed99
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.pb.validate.go
@@ -0,0 +1,138 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto
+
+package pick_firstv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on PickFirst with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *PickFirst) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on PickFirst with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in PickFirstMultiError, or nil
+// if none found.
+func (m *PickFirst) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *PickFirst) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for ShuffleAddressList
+
+ if len(errors) > 0 {
+ return PickFirstMultiError(errors)
+ }
+
+ return nil
+}
+
+// PickFirstMultiError is an error wrapping multiple validation errors returned
+// by PickFirst.ValidateAll() if the designated constraints aren't met.
+type PickFirstMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PickFirstMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PickFirstMultiError) AllErrors() []error { return m }
+
+// PickFirstValidationError is the validation error returned by
+// PickFirst.Validate if the designated constraints aren't met.
+type PickFirstValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PickFirstValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PickFirstValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PickFirstValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PickFirstValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PickFirstValidationError) ErrorName() string { return "PickFirstValidationError" }
+
+// Error satisfies the builtin error interface
+func (e PickFirstValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sPickFirst.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PickFirstValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PickFirstValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first_vtproto.pb.go
new file mode 100644
index 000000000..828e70621
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first_vtproto.pb.go
@@ -0,0 +1,74 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.proto
+
+package pick_firstv3
+
+import (
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *PickFirst) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PickFirst) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PickFirst) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ShuffleAddressList {
+ i--
+ if m.ShuffleAddressList {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PickFirst) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ShuffleAddressList {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.go
new file mode 100644
index 000000000..6c544cc72
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.go
@@ -0,0 +1,393 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto
+
+package ring_hashv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/go-control-plane/envoy/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/common/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// The hash function used to hash hosts onto the ketama ring.
+type RingHash_HashFunction int32
+
+const (
+ // Currently defaults to XX_HASH.
+ RingHash_DEFAULT_HASH RingHash_HashFunction = 0
+ // Use `xxHash `_.
+ RingHash_XX_HASH RingHash_HashFunction = 1
+ // Use `MurmurHash2 `_, this is compatible with
+ // std:hash in GNU libstdc++ 3.4.20 or above. This is typically the case when compiled
+ // on Linux and not macOS.
+ RingHash_MURMUR_HASH_2 RingHash_HashFunction = 2
+)
+
+// Enum value maps for RingHash_HashFunction.
+var (
+ RingHash_HashFunction_name = map[int32]string{
+ 0: "DEFAULT_HASH",
+ 1: "XX_HASH",
+ 2: "MURMUR_HASH_2",
+ }
+ RingHash_HashFunction_value = map[string]int32{
+ "DEFAULT_HASH": 0,
+ "XX_HASH": 1,
+ "MURMUR_HASH_2": 2,
+ }
+)
+
+func (x RingHash_HashFunction) Enum() *RingHash_HashFunction {
+ p := new(RingHash_HashFunction)
+ *p = x
+ return p
+}
+
+func (x RingHash_HashFunction) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (RingHash_HashFunction) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes[0].Descriptor()
+}
+
+func (RingHash_HashFunction) Type() protoreflect.EnumType {
+ return &file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes[0]
+}
+
+func (x RingHash_HashFunction) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use RingHash_HashFunction.Descriptor instead.
+func (RingHash_HashFunction) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescGZIP(), []int{0, 0}
+}
+
+// This configuration allows the built-in RING_HASH LB policy to be configured via the LB policy
+// extension point. See the :ref:`load balancing architecture overview
+// ` for more information.
+// [#next-free-field: 8]
+type RingHash struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The hash function used to hash hosts onto the ketama ring. The value defaults to
+ // :ref:`XX_HASH`.
+ HashFunction RingHash_HashFunction `protobuf:"varint,1,opt,name=hash_function,json=hashFunction,proto3,enum=envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash_HashFunction" json:"hash_function,omitempty"`
+ // Minimum hash ring size. The larger the ring is (that is, the more hashes there are for each
+ // provided host) the better the request distribution will reflect the desired weights. Defaults
+ // to 1024 entries, and limited to 8M entries. See also
+ // :ref:`maximum_ring_size`.
+ MinimumRingSize *wrapperspb.UInt64Value `protobuf:"bytes,2,opt,name=minimum_ring_size,json=minimumRingSize,proto3" json:"minimum_ring_size,omitempty"`
+ // Maximum hash ring size. Defaults to 8M entries, and limited to 8M entries, but can be lowered
+ // to further constrain resource use. See also
+ // :ref:`minimum_ring_size`.
+ MaximumRingSize *wrapperspb.UInt64Value `protobuf:"bytes,3,opt,name=maximum_ring_size,json=maximumRingSize,proto3" json:"maximum_ring_size,omitempty"`
+ // If set to “true“, the cluster will use hostname instead of the resolved
+ // address as the key to consistently hash to an upstream host. Only valid for StrictDNS clusters with hostnames which resolve to a single IP address.
+ //
+ // .. note::
+ //
+ // This is deprecated and please use :ref:`consistent_hashing_lb_config
+ // ` instead.
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto.
+ UseHostnameForHashing bool `protobuf:"varint,4,opt,name=use_hostname_for_hashing,json=useHostnameForHashing,proto3" json:"use_hostname_for_hashing,omitempty"`
+ // Configures percentage of average cluster load to bound per upstream host. For example, with a value of 150
+ // no upstream host will get a load more than 1.5 times the average load of all the hosts in the cluster.
+ // If not specified, the load is not bounded for any upstream host. Typical value for this parameter is between 120 and 200.
+ // Minimum is 100.
+ //
+ // This is implemented based on the method described in the paper https://arxiv.org/abs/1608.01350. For the specified
+ // “hash_balance_factor“, requests to any upstream host are capped at “hash_balance_factor/100“ times the average number of requests
+ // across the cluster. When a request arrives for an upstream host that is currently serving at its max capacity, linear probing
+ // is used to identify an eligible host. Further, the linear probe is implemented using a random jump in hosts ring/table to identify
+ // the eligible host (this technique is as described in the paper https://arxiv.org/abs/1908.08762 - the random jump avoids the
+ // cascading overflow effect when choosing the next host in the ring/table).
+ //
+ // If weights are specified on the hosts, they are respected.
+ //
+ // This is an O(N) algorithm, unlike other load balancers. Using a lower “hash_balance_factor“ results in more hosts
+ // being probed, so use a higher value if you require better performance.
+ //
+ // .. note::
+ //
+ // This is deprecated and please use :ref:`consistent_hashing_lb_config
+ // ` instead.
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto.
+ HashBalanceFactor *wrapperspb.UInt32Value `protobuf:"bytes,5,opt,name=hash_balance_factor,json=hashBalanceFactor,proto3" json:"hash_balance_factor,omitempty"`
+ // Common configuration for hashing-based load balancing policies.
+ ConsistentHashingLbConfig *v3.ConsistentHashingLbConfig `protobuf:"bytes,6,opt,name=consistent_hashing_lb_config,json=consistentHashingLbConfig,proto3" json:"consistent_hashing_lb_config,omitempty"`
+ // Enable locality weighted load balancing for ring hash lb explicitly.
+ LocalityWeightedLbConfig *v3.LocalityLbConfig_LocalityWeightedLbConfig `protobuf:"bytes,7,opt,name=locality_weighted_lb_config,json=localityWeightedLbConfig,proto3" json:"locality_weighted_lb_config,omitempty"`
+}
+
+func (x *RingHash) Reset() {
+ *x = RingHash{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RingHash) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RingHash) ProtoMessage() {}
+
+func (x *RingHash) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RingHash.ProtoReflect.Descriptor instead.
+func (*RingHash) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RingHash) GetHashFunction() RingHash_HashFunction {
+ if x != nil {
+ return x.HashFunction
+ }
+ return RingHash_DEFAULT_HASH
+}
+
+func (x *RingHash) GetMinimumRingSize() *wrapperspb.UInt64Value {
+ if x != nil {
+ return x.MinimumRingSize
+ }
+ return nil
+}
+
+func (x *RingHash) GetMaximumRingSize() *wrapperspb.UInt64Value {
+ if x != nil {
+ return x.MaximumRingSize
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto.
+func (x *RingHash) GetUseHostnameForHashing() bool {
+ if x != nil {
+ return x.UseHostnameForHashing
+ }
+ return false
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto.
+func (x *RingHash) GetHashBalanceFactor() *wrapperspb.UInt32Value {
+ if x != nil {
+ return x.HashBalanceFactor
+ }
+ return nil
+}
+
+func (x *RingHash) GetConsistentHashingLbConfig() *v3.ConsistentHashingLbConfig {
+ if x != nil {
+ return x.ConsistentHashingLbConfig
+ }
+ return nil
+}
+
+func (x *RingHash) GetLocalityWeightedLbConfig() *v3.LocalityLbConfig_LocalityWeightedLbConfig {
+ if x != nil {
+ return x.LocalityWeightedLbConfig
+ }
+ return nil
+}
+
+var File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc = []byte{
+ 0x0a, 0x45, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e,
+ 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x5f,
+ 0x68, 0x61, 0x73, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73,
+ 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x35, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62,
+ 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
+ 0x73, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0x1a, 0x3f,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f,
+ 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f,
+ 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xcf, 0x06, 0x0a,
+ 0x08, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x12, 0x7b, 0x0a, 0x0d, 0x68, 0x61, 0x73,
+ 0x68, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69,
+ 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x72, 0x69, 0x6e, 0x67,
+ 0x5f, 0x68, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73,
+ 0x68, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08,
+ 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x68, 0x61, 0x73, 0x68, 0x46, 0x75,
+ 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75,
+ 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42,
+ 0x0c, 0xfa, 0x42, 0x09, 0x32, 0x07, 0x18, 0x80, 0x80, 0x80, 0x04, 0x28, 0x01, 0x52, 0x0f, 0x6d,
+ 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x54,
+ 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x73,
+ 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74,
+ 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x32, 0x05, 0x18, 0x80,
+ 0x80, 0x80, 0x04, 0x52, 0x0f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x52, 0x69, 0x6e, 0x67,
+ 0x53, 0x69, 0x7a, 0x65, 0x12, 0x44, 0x0a, 0x18, 0x75, 0x73, 0x65, 0x5f, 0x68, 0x6f, 0x73, 0x74,
+ 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e,
+ 0x30, 0x18, 0x01, 0x52, 0x15, 0x75, 0x73, 0x65, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65,
+ 0x46, 0x6f, 0x72, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x60, 0x0a, 0x13, 0x68, 0x61,
+ 0x73, 0x68, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x61, 0x63, 0x74, 0x6f,
+ 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32,
+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x12, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x28, 0x64, 0x92, 0xc7,
+ 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, 0x11, 0x68, 0x61, 0x73, 0x68, 0x42,
+ 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x8e, 0x01, 0x0a,
+ 0x1c, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68,
+ 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61,
+ 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74,
+ 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x52, 0x19, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x61,
+ 0x73, 0x68, 0x69, 0x6e, 0x67, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x9c, 0x01,
+ 0x0a, 0x1b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x77, 0x65, 0x69, 0x67, 0x68,
+ 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x62, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x5d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61,
+ 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74,
+ 0x79, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69,
+ 0x74, 0x79, 0x57, 0x65, 0x69, 0x67, 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x52, 0x18, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x57, 0x65, 0x69, 0x67,
+ 0x68, 0x74, 0x65, 0x64, 0x4c, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x40, 0x0a, 0x0c,
+ 0x48, 0x61, 0x73, 0x68, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x0c,
+ 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x00, 0x12, 0x0b,
+ 0x0a, 0x07, 0x58, 0x58, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4d,
+ 0x55, 0x52, 0x4d, 0x55, 0x52, 0x5f, 0x48, 0x41, 0x53, 0x48, 0x5f, 0x32, 0x10, 0x02, 0x42, 0xc8,
+ 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x43, 0x69, 0x6f, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62,
+ 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65,
+ 0x73, 0x2e, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x2e, 0x76, 0x33, 0x42, 0x0d,
+ 0x52, 0x69, 0x6e, 0x67, 0x48, 0x61, 0x73, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
+ 0x68, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
+ 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61,
+ 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73,
+ 0x2f, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x69,
+ 0x6e, 0x67, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
+}
+
+var (
+ file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescOnce sync.Once
+ file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData = file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc
+)
+
+func file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData)
+ })
+ return file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDescData
+}
+
+var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_goTypes = []interface{}{
+ (RingHash_HashFunction)(0), // 0: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.HashFunction
+ (*RingHash)(nil), // 1: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash
+ (*wrapperspb.UInt64Value)(nil), // 2: google.protobuf.UInt64Value
+ (*wrapperspb.UInt32Value)(nil), // 3: google.protobuf.UInt32Value
+ (*v3.ConsistentHashingLbConfig)(nil), // 4: envoy.extensions.load_balancing_policies.common.v3.ConsistentHashingLbConfig
+ (*v3.LocalityLbConfig_LocalityWeightedLbConfig)(nil), // 5: envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.LocalityWeightedLbConfig
+}
+var file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_depIdxs = []int32{
+ 0, // 0: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.hash_function:type_name -> envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.HashFunction
+ 2, // 1: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.minimum_ring_size:type_name -> google.protobuf.UInt64Value
+ 2, // 2: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.maximum_ring_size:type_name -> google.protobuf.UInt64Value
+ 3, // 3: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.hash_balance_factor:type_name -> google.protobuf.UInt32Value
+ 4, // 4: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.consistent_hashing_lb_config:type_name -> envoy.extensions.load_balancing_policies.common.v3.ConsistentHashingLbConfig
+ 5, // 5: envoy.extensions.load_balancing_policies.ring_hash.v3.RingHash.locality_weighted_lb_config:type_name -> envoy.extensions.load_balancing_policies.common.v3.LocalityLbConfig.LocalityWeightedLbConfig
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_init() }
+func file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_init() {
+ if File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RingHash); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_depIdxs,
+ EnumInfos: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_enumTypes,
+ MessageInfos: file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto = out.File
+ file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_rawDesc = nil
+ file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_goTypes = nil
+ file_envoy_extensions_load_balancing_policies_ring_hash_v3_ring_hash_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go
new file mode 100644
index 000000000..c5ec6e39c
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.pb.validate.go
@@ -0,0 +1,252 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto
+
+package ring_hashv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on RingHash with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *RingHash) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RingHash with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in RingHashMultiError, or nil
+// if none found.
+func (m *RingHash) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RingHash) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := RingHash_HashFunction_name[int32(m.GetHashFunction())]; !ok {
+ err := RingHashValidationError{
+ field: "HashFunction",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if wrapper := m.GetMinimumRingSize(); wrapper != nil {
+
+ if val := wrapper.GetValue(); val < 1 || val > 8388608 {
+ err := RingHashValidationError{
+ field: "MinimumRingSize",
+ reason: "value must be inside range [1, 8388608]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if wrapper := m.GetMaximumRingSize(); wrapper != nil {
+
+ if wrapper.GetValue() > 8388608 {
+ err := RingHashValidationError{
+ field: "MaximumRingSize",
+ reason: "value must be less than or equal to 8388608",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ // no validation rules for UseHostnameForHashing
+
+ if wrapper := m.GetHashBalanceFactor(); wrapper != nil {
+
+ if wrapper.GetValue() < 100 {
+ err := RingHashValidationError{
+ field: "HashBalanceFactor",
+ reason: "value must be greater than or equal to 100",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetConsistentHashingLbConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RingHashValidationError{
+ field: "ConsistentHashingLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RingHashValidationError{
+ field: "ConsistentHashingLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConsistentHashingLbConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RingHashValidationError{
+ field: "ConsistentHashingLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetLocalityWeightedLbConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RingHashValidationError{
+ field: "LocalityWeightedLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RingHashValidationError{
+ field: "LocalityWeightedLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLocalityWeightedLbConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RingHashValidationError{
+ field: "LocalityWeightedLbConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return RingHashMultiError(errors)
+ }
+
+ return nil
+}
+
+// RingHashMultiError is an error wrapping multiple validation errors returned
+// by RingHash.ValidateAll() if the designated constraints aren't met.
+type RingHashMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RingHashMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RingHashMultiError) AllErrors() []error { return m }
+
+// RingHashValidationError is the validation error returned by
+// RingHash.Validate if the designated constraints aren't met.
+type RingHashValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RingHashValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RingHashValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RingHashValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RingHashValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RingHashValidationError) ErrorName() string { return "RingHashValidationError" }
+
+// Error satisfies the builtin error interface
+func (e RingHashValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRingHash.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RingHashValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RingHashValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash_vtproto.pb.go
new file mode 100644
index 000000000..f762ec4c6
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash_vtproto.pb.go
@@ -0,0 +1,191 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.proto
+
+package ring_hashv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *RingHash) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RingHash) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RingHash) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.LocalityWeightedLbConfig != nil {
+ if vtmsg, ok := interface{}(m.LocalityWeightedLbConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.LocalityWeightedLbConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.ConsistentHashingLbConfig != nil {
+ if vtmsg, ok := interface{}(m.ConsistentHashingLbConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ConsistentHashingLbConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ if m.HashBalanceFactor != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.HashBalanceFactor).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.UseHostnameForHashing {
+ i--
+ if m.UseHostnameForHashing {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if m.MaximumRingSize != nil {
+ size, err := (*wrapperspb.UInt64Value)(m.MaximumRingSize).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.MinimumRingSize != nil {
+ size, err := (*wrapperspb.UInt64Value)(m.MinimumRingSize).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.HashFunction != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HashFunction))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *RingHash) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.HashFunction != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.HashFunction))
+ }
+ if m.MinimumRingSize != nil {
+ l = (*wrapperspb.UInt64Value)(m.MinimumRingSize).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.MaximumRingSize != nil {
+ l = (*wrapperspb.UInt64Value)(m.MaximumRingSize).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.UseHostnameForHashing {
+ n += 2
+ }
+ if m.HashBalanceFactor != nil {
+ l = (*wrapperspb.UInt32Value)(m.HashBalanceFactor).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ConsistentHashingLbConfig != nil {
+ if size, ok := interface{}(m.ConsistentHashingLbConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ConsistentHashingLbConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.LocalityWeightedLbConfig != nil {
+ if size, ok := interface{}(m.LocalityWeightedLbConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.LocalityWeightedLbConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.go
new file mode 100644
index 000000000..7c3741a23
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.go
@@ -0,0 +1,181 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto
+
+package wrr_localityv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Configuration for the wrr_locality LB policy. See the :ref:`load balancing architecture overview
+// ` for more information.
+type WrrLocality struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The child LB policy to create for endpoint-picking within the chosen locality.
+ EndpointPickingPolicy *v3.LoadBalancingPolicy `protobuf:"bytes,1,opt,name=endpoint_picking_policy,json=endpointPickingPolicy,proto3" json:"endpoint_picking_policy,omitempty"`
+}
+
+func (x *WrrLocality) Reset() {
+ *x = WrrLocality{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *WrrLocality) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*WrrLocality) ProtoMessage() {}
+
+func (x *WrrLocality) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use WrrLocality.ProtoReflect.Descriptor instead.
+func (*WrrLocality) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *WrrLocality) GetEndpointPickingPolicy() *v3.LoadBalancingPolicy {
+ if x != nil {
+ return x.EndpointPickingPolicy
+ }
+ return nil
+}
+
+var File_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc = []byte{
+ 0x0a, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e,
+ 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x77, 0x72, 0x72, 0x5f, 0x6c,
+ 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x77, 0x72, 0x72, 0x5f, 0x6c,
+ 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x38, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70,
+ 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61,
+ 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2f, 0x76, 0x33,
+ 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7d, 0x0a, 0x0b, 0x57, 0x72, 0x72, 0x4c, 0x6f, 0x63,
+ 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x6e, 0x0a, 0x17, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e,
+ 0x74, 0x5f, 0x70, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x76, 0x33,
+ 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x50, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x15,
+ 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x50, 0x69, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0xd4, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02,
+ 0x0a, 0x46, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x69, 0x6e, 0x67, 0x5f,
+ 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2e, 0x77, 0x72, 0x72, 0x5f, 0x6c, 0x6f, 0x63,
+ 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x57, 0x72, 0x72, 0x4c, 0x6f, 0x63,
+ 0x61, 0x6c, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x6e, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72,
+ 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70,
+ 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e,
+ 0x63, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x2f, 0x77, 0x72,
+ 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x77, 0x72,
+ 0x72, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescOnce sync.Once
+ file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData = file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc
+)
+
+func file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData)
+ })
+ return file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDescData
+}
+
+var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_goTypes = []interface{}{
+ (*WrrLocality)(nil), // 0: envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality
+ (*v3.LoadBalancingPolicy)(nil), // 1: envoy.config.cluster.v3.LoadBalancingPolicy
+}
+var file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_depIdxs = []int32{
+ 1, // 0: envoy.extensions.load_balancing_policies.wrr_locality.v3.WrrLocality.endpoint_picking_policy:type_name -> envoy.config.cluster.v3.LoadBalancingPolicy
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_init() }
+func file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_init() {
+ if File_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*WrrLocality); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_depIdxs,
+ MessageInfos: file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto = out.File
+ file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_rawDesc = nil
+ file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_goTypes = nil
+ file_envoy_extensions_load_balancing_policies_wrr_locality_v3_wrr_locality_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.validate.go
new file mode 100644
index 000000000..c4c33b4f0
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.pb.validate.go
@@ -0,0 +1,176 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto
+
+package wrr_localityv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on WrrLocality with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *WrrLocality) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on WrrLocality with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in WrrLocalityMultiError, or
+// nil if none found.
+func (m *WrrLocality) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *WrrLocality) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetEndpointPickingPolicy() == nil {
+ err := WrrLocalityValidationError{
+ field: "EndpointPickingPolicy",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetEndpointPickingPolicy()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, WrrLocalityValidationError{
+ field: "EndpointPickingPolicy",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, WrrLocalityValidationError{
+ field: "EndpointPickingPolicy",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEndpointPickingPolicy()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return WrrLocalityValidationError{
+ field: "EndpointPickingPolicy",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return WrrLocalityMultiError(errors)
+ }
+
+ return nil
+}
+
+// WrrLocalityMultiError is an error wrapping multiple validation errors
+// returned by WrrLocality.ValidateAll() if the designated constraints aren't met.
+type WrrLocalityMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m WrrLocalityMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m WrrLocalityMultiError) AllErrors() []error { return m }
+
+// WrrLocalityValidationError is the validation error returned by
+// WrrLocality.Validate if the designated constraints aren't met.
+type WrrLocalityValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e WrrLocalityValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e WrrLocalityValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e WrrLocalityValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e WrrLocalityValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e WrrLocalityValidationError) ErrorName() string { return "WrrLocalityValidationError" }
+
+// Error satisfies the builtin error interface
+func (e WrrLocalityValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sWrrLocality.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = WrrLocalityValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = WrrLocalityValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality_vtproto.pb.go
new file mode 100644
index 000000000..1a0148661
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality_vtproto.pb.go
@@ -0,0 +1,95 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.proto
+
+package wrr_localityv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *WrrLocality) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *WrrLocality) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *WrrLocality) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.EndpointPickingPolicy != nil {
+ if vtmsg, ok := interface{}(m.EndpointPickingPolicy).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.EndpointPickingPolicy)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *WrrLocality) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.EndpointPickingPolicy != nil {
+ if size, ok := interface{}(m.EndpointPickingPolicy).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.EndpointPickingPolicy)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3/stream.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3/stream.pb.go
new file mode 100644
index 000000000..4199deae5
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3/stream.pb.go
@@ -0,0 +1,153 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/rbac/audit_loggers/stream/v3/stream.proto
+
+package streamv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Custom configuration for the RBAC audit logger that writes log entries
+// directly to the operating system's standard output.
+// The logger outputs in JSON format and is currently not configurable.
+type StdoutAuditLog struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *StdoutAuditLog) Reset() {
+ *x = StdoutAuditLog{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StdoutAuditLog) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StdoutAuditLog) ProtoMessage() {}
+
+func (x *StdoutAuditLog) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StdoutAuditLog.ProtoReflect.Descriptor instead.
+func (*StdoutAuditLog) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDescGZIP(), []int{0}
+}
+
+var File_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDesc = []byte{
+ 0x0a, 0x3a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x72, 0x62, 0x61, 0x63, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x5f, 0x6c, 0x6f,
+ 0x67, 0x67, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x2f,
+ 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2d, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72,
+ 0x62, 0x61, 0x63, 0x2e, 0x61, 0x75, 0x64, 0x69, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72,
+ 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70,
+ 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74,
+ 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x74,
+ 0x64, 0x6f, 0x75, 0x74, 0x41, 0x75, 0x64, 0x69, 0x74, 0x4c, 0x6f, 0x67, 0x42, 0xb3, 0x01, 0xba,
+ 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x3b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x72, 0x62, 0x61, 0x63, 0x2e, 0x61, 0x75, 0x64,
+ 0x69, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2e, 0x73, 0x74, 0x72, 0x65, 0x61,
+ 0x6d, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f,
+ 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x72, 0x62, 0x61,
+ 0x63, 0x2f, 0x61, 0x75, 0x64, 0x69, 0x74, 0x5f, 0x6c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x73, 0x2f,
+ 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d,
+ 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDescOnce sync.Once
+ file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDescData = file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDesc
+)
+
+func file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDescData)
+ })
+ return file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDescData
+}
+
+var file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_goTypes = []interface{}{
+ (*StdoutAuditLog)(nil), // 0: envoy.extensions.rbac.audit_loggers.stream.v3.StdoutAuditLog
+}
+var file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_init() }
+func file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_init() {
+ if File_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StdoutAuditLog); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_depIdxs,
+ MessageInfos: file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto = out.File
+ file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_rawDesc = nil
+ file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_goTypes = nil
+ file_envoy_extensions_rbac_audit_loggers_stream_v3_stream_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3/stream.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3/stream.pb.validate.go
new file mode 100644
index 000000000..5fe37d901
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3/stream.pb.validate.go
@@ -0,0 +1,137 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/rbac/audit_loggers/stream/v3/stream.proto
+
+package streamv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on StdoutAuditLog with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *StdoutAuditLog) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StdoutAuditLog with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in StdoutAuditLogMultiError,
+// or nil if none found.
+func (m *StdoutAuditLog) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StdoutAuditLog) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return StdoutAuditLogMultiError(errors)
+ }
+
+ return nil
+}
+
+// StdoutAuditLogMultiError is an error wrapping multiple validation errors
+// returned by StdoutAuditLog.ValidateAll() if the designated constraints
+// aren't met.
+type StdoutAuditLogMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StdoutAuditLogMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StdoutAuditLogMultiError) AllErrors() []error { return m }
+
+// StdoutAuditLogValidationError is the validation error returned by
+// StdoutAuditLog.Validate if the designated constraints aren't met.
+type StdoutAuditLogValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StdoutAuditLogValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StdoutAuditLogValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StdoutAuditLogValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StdoutAuditLogValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StdoutAuditLogValidationError) ErrorName() string { return "StdoutAuditLogValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StdoutAuditLogValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStdoutAuditLog.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StdoutAuditLogValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StdoutAuditLogValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3/stream_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3/stream_vtproto.pb.go
new file mode 100644
index 000000000..8e85a5680
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/rbac/audit_loggers/stream/v3/stream_vtproto.pb.go
@@ -0,0 +1,61 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/rbac/audit_loggers/stream/v3/stream.proto
+
+package streamv3
+
+import (
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *StdoutAuditLog) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StdoutAuditLog) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StdoutAuditLog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *StdoutAuditLog) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/cert.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/cert.pb.go
new file mode 100644
index 000000000..37df4d7a6
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/cert.pb.go
@@ -0,0 +1,89 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/transport_sockets/tls/v3/cert.proto
+
+package tlsv3
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+var File_envoy_extensions_transport_sockets_tls_v3_cert_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_transport_sockets_tls_v3_cert_proto_rawDesc = []byte{
+ 0x0a, 0x34, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x65, 0x72, 0x74,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
+ 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76,
+ 0x33, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c,
+ 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x9e, 0x01, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
+ 0x76, 0x33, 0x42, 0x09, 0x43, 0x65, 0x72, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
+ 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
+ 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
+ 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76,
+ 0x33, 0x3b, 0x74, 0x6c, 0x73, 0x76, 0x33, 0x50, 0x00, 0x50, 0x01, 0x50, 0x02, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var file_envoy_extensions_transport_sockets_tls_v3_cert_proto_goTypes = []interface{}{}
+var file_envoy_extensions_transport_sockets_tls_v3_cert_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_transport_sockets_tls_v3_cert_proto_init() }
+func file_envoy_extensions_transport_sockets_tls_v3_cert_proto_init() {
+ if File_envoy_extensions_transport_sockets_tls_v3_cert_proto != nil {
+ return
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_init()
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_init()
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init()
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_transport_sockets_tls_v3_cert_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 0,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_transport_sockets_tls_v3_cert_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_transport_sockets_tls_v3_cert_proto_depIdxs,
+ }.Build()
+ File_envoy_extensions_transport_sockets_tls_v3_cert_proto = out.File
+ file_envoy_extensions_transport_sockets_tls_v3_cert_proto_rawDesc = nil
+ file_envoy_extensions_transport_sockets_tls_v3_cert_proto_goTypes = nil
+ file_envoy_extensions_transport_sockets_tls_v3_cert_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/cert.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/cert.pb.validate.go
new file mode 100644
index 000000000..aa4f445f5
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/cert.pb.validate.go
@@ -0,0 +1,37 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/transport_sockets/tls/v3/cert.proto
+
+package tlsv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/common.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/common.pb.go
new file mode 100644
index 000000000..f9aa84130
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/common.pb.go
@@ -0,0 +1,1689 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/transport_sockets/tls/v3/common.proto
+
+package tlsv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/go-control-plane/envoy/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ v31 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type TlsParameters_TlsProtocol int32
+
+const (
+ // Envoy will choose the optimal TLS version.
+ TlsParameters_TLS_AUTO TlsParameters_TlsProtocol = 0
+ // TLS 1.0
+ TlsParameters_TLSv1_0 TlsParameters_TlsProtocol = 1
+ // TLS 1.1
+ TlsParameters_TLSv1_1 TlsParameters_TlsProtocol = 2
+ // TLS 1.2
+ TlsParameters_TLSv1_2 TlsParameters_TlsProtocol = 3
+ // TLS 1.3
+ TlsParameters_TLSv1_3 TlsParameters_TlsProtocol = 4
+)
+
+// Enum value maps for TlsParameters_TlsProtocol.
+var (
+ TlsParameters_TlsProtocol_name = map[int32]string{
+ 0: "TLS_AUTO",
+ 1: "TLSv1_0",
+ 2: "TLSv1_1",
+ 3: "TLSv1_2",
+ 4: "TLSv1_3",
+ }
+ TlsParameters_TlsProtocol_value = map[string]int32{
+ "TLS_AUTO": 0,
+ "TLSv1_0": 1,
+ "TLSv1_1": 2,
+ "TLSv1_2": 3,
+ "TLSv1_3": 4,
+ }
+)
+
+func (x TlsParameters_TlsProtocol) Enum() *TlsParameters_TlsProtocol {
+ p := new(TlsParameters_TlsProtocol)
+ *p = x
+ return p
+}
+
+func (x TlsParameters_TlsProtocol) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (TlsParameters_TlsProtocol) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[0].Descriptor()
+}
+
+func (TlsParameters_TlsProtocol) Type() protoreflect.EnumType {
+ return &file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[0]
+}
+
+func (x TlsParameters_TlsProtocol) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use TlsParameters_TlsProtocol.Descriptor instead.
+func (TlsParameters_TlsProtocol) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{0, 0}
+}
+
+// Indicates the choice of GeneralName as defined in section 4.2.1.5 of RFC 5280 to match
+// against.
+type SubjectAltNameMatcher_SanType int32
+
+const (
+ SubjectAltNameMatcher_SAN_TYPE_UNSPECIFIED SubjectAltNameMatcher_SanType = 0
+ SubjectAltNameMatcher_EMAIL SubjectAltNameMatcher_SanType = 1
+ SubjectAltNameMatcher_DNS SubjectAltNameMatcher_SanType = 2
+ SubjectAltNameMatcher_URI SubjectAltNameMatcher_SanType = 3
+ SubjectAltNameMatcher_IP_ADDRESS SubjectAltNameMatcher_SanType = 4
+ SubjectAltNameMatcher_OTHER_NAME SubjectAltNameMatcher_SanType = 5
+)
+
+// Enum value maps for SubjectAltNameMatcher_SanType.
+var (
+ SubjectAltNameMatcher_SanType_name = map[int32]string{
+ 0: "SAN_TYPE_UNSPECIFIED",
+ 1: "EMAIL",
+ 2: "DNS",
+ 3: "URI",
+ 4: "IP_ADDRESS",
+ 5: "OTHER_NAME",
+ }
+ SubjectAltNameMatcher_SanType_value = map[string]int32{
+ "SAN_TYPE_UNSPECIFIED": 0,
+ "EMAIL": 1,
+ "DNS": 2,
+ "URI": 3,
+ "IP_ADDRESS": 4,
+ "OTHER_NAME": 5,
+ }
+)
+
+func (x SubjectAltNameMatcher_SanType) Enum() *SubjectAltNameMatcher_SanType {
+ p := new(SubjectAltNameMatcher_SanType)
+ *p = x
+ return p
+}
+
+func (x SubjectAltNameMatcher_SanType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SubjectAltNameMatcher_SanType) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[1].Descriptor()
+}
+
+func (SubjectAltNameMatcher_SanType) Type() protoreflect.EnumType {
+ return &file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[1]
+}
+
+func (x SubjectAltNameMatcher_SanType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SubjectAltNameMatcher_SanType.Descriptor instead.
+func (SubjectAltNameMatcher_SanType) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{5, 0}
+}
+
+// Peer certificate verification mode.
+type CertificateValidationContext_TrustChainVerification int32
+
+const (
+ // Perform default certificate verification (e.g., against CA / verification lists)
+ CertificateValidationContext_VERIFY_TRUST_CHAIN CertificateValidationContext_TrustChainVerification = 0
+ // Connections where the certificate fails verification will be permitted.
+ // For HTTP connections, the result of certificate verification can be used in route matching. (
+ // see :ref:`validated ` ).
+ CertificateValidationContext_ACCEPT_UNTRUSTED CertificateValidationContext_TrustChainVerification = 1
+)
+
+// Enum value maps for CertificateValidationContext_TrustChainVerification.
+var (
+ CertificateValidationContext_TrustChainVerification_name = map[int32]string{
+ 0: "VERIFY_TRUST_CHAIN",
+ 1: "ACCEPT_UNTRUSTED",
+ }
+ CertificateValidationContext_TrustChainVerification_value = map[string]int32{
+ "VERIFY_TRUST_CHAIN": 0,
+ "ACCEPT_UNTRUSTED": 1,
+ }
+)
+
+func (x CertificateValidationContext_TrustChainVerification) Enum() *CertificateValidationContext_TrustChainVerification {
+ p := new(CertificateValidationContext_TrustChainVerification)
+ *p = x
+ return p
+}
+
+func (x CertificateValidationContext_TrustChainVerification) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CertificateValidationContext_TrustChainVerification) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[2].Descriptor()
+}
+
+func (CertificateValidationContext_TrustChainVerification) Type() protoreflect.EnumType {
+ return &file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes[2]
+}
+
+func (x CertificateValidationContext_TrustChainVerification) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use CertificateValidationContext_TrustChainVerification.Descriptor instead.
+func (CertificateValidationContext_TrustChainVerification) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{6, 0}
+}
+
+// [#next-free-field: 6]
+type TlsParameters struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Minimum TLS protocol version. By default, it's “TLSv1_2“ for both clients and servers.
+ //
+ // TLS protocol versions below TLSv1_2 require setting compatible ciphers with the
+ // “cipher_suites“ setting as the default ciphers no longer include compatible ciphers.
+ //
+ // .. attention::
+ //
+ // Using TLS protocol versions below TLSv1_2 has serious security considerations and risks.
+ TlsMinimumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,1,opt,name=tls_minimum_protocol_version,json=tlsMinimumProtocolVersion,proto3,enum=envoy.extensions.transport_sockets.tls.v3.TlsParameters_TlsProtocol" json:"tls_minimum_protocol_version,omitempty"`
+ // Maximum TLS protocol version. By default, it's “TLSv1_2“ for clients and “TLSv1_3“ for
+ // servers.
+ TlsMaximumProtocolVersion TlsParameters_TlsProtocol `protobuf:"varint,2,opt,name=tls_maximum_protocol_version,json=tlsMaximumProtocolVersion,proto3,enum=envoy.extensions.transport_sockets.tls.v3.TlsParameters_TlsProtocol" json:"tls_maximum_protocol_version,omitempty"`
+ // If specified, the TLS listener will only support the specified `cipher list
+ // `_
+ // when negotiating TLS 1.0-1.2 (this setting has no effect when negotiating TLS 1.3).
+ //
+ // If not specified, a default list will be used. Defaults are different for server (downstream) and
+ // client (upstream) TLS configurations.
+ // Defaults will change over time in response to security considerations; If you care, configure
+ // it instead of using the default.
+ //
+ // In non-FIPS builds, the default server cipher list is:
+ //
+ // .. code-block:: none
+ //
+ // [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305]
+ // [ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305]
+ // ECDHE-ECDSA-AES256-GCM-SHA384
+ // ECDHE-RSA-AES256-GCM-SHA384
+ //
+ // In builds using :ref:`BoringSSL FIPS `, the default server cipher list is:
+ //
+ // .. code-block:: none
+ //
+ // ECDHE-ECDSA-AES128-GCM-SHA256
+ // ECDHE-RSA-AES128-GCM-SHA256
+ // ECDHE-ECDSA-AES256-GCM-SHA384
+ // ECDHE-RSA-AES256-GCM-SHA384
+ //
+ // In non-FIPS builds, the default client cipher list is:
+ //
+ // .. code-block:: none
+ //
+ // [ECDHE-ECDSA-AES128-GCM-SHA256|ECDHE-ECDSA-CHACHA20-POLY1305]
+ // [ECDHE-RSA-AES128-GCM-SHA256|ECDHE-RSA-CHACHA20-POLY1305]
+ // ECDHE-ECDSA-AES256-GCM-SHA384
+ // ECDHE-RSA-AES256-GCM-SHA384
+ //
+ // In builds using :ref:`BoringSSL FIPS `, the default client cipher list is:
+ //
+ // .. code-block:: none
+ //
+ // ECDHE-ECDSA-AES128-GCM-SHA256
+ // ECDHE-RSA-AES128-GCM-SHA256
+ // ECDHE-ECDSA-AES256-GCM-SHA384
+ // ECDHE-RSA-AES256-GCM-SHA384
+ CipherSuites []string `protobuf:"bytes,3,rep,name=cipher_suites,json=cipherSuites,proto3" json:"cipher_suites,omitempty"`
+ // If specified, the TLS connection will only support the specified ECDH
+ // curves. If not specified, the default curves will be used.
+ //
+ // In non-FIPS builds, the default curves are:
+ //
+ // .. code-block:: none
+ //
+ // X25519
+ // P-256
+ //
+ // In builds using :ref:`BoringSSL FIPS `, the default curve is:
+ //
+ // .. code-block:: none
+ //
+ // P-256
+ EcdhCurves []string `protobuf:"bytes,4,rep,name=ecdh_curves,json=ecdhCurves,proto3" json:"ecdh_curves,omitempty"`
+ // If specified, the TLS connection will only support the specified signature algorithms.
+ // The list is ordered by preference.
+ // If not specified, the default signature algorithms defined by BoringSSL will be used.
+ //
+ // Default signature algorithms selected by BoringSSL (may be out of date):
+ //
+ // .. code-block:: none
+ //
+ // ecdsa_secp256r1_sha256
+ // rsa_pss_rsae_sha256
+ // rsa_pkcs1_sha256
+ // ecdsa_secp384r1_sha384
+ // rsa_pss_rsae_sha384
+ // rsa_pkcs1_sha384
+ // rsa_pss_rsae_sha512
+ // rsa_pkcs1_sha512
+ // rsa_pkcs1_sha1
+ //
+ // Signature algorithms supported by BoringSSL (may be out of date):
+ //
+ // .. code-block:: none
+ //
+ // rsa_pkcs1_sha256
+ // rsa_pkcs1_sha384
+ // rsa_pkcs1_sha512
+ // ecdsa_secp256r1_sha256
+ // ecdsa_secp384r1_sha384
+ // ecdsa_secp521r1_sha512
+ // rsa_pss_rsae_sha256
+ // rsa_pss_rsae_sha384
+ // rsa_pss_rsae_sha512
+ // ed25519
+ // rsa_pkcs1_sha1
+ // ecdsa_sha1
+ SignatureAlgorithms []string `protobuf:"bytes,5,rep,name=signature_algorithms,json=signatureAlgorithms,proto3" json:"signature_algorithms,omitempty"`
+}
+
+func (x *TlsParameters) Reset() {
+ *x = TlsParameters{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TlsParameters) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TlsParameters) ProtoMessage() {}
+
+func (x *TlsParameters) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TlsParameters.ProtoReflect.Descriptor instead.
+func (*TlsParameters) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TlsParameters) GetTlsMinimumProtocolVersion() TlsParameters_TlsProtocol {
+ if x != nil {
+ return x.TlsMinimumProtocolVersion
+ }
+ return TlsParameters_TLS_AUTO
+}
+
+func (x *TlsParameters) GetTlsMaximumProtocolVersion() TlsParameters_TlsProtocol {
+ if x != nil {
+ return x.TlsMaximumProtocolVersion
+ }
+ return TlsParameters_TLS_AUTO
+}
+
+func (x *TlsParameters) GetCipherSuites() []string {
+ if x != nil {
+ return x.CipherSuites
+ }
+ return nil
+}
+
+func (x *TlsParameters) GetEcdhCurves() []string {
+ if x != nil {
+ return x.EcdhCurves
+ }
+ return nil
+}
+
+func (x *TlsParameters) GetSignatureAlgorithms() []string {
+ if x != nil {
+ return x.SignatureAlgorithms
+ }
+ return nil
+}
+
+// BoringSSL private key method configuration. The private key methods are used for external
+// (potentially asynchronous) signing and decryption operations. Some use cases for private key
+// methods would be TPM support and TLS acceleration.
+type PrivateKeyProvider struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Private key method provider name. The name must match a
+ // supported private key method provider type.
+ ProviderName string `protobuf:"bytes,1,opt,name=provider_name,json=providerName,proto3" json:"provider_name,omitempty"`
+ // Private key method provider specific configuration.
+ //
+ // Types that are assignable to ConfigType:
+ //
+ // *PrivateKeyProvider_TypedConfig
+ ConfigType isPrivateKeyProvider_ConfigType `protobuf_oneof:"config_type"`
+ // If the private key provider isn't available (eg. the required hardware capability doesn't existed),
+ // Envoy will fallback to the BoringSSL default implementation when the “fallback“ is true.
+ // The default value is “false“.
+ Fallback bool `protobuf:"varint,4,opt,name=fallback,proto3" json:"fallback,omitempty"`
+}
+
+func (x *PrivateKeyProvider) Reset() {
+ *x = PrivateKeyProvider{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PrivateKeyProvider) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PrivateKeyProvider) ProtoMessage() {}
+
+func (x *PrivateKeyProvider) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PrivateKeyProvider.ProtoReflect.Descriptor instead.
+func (*PrivateKeyProvider) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *PrivateKeyProvider) GetProviderName() string {
+ if x != nil {
+ return x.ProviderName
+ }
+ return ""
+}
+
+func (m *PrivateKeyProvider) GetConfigType() isPrivateKeyProvider_ConfigType {
+ if m != nil {
+ return m.ConfigType
+ }
+ return nil
+}
+
+func (x *PrivateKeyProvider) GetTypedConfig() *anypb.Any {
+ if x, ok := x.GetConfigType().(*PrivateKeyProvider_TypedConfig); ok {
+ return x.TypedConfig
+ }
+ return nil
+}
+
+func (x *PrivateKeyProvider) GetFallback() bool {
+ if x != nil {
+ return x.Fallback
+ }
+ return false
+}
+
+type isPrivateKeyProvider_ConfigType interface {
+ isPrivateKeyProvider_ConfigType()
+}
+
+type PrivateKeyProvider_TypedConfig struct {
+ TypedConfig *anypb.Any `protobuf:"bytes,3,opt,name=typed_config,json=typedConfig,proto3,oneof"`
+}
+
+func (*PrivateKeyProvider_TypedConfig) isPrivateKeyProvider_ConfigType() {}
+
+// [#next-free-field: 9]
+type TlsCertificate struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The TLS certificate chain.
+ //
+ // If “certificate_chain“ is a filesystem path, a watch will be added to the
+ // parent directory for any file moves to support rotation. This currently
+ // only applies to dynamic secrets, when the “TlsCertificate“ is delivered via
+ // SDS.
+ CertificateChain *v3.DataSource `protobuf:"bytes,1,opt,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"`
+ // The TLS private key.
+ //
+ // If “private_key“ is a filesystem path, a watch will be added to the parent
+ // directory for any file moves to support rotation. This currently only
+ // applies to dynamic secrets, when the “TlsCertificate“ is delivered via SDS.
+ PrivateKey *v3.DataSource `protobuf:"bytes,2,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
+ // “Pkcs12“ data containing TLS certificate, chain, and private key.
+ //
+ // If “pkcs12“ is a filesystem path, the file will be read, but no watch will
+ // be added to the parent directory, since “pkcs12“ isn't used by SDS.
+ // This field is mutually exclusive with “certificate_chain“, “private_key“ and “private_key_provider“.
+ // This can't be marked as “oneof“ due to API compatibility reasons. Setting
+ // both :ref:`private_key `,
+ // :ref:`certificate_chain `,
+ // or :ref:`private_key_provider `
+ // and :ref:`pkcs12 `
+ // fields will result in an error. Use :ref:`password
+ // `
+ // to specify the password to unprotect the “PKCS12“ data, if necessary.
+ Pkcs12 *v3.DataSource `protobuf:"bytes,8,opt,name=pkcs12,proto3" json:"pkcs12,omitempty"`
+ // If specified, updates of file-based “certificate_chain“ and “private_key“
+ // sources will be triggered by this watch. The certificate/key pair will be
+ // read together and validated for atomic read consistency (i.e. no
+ // intervening modification occurred between cert/key read, verified by file
+ // hash comparisons). This allows explicit control over the path watched, by
+ // default the parent directories of the filesystem paths in
+ // “certificate_chain“ and “private_key“ are watched if this field is not
+ // specified. This only applies when a “TlsCertificate“ is delivered by SDS
+ // with references to filesystem paths. See the :ref:`SDS key rotation
+ // ` documentation for further details.
+ WatchedDirectory *v3.WatchedDirectory `protobuf:"bytes,7,opt,name=watched_directory,json=watchedDirectory,proto3" json:"watched_directory,omitempty"`
+ // BoringSSL private key method provider. This is an alternative to :ref:`private_key
+ // ` field. This can't be
+ // marked as “oneof“ due to API compatibility reasons. Setting both :ref:`private_key
+ // ` and
+ // :ref:`private_key_provider
+ // ` fields will result in an
+ // error.
+ PrivateKeyProvider *PrivateKeyProvider `protobuf:"bytes,6,opt,name=private_key_provider,json=privateKeyProvider,proto3" json:"private_key_provider,omitempty"`
+ // The password to decrypt the TLS private key. If this field is not set, it is assumed that the
+ // TLS private key is not password encrypted.
+ Password *v3.DataSource `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
+ // The OCSP response to be stapled with this certificate during the handshake.
+ // The response must be DER-encoded and may only be provided via “filename“ or
+ // “inline_bytes“. The response may pertain to only one certificate.
+ OcspStaple *v3.DataSource `protobuf:"bytes,4,opt,name=ocsp_staple,json=ocspStaple,proto3" json:"ocsp_staple,omitempty"`
+ // [#not-implemented-hide:]
+ SignedCertificateTimestamp []*v3.DataSource `protobuf:"bytes,5,rep,name=signed_certificate_timestamp,json=signedCertificateTimestamp,proto3" json:"signed_certificate_timestamp,omitempty"`
+}
+
+func (x *TlsCertificate) Reset() {
+ *x = TlsCertificate{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TlsCertificate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TlsCertificate) ProtoMessage() {}
+
+func (x *TlsCertificate) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TlsCertificate.ProtoReflect.Descriptor instead.
+func (*TlsCertificate) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *TlsCertificate) GetCertificateChain() *v3.DataSource {
+ if x != nil {
+ return x.CertificateChain
+ }
+ return nil
+}
+
+func (x *TlsCertificate) GetPrivateKey() *v3.DataSource {
+ if x != nil {
+ return x.PrivateKey
+ }
+ return nil
+}
+
+func (x *TlsCertificate) GetPkcs12() *v3.DataSource {
+ if x != nil {
+ return x.Pkcs12
+ }
+ return nil
+}
+
+func (x *TlsCertificate) GetWatchedDirectory() *v3.WatchedDirectory {
+ if x != nil {
+ return x.WatchedDirectory
+ }
+ return nil
+}
+
+func (x *TlsCertificate) GetPrivateKeyProvider() *PrivateKeyProvider {
+ if x != nil {
+ return x.PrivateKeyProvider
+ }
+ return nil
+}
+
+func (x *TlsCertificate) GetPassword() *v3.DataSource {
+ if x != nil {
+ return x.Password
+ }
+ return nil
+}
+
+func (x *TlsCertificate) GetOcspStaple() *v3.DataSource {
+ if x != nil {
+ return x.OcspStaple
+ }
+ return nil
+}
+
+func (x *TlsCertificate) GetSignedCertificateTimestamp() []*v3.DataSource {
+ if x != nil {
+ return x.SignedCertificateTimestamp
+ }
+ return nil
+}
+
+type TlsSessionTicketKeys struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Keys for encrypting and decrypting TLS session tickets. The
+ // first key in the array contains the key to encrypt all new sessions created by this context.
+ // All keys are candidates for decrypting received tickets. This allows for easy rotation of keys
+ // by, for example, putting the new key first, and the previous key second.
+ //
+ // If :ref:`session_ticket_keys `
+ // is not specified, the TLS library will still support resuming sessions via tickets, but it will
+ // use an internally-generated and managed key, so sessions cannot be resumed across hot restarts
+ // or on different hosts.
+ //
+ // Each key must contain exactly 80 bytes of cryptographically-secure random data. For
+ // example, the output of “openssl rand 80“.
+ //
+ // .. attention::
+ //
+ // Using this feature has serious security considerations and risks. Improper handling of keys
+ // may result in loss of secrecy in connections, even if ciphers supporting perfect forward
+ // secrecy are used. See https://www.imperialviolet.org/2013/06/27/botchingpfs.html for some
+ // discussion. To minimize the risk, you must:
+ //
+ // * Keep the session ticket keys at least as secure as your TLS certificate private keys
+ // * Rotate session ticket keys at least daily, and preferably hourly
+ // * Always generate keys using a cryptographically-secure random data source
+ Keys []*v3.DataSource `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"`
+}
+
+func (x *TlsSessionTicketKeys) Reset() {
+ *x = TlsSessionTicketKeys{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TlsSessionTicketKeys) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TlsSessionTicketKeys) ProtoMessage() {}
+
+func (x *TlsSessionTicketKeys) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TlsSessionTicketKeys.ProtoReflect.Descriptor instead.
+func (*TlsSessionTicketKeys) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *TlsSessionTicketKeys) GetKeys() []*v3.DataSource {
+ if x != nil {
+ return x.Keys
+ }
+ return nil
+}
+
+// Indicates a certificate to be obtained from a named CertificateProvider plugin instance.
+// The plugin instances are defined in the client's bootstrap file.
+// The plugin allows certificates to be fetched/refreshed over the network asynchronously with
+// respect to the TLS handshake.
+// [#not-implemented-hide:]
+type CertificateProviderPluginInstance struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Provider instance name.
+ //
+ // Instance names should generally be defined not in terms of the underlying provider
+ // implementation (e.g., "file_watcher") but rather in terms of the function of the
+ // certificates (e.g., "foo_deployment_identity").
+ InstanceName string `protobuf:"bytes,1,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"`
+ // Opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify
+ // a root-certificate (validation context) or "example.com" to specify a certificate for a
+ // particular domain. Not all provider instances will actually use this field, so the value
+ // defaults to the empty string.
+ CertificateName string `protobuf:"bytes,2,opt,name=certificate_name,json=certificateName,proto3" json:"certificate_name,omitempty"`
+}
+
+func (x *CertificateProviderPluginInstance) Reset() {
+ *x = CertificateProviderPluginInstance{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CertificateProviderPluginInstance) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CertificateProviderPluginInstance) ProtoMessage() {}
+
+func (x *CertificateProviderPluginInstance) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CertificateProviderPluginInstance.ProtoReflect.Descriptor instead.
+func (*CertificateProviderPluginInstance) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CertificateProviderPluginInstance) GetInstanceName() string {
+ if x != nil {
+ return x.InstanceName
+ }
+ return ""
+}
+
+func (x *CertificateProviderPluginInstance) GetCertificateName() string {
+ if x != nil {
+ return x.CertificateName
+ }
+ return ""
+}
+
+// Matcher for subject alternative names, to match both type and value of the SAN.
+type SubjectAltNameMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Specification of type of SAN. Note that the default enum value is an invalid choice.
+ SanType SubjectAltNameMatcher_SanType `protobuf:"varint,1,opt,name=san_type,json=sanType,proto3,enum=envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher_SanType" json:"san_type,omitempty"`
+ // Matcher for SAN value.
+ //
+ // The string matching for OTHER_NAME SAN values depends on their ASN.1 type:
+ //
+ // - OBJECT: Validated against its dotted numeric notation (e.g., "1.2.3.4")
+ // - BOOLEAN: Validated against strings "true" or "false"
+ // - INTEGER/ENUMERATED: Validated against a string containing the integer value
+ // - NULL: Validated against an empty string
+ // - Other types: Validated directly against the string value
+ Matcher *v31.StringMatcher `protobuf:"bytes,2,opt,name=matcher,proto3" json:"matcher,omitempty"`
+ // OID Value which is required if OTHER_NAME SAN type is used.
+ // For example, UPN OID is 1.3.6.1.4.1.311.20.2.3
+ // (Reference: http://oid-info.com/get/1.3.6.1.4.1.311.20.2.3).
+ //
+ // If set for SAN types other than OTHER_NAME, it will be ignored.
+ Oid string `protobuf:"bytes,3,opt,name=oid,proto3" json:"oid,omitempty"`
+}
+
+func (x *SubjectAltNameMatcher) Reset() {
+ *x = SubjectAltNameMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SubjectAltNameMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SubjectAltNameMatcher) ProtoMessage() {}
+
+func (x *SubjectAltNameMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SubjectAltNameMatcher.ProtoReflect.Descriptor instead.
+func (*SubjectAltNameMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *SubjectAltNameMatcher) GetSanType() SubjectAltNameMatcher_SanType {
+ if x != nil {
+ return x.SanType
+ }
+ return SubjectAltNameMatcher_SAN_TYPE_UNSPECIFIED
+}
+
+func (x *SubjectAltNameMatcher) GetMatcher() *v31.StringMatcher {
+ if x != nil {
+ return x.Matcher
+ }
+ return nil
+}
+
+func (x *SubjectAltNameMatcher) GetOid() string {
+ if x != nil {
+ return x.Oid
+ }
+ return ""
+}
+
+// [#next-free-field: 18]
+type CertificateValidationContext struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // TLS certificate data containing certificate authority certificates to use in verifying
+ // a presented peer certificate (e.g. server certificate for clusters or client certificate
+ // for listeners). If not specified and a peer certificate is presented it will not be
+ // verified. By default, a client certificate is optional, unless one of the additional
+ // options (:ref:`require_client_certificate
+ // `,
+ // :ref:`verify_certificate_spki
+ // `,
+ // :ref:`verify_certificate_hash
+ // `, or
+ // :ref:`match_typed_subject_alt_names
+ // `) is also
+ // specified.
+ //
+ // It can optionally contain certificate revocation lists, in which case Envoy will verify
+ // that the presented peer certificate has not been revoked by one of the included CRLs. Note
+ // that if a CRL is provided for any certificate authority in a trust chain, a CRL must be
+ // provided for all certificate authorities in that chain. Failure to do so will result in
+ // verification failure for both revoked and unrevoked certificates from that chain.
+ // The behavior of requiring all certificates to contain CRLs can be altered by
+ // setting :ref:`only_verify_leaf_cert_crl `
+ // true. If set to true, only the final certificate in the chain undergoes CRL verification.
+ //
+ // See :ref:`the TLS overview ` for a list of common
+ // system CA locations.
+ //
+ // If “trusted_ca“ is a filesystem path, a watch will be added to the parent
+ // directory for any file moves to support rotation. This currently only
+ // applies to dynamic secrets, when the “CertificateValidationContext“ is
+ // delivered via SDS.
+ //
+ // X509_V_FLAG_PARTIAL_CHAIN is set by default, so non-root/intermediate ca certificate in “trusted_ca“
+ // can be treated as trust anchor as well. It allows verification with building valid partial chain instead
+ // of a full chain.
+ //
+ // If “ca_certificate_provider_instance“ is set, it takes precedence over “trusted_ca“.
+ TrustedCa *v3.DataSource `protobuf:"bytes,1,opt,name=trusted_ca,json=trustedCa,proto3" json:"trusted_ca,omitempty"`
+ // Certificate provider instance for fetching TLS certificates.
+ //
+ // If set, takes precedence over “trusted_ca“.
+ // [#not-implemented-hide:]
+ CaCertificateProviderInstance *CertificateProviderPluginInstance `protobuf:"bytes,13,opt,name=ca_certificate_provider_instance,json=caCertificateProviderInstance,proto3" json:"ca_certificate_provider_instance,omitempty"`
+ // Use system root certs for validation.
+ // If present, system root certs are used only if neither of the “trusted_ca“
+ // or “ca_certificate_provider_instance“ fields are set.
+ // [#not-implemented-hide:]
+ SystemRootCerts *CertificateValidationContext_SystemRootCerts `protobuf:"bytes,17,opt,name=system_root_certs,json=systemRootCerts,proto3" json:"system_root_certs,omitempty"`
+ // If specified, updates of a file-based “trusted_ca“ source will be triggered
+ // by this watch. This allows explicit control over the path watched, by
+ // default the parent directory of the filesystem path in “trusted_ca“ is
+ // watched if this field is not specified. This only applies when a
+ // “CertificateValidationContext“ is delivered by SDS with references to
+ // filesystem paths. See the :ref:`SDS key rotation `
+ // documentation for further details.
+ WatchedDirectory *v3.WatchedDirectory `protobuf:"bytes,11,opt,name=watched_directory,json=watchedDirectory,proto3" json:"watched_directory,omitempty"`
+ // An optional list of base64-encoded SHA-256 hashes. If specified, Envoy will verify that the
+ // SHA-256 of the DER-encoded Subject Public Key Information (SPKI) of the presented certificate
+ // matches one of the specified values.
+ //
+ // A base64-encoded SHA-256 of the Subject Public Key Information (SPKI) of the certificate
+ // can be generated with the following command:
+ //
+ // .. code-block:: bash
+ //
+ // $ openssl x509 -in path/to/client.crt -noout -pubkey
+ // | openssl pkey -pubin -outform DER
+ // | openssl dgst -sha256 -binary
+ // | openssl enc -base64
+ // NvqYIYSbgK2vCJpQhObf77vv+bQWtc5ek5RIOwPiC9A=
+ //
+ // This is the format used in HTTP Public Key Pinning.
+ //
+ // When both:
+ // :ref:`verify_certificate_hash
+ // ` and
+ // :ref:`verify_certificate_spki
+ // ` are specified,
+ // a hash matching value from either of the lists will result in the certificate being accepted.
+ //
+ // .. attention::
+ //
+ // This option is preferred over :ref:`verify_certificate_hash
+ // `,
+ // because SPKI is tied to a private key, so it doesn't change when the certificate
+ // is renewed using the same private key.
+ VerifyCertificateSpki []string `protobuf:"bytes,3,rep,name=verify_certificate_spki,json=verifyCertificateSpki,proto3" json:"verify_certificate_spki,omitempty"`
+ // An optional list of hex-encoded SHA-256 hashes. If specified, Envoy will verify that
+ // the SHA-256 of the DER-encoded presented certificate matches one of the specified values.
+ //
+ // A hex-encoded SHA-256 of the certificate can be generated with the following command:
+ //
+ // .. code-block:: bash
+ //
+ // $ openssl x509 -in path/to/client.crt -outform DER | openssl dgst -sha256 | cut -d" " -f2
+ // df6ff72fe9116521268f6f2dd4966f51df479883fe7037b39f75916ac3049d1a
+ //
+ // A long hex-encoded and colon-separated SHA-256 (a.k.a. "fingerprint") of the certificate
+ // can be generated with the following command:
+ //
+ // .. code-block:: bash
+ //
+ // $ openssl x509 -in path/to/client.crt -noout -fingerprint -sha256 | cut -d"=" -f2
+ // DF:6F:F7:2F:E9:11:65:21:26:8F:6F:2D:D4:96:6F:51:DF:47:98:83:FE:70:37:B3:9F:75:91:6A:C3:04:9D:1A
+ //
+ // Both of those formats are acceptable.
+ //
+ // When both:
+ // :ref:`verify_certificate_hash
+ // ` and
+ // :ref:`verify_certificate_spki
+ // ` are specified,
+ // a hash matching value from either of the lists will result in the certificate being accepted.
+ VerifyCertificateHash []string `protobuf:"bytes,2,rep,name=verify_certificate_hash,json=verifyCertificateHash,proto3" json:"verify_certificate_hash,omitempty"`
+ // An optional list of Subject Alternative name matchers. If specified, Envoy will verify that the
+ // Subject Alternative Name of the presented certificate matches one of the specified matchers.
+ // The matching uses "any" semantics, that is to say, the SAN is verified if at least one matcher is
+ // matched.
+ //
+ // When a certificate has wildcard DNS SAN entries, to match a specific client, it should be
+ // configured with exact match type in the :ref:`string matcher `.
+ // For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com",
+ // it should be configured as shown below.
+ //
+ // .. code-block:: yaml
+ //
+ // match_typed_subject_alt_names:
+ // - san_type: DNS
+ // matcher:
+ // exact: "api.example.com"
+ //
+ // .. attention::
+ //
+ // Subject Alternative Names are easily spoofable and verifying only them is insecure,
+ // therefore this option must be used together with :ref:`trusted_ca
+ // `.
+ MatchTypedSubjectAltNames []*SubjectAltNameMatcher `protobuf:"bytes,15,rep,name=match_typed_subject_alt_names,json=matchTypedSubjectAltNames,proto3" json:"match_typed_subject_alt_names,omitempty"`
+ // This field is deprecated in favor of
+ // :ref:`match_typed_subject_alt_names
+ // `.
+ // Note that if both this field and :ref:`match_typed_subject_alt_names
+ // `
+ // are specified, the former (deprecated field) is ignored.
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/common.proto.
+ MatchSubjectAltNames []*v31.StringMatcher `protobuf:"bytes,9,rep,name=match_subject_alt_names,json=matchSubjectAltNames,proto3" json:"match_subject_alt_names,omitempty"`
+ // [#not-implemented-hide:] Must present signed certificate time-stamp.
+ RequireSignedCertificateTimestamp *wrapperspb.BoolValue `protobuf:"bytes,6,opt,name=require_signed_certificate_timestamp,json=requireSignedCertificateTimestamp,proto3" json:"require_signed_certificate_timestamp,omitempty"`
+ // An optional `certificate revocation list
+ // `_
+ // (in PEM format). If specified, Envoy will verify that the presented peer
+ // certificate has not been revoked by this CRL. If this DataSource contains
+ // multiple CRLs, all of them will be used. Note that if a CRL is provided
+ // for any certificate authority in a trust chain, a CRL must be provided
+ // for all certificate authorities in that chain. Failure to do so will
+ // result in verification failure for both revoked and unrevoked certificates
+ // from that chain. This default behavior can be altered by setting
+ // :ref:`only_verify_leaf_cert_crl ` to
+ // true.
+ //
+ // If “crl“ is a filesystem path, a watch will be added to the parent
+ // directory for any file moves to support rotation. This currently only
+ // applies to dynamic secrets, when the “CertificateValidationContext“ is
+ // delivered via SDS.
+ Crl *v3.DataSource `protobuf:"bytes,7,opt,name=crl,proto3" json:"crl,omitempty"`
+ // If specified, Envoy will not reject expired certificates.
+ AllowExpiredCertificate bool `protobuf:"varint,8,opt,name=allow_expired_certificate,json=allowExpiredCertificate,proto3" json:"allow_expired_certificate,omitempty"`
+ // Certificate trust chain verification mode.
+ TrustChainVerification CertificateValidationContext_TrustChainVerification `protobuf:"varint,10,opt,name=trust_chain_verification,json=trustChainVerification,proto3,enum=envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext_TrustChainVerification" json:"trust_chain_verification,omitempty"`
+ // The configuration of an extension specific certificate validator.
+ // If specified, all validation is done by the specified validator,
+ // and the behavior of all other validation settings is defined by the specified validator (and may be entirely ignored, unused, and unvalidated).
+ // Refer to the documentation for the specified validator. If you do not want a custom validation algorithm, do not set this field.
+ // [#extension-category: envoy.tls.cert_validator]
+ CustomValidatorConfig *v3.TypedExtensionConfig `protobuf:"bytes,12,opt,name=custom_validator_config,json=customValidatorConfig,proto3" json:"custom_validator_config,omitempty"`
+ // If this option is set to true, only the certificate at the end of the
+ // certificate chain will be subject to validation by :ref:`CRL `.
+ OnlyVerifyLeafCertCrl bool `protobuf:"varint,14,opt,name=only_verify_leaf_cert_crl,json=onlyVerifyLeafCertCrl,proto3" json:"only_verify_leaf_cert_crl,omitempty"`
+ // Defines maximum depth of a certificate chain accepted in verification, the default limit is 100, though this can be system-dependent.
+ // This number does not include the leaf but includes the trust anchor, so a depth of 1 allows the leaf and one CA certificate. If a trusted issuer
+ // appears in the chain, but in a depth larger than configured, the certificate validation will fail.
+ // This matches the semantics of “SSL_CTX_set_verify_depth“ in OpenSSL 1.0.x and older versions of BoringSSL. It differs from “SSL_CTX_set_verify_depth“
+ // in OpenSSL 1.1.x and newer versions of BoringSSL in that the trust anchor is included.
+ // Trusted issues are specified by setting :ref:`trusted_ca `
+ MaxVerifyDepth *wrapperspb.UInt32Value `protobuf:"bytes,16,opt,name=max_verify_depth,json=maxVerifyDepth,proto3" json:"max_verify_depth,omitempty"`
+}
+
+func (x *CertificateValidationContext) Reset() {
+ *x = CertificateValidationContext{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CertificateValidationContext) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CertificateValidationContext) ProtoMessage() {}
+
+func (x *CertificateValidationContext) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CertificateValidationContext.ProtoReflect.Descriptor instead.
+func (*CertificateValidationContext) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *CertificateValidationContext) GetTrustedCa() *v3.DataSource {
+ if x != nil {
+ return x.TrustedCa
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetCaCertificateProviderInstance() *CertificateProviderPluginInstance {
+ if x != nil {
+ return x.CaCertificateProviderInstance
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetSystemRootCerts() *CertificateValidationContext_SystemRootCerts {
+ if x != nil {
+ return x.SystemRootCerts
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetWatchedDirectory() *v3.WatchedDirectory {
+ if x != nil {
+ return x.WatchedDirectory
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetVerifyCertificateSpki() []string {
+ if x != nil {
+ return x.VerifyCertificateSpki
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetVerifyCertificateHash() []string {
+ if x != nil {
+ return x.VerifyCertificateHash
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetMatchTypedSubjectAltNames() []*SubjectAltNameMatcher {
+ if x != nil {
+ return x.MatchTypedSubjectAltNames
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/common.proto.
+func (x *CertificateValidationContext) GetMatchSubjectAltNames() []*v31.StringMatcher {
+ if x != nil {
+ return x.MatchSubjectAltNames
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetRequireSignedCertificateTimestamp() *wrapperspb.BoolValue {
+ if x != nil {
+ return x.RequireSignedCertificateTimestamp
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetCrl() *v3.DataSource {
+ if x != nil {
+ return x.Crl
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetAllowExpiredCertificate() bool {
+ if x != nil {
+ return x.AllowExpiredCertificate
+ }
+ return false
+}
+
+func (x *CertificateValidationContext) GetTrustChainVerification() CertificateValidationContext_TrustChainVerification {
+ if x != nil {
+ return x.TrustChainVerification
+ }
+ return CertificateValidationContext_VERIFY_TRUST_CHAIN
+}
+
+func (x *CertificateValidationContext) GetCustomValidatorConfig() *v3.TypedExtensionConfig {
+ if x != nil {
+ return x.CustomValidatorConfig
+ }
+ return nil
+}
+
+func (x *CertificateValidationContext) GetOnlyVerifyLeafCertCrl() bool {
+ if x != nil {
+ return x.OnlyVerifyLeafCertCrl
+ }
+ return false
+}
+
+func (x *CertificateValidationContext) GetMaxVerifyDepth() *wrapperspb.UInt32Value {
+ if x != nil {
+ return x.MaxVerifyDepth
+ }
+ return nil
+}
+
+type CertificateValidationContext_SystemRootCerts struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *CertificateValidationContext_SystemRootCerts) Reset() {
+ *x = CertificateValidationContext_SystemRootCerts{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CertificateValidationContext_SystemRootCerts) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CertificateValidationContext_SystemRootCerts) ProtoMessage() {}
+
+func (x *CertificateValidationContext_SystemRootCerts) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CertificateValidationContext_SystemRootCerts.ProtoReflect.Descriptor instead.
+func (*CertificateValidationContext_SystemRootCerts) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP(), []int{6, 0}
+}
+
+var File_envoy_extensions_transport_sockets_tls_v3_common_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDesc = []byte{
+ 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73,
+ 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76,
+ 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
+ 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70,
+ 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70,
+ 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x04, 0x0a, 0x0d,
+ 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x8f, 0x01,
+ 0x0a, 0x1c, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
+ 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33,
+ 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x54,
+ 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82,
+ 0x01, 0x02, 0x10, 0x01, 0x52, 0x19, 0x74, 0x6c, 0x73, 0x4d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+ 0x8f, 0x01, 0x0a, 0x1c, 0x74, 0x6c, 0x73, 0x5f, 0x6d, 0x61, 0x78, 0x69, 0x6d, 0x75, 0x6d, 0x5f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
+ 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73,
+ 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x42, 0x08, 0xfa, 0x42,
+ 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x19, 0x74, 0x6c, 0x73, 0x4d, 0x61, 0x78, 0x69, 0x6d,
+ 0x75, 0x6d, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x5f, 0x73, 0x75, 0x69, 0x74,
+ 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72,
+ 0x53, 0x75, 0x69, 0x74, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x63, 0x64, 0x68, 0x5f, 0x63,
+ 0x75, 0x72, 0x76, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x63, 0x64,
+ 0x68, 0x43, 0x75, 0x72, 0x76, 0x65, 0x73, 0x12, 0x31, 0x0a, 0x14, 0x73, 0x69, 0x67, 0x6e, 0x61,
+ 0x74, 0x75, 0x72, 0x65, 0x5f, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x18,
+ 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65,
+ 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x22, 0x4f, 0x0a, 0x0b, 0x54, 0x6c,
+ 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x4c, 0x53,
+ 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31,
+ 0x5f, 0x30, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x31, 0x10,
+ 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x32, 0x10, 0x03, 0x12, 0x0b,
+ 0x0a, 0x07, 0x54, 0x4c, 0x53, 0x76, 0x31, 0x5f, 0x33, 0x10, 0x04, 0x3a, 0x26, 0x9a, 0xc5, 0x88,
+ 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
+ 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
+ 0x65, 0x72, 0x73, 0x22, 0xeb, 0x01, 0x0a, 0x12, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b,
+ 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x0d, 0x70, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x70, 0x72, 0x6f, 0x76,
+ 0x69, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x41, 0x0a, 0x0c, 0x74, 0x79, 0x70, 0x65,
+ 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x41, 0x6e, 0x79, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x48, 0x00, 0x52, 0x0b,
+ 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x66,
+ 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x66,
+ 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74,
+ 0x68, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76,
+ 0x69, 0x64, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x22, 0xc8, 0x05, 0x0a, 0x0e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x65, 0x12, 0x4d, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63,
+ 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68,
+ 0x61, 0x69, 0x6e, 0x12, 0x49, 0x0a, 0x0b, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b,
+ 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e,
+ 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4,
+ 0x02, 0x01, 0x52, 0x0a, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x40,
+ 0x0a, 0x06, 0x70, 0x6b, 0x63, 0x73, 0x31, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f,
+ 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x06, 0x70, 0x6b, 0x63, 0x73, 0x31, 0x32,
+ 0x12, 0x53, 0x0a, 0x11, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e,
+ 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x79, 0x52, 0x10, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65,
+ 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x6f, 0x0a, 0x14, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74,
+ 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e,
+ 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x52, 0x12, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x50, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f,
+ 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e,
+ 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4,
+ 0x02, 0x01, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x41, 0x0a, 0x0b,
+ 0x6f, 0x63, 0x73, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x52, 0x0a, 0x6f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x12,
+ 0x62, 0x0a, 0x1c, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18,
+ 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74,
+ 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x1a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43,
+ 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c,
+ 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x22, 0x8b, 0x01, 0x0a,
+ 0x14, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65,
+ 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x44, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x0e, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0xb8,
+ 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x3a, 0x2d, 0x9a, 0xc5, 0x88,
+ 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
+ 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
+ 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x7c, 0x0a, 0x21, 0x43, 0x65,
+ 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12,
+ 0x2c, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52,
+ 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x29, 0x0a,
+ 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc6, 0x02, 0x0a, 0x15, 0x53, 0x75, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x12, 0x6f, 0x0a, 0x08, 0x73, 0x61, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x48, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
+ 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33,
+ 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0a,
+ 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x00, 0x52, 0x07, 0x73, 0x61, 0x6e, 0x54,
+ 0x79, 0x70, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a,
+ 0x01, 0x02, 0x10, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x10, 0x0a,
+ 0x03, 0x6f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6f, 0x69, 0x64, 0x22,
+ 0x60, 0x0a, 0x07, 0x53, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x41,
+ 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x4d, 0x41, 0x49, 0x4c, 0x10, 0x01, 0x12,
+ 0x07, 0x0a, 0x03, 0x44, 0x4e, 0x53, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x55, 0x52, 0x49, 0x10,
+ 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x50, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x10,
+ 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10,
+ 0x05, 0x22, 0xa9, 0x0d, 0x0a, 0x1c, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
+ 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x12, 0x57, 0x0a, 0x0a, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x61,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61,
+ 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x16, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x10,
+ 0x12, 0x0e, 0x63, 0x61, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x52, 0x09, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x43, 0x61, 0x12, 0xad, 0x01, 0x0a, 0x20,
+ 0x63, 0x61, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
+ 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x73, 0x74,
+ 0x61, 0x6e, 0x63, 0x65, 0x42, 0x16, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x10, 0x12, 0x0e, 0x63, 0x61,
+ 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x1d, 0x63, 0x61,
+ 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69,
+ 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x83, 0x01, 0x0a, 0x11,
+ 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74,
+ 0x73, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73,
+ 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
+ 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x65, 0x72, 0x74, 0x73,
+ 0x52, 0x0f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x65, 0x72, 0x74,
+ 0x73, 0x12, 0x53, 0x0a, 0x11, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x64, 0x69, 0x72,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65,
+ 0x2e, 0x76, 0x33, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72, 0x65, 0x63,
+ 0x74, 0x6f, 0x72, 0x79, 0x52, 0x10, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x44, 0x69, 0x72,
+ 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x46, 0x0a, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79,
+ 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x70, 0x6b,
+ 0x69, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x22,
+ 0x06, 0x72, 0x04, 0x10, 0x2c, 0x28, 0x2c, 0x52, 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43,
+ 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x70, 0x6b, 0x69, 0x12, 0x46,
+ 0x0a, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42,
+ 0x0e, 0xfa, 0x42, 0x0b, 0x92, 0x01, 0x08, 0x22, 0x06, 0x72, 0x04, 0x10, 0x40, 0x28, 0x5f, 0x52,
+ 0x15, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
+ 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, 0x82, 0x01, 0x0a, 0x1d, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61,
+ 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65,
+ 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x52, 0x19, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x68, 0x0a, 0x17, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74,
+ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52,
+ 0x14, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x6c, 0x74,
+ 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x6b, 0x0a, 0x24, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
+ 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
+ 0x21, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65,
+ 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
+ 0x6d, 0x70, 0x12, 0x32, 0x0a, 0x03, 0x63, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63,
+ 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x52, 0x03, 0x63, 0x72, 0x6c, 0x12, 0x3a, 0x0a, 0x19, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f,
+ 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x61, 0x6c, 0x6c, 0x6f, 0x77,
+ 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
+ 0x74, 0x65, 0x12, 0xa2, 0x01, 0x0a, 0x18, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x63, 0x68, 0x61,
+ 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x5e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
+ 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76,
+ 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x54,
+ 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52,
+ 0x16, 0x74, 0x72, 0x75, 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x62, 0x0a, 0x17, 0x63, 0x75, 0x73, 0x74, 0x6f,
+ 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e,
+ 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x52, 0x15, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x56, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x38, 0x0a, 0x19, 0x6f,
+ 0x6e, 0x6c, 0x79, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x6c, 0x65, 0x61, 0x66, 0x5f,
+ 0x63, 0x65, 0x72, 0x74, 0x5f, 0x63, 0x72, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15,
+ 0x6f, 0x6e, 0x6c, 0x79, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x4c, 0x65, 0x61, 0x66, 0x43, 0x65,
+ 0x72, 0x74, 0x43, 0x72, 0x6c, 0x12, 0x4f, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x65, 0x72,
+ 0x69, 0x66, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa,
+ 0x42, 0x04, 0x2a, 0x02, 0x18, 0x64, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66,
+ 0x79, 0x44, 0x65, 0x70, 0x74, 0x68, 0x1a, 0x11, 0x0a, 0x0f, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
+ 0x52, 0x6f, 0x6f, 0x74, 0x43, 0x65, 0x72, 0x74, 0x73, 0x22, 0x46, 0x0a, 0x16, 0x54, 0x72, 0x75,
+ 0x73, 0x74, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x5f, 0x54, 0x52,
+ 0x55, 0x53, 0x54, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x41,
+ 0x43, 0x43, 0x45, 0x50, 0x54, 0x5f, 0x55, 0x4e, 0x54, 0x52, 0x55, 0x53, 0x54, 0x45, 0x44, 0x10,
+ 0x01, 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x65, 0x72, 0x74,
+ 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04,
+ 0x08, 0x05, 0x10, 0x06, 0x52, 0x17, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x5f, 0x73, 0x75, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x6c, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x42, 0xa8, 0x01,
+ 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
+ 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76,
+ 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
+ 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72,
+ 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f,
+ 0x76, 0x33, 0x3b, 0x74, 0x6c, 0x73, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescOnce sync.Once
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescData = file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDesc
+)
+
+func file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescData)
+ })
+ return file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDescData
+}
+
+var file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
+var file_envoy_extensions_transport_sockets_tls_v3_common_proto_goTypes = []interface{}{
+ (TlsParameters_TlsProtocol)(0), // 0: envoy.extensions.transport_sockets.tls.v3.TlsParameters.TlsProtocol
+ (SubjectAltNameMatcher_SanType)(0), // 1: envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher.SanType
+ (CertificateValidationContext_TrustChainVerification)(0), // 2: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.TrustChainVerification
+ (*TlsParameters)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.TlsParameters
+ (*PrivateKeyProvider)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider
+ (*TlsCertificate)(nil), // 5: envoy.extensions.transport_sockets.tls.v3.TlsCertificate
+ (*TlsSessionTicketKeys)(nil), // 6: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys
+ (*CertificateProviderPluginInstance)(nil), // 7: envoy.extensions.transport_sockets.tls.v3.CertificateProviderPluginInstance
+ (*SubjectAltNameMatcher)(nil), // 8: envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher
+ (*CertificateValidationContext)(nil), // 9: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext
+ (*CertificateValidationContext_SystemRootCerts)(nil), // 10: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.SystemRootCerts
+ (*anypb.Any)(nil), // 11: google.protobuf.Any
+ (*v3.DataSource)(nil), // 12: envoy.config.core.v3.DataSource
+ (*v3.WatchedDirectory)(nil), // 13: envoy.config.core.v3.WatchedDirectory
+ (*v31.StringMatcher)(nil), // 14: envoy.type.matcher.v3.StringMatcher
+ (*wrapperspb.BoolValue)(nil), // 15: google.protobuf.BoolValue
+ (*v3.TypedExtensionConfig)(nil), // 16: envoy.config.core.v3.TypedExtensionConfig
+ (*wrapperspb.UInt32Value)(nil), // 17: google.protobuf.UInt32Value
+}
+var file_envoy_extensions_transport_sockets_tls_v3_common_proto_depIdxs = []int32{
+ 0, // 0: envoy.extensions.transport_sockets.tls.v3.TlsParameters.tls_minimum_protocol_version:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsParameters.TlsProtocol
+ 0, // 1: envoy.extensions.transport_sockets.tls.v3.TlsParameters.tls_maximum_protocol_version:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsParameters.TlsProtocol
+ 11, // 2: envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider.typed_config:type_name -> google.protobuf.Any
+ 12, // 3: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.certificate_chain:type_name -> envoy.config.core.v3.DataSource
+ 12, // 4: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.private_key:type_name -> envoy.config.core.v3.DataSource
+ 12, // 5: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.pkcs12:type_name -> envoy.config.core.v3.DataSource
+ 13, // 6: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.watched_directory:type_name -> envoy.config.core.v3.WatchedDirectory
+ 4, // 7: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.private_key_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider
+ 12, // 8: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.password:type_name -> envoy.config.core.v3.DataSource
+ 12, // 9: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.ocsp_staple:type_name -> envoy.config.core.v3.DataSource
+ 12, // 10: envoy.extensions.transport_sockets.tls.v3.TlsCertificate.signed_certificate_timestamp:type_name -> envoy.config.core.v3.DataSource
+ 12, // 11: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys.keys:type_name -> envoy.config.core.v3.DataSource
+ 1, // 12: envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher.san_type:type_name -> envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher.SanType
+ 14, // 13: envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher.matcher:type_name -> envoy.type.matcher.v3.StringMatcher
+ 12, // 14: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.trusted_ca:type_name -> envoy.config.core.v3.DataSource
+ 7, // 15: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.ca_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateProviderPluginInstance
+ 10, // 16: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.system_root_certs:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.SystemRootCerts
+ 13, // 17: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.watched_directory:type_name -> envoy.config.core.v3.WatchedDirectory
+ 8, // 18: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.match_typed_subject_alt_names:type_name -> envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher
+ 14, // 19: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.match_subject_alt_names:type_name -> envoy.type.matcher.v3.StringMatcher
+ 15, // 20: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.require_signed_certificate_timestamp:type_name -> google.protobuf.BoolValue
+ 12, // 21: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.crl:type_name -> envoy.config.core.v3.DataSource
+ 2, // 22: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.trust_chain_verification:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.TrustChainVerification
+ 16, // 23: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.custom_validator_config:type_name -> envoy.config.core.v3.TypedExtensionConfig
+ 17, // 24: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext.max_verify_depth:type_name -> google.protobuf.UInt32Value
+ 25, // [25:25] is the sub-list for method output_type
+ 25, // [25:25] is the sub-list for method input_type
+ 25, // [25:25] is the sub-list for extension type_name
+ 25, // [25:25] is the sub-list for extension extendee
+ 0, // [0:25] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_transport_sockets_tls_v3_common_proto_init() }
+func file_envoy_extensions_transport_sockets_tls_v3_common_proto_init() {
+ if File_envoy_extensions_transport_sockets_tls_v3_common_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TlsParameters); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PrivateKeyProvider); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TlsCertificate); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TlsSessionTicketKeys); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CertificateProviderPluginInstance); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SubjectAltNameMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CertificateValidationContext); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CertificateValidationContext_SystemRootCerts); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*PrivateKeyProvider_TypedConfig)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDesc,
+ NumEnums: 3,
+ NumMessages: 8,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_transport_sockets_tls_v3_common_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_transport_sockets_tls_v3_common_proto_depIdxs,
+ EnumInfos: file_envoy_extensions_transport_sockets_tls_v3_common_proto_enumTypes,
+ MessageInfos: file_envoy_extensions_transport_sockets_tls_v3_common_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_transport_sockets_tls_v3_common_proto = out.File
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_rawDesc = nil
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_goTypes = nil
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/common.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/common.pb.validate.go
new file mode 100644
index 000000000..6e32f5af5
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/common.pb.validate.go
@@ -0,0 +1,1657 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/transport_sockets/tls/v3/common.proto
+
+package tlsv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on TlsParameters with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *TlsParameters) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TlsParameters with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in TlsParametersMultiError, or
+// nil if none found.
+func (m *TlsParameters) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TlsParameters) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMinimumProtocolVersion())]; !ok {
+ err := TlsParametersValidationError{
+ field: "TlsMinimumProtocolVersion",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := TlsParameters_TlsProtocol_name[int32(m.GetTlsMaximumProtocolVersion())]; !ok {
+ err := TlsParametersValidationError{
+ field: "TlsMaximumProtocolVersion",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return TlsParametersMultiError(errors)
+ }
+
+ return nil
+}
+
+// TlsParametersMultiError is an error wrapping multiple validation errors
+// returned by TlsParameters.ValidateAll() if the designated constraints
+// aren't met.
+type TlsParametersMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TlsParametersMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TlsParametersMultiError) AllErrors() []error { return m }
+
+// TlsParametersValidationError is the validation error returned by
+// TlsParameters.Validate if the designated constraints aren't met.
+type TlsParametersValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TlsParametersValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TlsParametersValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TlsParametersValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TlsParametersValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TlsParametersValidationError) ErrorName() string { return "TlsParametersValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TlsParametersValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTlsParameters.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TlsParametersValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TlsParametersValidationError{}
+
+// Validate checks the field values on PrivateKeyProvider with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *PrivateKeyProvider) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on PrivateKeyProvider with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// PrivateKeyProviderMultiError, or nil if none found.
+func (m *PrivateKeyProvider) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *PrivateKeyProvider) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetProviderName()) < 1 {
+ err := PrivateKeyProviderValidationError{
+ field: "ProviderName",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for Fallback
+
+ switch v := m.ConfigType.(type) {
+ case *PrivateKeyProvider_TypedConfig:
+ if v == nil {
+ err := PrivateKeyProviderValidationError{
+ field: "ConfigType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetTypedConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PrivateKeyProviderValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PrivateKeyProviderValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PrivateKeyProviderValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return PrivateKeyProviderMultiError(errors)
+ }
+
+ return nil
+}
+
+// PrivateKeyProviderMultiError is an error wrapping multiple validation errors
+// returned by PrivateKeyProvider.ValidateAll() if the designated constraints
+// aren't met.
+type PrivateKeyProviderMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PrivateKeyProviderMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PrivateKeyProviderMultiError) AllErrors() []error { return m }
+
+// PrivateKeyProviderValidationError is the validation error returned by
+// PrivateKeyProvider.Validate if the designated constraints aren't met.
+type PrivateKeyProviderValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PrivateKeyProviderValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PrivateKeyProviderValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PrivateKeyProviderValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PrivateKeyProviderValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PrivateKeyProviderValidationError) ErrorName() string {
+ return "PrivateKeyProviderValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e PrivateKeyProviderValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sPrivateKeyProvider.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PrivateKeyProviderValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PrivateKeyProviderValidationError{}
+
+// Validate checks the field values on TlsCertificate with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *TlsCertificate) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TlsCertificate with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in TlsCertificateMultiError,
+// or nil if none found.
+func (m *TlsCertificate) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TlsCertificate) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetCertificateChain()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "CertificateChain",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "CertificateChain",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCertificateChain()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsCertificateValidationError{
+ field: "CertificateChain",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetPrivateKey()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "PrivateKey",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "PrivateKey",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPrivateKey()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsCertificateValidationError{
+ field: "PrivateKey",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetPkcs12()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "Pkcs12",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "Pkcs12",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPkcs12()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsCertificateValidationError{
+ field: "Pkcs12",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetWatchedDirectory()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "WatchedDirectory",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "WatchedDirectory",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsCertificateValidationError{
+ field: "WatchedDirectory",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetPrivateKeyProvider()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "PrivateKeyProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "PrivateKeyProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPrivateKeyProvider()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsCertificateValidationError{
+ field: "PrivateKeyProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetPassword()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "Password",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "Password",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPassword()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsCertificateValidationError{
+ field: "Password",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetOcspStaple()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "OcspStaple",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: "OcspStaple",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOcspStaple()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsCertificateValidationError{
+ field: "OcspStaple",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetSignedCertificateTimestamp() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsCertificateValidationError{
+ field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsCertificateValidationError{
+ field: fmt.Sprintf("SignedCertificateTimestamp[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TlsCertificateMultiError(errors)
+ }
+
+ return nil
+}
+
+// TlsCertificateMultiError is an error wrapping multiple validation errors
+// returned by TlsCertificate.ValidateAll() if the designated constraints
+// aren't met.
+type TlsCertificateMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TlsCertificateMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TlsCertificateMultiError) AllErrors() []error { return m }
+
+// TlsCertificateValidationError is the validation error returned by
+// TlsCertificate.Validate if the designated constraints aren't met.
+type TlsCertificateValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TlsCertificateValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TlsCertificateValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TlsCertificateValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TlsCertificateValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TlsCertificateValidationError) ErrorName() string { return "TlsCertificateValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TlsCertificateValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTlsCertificate.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TlsCertificateValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TlsCertificateValidationError{}
+
+// Validate checks the field values on TlsSessionTicketKeys with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *TlsSessionTicketKeys) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TlsSessionTicketKeys with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// TlsSessionTicketKeysMultiError, or nil if none found.
+func (m *TlsSessionTicketKeys) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TlsSessionTicketKeys) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetKeys()) < 1 {
+ err := TlsSessionTicketKeysValidationError{
+ field: "Keys",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetKeys() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsSessionTicketKeysValidationError{
+ field: fmt.Sprintf("Keys[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsSessionTicketKeysValidationError{
+ field: fmt.Sprintf("Keys[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsSessionTicketKeysValidationError{
+ field: fmt.Sprintf("Keys[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TlsSessionTicketKeysMultiError(errors)
+ }
+
+ return nil
+}
+
+// TlsSessionTicketKeysMultiError is an error wrapping multiple validation
+// errors returned by TlsSessionTicketKeys.ValidateAll() if the designated
+// constraints aren't met.
+type TlsSessionTicketKeysMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TlsSessionTicketKeysMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TlsSessionTicketKeysMultiError) AllErrors() []error { return m }
+
+// TlsSessionTicketKeysValidationError is the validation error returned by
+// TlsSessionTicketKeys.Validate if the designated constraints aren't met.
+type TlsSessionTicketKeysValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TlsSessionTicketKeysValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TlsSessionTicketKeysValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TlsSessionTicketKeysValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TlsSessionTicketKeysValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TlsSessionTicketKeysValidationError) ErrorName() string {
+ return "TlsSessionTicketKeysValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e TlsSessionTicketKeysValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTlsSessionTicketKeys.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TlsSessionTicketKeysValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TlsSessionTicketKeysValidationError{}
+
+// Validate checks the field values on CertificateProviderPluginInstance with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *CertificateProviderPluginInstance) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CertificateProviderPluginInstance
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// CertificateProviderPluginInstanceMultiError, or nil if none found.
+func (m *CertificateProviderPluginInstance) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CertificateProviderPluginInstance) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetInstanceName()) < 1 {
+ err := CertificateProviderPluginInstanceValidationError{
+ field: "InstanceName",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for CertificateName
+
+ if len(errors) > 0 {
+ return CertificateProviderPluginInstanceMultiError(errors)
+ }
+
+ return nil
+}
+
+// CertificateProviderPluginInstanceMultiError is an error wrapping multiple
+// validation errors returned by
+// CertificateProviderPluginInstance.ValidateAll() if the designated
+// constraints aren't met.
+type CertificateProviderPluginInstanceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CertificateProviderPluginInstanceMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CertificateProviderPluginInstanceMultiError) AllErrors() []error { return m }
+
+// CertificateProviderPluginInstanceValidationError is the validation error
+// returned by CertificateProviderPluginInstance.Validate if the designated
+// constraints aren't met.
+type CertificateProviderPluginInstanceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CertificateProviderPluginInstanceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CertificateProviderPluginInstanceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CertificateProviderPluginInstanceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CertificateProviderPluginInstanceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CertificateProviderPluginInstanceValidationError) ErrorName() string {
+ return "CertificateProviderPluginInstanceValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CertificateProviderPluginInstanceValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCertificateProviderPluginInstance.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CertificateProviderPluginInstanceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CertificateProviderPluginInstanceValidationError{}
+
+// Validate checks the field values on SubjectAltNameMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *SubjectAltNameMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SubjectAltNameMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// SubjectAltNameMatcherMultiError, or nil if none found.
+func (m *SubjectAltNameMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SubjectAltNameMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := _SubjectAltNameMatcher_SanType_NotInLookup[m.GetSanType()]; ok {
+ err := SubjectAltNameMatcherValidationError{
+ field: "SanType",
+ reason: "value must not be in list [SAN_TYPE_UNSPECIFIED]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := SubjectAltNameMatcher_SanType_name[int32(m.GetSanType())]; !ok {
+ err := SubjectAltNameMatcherValidationError{
+ field: "SanType",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if m.GetMatcher() == nil {
+ err := SubjectAltNameMatcherValidationError{
+ field: "Matcher",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetMatcher()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SubjectAltNameMatcherValidationError{
+ field: "Matcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SubjectAltNameMatcherValidationError{
+ field: "Matcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMatcher()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SubjectAltNameMatcherValidationError{
+ field: "Matcher",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Oid
+
+ if len(errors) > 0 {
+ return SubjectAltNameMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// SubjectAltNameMatcherMultiError is an error wrapping multiple validation
+// errors returned by SubjectAltNameMatcher.ValidateAll() if the designated
+// constraints aren't met.
+type SubjectAltNameMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SubjectAltNameMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SubjectAltNameMatcherMultiError) AllErrors() []error { return m }
+
+// SubjectAltNameMatcherValidationError is the validation error returned by
+// SubjectAltNameMatcher.Validate if the designated constraints aren't met.
+type SubjectAltNameMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SubjectAltNameMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SubjectAltNameMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SubjectAltNameMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SubjectAltNameMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SubjectAltNameMatcherValidationError) ErrorName() string {
+ return "SubjectAltNameMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SubjectAltNameMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSubjectAltNameMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SubjectAltNameMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SubjectAltNameMatcherValidationError{}
+
+var _SubjectAltNameMatcher_SanType_NotInLookup = map[SubjectAltNameMatcher_SanType]struct{}{
+ 0: {},
+}
+
+// Validate checks the field values on CertificateValidationContext with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *CertificateValidationContext) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CertificateValidationContext with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CertificateValidationContextMultiError, or nil if none found.
+func (m *CertificateValidationContext) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CertificateValidationContext) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetTrustedCa()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "TrustedCa",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "TrustedCa",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTrustedCa()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CertificateValidationContextValidationError{
+ field: "TrustedCa",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCaCertificateProviderInstance()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "CaCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "CaCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCaCertificateProviderInstance()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CertificateValidationContextValidationError{
+ field: "CaCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetSystemRootCerts()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "SystemRootCerts",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "SystemRootCerts",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSystemRootCerts()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CertificateValidationContextValidationError{
+ field: "SystemRootCerts",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetWatchedDirectory()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "WatchedDirectory",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "WatchedDirectory",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetWatchedDirectory()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CertificateValidationContextValidationError{
+ field: "WatchedDirectory",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetVerifyCertificateSpki() {
+ _, _ = idx, item
+
+ if utf8.RuneCountInString(item) < 44 {
+ err := CertificateValidationContextValidationError{
+ field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx),
+ reason: "value length must be at least 44 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(item) > 44 {
+ err := CertificateValidationContextValidationError{
+ field: fmt.Sprintf("VerifyCertificateSpki[%v]", idx),
+ reason: "value length must be at most 44 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ for idx, item := range m.GetVerifyCertificateHash() {
+ _, _ = idx, item
+
+ if utf8.RuneCountInString(item) < 64 {
+ err := CertificateValidationContextValidationError{
+ field: fmt.Sprintf("VerifyCertificateHash[%v]", idx),
+ reason: "value length must be at least 64 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(item) > 95 {
+ err := CertificateValidationContextValidationError{
+ field: fmt.Sprintf("VerifyCertificateHash[%v]", idx),
+ reason: "value length must be at most 95 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ for idx, item := range m.GetMatchTypedSubjectAltNames() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: fmt.Sprintf("MatchTypedSubjectAltNames[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: fmt.Sprintf("MatchTypedSubjectAltNames[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CertificateValidationContextValidationError{
+ field: fmt.Sprintf("MatchTypedSubjectAltNames[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetMatchSubjectAltNames() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CertificateValidationContextValidationError{
+ field: fmt.Sprintf("MatchSubjectAltNames[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetRequireSignedCertificateTimestamp()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "RequireSignedCertificateTimestamp",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "RequireSignedCertificateTimestamp",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequireSignedCertificateTimestamp()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CertificateValidationContextValidationError{
+ field: "RequireSignedCertificateTimestamp",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCrl()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "Crl",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "Crl",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCrl()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CertificateValidationContextValidationError{
+ field: "Crl",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for AllowExpiredCertificate
+
+ if _, ok := CertificateValidationContext_TrustChainVerification_name[int32(m.GetTrustChainVerification())]; !ok {
+ err := CertificateValidationContextValidationError{
+ field: "TrustChainVerification",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCustomValidatorConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "CustomValidatorConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CertificateValidationContextValidationError{
+ field: "CustomValidatorConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCustomValidatorConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CertificateValidationContextValidationError{
+ field: "CustomValidatorConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for OnlyVerifyLeafCertCrl
+
+ if wrapper := m.GetMaxVerifyDepth(); wrapper != nil {
+
+ if wrapper.GetValue() > 100 {
+ err := CertificateValidationContextValidationError{
+ field: "MaxVerifyDepth",
+ reason: "value must be less than or equal to 100",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return CertificateValidationContextMultiError(errors)
+ }
+
+ return nil
+}
+
+// CertificateValidationContextMultiError is an error wrapping multiple
+// validation errors returned by CertificateValidationContext.ValidateAll() if
+// the designated constraints aren't met.
+type CertificateValidationContextMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CertificateValidationContextMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CertificateValidationContextMultiError) AllErrors() []error { return m }
+
+// CertificateValidationContextValidationError is the validation error returned
+// by CertificateValidationContext.Validate if the designated constraints
+// aren't met.
+type CertificateValidationContextValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CertificateValidationContextValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CertificateValidationContextValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CertificateValidationContextValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CertificateValidationContextValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CertificateValidationContextValidationError) ErrorName() string {
+ return "CertificateValidationContextValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CertificateValidationContextValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCertificateValidationContext.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CertificateValidationContextValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CertificateValidationContextValidationError{}
+
+// Validate checks the field values on
+// CertificateValidationContext_SystemRootCerts with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *CertificateValidationContext_SystemRootCerts) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// CertificateValidationContext_SystemRootCerts with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// CertificateValidationContext_SystemRootCertsMultiError, or nil if none found.
+func (m *CertificateValidationContext_SystemRootCerts) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CertificateValidationContext_SystemRootCerts) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return CertificateValidationContext_SystemRootCertsMultiError(errors)
+ }
+
+ return nil
+}
+
+// CertificateValidationContext_SystemRootCertsMultiError is an error wrapping
+// multiple validation errors returned by
+// CertificateValidationContext_SystemRootCerts.ValidateAll() if the
+// designated constraints aren't met.
+type CertificateValidationContext_SystemRootCertsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CertificateValidationContext_SystemRootCertsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CertificateValidationContext_SystemRootCertsMultiError) AllErrors() []error { return m }
+
+// CertificateValidationContext_SystemRootCertsValidationError is the
+// validation error returned by
+// CertificateValidationContext_SystemRootCerts.Validate if the designated
+// constraints aren't met.
+type CertificateValidationContext_SystemRootCertsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CertificateValidationContext_SystemRootCertsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CertificateValidationContext_SystemRootCertsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CertificateValidationContext_SystemRootCertsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CertificateValidationContext_SystemRootCertsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CertificateValidationContext_SystemRootCertsValidationError) ErrorName() string {
+ return "CertificateValidationContext_SystemRootCertsValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CertificateValidationContext_SystemRootCertsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCertificateValidationContext_SystemRootCerts.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CertificateValidationContext_SystemRootCertsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CertificateValidationContext_SystemRootCertsValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/common_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/common_vtproto.pb.go
new file mode 100644
index 000000000..00d5573d9
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/common_vtproto.pb.go
@@ -0,0 +1,1155 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/transport_sockets/tls/v3/common.proto
+
+package tlsv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ anypb "github.com/planetscale/vtprotobuf/types/known/anypb"
+ wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *TlsParameters) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TlsParameters) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *TlsParameters) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.SignatureAlgorithms) > 0 {
+ for iNdEx := len(m.SignatureAlgorithms) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.SignatureAlgorithms[iNdEx])
+ copy(dAtA[i:], m.SignatureAlgorithms[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SignatureAlgorithms[iNdEx])))
+ i--
+ dAtA[i] = 0x2a
+ }
+ }
+ if len(m.EcdhCurves) > 0 {
+ for iNdEx := len(m.EcdhCurves) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.EcdhCurves[iNdEx])
+ copy(dAtA[i:], m.EcdhCurves[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.EcdhCurves[iNdEx])))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.CipherSuites) > 0 {
+ for iNdEx := len(m.CipherSuites) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.CipherSuites[iNdEx])
+ copy(dAtA[i:], m.CipherSuites[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CipherSuites[iNdEx])))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if m.TlsMaximumProtocolVersion != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TlsMaximumProtocolVersion))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.TlsMinimumProtocolVersion != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TlsMinimumProtocolVersion))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PrivateKeyProvider) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PrivateKeyProvider) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PrivateKeyProvider) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Fallback {
+ i--
+ if m.Fallback {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if msg, ok := m.ConfigType.(*PrivateKeyProvider_TypedConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.ProviderName) > 0 {
+ i -= len(m.ProviderName)
+ copy(dAtA[i:], m.ProviderName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProviderName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PrivateKeyProvider_TypedConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PrivateKeyProvider_TypedConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.TypedConfig != nil {
+ size, err := (*anypb.Any)(m.TypedConfig).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *TlsCertificate) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TlsCertificate) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *TlsCertificate) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Pkcs12 != nil {
+ if vtmsg, ok := interface{}(m.Pkcs12).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Pkcs12)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x42
+ }
+ if m.WatchedDirectory != nil {
+ if vtmsg, ok := interface{}(m.WatchedDirectory).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.WatchedDirectory)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.PrivateKeyProvider != nil {
+ size, err := m.PrivateKeyProvider.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.SignedCertificateTimestamp) > 0 {
+ for iNdEx := len(m.SignedCertificateTimestamp) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.SignedCertificateTimestamp[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.SignedCertificateTimestamp[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x2a
+ }
+ }
+ if m.OcspStaple != nil {
+ if vtmsg, ok := interface{}(m.OcspStaple).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.OcspStaple)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Password != nil {
+ if vtmsg, ok := interface{}(m.Password).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Password)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.PrivateKey != nil {
+ if vtmsg, ok := interface{}(m.PrivateKey).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.PrivateKey)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.CertificateChain != nil {
+ if vtmsg, ok := interface{}(m.CertificateChain).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.CertificateChain)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *TlsSessionTicketKeys) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TlsSessionTicketKeys) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *TlsSessionTicketKeys) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Keys) > 0 {
+ for iNdEx := len(m.Keys) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.Keys[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Keys[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CertificateProviderPluginInstance) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateProviderPluginInstance) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CertificateProviderPluginInstance) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.CertificateName) > 0 {
+ i -= len(m.CertificateName)
+ copy(dAtA[i:], m.CertificateName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CertificateName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.InstanceName) > 0 {
+ i -= len(m.InstanceName)
+ copy(dAtA[i:], m.InstanceName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InstanceName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *SubjectAltNameMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SubjectAltNameMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *SubjectAltNameMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Oid) > 0 {
+ i -= len(m.Oid)
+ copy(dAtA[i:], m.Oid)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Oid)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Matcher != nil {
+ if vtmsg, ok := interface{}(m.Matcher).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Matcher)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.SanType != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SanType))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CertificateValidationContext_SystemRootCerts) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateValidationContext_SystemRootCerts) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CertificateValidationContext_SystemRootCerts) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CertificateValidationContext) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CertificateValidationContext) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CertificateValidationContext) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.SystemRootCerts != nil {
+ size, err := m.SystemRootCerts.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x8a
+ }
+ if m.MaxVerifyDepth != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.MaxVerifyDepth).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x82
+ }
+ if len(m.MatchTypedSubjectAltNames) > 0 {
+ for iNdEx := len(m.MatchTypedSubjectAltNames) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.MatchTypedSubjectAltNames[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x7a
+ }
+ }
+ if m.OnlyVerifyLeafCertCrl {
+ i--
+ if m.OnlyVerifyLeafCertCrl {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x70
+ }
+ if m.CaCertificateProviderInstance != nil {
+ size, err := m.CaCertificateProviderInstance.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x6a
+ }
+ if m.CustomValidatorConfig != nil {
+ if vtmsg, ok := interface{}(m.CustomValidatorConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.CustomValidatorConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x62
+ }
+ if m.WatchedDirectory != nil {
+ if vtmsg, ok := interface{}(m.WatchedDirectory).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.WatchedDirectory)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x5a
+ }
+ if m.TrustChainVerification != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TrustChainVerification))
+ i--
+ dAtA[i] = 0x50
+ }
+ if len(m.MatchSubjectAltNames) > 0 {
+ for iNdEx := len(m.MatchSubjectAltNames) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.MatchSubjectAltNames[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.MatchSubjectAltNames[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x4a
+ }
+ }
+ if m.AllowExpiredCertificate {
+ i--
+ if m.AllowExpiredCertificate {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x40
+ }
+ if m.Crl != nil {
+ if vtmsg, ok := interface{}(m.Crl).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Crl)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.RequireSignedCertificateTimestamp != nil {
+ size, err := (*wrapperspb.BoolValue)(m.RequireSignedCertificateTimestamp).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.VerifyCertificateSpki) > 0 {
+ for iNdEx := len(m.VerifyCertificateSpki) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.VerifyCertificateSpki[iNdEx])
+ copy(dAtA[i:], m.VerifyCertificateSpki[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.VerifyCertificateSpki[iNdEx])))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.VerifyCertificateHash) > 0 {
+ for iNdEx := len(m.VerifyCertificateHash) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.VerifyCertificateHash[iNdEx])
+ copy(dAtA[i:], m.VerifyCertificateHash[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.VerifyCertificateHash[iNdEx])))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.TrustedCa != nil {
+ if vtmsg, ok := interface{}(m.TrustedCa).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.TrustedCa)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *TlsParameters) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.TlsMinimumProtocolVersion != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.TlsMinimumProtocolVersion))
+ }
+ if m.TlsMaximumProtocolVersion != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.TlsMaximumProtocolVersion))
+ }
+ if len(m.CipherSuites) > 0 {
+ for _, s := range m.CipherSuites {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.EcdhCurves) > 0 {
+ for _, s := range m.EcdhCurves {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.SignatureAlgorithms) > 0 {
+ for _, s := range m.SignatureAlgorithms {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PrivateKeyProvider) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.ProviderName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.ConfigType.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if m.Fallback {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PrivateKeyProvider_TypedConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.TypedConfig != nil {
+ l = (*anypb.Any)(m.TypedConfig).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *TlsCertificate) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CertificateChain != nil {
+ if size, ok := interface{}(m.CertificateChain).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.CertificateChain)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.PrivateKey != nil {
+ if size, ok := interface{}(m.PrivateKey).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.PrivateKey)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Password != nil {
+ if size, ok := interface{}(m.Password).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Password)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OcspStaple != nil {
+ if size, ok := interface{}(m.OcspStaple).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.OcspStaple)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.SignedCertificateTimestamp) > 0 {
+ for _, e := range m.SignedCertificateTimestamp {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.PrivateKeyProvider != nil {
+ l = m.PrivateKeyProvider.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.WatchedDirectory != nil {
+ if size, ok := interface{}(m.WatchedDirectory).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.WatchedDirectory)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Pkcs12 != nil {
+ if size, ok := interface{}(m.Pkcs12).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Pkcs12)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *TlsSessionTicketKeys) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Keys) > 0 {
+ for _, e := range m.Keys {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CertificateProviderPluginInstance) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.InstanceName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.CertificateName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *SubjectAltNameMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.SanType != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.SanType))
+ }
+ if m.Matcher != nil {
+ if size, ok := interface{}(m.Matcher).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Matcher)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Oid)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CertificateValidationContext_SystemRootCerts) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CertificateValidationContext) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.TrustedCa != nil {
+ if size, ok := interface{}(m.TrustedCa).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.TrustedCa)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.VerifyCertificateHash) > 0 {
+ for _, s := range m.VerifyCertificateHash {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.VerifyCertificateSpki) > 0 {
+ for _, s := range m.VerifyCertificateSpki {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.RequireSignedCertificateTimestamp != nil {
+ l = (*wrapperspb.BoolValue)(m.RequireSignedCertificateTimestamp).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Crl != nil {
+ if size, ok := interface{}(m.Crl).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Crl)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.AllowExpiredCertificate {
+ n += 2
+ }
+ if len(m.MatchSubjectAltNames) > 0 {
+ for _, e := range m.MatchSubjectAltNames {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.TrustChainVerification != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.TrustChainVerification))
+ }
+ if m.WatchedDirectory != nil {
+ if size, ok := interface{}(m.WatchedDirectory).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.WatchedDirectory)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.CustomValidatorConfig != nil {
+ if size, ok := interface{}(m.CustomValidatorConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.CustomValidatorConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.CaCertificateProviderInstance != nil {
+ l = m.CaCertificateProviderInstance.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OnlyVerifyLeafCertCrl {
+ n += 2
+ }
+ if len(m.MatchTypedSubjectAltNames) > 0 {
+ for _, e := range m.MatchTypedSubjectAltNames {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.MaxVerifyDepth != nil {
+ l = (*wrapperspb.UInt32Value)(m.MaxVerifyDepth).SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.SystemRootCerts != nil {
+ l = m.SystemRootCerts.SizeVT()
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.go
new file mode 100644
index 000000000..cf919ed97
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.go
@@ -0,0 +1,444 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/transport_sockets/tls/v3/secret.proto
+
+package tlsv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type GenericSecret struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Secret of generic type and is available to filters.
+ Secret *v3.DataSource `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
+}
+
+func (x *GenericSecret) Reset() {
+ *x = GenericSecret{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GenericSecret) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GenericSecret) ProtoMessage() {}
+
+func (x *GenericSecret) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GenericSecret.ProtoReflect.Descriptor instead.
+func (*GenericSecret) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GenericSecret) GetSecret() *v3.DataSource {
+ if x != nil {
+ return x.Secret
+ }
+ return nil
+}
+
+type SdsSecretConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name by which the secret can be uniquely referred to. When both name and config are specified,
+ // then secret can be fetched and/or reloaded via SDS. When only name is specified, then secret
+ // will be loaded from static resources.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ SdsConfig *v3.ConfigSource `protobuf:"bytes,2,opt,name=sds_config,json=sdsConfig,proto3" json:"sds_config,omitempty"`
+}
+
+func (x *SdsSecretConfig) Reset() {
+ *x = SdsSecretConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SdsSecretConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SdsSecretConfig) ProtoMessage() {}
+
+func (x *SdsSecretConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SdsSecretConfig.ProtoReflect.Descriptor instead.
+func (*SdsSecretConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *SdsSecretConfig) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *SdsSecretConfig) GetSdsConfig() *v3.ConfigSource {
+ if x != nil {
+ return x.SdsConfig
+ }
+ return nil
+}
+
+// [#next-free-field: 6]
+type Secret struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name (FQDN, UUID, SPKI, SHA256, etc.) by which the secret can be uniquely referred to.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Types that are assignable to Type:
+ //
+ // *Secret_TlsCertificate
+ // *Secret_SessionTicketKeys
+ // *Secret_ValidationContext
+ // *Secret_GenericSecret
+ Type isSecret_Type `protobuf_oneof:"type"`
+}
+
+func (x *Secret) Reset() {
+ *x = Secret{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Secret) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Secret) ProtoMessage() {}
+
+func (x *Secret) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Secret.ProtoReflect.Descriptor instead.
+func (*Secret) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *Secret) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (m *Secret) GetType() isSecret_Type {
+ if m != nil {
+ return m.Type
+ }
+ return nil
+}
+
+func (x *Secret) GetTlsCertificate() *TlsCertificate {
+ if x, ok := x.GetType().(*Secret_TlsCertificate); ok {
+ return x.TlsCertificate
+ }
+ return nil
+}
+
+func (x *Secret) GetSessionTicketKeys() *TlsSessionTicketKeys {
+ if x, ok := x.GetType().(*Secret_SessionTicketKeys); ok {
+ return x.SessionTicketKeys
+ }
+ return nil
+}
+
+func (x *Secret) GetValidationContext() *CertificateValidationContext {
+ if x, ok := x.GetType().(*Secret_ValidationContext); ok {
+ return x.ValidationContext
+ }
+ return nil
+}
+
+func (x *Secret) GetGenericSecret() *GenericSecret {
+ if x, ok := x.GetType().(*Secret_GenericSecret); ok {
+ return x.GenericSecret
+ }
+ return nil
+}
+
+type isSecret_Type interface {
+ isSecret_Type()
+}
+
+type Secret_TlsCertificate struct {
+ TlsCertificate *TlsCertificate `protobuf:"bytes,2,opt,name=tls_certificate,json=tlsCertificate,proto3,oneof"`
+}
+
+type Secret_SessionTicketKeys struct {
+ SessionTicketKeys *TlsSessionTicketKeys `protobuf:"bytes,3,opt,name=session_ticket_keys,json=sessionTicketKeys,proto3,oneof"`
+}
+
+type Secret_ValidationContext struct {
+ ValidationContext *CertificateValidationContext `protobuf:"bytes,4,opt,name=validation_context,json=validationContext,proto3,oneof"`
+}
+
+type Secret_GenericSecret struct {
+ GenericSecret *GenericSecret `protobuf:"bytes,5,opt,name=generic_secret,json=genericSecret,proto3,oneof"`
+}
+
+func (*Secret_TlsCertificate) isSecret_Type() {}
+
+func (*Secret_SessionTicketKeys) isSecret_Type() {}
+
+func (*Secret_ValidationContext) isSecret_Type() {}
+
+func (*Secret_GenericSecret) isSecret_Type() {}
+
+var File_envoy_extensions_transport_sockets_tls_v3_secret_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDesc = []byte{
+ 0x0a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65, 0x63, 0x72,
+ 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73,
+ 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73,
+ 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65,
+ 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x65, 0x6e, 0x73, 0x69, 0x74, 0x69,
+ 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0x79, 0x0a, 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65,
+ 0x63, 0x72, 0x65, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0xb8, 0xb7, 0x8b, 0xa4, 0x02, 0x01, 0x52, 0x06,
+ 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68,
+ 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x9b,
+ 0x01, 0x0a, 0x0f, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x41, 0x0a, 0x0a, 0x73, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x73, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x3a, 0x28, 0x9a, 0xc5, 0x88, 0x1e, 0x23, 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x53, 0x64, 0x73,
+ 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xfb, 0x03, 0x0a,
+ 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x64, 0x0a, 0x0f, 0x74,
+ 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
+ 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33,
+ 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x48,
+ 0x00, 0x52, 0x0e, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
+ 0x65, 0x12, 0x71, 0x0a, 0x13, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63,
+ 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x53, 0x65,
+ 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x48,
+ 0x00, 0x52, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74,
+ 0x4b, 0x65, 0x79, 0x73, 0x12, 0x78, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72,
+ 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x11, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x61,
+ 0x0a, 0x0e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
+ 0x76, 0x33, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74,
+ 0x48, 0x00, 0x52, 0x0d, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x53, 0x65, 0x63, 0x72, 0x65,
+ 0x74, 0x3a, 0x1f, 0x9a, 0xc5, 0x88, 0x1e, 0x1a, 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x53, 0x65, 0x63, 0x72,
+ 0x65, 0x74, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x42, 0xa8, 0x01, 0xba, 0x80, 0xc8,
+ 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70,
+ 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f,
+ 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x0b,
+ 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70,
+ 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d,
+ 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74,
+ 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x3b,
+ 0x74, 0x6c, 0x73, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescOnce sync.Once
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescData = file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDesc
+)
+
+func file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescData)
+ })
+ return file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDescData
+}
+
+var file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_envoy_extensions_transport_sockets_tls_v3_secret_proto_goTypes = []interface{}{
+ (*GenericSecret)(nil), // 0: envoy.extensions.transport_sockets.tls.v3.GenericSecret
+ (*SdsSecretConfig)(nil), // 1: envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig
+ (*Secret)(nil), // 2: envoy.extensions.transport_sockets.tls.v3.Secret
+ (*v3.DataSource)(nil), // 3: envoy.config.core.v3.DataSource
+ (*v3.ConfigSource)(nil), // 4: envoy.config.core.v3.ConfigSource
+ (*TlsCertificate)(nil), // 5: envoy.extensions.transport_sockets.tls.v3.TlsCertificate
+ (*TlsSessionTicketKeys)(nil), // 6: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys
+ (*CertificateValidationContext)(nil), // 7: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext
+}
+var file_envoy_extensions_transport_sockets_tls_v3_secret_proto_depIdxs = []int32{
+ 3, // 0: envoy.extensions.transport_sockets.tls.v3.GenericSecret.secret:type_name -> envoy.config.core.v3.DataSource
+ 4, // 1: envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig.sds_config:type_name -> envoy.config.core.v3.ConfigSource
+ 5, // 2: envoy.extensions.transport_sockets.tls.v3.Secret.tls_certificate:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsCertificate
+ 6, // 3: envoy.extensions.transport_sockets.tls.v3.Secret.session_ticket_keys:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys
+ 7, // 4: envoy.extensions.transport_sockets.tls.v3.Secret.validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext
+ 0, // 5: envoy.extensions.transport_sockets.tls.v3.Secret.generic_secret:type_name -> envoy.extensions.transport_sockets.tls.v3.GenericSecret
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_transport_sockets_tls_v3_secret_proto_init() }
+func file_envoy_extensions_transport_sockets_tls_v3_secret_proto_init() {
+ if File_envoy_extensions_transport_sockets_tls_v3_secret_proto != nil {
+ return
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GenericSecret); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SdsSecretConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Secret); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes[2].OneofWrappers = []interface{}{
+ (*Secret_TlsCertificate)(nil),
+ (*Secret_SessionTicketKeys)(nil),
+ (*Secret_ValidationContext)(nil),
+ (*Secret_GenericSecret)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_transport_sockets_tls_v3_secret_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_transport_sockets_tls_v3_secret_proto_depIdxs,
+ MessageInfos: file_envoy_extensions_transport_sockets_tls_v3_secret_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_transport_sockets_tls_v3_secret_proto = out.File
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_rawDesc = nil
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_goTypes = nil
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go
new file mode 100644
index 000000000..913c54922
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret.pb.validate.go
@@ -0,0 +1,575 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/transport_sockets/tls/v3/secret.proto
+
+package tlsv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on GenericSecret with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *GenericSecret) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on GenericSecret with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in GenericSecretMultiError, or
+// nil if none found.
+func (m *GenericSecret) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *GenericSecret) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetSecret()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, GenericSecretValidationError{
+ field: "Secret",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, GenericSecretValidationError{
+ field: "Secret",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSecret()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return GenericSecretValidationError{
+ field: "Secret",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return GenericSecretMultiError(errors)
+ }
+
+ return nil
+}
+
+// GenericSecretMultiError is an error wrapping multiple validation errors
+// returned by GenericSecret.ValidateAll() if the designated constraints
+// aren't met.
+type GenericSecretMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m GenericSecretMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m GenericSecretMultiError) AllErrors() []error { return m }
+
+// GenericSecretValidationError is the validation error returned by
+// GenericSecret.Validate if the designated constraints aren't met.
+type GenericSecretValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e GenericSecretValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e GenericSecretValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e GenericSecretValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e GenericSecretValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e GenericSecretValidationError) ErrorName() string { return "GenericSecretValidationError" }
+
+// Error satisfies the builtin error interface
+func (e GenericSecretValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sGenericSecret.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = GenericSecretValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = GenericSecretValidationError{}
+
+// Validate checks the field values on SdsSecretConfig with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *SdsSecretConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SdsSecretConfig with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// SdsSecretConfigMultiError, or nil if none found.
+func (m *SdsSecretConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SdsSecretConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := SdsSecretConfigValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSdsConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SdsSecretConfigValidationError{
+ field: "SdsConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SdsSecretConfigValidationError{
+ field: "SdsConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSdsConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SdsSecretConfigValidationError{
+ field: "SdsConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return SdsSecretConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// SdsSecretConfigMultiError is an error wrapping multiple validation errors
+// returned by SdsSecretConfig.ValidateAll() if the designated constraints
+// aren't met.
+type SdsSecretConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SdsSecretConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SdsSecretConfigMultiError) AllErrors() []error { return m }
+
+// SdsSecretConfigValidationError is the validation error returned by
+// SdsSecretConfig.Validate if the designated constraints aren't met.
+type SdsSecretConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SdsSecretConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SdsSecretConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SdsSecretConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SdsSecretConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SdsSecretConfigValidationError) ErrorName() string { return "SdsSecretConfigValidationError" }
+
+// Error satisfies the builtin error interface
+func (e SdsSecretConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSdsSecretConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SdsSecretConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SdsSecretConfigValidationError{}
+
+// Validate checks the field values on Secret with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Secret) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Secret with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in SecretMultiError, or nil if none found.
+func (m *Secret) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Secret) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ switch v := m.Type.(type) {
+ case *Secret_TlsCertificate:
+ if v == nil {
+ err := SecretValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetTlsCertificate()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SecretValidationError{
+ field: "TlsCertificate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SecretValidationError{
+ field: "TlsCertificate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTlsCertificate()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SecretValidationError{
+ field: "TlsCertificate",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Secret_SessionTicketKeys:
+ if v == nil {
+ err := SecretValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSessionTicketKeys()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SecretValidationError{
+ field: "SessionTicketKeys",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SecretValidationError{
+ field: "SessionTicketKeys",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SecretValidationError{
+ field: "SessionTicketKeys",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Secret_ValidationContext:
+ if v == nil {
+ err := SecretValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetValidationContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SecretValidationError{
+ field: "ValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SecretValidationError{
+ field: "ValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SecretValidationError{
+ field: "ValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *Secret_GenericSecret:
+ if v == nil {
+ err := SecretValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetGenericSecret()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SecretValidationError{
+ field: "GenericSecret",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SecretValidationError{
+ field: "GenericSecret",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetGenericSecret()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SecretValidationError{
+ field: "GenericSecret",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return SecretMultiError(errors)
+ }
+
+ return nil
+}
+
+// SecretMultiError is an error wrapping multiple validation errors returned by
+// Secret.ValidateAll() if the designated constraints aren't met.
+type SecretMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SecretMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SecretMultiError) AllErrors() []error { return m }
+
+// SecretValidationError is the validation error returned by Secret.Validate if
+// the designated constraints aren't met.
+type SecretValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SecretValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SecretValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SecretValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SecretValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SecretValidationError) ErrorName() string { return "SecretValidationError" }
+
+// Error satisfies the builtin error interface
+func (e SecretValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSecret.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SecretValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SecretValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret_vtproto.pb.go
new file mode 100644
index 000000000..35e8a3ce2
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/secret_vtproto.pb.go
@@ -0,0 +1,415 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/transport_sockets/tls/v3/secret.proto
+
+package tlsv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *GenericSecret) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *GenericSecret) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *GenericSecret) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Secret != nil {
+ if vtmsg, ok := interface{}(m.Secret).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Secret)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *SdsSecretConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SdsSecretConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *SdsSecretConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.SdsConfig != nil {
+ if vtmsg, ok := interface{}(m.SdsConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.SdsConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Secret) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Secret) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Secret) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Type.(*Secret_GenericSecret); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Type.(*Secret_ValidationContext); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Type.(*Secret_SessionTicketKeys); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Type.(*Secret_TlsCertificate); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Secret_TlsCertificate) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Secret_TlsCertificate) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.TlsCertificate != nil {
+ size, err := m.TlsCertificate.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *Secret_SessionTicketKeys) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Secret_SessionTicketKeys) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.SessionTicketKeys != nil {
+ size, err := m.SessionTicketKeys.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *Secret_ValidationContext) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Secret_ValidationContext) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ValidationContext != nil {
+ size, err := m.ValidationContext.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *Secret_GenericSecret) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Secret_GenericSecret) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.GenericSecret != nil {
+ size, err := m.GenericSecret.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x2a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *GenericSecret) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Secret != nil {
+ if size, ok := interface{}(m.Secret).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Secret)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *SdsSecretConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.SdsConfig != nil {
+ if size, ok := interface{}(m.SdsConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.SdsConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Secret) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Secret_TlsCertificate) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.TlsCertificate != nil {
+ l = m.TlsCertificate.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *Secret_SessionTicketKeys) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.SessionTicketKeys != nil {
+ l = m.SessionTicketKeys.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *Secret_ValidationContext) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ValidationContext != nil {
+ l = m.ValidationContext.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *Secret_GenericSecret) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.GenericSecret != nil {
+ l = m.GenericSecret.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls.pb.go
new file mode 100644
index 000000000..db43da674
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls.pb.go
@@ -0,0 +1,1545 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/transport_sockets/tls/v3/tls.proto
+
+package tlsv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/go-control-plane/envoy/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type DownstreamTlsContext_OcspStaplePolicy int32
+
+const (
+ // OCSP responses are optional. If an OCSP response is absent
+ // or expired, the associated certificate will be used for
+ // connections without an OCSP staple.
+ DownstreamTlsContext_LENIENT_STAPLING DownstreamTlsContext_OcspStaplePolicy = 0
+ // OCSP responses are optional. If an OCSP response is absent,
+ // the associated certificate will be used without an
+ // OCSP staple. If a response is provided but is expired,
+ // the associated certificate will not be used for
+ // subsequent connections. If no suitable certificate is found,
+ // the connection is rejected.
+ DownstreamTlsContext_STRICT_STAPLING DownstreamTlsContext_OcspStaplePolicy = 1
+ // OCSP responses are required. Configuration will fail if
+ // a certificate is provided without an OCSP response. If a
+ // response expires, the associated certificate will not be
+ // used connections. If no suitable certificate is found, the
+ // connection is rejected.
+ DownstreamTlsContext_MUST_STAPLE DownstreamTlsContext_OcspStaplePolicy = 2
+)
+
+// Enum value maps for DownstreamTlsContext_OcspStaplePolicy.
+var (
+ DownstreamTlsContext_OcspStaplePolicy_name = map[int32]string{
+ 0: "LENIENT_STAPLING",
+ 1: "STRICT_STAPLING",
+ 2: "MUST_STAPLE",
+ }
+ DownstreamTlsContext_OcspStaplePolicy_value = map[string]int32{
+ "LENIENT_STAPLING": 0,
+ "STRICT_STAPLING": 1,
+ "MUST_STAPLE": 2,
+ }
+)
+
+func (x DownstreamTlsContext_OcspStaplePolicy) Enum() *DownstreamTlsContext_OcspStaplePolicy {
+ p := new(DownstreamTlsContext_OcspStaplePolicy)
+ *p = x
+ return p
+}
+
+func (x DownstreamTlsContext_OcspStaplePolicy) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (DownstreamTlsContext_OcspStaplePolicy) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_enumTypes[0].Descriptor()
+}
+
+func (DownstreamTlsContext_OcspStaplePolicy) Type() protoreflect.EnumType {
+ return &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_enumTypes[0]
+}
+
+func (x DownstreamTlsContext_OcspStaplePolicy) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use DownstreamTlsContext_OcspStaplePolicy.Descriptor instead.
+func (DownstreamTlsContext_OcspStaplePolicy) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{1, 0}
+}
+
+// [#next-free-field: 6]
+type UpstreamTlsContext struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Common TLS context settings.
+ //
+ // .. attention::
+ //
+ // Server certificate verification is not enabled by default. Configure
+ // :ref:`trusted_ca` to enable
+ // verification.
+ CommonTlsContext *CommonTlsContext `protobuf:"bytes,1,opt,name=common_tls_context,json=commonTlsContext,proto3" json:"common_tls_context,omitempty"`
+ // SNI string to use when creating TLS backend connections.
+ Sni string `protobuf:"bytes,2,opt,name=sni,proto3" json:"sni,omitempty"`
+ // If true, server-initiated TLS renegotiation will be allowed.
+ //
+ // .. attention::
+ //
+ // TLS renegotiation is considered insecure and shouldn't be used unless absolutely necessary.
+ AllowRenegotiation bool `protobuf:"varint,3,opt,name=allow_renegotiation,json=allowRenegotiation,proto3" json:"allow_renegotiation,omitempty"`
+ // Maximum number of session keys (Pre-Shared Keys for TLSv1.3+, Session IDs and Session Tickets
+ // for TLSv1.2 and older) to store for the purpose of session resumption.
+ //
+ // Defaults to 1, setting this to 0 disables session resumption.
+ MaxSessionKeys *wrapperspb.UInt32Value `protobuf:"bytes,4,opt,name=max_session_keys,json=maxSessionKeys,proto3" json:"max_session_keys,omitempty"`
+ // This field is used to control the enforcement, whereby the handshake will fail if the keyUsage extension
+ // is present and incompatible with the TLS usage. Currently, the default value is false (i.e., enforcement off)
+ // but it is expected to be changed to true by default in a future release.
+ // “ssl.was_key_usage_invalid“ in :ref:`listener metrics ` will be set for certificate
+ // configurations that would fail if this option were set to true.
+ EnforceRsaKeyUsage *wrapperspb.BoolValue `protobuf:"bytes,5,opt,name=enforce_rsa_key_usage,json=enforceRsaKeyUsage,proto3" json:"enforce_rsa_key_usage,omitempty"`
+}
+
+func (x *UpstreamTlsContext) Reset() {
+ *x = UpstreamTlsContext{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpstreamTlsContext) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpstreamTlsContext) ProtoMessage() {}
+
+func (x *UpstreamTlsContext) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpstreamTlsContext.ProtoReflect.Descriptor instead.
+func (*UpstreamTlsContext) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UpstreamTlsContext) GetCommonTlsContext() *CommonTlsContext {
+ if x != nil {
+ return x.CommonTlsContext
+ }
+ return nil
+}
+
+func (x *UpstreamTlsContext) GetSni() string {
+ if x != nil {
+ return x.Sni
+ }
+ return ""
+}
+
+func (x *UpstreamTlsContext) GetAllowRenegotiation() bool {
+ if x != nil {
+ return x.AllowRenegotiation
+ }
+ return false
+}
+
+func (x *UpstreamTlsContext) GetMaxSessionKeys() *wrapperspb.UInt32Value {
+ if x != nil {
+ return x.MaxSessionKeys
+ }
+ return nil
+}
+
+func (x *UpstreamTlsContext) GetEnforceRsaKeyUsage() *wrapperspb.BoolValue {
+ if x != nil {
+ return x.EnforceRsaKeyUsage
+ }
+ return nil
+}
+
+// [#next-free-field: 12]
+type DownstreamTlsContext struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Common TLS context settings.
+ CommonTlsContext *CommonTlsContext `protobuf:"bytes,1,opt,name=common_tls_context,json=commonTlsContext,proto3" json:"common_tls_context,omitempty"`
+ // If specified, Envoy will reject connections without a valid client
+ // certificate.
+ RequireClientCertificate *wrapperspb.BoolValue `protobuf:"bytes,2,opt,name=require_client_certificate,json=requireClientCertificate,proto3" json:"require_client_certificate,omitempty"`
+ // If specified, Envoy will reject connections without a valid and matching SNI.
+ // [#not-implemented-hide:]
+ RequireSni *wrapperspb.BoolValue `protobuf:"bytes,3,opt,name=require_sni,json=requireSni,proto3" json:"require_sni,omitempty"`
+ // Types that are assignable to SessionTicketKeysType:
+ //
+ // *DownstreamTlsContext_SessionTicketKeys
+ // *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig
+ // *DownstreamTlsContext_DisableStatelessSessionResumption
+ SessionTicketKeysType isDownstreamTlsContext_SessionTicketKeysType `protobuf_oneof:"session_ticket_keys_type"`
+ // If set to true, the TLS server will not maintain a session cache of TLS sessions. (This is
+ // relevant only for TLSv1.2 and earlier.)
+ DisableStatefulSessionResumption bool `protobuf:"varint,10,opt,name=disable_stateful_session_resumption,json=disableStatefulSessionResumption,proto3" json:"disable_stateful_session_resumption,omitempty"`
+ // If specified, “session_timeout“ will change the maximum lifetime (in seconds) of the TLS session.
+ // Currently this value is used as a hint for the `TLS session ticket lifetime (for TLSv1.2) `_.
+ // Only seconds can be specified (fractional seconds are ignored).
+ SessionTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=session_timeout,json=sessionTimeout,proto3" json:"session_timeout,omitempty"`
+ // Config for whether to use certificates if they do not have
+ // an accompanying OCSP response or if the response expires at runtime.
+ // Defaults to LENIENT_STAPLING
+ OcspStaplePolicy DownstreamTlsContext_OcspStaplePolicy `protobuf:"varint,8,opt,name=ocsp_staple_policy,json=ocspStaplePolicy,proto3,enum=envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext_OcspStaplePolicy" json:"ocsp_staple_policy,omitempty"`
+ // Multiple certificates are allowed in Downstream transport socket to serve different SNI.
+ // If the client provides SNI but no such cert matched, it will decide to full scan certificates or not based on this config.
+ // Defaults to false. See more details in :ref:`Multiple TLS certificates `.
+ FullScanCertsOnSniMismatch *wrapperspb.BoolValue `protobuf:"bytes,9,opt,name=full_scan_certs_on_sni_mismatch,json=fullScanCertsOnSniMismatch,proto3" json:"full_scan_certs_on_sni_mismatch,omitempty"`
+ // By default, Envoy as a server uses its preferred cipher during the handshake.
+ // Setting this to true would allow the downstream client's preferred cipher to be used instead.
+ // Has no effect when using TLSv1_3.
+ PreferClientCiphers bool `protobuf:"varint,11,opt,name=prefer_client_ciphers,json=preferClientCiphers,proto3" json:"prefer_client_ciphers,omitempty"`
+}
+
+func (x *DownstreamTlsContext) Reset() {
+ *x = DownstreamTlsContext{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DownstreamTlsContext) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DownstreamTlsContext) ProtoMessage() {}
+
+func (x *DownstreamTlsContext) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DownstreamTlsContext.ProtoReflect.Descriptor instead.
+func (*DownstreamTlsContext) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *DownstreamTlsContext) GetCommonTlsContext() *CommonTlsContext {
+ if x != nil {
+ return x.CommonTlsContext
+ }
+ return nil
+}
+
+func (x *DownstreamTlsContext) GetRequireClientCertificate() *wrapperspb.BoolValue {
+ if x != nil {
+ return x.RequireClientCertificate
+ }
+ return nil
+}
+
+func (x *DownstreamTlsContext) GetRequireSni() *wrapperspb.BoolValue {
+ if x != nil {
+ return x.RequireSni
+ }
+ return nil
+}
+
+func (m *DownstreamTlsContext) GetSessionTicketKeysType() isDownstreamTlsContext_SessionTicketKeysType {
+ if m != nil {
+ return m.SessionTicketKeysType
+ }
+ return nil
+}
+
+func (x *DownstreamTlsContext) GetSessionTicketKeys() *TlsSessionTicketKeys {
+ if x, ok := x.GetSessionTicketKeysType().(*DownstreamTlsContext_SessionTicketKeys); ok {
+ return x.SessionTicketKeys
+ }
+ return nil
+}
+
+func (x *DownstreamTlsContext) GetSessionTicketKeysSdsSecretConfig() *SdsSecretConfig {
+ if x, ok := x.GetSessionTicketKeysType().(*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig); ok {
+ return x.SessionTicketKeysSdsSecretConfig
+ }
+ return nil
+}
+
+func (x *DownstreamTlsContext) GetDisableStatelessSessionResumption() bool {
+ if x, ok := x.GetSessionTicketKeysType().(*DownstreamTlsContext_DisableStatelessSessionResumption); ok {
+ return x.DisableStatelessSessionResumption
+ }
+ return false
+}
+
+func (x *DownstreamTlsContext) GetDisableStatefulSessionResumption() bool {
+ if x != nil {
+ return x.DisableStatefulSessionResumption
+ }
+ return false
+}
+
+func (x *DownstreamTlsContext) GetSessionTimeout() *durationpb.Duration {
+ if x != nil {
+ return x.SessionTimeout
+ }
+ return nil
+}
+
+func (x *DownstreamTlsContext) GetOcspStaplePolicy() DownstreamTlsContext_OcspStaplePolicy {
+ if x != nil {
+ return x.OcspStaplePolicy
+ }
+ return DownstreamTlsContext_LENIENT_STAPLING
+}
+
+func (x *DownstreamTlsContext) GetFullScanCertsOnSniMismatch() *wrapperspb.BoolValue {
+ if x != nil {
+ return x.FullScanCertsOnSniMismatch
+ }
+ return nil
+}
+
+func (x *DownstreamTlsContext) GetPreferClientCiphers() bool {
+ if x != nil {
+ return x.PreferClientCiphers
+ }
+ return false
+}
+
+type isDownstreamTlsContext_SessionTicketKeysType interface {
+ isDownstreamTlsContext_SessionTicketKeysType()
+}
+
+type DownstreamTlsContext_SessionTicketKeys struct {
+ // TLS session ticket key settings.
+ SessionTicketKeys *TlsSessionTicketKeys `protobuf:"bytes,4,opt,name=session_ticket_keys,json=sessionTicketKeys,proto3,oneof"`
+}
+
+type DownstreamTlsContext_SessionTicketKeysSdsSecretConfig struct {
+ // Config for fetching TLS session ticket keys via SDS API.
+ SessionTicketKeysSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,5,opt,name=session_ticket_keys_sds_secret_config,json=sessionTicketKeysSdsSecretConfig,proto3,oneof"`
+}
+
+type DownstreamTlsContext_DisableStatelessSessionResumption struct {
+ // Config for controlling stateless TLS session resumption: setting this to true will cause the TLS
+ // server to not issue TLS session tickets for the purposes of stateless TLS session resumption.
+ // If set to false, the TLS server will issue TLS session tickets and encrypt/decrypt them using
+ // the keys specified through either :ref:`session_ticket_keys `
+ // or :ref:`session_ticket_keys_sds_secret_config `.
+ // If this config is set to false and no keys are explicitly configured, the TLS server will issue
+ // TLS session tickets and encrypt/decrypt them using an internally-generated and managed key, with the
+ // implication that sessions cannot be resumed across hot restarts or on different hosts.
+ DisableStatelessSessionResumption bool `protobuf:"varint,7,opt,name=disable_stateless_session_resumption,json=disableStatelessSessionResumption,proto3,oneof"`
+}
+
+func (*DownstreamTlsContext_SessionTicketKeys) isDownstreamTlsContext_SessionTicketKeysType() {}
+
+func (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) isDownstreamTlsContext_SessionTicketKeysType() {
+}
+
+func (*DownstreamTlsContext_DisableStatelessSessionResumption) isDownstreamTlsContext_SessionTicketKeysType() {
+}
+
+// TLS key log configuration.
+// The key log file format is "format used by NSS for its SSLKEYLOGFILE debugging output" (text taken from openssl man page)
+type TlsKeyLog struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The path to save the TLS key log.
+ Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
+ // The local IP address that will be used to filter the connection which should save the TLS key log
+ // If it is not set, any local IP address will be matched.
+ LocalAddressRange []*v3.CidrRange `protobuf:"bytes,2,rep,name=local_address_range,json=localAddressRange,proto3" json:"local_address_range,omitempty"`
+ // The remote IP address that will be used to filter the connection which should save the TLS key log
+ // If it is not set, any remote IP address will be matched.
+ RemoteAddressRange []*v3.CidrRange `protobuf:"bytes,3,rep,name=remote_address_range,json=remoteAddressRange,proto3" json:"remote_address_range,omitempty"`
+}
+
+func (x *TlsKeyLog) Reset() {
+ *x = TlsKeyLog{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TlsKeyLog) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TlsKeyLog) ProtoMessage() {}
+
+func (x *TlsKeyLog) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TlsKeyLog.ProtoReflect.Descriptor instead.
+func (*TlsKeyLog) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *TlsKeyLog) GetPath() string {
+ if x != nil {
+ return x.Path
+ }
+ return ""
+}
+
+func (x *TlsKeyLog) GetLocalAddressRange() []*v3.CidrRange {
+ if x != nil {
+ return x.LocalAddressRange
+ }
+ return nil
+}
+
+func (x *TlsKeyLog) GetRemoteAddressRange() []*v3.CidrRange {
+ if x != nil {
+ return x.RemoteAddressRange
+ }
+ return nil
+}
+
+// TLS context shared by both client and server TLS contexts.
+// [#next-free-field: 17]
+type CommonTlsContext struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // TLS protocol versions, cipher suites etc.
+ TlsParams *TlsParameters `protobuf:"bytes,1,opt,name=tls_params,json=tlsParams,proto3" json:"tls_params,omitempty"`
+ // Only a single TLS certificate is supported in client contexts. In server contexts,
+ // :ref:`Multiple TLS certificates ` can be associated with the
+ // same context to allow both RSA and ECDSA certificates and support SNI-based selection.
+ //
+ // If “tls_certificate_provider_instance“ is set, this field is ignored.
+ // If this field is set, “tls_certificate_sds_secret_configs“ is ignored.
+ TlsCertificates []*TlsCertificate `protobuf:"bytes,2,rep,name=tls_certificates,json=tlsCertificates,proto3" json:"tls_certificates,omitempty"`
+ // Configs for fetching TLS certificates via SDS API. Note SDS API allows certificates to be
+ // fetched/refreshed over the network asynchronously with respect to the TLS handshake.
+ //
+ // The same number and types of certificates as :ref:`tls_certificates `
+ // are valid in the the certificates fetched through this setting.
+ //
+ // If “tls_certificates“ or “tls_certificate_provider_instance“ are set, this field
+ // is ignored.
+ TlsCertificateSdsSecretConfigs []*SdsSecretConfig `protobuf:"bytes,6,rep,name=tls_certificate_sds_secret_configs,json=tlsCertificateSdsSecretConfigs,proto3" json:"tls_certificate_sds_secret_configs,omitempty"`
+ // Certificate provider instance for fetching TLS certs.
+ //
+ // If this field is set, “tls_certificates“ and “tls_certificate_provider_instance“
+ // are ignored.
+ // [#not-implemented-hide:]
+ TlsCertificateProviderInstance *CertificateProviderPluginInstance `protobuf:"bytes,14,opt,name=tls_certificate_provider_instance,json=tlsCertificateProviderInstance,proto3" json:"tls_certificate_provider_instance,omitempty"`
+ // Custom TLS certificate selector.
+ //
+ // Select TLS certificate based on TLS client hello.
+ // If empty, defaults to native TLS certificate selection behavior:
+ // DNS SANs or Subject Common Name in TLS certificates is extracted as server name pattern to match SNI.
+ CustomTlsCertificateSelector *v3.TypedExtensionConfig `protobuf:"bytes,16,opt,name=custom_tls_certificate_selector,json=customTlsCertificateSelector,proto3" json:"custom_tls_certificate_selector,omitempty"`
+ // Certificate provider for fetching TLS certificates.
+ // [#not-implemented-hide:]
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+ TlsCertificateCertificateProvider *CommonTlsContext_CertificateProvider `protobuf:"bytes,9,opt,name=tls_certificate_certificate_provider,json=tlsCertificateCertificateProvider,proto3" json:"tls_certificate_certificate_provider,omitempty"`
+ // Certificate provider instance for fetching TLS certificates.
+ // [#not-implemented-hide:]
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+ TlsCertificateCertificateProviderInstance *CommonTlsContext_CertificateProviderInstance `protobuf:"bytes,11,opt,name=tls_certificate_certificate_provider_instance,json=tlsCertificateCertificateProviderInstance,proto3" json:"tls_certificate_certificate_provider_instance,omitempty"`
+ // Types that are assignable to ValidationContextType:
+ //
+ // *CommonTlsContext_ValidationContext
+ // *CommonTlsContext_ValidationContextSdsSecretConfig
+ // *CommonTlsContext_CombinedValidationContext
+ // *CommonTlsContext_ValidationContextCertificateProvider
+ // *CommonTlsContext_ValidationContextCertificateProviderInstance
+ ValidationContextType isCommonTlsContext_ValidationContextType `protobuf_oneof:"validation_context_type"`
+ // Supplies the list of ALPN protocols that the listener should expose. In
+ // practice this is likely to be set to one of two values (see the
+ // :ref:`codec_type
+ // `
+ // parameter in the HTTP connection manager for more information):
+ //
+ // * "h2,http/1.1" If the listener is going to support both HTTP/2 and HTTP/1.1.
+ // * "http/1.1" If the listener is only going to support HTTP/1.1.
+ //
+ // There is no default for this parameter. If empty, Envoy will not expose ALPN.
+ AlpnProtocols []string `protobuf:"bytes,4,rep,name=alpn_protocols,json=alpnProtocols,proto3" json:"alpn_protocols,omitempty"`
+ // Custom TLS handshaker. If empty, defaults to native TLS handshaking
+ // behavior.
+ CustomHandshaker *v3.TypedExtensionConfig `protobuf:"bytes,13,opt,name=custom_handshaker,json=customHandshaker,proto3" json:"custom_handshaker,omitempty"`
+ // TLS key log configuration
+ KeyLog *TlsKeyLog `protobuf:"bytes,15,opt,name=key_log,json=keyLog,proto3" json:"key_log,omitempty"`
+}
+
+func (x *CommonTlsContext) Reset() {
+ *x = CommonTlsContext{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CommonTlsContext) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonTlsContext) ProtoMessage() {}
+
+func (x *CommonTlsContext) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CommonTlsContext.ProtoReflect.Descriptor instead.
+func (*CommonTlsContext) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CommonTlsContext) GetTlsParams() *TlsParameters {
+ if x != nil {
+ return x.TlsParams
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetTlsCertificates() []*TlsCertificate {
+ if x != nil {
+ return x.TlsCertificates
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetTlsCertificateSdsSecretConfigs() []*SdsSecretConfig {
+ if x != nil {
+ return x.TlsCertificateSdsSecretConfigs
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetTlsCertificateProviderInstance() *CertificateProviderPluginInstance {
+ if x != nil {
+ return x.TlsCertificateProviderInstance
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetCustomTlsCertificateSelector() *v3.TypedExtensionConfig {
+ if x != nil {
+ return x.CustomTlsCertificateSelector
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+func (x *CommonTlsContext) GetTlsCertificateCertificateProvider() *CommonTlsContext_CertificateProvider {
+ if x != nil {
+ return x.TlsCertificateCertificateProvider
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+func (x *CommonTlsContext) GetTlsCertificateCertificateProviderInstance() *CommonTlsContext_CertificateProviderInstance {
+ if x != nil {
+ return x.TlsCertificateCertificateProviderInstance
+ }
+ return nil
+}
+
+func (m *CommonTlsContext) GetValidationContextType() isCommonTlsContext_ValidationContextType {
+ if m != nil {
+ return m.ValidationContextType
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetValidationContext() *CertificateValidationContext {
+ if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContext); ok {
+ return x.ValidationContext
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetValidationContextSdsSecretConfig() *SdsSecretConfig {
+ if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContextSdsSecretConfig); ok {
+ return x.ValidationContextSdsSecretConfig
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetCombinedValidationContext() *CommonTlsContext_CombinedCertificateValidationContext {
+ if x, ok := x.GetValidationContextType().(*CommonTlsContext_CombinedValidationContext); ok {
+ return x.CombinedValidationContext
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+func (x *CommonTlsContext) GetValidationContextCertificateProvider() *CommonTlsContext_CertificateProvider {
+ if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContextCertificateProvider); ok {
+ return x.ValidationContextCertificateProvider
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+func (x *CommonTlsContext) GetValidationContextCertificateProviderInstance() *CommonTlsContext_CertificateProviderInstance {
+ if x, ok := x.GetValidationContextType().(*CommonTlsContext_ValidationContextCertificateProviderInstance); ok {
+ return x.ValidationContextCertificateProviderInstance
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetAlpnProtocols() []string {
+ if x != nil {
+ return x.AlpnProtocols
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetCustomHandshaker() *v3.TypedExtensionConfig {
+ if x != nil {
+ return x.CustomHandshaker
+ }
+ return nil
+}
+
+func (x *CommonTlsContext) GetKeyLog() *TlsKeyLog {
+ if x != nil {
+ return x.KeyLog
+ }
+ return nil
+}
+
+type isCommonTlsContext_ValidationContextType interface {
+ isCommonTlsContext_ValidationContextType()
+}
+
+type CommonTlsContext_ValidationContext struct {
+ // How to validate peer certificates.
+ ValidationContext *CertificateValidationContext `protobuf:"bytes,3,opt,name=validation_context,json=validationContext,proto3,oneof"`
+}
+
+type CommonTlsContext_ValidationContextSdsSecretConfig struct {
+ // Config for fetching validation context via SDS API. Note SDS API allows certificates to be
+ // fetched/refreshed over the network asynchronously with respect to the TLS handshake.
+ ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,7,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3,oneof"`
+}
+
+type CommonTlsContext_CombinedValidationContext struct {
+ // Combined certificate validation context holds a default CertificateValidationContext
+ // and SDS config. When SDS server returns dynamic CertificateValidationContext, both dynamic
+ // and default CertificateValidationContext are merged into a new CertificateValidationContext
+ // for validation. This merge is done by Message::MergeFrom(), so dynamic
+ // CertificateValidationContext overwrites singular fields in default
+ // CertificateValidationContext, and concatenates repeated fields to default
+ // CertificateValidationContext, and logical OR is applied to boolean fields.
+ CombinedValidationContext *CommonTlsContext_CombinedCertificateValidationContext `protobuf:"bytes,8,opt,name=combined_validation_context,json=combinedValidationContext,proto3,oneof"`
+}
+
+type CommonTlsContext_ValidationContextCertificateProvider struct {
+ // Certificate provider for fetching validation context.
+ // [#not-implemented-hide:]
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+ ValidationContextCertificateProvider *CommonTlsContext_CertificateProvider `protobuf:"bytes,10,opt,name=validation_context_certificate_provider,json=validationContextCertificateProvider,proto3,oneof"`
+}
+
+type CommonTlsContext_ValidationContextCertificateProviderInstance struct {
+ // Certificate provider instance for fetching validation context.
+ // [#not-implemented-hide:]
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+ ValidationContextCertificateProviderInstance *CommonTlsContext_CertificateProviderInstance `protobuf:"bytes,12,opt,name=validation_context_certificate_provider_instance,json=validationContextCertificateProviderInstance,proto3,oneof"`
+}
+
+func (*CommonTlsContext_ValidationContext) isCommonTlsContext_ValidationContextType() {}
+
+func (*CommonTlsContext_ValidationContextSdsSecretConfig) isCommonTlsContext_ValidationContextType() {
+}
+
+func (*CommonTlsContext_CombinedValidationContext) isCommonTlsContext_ValidationContextType() {}
+
+func (*CommonTlsContext_ValidationContextCertificateProvider) isCommonTlsContext_ValidationContextType() {
+}
+
+func (*CommonTlsContext_ValidationContextCertificateProviderInstance) isCommonTlsContext_ValidationContextType() {
+}
+
+// Config for Certificate provider to get certificates. This provider should allow certificates to be
+// fetched/refreshed over the network asynchronously with respect to the TLS handshake.
+//
+// DEPRECATED: This message is not currently used, but if we ever do need it, we will want to
+// move it out of CommonTlsContext and into common.proto, similar to the existing
+// CertificateProviderPluginInstance message.
+//
+// [#not-implemented-hide:]
+type CommonTlsContext_CertificateProvider struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify
+ // a root-certificate (validation context) or "TLS" to specify a new tls-certificate.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Provider specific config.
+ // Note: an implementation is expected to dedup multiple instances of the same config
+ // to maintain a single certificate-provider instance. The sharing can happen, for
+ // example, among multiple clusters or between the tls_certificate and validation_context
+ // certificate providers of a cluster.
+ // This config could be supplied inline or (in future) a named xDS resource.
+ //
+ // Types that are assignable to Config:
+ //
+ // *CommonTlsContext_CertificateProvider_TypedConfig
+ Config isCommonTlsContext_CertificateProvider_Config `protobuf_oneof:"config"`
+}
+
+func (x *CommonTlsContext_CertificateProvider) Reset() {
+ *x = CommonTlsContext_CertificateProvider{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CommonTlsContext_CertificateProvider) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonTlsContext_CertificateProvider) ProtoMessage() {}
+
+func (x *CommonTlsContext_CertificateProvider) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CommonTlsContext_CertificateProvider.ProtoReflect.Descriptor instead.
+func (*CommonTlsContext_CertificateProvider) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{3, 0}
+}
+
+func (x *CommonTlsContext_CertificateProvider) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (m *CommonTlsContext_CertificateProvider) GetConfig() isCommonTlsContext_CertificateProvider_Config {
+ if m != nil {
+ return m.Config
+ }
+ return nil
+}
+
+func (x *CommonTlsContext_CertificateProvider) GetTypedConfig() *v3.TypedExtensionConfig {
+ if x, ok := x.GetConfig().(*CommonTlsContext_CertificateProvider_TypedConfig); ok {
+ return x.TypedConfig
+ }
+ return nil
+}
+
+type isCommonTlsContext_CertificateProvider_Config interface {
+ isCommonTlsContext_CertificateProvider_Config()
+}
+
+type CommonTlsContext_CertificateProvider_TypedConfig struct {
+ TypedConfig *v3.TypedExtensionConfig `protobuf:"bytes,2,opt,name=typed_config,json=typedConfig,proto3,oneof"`
+}
+
+func (*CommonTlsContext_CertificateProvider_TypedConfig) isCommonTlsContext_CertificateProvider_Config() {
+}
+
+// Similar to CertificateProvider above, but allows the provider instances to be configured on
+// the client side instead of being sent from the control plane.
+//
+// DEPRECATED: This message was moved outside of CommonTlsContext
+// and now lives in common.proto.
+//
+// [#not-implemented-hide:]
+type CommonTlsContext_CertificateProviderInstance struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Provider instance name. This name must be defined in the client's configuration (e.g., a
+ // bootstrap file) to correspond to a provider instance (i.e., the same data in the typed_config
+ // field that would be sent in the CertificateProvider message if the config was sent by the
+ // control plane). If not present, defaults to "default".
+ //
+ // Instance names should generally be defined not in terms of the underlying provider
+ // implementation (e.g., "file_watcher") but rather in terms of the function of the
+ // certificates (e.g., "foo_deployment_identity").
+ InstanceName string `protobuf:"bytes,1,opt,name=instance_name,json=instanceName,proto3" json:"instance_name,omitempty"`
+ // Opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify
+ // a root-certificate (validation context) or "example.com" to specify a certificate for a
+ // particular domain. Not all provider instances will actually use this field, so the value
+ // defaults to the empty string.
+ CertificateName string `protobuf:"bytes,2,opt,name=certificate_name,json=certificateName,proto3" json:"certificate_name,omitempty"`
+}
+
+func (x *CommonTlsContext_CertificateProviderInstance) Reset() {
+ *x = CommonTlsContext_CertificateProviderInstance{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CommonTlsContext_CertificateProviderInstance) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonTlsContext_CertificateProviderInstance) ProtoMessage() {}
+
+func (x *CommonTlsContext_CertificateProviderInstance) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CommonTlsContext_CertificateProviderInstance.ProtoReflect.Descriptor instead.
+func (*CommonTlsContext_CertificateProviderInstance) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{3, 1}
+}
+
+func (x *CommonTlsContext_CertificateProviderInstance) GetInstanceName() string {
+ if x != nil {
+ return x.InstanceName
+ }
+ return ""
+}
+
+func (x *CommonTlsContext_CertificateProviderInstance) GetCertificateName() string {
+ if x != nil {
+ return x.CertificateName
+ }
+ return ""
+}
+
+type CommonTlsContext_CombinedCertificateValidationContext struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // How to validate peer certificates.
+ DefaultValidationContext *CertificateValidationContext `protobuf:"bytes,1,opt,name=default_validation_context,json=defaultValidationContext,proto3" json:"default_validation_context,omitempty"`
+ // Config for fetching validation context via SDS API. Note SDS API allows certificates to be
+ // fetched/refreshed over the network asynchronously with respect to the TLS handshake.
+ ValidationContextSdsSecretConfig *SdsSecretConfig `protobuf:"bytes,2,opt,name=validation_context_sds_secret_config,json=validationContextSdsSecretConfig,proto3" json:"validation_context_sds_secret_config,omitempty"`
+ // Certificate provider for fetching CA certs. This will populate the
+ // “default_validation_context.trusted_ca“ field.
+ // [#not-implemented-hide:]
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+ ValidationContextCertificateProvider *CommonTlsContext_CertificateProvider `protobuf:"bytes,3,opt,name=validation_context_certificate_provider,json=validationContextCertificateProvider,proto3" json:"validation_context_certificate_provider,omitempty"`
+ // Certificate provider instance for fetching CA certs. This will populate the
+ // “default_validation_context.trusted_ca“ field.
+ // [#not-implemented-hide:]
+ //
+ // Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+ ValidationContextCertificateProviderInstance *CommonTlsContext_CertificateProviderInstance `protobuf:"bytes,4,opt,name=validation_context_certificate_provider_instance,json=validationContextCertificateProviderInstance,proto3" json:"validation_context_certificate_provider_instance,omitempty"`
+}
+
+func (x *CommonTlsContext_CombinedCertificateValidationContext) Reset() {
+ *x = CommonTlsContext_CombinedCertificateValidationContext{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CommonTlsContext_CombinedCertificateValidationContext) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CommonTlsContext_CombinedCertificateValidationContext) ProtoMessage() {}
+
+func (x *CommonTlsContext_CombinedCertificateValidationContext) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CommonTlsContext_CombinedCertificateValidationContext.ProtoReflect.Descriptor instead.
+func (*CommonTlsContext_CombinedCertificateValidationContext) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP(), []int{3, 2}
+}
+
+func (x *CommonTlsContext_CombinedCertificateValidationContext) GetDefaultValidationContext() *CertificateValidationContext {
+ if x != nil {
+ return x.DefaultValidationContext
+ }
+ return nil
+}
+
+func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationContextSdsSecretConfig() *SdsSecretConfig {
+ if x != nil {
+ return x.ValidationContextSdsSecretConfig
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationContextCertificateProvider() *CommonTlsContext_CertificateProvider {
+ if x != nil {
+ return x.ValidationContextCertificateProvider
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/extensions/transport_sockets/tls/v3/tls.proto.
+func (x *CommonTlsContext_CombinedCertificateValidationContext) GetValidationContextCertificateProviderInstance() *CommonTlsContext_CertificateProviderInstance {
+ if x != nil {
+ return x.ValidationContextCertificateProviderInstance
+ }
+ return nil
+}
+
+var File_envoy_extensions_transport_sockets_tls_v3_tls_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDesc = []byte{
+ 0x0a, 0x33, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
+ 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33,
+ 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63,
+ 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74,
+ 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x36, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73,
+ 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x65,
+ 0x63, 0x72, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70,
+ 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x03, 0x0a, 0x12, 0x55,
+ 0x70, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x12, 0x69, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3b, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65,
+ 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1a, 0x0a, 0x03,
+ 0x73, 0x6e, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x72, 0x03,
+ 0x28, 0xff, 0x01, 0x52, 0x03, 0x73, 0x6e, 0x69, 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f,
+ 0x77, 0x5f, 0x72, 0x65, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x6e, 0x65,
+ 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x46, 0x0a, 0x10, 0x6d, 0x61, 0x78,
+ 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79,
+ 0x73, 0x12, 0x4d, 0x0a, 0x15, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x72, 0x73, 0x61,
+ 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x12, 0x65, 0x6e,
+ 0x66, 0x6f, 0x72, 0x63, 0x65, 0x52, 0x73, 0x61, 0x4b, 0x65, 0x79, 0x55, 0x73, 0x61, 0x67, 0x65,
+ 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61,
+ 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x55, 0x70, 0x73, 0x74, 0x72,
+ 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0xce, 0x09,
+ 0x0a, 0x14, 0x44, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x69, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f,
+ 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43,
+ 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52,
+ 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x12, 0x58, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x63, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75,
+ 0x65, 0x52, 0x18, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
+ 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x72,
+ 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x5f, 0x73, 0x6e, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x0a, 0x72, 0x65,
+ 0x71, 0x75, 0x69, 0x72, 0x65, 0x53, 0x6e, 0x69, 0x12, 0x71, 0x0a, 0x13, 0x73, 0x65, 0x73, 0x73,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
+ 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76,
+ 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b,
+ 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x48, 0x00, 0x52, 0x11, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f,
+ 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x25,
+ 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b,
+ 0x65, 0x79, 0x73, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74,
+ 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73,
+ 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65,
+ 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x20, 0x73, 0x65, 0x73, 0x73, 0x69,
+ 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x73, 0x53, 0x64, 0x73, 0x53,
+ 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x51, 0x0a, 0x24, 0x64,
+ 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73,
+ 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x21, 0x64, 0x69, 0x73,
+ 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x65, 0x73,
+ 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4d,
+ 0x0a, 0x23, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x66,
+ 0x75, 0x6c, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x20, 0x64, 0x69, 0x73,
+ 0x61, 0x62, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x66, 0x75, 0x6c, 0x53, 0x65, 0x73, 0x73,
+ 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a,
+ 0x0f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x42, 0x10, 0xfa, 0x42, 0x0d, 0xaa, 0x01, 0x0a, 0x1a, 0x06, 0x08, 0x80, 0x80, 0x80, 0x80,
+ 0x10, 0x32, 0x00, 0x52, 0x0e, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65,
+ 0x6f, 0x75, 0x74, 0x12, 0x88, 0x01, 0x0a, 0x12, 0x6f, 0x63, 0x73, 0x70, 0x5f, 0x73, 0x74, 0x61,
+ 0x70, 0x6c, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x77,
+ 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x2e, 0x4f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69,
+ 0x63, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x10, 0x6f, 0x63,
+ 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x5f,
+ 0x0a, 0x1f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x5f, 0x63, 0x65, 0x72, 0x74,
+ 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x73, 0x6e, 0x69, 0x5f, 0x6d, 0x69, 0x73, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61,
+ 0x6c, 0x75, 0x65, 0x52, 0x1a, 0x66, 0x75, 0x6c, 0x6c, 0x53, 0x63, 0x61, 0x6e, 0x43, 0x65, 0x72,
+ 0x74, 0x73, 0x4f, 0x6e, 0x53, 0x6e, 0x69, 0x4d, 0x69, 0x73, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12,
+ 0x32, 0x0a, 0x15, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
+ 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13,
+ 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x69, 0x70, 0x68,
+ 0x65, 0x72, 0x73, 0x22, 0x4e, 0x0a, 0x10, 0x4f, 0x63, 0x73, 0x70, 0x53, 0x74, 0x61, 0x70, 0x6c,
+ 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x14, 0x0a, 0x10, 0x4c, 0x45, 0x4e, 0x49, 0x45,
+ 0x4e, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, 0x13, 0x0a,
+ 0x0f, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c, 0x49, 0x4e, 0x47,
+ 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x55, 0x53, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x50, 0x4c,
+ 0x45, 0x10, 0x02, 0x3a, 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x44, 0x6f,
+ 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x42, 0x1a, 0x0a, 0x18, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69,
+ 0x63, 0x6b, 0x65, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0xcc,
+ 0x01, 0x0a, 0x09, 0x54, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x67, 0x12, 0x1b, 0x0a, 0x04,
+ 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72,
+ 0x02, 0x10, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x4f, 0x0a, 0x13, 0x6c, 0x6f, 0x63,
+ 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x69,
+ 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x41, 0x64,
+ 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x51, 0x0a, 0x14, 0x72, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, 0x72, 0x61, 0x6e,
+ 0x67, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e,
+ 0x43, 0x69, 0x64, 0x72, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x12, 0x72, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x22, 0xdd, 0x18,
+ 0x0a, 0x10, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x12, 0x57, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
+ 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73,
+ 0x52, 0x09, 0x74, 0x6c, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x64, 0x0a, 0x10, 0x74,
+ 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x18,
+ 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x39, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
+ 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76,
+ 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,
+ 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,
+ 0x73, 0x12, 0x86, 0x01, 0x0a, 0x22, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65,
+ 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x1e, 0x74, 0x6c, 0x73, 0x43,
+ 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63,
+ 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x21, 0x74,
+ 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
+ 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x6e, 0x73, 0x74,
+ 0x61, 0x6e, 0x63, 0x65, 0x52, 0x1e, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74,
+ 0x61, 0x6e, 0x63, 0x65, 0x12, 0x71, 0x0a, 0x1f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74,
+ 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x73,
+ 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72,
+ 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x1c, 0x63, 0x75, 0x73, 0x74, 0x6f,
+ 0x6d, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x53,
+ 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0xad, 0x01, 0x0a, 0x24, 0x74, 0x6c, 0x73, 0x5f,
+ 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74,
+ 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
+ 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
+ 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33,
+ 0x2e, 0x30, 0x18, 0x01, 0x52, 0x21, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50,
+ 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xc6, 0x01, 0x0a, 0x2d, 0x74, 0x6c, 0x73, 0x5f,
+ 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x65, 0x72, 0x74,
+ 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
+ 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72,
+ 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72,
+ 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03,
+ 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, 0x29, 0x74, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,
+ 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65,
+ 0x12, 0x78, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
+ 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x48, 0x00, 0x52, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x8c, 0x01, 0x0a, 0x24, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x5f, 0x73, 0x64, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74,
+ 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63,
+ 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xa2, 0x01, 0x0a, 0x1b, 0x63, 0x6f,
+ 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x60, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d,
+ 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,
+ 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x48, 0x00, 0x52, 0x19, 0x63, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x56, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0xb5,
+ 0x01, 0x0a, 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
+ 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x4f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f,
+ 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d,
+ 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65,
+ 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,
+ 0x72, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x48, 0x00,
+ 0x52, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72,
+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0xce, 0x01, 0x0a, 0x30, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65,
+ 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x57, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73,
+ 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f,
+ 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43,
+ 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8,
+ 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x48, 0x00, 0x52, 0x2c, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74,
+ 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x6c, 0x70, 0x6e, 0x5f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52,
+ 0x0d, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x57,
+ 0x0a, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61,
+ 0x6b, 0x65, 0x72, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
+ 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x10, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x61, 0x6e,
+ 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x07, 0x6b, 0x65, 0x79, 0x5f, 0x6c,
+ 0x6f, 0x67, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c,
+ 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x4c, 0x6f, 0x67, 0x52, 0x06,
+ 0x6b, 0x65, 0x79, 0x4c, 0x6f, 0x67, 0x1a, 0x92, 0x01, 0x0a, 0x13, 0x43, 0x65, 0x72, 0x74, 0x69,
+ 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x1b,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42,
+ 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x74,
+ 0x79, 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52,
+ 0x0b, 0x74, 0x79, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x0d, 0x0a, 0x06,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x6d, 0x0a, 0x1b, 0x43,
+ 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x29, 0x0a, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x65, 0x72, 0x74, 0x69,
+ 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x1a, 0xa4, 0x06, 0x0a, 0x24, 0x43,
+ 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61,
+ 0x74, 0x65, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x12, 0x8f, 0x01, 0x0a, 0x1a, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f,
+ 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x47, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e,
+ 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c,
+ 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,
+ 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x18, 0x64, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f,
+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x94, 0x01, 0x0a, 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x64, 0x73,
+ 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74,
+ 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72,
+ 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33,
+ 0x2e, 0x53, 0x64, 0x73, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x20, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x53, 0x64, 0x73,
+ 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0xb3, 0x01, 0x0a,
+ 0x27, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f,
+ 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b,
+ 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
+ 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74,
+ 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x42,
+ 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, 0x24, 0x76, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43,
+ 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,
+ 0x65, 0x72, 0x12, 0xcc, 0x01, 0x0a, 0x30, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x5f, 0x69,
+ 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x57, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65,
+ 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+ 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69,
+ 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e,
+ 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e,
+ 0x30, 0x18, 0x01, 0x52, 0x2c, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74,
+ 0x65, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63,
+ 0x65, 0x3a, 0x4e, 0x9a, 0xc5, 0x88, 0x1e, 0x49, 0x0a, 0x47, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x43, 0x6f, 0x6d,
+ 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65,
+ 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78,
+ 0x74, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x42, 0x19, 0x0a, 0x17,
+ 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65,
+ 0x78, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x42, 0xa5, 0x01,
+ 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x37, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f,
+ 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76,
+ 0x33, 0x42, 0x08, 0x54, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70,
+ 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d,
+ 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74,
+ 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x3b,
+ 0x74, 0x6c, 0x73, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescOnce sync.Once
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescData = file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDesc
+)
+
+func file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescData)
+ })
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDescData
+}
+
+var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_goTypes = []interface{}{
+ (DownstreamTlsContext_OcspStaplePolicy)(0), // 0: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.OcspStaplePolicy
+ (*UpstreamTlsContext)(nil), // 1: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext
+ (*DownstreamTlsContext)(nil), // 2: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext
+ (*TlsKeyLog)(nil), // 3: envoy.extensions.transport_sockets.tls.v3.TlsKeyLog
+ (*CommonTlsContext)(nil), // 4: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext
+ (*CommonTlsContext_CertificateProvider)(nil), // 5: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider
+ (*CommonTlsContext_CertificateProviderInstance)(nil), // 6: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance
+ (*CommonTlsContext_CombinedCertificateValidationContext)(nil), // 7: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext
+ (*wrapperspb.UInt32Value)(nil), // 8: google.protobuf.UInt32Value
+ (*wrapperspb.BoolValue)(nil), // 9: google.protobuf.BoolValue
+ (*TlsSessionTicketKeys)(nil), // 10: envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys
+ (*SdsSecretConfig)(nil), // 11: envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig
+ (*durationpb.Duration)(nil), // 12: google.protobuf.Duration
+ (*v3.CidrRange)(nil), // 13: envoy.config.core.v3.CidrRange
+ (*TlsParameters)(nil), // 14: envoy.extensions.transport_sockets.tls.v3.TlsParameters
+ (*TlsCertificate)(nil), // 15: envoy.extensions.transport_sockets.tls.v3.TlsCertificate
+ (*CertificateProviderPluginInstance)(nil), // 16: envoy.extensions.transport_sockets.tls.v3.CertificateProviderPluginInstance
+ (*v3.TypedExtensionConfig)(nil), // 17: envoy.config.core.v3.TypedExtensionConfig
+ (*CertificateValidationContext)(nil), // 18: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext
+}
+var file_envoy_extensions_transport_sockets_tls_v3_tls_proto_depIdxs = []int32{
+ 4, // 0: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext.common_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext
+ 8, // 1: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext.max_session_keys:type_name -> google.protobuf.UInt32Value
+ 9, // 2: envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext.enforce_rsa_key_usage:type_name -> google.protobuf.BoolValue
+ 4, // 3: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.common_tls_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext
+ 9, // 4: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.require_client_certificate:type_name -> google.protobuf.BoolValue
+ 9, // 5: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.require_sni:type_name -> google.protobuf.BoolValue
+ 10, // 6: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.session_ticket_keys:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys
+ 11, // 7: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.session_ticket_keys_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig
+ 12, // 8: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.session_timeout:type_name -> google.protobuf.Duration
+ 0, // 9: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.ocsp_staple_policy:type_name -> envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.OcspStaplePolicy
+ 9, // 10: envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext.full_scan_certs_on_sni_mismatch:type_name -> google.protobuf.BoolValue
+ 13, // 11: envoy.extensions.transport_sockets.tls.v3.TlsKeyLog.local_address_range:type_name -> envoy.config.core.v3.CidrRange
+ 13, // 12: envoy.extensions.transport_sockets.tls.v3.TlsKeyLog.remote_address_range:type_name -> envoy.config.core.v3.CidrRange
+ 14, // 13: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_params:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsParameters
+ 15, // 14: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificates:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsCertificate
+ 11, // 15: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_sds_secret_configs:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig
+ 16, // 16: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateProviderPluginInstance
+ 17, // 17: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.custom_tls_certificate_selector:type_name -> envoy.config.core.v3.TypedExtensionConfig
+ 5, // 18: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider
+ 6, // 19: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.tls_certificate_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance
+ 18, // 20: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext
+ 11, // 21: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig
+ 7, // 22: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.combined_validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext
+ 5, // 23: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider
+ 6, // 24: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.validation_context_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance
+ 17, // 25: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.custom_handshaker:type_name -> envoy.config.core.v3.TypedExtensionConfig
+ 3, // 26: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.key_log:type_name -> envoy.extensions.transport_sockets.tls.v3.TlsKeyLog
+ 17, // 27: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider.typed_config:type_name -> envoy.config.core.v3.TypedExtensionConfig
+ 18, // 28: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.default_validation_context:type_name -> envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext
+ 11, // 29: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.validation_context_sds_secret_config:type_name -> envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig
+ 5, // 30: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.validation_context_certificate_provider:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider
+ 6, // 31: envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext.validation_context_certificate_provider_instance:type_name -> envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance
+ 32, // [32:32] is the sub-list for method output_type
+ 32, // [32:32] is the sub-list for method input_type
+ 32, // [32:32] is the sub-list for extension type_name
+ 32, // [32:32] is the sub-list for extension extendee
+ 0, // [0:32] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init() }
+func file_envoy_extensions_transport_sockets_tls_v3_tls_proto_init() {
+ if File_envoy_extensions_transport_sockets_tls_v3_tls_proto != nil {
+ return
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_common_proto_init()
+ file_envoy_extensions_transport_sockets_tls_v3_secret_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpstreamTlsContext); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DownstreamTlsContext); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TlsKeyLog); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CommonTlsContext); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CommonTlsContext_CertificateProvider); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CommonTlsContext_CertificateProviderInstance); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CommonTlsContext_CombinedCertificateValidationContext); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*DownstreamTlsContext_SessionTicketKeys)(nil),
+ (*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig)(nil),
+ (*DownstreamTlsContext_DisableStatelessSessionResumption)(nil),
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[3].OneofWrappers = []interface{}{
+ (*CommonTlsContext_ValidationContext)(nil),
+ (*CommonTlsContext_ValidationContextSdsSecretConfig)(nil),
+ (*CommonTlsContext_CombinedValidationContext)(nil),
+ (*CommonTlsContext_ValidationContextCertificateProvider)(nil),
+ (*CommonTlsContext_ValidationContextCertificateProviderInstance)(nil),
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes[4].OneofWrappers = []interface{}{
+ (*CommonTlsContext_CertificateProvider_TypedConfig)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_transport_sockets_tls_v3_tls_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_transport_sockets_tls_v3_tls_proto_depIdxs,
+ EnumInfos: file_envoy_extensions_transport_sockets_tls_v3_tls_proto_enumTypes,
+ MessageInfos: file_envoy_extensions_transport_sockets_tls_v3_tls_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_transport_sockets_tls_v3_tls_proto = out.File
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_rawDesc = nil
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_goTypes = nil
+ file_envoy_extensions_transport_sockets_tls_v3_tls_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls.pb.validate.go
new file mode 100644
index 000000000..6468ff227
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls.pb.validate.go
@@ -0,0 +1,1902 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/transport_sockets/tls/v3/tls.proto
+
+package tlsv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on UpstreamTlsContext with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *UpstreamTlsContext) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on UpstreamTlsContext with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// UpstreamTlsContextMultiError, or nil if none found.
+func (m *UpstreamTlsContext) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *UpstreamTlsContext) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetCommonTlsContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, UpstreamTlsContextValidationError{
+ field: "CommonTlsContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, UpstreamTlsContextValidationError{
+ field: "CommonTlsContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return UpstreamTlsContextValidationError{
+ field: "CommonTlsContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(m.GetSni()) > 255 {
+ err := UpstreamTlsContextValidationError{
+ field: "Sni",
+ reason: "value length must be at most 255 bytes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for AllowRenegotiation
+
+ if all {
+ switch v := interface{}(m.GetMaxSessionKeys()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, UpstreamTlsContextValidationError{
+ field: "MaxSessionKeys",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, UpstreamTlsContextValidationError{
+ field: "MaxSessionKeys",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMaxSessionKeys()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return UpstreamTlsContextValidationError{
+ field: "MaxSessionKeys",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetEnforceRsaKeyUsage()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, UpstreamTlsContextValidationError{
+ field: "EnforceRsaKeyUsage",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, UpstreamTlsContextValidationError{
+ field: "EnforceRsaKeyUsage",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEnforceRsaKeyUsage()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return UpstreamTlsContextValidationError{
+ field: "EnforceRsaKeyUsage",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return UpstreamTlsContextMultiError(errors)
+ }
+
+ return nil
+}
+
+// UpstreamTlsContextMultiError is an error wrapping multiple validation errors
+// returned by UpstreamTlsContext.ValidateAll() if the designated constraints
+// aren't met.
+type UpstreamTlsContextMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m UpstreamTlsContextMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m UpstreamTlsContextMultiError) AllErrors() []error { return m }
+
+// UpstreamTlsContextValidationError is the validation error returned by
+// UpstreamTlsContext.Validate if the designated constraints aren't met.
+type UpstreamTlsContextValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e UpstreamTlsContextValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e UpstreamTlsContextValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e UpstreamTlsContextValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e UpstreamTlsContextValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e UpstreamTlsContextValidationError) ErrorName() string {
+ return "UpstreamTlsContextValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e UpstreamTlsContextValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sUpstreamTlsContext.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = UpstreamTlsContextValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = UpstreamTlsContextValidationError{}
+
+// Validate checks the field values on DownstreamTlsContext with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *DownstreamTlsContext) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DownstreamTlsContext with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// DownstreamTlsContextMultiError, or nil if none found.
+func (m *DownstreamTlsContext) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DownstreamTlsContext) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetCommonTlsContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "CommonTlsContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "CommonTlsContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCommonTlsContext()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DownstreamTlsContextValidationError{
+ field: "CommonTlsContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetRequireClientCertificate()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "RequireClientCertificate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "RequireClientCertificate",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequireClientCertificate()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DownstreamTlsContextValidationError{
+ field: "RequireClientCertificate",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetRequireSni()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "RequireSni",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "RequireSni",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequireSni()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DownstreamTlsContextValidationError{
+ field: "RequireSni",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for DisableStatefulSessionResumption
+
+ if d := m.GetSessionTimeout(); d != nil {
+ dur, err := d.AsDuration(), d.CheckValid()
+ if err != nil {
+ err = DownstreamTlsContextValidationError{
+ field: "SessionTimeout",
+ reason: "value is not a valid duration",
+ cause: err,
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ } else {
+
+ lt := time.Duration(4294967296*time.Second + 0*time.Nanosecond)
+ gte := time.Duration(0*time.Second + 0*time.Nanosecond)
+
+ if dur < gte || dur >= lt {
+ err := DownstreamTlsContextValidationError{
+ field: "SessionTimeout",
+ reason: "value must be inside range [0s, 1193046h28m16s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+ }
+
+ if _, ok := DownstreamTlsContext_OcspStaplePolicy_name[int32(m.GetOcspStaplePolicy())]; !ok {
+ err := DownstreamTlsContextValidationError{
+ field: "OcspStaplePolicy",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetFullScanCertsOnSniMismatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "FullScanCertsOnSniMismatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "FullScanCertsOnSniMismatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetFullScanCertsOnSniMismatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DownstreamTlsContextValidationError{
+ field: "FullScanCertsOnSniMismatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for PreferClientCiphers
+
+ switch v := m.SessionTicketKeysType.(type) {
+ case *DownstreamTlsContext_SessionTicketKeys:
+ if v == nil {
+ err := DownstreamTlsContextValidationError{
+ field: "SessionTicketKeysType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSessionTicketKeys()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "SessionTicketKeys",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "SessionTicketKeys",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSessionTicketKeys()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DownstreamTlsContextValidationError{
+ field: "SessionTicketKeys",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig:
+ if v == nil {
+ err := DownstreamTlsContextValidationError{
+ field: "SessionTicketKeysType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "SessionTicketKeysSdsSecretConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DownstreamTlsContextValidationError{
+ field: "SessionTicketKeysSdsSecretConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSessionTicketKeysSdsSecretConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DownstreamTlsContextValidationError{
+ field: "SessionTicketKeysSdsSecretConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *DownstreamTlsContext_DisableStatelessSessionResumption:
+ if v == nil {
+ err := DownstreamTlsContextValidationError{
+ field: "SessionTicketKeysType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ // no validation rules for DisableStatelessSessionResumption
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return DownstreamTlsContextMultiError(errors)
+ }
+
+ return nil
+}
+
+// DownstreamTlsContextMultiError is an error wrapping multiple validation
+// errors returned by DownstreamTlsContext.ValidateAll() if the designated
+// constraints aren't met.
+type DownstreamTlsContextMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DownstreamTlsContextMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DownstreamTlsContextMultiError) AllErrors() []error { return m }
+
+// DownstreamTlsContextValidationError is the validation error returned by
+// DownstreamTlsContext.Validate if the designated constraints aren't met.
+type DownstreamTlsContextValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DownstreamTlsContextValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DownstreamTlsContextValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DownstreamTlsContextValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DownstreamTlsContextValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DownstreamTlsContextValidationError) ErrorName() string {
+ return "DownstreamTlsContextValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DownstreamTlsContextValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDownstreamTlsContext.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DownstreamTlsContextValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DownstreamTlsContextValidationError{}
+
+// Validate checks the field values on TlsKeyLog with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *TlsKeyLog) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TlsKeyLog with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in TlsKeyLogMultiError, or nil
+// if none found.
+func (m *TlsKeyLog) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TlsKeyLog) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetPath()) < 1 {
+ err := TlsKeyLogValidationError{
+ field: "Path",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetLocalAddressRange() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsKeyLogValidationError{
+ field: fmt.Sprintf("LocalAddressRange[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsKeyLogValidationError{
+ field: fmt.Sprintf("LocalAddressRange[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsKeyLogValidationError{
+ field: fmt.Sprintf("LocalAddressRange[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetRemoteAddressRange() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, TlsKeyLogValidationError{
+ field: fmt.Sprintf("RemoteAddressRange[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, TlsKeyLogValidationError{
+ field: fmt.Sprintf("RemoteAddressRange[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return TlsKeyLogValidationError{
+ field: fmt.Sprintf("RemoteAddressRange[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return TlsKeyLogMultiError(errors)
+ }
+
+ return nil
+}
+
+// TlsKeyLogMultiError is an error wrapping multiple validation errors returned
+// by TlsKeyLog.ValidateAll() if the designated constraints aren't met.
+type TlsKeyLogMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TlsKeyLogMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TlsKeyLogMultiError) AllErrors() []error { return m }
+
+// TlsKeyLogValidationError is the validation error returned by
+// TlsKeyLog.Validate if the designated constraints aren't met.
+type TlsKeyLogValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TlsKeyLogValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TlsKeyLogValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TlsKeyLogValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TlsKeyLogValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TlsKeyLogValidationError) ErrorName() string { return "TlsKeyLogValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TlsKeyLogValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTlsKeyLog.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TlsKeyLogValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TlsKeyLogValidationError{}
+
+// Validate checks the field values on CommonTlsContext with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *CommonTlsContext) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CommonTlsContext with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CommonTlsContextMultiError, or nil if none found.
+func (m *CommonTlsContext) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CommonTlsContext) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetTlsParams()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "TlsParams",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "TlsParams",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTlsParams()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "TlsParams",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetTlsCertificates() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: fmt.Sprintf("TlsCertificates[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: fmt.Sprintf("TlsCertificates[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: fmt.Sprintf("TlsCertificates[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetTlsCertificateSdsSecretConfigs() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: fmt.Sprintf("TlsCertificateSdsSecretConfigs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetTlsCertificateProviderInstance()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "TlsCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "TlsCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTlsCertificateProviderInstance()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "TlsCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCustomTlsCertificateSelector()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "CustomTlsCertificateSelector",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "CustomTlsCertificateSelector",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCustomTlsCertificateSelector()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "CustomTlsCertificateSelector",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetTlsCertificateCertificateProvider()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "TlsCertificateCertificateProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "TlsCertificateCertificateProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTlsCertificateCertificateProvider()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "TlsCertificateCertificateProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetTlsCertificateCertificateProviderInstance()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "TlsCertificateCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "TlsCertificateCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTlsCertificateCertificateProviderInstance()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "TlsCertificateCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCustomHandshaker()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "CustomHandshaker",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "CustomHandshaker",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCustomHandshaker()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "CustomHandshaker",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetKeyLog()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "KeyLog",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "KeyLog",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetKeyLog()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "KeyLog",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ switch v := m.ValidationContextType.(type) {
+ case *CommonTlsContext_ValidationContext:
+ if v == nil {
+ err := CommonTlsContextValidationError{
+ field: "ValidationContextType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetValidationContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "ValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "ValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValidationContext()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "ValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CommonTlsContext_ValidationContextSdsSecretConfig:
+ if v == nil {
+ err := CommonTlsContextValidationError{
+ field: "ValidationContextType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetValidationContextSdsSecretConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "ValidationContextSdsSecretConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "ValidationContextSdsSecretConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "ValidationContextSdsSecretConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CommonTlsContext_CombinedValidationContext:
+ if v == nil {
+ err := CommonTlsContextValidationError{
+ field: "ValidationContextType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetCombinedValidationContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "CombinedValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "CombinedValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCombinedValidationContext()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "CombinedValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CommonTlsContext_ValidationContextCertificateProvider:
+ if v == nil {
+ err := CommonTlsContextValidationError{
+ field: "ValidationContextType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetValidationContextCertificateProvider()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "ValidationContextCertificateProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "ValidationContextCertificateProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValidationContextCertificateProvider()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "ValidationContextCertificateProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CommonTlsContext_ValidationContextCertificateProviderInstance:
+ if v == nil {
+ err := CommonTlsContextValidationError{
+ field: "ValidationContextType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetValidationContextCertificateProviderInstance()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "ValidationContextCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContextValidationError{
+ field: "ValidationContextCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValidationContextCertificateProviderInstance()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContextValidationError{
+ field: "ValidationContextCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return CommonTlsContextMultiError(errors)
+ }
+
+ return nil
+}
+
+// CommonTlsContextMultiError is an error wrapping multiple validation errors
+// returned by CommonTlsContext.ValidateAll() if the designated constraints
+// aren't met.
+type CommonTlsContextMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CommonTlsContextMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CommonTlsContextMultiError) AllErrors() []error { return m }
+
+// CommonTlsContextValidationError is the validation error returned by
+// CommonTlsContext.Validate if the designated constraints aren't met.
+type CommonTlsContextValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CommonTlsContextValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CommonTlsContextValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CommonTlsContextValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CommonTlsContextValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CommonTlsContextValidationError) ErrorName() string { return "CommonTlsContextValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CommonTlsContextValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCommonTlsContext.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CommonTlsContextValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CommonTlsContextValidationError{}
+
+// Validate checks the field values on CommonTlsContext_CertificateProvider
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *CommonTlsContext_CertificateProvider) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CommonTlsContext_CertificateProvider
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// CommonTlsContext_CertificateProviderMultiError, or nil if none found.
+func (m *CommonTlsContext_CertificateProvider) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CommonTlsContext_CertificateProvider) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := CommonTlsContext_CertificateProviderValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ oneofConfigPresent := false
+ switch v := m.Config.(type) {
+ case *CommonTlsContext_CertificateProvider_TypedConfig:
+ if v == nil {
+ err := CommonTlsContext_CertificateProviderValidationError{
+ field: "Config",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofConfigPresent = true
+
+ if all {
+ switch v := interface{}(m.GetTypedConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContext_CertificateProviderValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContext_CertificateProviderValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTypedConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContext_CertificateProviderValidationError{
+ field: "TypedConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofConfigPresent {
+ err := CommonTlsContext_CertificateProviderValidationError{
+ field: "Config",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return CommonTlsContext_CertificateProviderMultiError(errors)
+ }
+
+ return nil
+}
+
+// CommonTlsContext_CertificateProviderMultiError is an error wrapping multiple
+// validation errors returned by
+// CommonTlsContext_CertificateProvider.ValidateAll() if the designated
+// constraints aren't met.
+type CommonTlsContext_CertificateProviderMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CommonTlsContext_CertificateProviderMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CommonTlsContext_CertificateProviderMultiError) AllErrors() []error { return m }
+
+// CommonTlsContext_CertificateProviderValidationError is the validation error
+// returned by CommonTlsContext_CertificateProvider.Validate if the designated
+// constraints aren't met.
+type CommonTlsContext_CertificateProviderValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CommonTlsContext_CertificateProviderValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CommonTlsContext_CertificateProviderValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CommonTlsContext_CertificateProviderValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CommonTlsContext_CertificateProviderValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CommonTlsContext_CertificateProviderValidationError) ErrorName() string {
+ return "CommonTlsContext_CertificateProviderValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CommonTlsContext_CertificateProviderValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCommonTlsContext_CertificateProvider.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CommonTlsContext_CertificateProviderValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CommonTlsContext_CertificateProviderValidationError{}
+
+// Validate checks the field values on
+// CommonTlsContext_CertificateProviderInstance with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *CommonTlsContext_CertificateProviderInstance) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// CommonTlsContext_CertificateProviderInstance with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// CommonTlsContext_CertificateProviderInstanceMultiError, or nil if none found.
+func (m *CommonTlsContext_CertificateProviderInstance) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CommonTlsContext_CertificateProviderInstance) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for InstanceName
+
+ // no validation rules for CertificateName
+
+ if len(errors) > 0 {
+ return CommonTlsContext_CertificateProviderInstanceMultiError(errors)
+ }
+
+ return nil
+}
+
+// CommonTlsContext_CertificateProviderInstanceMultiError is an error wrapping
+// multiple validation errors returned by
+// CommonTlsContext_CertificateProviderInstance.ValidateAll() if the
+// designated constraints aren't met.
+type CommonTlsContext_CertificateProviderInstanceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CommonTlsContext_CertificateProviderInstanceMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CommonTlsContext_CertificateProviderInstanceMultiError) AllErrors() []error { return m }
+
+// CommonTlsContext_CertificateProviderInstanceValidationError is the
+// validation error returned by
+// CommonTlsContext_CertificateProviderInstance.Validate if the designated
+// constraints aren't met.
+type CommonTlsContext_CertificateProviderInstanceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CommonTlsContext_CertificateProviderInstanceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CommonTlsContext_CertificateProviderInstanceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CommonTlsContext_CertificateProviderInstanceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CommonTlsContext_CertificateProviderInstanceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CommonTlsContext_CertificateProviderInstanceValidationError) ErrorName() string {
+ return "CommonTlsContext_CertificateProviderInstanceValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CommonTlsContext_CertificateProviderInstanceValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCommonTlsContext_CertificateProviderInstance.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CommonTlsContext_CertificateProviderInstanceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CommonTlsContext_CertificateProviderInstanceValidationError{}
+
+// Validate checks the field values on
+// CommonTlsContext_CombinedCertificateValidationContext with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *CommonTlsContext_CombinedCertificateValidationContext) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// CommonTlsContext_CombinedCertificateValidationContext with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CommonTlsContext_CombinedCertificateValidationContextMultiError, or nil if
+// none found.
+func (m *CommonTlsContext_CombinedCertificateValidationContext) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CommonTlsContext_CombinedCertificateValidationContext) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetDefaultValidationContext() == nil {
+ err := CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "DefaultValidationContext",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetDefaultValidationContext()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "DefaultValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "DefaultValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDefaultValidationContext()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "DefaultValidationContext",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if m.GetValidationContextSdsSecretConfig() == nil {
+ err := CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextSdsSecretConfig",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetValidationContextSdsSecretConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextSdsSecretConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextSdsSecretConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValidationContextSdsSecretConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextSdsSecretConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetValidationContextCertificateProvider()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextCertificateProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextCertificateProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValidationContextCertificateProvider()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextCertificateProvider",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetValidationContextCertificateProviderInstance()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValidationContextCertificateProviderInstance()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CommonTlsContext_CombinedCertificateValidationContextValidationError{
+ field: "ValidationContextCertificateProviderInstance",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return CommonTlsContext_CombinedCertificateValidationContextMultiError(errors)
+ }
+
+ return nil
+}
+
+// CommonTlsContext_CombinedCertificateValidationContextMultiError is an error
+// wrapping multiple validation errors returned by
+// CommonTlsContext_CombinedCertificateValidationContext.ValidateAll() if the
+// designated constraints aren't met.
+type CommonTlsContext_CombinedCertificateValidationContextMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CommonTlsContext_CombinedCertificateValidationContextMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CommonTlsContext_CombinedCertificateValidationContextMultiError) AllErrors() []error {
+ return m
+}
+
+// CommonTlsContext_CombinedCertificateValidationContextValidationError is the
+// validation error returned by
+// CommonTlsContext_CombinedCertificateValidationContext.Validate if the
+// designated constraints aren't met.
+type CommonTlsContext_CombinedCertificateValidationContextValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Cause() error {
+ return e.cause
+}
+
+// Key function returns key value.
+func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Key() bool {
+ return e.key
+}
+
+// ErrorName returns error name.
+func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) ErrorName() string {
+ return "CommonTlsContext_CombinedCertificateValidationContextValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CommonTlsContext_CombinedCertificateValidationContextValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCommonTlsContext_CombinedCertificateValidationContext.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CommonTlsContext_CombinedCertificateValidationContextValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CommonTlsContext_CombinedCertificateValidationContextValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.go
new file mode 100644
index 000000000..7e9ee8967
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.go
@@ -0,0 +1,286 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto
+
+package tlsv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Configuration specific to the `SPIFFE `_ certificate validator.
+//
+// Example:
+//
+// .. validated-code-block:: yaml
+//
+// :type-name: envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext
+//
+// custom_validator_config:
+// name: envoy.tls.cert_validator.spiffe
+// typed_config:
+// "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig
+// trust_domains:
+// - name: foo.com
+// trust_bundle:
+// filename: "foo.pem"
+// - name: envoy.com
+// trust_bundle:
+// filename: "envoy.pem"
+//
+// In this example, a presented peer certificate whose SAN matches “spiffe://foo.com/**“ is validated against
+// the "foo.pem" x.509 certificate. All the trust bundles are isolated from each other, so no trust domain can mint
+// a SVID belonging to another trust domain. That means, in this example, a SVID signed by “envoy.com“'s CA with “spiffe://foo.com/**“
+// SAN would be rejected since Envoy selects the trust bundle according to the presented SAN before validate the certificate.
+//
+// Note that SPIFFE validator inherits and uses the following options from :ref:`CertificateValidationContext `.
+//
+// - :ref:`allow_expired_certificate ` to allow expired certificates.
+// - :ref:`match_typed_subject_alt_names ` to match **URI** SAN of certificates. Unlike the default validator, SPIFFE validator only matches **URI** SAN (which equals to SVID in SPIFFE terminology) and ignore other SAN types.
+type SPIFFECertValidatorConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // This field specifies trust domains used for validating incoming X.509-SVID(s).
+ TrustDomains []*SPIFFECertValidatorConfig_TrustDomain `protobuf:"bytes,1,rep,name=trust_domains,json=trustDomains,proto3" json:"trust_domains,omitempty"`
+}
+
+func (x *SPIFFECertValidatorConfig) Reset() {
+ *x = SPIFFECertValidatorConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SPIFFECertValidatorConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SPIFFECertValidatorConfig) ProtoMessage() {}
+
+func (x *SPIFFECertValidatorConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SPIFFECertValidatorConfig.ProtoReflect.Descriptor instead.
+func (*SPIFFECertValidatorConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SPIFFECertValidatorConfig) GetTrustDomains() []*SPIFFECertValidatorConfig_TrustDomain {
+ if x != nil {
+ return x.TrustDomains
+ }
+ return nil
+}
+
+type SPIFFECertValidatorConfig_TrustDomain struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of the trust domain, “example.com“, “foo.bar.gov“ for example.
+ // Note that this must *not* have "spiffe://" prefix.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Specify a data source holding x.509 trust bundle used for validating incoming SVID(s) in this trust domain.
+ TrustBundle *v3.DataSource `protobuf:"bytes,2,opt,name=trust_bundle,json=trustBundle,proto3" json:"trust_bundle,omitempty"`
+}
+
+func (x *SPIFFECertValidatorConfig_TrustDomain) Reset() {
+ *x = SPIFFECertValidatorConfig_TrustDomain{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SPIFFECertValidatorConfig_TrustDomain) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SPIFFECertValidatorConfig_TrustDomain) ProtoMessage() {}
+
+func (x *SPIFFECertValidatorConfig_TrustDomain) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SPIFFECertValidatorConfig_TrustDomain.ProtoReflect.Descriptor instead.
+func (*SPIFFECertValidatorConfig_TrustDomain) Descriptor() ([]byte, []int) {
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *SPIFFECertValidatorConfig_TrustDomain) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *SPIFFECertValidatorConfig_TrustDomain) GetTrustBundle() *v3.DataSource {
+ if x != nil {
+ return x.TrustBundle
+ }
+ return nil
+}
+
+var File_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto protoreflect.FileDescriptor
+
+var file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDesc = []byte{
+ 0x0a, 0x4b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63,
+ 0x6b, 0x65, 0x74, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6c, 0x73, 0x5f,
+ 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x29, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
+ 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x8d, 0x02, 0x0a, 0x19, 0x53, 0x50, 0x49, 0x46, 0x46, 0x45, 0x43, 0x65, 0x72, 0x74,
+ 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
+ 0x7f, 0x0a, 0x0d, 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65,
+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70,
+ 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x2e,
+ 0x76, 0x33, 0x2e, 0x53, 0x50, 0x49, 0x46, 0x46, 0x45, 0x43, 0x65, 0x72, 0x74, 0x56, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x54, 0x72, 0x75,
+ 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02,
+ 0x08, 0x01, 0x52, 0x0c, 0x74, 0x72, 0x75, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73,
+ 0x1a, 0x6f, 0x0a, 0x0b, 0x54, 0x72, 0x75, 0x73, 0x74, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12,
+ 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
+ 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x43, 0x0a, 0x0c,
+ 0x74, 0x72, 0x75, 0x73, 0x74, 0x5f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x52, 0x0b, 0x74, 0x72, 0x75, 0x73, 0x74, 0x42, 0x75, 0x6e, 0x64, 0x6c,
+ 0x65, 0x42, 0xba, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x37, 0x69, 0x6f,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x74, 0x72, 0x61,
+ 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x2e, 0x74,
+ 0x6c, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x1d, 0x54, 0x6c, 0x73, 0x53, 0x70, 0x69, 0x66, 0x66, 0x65,
+ 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x56, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f,
+ 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74,
+ 0x73, 0x2f, 0x74, 0x6c, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x6c, 0x73, 0x76, 0x33, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescOnce sync.Once
+ file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescData = file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDesc
+)
+
+func file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescGZIP() []byte {
+ file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescOnce.Do(func() {
+ file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescData)
+ })
+ return file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDescData
+}
+
+var file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_goTypes = []interface{}{
+ (*SPIFFECertValidatorConfig)(nil), // 0: envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig
+ (*SPIFFECertValidatorConfig_TrustDomain)(nil), // 1: envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig.TrustDomain
+ (*v3.DataSource)(nil), // 2: envoy.config.core.v3.DataSource
+}
+var file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_depIdxs = []int32{
+ 1, // 0: envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig.trust_domains:type_name -> envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig.TrustDomain
+ 2, // 1: envoy.extensions.transport_sockets.tls.v3.SPIFFECertValidatorConfig.TrustDomain.trust_bundle:type_name -> envoy.config.core.v3.DataSource
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_init() }
+func file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_init() {
+ if File_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SPIFFECertValidatorConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SPIFFECertValidatorConfig_TrustDomain); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_goTypes,
+ DependencyIndexes: file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_depIdxs,
+ MessageInfos: file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_msgTypes,
+ }.Build()
+ File_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto = out.File
+ file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_rawDesc = nil
+ file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_goTypes = nil
+ file_envoy_extensions_transport_sockets_tls_v3_tls_spiffe_validator_config_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.validate.go
new file mode 100644
index 000000000..4992dec75
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.pb.validate.go
@@ -0,0 +1,329 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto
+
+package tlsv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on SPIFFECertValidatorConfig with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *SPIFFECertValidatorConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SPIFFECertValidatorConfig with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// SPIFFECertValidatorConfigMultiError, or nil if none found.
+func (m *SPIFFECertValidatorConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SPIFFECertValidatorConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetTrustDomains()) < 1 {
+ err := SPIFFECertValidatorConfigValidationError{
+ field: "TrustDomains",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetTrustDomains() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SPIFFECertValidatorConfigValidationError{
+ field: fmt.Sprintf("TrustDomains[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SPIFFECertValidatorConfigValidationError{
+ field: fmt.Sprintf("TrustDomains[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SPIFFECertValidatorConfigValidationError{
+ field: fmt.Sprintf("TrustDomains[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return SPIFFECertValidatorConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// SPIFFECertValidatorConfigMultiError is an error wrapping multiple validation
+// errors returned by SPIFFECertValidatorConfig.ValidateAll() if the
+// designated constraints aren't met.
+type SPIFFECertValidatorConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SPIFFECertValidatorConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SPIFFECertValidatorConfigMultiError) AllErrors() []error { return m }
+
+// SPIFFECertValidatorConfigValidationError is the validation error returned by
+// SPIFFECertValidatorConfig.Validate if the designated constraints aren't met.
+type SPIFFECertValidatorConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SPIFFECertValidatorConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SPIFFECertValidatorConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SPIFFECertValidatorConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SPIFFECertValidatorConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SPIFFECertValidatorConfigValidationError) ErrorName() string {
+ return "SPIFFECertValidatorConfigValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SPIFFECertValidatorConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSPIFFECertValidatorConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SPIFFECertValidatorConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SPIFFECertValidatorConfigValidationError{}
+
+// Validate checks the field values on SPIFFECertValidatorConfig_TrustDomain
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *SPIFFECertValidatorConfig_TrustDomain) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SPIFFECertValidatorConfig_TrustDomain
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// SPIFFECertValidatorConfig_TrustDomainMultiError, or nil if none found.
+func (m *SPIFFECertValidatorConfig_TrustDomain) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SPIFFECertValidatorConfig_TrustDomain) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := SPIFFECertValidatorConfig_TrustDomainValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetTrustBundle()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, SPIFFECertValidatorConfig_TrustDomainValidationError{
+ field: "TrustBundle",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, SPIFFECertValidatorConfig_TrustDomainValidationError{
+ field: "TrustBundle",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTrustBundle()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return SPIFFECertValidatorConfig_TrustDomainValidationError{
+ field: "TrustBundle",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return SPIFFECertValidatorConfig_TrustDomainMultiError(errors)
+ }
+
+ return nil
+}
+
+// SPIFFECertValidatorConfig_TrustDomainMultiError is an error wrapping
+// multiple validation errors returned by
+// SPIFFECertValidatorConfig_TrustDomain.ValidateAll() if the designated
+// constraints aren't met.
+type SPIFFECertValidatorConfig_TrustDomainMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SPIFFECertValidatorConfig_TrustDomainMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SPIFFECertValidatorConfig_TrustDomainMultiError) AllErrors() []error { return m }
+
+// SPIFFECertValidatorConfig_TrustDomainValidationError is the validation error
+// returned by SPIFFECertValidatorConfig_TrustDomain.Validate if the
+// designated constraints aren't met.
+type SPIFFECertValidatorConfig_TrustDomainValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SPIFFECertValidatorConfig_TrustDomainValidationError) ErrorName() string {
+ return "SPIFFECertValidatorConfig_TrustDomainValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e SPIFFECertValidatorConfig_TrustDomainValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSPIFFECertValidatorConfig_TrustDomain.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SPIFFECertValidatorConfig_TrustDomainValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SPIFFECertValidatorConfig_TrustDomainValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config_vtproto.pb.go
new file mode 100644
index 000000000..6cad4f635
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config_vtproto.pb.go
@@ -0,0 +1,167 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.proto
+
+package tlsv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *SPIFFECertValidatorConfig_TrustDomain) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SPIFFECertValidatorConfig_TrustDomain) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *SPIFFECertValidatorConfig_TrustDomain) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.TrustBundle != nil {
+ if vtmsg, ok := interface{}(m.TrustBundle).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.TrustBundle)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *SPIFFECertValidatorConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SPIFFECertValidatorConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *SPIFFECertValidatorConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.TrustDomains) > 0 {
+ for iNdEx := len(m.TrustDomains) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.TrustDomains[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *SPIFFECertValidatorConfig_TrustDomain) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.TrustBundle != nil {
+ if size, ok := interface{}(m.TrustBundle).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.TrustBundle)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *SPIFFECertValidatorConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.TrustDomains) > 0 {
+ for _, e := range m.TrustDomains {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_vtproto.pb.go
new file mode 100644
index 000000000..287129049
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/tls/v3/tls_vtproto.pb.go
@@ -0,0 +1,1265 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/extensions/transport_sockets/tls/v3/tls.proto
+
+package tlsv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
+ wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *UpstreamTlsContext) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *UpstreamTlsContext) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *UpstreamTlsContext) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.EnforceRsaKeyUsage != nil {
+ size, err := (*wrapperspb.BoolValue)(m.EnforceRsaKeyUsage).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.MaxSessionKeys != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.MaxSessionKeys).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.AllowRenegotiation {
+ i--
+ if m.AllowRenegotiation {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.Sni) > 0 {
+ i -= len(m.Sni)
+ copy(dAtA[i:], m.Sni)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Sni)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.CommonTlsContext != nil {
+ size, err := m.CommonTlsContext.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DownstreamTlsContext) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DownstreamTlsContext) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DownstreamTlsContext) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.PreferClientCiphers {
+ i--
+ if m.PreferClientCiphers {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x58
+ }
+ if m.DisableStatefulSessionResumption {
+ i--
+ if m.DisableStatefulSessionResumption {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x50
+ }
+ if m.FullScanCertsOnSniMismatch != nil {
+ size, err := (*wrapperspb.BoolValue)(m.FullScanCertsOnSniMismatch).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x4a
+ }
+ if m.OcspStaplePolicy != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OcspStaplePolicy))
+ i--
+ dAtA[i] = 0x40
+ }
+ if msg, ok := m.SessionTicketKeysType.(*DownstreamTlsContext_DisableStatelessSessionResumption); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.SessionTimeout != nil {
+ size, err := (*durationpb.Duration)(m.SessionTimeout).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ }
+ if msg, ok := m.SessionTicketKeysType.(*DownstreamTlsContext_SessionTicketKeysSdsSecretConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.SessionTicketKeysType.(*DownstreamTlsContext_SessionTicketKeys); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.RequireSni != nil {
+ size, err := (*wrapperspb.BoolValue)(m.RequireSni).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.RequireClientCertificate != nil {
+ size, err := (*wrapperspb.BoolValue)(m.RequireClientCertificate).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.CommonTlsContext != nil {
+ size, err := m.CommonTlsContext.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DownstreamTlsContext_SessionTicketKeys) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DownstreamTlsContext_SessionTicketKeys) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.SessionTicketKeys != nil {
+ size, err := m.SessionTicketKeys.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.SessionTicketKeysSdsSecretConfig != nil {
+ size, err := m.SessionTicketKeysSdsSecretConfig.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x2a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *DownstreamTlsContext_DisableStatelessSessionResumption) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DownstreamTlsContext_DisableStatelessSessionResumption) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.DisableStatelessSessionResumption {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x38
+ return len(dAtA) - i, nil
+}
+func (m *TlsKeyLog) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TlsKeyLog) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *TlsKeyLog) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.RemoteAddressRange) > 0 {
+ for iNdEx := len(m.RemoteAddressRange) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.RemoteAddressRange[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.RemoteAddressRange[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.LocalAddressRange) > 0 {
+ for iNdEx := len(m.LocalAddressRange) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.LocalAddressRange[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.LocalAddressRange[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Path) > 0 {
+ i -= len(m.Path)
+ copy(dAtA[i:], m.Path)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Path)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CommonTlsContext_CertificateProvider) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CommonTlsContext_CertificateProvider) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext_CertificateProvider) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Config.(*CommonTlsContext_CertificateProvider_TypedConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CommonTlsContext_CertificateProvider_TypedConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext_CertificateProvider_TypedConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.TypedConfig != nil {
+ if vtmsg, ok := interface{}(m.TypedConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.TypedConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CommonTlsContext_CertificateProviderInstance) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CommonTlsContext_CertificateProviderInstance) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext_CertificateProviderInstance) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.CertificateName) > 0 {
+ i -= len(m.CertificateName)
+ copy(dAtA[i:], m.CertificateName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.CertificateName)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.InstanceName) > 0 {
+ i -= len(m.InstanceName)
+ copy(dAtA[i:], m.InstanceName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.InstanceName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CommonTlsContext_CombinedCertificateValidationContext) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CommonTlsContext_CombinedCertificateValidationContext) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext_CombinedCertificateValidationContext) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ValidationContextCertificateProviderInstance != nil {
+ size, err := m.ValidationContextCertificateProviderInstance.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.ValidationContextCertificateProvider != nil {
+ size, err := m.ValidationContextCertificateProvider.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.ValidationContextSdsSecretConfig != nil {
+ size, err := m.ValidationContextSdsSecretConfig.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.DefaultValidationContext != nil {
+ size, err := m.DefaultValidationContext.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CommonTlsContext) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CommonTlsContext) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.CustomTlsCertificateSelector != nil {
+ if vtmsg, ok := interface{}(m.CustomTlsCertificateSelector).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.CustomTlsCertificateSelector)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1
+ i--
+ dAtA[i] = 0x82
+ }
+ if m.KeyLog != nil {
+ size, err := m.KeyLog.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x7a
+ }
+ if m.TlsCertificateProviderInstance != nil {
+ size, err := m.TlsCertificateProviderInstance.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x72
+ }
+ if m.CustomHandshaker != nil {
+ if vtmsg, ok := interface{}(m.CustomHandshaker).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.CustomHandshaker)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x6a
+ }
+ if msg, ok := m.ValidationContextType.(*CommonTlsContext_ValidationContextCertificateProviderInstance); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.TlsCertificateCertificateProviderInstance != nil {
+ size, err := m.TlsCertificateCertificateProviderInstance.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x5a
+ }
+ if msg, ok := m.ValidationContextType.(*CommonTlsContext_ValidationContextCertificateProvider); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.TlsCertificateCertificateProvider != nil {
+ size, err := m.TlsCertificateCertificateProvider.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x4a
+ }
+ if msg, ok := m.ValidationContextType.(*CommonTlsContext_CombinedValidationContext); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.ValidationContextType.(*CommonTlsContext_ValidationContextSdsSecretConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.TlsCertificateSdsSecretConfigs) > 0 {
+ for iNdEx := len(m.TlsCertificateSdsSecretConfigs) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.TlsCertificateSdsSecretConfigs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ }
+ }
+ if len(m.AlpnProtocols) > 0 {
+ for iNdEx := len(m.AlpnProtocols) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.AlpnProtocols[iNdEx])
+ copy(dAtA[i:], m.AlpnProtocols[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AlpnProtocols[iNdEx])))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if msg, ok := m.ValidationContextType.(*CommonTlsContext_ValidationContext); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.TlsCertificates) > 0 {
+ for iNdEx := len(m.TlsCertificates) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.TlsCertificates[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.TlsParams != nil {
+ size, err := m.TlsParams.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CommonTlsContext_ValidationContext) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext_ValidationContext) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ValidationContext != nil {
+ size, err := m.ValidationContext.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CommonTlsContext_ValidationContextSdsSecretConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext_ValidationContextSdsSecretConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ValidationContextSdsSecretConfig != nil {
+ size, err := m.ValidationContextSdsSecretConfig.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x3a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CommonTlsContext_CombinedValidationContext) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext_CombinedValidationContext) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.CombinedValidationContext != nil {
+ size, err := m.CombinedValidationContext.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x42
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x42
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CommonTlsContext_ValidationContextCertificateProvider) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext_ValidationContextCertificateProvider) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ValidationContextCertificateProvider != nil {
+ size, err := m.ValidationContextCertificateProvider.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x52
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x52
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CommonTlsContext_ValidationContextCertificateProviderInstance) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CommonTlsContext_ValidationContextCertificateProviderInstance) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ValidationContextCertificateProviderInstance != nil {
+ size, err := m.ValidationContextCertificateProviderInstance.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x62
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x62
+ }
+ return len(dAtA) - i, nil
+}
+func (m *UpstreamTlsContext) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CommonTlsContext != nil {
+ l = m.CommonTlsContext.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Sni)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.AllowRenegotiation {
+ n += 2
+ }
+ if m.MaxSessionKeys != nil {
+ l = (*wrapperspb.UInt32Value)(m.MaxSessionKeys).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.EnforceRsaKeyUsage != nil {
+ l = (*wrapperspb.BoolValue)(m.EnforceRsaKeyUsage).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DownstreamTlsContext) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CommonTlsContext != nil {
+ l = m.CommonTlsContext.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.RequireClientCertificate != nil {
+ l = (*wrapperspb.BoolValue)(m.RequireClientCertificate).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.RequireSni != nil {
+ l = (*wrapperspb.BoolValue)(m.RequireSni).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.SessionTicketKeysType.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if m.SessionTimeout != nil {
+ l = (*durationpb.Duration)(m.SessionTimeout).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.OcspStaplePolicy != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.OcspStaplePolicy))
+ }
+ if m.FullScanCertsOnSniMismatch != nil {
+ l = (*wrapperspb.BoolValue)(m.FullScanCertsOnSniMismatch).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.DisableStatefulSessionResumption {
+ n += 2
+ }
+ if m.PreferClientCiphers {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DownstreamTlsContext_SessionTicketKeys) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.SessionTicketKeys != nil {
+ l = m.SessionTicketKeys.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *DownstreamTlsContext_SessionTicketKeysSdsSecretConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.SessionTicketKeysSdsSecretConfig != nil {
+ l = m.SessionTicketKeysSdsSecretConfig.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *DownstreamTlsContext_DisableStatelessSessionResumption) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *TlsKeyLog) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Path)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.LocalAddressRange) > 0 {
+ for _, e := range m.LocalAddressRange {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.RemoteAddressRange) > 0 {
+ for _, e := range m.RemoteAddressRange {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CommonTlsContext_CertificateProvider) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.Config.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CommonTlsContext_CertificateProvider_TypedConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.TypedConfig != nil {
+ if size, ok := interface{}(m.TypedConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.TypedConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *CommonTlsContext_CertificateProviderInstance) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.InstanceName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.CertificateName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CommonTlsContext_CombinedCertificateValidationContext) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DefaultValidationContext != nil {
+ l = m.DefaultValidationContext.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ValidationContextSdsSecretConfig != nil {
+ l = m.ValidationContextSdsSecretConfig.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ValidationContextCertificateProvider != nil {
+ l = m.ValidationContextCertificateProvider.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ValidationContextCertificateProviderInstance != nil {
+ l = m.ValidationContextCertificateProviderInstance.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CommonTlsContext) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.TlsParams != nil {
+ l = m.TlsParams.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.TlsCertificates) > 0 {
+ for _, e := range m.TlsCertificates {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if vtmsg, ok := m.ValidationContextType.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if len(m.AlpnProtocols) > 0 {
+ for _, s := range m.AlpnProtocols {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.TlsCertificateSdsSecretConfigs) > 0 {
+ for _, e := range m.TlsCertificateSdsSecretConfigs {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.TlsCertificateCertificateProvider != nil {
+ l = m.TlsCertificateCertificateProvider.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.TlsCertificateCertificateProviderInstance != nil {
+ l = m.TlsCertificateCertificateProviderInstance.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.CustomHandshaker != nil {
+ if size, ok := interface{}(m.CustomHandshaker).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.CustomHandshaker)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.TlsCertificateProviderInstance != nil {
+ l = m.TlsCertificateProviderInstance.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.KeyLog != nil {
+ l = m.KeyLog.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.CustomTlsCertificateSelector != nil {
+ if size, ok := interface{}(m.CustomTlsCertificateSelector).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.CustomTlsCertificateSelector)
+ }
+ n += 2 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CommonTlsContext_ValidationContext) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ValidationContext != nil {
+ l = m.ValidationContext.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *CommonTlsContext_ValidationContextSdsSecretConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ValidationContextSdsSecretConfig != nil {
+ l = m.ValidationContextSdsSecretConfig.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *CommonTlsContext_CombinedValidationContext) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.CombinedValidationContext != nil {
+ l = m.CombinedValidationContext.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *CommonTlsContext_ValidationContextCertificateProvider) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ValidationContextCertificateProvider != nil {
+ l = m.ValidationContextCertificateProvider.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *CommonTlsContext_ValidationContextCertificateProviderInstance) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ValidationContextCertificateProviderInstance != nil {
+ l = m.ValidationContextCertificateProviderInstance.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.go
new file mode 100644
index 000000000..6f09930e9
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.go
@@ -0,0 +1,182 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/service/discovery/v3/ads.proto
+
+package discoveryv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
+// services: https://github.com/google/protobuf/issues/4221
+type AdsDummy struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *AdsDummy) Reset() {
+ *x = AdsDummy{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_ads_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AdsDummy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AdsDummy) ProtoMessage() {}
+
+func (x *AdsDummy) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_ads_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AdsDummy.ProtoReflect.Descriptor instead.
+func (*AdsDummy) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_ads_proto_rawDescGZIP(), []int{0}
+}
+
+var File_envoy_service_discovery_v3_ads_proto protoreflect.FileDescriptor
+
+var file_envoy_service_discovery_v3_ads_proto_rawDesc = []byte{
+ 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
+ 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x64, 0x73,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e,
+ 0x76, 0x33, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64,
+ 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75,
+ 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x36, 0x0a, 0x08, 0x41, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x3a, 0x2a, 0x9a, 0xc5,
+ 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e,
+ 0x41, 0x64, 0x73, 0x44, 0x75, 0x6d, 0x6d, 0x79, 0x32, 0xa6, 0x02, 0x0a, 0x1a, 0x41, 0x67, 0x67,
+ 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7e, 0x0a, 0x19, 0x53, 0x74, 0x72, 0x65, 0x61,
+ 0x6d, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76,
+ 0x33, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e,
+ 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x87, 0x01, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x74,
+ 0x61, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76,
+ 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
+ 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76,
+ 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30,
+ 0x01, 0x42, 0x8d, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x28, 0x69, 0x6f,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76,
+ 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x41, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e,
+ 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65,
+ 0x72, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76,
+ 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_service_discovery_v3_ads_proto_rawDescOnce sync.Once
+ file_envoy_service_discovery_v3_ads_proto_rawDescData = file_envoy_service_discovery_v3_ads_proto_rawDesc
+)
+
+func file_envoy_service_discovery_v3_ads_proto_rawDescGZIP() []byte {
+ file_envoy_service_discovery_v3_ads_proto_rawDescOnce.Do(func() {
+ file_envoy_service_discovery_v3_ads_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v3_ads_proto_rawDescData)
+ })
+ return file_envoy_service_discovery_v3_ads_proto_rawDescData
+}
+
+var file_envoy_service_discovery_v3_ads_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_service_discovery_v3_ads_proto_goTypes = []interface{}{
+ (*AdsDummy)(nil), // 0: envoy.service.discovery.v3.AdsDummy
+ (*DiscoveryRequest)(nil), // 1: envoy.service.discovery.v3.DiscoveryRequest
+ (*DeltaDiscoveryRequest)(nil), // 2: envoy.service.discovery.v3.DeltaDiscoveryRequest
+ (*DiscoveryResponse)(nil), // 3: envoy.service.discovery.v3.DiscoveryResponse
+ (*DeltaDiscoveryResponse)(nil), // 4: envoy.service.discovery.v3.DeltaDiscoveryResponse
+}
+var file_envoy_service_discovery_v3_ads_proto_depIdxs = []int32{
+ 1, // 0: envoy.service.discovery.v3.AggregatedDiscoveryService.StreamAggregatedResources:input_type -> envoy.service.discovery.v3.DiscoveryRequest
+ 2, // 1: envoy.service.discovery.v3.AggregatedDiscoveryService.DeltaAggregatedResources:input_type -> envoy.service.discovery.v3.DeltaDiscoveryRequest
+ 3, // 2: envoy.service.discovery.v3.AggregatedDiscoveryService.StreamAggregatedResources:output_type -> envoy.service.discovery.v3.DiscoveryResponse
+ 4, // 3: envoy.service.discovery.v3.AggregatedDiscoveryService.DeltaAggregatedResources:output_type -> envoy.service.discovery.v3.DeltaDiscoveryResponse
+ 2, // [2:4] is the sub-list for method output_type
+ 0, // [0:2] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_service_discovery_v3_ads_proto_init() }
+func file_envoy_service_discovery_v3_ads_proto_init() {
+ if File_envoy_service_discovery_v3_ads_proto != nil {
+ return
+ }
+ file_envoy_service_discovery_v3_discovery_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_service_discovery_v3_ads_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AdsDummy); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_service_discovery_v3_ads_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_envoy_service_discovery_v3_ads_proto_goTypes,
+ DependencyIndexes: file_envoy_service_discovery_v3_ads_proto_depIdxs,
+ MessageInfos: file_envoy_service_discovery_v3_ads_proto_msgTypes,
+ }.Build()
+ File_envoy_service_discovery_v3_ads_proto = out.File
+ file_envoy_service_discovery_v3_ads_proto_rawDesc = nil
+ file_envoy_service_discovery_v3_ads_proto_goTypes = nil
+ file_envoy_service_discovery_v3_ads_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.validate.go
new file mode 100644
index 000000000..9080fedd8
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads.pb.validate.go
@@ -0,0 +1,136 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/service/discovery/v3/ads.proto
+
+package discoveryv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on AdsDummy with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *AdsDummy) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on AdsDummy with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in AdsDummyMultiError, or nil
+// if none found.
+func (m *AdsDummy) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *AdsDummy) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return AdsDummyMultiError(errors)
+ }
+
+ return nil
+}
+
+// AdsDummyMultiError is an error wrapping multiple validation errors returned
+// by AdsDummy.ValidateAll() if the designated constraints aren't met.
+type AdsDummyMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m AdsDummyMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m AdsDummyMultiError) AllErrors() []error { return m }
+
+// AdsDummyValidationError is the validation error returned by
+// AdsDummy.Validate if the designated constraints aren't met.
+type AdsDummyValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e AdsDummyValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e AdsDummyValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e AdsDummyValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e AdsDummyValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e AdsDummyValidationError) ErrorName() string { return "AdsDummyValidationError" }
+
+// Error satisfies the builtin error interface
+func (e AdsDummyValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sAdsDummy.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = AdsDummyValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = AdsDummyValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_grpc.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_grpc.pb.go
new file mode 100644
index 000000000..7a7f1af97
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_grpc.pb.go
@@ -0,0 +1,210 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc v5.26.1
+// source: envoy/service/discovery/v3/ads.proto
+
+package discoveryv3
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ AggregatedDiscoveryService_StreamAggregatedResources_FullMethodName = "/envoy.service.discovery.v3.AggregatedDiscoveryService/StreamAggregatedResources"
+ AggregatedDiscoveryService_DeltaAggregatedResources_FullMethodName = "/envoy.service.discovery.v3.AggregatedDiscoveryService/DeltaAggregatedResources"
+)
+
+// AggregatedDiscoveryServiceClient is the client API for AggregatedDiscoveryService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type AggregatedDiscoveryServiceClient interface {
+ // This is a gRPC-only API.
+ StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error)
+ DeltaAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_DeltaAggregatedResourcesClient, error)
+}
+
+type aggregatedDiscoveryServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewAggregatedDiscoveryServiceClient(cc grpc.ClientConnInterface) AggregatedDiscoveryServiceClient {
+ return &aggregatedDiscoveryServiceClient{cc}
+}
+
+func (c *aggregatedDiscoveryServiceClient) StreamAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_StreamAggregatedResourcesClient, error) {
+ stream, err := c.cc.NewStream(ctx, &AggregatedDiscoveryService_ServiceDesc.Streams[0], AggregatedDiscoveryService_StreamAggregatedResources_FullMethodName, opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &aggregatedDiscoveryServiceStreamAggregatedResourcesClient{stream}
+ return x, nil
+}
+
+type AggregatedDiscoveryService_StreamAggregatedResourcesClient interface {
+ Send(*DiscoveryRequest) error
+ Recv() (*DiscoveryResponse, error)
+ grpc.ClientStream
+}
+
+type aggregatedDiscoveryServiceStreamAggregatedResourcesClient struct {
+ grpc.ClientStream
+}
+
+func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesClient) Send(m *DiscoveryRequest) error {
+ return x.ClientStream.SendMsg(m)
+}
+
+func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesClient) Recv() (*DiscoveryResponse, error) {
+ m := new(DiscoveryResponse)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func (c *aggregatedDiscoveryServiceClient) DeltaAggregatedResources(ctx context.Context, opts ...grpc.CallOption) (AggregatedDiscoveryService_DeltaAggregatedResourcesClient, error) {
+ stream, err := c.cc.NewStream(ctx, &AggregatedDiscoveryService_ServiceDesc.Streams[1], AggregatedDiscoveryService_DeltaAggregatedResources_FullMethodName, opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &aggregatedDiscoveryServiceDeltaAggregatedResourcesClient{stream}
+ return x, nil
+}
+
+type AggregatedDiscoveryService_DeltaAggregatedResourcesClient interface {
+ Send(*DeltaDiscoveryRequest) error
+ Recv() (*DeltaDiscoveryResponse, error)
+ grpc.ClientStream
+}
+
+type aggregatedDiscoveryServiceDeltaAggregatedResourcesClient struct {
+ grpc.ClientStream
+}
+
+func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesClient) Send(m *DeltaDiscoveryRequest) error {
+ return x.ClientStream.SendMsg(m)
+}
+
+func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesClient) Recv() (*DeltaDiscoveryResponse, error) {
+ m := new(DeltaDiscoveryResponse)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+// AggregatedDiscoveryServiceServer is the server API for AggregatedDiscoveryService service.
+// All implementations should embed UnimplementedAggregatedDiscoveryServiceServer
+// for forward compatibility
+type AggregatedDiscoveryServiceServer interface {
+ // This is a gRPC-only API.
+ StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error
+ DeltaAggregatedResources(AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error
+}
+
+// UnimplementedAggregatedDiscoveryServiceServer should be embedded to have forward compatible implementations.
+type UnimplementedAggregatedDiscoveryServiceServer struct {
+}
+
+func (UnimplementedAggregatedDiscoveryServiceServer) StreamAggregatedResources(AggregatedDiscoveryService_StreamAggregatedResourcesServer) error {
+ return status.Errorf(codes.Unimplemented, "method StreamAggregatedResources not implemented")
+}
+func (UnimplementedAggregatedDiscoveryServiceServer) DeltaAggregatedResources(AggregatedDiscoveryService_DeltaAggregatedResourcesServer) error {
+ return status.Errorf(codes.Unimplemented, "method DeltaAggregatedResources not implemented")
+}
+
+// UnsafeAggregatedDiscoveryServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to AggregatedDiscoveryServiceServer will
+// result in compilation errors.
+type UnsafeAggregatedDiscoveryServiceServer interface {
+ mustEmbedUnimplementedAggregatedDiscoveryServiceServer()
+}
+
+func RegisterAggregatedDiscoveryServiceServer(s grpc.ServiceRegistrar, srv AggregatedDiscoveryServiceServer) {
+ s.RegisterService(&AggregatedDiscoveryService_ServiceDesc, srv)
+}
+
+func _AggregatedDiscoveryService_StreamAggregatedResources_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(AggregatedDiscoveryServiceServer).StreamAggregatedResources(&aggregatedDiscoveryServiceStreamAggregatedResourcesServer{stream})
+}
+
+type AggregatedDiscoveryService_StreamAggregatedResourcesServer interface {
+ Send(*DiscoveryResponse) error
+ Recv() (*DiscoveryRequest, error)
+ grpc.ServerStream
+}
+
+type aggregatedDiscoveryServiceStreamAggregatedResourcesServer struct {
+ grpc.ServerStream
+}
+
+func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesServer) Send(m *DiscoveryResponse) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+func (x *aggregatedDiscoveryServiceStreamAggregatedResourcesServer) Recv() (*DiscoveryRequest, error) {
+ m := new(DiscoveryRequest)
+ if err := x.ServerStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func _AggregatedDiscoveryService_DeltaAggregatedResources_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(AggregatedDiscoveryServiceServer).DeltaAggregatedResources(&aggregatedDiscoveryServiceDeltaAggregatedResourcesServer{stream})
+}
+
+type AggregatedDiscoveryService_DeltaAggregatedResourcesServer interface {
+ Send(*DeltaDiscoveryResponse) error
+ Recv() (*DeltaDiscoveryRequest, error)
+ grpc.ServerStream
+}
+
+type aggregatedDiscoveryServiceDeltaAggregatedResourcesServer struct {
+ grpc.ServerStream
+}
+
+func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesServer) Send(m *DeltaDiscoveryResponse) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+func (x *aggregatedDiscoveryServiceDeltaAggregatedResourcesServer) Recv() (*DeltaDiscoveryRequest, error) {
+ m := new(DeltaDiscoveryRequest)
+ if err := x.ServerStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+// AggregatedDiscoveryService_ServiceDesc is the grpc.ServiceDesc for AggregatedDiscoveryService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var AggregatedDiscoveryService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "envoy.service.discovery.v3.AggregatedDiscoveryService",
+ HandlerType: (*AggregatedDiscoveryServiceServer)(nil),
+ Methods: []grpc.MethodDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "StreamAggregatedResources",
+ Handler: _AggregatedDiscoveryService_StreamAggregatedResources_Handler,
+ ServerStreams: true,
+ ClientStreams: true,
+ },
+ {
+ StreamName: "DeltaAggregatedResources",
+ Handler: _AggregatedDiscoveryService_DeltaAggregatedResources_Handler,
+ ServerStreams: true,
+ ClientStreams: true,
+ },
+ },
+ Metadata: "envoy/service/discovery/v3/ads.proto",
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_vtproto.pb.go
new file mode 100644
index 000000000..0e604235d
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/ads_vtproto.pb.go
@@ -0,0 +1,61 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/service/discovery/v3/ads.proto
+
+package discoveryv3
+
+import (
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *AdsDummy) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *AdsDummy) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *AdsDummy) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *AdsDummy) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.go
new file mode 100644
index 000000000..a9b5f6935
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.go
@@ -0,0 +1,1693 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/service/discovery/v3/discovery.proto
+
+package discoveryv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ status "google.golang.org/genproto/googleapis/rpc/status"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Specifies a resource to be subscribed to.
+type ResourceLocator struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The resource name to subscribe to.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // A set of dynamic parameters used to match against the dynamic parameter
+ // constraints on the resource. This allows clients to select between
+ // multiple variants of the same resource.
+ DynamicParameters map[string]string `protobuf:"bytes,2,rep,name=dynamic_parameters,json=dynamicParameters,proto3" json:"dynamic_parameters,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+}
+
+func (x *ResourceLocator) Reset() {
+ *x = ResourceLocator{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ResourceLocator) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceLocator) ProtoMessage() {}
+
+func (x *ResourceLocator) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceLocator.ProtoReflect.Descriptor instead.
+func (*ResourceLocator) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ResourceLocator) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ResourceLocator) GetDynamicParameters() map[string]string {
+ if x != nil {
+ return x.DynamicParameters
+ }
+ return nil
+}
+
+// Specifies a concrete resource name.
+type ResourceName struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the resource.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Dynamic parameter constraints associated with this resource. To be used by client-side caches
+ // (including xDS proxies) when matching subscribed resource locators.
+ DynamicParameterConstraints *DynamicParameterConstraints `protobuf:"bytes,2,opt,name=dynamic_parameter_constraints,json=dynamicParameterConstraints,proto3" json:"dynamic_parameter_constraints,omitempty"`
+}
+
+func (x *ResourceName) Reset() {
+ *x = ResourceName{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ResourceName) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ResourceName) ProtoMessage() {}
+
+func (x *ResourceName) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ResourceName.ProtoReflect.Descriptor instead.
+func (*ResourceName) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ResourceName) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ResourceName) GetDynamicParameterConstraints() *DynamicParameterConstraints {
+ if x != nil {
+ return x.DynamicParameterConstraints
+ }
+ return nil
+}
+
+// A DiscoveryRequest requests a set of versioned resources of the same type for
+// a given Envoy node on some API.
+// [#next-free-field: 8]
+type DiscoveryRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The version_info provided in the request messages will be the version_info
+ // received with the most recent successfully processed response or empty on
+ // the first request. It is expected that no new request is sent after a
+ // response is received until the Envoy instance is ready to ACK/NACK the new
+ // configuration. ACK/NACK takes place by returning the new API config version
+ // as applied or the previous API config version respectively. Each type_url
+ // (see below) has an independent version associated with it.
+ VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"`
+ // The node making the request.
+ Node *v3.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"`
+ // List of resources to subscribe to, e.g. list of cluster names or a route
+ // configuration name. If this is empty, all resources for the API are
+ // returned. LDS/CDS may have empty resource_names, which will cause all
+ // resources for the Envoy instance to be returned. The LDS and CDS responses
+ // will then imply a number of resources that need to be fetched via EDS/RDS,
+ // which will be explicitly enumerated in resource_names.
+ ResourceNames []string `protobuf:"bytes,3,rep,name=resource_names,json=resourceNames,proto3" json:"resource_names,omitempty"`
+ // [#not-implemented-hide:]
+ // Alternative to “resource_names“ field that allows specifying dynamic
+ // parameters along with each resource name. Clients that populate this
+ // field must be able to handle responses from the server where resources
+ // are wrapped in a Resource message.
+ // Note that it is legal for a request to have some resources listed
+ // in “resource_names“ and others in “resource_locators“.
+ ResourceLocators []*ResourceLocator `protobuf:"bytes,7,rep,name=resource_locators,json=resourceLocators,proto3" json:"resource_locators,omitempty"`
+ // Type of the resource that is being requested, e.g.
+ // "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment". This is implicit
+ // in requests made via singleton xDS APIs such as CDS, LDS, etc. but is
+ // required for ADS.
+ TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
+ // nonce corresponding to DiscoveryResponse being ACK/NACKed. See above
+ // discussion on version_info and the DiscoveryResponse nonce comment. This
+ // may be empty only if 1) this is a non-persistent-stream xDS such as HTTP,
+ // or 2) the client has not yet accepted an update in this xDS stream (unlike
+ // delta, where it is populated only for new explicit ACKs).
+ ResponseNonce string `protobuf:"bytes,5,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"`
+ // This is populated when the previous :ref:`DiscoveryResponse `
+ // failed to update configuration. The “message“ field in “error_details“ provides the Envoy
+ // internal exception related to the failure. It is only intended for consumption during manual
+ // debugging, the string provided is not guaranteed to be stable across Envoy versions.
+ ErrorDetail *status.Status `protobuf:"bytes,6,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"`
+}
+
+func (x *DiscoveryRequest) Reset() {
+ *x = DiscoveryRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DiscoveryRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiscoveryRequest) ProtoMessage() {}
+
+func (x *DiscoveryRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiscoveryRequest.ProtoReflect.Descriptor instead.
+func (*DiscoveryRequest) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DiscoveryRequest) GetVersionInfo() string {
+ if x != nil {
+ return x.VersionInfo
+ }
+ return ""
+}
+
+func (x *DiscoveryRequest) GetNode() *v3.Node {
+ if x != nil {
+ return x.Node
+ }
+ return nil
+}
+
+func (x *DiscoveryRequest) GetResourceNames() []string {
+ if x != nil {
+ return x.ResourceNames
+ }
+ return nil
+}
+
+func (x *DiscoveryRequest) GetResourceLocators() []*ResourceLocator {
+ if x != nil {
+ return x.ResourceLocators
+ }
+ return nil
+}
+
+func (x *DiscoveryRequest) GetTypeUrl() string {
+ if x != nil {
+ return x.TypeUrl
+ }
+ return ""
+}
+
+func (x *DiscoveryRequest) GetResponseNonce() string {
+ if x != nil {
+ return x.ResponseNonce
+ }
+ return ""
+}
+
+func (x *DiscoveryRequest) GetErrorDetail() *status.Status {
+ if x != nil {
+ return x.ErrorDetail
+ }
+ return nil
+}
+
+// [#next-free-field: 7]
+type DiscoveryResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The version of the response data.
+ VersionInfo string `protobuf:"bytes,1,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"`
+ // The response resources. These resources are typed and depend on the API being called.
+ Resources []*anypb.Any `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"`
+ // [#not-implemented-hide:]
+ // Canary is used to support two Envoy command line flags:
+ //
+ // - --terminate-on-canary-transition-failure. When set, Envoy is able to
+ // terminate if it detects that configuration is stuck at canary. Consider
+ // this example sequence of updates:
+ // - Management server applies a canary config successfully.
+ // - Management server rolls back to a production config.
+ // - Envoy rejects the new production config.
+ // Since there is no sensible way to continue receiving configuration
+ // updates, Envoy will then terminate and apply production config from a
+ // clean slate.
+ // - --dry-run-canary. When set, a canary response will never be applied, only
+ // validated via a dry run.
+ Canary bool `protobuf:"varint,3,opt,name=canary,proto3" json:"canary,omitempty"`
+ // Type URL for resources. Identifies the xDS API when muxing over ADS.
+ // Must be consistent with the type_url in the 'resources' repeated Any (if non-empty).
+ TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
+ // For gRPC based subscriptions, the nonce provides a way to explicitly ack a
+ // specific DiscoveryResponse in a following DiscoveryRequest. Additional
+ // messages may have been sent by Envoy to the management server for the
+ // previous version on the stream prior to this DiscoveryResponse, that were
+ // unprocessed at response send time. The nonce allows the management server
+ // to ignore any further DiscoveryRequests for the previous version until a
+ // DiscoveryRequest bearing the nonce. The nonce is optional and is not
+ // required for non-stream based xDS implementations.
+ Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"`
+ // The control plane instance that sent the response.
+ ControlPlane *v3.ControlPlane `protobuf:"bytes,6,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"`
+}
+
+func (x *DiscoveryResponse) Reset() {
+ *x = DiscoveryResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DiscoveryResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DiscoveryResponse) ProtoMessage() {}
+
+func (x *DiscoveryResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DiscoveryResponse.ProtoReflect.Descriptor instead.
+func (*DiscoveryResponse) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *DiscoveryResponse) GetVersionInfo() string {
+ if x != nil {
+ return x.VersionInfo
+ }
+ return ""
+}
+
+func (x *DiscoveryResponse) GetResources() []*anypb.Any {
+ if x != nil {
+ return x.Resources
+ }
+ return nil
+}
+
+func (x *DiscoveryResponse) GetCanary() bool {
+ if x != nil {
+ return x.Canary
+ }
+ return false
+}
+
+func (x *DiscoveryResponse) GetTypeUrl() string {
+ if x != nil {
+ return x.TypeUrl
+ }
+ return ""
+}
+
+func (x *DiscoveryResponse) GetNonce() string {
+ if x != nil {
+ return x.Nonce
+ }
+ return ""
+}
+
+func (x *DiscoveryResponse) GetControlPlane() *v3.ControlPlane {
+ if x != nil {
+ return x.ControlPlane
+ }
+ return nil
+}
+
+// DeltaDiscoveryRequest and DeltaDiscoveryResponse are used in a new gRPC
+// endpoint for Delta xDS.
+//
+// With Delta xDS, the DeltaDiscoveryResponses do not need to include a full
+// snapshot of the tracked resources. Instead, DeltaDiscoveryResponses are a
+// diff to the state of a xDS client.
+// In Delta XDS there are per-resource versions, which allow tracking state at
+// the resource granularity.
+// An xDS Delta session is always in the context of a gRPC bidirectional
+// stream. This allows the xDS server to keep track of the state of xDS clients
+// connected to it.
+//
+// In Delta xDS the nonce field is required and used to pair
+// DeltaDiscoveryResponse to a DeltaDiscoveryRequest ACK or NACK.
+// Optionally, a response message level system_version_info is present for
+// debugging purposes only.
+//
+// DeltaDiscoveryRequest plays two independent roles. Any DeltaDiscoveryRequest
+// can be either or both of: [1] informing the server of what resources the
+// client has gained/lost interest in (using resource_names_subscribe and
+// resource_names_unsubscribe), or [2] (N)ACKing an earlier resource update from
+// the server (using response_nonce, with presence of error_detail making it a NACK).
+// Additionally, the first message (for a given type_url) of a reconnected gRPC stream
+// has a third role: informing the server of the resources (and their versions)
+// that the client already possesses, using the initial_resource_versions field.
+//
+// As with state-of-the-world, when multiple resource types are multiplexed (ADS),
+// all requests/acknowledgments/updates are logically walled off by type_url:
+// a Cluster ACK exists in a completely separate world from a prior Route NACK.
+// In particular, initial_resource_versions being sent at the "start" of every
+// gRPC stream actually entails a message for each type_url, each with its own
+// initial_resource_versions.
+// [#next-free-field: 10]
+type DeltaDiscoveryRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The node making the request.
+ Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
+ // Type of the resource that is being requested, e.g.
+ // “type.googleapis.com/envoy.api.v2.ClusterLoadAssignment“. This does not need to be set if
+ // resources are only referenced via “xds_resource_subscribe“ and
+ // “xds_resources_unsubscribe“.
+ TypeUrl string `protobuf:"bytes,2,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
+ // DeltaDiscoveryRequests allow the client to add or remove individual
+ // resources to the set of tracked resources in the context of a stream.
+ // All resource names in the resource_names_subscribe list are added to the
+ // set of tracked resources and all resource names in the resource_names_unsubscribe
+ // list are removed from the set of tracked resources.
+ //
+ // *Unlike* state-of-the-world xDS, an empty resource_names_subscribe or
+ // resource_names_unsubscribe list simply means that no resources are to be
+ // added or removed to the resource list.
+ // *Like* state-of-the-world xDS, the server must send updates for all tracked
+ // resources, but can also send updates for resources the client has not subscribed to.
+ //
+ // NOTE: the server must respond with all resources listed in resource_names_subscribe,
+ // even if it believes the client has the most recent version of them. The reason:
+ // the client may have dropped them, but then regained interest before it had a chance
+ // to send the unsubscribe message. See DeltaSubscriptionStateTest.RemoveThenAdd.
+ //
+ // These two fields can be set in any DeltaDiscoveryRequest, including ACKs
+ // and initial_resource_versions.
+ //
+ // A list of Resource names to add to the list of tracked resources.
+ ResourceNamesSubscribe []string `protobuf:"bytes,3,rep,name=resource_names_subscribe,json=resourceNamesSubscribe,proto3" json:"resource_names_subscribe,omitempty"`
+ // A list of Resource names to remove from the list of tracked resources.
+ ResourceNamesUnsubscribe []string `protobuf:"bytes,4,rep,name=resource_names_unsubscribe,json=resourceNamesUnsubscribe,proto3" json:"resource_names_unsubscribe,omitempty"`
+ // [#not-implemented-hide:]
+ // Alternative to “resource_names_subscribe“ field that allows specifying dynamic parameters
+ // along with each resource name.
+ // Note that it is legal for a request to have some resources listed
+ // in “resource_names_subscribe“ and others in “resource_locators_subscribe“.
+ ResourceLocatorsSubscribe []*ResourceLocator `protobuf:"bytes,8,rep,name=resource_locators_subscribe,json=resourceLocatorsSubscribe,proto3" json:"resource_locators_subscribe,omitempty"`
+ // [#not-implemented-hide:]
+ // Alternative to “resource_names_unsubscribe“ field that allows specifying dynamic parameters
+ // along with each resource name.
+ // Note that it is legal for a request to have some resources listed
+ // in “resource_names_unsubscribe“ and others in “resource_locators_unsubscribe“.
+ ResourceLocatorsUnsubscribe []*ResourceLocator `protobuf:"bytes,9,rep,name=resource_locators_unsubscribe,json=resourceLocatorsUnsubscribe,proto3" json:"resource_locators_unsubscribe,omitempty"`
+ // Informs the server of the versions of the resources the xDS client knows of, to enable the
+ // client to continue the same logical xDS session even in the face of gRPC stream reconnection.
+ // It will not be populated: [1] in the very first stream of a session, since the client will
+ // not yet have any resources, [2] in any message after the first in a stream (for a given
+ // type_url), since the server will already be correctly tracking the client's state.
+ // (In ADS, the first message *of each type_url* of a reconnected stream populates this map.)
+ // The map's keys are names of xDS resources known to the xDS client.
+ // The map's values are opaque resource versions.
+ InitialResourceVersions map[string]string `protobuf:"bytes,5,rep,name=initial_resource_versions,json=initialResourceVersions,proto3" json:"initial_resource_versions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // When the DeltaDiscoveryRequest is a ACK or NACK message in response
+ // to a previous DeltaDiscoveryResponse, the response_nonce must be the
+ // nonce in the DeltaDiscoveryResponse.
+ // Otherwise (unlike in DiscoveryRequest) response_nonce must be omitted.
+ ResponseNonce string `protobuf:"bytes,6,opt,name=response_nonce,json=responseNonce,proto3" json:"response_nonce,omitempty"`
+ // This is populated when the previous :ref:`DiscoveryResponse `
+ // failed to update configuration. The “message“ field in “error_details“
+ // provides the Envoy internal exception related to the failure.
+ ErrorDetail *status.Status `protobuf:"bytes,7,opt,name=error_detail,json=errorDetail,proto3" json:"error_detail,omitempty"`
+}
+
+func (x *DeltaDiscoveryRequest) Reset() {
+ *x = DeltaDiscoveryRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeltaDiscoveryRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeltaDiscoveryRequest) ProtoMessage() {}
+
+func (x *DeltaDiscoveryRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeltaDiscoveryRequest.ProtoReflect.Descriptor instead.
+func (*DeltaDiscoveryRequest) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *DeltaDiscoveryRequest) GetNode() *v3.Node {
+ if x != nil {
+ return x.Node
+ }
+ return nil
+}
+
+func (x *DeltaDiscoveryRequest) GetTypeUrl() string {
+ if x != nil {
+ return x.TypeUrl
+ }
+ return ""
+}
+
+func (x *DeltaDiscoveryRequest) GetResourceNamesSubscribe() []string {
+ if x != nil {
+ return x.ResourceNamesSubscribe
+ }
+ return nil
+}
+
+func (x *DeltaDiscoveryRequest) GetResourceNamesUnsubscribe() []string {
+ if x != nil {
+ return x.ResourceNamesUnsubscribe
+ }
+ return nil
+}
+
+func (x *DeltaDiscoveryRequest) GetResourceLocatorsSubscribe() []*ResourceLocator {
+ if x != nil {
+ return x.ResourceLocatorsSubscribe
+ }
+ return nil
+}
+
+func (x *DeltaDiscoveryRequest) GetResourceLocatorsUnsubscribe() []*ResourceLocator {
+ if x != nil {
+ return x.ResourceLocatorsUnsubscribe
+ }
+ return nil
+}
+
+func (x *DeltaDiscoveryRequest) GetInitialResourceVersions() map[string]string {
+ if x != nil {
+ return x.InitialResourceVersions
+ }
+ return nil
+}
+
+func (x *DeltaDiscoveryRequest) GetResponseNonce() string {
+ if x != nil {
+ return x.ResponseNonce
+ }
+ return ""
+}
+
+func (x *DeltaDiscoveryRequest) GetErrorDetail() *status.Status {
+ if x != nil {
+ return x.ErrorDetail
+ }
+ return nil
+}
+
+// [#next-free-field: 9]
+type DeltaDiscoveryResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The version of the response data (used for debugging).
+ SystemVersionInfo string `protobuf:"bytes,1,opt,name=system_version_info,json=systemVersionInfo,proto3" json:"system_version_info,omitempty"`
+ // The response resources. These are typed resources, whose types must match
+ // the type_url field.
+ Resources []*Resource `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources,omitempty"`
+ // Type URL for resources. Identifies the xDS API when muxing over ADS.
+ // Must be consistent with the type_url in the Any within 'resources' if 'resources' is non-empty.
+ TypeUrl string `protobuf:"bytes,4,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
+ // Resources names of resources that have be deleted and to be removed from the xDS Client.
+ // Removed resources for missing resources can be ignored.
+ RemovedResources []string `protobuf:"bytes,6,rep,name=removed_resources,json=removedResources,proto3" json:"removed_resources,omitempty"`
+ // Alternative to removed_resources that allows specifying which variant of
+ // a resource is being removed. This variant must be used for any resource
+ // for which dynamic parameter constraints were sent to the client.
+ RemovedResourceNames []*ResourceName `protobuf:"bytes,8,rep,name=removed_resource_names,json=removedResourceNames,proto3" json:"removed_resource_names,omitempty"`
+ // The nonce provides a way for DeltaDiscoveryRequests to uniquely
+ // reference a DeltaDiscoveryResponse when (N)ACKing. The nonce is required.
+ Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"`
+ // [#not-implemented-hide:]
+ // The control plane instance that sent the response.
+ ControlPlane *v3.ControlPlane `protobuf:"bytes,7,opt,name=control_plane,json=controlPlane,proto3" json:"control_plane,omitempty"`
+}
+
+func (x *DeltaDiscoveryResponse) Reset() {
+ *x = DeltaDiscoveryResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeltaDiscoveryResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeltaDiscoveryResponse) ProtoMessage() {}
+
+func (x *DeltaDiscoveryResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeltaDiscoveryResponse.ProtoReflect.Descriptor instead.
+func (*DeltaDiscoveryResponse) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *DeltaDiscoveryResponse) GetSystemVersionInfo() string {
+ if x != nil {
+ return x.SystemVersionInfo
+ }
+ return ""
+}
+
+func (x *DeltaDiscoveryResponse) GetResources() []*Resource {
+ if x != nil {
+ return x.Resources
+ }
+ return nil
+}
+
+func (x *DeltaDiscoveryResponse) GetTypeUrl() string {
+ if x != nil {
+ return x.TypeUrl
+ }
+ return ""
+}
+
+func (x *DeltaDiscoveryResponse) GetRemovedResources() []string {
+ if x != nil {
+ return x.RemovedResources
+ }
+ return nil
+}
+
+func (x *DeltaDiscoveryResponse) GetRemovedResourceNames() []*ResourceName {
+ if x != nil {
+ return x.RemovedResourceNames
+ }
+ return nil
+}
+
+func (x *DeltaDiscoveryResponse) GetNonce() string {
+ if x != nil {
+ return x.Nonce
+ }
+ return ""
+}
+
+func (x *DeltaDiscoveryResponse) GetControlPlane() *v3.ControlPlane {
+ if x != nil {
+ return x.ControlPlane
+ }
+ return nil
+}
+
+// A set of dynamic parameter constraints associated with a variant of an individual xDS resource.
+// These constraints determine whether the resource matches a subscription based on the set of
+// dynamic parameters in the subscription, as specified in the
+// :ref:`ResourceLocator.dynamic_parameters`
+// field. This allows xDS implementations (clients, servers, and caching proxies) to determine
+// which variant of a resource is appropriate for a given client.
+type DynamicParameterConstraints struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Type:
+ //
+ // *DynamicParameterConstraints_Constraint
+ // *DynamicParameterConstraints_OrConstraints
+ // *DynamicParameterConstraints_AndConstraints
+ // *DynamicParameterConstraints_NotConstraints
+ Type isDynamicParameterConstraints_Type `protobuf_oneof:"type"`
+}
+
+func (x *DynamicParameterConstraints) Reset() {
+ *x = DynamicParameterConstraints{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DynamicParameterConstraints) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DynamicParameterConstraints) ProtoMessage() {}
+
+func (x *DynamicParameterConstraints) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DynamicParameterConstraints.ProtoReflect.Descriptor instead.
+func (*DynamicParameterConstraints) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{6}
+}
+
+func (m *DynamicParameterConstraints) GetType() isDynamicParameterConstraints_Type {
+ if m != nil {
+ return m.Type
+ }
+ return nil
+}
+
+func (x *DynamicParameterConstraints) GetConstraint() *DynamicParameterConstraints_SingleConstraint {
+ if x, ok := x.GetType().(*DynamicParameterConstraints_Constraint); ok {
+ return x.Constraint
+ }
+ return nil
+}
+
+func (x *DynamicParameterConstraints) GetOrConstraints() *DynamicParameterConstraints_ConstraintList {
+ if x, ok := x.GetType().(*DynamicParameterConstraints_OrConstraints); ok {
+ return x.OrConstraints
+ }
+ return nil
+}
+
+func (x *DynamicParameterConstraints) GetAndConstraints() *DynamicParameterConstraints_ConstraintList {
+ if x, ok := x.GetType().(*DynamicParameterConstraints_AndConstraints); ok {
+ return x.AndConstraints
+ }
+ return nil
+}
+
+func (x *DynamicParameterConstraints) GetNotConstraints() *DynamicParameterConstraints {
+ if x, ok := x.GetType().(*DynamicParameterConstraints_NotConstraints); ok {
+ return x.NotConstraints
+ }
+ return nil
+}
+
+type isDynamicParameterConstraints_Type interface {
+ isDynamicParameterConstraints_Type()
+}
+
+type DynamicParameterConstraints_Constraint struct {
+ // A single constraint to evaluate.
+ Constraint *DynamicParameterConstraints_SingleConstraint `protobuf:"bytes,1,opt,name=constraint,proto3,oneof"`
+}
+
+type DynamicParameterConstraints_OrConstraints struct {
+ // A list of constraints that match if any one constraint in the list
+ // matches.
+ OrConstraints *DynamicParameterConstraints_ConstraintList `protobuf:"bytes,2,opt,name=or_constraints,json=orConstraints,proto3,oneof"`
+}
+
+type DynamicParameterConstraints_AndConstraints struct {
+ // A list of constraints that must all match.
+ AndConstraints *DynamicParameterConstraints_ConstraintList `protobuf:"bytes,3,opt,name=and_constraints,json=andConstraints,proto3,oneof"`
+}
+
+type DynamicParameterConstraints_NotConstraints struct {
+ // The inverse (NOT) of a set of constraints.
+ NotConstraints *DynamicParameterConstraints `protobuf:"bytes,4,opt,name=not_constraints,json=notConstraints,proto3,oneof"`
+}
+
+func (*DynamicParameterConstraints_Constraint) isDynamicParameterConstraints_Type() {}
+
+func (*DynamicParameterConstraints_OrConstraints) isDynamicParameterConstraints_Type() {}
+
+func (*DynamicParameterConstraints_AndConstraints) isDynamicParameterConstraints_Type() {}
+
+func (*DynamicParameterConstraints_NotConstraints) isDynamicParameterConstraints_Type() {}
+
+// [#next-free-field: 10]
+type Resource struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The resource's name, to distinguish it from others of the same type of resource.
+ // Only one of “name“ or “resource_name“ may be set.
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+ // Alternative to the “name“ field, to be used when the server supports
+ // multiple variants of the named resource that are differentiated by
+ // dynamic parameter constraints.
+ // Only one of “name“ or “resource_name“ may be set.
+ ResourceName *ResourceName `protobuf:"bytes,8,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"`
+ // The aliases are a list of other names that this resource can go by.
+ Aliases []string `protobuf:"bytes,4,rep,name=aliases,proto3" json:"aliases,omitempty"`
+ // The resource level version. It allows xDS to track the state of individual
+ // resources.
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
+ // The resource being tracked.
+ Resource *anypb.Any `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
+ // Time-to-live value for the resource. For each resource, a timer is started. The timer is
+ // reset each time the resource is received with a new TTL. If the resource is received with
+ // no TTL set, the timer is removed for the resource. Upon expiration of the timer, the
+ // configuration for the resource will be removed.
+ //
+ // The TTL can be refreshed or changed by sending a response that doesn't change the resource
+ // version. In this case the resource field does not need to be populated, which allows for
+ // light-weight "heartbeat" updates to keep a resource with a TTL alive.
+ //
+ // The TTL feature is meant to support configurations that should be removed in the event of
+ // a management server failure. For example, the feature may be used for fault injection
+ // testing where the fault injection should be terminated in the event that Envoy loses contact
+ // with the management server.
+ Ttl *durationpb.Duration `protobuf:"bytes,6,opt,name=ttl,proto3" json:"ttl,omitempty"`
+ // Cache control properties for the resource.
+ // [#not-implemented-hide:]
+ CacheControl *Resource_CacheControl `protobuf:"bytes,7,opt,name=cache_control,json=cacheControl,proto3" json:"cache_control,omitempty"`
+ // The Metadata field can be used to provide additional information for the resource.
+ // E.g. the trace data for debugging.
+ Metadata *v3.Metadata `protobuf:"bytes,9,opt,name=metadata,proto3" json:"metadata,omitempty"`
+}
+
+func (x *Resource) Reset() {
+ *x = Resource{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Resource) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Resource) ProtoMessage() {}
+
+func (x *Resource) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Resource.ProtoReflect.Descriptor instead.
+func (*Resource) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *Resource) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Resource) GetResourceName() *ResourceName {
+ if x != nil {
+ return x.ResourceName
+ }
+ return nil
+}
+
+func (x *Resource) GetAliases() []string {
+ if x != nil {
+ return x.Aliases
+ }
+ return nil
+}
+
+func (x *Resource) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *Resource) GetResource() *anypb.Any {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+func (x *Resource) GetTtl() *durationpb.Duration {
+ if x != nil {
+ return x.Ttl
+ }
+ return nil
+}
+
+func (x *Resource) GetCacheControl() *Resource_CacheControl {
+ if x != nil {
+ return x.CacheControl
+ }
+ return nil
+}
+
+func (x *Resource) GetMetadata() *v3.Metadata {
+ if x != nil {
+ return x.Metadata
+ }
+ return nil
+}
+
+// A single constraint for a given key.
+type DynamicParameterConstraints_SingleConstraint struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The key to match against.
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ // Types that are assignable to ConstraintType:
+ //
+ // *DynamicParameterConstraints_SingleConstraint_Value
+ // *DynamicParameterConstraints_SingleConstraint_Exists_
+ ConstraintType isDynamicParameterConstraints_SingleConstraint_ConstraintType `protobuf_oneof:"constraint_type"`
+}
+
+func (x *DynamicParameterConstraints_SingleConstraint) Reset() {
+ *x = DynamicParameterConstraints_SingleConstraint{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DynamicParameterConstraints_SingleConstraint) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DynamicParameterConstraints_SingleConstraint) ProtoMessage() {}
+
+func (x *DynamicParameterConstraints_SingleConstraint) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DynamicParameterConstraints_SingleConstraint.ProtoReflect.Descriptor instead.
+func (*DynamicParameterConstraints_SingleConstraint) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{6, 0}
+}
+
+func (x *DynamicParameterConstraints_SingleConstraint) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint) GetConstraintType() isDynamicParameterConstraints_SingleConstraint_ConstraintType {
+ if m != nil {
+ return m.ConstraintType
+ }
+ return nil
+}
+
+func (x *DynamicParameterConstraints_SingleConstraint) GetValue() string {
+ if x, ok := x.GetConstraintType().(*DynamicParameterConstraints_SingleConstraint_Value); ok {
+ return x.Value
+ }
+ return ""
+}
+
+func (x *DynamicParameterConstraints_SingleConstraint) GetExists() *DynamicParameterConstraints_SingleConstraint_Exists {
+ if x, ok := x.GetConstraintType().(*DynamicParameterConstraints_SingleConstraint_Exists_); ok {
+ return x.Exists
+ }
+ return nil
+}
+
+type isDynamicParameterConstraints_SingleConstraint_ConstraintType interface {
+ isDynamicParameterConstraints_SingleConstraint_ConstraintType()
+}
+
+type DynamicParameterConstraints_SingleConstraint_Value struct {
+ // Matches this exact value.
+ Value string `protobuf:"bytes,2,opt,name=value,proto3,oneof"`
+}
+
+type DynamicParameterConstraints_SingleConstraint_Exists_ struct {
+ // Key is present (matches any value except for the key being absent).
+ // This allows setting a default constraint for clients that do
+ // not send a key at all, while there may be other clients that need
+ // special configuration based on that key.
+ Exists *DynamicParameterConstraints_SingleConstraint_Exists `protobuf:"bytes,3,opt,name=exists,proto3,oneof"`
+}
+
+func (*DynamicParameterConstraints_SingleConstraint_Value) isDynamicParameterConstraints_SingleConstraint_ConstraintType() {
+}
+
+func (*DynamicParameterConstraints_SingleConstraint_Exists_) isDynamicParameterConstraints_SingleConstraint_ConstraintType() {
+}
+
+type DynamicParameterConstraints_ConstraintList struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Constraints []*DynamicParameterConstraints `protobuf:"bytes,1,rep,name=constraints,proto3" json:"constraints,omitempty"`
+}
+
+func (x *DynamicParameterConstraints_ConstraintList) Reset() {
+ *x = DynamicParameterConstraints_ConstraintList{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DynamicParameterConstraints_ConstraintList) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DynamicParameterConstraints_ConstraintList) ProtoMessage() {}
+
+func (x *DynamicParameterConstraints_ConstraintList) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DynamicParameterConstraints_ConstraintList.ProtoReflect.Descriptor instead.
+func (*DynamicParameterConstraints_ConstraintList) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{6, 1}
+}
+
+func (x *DynamicParameterConstraints_ConstraintList) GetConstraints() []*DynamicParameterConstraints {
+ if x != nil {
+ return x.Constraints
+ }
+ return nil
+}
+
+type DynamicParameterConstraints_SingleConstraint_Exists struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DynamicParameterConstraints_SingleConstraint_Exists) Reset() {
+ *x = DynamicParameterConstraints_SingleConstraint_Exists{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DynamicParameterConstraints_SingleConstraint_Exists) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DynamicParameterConstraints_SingleConstraint_Exists) ProtoMessage() {}
+
+func (x *DynamicParameterConstraints_SingleConstraint_Exists) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DynamicParameterConstraints_SingleConstraint_Exists.ProtoReflect.Descriptor instead.
+func (*DynamicParameterConstraints_SingleConstraint_Exists) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{6, 0, 0}
+}
+
+// Cache control properties for the resource.
+// [#not-implemented-hide:]
+type Resource_CacheControl struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // If true, xDS proxies may not cache this resource.
+ // Note that this does not apply to clients other than xDS proxies, which must cache resources
+ // for their own use, regardless of the value of this field.
+ DoNotCache bool `protobuf:"varint,1,opt,name=do_not_cache,json=doNotCache,proto3" json:"do_not_cache,omitempty"`
+}
+
+func (x *Resource_CacheControl) Reset() {
+ *x = Resource_CacheControl{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Resource_CacheControl) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Resource_CacheControl) ProtoMessage() {}
+
+func (x *Resource_CacheControl) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_discovery_v3_discovery_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Resource_CacheControl.ProtoReflect.Descriptor instead.
+func (*Resource_CacheControl) Descriptor() ([]byte, []int) {
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP(), []int{7, 0}
+}
+
+func (x *Resource_CacheControl) GetDoNotCache() bool {
+ if x != nil {
+ return x.DoNotCache
+ }
+ return false
+}
+
+var File_envoy_service_discovery_v3_discovery_proto protoreflect.FileDescriptor
+
+var file_envoy_service_discovery_v3_discovery_proto_rawDesc = []byte{
+ 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
+ 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73,
+ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63,
+ 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62,
+ 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63,
+ 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75,
+ 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64,
+ 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xde, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x71, 0x0a, 0x12, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61,
+ 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73,
+ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69,
+ 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
+ 0x52, 0x11, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
+ 0x65, 0x72, 0x73, 0x1a, 0x44, 0x0a, 0x16, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61,
+ 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
+ 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+ 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9f, 0x01, 0x0a, 0x0c, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x7b,
+ 0x0a, 0x1d, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65,
+ 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e,
+ 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65,
+ 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x1b,
+ 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
+ 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x85, 0x03, 0x0a, 0x10,
+ 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49,
+ 0x6e, 0x66, 0x6f, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e,
+ 0x6f, 0x64, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x11, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18,
+ 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e,
+ 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74,
+ 0x6f, 0x72, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61,
+ 0x74, 0x6f, 0x72, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12,
+ 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6e, 0x6f, 0x6e, 0x63,
+ 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
+ 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x3a, 0x24, 0x9a,
+ 0xc5, 0x88, 0x1e, 0x1f, 0x0a, 0x1d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+ 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x22, 0xa3, 0x02, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
+ 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x09,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+ 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x06, 0x63, 0x61, 0x6e, 0x61, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65,
+ 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65,
+ 0x55, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x63, 0x6f, 0x6e,
+ 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
+ 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50,
+ 0x6c, 0x61, 0x6e, 0x65, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61,
+ 0x6e, 0x65, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
+ 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9a, 0x06, 0x0a, 0x15, 0x44, 0x65,
+ 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e,
+ 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x38,
+ 0x0a, 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73,
+ 0x5f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x53,
+ 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x3c, 0x0a, 0x1a, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x62,
+ 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x18, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x62,
+ 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x6b, 0x0a, 0x1b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x73, 0x75, 0x62, 0x73,
+ 0x63, 0x72, 0x69, 0x62, 0x65, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63,
+ 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x19, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72,
+ 0x69, 0x62, 0x65, 0x12, 0x6f, 0x0a, 0x1d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
+ 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x75, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63,
+ 0x72, 0x69, 0x62, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f,
+ 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x1b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63,
+ 0x72, 0x69, 0x62, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x19, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c,
+ 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65,
+ 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f,
+ 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x6e, 0x69, 0x74,
+ 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x17, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61,
+ 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6e, 0x6f,
+ 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x65, 0x72, 0x72, 0x6f,
+ 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x52, 0x0b, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x1a,
+ 0x4a, 0x0a, 0x1c, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
+ 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88,
+ 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
+ 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xbf, 0x03, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x74, 0x61,
+ 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11,
+ 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66,
+ 0x6f, 0x12, 0x42, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x02,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76,
+ 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72,
+ 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c,
+ 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x6d,
+ 0x6f, 0x76, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x5e, 0x0a,
+ 0x16, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69,
+ 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x14, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x14, 0x0a,
+ 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f,
+ 0x6e, 0x63, 0x65, 0x12, 0x47, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x5f, 0x70,
+ 0x6c, 0x61, 0x6e, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
+ 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x52, 0x0c,
+ 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x65, 0x3a, 0x2a, 0x9a, 0xc5,
+ 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
+ 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x06, 0x0a, 0x1b, 0x44, 0x79, 0x6e,
+ 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e,
+ 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x6a, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73,
+ 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x48, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73,
+ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69,
+ 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72,
+ 0x61, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73,
+ 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72,
+ 0x61, 0x69, 0x6e, 0x74, 0x12, 0x6f, 0x0a, 0x0e, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74,
+ 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73,
+ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69,
+ 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72,
+ 0x61, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74,
+ 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0d, 0x6f, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72,
+ 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x71, 0x0a, 0x0f, 0x61, 0x6e, 0x64, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x46,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64,
+ 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61,
+ 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73,
+ 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69,
+ 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x48, 0x00, 0x52, 0x0e, 0x61, 0x6e, 0x64, 0x43, 0x6f, 0x6e,
+ 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x62, 0x0a, 0x0f, 0x6e, 0x6f, 0x74, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44,
+ 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43,
+ 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x6e, 0x6f,
+ 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0xc9, 0x01, 0x0a,
+ 0x10, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e,
+ 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
+ 0x6b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x69, 0x0a, 0x06, 0x65,
+ 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4f, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63,
+ 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63,
+ 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61,
+ 0x69, 0x6e, 0x74, 0x73, 0x2e, 0x53, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x73, 0x74,
+ 0x72, 0x61, 0x69, 0x6e, 0x74, 0x2e, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x48, 0x00, 0x52, 0x06,
+ 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x1a, 0x08, 0x0a, 0x06, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73,
+ 0x42, 0x16, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x6b, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73,
+ 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x59, 0x0a, 0x0b, 0x63, 0x6f,
+ 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
+ 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x79, 0x6e,
+ 0x61, 0x6d, 0x69, 0x63, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e,
+ 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72,
+ 0x61, 0x69, 0x6e, 0x74, 0x73, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xe4, 0x03,
+ 0x0a, 0x08, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4d,
+ 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e,
+ 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52,
+ 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a,
+ 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
+ 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x12, 0x30, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x12, 0x2b, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x74, 0x74, 0x6c,
+ 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x61, 0x63, 0x68, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
+ 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
+ 0x79, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x43, 0x61,
+ 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x52, 0x0c, 0x63, 0x61, 0x63, 0x68,
+ 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76,
+ 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x1a, 0x30, 0x0a, 0x0c, 0x43, 0x61, 0x63, 0x68, 0x65, 0x43, 0x6f, 0x6e,
+ 0x74, 0x72, 0x6f, 0x6c, 0x12, 0x20, 0x0a, 0x0c, 0x64, 0x6f, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x63,
+ 0x61, 0x63, 0x68, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x6f, 0x4e, 0x6f,
+ 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x42, 0x93, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a,
+ 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73,
+ 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x44, 0x69, 0x73, 0x63, 0x6f,
+ 0x76, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f,
+ 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c,
+ 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x33, 0x3b, 0x64,
+ 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
+}
+
+var (
+ file_envoy_service_discovery_v3_discovery_proto_rawDescOnce sync.Once
+ file_envoy_service_discovery_v3_discovery_proto_rawDescData = file_envoy_service_discovery_v3_discovery_proto_rawDesc
+)
+
+func file_envoy_service_discovery_v3_discovery_proto_rawDescGZIP() []byte {
+ file_envoy_service_discovery_v3_discovery_proto_rawDescOnce.Do(func() {
+ file_envoy_service_discovery_v3_discovery_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v3_discovery_proto_rawDescData)
+ })
+ return file_envoy_service_discovery_v3_discovery_proto_rawDescData
+}
+
+var file_envoy_service_discovery_v3_discovery_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
+var file_envoy_service_discovery_v3_discovery_proto_goTypes = []interface{}{
+ (*ResourceLocator)(nil), // 0: envoy.service.discovery.v3.ResourceLocator
+ (*ResourceName)(nil), // 1: envoy.service.discovery.v3.ResourceName
+ (*DiscoveryRequest)(nil), // 2: envoy.service.discovery.v3.DiscoveryRequest
+ (*DiscoveryResponse)(nil), // 3: envoy.service.discovery.v3.DiscoveryResponse
+ (*DeltaDiscoveryRequest)(nil), // 4: envoy.service.discovery.v3.DeltaDiscoveryRequest
+ (*DeltaDiscoveryResponse)(nil), // 5: envoy.service.discovery.v3.DeltaDiscoveryResponse
+ (*DynamicParameterConstraints)(nil), // 6: envoy.service.discovery.v3.DynamicParameterConstraints
+ (*Resource)(nil), // 7: envoy.service.discovery.v3.Resource
+ nil, // 8: envoy.service.discovery.v3.ResourceLocator.DynamicParametersEntry
+ nil, // 9: envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry
+ (*DynamicParameterConstraints_SingleConstraint)(nil), // 10: envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint
+ (*DynamicParameterConstraints_ConstraintList)(nil), // 11: envoy.service.discovery.v3.DynamicParameterConstraints.ConstraintList
+ (*DynamicParameterConstraints_SingleConstraint_Exists)(nil), // 12: envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint.Exists
+ (*Resource_CacheControl)(nil), // 13: envoy.service.discovery.v3.Resource.CacheControl
+ (*v3.Node)(nil), // 14: envoy.config.core.v3.Node
+ (*status.Status)(nil), // 15: google.rpc.Status
+ (*anypb.Any)(nil), // 16: google.protobuf.Any
+ (*v3.ControlPlane)(nil), // 17: envoy.config.core.v3.ControlPlane
+ (*durationpb.Duration)(nil), // 18: google.protobuf.Duration
+ (*v3.Metadata)(nil), // 19: envoy.config.core.v3.Metadata
+}
+var file_envoy_service_discovery_v3_discovery_proto_depIdxs = []int32{
+ 8, // 0: envoy.service.discovery.v3.ResourceLocator.dynamic_parameters:type_name -> envoy.service.discovery.v3.ResourceLocator.DynamicParametersEntry
+ 6, // 1: envoy.service.discovery.v3.ResourceName.dynamic_parameter_constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints
+ 14, // 2: envoy.service.discovery.v3.DiscoveryRequest.node:type_name -> envoy.config.core.v3.Node
+ 0, // 3: envoy.service.discovery.v3.DiscoveryRequest.resource_locators:type_name -> envoy.service.discovery.v3.ResourceLocator
+ 15, // 4: envoy.service.discovery.v3.DiscoveryRequest.error_detail:type_name -> google.rpc.Status
+ 16, // 5: envoy.service.discovery.v3.DiscoveryResponse.resources:type_name -> google.protobuf.Any
+ 17, // 6: envoy.service.discovery.v3.DiscoveryResponse.control_plane:type_name -> envoy.config.core.v3.ControlPlane
+ 14, // 7: envoy.service.discovery.v3.DeltaDiscoveryRequest.node:type_name -> envoy.config.core.v3.Node
+ 0, // 8: envoy.service.discovery.v3.DeltaDiscoveryRequest.resource_locators_subscribe:type_name -> envoy.service.discovery.v3.ResourceLocator
+ 0, // 9: envoy.service.discovery.v3.DeltaDiscoveryRequest.resource_locators_unsubscribe:type_name -> envoy.service.discovery.v3.ResourceLocator
+ 9, // 10: envoy.service.discovery.v3.DeltaDiscoveryRequest.initial_resource_versions:type_name -> envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry
+ 15, // 11: envoy.service.discovery.v3.DeltaDiscoveryRequest.error_detail:type_name -> google.rpc.Status
+ 7, // 12: envoy.service.discovery.v3.DeltaDiscoveryResponse.resources:type_name -> envoy.service.discovery.v3.Resource
+ 1, // 13: envoy.service.discovery.v3.DeltaDiscoveryResponse.removed_resource_names:type_name -> envoy.service.discovery.v3.ResourceName
+ 17, // 14: envoy.service.discovery.v3.DeltaDiscoveryResponse.control_plane:type_name -> envoy.config.core.v3.ControlPlane
+ 10, // 15: envoy.service.discovery.v3.DynamicParameterConstraints.constraint:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint
+ 11, // 16: envoy.service.discovery.v3.DynamicParameterConstraints.or_constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints.ConstraintList
+ 11, // 17: envoy.service.discovery.v3.DynamicParameterConstraints.and_constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints.ConstraintList
+ 6, // 18: envoy.service.discovery.v3.DynamicParameterConstraints.not_constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints
+ 1, // 19: envoy.service.discovery.v3.Resource.resource_name:type_name -> envoy.service.discovery.v3.ResourceName
+ 16, // 20: envoy.service.discovery.v3.Resource.resource:type_name -> google.protobuf.Any
+ 18, // 21: envoy.service.discovery.v3.Resource.ttl:type_name -> google.protobuf.Duration
+ 13, // 22: envoy.service.discovery.v3.Resource.cache_control:type_name -> envoy.service.discovery.v3.Resource.CacheControl
+ 19, // 23: envoy.service.discovery.v3.Resource.metadata:type_name -> envoy.config.core.v3.Metadata
+ 12, // 24: envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint.exists:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints.SingleConstraint.Exists
+ 6, // 25: envoy.service.discovery.v3.DynamicParameterConstraints.ConstraintList.constraints:type_name -> envoy.service.discovery.v3.DynamicParameterConstraints
+ 26, // [26:26] is the sub-list for method output_type
+ 26, // [26:26] is the sub-list for method input_type
+ 26, // [26:26] is the sub-list for extension type_name
+ 26, // [26:26] is the sub-list for extension extendee
+ 0, // [0:26] is the sub-list for field type_name
+}
+
+func init() { file_envoy_service_discovery_v3_discovery_proto_init() }
+func file_envoy_service_discovery_v3_discovery_proto_init() {
+ if File_envoy_service_discovery_v3_discovery_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ResourceLocator); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ResourceName); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DiscoveryRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DiscoveryResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeltaDiscoveryRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeltaDiscoveryResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DynamicParameterConstraints); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Resource); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DynamicParameterConstraints_SingleConstraint); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DynamicParameterConstraints_ConstraintList); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DynamicParameterConstraints_SingleConstraint_Exists); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Resource_CacheControl); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[6].OneofWrappers = []interface{}{
+ (*DynamicParameterConstraints_Constraint)(nil),
+ (*DynamicParameterConstraints_OrConstraints)(nil),
+ (*DynamicParameterConstraints_AndConstraints)(nil),
+ (*DynamicParameterConstraints_NotConstraints)(nil),
+ }
+ file_envoy_service_discovery_v3_discovery_proto_msgTypes[10].OneofWrappers = []interface{}{
+ (*DynamicParameterConstraints_SingleConstraint_Value)(nil),
+ (*DynamicParameterConstraints_SingleConstraint_Exists_)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_service_discovery_v3_discovery_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 14,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_service_discovery_v3_discovery_proto_goTypes,
+ DependencyIndexes: file_envoy_service_discovery_v3_discovery_proto_depIdxs,
+ MessageInfos: file_envoy_service_discovery_v3_discovery_proto_msgTypes,
+ }.Build()
+ File_envoy_service_discovery_v3_discovery_proto = out.File
+ file_envoy_service_discovery_v3_discovery_proto_rawDesc = nil
+ file_envoy_service_discovery_v3_discovery_proto_goTypes = nil
+ file_envoy_service_discovery_v3_discovery_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.validate.go
new file mode 100644
index 000000000..e30bb1e43
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery.pb.validate.go
@@ -0,0 +1,2139 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/service/discovery/v3/discovery.proto
+
+package discoveryv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on ResourceLocator with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *ResourceLocator) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ResourceLocator with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ResourceLocatorMultiError, or nil if none found.
+func (m *ResourceLocator) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ResourceLocator) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ // no validation rules for DynamicParameters
+
+ if len(errors) > 0 {
+ return ResourceLocatorMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResourceLocatorMultiError is an error wrapping multiple validation errors
+// returned by ResourceLocator.ValidateAll() if the designated constraints
+// aren't met.
+type ResourceLocatorMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResourceLocatorMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResourceLocatorMultiError) AllErrors() []error { return m }
+
+// ResourceLocatorValidationError is the validation error returned by
+// ResourceLocator.Validate if the designated constraints aren't met.
+type ResourceLocatorValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResourceLocatorValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResourceLocatorValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResourceLocatorValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResourceLocatorValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResourceLocatorValidationError) ErrorName() string { return "ResourceLocatorValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResourceLocatorValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResourceLocator.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResourceLocatorValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResourceLocatorValidationError{}
+
+// Validate checks the field values on ResourceName with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ResourceName) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ResourceName with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ResourceNameMultiError, or
+// nil if none found.
+func (m *ResourceName) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ResourceName) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ if all {
+ switch v := interface{}(m.GetDynamicParameterConstraints()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceNameValidationError{
+ field: "DynamicParameterConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceNameValidationError{
+ field: "DynamicParameterConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDynamicParameterConstraints()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceNameValidationError{
+ field: "DynamicParameterConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ResourceNameMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResourceNameMultiError is an error wrapping multiple validation errors
+// returned by ResourceName.ValidateAll() if the designated constraints aren't met.
+type ResourceNameMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResourceNameMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResourceNameMultiError) AllErrors() []error { return m }
+
+// ResourceNameValidationError is the validation error returned by
+// ResourceName.Validate if the designated constraints aren't met.
+type ResourceNameValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResourceNameValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResourceNameValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResourceNameValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResourceNameValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResourceNameValidationError) ErrorName() string { return "ResourceNameValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResourceNameValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResourceName.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResourceNameValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResourceNameValidationError{}
+
+// Validate checks the field values on DiscoveryRequest with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *DiscoveryRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DiscoveryRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// DiscoveryRequestMultiError, or nil if none found.
+func (m *DiscoveryRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DiscoveryRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for VersionInfo
+
+ if all {
+ switch v := interface{}(m.GetNode()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DiscoveryRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DiscoveryRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DiscoveryRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetResourceLocators() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DiscoveryRequestValidationError{
+ field: fmt.Sprintf("ResourceLocators[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DiscoveryRequestValidationError{
+ field: fmt.Sprintf("ResourceLocators[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DiscoveryRequestValidationError{
+ field: fmt.Sprintf("ResourceLocators[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for TypeUrl
+
+ // no validation rules for ResponseNonce
+
+ if all {
+ switch v := interface{}(m.GetErrorDetail()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DiscoveryRequestValidationError{
+ field: "ErrorDetail",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DiscoveryRequestValidationError{
+ field: "ErrorDetail",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DiscoveryRequestValidationError{
+ field: "ErrorDetail",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return DiscoveryRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// DiscoveryRequestMultiError is an error wrapping multiple validation errors
+// returned by DiscoveryRequest.ValidateAll() if the designated constraints
+// aren't met.
+type DiscoveryRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DiscoveryRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DiscoveryRequestMultiError) AllErrors() []error { return m }
+
+// DiscoveryRequestValidationError is the validation error returned by
+// DiscoveryRequest.Validate if the designated constraints aren't met.
+type DiscoveryRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DiscoveryRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DiscoveryRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DiscoveryRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DiscoveryRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DiscoveryRequestValidationError) ErrorName() string { return "DiscoveryRequestValidationError" }
+
+// Error satisfies the builtin error interface
+func (e DiscoveryRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDiscoveryRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DiscoveryRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DiscoveryRequestValidationError{}
+
+// Validate checks the field values on DiscoveryResponse with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *DiscoveryResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DiscoveryResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// DiscoveryResponseMultiError, or nil if none found.
+func (m *DiscoveryResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DiscoveryResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for VersionInfo
+
+ for idx, item := range m.GetResources() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DiscoveryResponseValidationError{
+ field: fmt.Sprintf("Resources[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DiscoveryResponseValidationError{
+ field: fmt.Sprintf("Resources[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DiscoveryResponseValidationError{
+ field: fmt.Sprintf("Resources[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for Canary
+
+ // no validation rules for TypeUrl
+
+ // no validation rules for Nonce
+
+ if all {
+ switch v := interface{}(m.GetControlPlane()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DiscoveryResponseValidationError{
+ field: "ControlPlane",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DiscoveryResponseValidationError{
+ field: "ControlPlane",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DiscoveryResponseValidationError{
+ field: "ControlPlane",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return DiscoveryResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// DiscoveryResponseMultiError is an error wrapping multiple validation errors
+// returned by DiscoveryResponse.ValidateAll() if the designated constraints
+// aren't met.
+type DiscoveryResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DiscoveryResponseMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DiscoveryResponseMultiError) AllErrors() []error { return m }
+
+// DiscoveryResponseValidationError is the validation error returned by
+// DiscoveryResponse.Validate if the designated constraints aren't met.
+type DiscoveryResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DiscoveryResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DiscoveryResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DiscoveryResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DiscoveryResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DiscoveryResponseValidationError) ErrorName() string {
+ return "DiscoveryResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DiscoveryResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDiscoveryResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DiscoveryResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DiscoveryResponseValidationError{}
+
+// Validate checks the field values on DeltaDiscoveryRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *DeltaDiscoveryRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DeltaDiscoveryRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// DeltaDiscoveryRequestMultiError, or nil if none found.
+func (m *DeltaDiscoveryRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DeltaDiscoveryRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetNode()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeltaDiscoveryRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeltaDiscoveryRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeltaDiscoveryRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for TypeUrl
+
+ for idx, item := range m.GetResourceLocatorsSubscribe() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeltaDiscoveryRequestValidationError{
+ field: fmt.Sprintf("ResourceLocatorsSubscribe[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeltaDiscoveryRequestValidationError{
+ field: fmt.Sprintf("ResourceLocatorsSubscribe[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeltaDiscoveryRequestValidationError{
+ field: fmt.Sprintf("ResourceLocatorsSubscribe[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetResourceLocatorsUnsubscribe() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeltaDiscoveryRequestValidationError{
+ field: fmt.Sprintf("ResourceLocatorsUnsubscribe[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeltaDiscoveryRequestValidationError{
+ field: fmt.Sprintf("ResourceLocatorsUnsubscribe[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeltaDiscoveryRequestValidationError{
+ field: fmt.Sprintf("ResourceLocatorsUnsubscribe[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for InitialResourceVersions
+
+ // no validation rules for ResponseNonce
+
+ if all {
+ switch v := interface{}(m.GetErrorDetail()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeltaDiscoveryRequestValidationError{
+ field: "ErrorDetail",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeltaDiscoveryRequestValidationError{
+ field: "ErrorDetail",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetErrorDetail()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeltaDiscoveryRequestValidationError{
+ field: "ErrorDetail",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return DeltaDiscoveryRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// DeltaDiscoveryRequestMultiError is an error wrapping multiple validation
+// errors returned by DeltaDiscoveryRequest.ValidateAll() if the designated
+// constraints aren't met.
+type DeltaDiscoveryRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DeltaDiscoveryRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DeltaDiscoveryRequestMultiError) AllErrors() []error { return m }
+
+// DeltaDiscoveryRequestValidationError is the validation error returned by
+// DeltaDiscoveryRequest.Validate if the designated constraints aren't met.
+type DeltaDiscoveryRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DeltaDiscoveryRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DeltaDiscoveryRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DeltaDiscoveryRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DeltaDiscoveryRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DeltaDiscoveryRequestValidationError) ErrorName() string {
+ return "DeltaDiscoveryRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DeltaDiscoveryRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDeltaDiscoveryRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DeltaDiscoveryRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DeltaDiscoveryRequestValidationError{}
+
+// Validate checks the field values on DeltaDiscoveryResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *DeltaDiscoveryResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DeltaDiscoveryResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// DeltaDiscoveryResponseMultiError, or nil if none found.
+func (m *DeltaDiscoveryResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DeltaDiscoveryResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for SystemVersionInfo
+
+ for idx, item := range m.GetResources() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeltaDiscoveryResponseValidationError{
+ field: fmt.Sprintf("Resources[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeltaDiscoveryResponseValidationError{
+ field: fmt.Sprintf("Resources[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeltaDiscoveryResponseValidationError{
+ field: fmt.Sprintf("Resources[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for TypeUrl
+
+ for idx, item := range m.GetRemovedResourceNames() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeltaDiscoveryResponseValidationError{
+ field: fmt.Sprintf("RemovedResourceNames[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeltaDiscoveryResponseValidationError{
+ field: fmt.Sprintf("RemovedResourceNames[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeltaDiscoveryResponseValidationError{
+ field: fmt.Sprintf("RemovedResourceNames[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for Nonce
+
+ if all {
+ switch v := interface{}(m.GetControlPlane()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DeltaDiscoveryResponseValidationError{
+ field: "ControlPlane",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DeltaDiscoveryResponseValidationError{
+ field: "ControlPlane",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetControlPlane()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DeltaDiscoveryResponseValidationError{
+ field: "ControlPlane",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return DeltaDiscoveryResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// DeltaDiscoveryResponseMultiError is an error wrapping multiple validation
+// errors returned by DeltaDiscoveryResponse.ValidateAll() if the designated
+// constraints aren't met.
+type DeltaDiscoveryResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DeltaDiscoveryResponseMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DeltaDiscoveryResponseMultiError) AllErrors() []error { return m }
+
+// DeltaDiscoveryResponseValidationError is the validation error returned by
+// DeltaDiscoveryResponse.Validate if the designated constraints aren't met.
+type DeltaDiscoveryResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DeltaDiscoveryResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DeltaDiscoveryResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DeltaDiscoveryResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DeltaDiscoveryResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DeltaDiscoveryResponseValidationError) ErrorName() string {
+ return "DeltaDiscoveryResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DeltaDiscoveryResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDeltaDiscoveryResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DeltaDiscoveryResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DeltaDiscoveryResponseValidationError{}
+
+// Validate checks the field values on DynamicParameterConstraints with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *DynamicParameterConstraints) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DynamicParameterConstraints with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// DynamicParameterConstraintsMultiError, or nil if none found.
+func (m *DynamicParameterConstraints) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DynamicParameterConstraints) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ switch v := m.Type.(type) {
+ case *DynamicParameterConstraints_Constraint:
+ if v == nil {
+ err := DynamicParameterConstraintsValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetConstraint()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DynamicParameterConstraintsValidationError{
+ field: "Constraint",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DynamicParameterConstraintsValidationError{
+ field: "Constraint",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetConstraint()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DynamicParameterConstraintsValidationError{
+ field: "Constraint",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *DynamicParameterConstraints_OrConstraints:
+ if v == nil {
+ err := DynamicParameterConstraintsValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetOrConstraints()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DynamicParameterConstraintsValidationError{
+ field: "OrConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DynamicParameterConstraintsValidationError{
+ field: "OrConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOrConstraints()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DynamicParameterConstraintsValidationError{
+ field: "OrConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *DynamicParameterConstraints_AndConstraints:
+ if v == nil {
+ err := DynamicParameterConstraintsValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetAndConstraints()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DynamicParameterConstraintsValidationError{
+ field: "AndConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DynamicParameterConstraintsValidationError{
+ field: "AndConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetAndConstraints()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DynamicParameterConstraintsValidationError{
+ field: "AndConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *DynamicParameterConstraints_NotConstraints:
+ if v == nil {
+ err := DynamicParameterConstraintsValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetNotConstraints()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DynamicParameterConstraintsValidationError{
+ field: "NotConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DynamicParameterConstraintsValidationError{
+ field: "NotConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNotConstraints()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DynamicParameterConstraintsValidationError{
+ field: "NotConstraints",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return DynamicParameterConstraintsMultiError(errors)
+ }
+
+ return nil
+}
+
+// DynamicParameterConstraintsMultiError is an error wrapping multiple
+// validation errors returned by DynamicParameterConstraints.ValidateAll() if
+// the designated constraints aren't met.
+type DynamicParameterConstraintsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DynamicParameterConstraintsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DynamicParameterConstraintsMultiError) AllErrors() []error { return m }
+
+// DynamicParameterConstraintsValidationError is the validation error returned
+// by DynamicParameterConstraints.Validate if the designated constraints
+// aren't met.
+type DynamicParameterConstraintsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DynamicParameterConstraintsValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DynamicParameterConstraintsValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DynamicParameterConstraintsValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DynamicParameterConstraintsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DynamicParameterConstraintsValidationError) ErrorName() string {
+ return "DynamicParameterConstraintsValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DynamicParameterConstraintsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDynamicParameterConstraints.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DynamicParameterConstraintsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DynamicParameterConstraintsValidationError{}
+
+// Validate checks the field values on Resource with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Resource) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Resource with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ResourceMultiError, or nil
+// if none found.
+func (m *Resource) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Resource) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Name
+
+ if all {
+ switch v := interface{}(m.GetResourceName()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "ResourceName",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "ResourceName",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetResourceName()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceValidationError{
+ field: "ResourceName",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Version
+
+ if all {
+ switch v := interface{}(m.GetResource()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetResource()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceValidationError{
+ field: "Resource",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetTtl()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Ttl",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Ttl",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTtl()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceValidationError{
+ field: "Ttl",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetCacheControl()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "CacheControl",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "CacheControl",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCacheControl()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceValidationError{
+ field: "CacheControl",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ResourceValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ResourceValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return ResourceMultiError(errors)
+ }
+
+ return nil
+}
+
+// ResourceMultiError is an error wrapping multiple validation errors returned
+// by Resource.ValidateAll() if the designated constraints aren't met.
+type ResourceMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ResourceMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ResourceMultiError) AllErrors() []error { return m }
+
+// ResourceValidationError is the validation error returned by
+// Resource.Validate if the designated constraints aren't met.
+type ResourceValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ResourceValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ResourceValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ResourceValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ResourceValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ResourceValidationError) ErrorName() string { return "ResourceValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ResourceValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResource.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ResourceValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ResourceValidationError{}
+
+// Validate checks the field values on
+// DynamicParameterConstraints_SingleConstraint with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *DynamicParameterConstraints_SingleConstraint) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// DynamicParameterConstraints_SingleConstraint with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// DynamicParameterConstraints_SingleConstraintMultiError, or nil if none found.
+func (m *DynamicParameterConstraints_SingleConstraint) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Key
+
+ oneofConstraintTypePresent := false
+ switch v := m.ConstraintType.(type) {
+ case *DynamicParameterConstraints_SingleConstraint_Value:
+ if v == nil {
+ err := DynamicParameterConstraints_SingleConstraintValidationError{
+ field: "ConstraintType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofConstraintTypePresent = true
+ // no validation rules for Value
+ case *DynamicParameterConstraints_SingleConstraint_Exists_:
+ if v == nil {
+ err := DynamicParameterConstraints_SingleConstraintValidationError{
+ field: "ConstraintType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofConstraintTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetExists()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DynamicParameterConstraints_SingleConstraintValidationError{
+ field: "Exists",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DynamicParameterConstraints_SingleConstraintValidationError{
+ field: "Exists",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetExists()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DynamicParameterConstraints_SingleConstraintValidationError{
+ field: "Exists",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofConstraintTypePresent {
+ err := DynamicParameterConstraints_SingleConstraintValidationError{
+ field: "ConstraintType",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return DynamicParameterConstraints_SingleConstraintMultiError(errors)
+ }
+
+ return nil
+}
+
+// DynamicParameterConstraints_SingleConstraintMultiError is an error wrapping
+// multiple validation errors returned by
+// DynamicParameterConstraints_SingleConstraint.ValidateAll() if the
+// designated constraints aren't met.
+type DynamicParameterConstraints_SingleConstraintMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DynamicParameterConstraints_SingleConstraintMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DynamicParameterConstraints_SingleConstraintMultiError) AllErrors() []error { return m }
+
+// DynamicParameterConstraints_SingleConstraintValidationError is the
+// validation error returned by
+// DynamicParameterConstraints_SingleConstraint.Validate if the designated
+// constraints aren't met.
+type DynamicParameterConstraints_SingleConstraintValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DynamicParameterConstraints_SingleConstraintValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DynamicParameterConstraints_SingleConstraintValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DynamicParameterConstraints_SingleConstraintValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DynamicParameterConstraints_SingleConstraintValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DynamicParameterConstraints_SingleConstraintValidationError) ErrorName() string {
+ return "DynamicParameterConstraints_SingleConstraintValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DynamicParameterConstraints_SingleConstraintValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDynamicParameterConstraints_SingleConstraint.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DynamicParameterConstraints_SingleConstraintValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DynamicParameterConstraints_SingleConstraintValidationError{}
+
+// Validate checks the field values on
+// DynamicParameterConstraints_ConstraintList with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *DynamicParameterConstraints_ConstraintList) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// DynamicParameterConstraints_ConstraintList with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// DynamicParameterConstraints_ConstraintListMultiError, or nil if none found.
+func (m *DynamicParameterConstraints_ConstraintList) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DynamicParameterConstraints_ConstraintList) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetConstraints() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DynamicParameterConstraints_ConstraintListValidationError{
+ field: fmt.Sprintf("Constraints[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DynamicParameterConstraints_ConstraintListValidationError{
+ field: fmt.Sprintf("Constraints[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DynamicParameterConstraints_ConstraintListValidationError{
+ field: fmt.Sprintf("Constraints[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return DynamicParameterConstraints_ConstraintListMultiError(errors)
+ }
+
+ return nil
+}
+
+// DynamicParameterConstraints_ConstraintListMultiError is an error wrapping
+// multiple validation errors returned by
+// DynamicParameterConstraints_ConstraintList.ValidateAll() if the designated
+// constraints aren't met.
+type DynamicParameterConstraints_ConstraintListMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DynamicParameterConstraints_ConstraintListMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DynamicParameterConstraints_ConstraintListMultiError) AllErrors() []error { return m }
+
+// DynamicParameterConstraints_ConstraintListValidationError is the validation
+// error returned by DynamicParameterConstraints_ConstraintList.Validate if
+// the designated constraints aren't met.
+type DynamicParameterConstraints_ConstraintListValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DynamicParameterConstraints_ConstraintListValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DynamicParameterConstraints_ConstraintListValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DynamicParameterConstraints_ConstraintListValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DynamicParameterConstraints_ConstraintListValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DynamicParameterConstraints_ConstraintListValidationError) ErrorName() string {
+ return "DynamicParameterConstraints_ConstraintListValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DynamicParameterConstraints_ConstraintListValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDynamicParameterConstraints_ConstraintList.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DynamicParameterConstraints_ConstraintListValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DynamicParameterConstraints_ConstraintListValidationError{}
+
+// Validate checks the field values on
+// DynamicParameterConstraints_SingleConstraint_Exists with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *DynamicParameterConstraints_SingleConstraint_Exists) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// DynamicParameterConstraints_SingleConstraint_Exists with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in
+// DynamicParameterConstraints_SingleConstraint_ExistsMultiError, or nil if
+// none found.
+func (m *DynamicParameterConstraints_SingleConstraint_Exists) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint_Exists) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return DynamicParameterConstraints_SingleConstraint_ExistsMultiError(errors)
+ }
+
+ return nil
+}
+
+// DynamicParameterConstraints_SingleConstraint_ExistsMultiError is an error
+// wrapping multiple validation errors returned by
+// DynamicParameterConstraints_SingleConstraint_Exists.ValidateAll() if the
+// designated constraints aren't met.
+type DynamicParameterConstraints_SingleConstraint_ExistsMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DynamicParameterConstraints_SingleConstraint_ExistsMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DynamicParameterConstraints_SingleConstraint_ExistsMultiError) AllErrors() []error { return m }
+
+// DynamicParameterConstraints_SingleConstraint_ExistsValidationError is the
+// validation error returned by
+// DynamicParameterConstraints_SingleConstraint_Exists.Validate if the
+// designated constraints aren't met.
+type DynamicParameterConstraints_SingleConstraint_ExistsValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Cause() error {
+ return e.cause
+}
+
+// Key function returns key value.
+func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) ErrorName() string {
+ return "DynamicParameterConstraints_SingleConstraint_ExistsValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e DynamicParameterConstraints_SingleConstraint_ExistsValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDynamicParameterConstraints_SingleConstraint_Exists.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DynamicParameterConstraints_SingleConstraint_ExistsValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DynamicParameterConstraints_SingleConstraint_ExistsValidationError{}
+
+// Validate checks the field values on Resource_CacheControl with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *Resource_CacheControl) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Resource_CacheControl with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// Resource_CacheControlMultiError, or nil if none found.
+func (m *Resource_CacheControl) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Resource_CacheControl) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for DoNotCache
+
+ if len(errors) > 0 {
+ return Resource_CacheControlMultiError(errors)
+ }
+
+ return nil
+}
+
+// Resource_CacheControlMultiError is an error wrapping multiple validation
+// errors returned by Resource_CacheControl.ValidateAll() if the designated
+// constraints aren't met.
+type Resource_CacheControlMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Resource_CacheControlMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Resource_CacheControlMultiError) AllErrors() []error { return m }
+
+// Resource_CacheControlValidationError is the validation error returned by
+// Resource_CacheControl.Validate if the designated constraints aren't met.
+type Resource_CacheControlValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Resource_CacheControlValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Resource_CacheControlValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Resource_CacheControlValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Resource_CacheControlValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Resource_CacheControlValidationError) ErrorName() string {
+ return "Resource_CacheControlValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e Resource_CacheControlValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sResource_CacheControl.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Resource_CacheControlValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Resource_CacheControlValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery_vtproto.pb.go
new file mode 100644
index 000000000..56a3ef579
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3/discovery_vtproto.pb.go
@@ -0,0 +1,1546 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/service/discovery/v3/discovery.proto
+
+package discoveryv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ anypb "github.com/planetscale/vtprotobuf/types/known/anypb"
+ durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *ResourceLocator) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceLocator) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ResourceLocator) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.DynamicParameters) > 0 {
+ for k := range m.DynamicParameters {
+ v := m.DynamicParameters[k]
+ baseI := i
+ i -= len(v)
+ copy(dAtA[i:], v)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(k)
+ copy(dAtA[i:], k)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k)))
+ i--
+ dAtA[i] = 0xa
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceName) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ResourceName) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ResourceName) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.DynamicParameterConstraints != nil {
+ size, err := m.DynamicParameterConstraints.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DiscoveryRequest) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DiscoveryRequest) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DiscoveryRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ResourceLocators) > 0 {
+ for iNdEx := len(m.ResourceLocators) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.ResourceLocators[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ }
+ }
+ if m.ErrorDetail != nil {
+ if vtmsg, ok := interface{}(m.ErrorDetail).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ErrorDetail)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.ResponseNonce) > 0 {
+ i -= len(m.ResponseNonce)
+ copy(dAtA[i:], m.ResponseNonce)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResponseNonce)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.TypeUrl) > 0 {
+ i -= len(m.TypeUrl)
+ copy(dAtA[i:], m.TypeUrl)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TypeUrl)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.ResourceNames) > 0 {
+ for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.ResourceNames[iNdEx])
+ copy(dAtA[i:], m.ResourceNames[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceNames[iNdEx])))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if m.Node != nil {
+ if vtmsg, ok := interface{}(m.Node).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Node)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.VersionInfo) > 0 {
+ i -= len(m.VersionInfo)
+ copy(dAtA[i:], m.VersionInfo)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.VersionInfo)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DiscoveryResponse) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DiscoveryResponse) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DiscoveryResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ControlPlane != nil {
+ if vtmsg, ok := interface{}(m.ControlPlane).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ControlPlane)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.Nonce) > 0 {
+ i -= len(m.Nonce)
+ copy(dAtA[i:], m.Nonce)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.TypeUrl) > 0 {
+ i -= len(m.TypeUrl)
+ copy(dAtA[i:], m.TypeUrl)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TypeUrl)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if m.Canary {
+ i--
+ if m.Canary {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if len(m.Resources) > 0 {
+ for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := (*anypb.Any)(m.Resources[iNdEx]).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.VersionInfo) > 0 {
+ i -= len(m.VersionInfo)
+ copy(dAtA[i:], m.VersionInfo)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.VersionInfo)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeltaDiscoveryRequest) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeltaDiscoveryRequest) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DeltaDiscoveryRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ResourceLocatorsUnsubscribe) > 0 {
+ for iNdEx := len(m.ResourceLocatorsUnsubscribe) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.ResourceLocatorsUnsubscribe[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x4a
+ }
+ }
+ if len(m.ResourceLocatorsSubscribe) > 0 {
+ for iNdEx := len(m.ResourceLocatorsSubscribe) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.ResourceLocatorsSubscribe[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x42
+ }
+ }
+ if m.ErrorDetail != nil {
+ if vtmsg, ok := interface{}(m.ErrorDetail).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ErrorDetail)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x3a
+ }
+ if len(m.ResponseNonce) > 0 {
+ i -= len(m.ResponseNonce)
+ copy(dAtA[i:], m.ResponseNonce)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResponseNonce)))
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.InitialResourceVersions) > 0 {
+ for k := range m.InitialResourceVersions {
+ v := m.InitialResourceVersions[k]
+ baseI := i
+ i -= len(v)
+ copy(dAtA[i:], v)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v)))
+ i--
+ dAtA[i] = 0x12
+ i -= len(k)
+ copy(dAtA[i:], k)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k)))
+ i--
+ dAtA[i] = 0xa
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i))
+ i--
+ dAtA[i] = 0x2a
+ }
+ }
+ if len(m.ResourceNamesUnsubscribe) > 0 {
+ for iNdEx := len(m.ResourceNamesUnsubscribe) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.ResourceNamesUnsubscribe[iNdEx])
+ copy(dAtA[i:], m.ResourceNamesUnsubscribe[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceNamesUnsubscribe[iNdEx])))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.ResourceNamesSubscribe) > 0 {
+ for iNdEx := len(m.ResourceNamesSubscribe) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.ResourceNamesSubscribe[iNdEx])
+ copy(dAtA[i:], m.ResourceNamesSubscribe[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ResourceNamesSubscribe[iNdEx])))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.TypeUrl) > 0 {
+ i -= len(m.TypeUrl)
+ copy(dAtA[i:], m.TypeUrl)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TypeUrl)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Node != nil {
+ if vtmsg, ok := interface{}(m.Node).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Node)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DeltaDiscoveryResponse) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DeltaDiscoveryResponse) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DeltaDiscoveryResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.RemovedResourceNames) > 0 {
+ for iNdEx := len(m.RemovedResourceNames) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.RemovedResourceNames[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x42
+ }
+ }
+ if m.ControlPlane != nil {
+ if vtmsg, ok := interface{}(m.ControlPlane).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ControlPlane)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x3a
+ }
+ if len(m.RemovedResources) > 0 {
+ for iNdEx := len(m.RemovedResources) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.RemovedResources[iNdEx])
+ copy(dAtA[i:], m.RemovedResources[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RemovedResources[iNdEx])))
+ i--
+ dAtA[i] = 0x32
+ }
+ }
+ if len(m.Nonce) > 0 {
+ i -= len(m.Nonce)
+ copy(dAtA[i:], m.Nonce)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Nonce)))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if len(m.TypeUrl) > 0 {
+ i -= len(m.TypeUrl)
+ copy(dAtA[i:], m.TypeUrl)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TypeUrl)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.Resources) > 0 {
+ for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Resources[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.SystemVersionInfo) > 0 {
+ i -= len(m.SystemVersionInfo)
+ copy(dAtA[i:], m.SystemVersionInfo)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SystemVersionInfo)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint_Exists) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint_Exists) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint_Exists) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.ConstraintType.(*DynamicParameterConstraints_SingleConstraint_Exists_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.ConstraintType.(*DynamicParameterConstraints_SingleConstraint_Value); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.Key) > 0 {
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint_Value) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint_Value) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.Value)
+ copy(dAtA[i:], m.Value)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value)))
+ i--
+ dAtA[i] = 0x12
+ return len(dAtA) - i, nil
+}
+func (m *DynamicParameterConstraints_SingleConstraint_Exists_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint_Exists_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Exists != nil {
+ size, err := m.Exists.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *DynamicParameterConstraints_ConstraintList) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DynamicParameterConstraints_ConstraintList) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints_ConstraintList) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Constraints) > 0 {
+ for iNdEx := len(m.Constraints) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Constraints[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DynamicParameterConstraints) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DynamicParameterConstraints) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Type.(*DynamicParameterConstraints_NotConstraints); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Type.(*DynamicParameterConstraints_AndConstraints); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Type.(*DynamicParameterConstraints_OrConstraints); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Type.(*DynamicParameterConstraints_Constraint); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DynamicParameterConstraints_Constraint) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints_Constraint) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Constraint != nil {
+ size, err := m.Constraint.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *DynamicParameterConstraints_OrConstraints) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints_OrConstraints) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.OrConstraints != nil {
+ size, err := m.OrConstraints.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *DynamicParameterConstraints_AndConstraints) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints_AndConstraints) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.AndConstraints != nil {
+ size, err := m.AndConstraints.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *DynamicParameterConstraints_NotConstraints) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DynamicParameterConstraints_NotConstraints) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.NotConstraints != nil {
+ size, err := m.NotConstraints.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *Resource_CacheControl) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Resource_CacheControl) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Resource_CacheControl) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.DoNotCache {
+ i--
+ if m.DoNotCache {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Resource) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Resource) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Resource) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Metadata != nil {
+ if vtmsg, ok := interface{}(m.Metadata).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Metadata)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x4a
+ }
+ if m.ResourceName != nil {
+ size, err := m.ResourceName.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x42
+ }
+ if m.CacheControl != nil {
+ size, err := m.CacheControl.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ }
+ if m.Ttl != nil {
+ size, err := (*durationpb.Duration)(m.Ttl).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ }
+ if len(m.Aliases) > 0 {
+ for iNdEx := len(m.Aliases) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.Aliases[iNdEx])
+ copy(dAtA[i:], m.Aliases[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Aliases[iNdEx])))
+ i--
+ dAtA[i] = 0x22
+ }
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Resource != nil {
+ size, err := (*anypb.Any)(m.Resource).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Version) > 0 {
+ i -= len(m.Version)
+ copy(dAtA[i:], m.Version)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ResourceLocator) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.DynamicParameters) > 0 {
+ for k, v := range m.DynamicParameters {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v)))
+ n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ResourceName) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.DynamicParameterConstraints != nil {
+ l = m.DynamicParameterConstraints.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DiscoveryRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.VersionInfo)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Node != nil {
+ if size, ok := interface{}(m.Node).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Node)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.ResourceNames) > 0 {
+ for _, s := range m.ResourceNames {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ l = len(m.TypeUrl)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.ResponseNonce)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ErrorDetail != nil {
+ if size, ok := interface{}(m.ErrorDetail).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ErrorDetail)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.ResourceLocators) > 0 {
+ for _, e := range m.ResourceLocators {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DiscoveryResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.VersionInfo)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Resources) > 0 {
+ for _, e := range m.Resources {
+ l = (*anypb.Any)(e).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.Canary {
+ n += 2
+ }
+ l = len(m.TypeUrl)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Nonce)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ControlPlane != nil {
+ if size, ok := interface{}(m.ControlPlane).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ControlPlane)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DeltaDiscoveryRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Node != nil {
+ if size, ok := interface{}(m.Node).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Node)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.TypeUrl)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.ResourceNamesSubscribe) > 0 {
+ for _, s := range m.ResourceNamesSubscribe {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.ResourceNamesUnsubscribe) > 0 {
+ for _, s := range m.ResourceNamesUnsubscribe {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.InitialResourceVersions) > 0 {
+ for k, v := range m.InitialResourceVersions {
+ _ = k
+ _ = v
+ mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v)))
+ n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize))
+ }
+ }
+ l = len(m.ResponseNonce)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ErrorDetail != nil {
+ if size, ok := interface{}(m.ErrorDetail).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ErrorDetail)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.ResourceLocatorsSubscribe) > 0 {
+ for _, e := range m.ResourceLocatorsSubscribe {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.ResourceLocatorsUnsubscribe) > 0 {
+ for _, e := range m.ResourceLocatorsUnsubscribe {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DeltaDiscoveryResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.SystemVersionInfo)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Resources) > 0 {
+ for _, e := range m.Resources {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ l = len(m.TypeUrl)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Nonce)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.RemovedResources) > 0 {
+ for _, s := range m.RemovedResources {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.ControlPlane != nil {
+ if size, ok := interface{}(m.ControlPlane).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ControlPlane)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.RemovedResourceNames) > 0 {
+ for _, e := range m.RemovedResourceNames {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint_Exists) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.ConstraintType.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DynamicParameterConstraints_SingleConstraint_Value) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Value)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *DynamicParameterConstraints_SingleConstraint_Exists_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Exists != nil {
+ l = m.Exists.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *DynamicParameterConstraints_ConstraintList) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Constraints) > 0 {
+ for _, e := range m.Constraints {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DynamicParameterConstraints) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DynamicParameterConstraints_Constraint) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Constraint != nil {
+ l = m.Constraint.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *DynamicParameterConstraints_OrConstraints) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.OrConstraints != nil {
+ l = m.OrConstraints.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *DynamicParameterConstraints_AndConstraints) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.AndConstraints != nil {
+ l = m.AndConstraints.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *DynamicParameterConstraints_NotConstraints) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.NotConstraints != nil {
+ l = m.NotConstraints.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *Resource_CacheControl) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DoNotCache {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Resource) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Version)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Resource != nil {
+ l = (*anypb.Any)(m.Resource).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Aliases) > 0 {
+ for _, s := range m.Aliases {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.Ttl != nil {
+ l = (*durationpb.Duration)(m.Ttl).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.CacheControl != nil {
+ l = m.CacheControl.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ResourceName != nil {
+ l = m.ResourceName.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Metadata != nil {
+ if size, ok := interface{}(m.Metadata).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Metadata)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs.pb.go
new file mode 100644
index 000000000..6b47a93c6
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs.pb.go
@@ -0,0 +1,325 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/service/load_stats/v3/lrs.proto
+
+package load_statsv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ v31 "github.com/envoyproxy/go-control-plane/envoy/config/endpoint/v3"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// A load report Envoy sends to the management server.
+type LoadStatsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Node identifier for Envoy instance.
+ Node *v3.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
+ // A list of load stats to report.
+ ClusterStats []*v31.ClusterStats `protobuf:"bytes,2,rep,name=cluster_stats,json=clusterStats,proto3" json:"cluster_stats,omitempty"`
+}
+
+func (x *LoadStatsRequest) Reset() {
+ *x = LoadStatsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_load_stats_v3_lrs_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LoadStatsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LoadStatsRequest) ProtoMessage() {}
+
+func (x *LoadStatsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_load_stats_v3_lrs_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LoadStatsRequest.ProtoReflect.Descriptor instead.
+func (*LoadStatsRequest) Descriptor() ([]byte, []int) {
+ return file_envoy_service_load_stats_v3_lrs_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *LoadStatsRequest) GetNode() *v3.Node {
+ if x != nil {
+ return x.Node
+ }
+ return nil
+}
+
+func (x *LoadStatsRequest) GetClusterStats() []*v31.ClusterStats {
+ if x != nil {
+ return x.ClusterStats
+ }
+ return nil
+}
+
+// The management server sends envoy a LoadStatsResponse with all clusters it
+// is interested in learning load stats about.
+type LoadStatsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Clusters to report stats for.
+ // Not populated if “send_all_clusters“ is true.
+ Clusters []string `protobuf:"bytes,1,rep,name=clusters,proto3" json:"clusters,omitempty"`
+ // If true, the client should send all clusters it knows about.
+ // Only clients that advertise the "envoy.lrs.supports_send_all_clusters" capability in their
+ // :ref:`client_features` field will honor this field.
+ SendAllClusters bool `protobuf:"varint,4,opt,name=send_all_clusters,json=sendAllClusters,proto3" json:"send_all_clusters,omitempty"`
+ // The minimum interval of time to collect stats over. This is only a minimum for two reasons:
+ //
+ // 1. There may be some delay from when the timer fires until stats sampling occurs.
+ // 2. For clusters that were already feature in the previous “LoadStatsResponse“, any traffic
+ // that is observed in between the corresponding previous “LoadStatsRequest“ and this
+ // “LoadStatsResponse“ will also be accumulated and billed to the cluster. This avoids a period
+ // of inobservability that might otherwise exists between the messages. New clusters are not
+ // subject to this consideration.
+ LoadReportingInterval *durationpb.Duration `protobuf:"bytes,2,opt,name=load_reporting_interval,json=loadReportingInterval,proto3" json:"load_reporting_interval,omitempty"`
+ // Set to “true“ if the management server supports endpoint granularity
+ // report.
+ ReportEndpointGranularity bool `protobuf:"varint,3,opt,name=report_endpoint_granularity,json=reportEndpointGranularity,proto3" json:"report_endpoint_granularity,omitempty"`
+}
+
+func (x *LoadStatsResponse) Reset() {
+ *x = LoadStatsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_load_stats_v3_lrs_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LoadStatsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LoadStatsResponse) ProtoMessage() {}
+
+func (x *LoadStatsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_load_stats_v3_lrs_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use LoadStatsResponse.ProtoReflect.Descriptor instead.
+func (*LoadStatsResponse) Descriptor() ([]byte, []int) {
+ return file_envoy_service_load_stats_v3_lrs_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *LoadStatsResponse) GetClusters() []string {
+ if x != nil {
+ return x.Clusters
+ }
+ return nil
+}
+
+func (x *LoadStatsResponse) GetSendAllClusters() bool {
+ if x != nil {
+ return x.SendAllClusters
+ }
+ return false
+}
+
+func (x *LoadStatsResponse) GetLoadReportingInterval() *durationpb.Duration {
+ if x != nil {
+ return x.LoadReportingInterval
+ }
+ return nil
+}
+
+func (x *LoadStatsResponse) GetReportEndpointGranularity() bool {
+ if x != nil {
+ return x.ReportEndpointGranularity
+ }
+ return false
+}
+
+var File_envoy_service_load_stats_v3_lrs_proto protoreflect.FileDescriptor
+
+var file_envoy_service_load_stats_v3_lrs_proto_rawDesc = []byte{
+ 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
+ 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x6c, 0x72,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74,
+ 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x2f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x33, 0x2f,
+ 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0xc4, 0x01, 0x0a, 0x10, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f,
+ 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x63, 0x6c, 0x75, 0x73,
+ 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x26, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x65,
+ 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74,
+ 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
+ 0x53, 0x74, 0x61, 0x74, 0x73, 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64,
+ 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74,
+ 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xa4, 0x02, 0x0a, 0x11, 0x4c,
+ 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x11,
+ 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
+ 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x73, 0x65, 0x6e, 0x64, 0x41, 0x6c, 0x6c,
+ 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x51, 0x0a, 0x17, 0x6c, 0x6f, 0x61, 0x64,
+ 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72,
+ 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
+ 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x3e, 0x0a, 0x1b, 0x72,
+ 0x65, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x67,
+ 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x19, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74,
+ 0x47, 0x72, 0x61, 0x6e, 0x75, 0x6c, 0x61, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x34, 0x9a, 0xc5, 0x88,
+ 0x1e, 0x2f, 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x32, 0x2e,
+ 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x32, 0x8e, 0x01, 0x0a, 0x14, 0x4c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
+ 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0f, 0x53, 0x74,
+ 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x2d, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f,
+ 0x61, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64,
+ 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61,
+ 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x6f, 0x61, 0x64, 0x53,
+ 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01,
+ 0x30, 0x01, 0x42, 0x90, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x29, 0x69,
+ 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x6c, 0x6f, 0x61, 0x64, 0x5f,
+ 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x08, 0x4c, 0x72, 0x73, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63,
+ 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x6c, 0x6f, 0x61, 0x64, 0x5f,
+ 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x74,
+ 0x61, 0x74, 0x73, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_service_load_stats_v3_lrs_proto_rawDescOnce sync.Once
+ file_envoy_service_load_stats_v3_lrs_proto_rawDescData = file_envoy_service_load_stats_v3_lrs_proto_rawDesc
+)
+
+func file_envoy_service_load_stats_v3_lrs_proto_rawDescGZIP() []byte {
+ file_envoy_service_load_stats_v3_lrs_proto_rawDescOnce.Do(func() {
+ file_envoy_service_load_stats_v3_lrs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_load_stats_v3_lrs_proto_rawDescData)
+ })
+ return file_envoy_service_load_stats_v3_lrs_proto_rawDescData
+}
+
+var file_envoy_service_load_stats_v3_lrs_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_envoy_service_load_stats_v3_lrs_proto_goTypes = []interface{}{
+ (*LoadStatsRequest)(nil), // 0: envoy.service.load_stats.v3.LoadStatsRequest
+ (*LoadStatsResponse)(nil), // 1: envoy.service.load_stats.v3.LoadStatsResponse
+ (*v3.Node)(nil), // 2: envoy.config.core.v3.Node
+ (*v31.ClusterStats)(nil), // 3: envoy.config.endpoint.v3.ClusterStats
+ (*durationpb.Duration)(nil), // 4: google.protobuf.Duration
+}
+var file_envoy_service_load_stats_v3_lrs_proto_depIdxs = []int32{
+ 2, // 0: envoy.service.load_stats.v3.LoadStatsRequest.node:type_name -> envoy.config.core.v3.Node
+ 3, // 1: envoy.service.load_stats.v3.LoadStatsRequest.cluster_stats:type_name -> envoy.config.endpoint.v3.ClusterStats
+ 4, // 2: envoy.service.load_stats.v3.LoadStatsResponse.load_reporting_interval:type_name -> google.protobuf.Duration
+ 0, // 3: envoy.service.load_stats.v3.LoadReportingService.StreamLoadStats:input_type -> envoy.service.load_stats.v3.LoadStatsRequest
+ 1, // 4: envoy.service.load_stats.v3.LoadReportingService.StreamLoadStats:output_type -> envoy.service.load_stats.v3.LoadStatsResponse
+ 4, // [4:5] is the sub-list for method output_type
+ 3, // [3:4] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_envoy_service_load_stats_v3_lrs_proto_init() }
+func file_envoy_service_load_stats_v3_lrs_proto_init() {
+ if File_envoy_service_load_stats_v3_lrs_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_service_load_stats_v3_lrs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LoadStatsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_load_stats_v3_lrs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LoadStatsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_service_load_stats_v3_lrs_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_envoy_service_load_stats_v3_lrs_proto_goTypes,
+ DependencyIndexes: file_envoy_service_load_stats_v3_lrs_proto_depIdxs,
+ MessageInfos: file_envoy_service_load_stats_v3_lrs_proto_msgTypes,
+ }.Build()
+ File_envoy_service_load_stats_v3_lrs_proto = out.File
+ file_envoy_service_load_stats_v3_lrs_proto_rawDesc = nil
+ file_envoy_service_load_stats_v3_lrs_proto_goTypes = nil
+ file_envoy_service_load_stats_v3_lrs_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs.pb.validate.go
new file mode 100644
index 000000000..cf4e395c2
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs.pb.validate.go
@@ -0,0 +1,335 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/service/load_stats/v3/lrs.proto
+
+package load_statsv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on LoadStatsRequest with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *LoadStatsRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LoadStatsRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// LoadStatsRequestMultiError, or nil if none found.
+func (m *LoadStatsRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LoadStatsRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetNode()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LoadStatsRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LoadStatsRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LoadStatsRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetClusterStats() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LoadStatsRequestValidationError{
+ field: fmt.Sprintf("ClusterStats[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LoadStatsRequestValidationError{
+ field: fmt.Sprintf("ClusterStats[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LoadStatsRequestValidationError{
+ field: fmt.Sprintf("ClusterStats[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return LoadStatsRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// LoadStatsRequestMultiError is an error wrapping multiple validation errors
+// returned by LoadStatsRequest.ValidateAll() if the designated constraints
+// aren't met.
+type LoadStatsRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LoadStatsRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LoadStatsRequestMultiError) AllErrors() []error { return m }
+
+// LoadStatsRequestValidationError is the validation error returned by
+// LoadStatsRequest.Validate if the designated constraints aren't met.
+type LoadStatsRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LoadStatsRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LoadStatsRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LoadStatsRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LoadStatsRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LoadStatsRequestValidationError) ErrorName() string { return "LoadStatsRequestValidationError" }
+
+// Error satisfies the builtin error interface
+func (e LoadStatsRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sLoadStatsRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LoadStatsRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LoadStatsRequestValidationError{}
+
+// Validate checks the field values on LoadStatsResponse with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *LoadStatsResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on LoadStatsResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// LoadStatsResponseMultiError, or nil if none found.
+func (m *LoadStatsResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *LoadStatsResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for SendAllClusters
+
+ if all {
+ switch v := interface{}(m.GetLoadReportingInterval()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, LoadStatsResponseValidationError{
+ field: "LoadReportingInterval",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, LoadStatsResponseValidationError{
+ field: "LoadReportingInterval",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLoadReportingInterval()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return LoadStatsResponseValidationError{
+ field: "LoadReportingInterval",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for ReportEndpointGranularity
+
+ if len(errors) > 0 {
+ return LoadStatsResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// LoadStatsResponseMultiError is an error wrapping multiple validation errors
+// returned by LoadStatsResponse.ValidateAll() if the designated constraints
+// aren't met.
+type LoadStatsResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m LoadStatsResponseMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m LoadStatsResponseMultiError) AllErrors() []error { return m }
+
+// LoadStatsResponseValidationError is the validation error returned by
+// LoadStatsResponse.Validate if the designated constraints aren't met.
+type LoadStatsResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e LoadStatsResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e LoadStatsResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e LoadStatsResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e LoadStatsResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e LoadStatsResponseValidationError) ErrorName() string {
+ return "LoadStatsResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e LoadStatsResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sLoadStatsResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = LoadStatsResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = LoadStatsResponseValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs_grpc.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs_grpc.pb.go
new file mode 100644
index 000000000..4eb34c173
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs_grpc.pb.go
@@ -0,0 +1,197 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc v5.26.1
+// source: envoy/service/load_stats/v3/lrs.proto
+
+package load_statsv3
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ LoadReportingService_StreamLoadStats_FullMethodName = "/envoy.service.load_stats.v3.LoadReportingService/StreamLoadStats"
+)
+
+// LoadReportingServiceClient is the client API for LoadReportingService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type LoadReportingServiceClient interface {
+ // Advanced API to allow for multi-dimensional load balancing by remote
+ // server. For receiving LB assignments, the steps are:
+ // 1, The management server is configured with per cluster/zone/load metric
+ //
+ // capacity configuration. The capacity configuration definition is
+ // outside of the scope of this document.
+ // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
+ // to balance.
+ //
+ // Independently, Envoy will initiate a StreamLoadStats bidi stream with a
+ // management server:
+ // 1. Once a connection establishes, the management server publishes a
+ // LoadStatsResponse for all clusters it is interested in learning load
+ // stats about.
+ // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
+ // based on per-zone weights and/or per-instance weights (if specified)
+ // based on intra-zone LbPolicy. This information comes from the above
+ // {Stream,Fetch}Endpoints.
+ // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats.
+ // 4. Envoy aggregates load reports over the period of time given to it in
+ // LoadStatsResponse.load_reporting_interval. This includes aggregation
+ // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
+ // well as load metrics from upstream hosts.
+ // 5. When the timer of load_reporting_interval expires, Envoy sends new
+ // LoadStatsRequest filled with load reports for each cluster.
+ // 6. The management server uses the load reports from all reported Envoys
+ // from around the world, computes global assignment and prepares traffic
+ // assignment destined for each zone Envoys are located in. Goto 2.
+ StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error)
+}
+
+type loadReportingServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewLoadReportingServiceClient(cc grpc.ClientConnInterface) LoadReportingServiceClient {
+ return &loadReportingServiceClient{cc}
+}
+
+func (c *loadReportingServiceClient) StreamLoadStats(ctx context.Context, opts ...grpc.CallOption) (LoadReportingService_StreamLoadStatsClient, error) {
+ stream, err := c.cc.NewStream(ctx, &LoadReportingService_ServiceDesc.Streams[0], LoadReportingService_StreamLoadStats_FullMethodName, opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &loadReportingServiceStreamLoadStatsClient{stream}
+ return x, nil
+}
+
+type LoadReportingService_StreamLoadStatsClient interface {
+ Send(*LoadStatsRequest) error
+ Recv() (*LoadStatsResponse, error)
+ grpc.ClientStream
+}
+
+type loadReportingServiceStreamLoadStatsClient struct {
+ grpc.ClientStream
+}
+
+func (x *loadReportingServiceStreamLoadStatsClient) Send(m *LoadStatsRequest) error {
+ return x.ClientStream.SendMsg(m)
+}
+
+func (x *loadReportingServiceStreamLoadStatsClient) Recv() (*LoadStatsResponse, error) {
+ m := new(LoadStatsResponse)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+// LoadReportingServiceServer is the server API for LoadReportingService service.
+// All implementations should embed UnimplementedLoadReportingServiceServer
+// for forward compatibility
+type LoadReportingServiceServer interface {
+ // Advanced API to allow for multi-dimensional load balancing by remote
+ // server. For receiving LB assignments, the steps are:
+ // 1, The management server is configured with per cluster/zone/load metric
+ //
+ // capacity configuration. The capacity configuration definition is
+ // outside of the scope of this document.
+ // 2. Envoy issues a standard {Stream,Fetch}Endpoints request for the clusters
+ // to balance.
+ //
+ // Independently, Envoy will initiate a StreamLoadStats bidi stream with a
+ // management server:
+ // 1. Once a connection establishes, the management server publishes a
+ // LoadStatsResponse for all clusters it is interested in learning load
+ // stats about.
+ // 2. For each cluster, Envoy load balances incoming traffic to upstream hosts
+ // based on per-zone weights and/or per-instance weights (if specified)
+ // based on intra-zone LbPolicy. This information comes from the above
+ // {Stream,Fetch}Endpoints.
+ // 3. When upstream hosts reply, they optionally add header with ASCII representation of EndpointLoadMetricStats.
+ // 4. Envoy aggregates load reports over the period of time given to it in
+ // LoadStatsResponse.load_reporting_interval. This includes aggregation
+ // stats Envoy maintains by itself (total_requests, rpc_errors etc.) as
+ // well as load metrics from upstream hosts.
+ // 5. When the timer of load_reporting_interval expires, Envoy sends new
+ // LoadStatsRequest filled with load reports for each cluster.
+ // 6. The management server uses the load reports from all reported Envoys
+ // from around the world, computes global assignment and prepares traffic
+ // assignment destined for each zone Envoys are located in. Goto 2.
+ StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error
+}
+
+// UnimplementedLoadReportingServiceServer should be embedded to have forward compatible implementations.
+type UnimplementedLoadReportingServiceServer struct {
+}
+
+func (UnimplementedLoadReportingServiceServer) StreamLoadStats(LoadReportingService_StreamLoadStatsServer) error {
+ return status.Errorf(codes.Unimplemented, "method StreamLoadStats not implemented")
+}
+
+// UnsafeLoadReportingServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to LoadReportingServiceServer will
+// result in compilation errors.
+type UnsafeLoadReportingServiceServer interface {
+ mustEmbedUnimplementedLoadReportingServiceServer()
+}
+
+func RegisterLoadReportingServiceServer(s grpc.ServiceRegistrar, srv LoadReportingServiceServer) {
+ s.RegisterService(&LoadReportingService_ServiceDesc, srv)
+}
+
+func _LoadReportingService_StreamLoadStats_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(LoadReportingServiceServer).StreamLoadStats(&loadReportingServiceStreamLoadStatsServer{stream})
+}
+
+type LoadReportingService_StreamLoadStatsServer interface {
+ Send(*LoadStatsResponse) error
+ Recv() (*LoadStatsRequest, error)
+ grpc.ServerStream
+}
+
+type loadReportingServiceStreamLoadStatsServer struct {
+ grpc.ServerStream
+}
+
+func (x *loadReportingServiceStreamLoadStatsServer) Send(m *LoadStatsResponse) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+func (x *loadReportingServiceStreamLoadStatsServer) Recv() (*LoadStatsRequest, error) {
+ m := new(LoadStatsRequest)
+ if err := x.ServerStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+// LoadReportingService_ServiceDesc is the grpc.ServiceDesc for LoadReportingService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var LoadReportingService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "envoy.service.load_stats.v3.LoadReportingService",
+ HandlerType: (*LoadReportingServiceServer)(nil),
+ Methods: []grpc.MethodDesc{},
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "StreamLoadStats",
+ Handler: _LoadReportingService_StreamLoadStats_Handler,
+ ServerStreams: true,
+ ClientStreams: true,
+ },
+ },
+ Metadata: "envoy/service/load_stats/v3/lrs.proto",
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs_vtproto.pb.go
new file mode 100644
index 000000000..ca86ae774
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/load_stats/v3/lrs_vtproto.pb.go
@@ -0,0 +1,230 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/service/load_stats/v3/lrs.proto
+
+package load_statsv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *LoadStatsRequest) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LoadStatsRequest) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *LoadStatsRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ClusterStats) > 0 {
+ for iNdEx := len(m.ClusterStats) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.ClusterStats[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ClusterStats[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.Node != nil {
+ if vtmsg, ok := interface{}(m.Node).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Node)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LoadStatsResponse) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *LoadStatsResponse) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *LoadStatsResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.SendAllClusters {
+ i--
+ if m.SendAllClusters {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if m.ReportEndpointGranularity {
+ i--
+ if m.ReportEndpointGranularity {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.LoadReportingInterval != nil {
+ size, err := (*durationpb.Duration)(m.LoadReportingInterval).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Clusters) > 0 {
+ for iNdEx := len(m.Clusters) - 1; iNdEx >= 0; iNdEx-- {
+ i -= len(m.Clusters[iNdEx])
+ copy(dAtA[i:], m.Clusters[iNdEx])
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Clusters[iNdEx])))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *LoadStatsRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Node != nil {
+ if size, ok := interface{}(m.Node).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Node)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.ClusterStats) > 0 {
+ for _, e := range m.ClusterStats {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *LoadStatsResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Clusters) > 0 {
+ for _, s := range m.Clusters {
+ l = len(s)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.LoadReportingInterval != nil {
+ l = (*durationpb.Duration)(m.LoadReportingInterval).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ReportEndpointGranularity {
+ n += 2
+ }
+ if m.SendAllClusters {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds.pb.go
new file mode 100644
index 000000000..4635ca028
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds.pb.go
@@ -0,0 +1,985 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/service/status/v3/csds.proto
+
+package statusv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v32 "github.com/envoyproxy/go-control-plane/envoy/admin/v3"
+ _ "github.com/envoyproxy/go-control-plane/envoy/annotations"
+ v31 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3"
+ _ "google.golang.org/genproto/googleapis/api/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Status of a config from a management server view.
+type ConfigStatus int32
+
+const (
+ // Status info is not available/unknown.
+ ConfigStatus_UNKNOWN ConfigStatus = 0
+ // Management server has sent the config to client and received ACK.
+ ConfigStatus_SYNCED ConfigStatus = 1
+ // Config is not sent.
+ ConfigStatus_NOT_SENT ConfigStatus = 2
+ // Management server has sent the config to client but hasn’t received
+ // ACK/NACK.
+ ConfigStatus_STALE ConfigStatus = 3
+ // Management server has sent the config to client but received NACK. The
+ // attached config dump will be the latest config (the rejected one), since
+ // it is the persisted version in the management server.
+ ConfigStatus_ERROR ConfigStatus = 4
+)
+
+// Enum value maps for ConfigStatus.
+var (
+ ConfigStatus_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "SYNCED",
+ 2: "NOT_SENT",
+ 3: "STALE",
+ 4: "ERROR",
+ }
+ ConfigStatus_value = map[string]int32{
+ "UNKNOWN": 0,
+ "SYNCED": 1,
+ "NOT_SENT": 2,
+ "STALE": 3,
+ "ERROR": 4,
+ }
+)
+
+func (x ConfigStatus) Enum() *ConfigStatus {
+ p := new(ConfigStatus)
+ *p = x
+ return p
+}
+
+func (x ConfigStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ConfigStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_service_status_v3_csds_proto_enumTypes[0].Descriptor()
+}
+
+func (ConfigStatus) Type() protoreflect.EnumType {
+ return &file_envoy_service_status_v3_csds_proto_enumTypes[0]
+}
+
+func (x ConfigStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ConfigStatus.Descriptor instead.
+func (ConfigStatus) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{0}
+}
+
+// Config status from a client-side view.
+type ClientConfigStatus int32
+
+const (
+ // Config status is not available/unknown.
+ ClientConfigStatus_CLIENT_UNKNOWN ClientConfigStatus = 0
+ // Client requested the config but hasn't received any config from management
+ // server yet.
+ ClientConfigStatus_CLIENT_REQUESTED ClientConfigStatus = 1
+ // Client received the config and replied with ACK.
+ ClientConfigStatus_CLIENT_ACKED ClientConfigStatus = 2
+ // Client received the config and replied with NACK. Notably, the attached
+ // config dump is not the NACKed version, but the most recent accepted one. If
+ // no config is accepted yet, the attached config dump will be empty.
+ ClientConfigStatus_CLIENT_NACKED ClientConfigStatus = 3
+)
+
+// Enum value maps for ClientConfigStatus.
+var (
+ ClientConfigStatus_name = map[int32]string{
+ 0: "CLIENT_UNKNOWN",
+ 1: "CLIENT_REQUESTED",
+ 2: "CLIENT_ACKED",
+ 3: "CLIENT_NACKED",
+ }
+ ClientConfigStatus_value = map[string]int32{
+ "CLIENT_UNKNOWN": 0,
+ "CLIENT_REQUESTED": 1,
+ "CLIENT_ACKED": 2,
+ "CLIENT_NACKED": 3,
+ }
+)
+
+func (x ClientConfigStatus) Enum() *ClientConfigStatus {
+ p := new(ClientConfigStatus)
+ *p = x
+ return p
+}
+
+func (x ClientConfigStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ClientConfigStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_service_status_v3_csds_proto_enumTypes[1].Descriptor()
+}
+
+func (ClientConfigStatus) Type() protoreflect.EnumType {
+ return &file_envoy_service_status_v3_csds_proto_enumTypes[1]
+}
+
+func (x ClientConfigStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ClientConfigStatus.Descriptor instead.
+func (ClientConfigStatus) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{1}
+}
+
+// Request for client status of clients identified by a list of NodeMatchers.
+type ClientStatusRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Management server can use these match criteria to identify clients.
+ // The match follows OR semantics.
+ NodeMatchers []*v3.NodeMatcher `protobuf:"bytes,1,rep,name=node_matchers,json=nodeMatchers,proto3" json:"node_matchers,omitempty"`
+ // The node making the csds request.
+ Node *v31.Node `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"`
+ // If true, the server will not include the resource contents in the response
+ // (i.e., the generic_xds_configs.xds_config field will not be populated).
+ // [#not-implemented-hide:]
+ ExcludeResourceContents bool `protobuf:"varint,3,opt,name=exclude_resource_contents,json=excludeResourceContents,proto3" json:"exclude_resource_contents,omitempty"`
+}
+
+func (x *ClientStatusRequest) Reset() {
+ *x = ClientStatusRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ClientStatusRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClientStatusRequest) ProtoMessage() {}
+
+func (x *ClientStatusRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ClientStatusRequest.ProtoReflect.Descriptor instead.
+func (*ClientStatusRequest) Descriptor() ([]byte, []int) {
+ return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ClientStatusRequest) GetNodeMatchers() []*v3.NodeMatcher {
+ if x != nil {
+ return x.NodeMatchers
+ }
+ return nil
+}
+
+func (x *ClientStatusRequest) GetNode() *v31.Node {
+ if x != nil {
+ return x.Node
+ }
+ return nil
+}
+
+func (x *ClientStatusRequest) GetExcludeResourceContents() bool {
+ if x != nil {
+ return x.ExcludeResourceContents
+ }
+ return false
+}
+
+// Detailed config (per xDS) with status.
+// [#next-free-field: 8]
+type PerXdsConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Config status generated by management servers. Will not be present if the
+ // CSDS server is an xDS client.
+ Status ConfigStatus `protobuf:"varint,1,opt,name=status,proto3,enum=envoy.service.status.v3.ConfigStatus" json:"status,omitempty"`
+ // Client config status is populated by xDS clients. Will not be present if
+ // the CSDS server is an xDS server. No matter what the client config status
+ // is, xDS clients should always dump the most recent accepted xDS config.
+ //
+ // .. attention::
+ //
+ // This field is deprecated. Use :ref:`ClientResourceStatus
+ // ` for per-resource
+ // config status instead.
+ //
+ // Deprecated: Marked as deprecated in envoy/service/status/v3/csds.proto.
+ ClientStatus ClientConfigStatus `protobuf:"varint,7,opt,name=client_status,json=clientStatus,proto3,enum=envoy.service.status.v3.ClientConfigStatus" json:"client_status,omitempty"`
+ // Types that are assignable to PerXdsConfig:
+ //
+ // *PerXdsConfig_ListenerConfig
+ // *PerXdsConfig_ClusterConfig
+ // *PerXdsConfig_RouteConfig
+ // *PerXdsConfig_ScopedRouteConfig
+ // *PerXdsConfig_EndpointConfig
+ PerXdsConfig isPerXdsConfig_PerXdsConfig `protobuf_oneof:"per_xds_config"`
+}
+
+func (x *PerXdsConfig) Reset() {
+ *x = PerXdsConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PerXdsConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PerXdsConfig) ProtoMessage() {}
+
+func (x *PerXdsConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PerXdsConfig.ProtoReflect.Descriptor instead.
+func (*PerXdsConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *PerXdsConfig) GetStatus() ConfigStatus {
+ if x != nil {
+ return x.Status
+ }
+ return ConfigStatus_UNKNOWN
+}
+
+// Deprecated: Marked as deprecated in envoy/service/status/v3/csds.proto.
+func (x *PerXdsConfig) GetClientStatus() ClientConfigStatus {
+ if x != nil {
+ return x.ClientStatus
+ }
+ return ClientConfigStatus_CLIENT_UNKNOWN
+}
+
+func (m *PerXdsConfig) GetPerXdsConfig() isPerXdsConfig_PerXdsConfig {
+ if m != nil {
+ return m.PerXdsConfig
+ }
+ return nil
+}
+
+func (x *PerXdsConfig) GetListenerConfig() *v32.ListenersConfigDump {
+ if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_ListenerConfig); ok {
+ return x.ListenerConfig
+ }
+ return nil
+}
+
+func (x *PerXdsConfig) GetClusterConfig() *v32.ClustersConfigDump {
+ if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_ClusterConfig); ok {
+ return x.ClusterConfig
+ }
+ return nil
+}
+
+func (x *PerXdsConfig) GetRouteConfig() *v32.RoutesConfigDump {
+ if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_RouteConfig); ok {
+ return x.RouteConfig
+ }
+ return nil
+}
+
+func (x *PerXdsConfig) GetScopedRouteConfig() *v32.ScopedRoutesConfigDump {
+ if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_ScopedRouteConfig); ok {
+ return x.ScopedRouteConfig
+ }
+ return nil
+}
+
+func (x *PerXdsConfig) GetEndpointConfig() *v32.EndpointsConfigDump {
+ if x, ok := x.GetPerXdsConfig().(*PerXdsConfig_EndpointConfig); ok {
+ return x.EndpointConfig
+ }
+ return nil
+}
+
+type isPerXdsConfig_PerXdsConfig interface {
+ isPerXdsConfig_PerXdsConfig()
+}
+
+type PerXdsConfig_ListenerConfig struct {
+ ListenerConfig *v32.ListenersConfigDump `protobuf:"bytes,2,opt,name=listener_config,json=listenerConfig,proto3,oneof"`
+}
+
+type PerXdsConfig_ClusterConfig struct {
+ ClusterConfig *v32.ClustersConfigDump `protobuf:"bytes,3,opt,name=cluster_config,json=clusterConfig,proto3,oneof"`
+}
+
+type PerXdsConfig_RouteConfig struct {
+ RouteConfig *v32.RoutesConfigDump `protobuf:"bytes,4,opt,name=route_config,json=routeConfig,proto3,oneof"`
+}
+
+type PerXdsConfig_ScopedRouteConfig struct {
+ ScopedRouteConfig *v32.ScopedRoutesConfigDump `protobuf:"bytes,5,opt,name=scoped_route_config,json=scopedRouteConfig,proto3,oneof"`
+}
+
+type PerXdsConfig_EndpointConfig struct {
+ EndpointConfig *v32.EndpointsConfigDump `protobuf:"bytes,6,opt,name=endpoint_config,json=endpointConfig,proto3,oneof"`
+}
+
+func (*PerXdsConfig_ListenerConfig) isPerXdsConfig_PerXdsConfig() {}
+
+func (*PerXdsConfig_ClusterConfig) isPerXdsConfig_PerXdsConfig() {}
+
+func (*PerXdsConfig_RouteConfig) isPerXdsConfig_PerXdsConfig() {}
+
+func (*PerXdsConfig_ScopedRouteConfig) isPerXdsConfig_PerXdsConfig() {}
+
+func (*PerXdsConfig_EndpointConfig) isPerXdsConfig_PerXdsConfig() {}
+
+// All xds configs for a particular client.
+type ClientConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Node for a particular client.
+ Node *v31.Node `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"`
+ // This field is deprecated in favor of generic_xds_configs which is
+ // much simpler and uniform in structure.
+ //
+ // Deprecated: Marked as deprecated in envoy/service/status/v3/csds.proto.
+ XdsConfig []*PerXdsConfig `protobuf:"bytes,2,rep,name=xds_config,json=xdsConfig,proto3" json:"xds_config,omitempty"`
+ // Represents generic xDS config and the exact config structure depends on
+ // the type URL (like Cluster if it is CDS)
+ GenericXdsConfigs []*ClientConfig_GenericXdsConfig `protobuf:"bytes,3,rep,name=generic_xds_configs,json=genericXdsConfigs,proto3" json:"generic_xds_configs,omitempty"`
+ // For xDS clients, the scope in which the data is used.
+ // For example, gRPC indicates the data plane target or that the data is
+ // associated with gRPC server(s).
+ ClientScope string `protobuf:"bytes,4,opt,name=client_scope,json=clientScope,proto3" json:"client_scope,omitempty"`
+}
+
+func (x *ClientConfig) Reset() {
+ *x = ClientConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ClientConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClientConfig) ProtoMessage() {}
+
+func (x *ClientConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ClientConfig.ProtoReflect.Descriptor instead.
+func (*ClientConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ClientConfig) GetNode() *v31.Node {
+ if x != nil {
+ return x.Node
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/service/status/v3/csds.proto.
+func (x *ClientConfig) GetXdsConfig() []*PerXdsConfig {
+ if x != nil {
+ return x.XdsConfig
+ }
+ return nil
+}
+
+func (x *ClientConfig) GetGenericXdsConfigs() []*ClientConfig_GenericXdsConfig {
+ if x != nil {
+ return x.GenericXdsConfigs
+ }
+ return nil
+}
+
+func (x *ClientConfig) GetClientScope() string {
+ if x != nil {
+ return x.ClientScope
+ }
+ return ""
+}
+
+type ClientStatusResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Client configs for the clients specified in the ClientStatusRequest.
+ Config []*ClientConfig `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"`
+}
+
+func (x *ClientStatusResponse) Reset() {
+ *x = ClientStatusResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ClientStatusResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClientStatusResponse) ProtoMessage() {}
+
+func (x *ClientStatusResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ClientStatusResponse.ProtoReflect.Descriptor instead.
+func (*ClientStatusResponse) Descriptor() ([]byte, []int) {
+ return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ClientStatusResponse) GetConfig() []*ClientConfig {
+ if x != nil {
+ return x.Config
+ }
+ return nil
+}
+
+// GenericXdsConfig is used to specify the config status and the dump
+// of any xDS resource identified by their type URL. It is the generalized
+// version of the now deprecated ListenersConfigDump, ClustersConfigDump etc
+// [#next-free-field: 10]
+type ClientConfig_GenericXdsConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Type_url represents the fully qualified name of xDS resource type
+ // like envoy.v3.Cluster, envoy.v3.ClusterLoadAssignment etc.
+ TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
+ // Name of the xDS resource
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // This is the :ref:`version_info `
+ // in the last processed xDS discovery response. If there are only
+ // static bootstrap listeners, this field will be ""
+ VersionInfo string `protobuf:"bytes,3,opt,name=version_info,json=versionInfo,proto3" json:"version_info,omitempty"`
+ // The xDS resource config. Actual content depends on the type
+ XdsConfig *anypb.Any `protobuf:"bytes,4,opt,name=xds_config,json=xdsConfig,proto3" json:"xds_config,omitempty"`
+ // Timestamp when the xDS resource was last updated
+ LastUpdated *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_updated,json=lastUpdated,proto3" json:"last_updated,omitempty"`
+ // Per xDS resource config status. It is generated by management servers.
+ // It will not be present if the CSDS server is an xDS client.
+ ConfigStatus ConfigStatus `protobuf:"varint,6,opt,name=config_status,json=configStatus,proto3,enum=envoy.service.status.v3.ConfigStatus" json:"config_status,omitempty"`
+ // Per xDS resource status from the view of a xDS client
+ ClientStatus v32.ClientResourceStatus `protobuf:"varint,7,opt,name=client_status,json=clientStatus,proto3,enum=envoy.admin.v3.ClientResourceStatus" json:"client_status,omitempty"`
+ // Set if the last update failed, cleared after the next successful
+ // update. The *error_state* field contains the rejected version of
+ // this particular resource along with the reason and timestamp. For
+ // successfully updated or acknowledged resource, this field should
+ // be empty.
+ // [#not-implemented-hide:]
+ ErrorState *v32.UpdateFailureState `protobuf:"bytes,8,opt,name=error_state,json=errorState,proto3" json:"error_state,omitempty"`
+ // Is static resource is true if it is specified in the config supplied
+ // through the file at the startup.
+ IsStaticResource bool `protobuf:"varint,9,opt,name=is_static_resource,json=isStaticResource,proto3" json:"is_static_resource,omitempty"`
+}
+
+func (x *ClientConfig_GenericXdsConfig) Reset() {
+ *x = ClientConfig_GenericXdsConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ClientConfig_GenericXdsConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ClientConfig_GenericXdsConfig) ProtoMessage() {}
+
+func (x *ClientConfig_GenericXdsConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_service_status_v3_csds_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ClientConfig_GenericXdsConfig.ProtoReflect.Descriptor instead.
+func (*ClientConfig_GenericXdsConfig) Descriptor() ([]byte, []int) {
+ return file_envoy_service_status_v3_csds_proto_rawDescGZIP(), []int{2, 0}
+}
+
+func (x *ClientConfig_GenericXdsConfig) GetTypeUrl() string {
+ if x != nil {
+ return x.TypeUrl
+ }
+ return ""
+}
+
+func (x *ClientConfig_GenericXdsConfig) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ClientConfig_GenericXdsConfig) GetVersionInfo() string {
+ if x != nil {
+ return x.VersionInfo
+ }
+ return ""
+}
+
+func (x *ClientConfig_GenericXdsConfig) GetXdsConfig() *anypb.Any {
+ if x != nil {
+ return x.XdsConfig
+ }
+ return nil
+}
+
+func (x *ClientConfig_GenericXdsConfig) GetLastUpdated() *timestamppb.Timestamp {
+ if x != nil {
+ return x.LastUpdated
+ }
+ return nil
+}
+
+func (x *ClientConfig_GenericXdsConfig) GetConfigStatus() ConfigStatus {
+ if x != nil {
+ return x.ConfigStatus
+ }
+ return ConfigStatus_UNKNOWN
+}
+
+func (x *ClientConfig_GenericXdsConfig) GetClientStatus() v32.ClientResourceStatus {
+ if x != nil {
+ return x.ClientStatus
+ }
+ return v32.ClientResourceStatus(0)
+}
+
+func (x *ClientConfig_GenericXdsConfig) GetErrorState() *v32.UpdateFailureState {
+ if x != nil {
+ return x.ErrorState
+ }
+ return nil
+}
+
+func (x *ClientConfig_GenericXdsConfig) GetIsStaticResource() bool {
+ if x != nil {
+ return x.IsStaticResource
+ }
+ return false
+}
+
+var File_envoy_service_status_v3_csds_proto protoreflect.FileDescriptor
+
+var file_envoy_service_status_v3_csds_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x73, 0x64, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x17, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x1a, 0x27, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x62, 0x61, 0x73,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74,
+ 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6e,
+ 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61,
+ 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e,
+ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfe, 0x01, 0x0a, 0x13, 0x43,
+ 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76,
+ 0x33, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x0c, 0x6e,
+ 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x04, 0x6e,
+ 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33,
+ 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x19, 0x65,
+ 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17,
+ 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43,
+ 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74,
+ 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74,
+ 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xf9, 0x04, 0x0a, 0x0c,
+ 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x06,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x5d, 0x0a, 0x0d, 0x63,
+ 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42,
+ 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, 0x0c, 0x63, 0x6c,
+ 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x4e, 0x0a, 0x0f, 0x6c, 0x69,
+ 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69,
+ 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x65, 0x72, 0x73, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x6c, 0x69, 0x73, 0x74,
+ 0x65, 0x6e, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4b, 0x0a, 0x0e, 0x63, 0x6c,
+ 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
+ 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65,
+ 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x45, 0x0a, 0x0c, 0x72, 0x6f, 0x75, 0x74, 0x65,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x52,
+ 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48,
+ 0x00, 0x52, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x58,
+ 0x0a, 0x13, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x63, 0x6f,
+ 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x44,
+ 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x11, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x52, 0x6f, 0x75,
+ 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x0f, 0x65, 0x6e, 0x64, 0x70,
+ 0x6f, 0x69, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
+ 0x76, 0x33, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x44, 0x75, 0x6d, 0x70, 0x48, 0x00, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69,
+ 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26, 0x0a,
+ 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x10, 0x0a, 0x0e, 0x70, 0x65, 0x72, 0x5f, 0x78, 0x64, 0x73,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0xae, 0x06, 0x0a, 0x0c, 0x43, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2e, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x4e, 0x6f,
+ 0x64, 0x65, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x12, 0x51, 0x0a, 0x0a, 0x78, 0x64, 0x73, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x42, 0x0b, 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01,
+ 0x52, 0x09, 0x78, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x66, 0x0a, 0x13, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
+ 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e,
+ 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x52, 0x11, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x63,
+ 0x6f, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e,
+ 0x74, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x1a, 0xe2, 0x03, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72,
+ 0x69, 0x63, 0x58, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x74,
+ 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74,
+ 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a,
+ 0x0a, 0x78, 0x64, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x78, 0x64, 0x73, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x12, 0x3d, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
+ 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x64, 0x12, 0x4a, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
+ 0x76, 0x33, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
+ 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x49, 0x0a,
+ 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d,
+ 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x43, 0x0a, 0x0b, 0x65, 0x72, 0x72, 0x6f,
+ 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x53, 0x74, 0x61, 0x74,
+ 0x65, 0x52, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a,
+ 0x12, 0x69, 0x73, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x53, 0x74, 0x61,
+ 0x74, 0x69, 0x63, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x2b, 0x9a, 0xc5, 0x88,
+ 0x1e, 0x26, 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x8a, 0x01, 0x0a, 0x14, 0x43, 0x6c, 0x69,
+ 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x3a, 0x33, 0x9a, 0xc5, 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x32,
+ 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x4b, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
+ 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x59, 0x4e, 0x43, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0c,
+ 0x0a, 0x08, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05,
+ 0x53, 0x54, 0x41, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52,
+ 0x10, 0x04, 0x2a, 0x63, 0x0a, 0x12, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4c, 0x49, 0x45,
+ 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10,
+ 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x45, 0x44,
+ 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x41, 0x43, 0x4b,
+ 0x45, 0x44, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x4e,
+ 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x03, 0x32, 0xb2, 0x02, 0x0a, 0x1c, 0x43, 0x6c, 0x69, 0x65,
+ 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
+ 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65,
+ 0x61, 0x6d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30,
+ 0x01, 0x12, 0x98, 0x01, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, 0x43, 0x6c, 0x69, 0x65, 0x6e,
+ 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76,
+ 0x33, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x2e,
+ 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22,
+ 0x1b, 0x2f, 0x76, 0x33, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x63,
+ 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x85, 0x01, 0xba,
+ 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x25, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x33, 0x42, 0x09,
+ 0x43, 0x73, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f,
+ 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c,
+ 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x76, 0x33, 0x3b, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_service_status_v3_csds_proto_rawDescOnce sync.Once
+ file_envoy_service_status_v3_csds_proto_rawDescData = file_envoy_service_status_v3_csds_proto_rawDesc
+)
+
+func file_envoy_service_status_v3_csds_proto_rawDescGZIP() []byte {
+ file_envoy_service_status_v3_csds_proto_rawDescOnce.Do(func() {
+ file_envoy_service_status_v3_csds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_status_v3_csds_proto_rawDescData)
+ })
+ return file_envoy_service_status_v3_csds_proto_rawDescData
+}
+
+var file_envoy_service_status_v3_csds_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_envoy_service_status_v3_csds_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_envoy_service_status_v3_csds_proto_goTypes = []interface{}{
+ (ConfigStatus)(0), // 0: envoy.service.status.v3.ConfigStatus
+ (ClientConfigStatus)(0), // 1: envoy.service.status.v3.ClientConfigStatus
+ (*ClientStatusRequest)(nil), // 2: envoy.service.status.v3.ClientStatusRequest
+ (*PerXdsConfig)(nil), // 3: envoy.service.status.v3.PerXdsConfig
+ (*ClientConfig)(nil), // 4: envoy.service.status.v3.ClientConfig
+ (*ClientStatusResponse)(nil), // 5: envoy.service.status.v3.ClientStatusResponse
+ (*ClientConfig_GenericXdsConfig)(nil), // 6: envoy.service.status.v3.ClientConfig.GenericXdsConfig
+ (*v3.NodeMatcher)(nil), // 7: envoy.type.matcher.v3.NodeMatcher
+ (*v31.Node)(nil), // 8: envoy.config.core.v3.Node
+ (*v32.ListenersConfigDump)(nil), // 9: envoy.admin.v3.ListenersConfigDump
+ (*v32.ClustersConfigDump)(nil), // 10: envoy.admin.v3.ClustersConfigDump
+ (*v32.RoutesConfigDump)(nil), // 11: envoy.admin.v3.RoutesConfigDump
+ (*v32.ScopedRoutesConfigDump)(nil), // 12: envoy.admin.v3.ScopedRoutesConfigDump
+ (*v32.EndpointsConfigDump)(nil), // 13: envoy.admin.v3.EndpointsConfigDump
+ (*anypb.Any)(nil), // 14: google.protobuf.Any
+ (*timestamppb.Timestamp)(nil), // 15: google.protobuf.Timestamp
+ (v32.ClientResourceStatus)(0), // 16: envoy.admin.v3.ClientResourceStatus
+ (*v32.UpdateFailureState)(nil), // 17: envoy.admin.v3.UpdateFailureState
+}
+var file_envoy_service_status_v3_csds_proto_depIdxs = []int32{
+ 7, // 0: envoy.service.status.v3.ClientStatusRequest.node_matchers:type_name -> envoy.type.matcher.v3.NodeMatcher
+ 8, // 1: envoy.service.status.v3.ClientStatusRequest.node:type_name -> envoy.config.core.v3.Node
+ 0, // 2: envoy.service.status.v3.PerXdsConfig.status:type_name -> envoy.service.status.v3.ConfigStatus
+ 1, // 3: envoy.service.status.v3.PerXdsConfig.client_status:type_name -> envoy.service.status.v3.ClientConfigStatus
+ 9, // 4: envoy.service.status.v3.PerXdsConfig.listener_config:type_name -> envoy.admin.v3.ListenersConfigDump
+ 10, // 5: envoy.service.status.v3.PerXdsConfig.cluster_config:type_name -> envoy.admin.v3.ClustersConfigDump
+ 11, // 6: envoy.service.status.v3.PerXdsConfig.route_config:type_name -> envoy.admin.v3.RoutesConfigDump
+ 12, // 7: envoy.service.status.v3.PerXdsConfig.scoped_route_config:type_name -> envoy.admin.v3.ScopedRoutesConfigDump
+ 13, // 8: envoy.service.status.v3.PerXdsConfig.endpoint_config:type_name -> envoy.admin.v3.EndpointsConfigDump
+ 8, // 9: envoy.service.status.v3.ClientConfig.node:type_name -> envoy.config.core.v3.Node
+ 3, // 10: envoy.service.status.v3.ClientConfig.xds_config:type_name -> envoy.service.status.v3.PerXdsConfig
+ 6, // 11: envoy.service.status.v3.ClientConfig.generic_xds_configs:type_name -> envoy.service.status.v3.ClientConfig.GenericXdsConfig
+ 4, // 12: envoy.service.status.v3.ClientStatusResponse.config:type_name -> envoy.service.status.v3.ClientConfig
+ 14, // 13: envoy.service.status.v3.ClientConfig.GenericXdsConfig.xds_config:type_name -> google.protobuf.Any
+ 15, // 14: envoy.service.status.v3.ClientConfig.GenericXdsConfig.last_updated:type_name -> google.protobuf.Timestamp
+ 0, // 15: envoy.service.status.v3.ClientConfig.GenericXdsConfig.config_status:type_name -> envoy.service.status.v3.ConfigStatus
+ 16, // 16: envoy.service.status.v3.ClientConfig.GenericXdsConfig.client_status:type_name -> envoy.admin.v3.ClientResourceStatus
+ 17, // 17: envoy.service.status.v3.ClientConfig.GenericXdsConfig.error_state:type_name -> envoy.admin.v3.UpdateFailureState
+ 2, // 18: envoy.service.status.v3.ClientStatusDiscoveryService.StreamClientStatus:input_type -> envoy.service.status.v3.ClientStatusRequest
+ 2, // 19: envoy.service.status.v3.ClientStatusDiscoveryService.FetchClientStatus:input_type -> envoy.service.status.v3.ClientStatusRequest
+ 5, // 20: envoy.service.status.v3.ClientStatusDiscoveryService.StreamClientStatus:output_type -> envoy.service.status.v3.ClientStatusResponse
+ 5, // 21: envoy.service.status.v3.ClientStatusDiscoveryService.FetchClientStatus:output_type -> envoy.service.status.v3.ClientStatusResponse
+ 20, // [20:22] is the sub-list for method output_type
+ 18, // [18:20] is the sub-list for method input_type
+ 18, // [18:18] is the sub-list for extension type_name
+ 18, // [18:18] is the sub-list for extension extendee
+ 0, // [0:18] is the sub-list for field type_name
+}
+
+func init() { file_envoy_service_status_v3_csds_proto_init() }
+func file_envoy_service_status_v3_csds_proto_init() {
+ if File_envoy_service_status_v3_csds_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_service_status_v3_csds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ClientStatusRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_status_v3_csds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PerXdsConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_status_v3_csds_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ClientConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_status_v3_csds_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ClientStatusResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_service_status_v3_csds_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ClientConfig_GenericXdsConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_service_status_v3_csds_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*PerXdsConfig_ListenerConfig)(nil),
+ (*PerXdsConfig_ClusterConfig)(nil),
+ (*PerXdsConfig_RouteConfig)(nil),
+ (*PerXdsConfig_ScopedRouteConfig)(nil),
+ (*PerXdsConfig_EndpointConfig)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_service_status_v3_csds_proto_rawDesc,
+ NumEnums: 2,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_envoy_service_status_v3_csds_proto_goTypes,
+ DependencyIndexes: file_envoy_service_status_v3_csds_proto_depIdxs,
+ EnumInfos: file_envoy_service_status_v3_csds_proto_enumTypes,
+ MessageInfos: file_envoy_service_status_v3_csds_proto_msgTypes,
+ }.Build()
+ File_envoy_service_status_v3_csds_proto = out.File
+ file_envoy_service_status_v3_csds_proto_rawDesc = nil
+ file_envoy_service_status_v3_csds_proto_goTypes = nil
+ file_envoy_service_status_v3_csds_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds.pb.validate.go
new file mode 100644
index 000000000..d27eee646
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds.pb.validate.go
@@ -0,0 +1,1057 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/service/status/v3/csds.proto
+
+package statusv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+
+ v3 "github.com/envoyproxy/go-control-plane/envoy/admin/v3"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+
+ _ = v3.ClientResourceStatus(0)
+)
+
+// Validate checks the field values on ClientStatusRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ClientStatusRequest) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ClientStatusRequest with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ClientStatusRequestMultiError, or nil if none found.
+func (m *ClientStatusRequest) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ClientStatusRequest) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetNodeMatchers() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientStatusRequestValidationError{
+ field: fmt.Sprintf("NodeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientStatusRequestValidationError{
+ field: fmt.Sprintf("NodeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientStatusRequestValidationError{
+ field: fmt.Sprintf("NodeMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if all {
+ switch v := interface{}(m.GetNode()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientStatusRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientStatusRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientStatusRequestValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for ExcludeResourceContents
+
+ if len(errors) > 0 {
+ return ClientStatusRequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// ClientStatusRequestMultiError is an error wrapping multiple validation
+// errors returned by ClientStatusRequest.ValidateAll() if the designated
+// constraints aren't met.
+type ClientStatusRequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ClientStatusRequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ClientStatusRequestMultiError) AllErrors() []error { return m }
+
+// ClientStatusRequestValidationError is the validation error returned by
+// ClientStatusRequest.Validate if the designated constraints aren't met.
+type ClientStatusRequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ClientStatusRequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ClientStatusRequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ClientStatusRequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ClientStatusRequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ClientStatusRequestValidationError) ErrorName() string {
+ return "ClientStatusRequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ClientStatusRequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sClientStatusRequest.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ClientStatusRequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ClientStatusRequestValidationError{}
+
+// Validate checks the field values on PerXdsConfig with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *PerXdsConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on PerXdsConfig with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in PerXdsConfigMultiError, or
+// nil if none found.
+func (m *PerXdsConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *PerXdsConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Status
+
+ // no validation rules for ClientStatus
+
+ switch v := m.PerXdsConfig.(type) {
+ case *PerXdsConfig_ListenerConfig:
+ if v == nil {
+ err := PerXdsConfigValidationError{
+ field: "PerXdsConfig",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetListenerConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "ListenerConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "ListenerConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetListenerConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PerXdsConfigValidationError{
+ field: "ListenerConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *PerXdsConfig_ClusterConfig:
+ if v == nil {
+ err := PerXdsConfigValidationError{
+ field: "PerXdsConfig",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetClusterConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "ClusterConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "ClusterConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetClusterConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PerXdsConfigValidationError{
+ field: "ClusterConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *PerXdsConfig_RouteConfig:
+ if v == nil {
+ err := PerXdsConfigValidationError{
+ field: "PerXdsConfig",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetRouteConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "RouteConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "RouteConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRouteConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PerXdsConfigValidationError{
+ field: "RouteConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *PerXdsConfig_ScopedRouteConfig:
+ if v == nil {
+ err := PerXdsConfigValidationError{
+ field: "PerXdsConfig",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetScopedRouteConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "ScopedRouteConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "ScopedRouteConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetScopedRouteConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PerXdsConfigValidationError{
+ field: "ScopedRouteConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *PerXdsConfig_EndpointConfig:
+ if v == nil {
+ err := PerXdsConfigValidationError{
+ field: "PerXdsConfig",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetEndpointConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "EndpointConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PerXdsConfigValidationError{
+ field: "EndpointConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEndpointConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PerXdsConfigValidationError{
+ field: "EndpointConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return PerXdsConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// PerXdsConfigMultiError is an error wrapping multiple validation errors
+// returned by PerXdsConfig.ValidateAll() if the designated constraints aren't met.
+type PerXdsConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PerXdsConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PerXdsConfigMultiError) AllErrors() []error { return m }
+
+// PerXdsConfigValidationError is the validation error returned by
+// PerXdsConfig.Validate if the designated constraints aren't met.
+type PerXdsConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PerXdsConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PerXdsConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PerXdsConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PerXdsConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PerXdsConfigValidationError) ErrorName() string { return "PerXdsConfigValidationError" }
+
+// Error satisfies the builtin error interface
+func (e PerXdsConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sPerXdsConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PerXdsConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PerXdsConfigValidationError{}
+
+// Validate checks the field values on ClientConfig with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ClientConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ClientConfig with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ClientConfigMultiError, or
+// nil if none found.
+func (m *ClientConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ClientConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetNode()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientConfigValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientConfigValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNode()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientConfigValidationError{
+ field: "Node",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetXdsConfig() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientConfigValidationError{
+ field: fmt.Sprintf("XdsConfig[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientConfigValidationError{
+ field: fmt.Sprintf("XdsConfig[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientConfigValidationError{
+ field: fmt.Sprintf("XdsConfig[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ for idx, item := range m.GetGenericXdsConfigs() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientConfigValidationError{
+ field: fmt.Sprintf("GenericXdsConfigs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientConfigValidationError{
+ field: fmt.Sprintf("GenericXdsConfigs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientConfigValidationError{
+ field: fmt.Sprintf("GenericXdsConfigs[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ // no validation rules for ClientScope
+
+ if len(errors) > 0 {
+ return ClientConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// ClientConfigMultiError is an error wrapping multiple validation errors
+// returned by ClientConfig.ValidateAll() if the designated constraints aren't met.
+type ClientConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ClientConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ClientConfigMultiError) AllErrors() []error { return m }
+
+// ClientConfigValidationError is the validation error returned by
+// ClientConfig.Validate if the designated constraints aren't met.
+type ClientConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ClientConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ClientConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ClientConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ClientConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ClientConfigValidationError) ErrorName() string { return "ClientConfigValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ClientConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sClientConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ClientConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ClientConfigValidationError{}
+
+// Validate checks the field values on ClientStatusResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ClientStatusResponse) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ClientStatusResponse with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ClientStatusResponseMultiError, or nil if none found.
+func (m *ClientStatusResponse) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ClientStatusResponse) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetConfig() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientStatusResponseValidationError{
+ field: fmt.Sprintf("Config[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientStatusResponseValidationError{
+ field: fmt.Sprintf("Config[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientStatusResponseValidationError{
+ field: fmt.Sprintf("Config[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ClientStatusResponseMultiError(errors)
+ }
+
+ return nil
+}
+
+// ClientStatusResponseMultiError is an error wrapping multiple validation
+// errors returned by ClientStatusResponse.ValidateAll() if the designated
+// constraints aren't met.
+type ClientStatusResponseMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ClientStatusResponseMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ClientStatusResponseMultiError) AllErrors() []error { return m }
+
+// ClientStatusResponseValidationError is the validation error returned by
+// ClientStatusResponse.Validate if the designated constraints aren't met.
+type ClientStatusResponseValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ClientStatusResponseValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ClientStatusResponseValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ClientStatusResponseValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ClientStatusResponseValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ClientStatusResponseValidationError) ErrorName() string {
+ return "ClientStatusResponseValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ClientStatusResponseValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sClientStatusResponse.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ClientStatusResponseValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ClientStatusResponseValidationError{}
+
+// Validate checks the field values on ClientConfig_GenericXdsConfig with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ClientConfig_GenericXdsConfig) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ClientConfig_GenericXdsConfig with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// ClientConfig_GenericXdsConfigMultiError, or nil if none found.
+func (m *ClientConfig_GenericXdsConfig) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ClientConfig_GenericXdsConfig) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for TypeUrl
+
+ // no validation rules for Name
+
+ // no validation rules for VersionInfo
+
+ if all {
+ switch v := interface{}(m.GetXdsConfig()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientConfig_GenericXdsConfigValidationError{
+ field: "XdsConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientConfig_GenericXdsConfigValidationError{
+ field: "XdsConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetXdsConfig()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientConfig_GenericXdsConfigValidationError{
+ field: "XdsConfig",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetLastUpdated()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientConfig_GenericXdsConfigValidationError{
+ field: "LastUpdated",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientConfig_GenericXdsConfigValidationError{
+ field: "LastUpdated",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLastUpdated()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientConfig_GenericXdsConfigValidationError{
+ field: "LastUpdated",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for ConfigStatus
+
+ // no validation rules for ClientStatus
+
+ if all {
+ switch v := interface{}(m.GetErrorState()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ClientConfig_GenericXdsConfigValidationError{
+ field: "ErrorState",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ClientConfig_GenericXdsConfigValidationError{
+ field: "ErrorState",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetErrorState()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ClientConfig_GenericXdsConfigValidationError{
+ field: "ErrorState",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for IsStaticResource
+
+ if len(errors) > 0 {
+ return ClientConfig_GenericXdsConfigMultiError(errors)
+ }
+
+ return nil
+}
+
+// ClientConfig_GenericXdsConfigMultiError is an error wrapping multiple
+// validation errors returned by ClientConfig_GenericXdsConfig.ValidateAll()
+// if the designated constraints aren't met.
+type ClientConfig_GenericXdsConfigMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ClientConfig_GenericXdsConfigMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ClientConfig_GenericXdsConfigMultiError) AllErrors() []error { return m }
+
+// ClientConfig_GenericXdsConfigValidationError is the validation error
+// returned by ClientConfig_GenericXdsConfig.Validate if the designated
+// constraints aren't met.
+type ClientConfig_GenericXdsConfigValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ClientConfig_GenericXdsConfigValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ClientConfig_GenericXdsConfigValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ClientConfig_GenericXdsConfigValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ClientConfig_GenericXdsConfigValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ClientConfig_GenericXdsConfigValidationError) ErrorName() string {
+ return "ClientConfig_GenericXdsConfigValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ClientConfig_GenericXdsConfigValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sClientConfig_GenericXdsConfig.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ClientConfig_GenericXdsConfigValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ClientConfig_GenericXdsConfigValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds_grpc.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds_grpc.pb.go
new file mode 100644
index 000000000..abe9abebd
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds_grpc.pb.go
@@ -0,0 +1,177 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.3.0
+// - protoc v5.26.1
+// source: envoy/service/status/v3/csds.proto
+
+package statusv3
+
+import (
+ context "context"
+ grpc "google.golang.org/grpc"
+ codes "google.golang.org/grpc/codes"
+ status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+const (
+ ClientStatusDiscoveryService_StreamClientStatus_FullMethodName = "/envoy.service.status.v3.ClientStatusDiscoveryService/StreamClientStatus"
+ ClientStatusDiscoveryService_FetchClientStatus_FullMethodName = "/envoy.service.status.v3.ClientStatusDiscoveryService/FetchClientStatus"
+)
+
+// ClientStatusDiscoveryServiceClient is the client API for ClientStatusDiscoveryService service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type ClientStatusDiscoveryServiceClient interface {
+ StreamClientStatus(ctx context.Context, opts ...grpc.CallOption) (ClientStatusDiscoveryService_StreamClientStatusClient, error)
+ FetchClientStatus(ctx context.Context, in *ClientStatusRequest, opts ...grpc.CallOption) (*ClientStatusResponse, error)
+}
+
+type clientStatusDiscoveryServiceClient struct {
+ cc grpc.ClientConnInterface
+}
+
+func NewClientStatusDiscoveryServiceClient(cc grpc.ClientConnInterface) ClientStatusDiscoveryServiceClient {
+ return &clientStatusDiscoveryServiceClient{cc}
+}
+
+func (c *clientStatusDiscoveryServiceClient) StreamClientStatus(ctx context.Context, opts ...grpc.CallOption) (ClientStatusDiscoveryService_StreamClientStatusClient, error) {
+ stream, err := c.cc.NewStream(ctx, &ClientStatusDiscoveryService_ServiceDesc.Streams[0], ClientStatusDiscoveryService_StreamClientStatus_FullMethodName, opts...)
+ if err != nil {
+ return nil, err
+ }
+ x := &clientStatusDiscoveryServiceStreamClientStatusClient{stream}
+ return x, nil
+}
+
+type ClientStatusDiscoveryService_StreamClientStatusClient interface {
+ Send(*ClientStatusRequest) error
+ Recv() (*ClientStatusResponse, error)
+ grpc.ClientStream
+}
+
+type clientStatusDiscoveryServiceStreamClientStatusClient struct {
+ grpc.ClientStream
+}
+
+func (x *clientStatusDiscoveryServiceStreamClientStatusClient) Send(m *ClientStatusRequest) error {
+ return x.ClientStream.SendMsg(m)
+}
+
+func (x *clientStatusDiscoveryServiceStreamClientStatusClient) Recv() (*ClientStatusResponse, error) {
+ m := new(ClientStatusResponse)
+ if err := x.ClientStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func (c *clientStatusDiscoveryServiceClient) FetchClientStatus(ctx context.Context, in *ClientStatusRequest, opts ...grpc.CallOption) (*ClientStatusResponse, error) {
+ out := new(ClientStatusResponse)
+ err := c.cc.Invoke(ctx, ClientStatusDiscoveryService_FetchClientStatus_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+// ClientStatusDiscoveryServiceServer is the server API for ClientStatusDiscoveryService service.
+// All implementations should embed UnimplementedClientStatusDiscoveryServiceServer
+// for forward compatibility
+type ClientStatusDiscoveryServiceServer interface {
+ StreamClientStatus(ClientStatusDiscoveryService_StreamClientStatusServer) error
+ FetchClientStatus(context.Context, *ClientStatusRequest) (*ClientStatusResponse, error)
+}
+
+// UnimplementedClientStatusDiscoveryServiceServer should be embedded to have forward compatible implementations.
+type UnimplementedClientStatusDiscoveryServiceServer struct {
+}
+
+func (UnimplementedClientStatusDiscoveryServiceServer) StreamClientStatus(ClientStatusDiscoveryService_StreamClientStatusServer) error {
+ return status.Errorf(codes.Unimplemented, "method StreamClientStatus not implemented")
+}
+func (UnimplementedClientStatusDiscoveryServiceServer) FetchClientStatus(context.Context, *ClientStatusRequest) (*ClientStatusResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method FetchClientStatus not implemented")
+}
+
+// UnsafeClientStatusDiscoveryServiceServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to ClientStatusDiscoveryServiceServer will
+// result in compilation errors.
+type UnsafeClientStatusDiscoveryServiceServer interface {
+ mustEmbedUnimplementedClientStatusDiscoveryServiceServer()
+}
+
+func RegisterClientStatusDiscoveryServiceServer(s grpc.ServiceRegistrar, srv ClientStatusDiscoveryServiceServer) {
+ s.RegisterService(&ClientStatusDiscoveryService_ServiceDesc, srv)
+}
+
+func _ClientStatusDiscoveryService_StreamClientStatus_Handler(srv interface{}, stream grpc.ServerStream) error {
+ return srv.(ClientStatusDiscoveryServiceServer).StreamClientStatus(&clientStatusDiscoveryServiceStreamClientStatusServer{stream})
+}
+
+type ClientStatusDiscoveryService_StreamClientStatusServer interface {
+ Send(*ClientStatusResponse) error
+ Recv() (*ClientStatusRequest, error)
+ grpc.ServerStream
+}
+
+type clientStatusDiscoveryServiceStreamClientStatusServer struct {
+ grpc.ServerStream
+}
+
+func (x *clientStatusDiscoveryServiceStreamClientStatusServer) Send(m *ClientStatusResponse) error {
+ return x.ServerStream.SendMsg(m)
+}
+
+func (x *clientStatusDiscoveryServiceStreamClientStatusServer) Recv() (*ClientStatusRequest, error) {
+ m := new(ClientStatusRequest)
+ if err := x.ServerStream.RecvMsg(m); err != nil {
+ return nil, err
+ }
+ return m, nil
+}
+
+func _ClientStatusDiscoveryService_FetchClientStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ClientStatusRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ClientStatusDiscoveryServiceServer).FetchClientStatus(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ClientStatusDiscoveryService_FetchClientStatus_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ClientStatusDiscoveryServiceServer).FetchClientStatus(ctx, req.(*ClientStatusRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+// ClientStatusDiscoveryService_ServiceDesc is the grpc.ServiceDesc for ClientStatusDiscoveryService service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var ClientStatusDiscoveryService_ServiceDesc = grpc.ServiceDesc{
+ ServiceName: "envoy.service.status.v3.ClientStatusDiscoveryService",
+ HandlerType: (*ClientStatusDiscoveryServiceServer)(nil),
+ Methods: []grpc.MethodDesc{
+ {
+ MethodName: "FetchClientStatus",
+ Handler: _ClientStatusDiscoveryService_FetchClientStatus_Handler,
+ },
+ },
+ Streams: []grpc.StreamDesc{
+ {
+ StreamName: "StreamClientStatus",
+ Handler: _ClientStatusDiscoveryService_StreamClientStatus_Handler,
+ ServerStreams: true,
+ ClientStreams: true,
+ },
+ },
+ Metadata: "envoy/service/status/v3/csds.proto",
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds_vtproto.pb.go
new file mode 100644
index 000000000..a55983e81
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/service/status/v3/csds_vtproto.pb.go
@@ -0,0 +1,866 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/service/status/v3/csds.proto
+
+package statusv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ anypb "github.com/planetscale/vtprotobuf/types/known/anypb"
+ timestamppb "github.com/planetscale/vtprotobuf/types/known/timestamppb"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *ClientStatusRequest) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClientStatusRequest) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ClientStatusRequest) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ExcludeResourceContents {
+ i--
+ if m.ExcludeResourceContents {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.Node != nil {
+ if vtmsg, ok := interface{}(m.Node).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Node)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.NodeMatchers) > 0 {
+ for iNdEx := len(m.NodeMatchers) - 1; iNdEx >= 0; iNdEx-- {
+ if vtmsg, ok := interface{}(m.NodeMatchers[iNdEx]).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.NodeMatchers[iNdEx])
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PerXdsConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PerXdsConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PerXdsConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.ClientStatus != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ClientStatus))
+ i--
+ dAtA[i] = 0x38
+ }
+ if msg, ok := m.PerXdsConfig.(*PerXdsConfig_EndpointConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.PerXdsConfig.(*PerXdsConfig_ScopedRouteConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.PerXdsConfig.(*PerXdsConfig_RouteConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.PerXdsConfig.(*PerXdsConfig_ClusterConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.PerXdsConfig.(*PerXdsConfig_ListenerConfig); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.Status != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Status))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PerXdsConfig_ListenerConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PerXdsConfig_ListenerConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ListenerConfig != nil {
+ if vtmsg, ok := interface{}(m.ListenerConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ListenerConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *PerXdsConfig_ClusterConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PerXdsConfig_ClusterConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ClusterConfig != nil {
+ if vtmsg, ok := interface{}(m.ClusterConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ClusterConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *PerXdsConfig_RouteConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PerXdsConfig_RouteConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RouteConfig != nil {
+ if vtmsg, ok := interface{}(m.RouteConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.RouteConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *PerXdsConfig_ScopedRouteConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PerXdsConfig_ScopedRouteConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ScopedRouteConfig != nil {
+ if vtmsg, ok := interface{}(m.ScopedRouteConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ScopedRouteConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x2a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x2a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *PerXdsConfig_EndpointConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PerXdsConfig_EndpointConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.EndpointConfig != nil {
+ if vtmsg, ok := interface{}(m.EndpointConfig).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.EndpointConfig)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x32
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x32
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ClientConfig_GenericXdsConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClientConfig_GenericXdsConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ClientConfig_GenericXdsConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.IsStaticResource {
+ i--
+ if m.IsStaticResource {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x48
+ }
+ if m.ErrorState != nil {
+ if vtmsg, ok := interface{}(m.ErrorState).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.ErrorState)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x42
+ }
+ if m.ClientStatus != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ClientStatus))
+ i--
+ dAtA[i] = 0x38
+ }
+ if m.ConfigStatus != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ConfigStatus))
+ i--
+ dAtA[i] = 0x30
+ }
+ if m.LastUpdated != nil {
+ size, err := (*timestamppb.Timestamp)(m.LastUpdated).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ }
+ if m.XdsConfig != nil {
+ size, err := (*anypb.Any)(m.XdsConfig).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.VersionInfo) > 0 {
+ i -= len(m.VersionInfo)
+ copy(dAtA[i:], m.VersionInfo)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.VersionInfo)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.TypeUrl) > 0 {
+ i -= len(m.TypeUrl)
+ copy(dAtA[i:], m.TypeUrl)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TypeUrl)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ClientConfig) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClientConfig) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ClientConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ClientScope) > 0 {
+ i -= len(m.ClientScope)
+ copy(dAtA[i:], m.ClientScope)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ClientScope)))
+ i--
+ dAtA[i] = 0x22
+ }
+ if len(m.GenericXdsConfigs) > 0 {
+ for iNdEx := len(m.GenericXdsConfigs) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.GenericXdsConfigs[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ }
+ if len(m.XdsConfig) > 0 {
+ for iNdEx := len(m.XdsConfig) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.XdsConfig[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.Node != nil {
+ if vtmsg, ok := interface{}(m.Node).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Node)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ClientStatusResponse) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ClientStatusResponse) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ClientStatusResponse) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Config) > 0 {
+ for iNdEx := len(m.Config) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Config[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ClientStatusRequest) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.NodeMatchers) > 0 {
+ for _, e := range m.NodeMatchers {
+ if size, ok := interface{}(e).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(e)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.Node != nil {
+ if size, ok := interface{}(m.Node).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Node)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ExcludeResourceContents {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PerXdsConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Status != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Status))
+ }
+ if vtmsg, ok := m.PerXdsConfig.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if m.ClientStatus != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.ClientStatus))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PerXdsConfig_ListenerConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ListenerConfig != nil {
+ if size, ok := interface{}(m.ListenerConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ListenerConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *PerXdsConfig_ClusterConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ClusterConfig != nil {
+ if size, ok := interface{}(m.ClusterConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ClusterConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *PerXdsConfig_RouteConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RouteConfig != nil {
+ if size, ok := interface{}(m.RouteConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.RouteConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *PerXdsConfig_ScopedRouteConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ScopedRouteConfig != nil {
+ if size, ok := interface{}(m.ScopedRouteConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ScopedRouteConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *PerXdsConfig_EndpointConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.EndpointConfig != nil {
+ if size, ok := interface{}(m.EndpointConfig).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.EndpointConfig)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ClientConfig_GenericXdsConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.TypeUrl)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.VersionInfo)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.XdsConfig != nil {
+ l = (*anypb.Any)(m.XdsConfig).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.LastUpdated != nil {
+ l = (*timestamppb.Timestamp)(m.LastUpdated).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.ConfigStatus != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.ConfigStatus))
+ }
+ if m.ClientStatus != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.ClientStatus))
+ }
+ if m.ErrorState != nil {
+ if size, ok := interface{}(m.ErrorState).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.ErrorState)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.IsStaticResource {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ClientConfig) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Node != nil {
+ if size, ok := interface{}(m.Node).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Node)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.XdsConfig) > 0 {
+ for _, e := range m.XdsConfig {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if len(m.GenericXdsConfigs) > 0 {
+ for _, e := range m.GenericXdsConfigs {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ l = len(m.ClientScope)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ClientStatusResponse) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Config) > 0 {
+ for _, e := range m.Config {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/cookie.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/cookie.pb.go
new file mode 100644
index 000000000..8afb4e8d1
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/cookie.pb.go
@@ -0,0 +1,189 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/http/v3/cookie.proto
+
+package httpv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Cookie defines an API for obtaining or generating HTTP cookie.
+type Cookie struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name that will be used to obtain cookie value from downstream HTTP request or generate
+ // new cookie for downstream.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Duration of cookie. This will be used to set the expiry time of a new cookie when it is
+ // generated. Set this to 0s to use a session cookie and disable cookie expiration.
+ Ttl *durationpb.Duration `protobuf:"bytes,2,opt,name=ttl,proto3" json:"ttl,omitempty"`
+ // Path of cookie. This will be used to set the path of a new cookie when it is generated.
+ // If no path is specified here, no path will be set for the cookie.
+ Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
+}
+
+func (x *Cookie) Reset() {
+ *x = Cookie{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_http_v3_cookie_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Cookie) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Cookie) ProtoMessage() {}
+
+func (x *Cookie) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_http_v3_cookie_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Cookie.ProtoReflect.Descriptor instead.
+func (*Cookie) Descriptor() ([]byte, []int) {
+ return file_envoy_type_http_v3_cookie_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Cookie) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Cookie) GetTtl() *durationpb.Duration {
+ if x != nil {
+ return x.Ttl
+ }
+ return nil
+}
+
+func (x *Cookie) GetPath() string {
+ if x != nil {
+ return x.Path
+ }
+ return ""
+}
+
+var File_envoy_type_http_v3_cookie_proto protoreflect.FileDescriptor
+
+var file_envoy_type_http_v3_cookie_proto_rawDesc = []byte{
+ 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74,
+ 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74,
+ 0x74, 0x70, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x70, 0x0a,
+ 0x06, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x03, 0x74, 0x74, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42,
+ 0x05, 0xaa, 0x01, 0x02, 0x32, 0x00, 0x52, 0x03, 0x74, 0x74, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x70,
+ 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42,
+ 0x7b, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x43, 0x6f, 0x6f,
+ 0x6b, 0x69, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78,
+ 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61,
+ 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74,
+ 0x74, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_http_v3_cookie_proto_rawDescOnce sync.Once
+ file_envoy_type_http_v3_cookie_proto_rawDescData = file_envoy_type_http_v3_cookie_proto_rawDesc
+)
+
+func file_envoy_type_http_v3_cookie_proto_rawDescGZIP() []byte {
+ file_envoy_type_http_v3_cookie_proto_rawDescOnce.Do(func() {
+ file_envoy_type_http_v3_cookie_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_http_v3_cookie_proto_rawDescData)
+ })
+ return file_envoy_type_http_v3_cookie_proto_rawDescData
+}
+
+var file_envoy_type_http_v3_cookie_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_type_http_v3_cookie_proto_goTypes = []interface{}{
+ (*Cookie)(nil), // 0: envoy.type.http.v3.Cookie
+ (*durationpb.Duration)(nil), // 1: google.protobuf.Duration
+}
+var file_envoy_type_http_v3_cookie_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.http.v3.Cookie.ttl:type_name -> google.protobuf.Duration
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_http_v3_cookie_proto_init() }
+func file_envoy_type_http_v3_cookie_proto_init() {
+ if File_envoy_type_http_v3_cookie_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_http_v3_cookie_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Cookie); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_http_v3_cookie_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_http_v3_cookie_proto_goTypes,
+ DependencyIndexes: file_envoy_type_http_v3_cookie_proto_depIdxs,
+ MessageInfos: file_envoy_type_http_v3_cookie_proto_msgTypes,
+ }.Build()
+ File_envoy_type_http_v3_cookie_proto = out.File
+ file_envoy_type_http_v3_cookie_proto_rawDesc = nil
+ file_envoy_type_http_v3_cookie_proto_goTypes = nil
+ file_envoy_type_http_v3_cookie_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/cookie.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/cookie.pb.validate.go
new file mode 100644
index 000000000..3daecd3de
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/cookie.pb.validate.go
@@ -0,0 +1,178 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/http/v3/cookie.proto
+
+package httpv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Cookie with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Cookie) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Cookie with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in CookieMultiError, or nil if none found.
+func (m *Cookie) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Cookie) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := CookieValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if d := m.GetTtl(); d != nil {
+ dur, err := d.AsDuration(), d.CheckValid()
+ if err != nil {
+ err = CookieValidationError{
+ field: "Ttl",
+ reason: "value is not a valid duration",
+ cause: err,
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ } else {
+
+ gte := time.Duration(0*time.Second + 0*time.Nanosecond)
+
+ if dur < gte {
+ err := CookieValidationError{
+ field: "Ttl",
+ reason: "value must be greater than or equal to 0s",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+ }
+
+ // no validation rules for Path
+
+ if len(errors) > 0 {
+ return CookieMultiError(errors)
+ }
+
+ return nil
+}
+
+// CookieMultiError is an error wrapping multiple validation errors returned by
+// Cookie.ValidateAll() if the designated constraints aren't met.
+type CookieMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CookieMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CookieMultiError) AllErrors() []error { return m }
+
+// CookieValidationError is the validation error returned by Cookie.Validate if
+// the designated constraints aren't met.
+type CookieValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CookieValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CookieValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CookieValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CookieValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CookieValidationError) ErrorName() string { return "CookieValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CookieValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCookie.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CookieValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CookieValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/cookie_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/cookie_vtproto.pb.go
new file mode 100644
index 000000000..66ab8b784
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/cookie_vtproto.pb.go
@@ -0,0 +1,99 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/http/v3/cookie.proto
+
+package httpv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *Cookie) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Cookie) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Cookie) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Path) > 0 {
+ i -= len(m.Path)
+ copy(dAtA[i:], m.Path)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Path)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.Ttl != nil {
+ size, err := (*durationpb.Duration)(m.Ttl).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Cookie) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Ttl != nil {
+ l = (*durationpb.Duration)(m.Ttl).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Path)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/path_transformation.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/path_transformation.pb.go
new file mode 100644
index 000000000..dda21b56b
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/path_transformation.pb.go
@@ -0,0 +1,403 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/http/v3/path_transformation.proto
+
+package httpv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PathTransformation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A list of operations to apply. Transformations will be performed in the order that they appear.
+ Operations []*PathTransformation_Operation `protobuf:"bytes,1,rep,name=operations,proto3" json:"operations,omitempty"`
+}
+
+func (x *PathTransformation) Reset() {
+ *x = PathTransformation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PathTransformation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PathTransformation) ProtoMessage() {}
+
+func (x *PathTransformation) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PathTransformation.ProtoReflect.Descriptor instead.
+func (*PathTransformation) Descriptor() ([]byte, []int) {
+ return file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PathTransformation) GetOperations() []*PathTransformation_Operation {
+ if x != nil {
+ return x.Operations
+ }
+ return nil
+}
+
+// A type of operation to alter text.
+type PathTransformation_Operation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to OperationSpecifier:
+ //
+ // *PathTransformation_Operation_NormalizePathRfc_3986
+ // *PathTransformation_Operation_MergeSlashes_
+ OperationSpecifier isPathTransformation_Operation_OperationSpecifier `protobuf_oneof:"operation_specifier"`
+}
+
+func (x *PathTransformation_Operation) Reset() {
+ *x = PathTransformation_Operation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PathTransformation_Operation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PathTransformation_Operation) ProtoMessage() {}
+
+func (x *PathTransformation_Operation) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PathTransformation_Operation.ProtoReflect.Descriptor instead.
+func (*PathTransformation_Operation) Descriptor() ([]byte, []int) {
+ return file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (m *PathTransformation_Operation) GetOperationSpecifier() isPathTransformation_Operation_OperationSpecifier {
+ if m != nil {
+ return m.OperationSpecifier
+ }
+ return nil
+}
+
+func (x *PathTransformation_Operation) GetNormalizePathRfc_3986() *PathTransformation_Operation_NormalizePathRFC3986 {
+ if x, ok := x.GetOperationSpecifier().(*PathTransformation_Operation_NormalizePathRfc_3986); ok {
+ return x.NormalizePathRfc_3986
+ }
+ return nil
+}
+
+func (x *PathTransformation_Operation) GetMergeSlashes() *PathTransformation_Operation_MergeSlashes {
+ if x, ok := x.GetOperationSpecifier().(*PathTransformation_Operation_MergeSlashes_); ok {
+ return x.MergeSlashes
+ }
+ return nil
+}
+
+type isPathTransformation_Operation_OperationSpecifier interface {
+ isPathTransformation_Operation_OperationSpecifier()
+}
+
+type PathTransformation_Operation_NormalizePathRfc_3986 struct {
+ // Enable path normalization per RFC 3986.
+ NormalizePathRfc_3986 *PathTransformation_Operation_NormalizePathRFC3986 `protobuf:"bytes,2,opt,name=normalize_path_rfc_3986,json=normalizePathRfc3986,proto3,oneof"`
+}
+
+type PathTransformation_Operation_MergeSlashes_ struct {
+ // Enable merging adjacent slashes.
+ MergeSlashes *PathTransformation_Operation_MergeSlashes `protobuf:"bytes,3,opt,name=merge_slashes,json=mergeSlashes,proto3,oneof"`
+}
+
+func (*PathTransformation_Operation_NormalizePathRfc_3986) isPathTransformation_Operation_OperationSpecifier() {
+}
+
+func (*PathTransformation_Operation_MergeSlashes_) isPathTransformation_Operation_OperationSpecifier() {
+}
+
+// Should text be normalized according to RFC 3986? This typically is used for path headers
+// before any processing of requests by HTTP filters or routing. This applies percent-encoded
+// normalization and path segment normalization. Fails on characters disallowed in URLs
+// (e.g. NULLs). See `Normalization and Comparison
+// `_ for details of normalization. Note that
+// this options does not perform `case normalization
+// `_
+type PathTransformation_Operation_NormalizePathRFC3986 struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *PathTransformation_Operation_NormalizePathRFC3986) Reset() {
+ *x = PathTransformation_Operation_NormalizePathRFC3986{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PathTransformation_Operation_NormalizePathRFC3986) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PathTransformation_Operation_NormalizePathRFC3986) ProtoMessage() {}
+
+func (x *PathTransformation_Operation_NormalizePathRFC3986) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PathTransformation_Operation_NormalizePathRFC3986.ProtoReflect.Descriptor instead.
+func (*PathTransformation_Operation_NormalizePathRFC3986) Descriptor() ([]byte, []int) {
+ return file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP(), []int{0, 0, 0}
+}
+
+// Determines if adjacent slashes are merged into one. A common use case is for a request path
+// header. Using this option in “:ref: PathNormalizationOptions
+// “
+// will allow incoming requests with path “//dir///file“ to match against route with “prefix“
+// match set to “/dir“. When using for header transformations, note that slash merging is not
+// part of `HTTP spec `_ and is provided for convenience.
+type PathTransformation_Operation_MergeSlashes struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *PathTransformation_Operation_MergeSlashes) Reset() {
+ *x = PathTransformation_Operation_MergeSlashes{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PathTransformation_Operation_MergeSlashes) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PathTransformation_Operation_MergeSlashes) ProtoMessage() {}
+
+func (x *PathTransformation_Operation_MergeSlashes) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_http_v3_path_transformation_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PathTransformation_Operation_MergeSlashes.ProtoReflect.Descriptor instead.
+func (*PathTransformation_Operation_MergeSlashes) Descriptor() ([]byte, []int) {
+ return file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP(), []int{0, 0, 1}
+}
+
+var File_envoy_type_http_v3_path_transformation_proto protoreflect.FileDescriptor
+
+var file_envoy_type_http_v3_path_transformation_proto_rawDesc = []byte{
+ 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74,
+ 0x70, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66,
+ 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x12,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e,
+ 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9e, 0x03, 0x0a, 0x12, 0x50,
+ 0x61, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x50, 0x0a, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x54,
+ 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70,
+ 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x1a, 0xb5, 0x02, 0x0a, 0x09, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x7e, 0x0a, 0x17, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x5f, 0x70,
+ 0x61, 0x74, 0x68, 0x5f, 0x72, 0x66, 0x63, 0x5f, 0x33, 0x39, 0x38, 0x36, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x45, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e,
+ 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61,
+ 0x74, 0x68, 0x52, 0x46, 0x43, 0x33, 0x39, 0x38, 0x36, 0x48, 0x00, 0x52, 0x14, 0x6e, 0x6f, 0x72,
+ 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x66, 0x63, 0x33, 0x39, 0x38,
+ 0x36, 0x12, 0x64, 0x0a, 0x0d, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x5f, 0x73, 0x6c, 0x61, 0x73, 0x68,
+ 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x61,
+ 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x72, 0x67, 0x65,
+ 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x6d, 0x65, 0x72, 0x67, 0x65,
+ 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x1a, 0x16, 0x0a, 0x14, 0x4e, 0x6f, 0x72, 0x6d, 0x61,
+ 0x6c, 0x69, 0x7a, 0x65, 0x50, 0x61, 0x74, 0x68, 0x52, 0x46, 0x43, 0x33, 0x39, 0x38, 0x36, 0x1a,
+ 0x0e, 0x0a, 0x0c, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x73, 0x42,
+ 0x1a, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65,
+ 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x87, 0x01, 0xba, 0x80,
+ 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x20, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x76, 0x33, 0x42, 0x17, 0x50, 0x61, 0x74, 0x68, 0x54, 0x72,
+ 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f,
+ 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x76, 0x33, 0x3b, 0x68,
+ 0x74, 0x74, 0x70, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_http_v3_path_transformation_proto_rawDescOnce sync.Once
+ file_envoy_type_http_v3_path_transformation_proto_rawDescData = file_envoy_type_http_v3_path_transformation_proto_rawDesc
+)
+
+func file_envoy_type_http_v3_path_transformation_proto_rawDescGZIP() []byte {
+ file_envoy_type_http_v3_path_transformation_proto_rawDescOnce.Do(func() {
+ file_envoy_type_http_v3_path_transformation_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_http_v3_path_transformation_proto_rawDescData)
+ })
+ return file_envoy_type_http_v3_path_transformation_proto_rawDescData
+}
+
+var file_envoy_type_http_v3_path_transformation_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_envoy_type_http_v3_path_transformation_proto_goTypes = []interface{}{
+ (*PathTransformation)(nil), // 0: envoy.type.http.v3.PathTransformation
+ (*PathTransformation_Operation)(nil), // 1: envoy.type.http.v3.PathTransformation.Operation
+ (*PathTransformation_Operation_NormalizePathRFC3986)(nil), // 2: envoy.type.http.v3.PathTransformation.Operation.NormalizePathRFC3986
+ (*PathTransformation_Operation_MergeSlashes)(nil), // 3: envoy.type.http.v3.PathTransformation.Operation.MergeSlashes
+}
+var file_envoy_type_http_v3_path_transformation_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.http.v3.PathTransformation.operations:type_name -> envoy.type.http.v3.PathTransformation.Operation
+ 2, // 1: envoy.type.http.v3.PathTransformation.Operation.normalize_path_rfc_3986:type_name -> envoy.type.http.v3.PathTransformation.Operation.NormalizePathRFC3986
+ 3, // 2: envoy.type.http.v3.PathTransformation.Operation.merge_slashes:type_name -> envoy.type.http.v3.PathTransformation.Operation.MergeSlashes
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_http_v3_path_transformation_proto_init() }
+func file_envoy_type_http_v3_path_transformation_proto_init() {
+ if File_envoy_type_http_v3_path_transformation_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_http_v3_path_transformation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PathTransformation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_http_v3_path_transformation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PathTransformation_Operation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_http_v3_path_transformation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PathTransformation_Operation_NormalizePathRFC3986); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_http_v3_path_transformation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PathTransformation_Operation_MergeSlashes); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_http_v3_path_transformation_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*PathTransformation_Operation_NormalizePathRfc_3986)(nil),
+ (*PathTransformation_Operation_MergeSlashes_)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_http_v3_path_transformation_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_http_v3_path_transformation_proto_goTypes,
+ DependencyIndexes: file_envoy_type_http_v3_path_transformation_proto_depIdxs,
+ MessageInfos: file_envoy_type_http_v3_path_transformation_proto_msgTypes,
+ }.Build()
+ File_envoy_type_http_v3_path_transformation_proto = out.File
+ file_envoy_type_http_v3_path_transformation_proto_rawDesc = nil
+ file_envoy_type_http_v3_path_transformation_proto_goTypes = nil
+ file_envoy_type_http_v3_path_transformation_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/path_transformation.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/path_transformation.pb.validate.go
new file mode 100644
index 000000000..0bb35065b
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/path_transformation.pb.validate.go
@@ -0,0 +1,595 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/http/v3/path_transformation.proto
+
+package httpv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on PathTransformation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *PathTransformation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on PathTransformation with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// PathTransformationMultiError, or nil if none found.
+func (m *PathTransformation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *PathTransformation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ for idx, item := range m.GetOperations() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PathTransformationValidationError{
+ field: fmt.Sprintf("Operations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PathTransformationValidationError{
+ field: fmt.Sprintf("Operations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PathTransformationValidationError{
+ field: fmt.Sprintf("Operations[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return PathTransformationMultiError(errors)
+ }
+
+ return nil
+}
+
+// PathTransformationMultiError is an error wrapping multiple validation errors
+// returned by PathTransformation.ValidateAll() if the designated constraints
+// aren't met.
+type PathTransformationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PathTransformationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PathTransformationMultiError) AllErrors() []error { return m }
+
+// PathTransformationValidationError is the validation error returned by
+// PathTransformation.Validate if the designated constraints aren't met.
+type PathTransformationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PathTransformationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PathTransformationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PathTransformationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PathTransformationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PathTransformationValidationError) ErrorName() string {
+ return "PathTransformationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e PathTransformationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sPathTransformation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PathTransformationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PathTransformationValidationError{}
+
+// Validate checks the field values on PathTransformation_Operation with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *PathTransformation_Operation) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on PathTransformation_Operation with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// PathTransformation_OperationMultiError, or nil if none found.
+func (m *PathTransformation_Operation) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *PathTransformation_Operation) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofOperationSpecifierPresent := false
+ switch v := m.OperationSpecifier.(type) {
+ case *PathTransformation_Operation_NormalizePathRfc_3986:
+ if v == nil {
+ err := PathTransformation_OperationValidationError{
+ field: "OperationSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofOperationSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetNormalizePathRfc_3986()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PathTransformation_OperationValidationError{
+ field: "NormalizePathRfc_3986",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PathTransformation_OperationValidationError{
+ field: "NormalizePathRfc_3986",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNormalizePathRfc_3986()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PathTransformation_OperationValidationError{
+ field: "NormalizePathRfc_3986",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *PathTransformation_Operation_MergeSlashes_:
+ if v == nil {
+ err := PathTransformation_OperationValidationError{
+ field: "OperationSpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofOperationSpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetMergeSlashes()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PathTransformation_OperationValidationError{
+ field: "MergeSlashes",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PathTransformation_OperationValidationError{
+ field: "MergeSlashes",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMergeSlashes()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PathTransformation_OperationValidationError{
+ field: "MergeSlashes",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofOperationSpecifierPresent {
+ err := PathTransformation_OperationValidationError{
+ field: "OperationSpecifier",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return PathTransformation_OperationMultiError(errors)
+ }
+
+ return nil
+}
+
+// PathTransformation_OperationMultiError is an error wrapping multiple
+// validation errors returned by PathTransformation_Operation.ValidateAll() if
+// the designated constraints aren't met.
+type PathTransformation_OperationMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PathTransformation_OperationMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PathTransformation_OperationMultiError) AllErrors() []error { return m }
+
+// PathTransformation_OperationValidationError is the validation error returned
+// by PathTransformation_Operation.Validate if the designated constraints
+// aren't met.
+type PathTransformation_OperationValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PathTransformation_OperationValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PathTransformation_OperationValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PathTransformation_OperationValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PathTransformation_OperationValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PathTransformation_OperationValidationError) ErrorName() string {
+ return "PathTransformation_OperationValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e PathTransformation_OperationValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sPathTransformation_Operation.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PathTransformation_OperationValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PathTransformation_OperationValidationError{}
+
+// Validate checks the field values on
+// PathTransformation_Operation_NormalizePathRFC3986 with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *PathTransformation_Operation_NormalizePathRFC3986) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// PathTransformation_Operation_NormalizePathRFC3986 with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in
+// PathTransformation_Operation_NormalizePathRFC3986MultiError, or nil if none found.
+func (m *PathTransformation_Operation_NormalizePathRFC3986) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *PathTransformation_Operation_NormalizePathRFC3986) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return PathTransformation_Operation_NormalizePathRFC3986MultiError(errors)
+ }
+
+ return nil
+}
+
+// PathTransformation_Operation_NormalizePathRFC3986MultiError is an error
+// wrapping multiple validation errors returned by
+// PathTransformation_Operation_NormalizePathRFC3986.ValidateAll() if the
+// designated constraints aren't met.
+type PathTransformation_Operation_NormalizePathRFC3986MultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PathTransformation_Operation_NormalizePathRFC3986MultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PathTransformation_Operation_NormalizePathRFC3986MultiError) AllErrors() []error { return m }
+
+// PathTransformation_Operation_NormalizePathRFC3986ValidationError is the
+// validation error returned by
+// PathTransformation_Operation_NormalizePathRFC3986.Validate if the
+// designated constraints aren't met.
+type PathTransformation_Operation_NormalizePathRFC3986ValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Field() string {
+ return e.field
+}
+
+// Reason function returns reason value.
+func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Reason() string {
+ return e.reason
+}
+
+// Cause function returns cause value.
+func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Cause() error {
+ return e.cause
+}
+
+// Key function returns key value.
+func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) ErrorName() string {
+ return "PathTransformation_Operation_NormalizePathRFC3986ValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e PathTransformation_Operation_NormalizePathRFC3986ValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sPathTransformation_Operation_NormalizePathRFC3986.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PathTransformation_Operation_NormalizePathRFC3986ValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PathTransformation_Operation_NormalizePathRFC3986ValidationError{}
+
+// Validate checks the field values on
+// PathTransformation_Operation_MergeSlashes with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *PathTransformation_Operation_MergeSlashes) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on
+// PathTransformation_Operation_MergeSlashes with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in
+// PathTransformation_Operation_MergeSlashesMultiError, or nil if none found.
+func (m *PathTransformation_Operation_MergeSlashes) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *PathTransformation_Operation_MergeSlashes) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return PathTransformation_Operation_MergeSlashesMultiError(errors)
+ }
+
+ return nil
+}
+
+// PathTransformation_Operation_MergeSlashesMultiError is an error wrapping
+// multiple validation errors returned by
+// PathTransformation_Operation_MergeSlashes.ValidateAll() if the designated
+// constraints aren't met.
+type PathTransformation_Operation_MergeSlashesMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PathTransformation_Operation_MergeSlashesMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PathTransformation_Operation_MergeSlashesMultiError) AllErrors() []error { return m }
+
+// PathTransformation_Operation_MergeSlashesValidationError is the validation
+// error returned by PathTransformation_Operation_MergeSlashes.Validate if the
+// designated constraints aren't met.
+type PathTransformation_Operation_MergeSlashesValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PathTransformation_Operation_MergeSlashesValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PathTransformation_Operation_MergeSlashesValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PathTransformation_Operation_MergeSlashesValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PathTransformation_Operation_MergeSlashesValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PathTransformation_Operation_MergeSlashesValidationError) ErrorName() string {
+ return "PathTransformation_Operation_MergeSlashesValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e PathTransformation_Operation_MergeSlashesValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sPathTransformation_Operation_MergeSlashes.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PathTransformation_Operation_MergeSlashesValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PathTransformation_Operation_MergeSlashesValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/path_transformation_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/path_transformation_vtproto.pb.go
new file mode 100644
index 000000000..64d8960cf
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/http/v3/path_transformation_vtproto.pb.go
@@ -0,0 +1,300 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/http/v3/path_transformation.proto
+
+package httpv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *PathTransformation_Operation_NormalizePathRFC3986) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PathTransformation_Operation_NormalizePathRFC3986) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PathTransformation_Operation_NormalizePathRFC3986) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PathTransformation_Operation_MergeSlashes) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PathTransformation_Operation_MergeSlashes) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PathTransformation_Operation_MergeSlashes) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PathTransformation_Operation) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PathTransformation_Operation) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PathTransformation_Operation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.OperationSpecifier.(*PathTransformation_Operation_MergeSlashes_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.OperationSpecifier.(*PathTransformation_Operation_NormalizePathRfc_3986); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PathTransformation_Operation_NormalizePathRfc_3986) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PathTransformation_Operation_NormalizePathRfc_3986) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.NormalizePathRfc_3986 != nil {
+ size, err := m.NormalizePathRfc_3986.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *PathTransformation_Operation_MergeSlashes_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PathTransformation_Operation_MergeSlashes_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.MergeSlashes != nil {
+ size, err := m.MergeSlashes.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *PathTransformation) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PathTransformation) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PathTransformation) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Operations) > 0 {
+ for iNdEx := len(m.Operations) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Operations[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PathTransformation_Operation_NormalizePathRFC3986) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PathTransformation_Operation_MergeSlashes) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PathTransformation_Operation) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.OperationSpecifier.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PathTransformation_Operation_NormalizePathRfc_3986) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.NormalizePathRfc_3986 != nil {
+ l = m.NormalizePathRfc_3986.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *PathTransformation_Operation_MergeSlashes_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.MergeSlashes != nil {
+ l = m.MergeSlashes.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *PathTransformation) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Operations) > 0 {
+ for _, e := range m.Operations {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.go
new file mode 100644
index 000000000..db3bd5994
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.go
@@ -0,0 +1,203 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/filter_state.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// FilterStateMatcher provides a general interface for matching the filter state objects.
+type FilterStateMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The filter state key to retrieve the object.
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ // Types that are assignable to Matcher:
+ //
+ // *FilterStateMatcher_StringMatch
+ Matcher isFilterStateMatcher_Matcher `protobuf_oneof:"matcher"`
+}
+
+func (x *FilterStateMatcher) Reset() {
+ *x = FilterStateMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_filter_state_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FilterStateMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FilterStateMatcher) ProtoMessage() {}
+
+func (x *FilterStateMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_filter_state_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FilterStateMatcher.ProtoReflect.Descriptor instead.
+func (*FilterStateMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_filter_state_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FilterStateMatcher) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+func (m *FilterStateMatcher) GetMatcher() isFilterStateMatcher_Matcher {
+ if m != nil {
+ return m.Matcher
+ }
+ return nil
+}
+
+func (x *FilterStateMatcher) GetStringMatch() *StringMatcher {
+ if x, ok := x.GetMatcher().(*FilterStateMatcher_StringMatch); ok {
+ return x.StringMatch
+ }
+ return nil
+}
+
+type isFilterStateMatcher_Matcher interface {
+ isFilterStateMatcher_Matcher()
+}
+
+type FilterStateMatcher_StringMatch struct {
+ // Matches the filter state object as a string value.
+ StringMatch *StringMatcher `protobuf:"bytes,2,opt,name=string_match,json=stringMatch,proto3,oneof"`
+}
+
+func (*FilterStateMatcher_StringMatch) isFilterStateMatcher_Matcher() {}
+
+var File_envoy_type_matcher_v3_filter_state_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_filter_state_proto_rawDesc = []byte{
+ 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73,
+ 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76,
+ 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01,
+ 0x0a, 0x12, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
+ 0x49, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74,
+ 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x42, 0x0e, 0x0a, 0x07, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x89, 0x01, 0xba, 0x80, 0xc8,
+ 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70,
+ 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x46, 0x69, 0x6c, 0x74,
+ 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46,
+ 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
+ 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70,
+ 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_filter_state_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_filter_state_proto_rawDescData = file_envoy_type_matcher_v3_filter_state_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_filter_state_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_filter_state_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_filter_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_filter_state_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_filter_state_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_filter_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_type_matcher_v3_filter_state_proto_goTypes = []interface{}{
+ (*FilterStateMatcher)(nil), // 0: envoy.type.matcher.v3.FilterStateMatcher
+ (*StringMatcher)(nil), // 1: envoy.type.matcher.v3.StringMatcher
+}
+var file_envoy_type_matcher_v3_filter_state_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.matcher.v3.FilterStateMatcher.string_match:type_name -> envoy.type.matcher.v3.StringMatcher
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_filter_state_proto_init() }
+func file_envoy_type_matcher_v3_filter_state_proto_init() {
+ if File_envoy_type_matcher_v3_filter_state_proto != nil {
+ return
+ }
+ file_envoy_type_matcher_v3_string_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_filter_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FilterStateMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_matcher_v3_filter_state_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*FilterStateMatcher_StringMatch)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_filter_state_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_filter_state_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_filter_state_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_filter_state_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_filter_state_proto = out.File
+ file_envoy_type_matcher_v3_filter_state_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_filter_state_proto_goTypes = nil
+ file_envoy_type_matcher_v3_filter_state_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.validate.go
new file mode 100644
index 000000000..41a5f68db
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state.pb.validate.go
@@ -0,0 +1,208 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/filter_state.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on FilterStateMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *FilterStateMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FilterStateMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FilterStateMatcherMultiError, or nil if none found.
+func (m *FilterStateMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FilterStateMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetKey()) < 1 {
+ err := FilterStateMatcherValidationError{
+ field: "Key",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ oneofMatcherPresent := false
+ switch v := m.Matcher.(type) {
+ case *FilterStateMatcher_StringMatch:
+ if v == nil {
+ err := FilterStateMatcherValidationError{
+ field: "Matcher",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatcherPresent = true
+
+ if all {
+ switch v := interface{}(m.GetStringMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, FilterStateMatcherValidationError{
+ field: "StringMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, FilterStateMatcherValidationError{
+ field: "StringMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return FilterStateMatcherValidationError{
+ field: "StringMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofMatcherPresent {
+ err := FilterStateMatcherValidationError{
+ field: "Matcher",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return FilterStateMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// FilterStateMatcherMultiError is an error wrapping multiple validation errors
+// returned by FilterStateMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type FilterStateMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FilterStateMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FilterStateMatcherMultiError) AllErrors() []error { return m }
+
+// FilterStateMatcherValidationError is the validation error returned by
+// FilterStateMatcher.Validate if the designated constraints aren't met.
+type FilterStateMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FilterStateMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FilterStateMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FilterStateMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FilterStateMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FilterStateMatcherValidationError) ErrorName() string {
+ return "FilterStateMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FilterStateMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFilterStateMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FilterStateMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FilterStateMatcherValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state_vtproto.pb.go
new file mode 100644
index 000000000..873f63eef
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/filter_state_vtproto.pb.go
@@ -0,0 +1,121 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/filter_state.proto
+
+package matcherv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *FilterStateMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FilterStateMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *FilterStateMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Matcher.(*FilterStateMatcher_StringMatch); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.Key) > 0 {
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *FilterStateMatcher_StringMatch) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *FilterStateMatcher_StringMatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.StringMatch != nil {
+ size, err := m.StringMatch.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *FilterStateMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.Matcher.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *FilterStateMatcher_StringMatch) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.StringMatch != nil {
+ l = m.StringMatch.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.go
new file mode 100644
index 000000000..a2f9c73ad
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.go
@@ -0,0 +1,452 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/http_inputs.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Match input indicates that matching should be done on a specific request header.
+// The resulting input string will be all headers for the given key joined by a comma,
+// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input
+// string will be 'bar,baz'.
+// [#comment:TODO(snowp): Link to unified matching docs.]
+// [#extension: envoy.matching.inputs.request_headers]
+type HttpRequestHeaderMatchInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The request header to match on.
+ HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"`
+}
+
+func (x *HttpRequestHeaderMatchInput) Reset() {
+ *x = HttpRequestHeaderMatchInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpRequestHeaderMatchInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpRequestHeaderMatchInput) ProtoMessage() {}
+
+func (x *HttpRequestHeaderMatchInput) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpRequestHeaderMatchInput.ProtoReflect.Descriptor instead.
+func (*HttpRequestHeaderMatchInput) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *HttpRequestHeaderMatchInput) GetHeaderName() string {
+ if x != nil {
+ return x.HeaderName
+ }
+ return ""
+}
+
+// Match input indicates that matching should be done on a specific request trailer.
+// The resulting input string will be all headers for the given key joined by a comma,
+// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input
+// string will be 'bar,baz'.
+// [#comment:TODO(snowp): Link to unified matching docs.]
+// [#extension: envoy.matching.inputs.request_trailers]
+type HttpRequestTrailerMatchInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The request trailer to match on.
+ HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"`
+}
+
+func (x *HttpRequestTrailerMatchInput) Reset() {
+ *x = HttpRequestTrailerMatchInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpRequestTrailerMatchInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpRequestTrailerMatchInput) ProtoMessage() {}
+
+func (x *HttpRequestTrailerMatchInput) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpRequestTrailerMatchInput.ProtoReflect.Descriptor instead.
+func (*HttpRequestTrailerMatchInput) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *HttpRequestTrailerMatchInput) GetHeaderName() string {
+ if x != nil {
+ return x.HeaderName
+ }
+ return ""
+}
+
+// Match input indicating that matching should be done on a specific response header.
+// The resulting input string will be all headers for the given key joined by a comma,
+// e.g. if the response contains two 'foo' headers with value 'bar' and 'baz', the input
+// string will be 'bar,baz'.
+// [#comment:TODO(snowp): Link to unified matching docs.]
+// [#extension: envoy.matching.inputs.response_headers]
+type HttpResponseHeaderMatchInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The response header to match on.
+ HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"`
+}
+
+func (x *HttpResponseHeaderMatchInput) Reset() {
+ *x = HttpResponseHeaderMatchInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpResponseHeaderMatchInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpResponseHeaderMatchInput) ProtoMessage() {}
+
+func (x *HttpResponseHeaderMatchInput) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpResponseHeaderMatchInput.ProtoReflect.Descriptor instead.
+func (*HttpResponseHeaderMatchInput) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *HttpResponseHeaderMatchInput) GetHeaderName() string {
+ if x != nil {
+ return x.HeaderName
+ }
+ return ""
+}
+
+// Match input indicates that matching should be done on a specific response trailer.
+// The resulting input string will be all headers for the given key joined by a comma,
+// e.g. if the request contains two 'foo' headers with value 'bar' and 'baz', the input
+// string will be 'bar,baz'.
+// [#comment:TODO(snowp): Link to unified matching docs.]
+// [#extension: envoy.matching.inputs.response_trailers]
+type HttpResponseTrailerMatchInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The response trailer to match on.
+ HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"`
+}
+
+func (x *HttpResponseTrailerMatchInput) Reset() {
+ *x = HttpResponseTrailerMatchInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpResponseTrailerMatchInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpResponseTrailerMatchInput) ProtoMessage() {}
+
+func (x *HttpResponseTrailerMatchInput) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpResponseTrailerMatchInput.ProtoReflect.Descriptor instead.
+func (*HttpResponseTrailerMatchInput) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *HttpResponseTrailerMatchInput) GetHeaderName() string {
+ if x != nil {
+ return x.HeaderName
+ }
+ return ""
+}
+
+// Match input indicates that matching should be done on a specific query parameter.
+// The resulting input string will be the first query parameter for the value
+// 'query_param'.
+// [#extension: envoy.matching.inputs.query_params]
+type HttpRequestQueryParamMatchInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The query parameter to match on.
+ QueryParam string `protobuf:"bytes,1,opt,name=query_param,json=queryParam,proto3" json:"query_param,omitempty"`
+}
+
+func (x *HttpRequestQueryParamMatchInput) Reset() {
+ *x = HttpRequestQueryParamMatchInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpRequestQueryParamMatchInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpRequestQueryParamMatchInput) ProtoMessage() {}
+
+func (x *HttpRequestQueryParamMatchInput) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpRequestQueryParamMatchInput.ProtoReflect.Descriptor instead.
+func (*HttpRequestQueryParamMatchInput) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *HttpRequestQueryParamMatchInput) GetQueryParam() string {
+ if x != nil {
+ return x.QueryParam
+ }
+ return ""
+}
+
+var File_envoy_type_matcher_v3_http_inputs_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_http_inputs_proto_rawDesc = []byte{
+ 0x0a, 0x27, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x69, 0x6e, 0x70,
+ 0x75, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33,
+ 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4b, 0x0a, 0x1b, 0x48, 0x74, 0x74, 0x70,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65,
+ 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42,
+ 0x08, 0x72, 0x06, 0xc8, 0x01, 0x00, 0xc0, 0x01, 0x01, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65,
+ 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x1c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72,
+ 0x06, 0xc8, 0x01, 0x00, 0xc0, 0x01, 0x01, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e,
+ 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x1c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e,
+ 0x70, 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc8,
+ 0x01, 0x00, 0xc0, 0x01, 0x01, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d,
+ 0x65, 0x22, 0x4d, 0x0a, 0x1d, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x54, 0x72, 0x61, 0x69, 0x6c, 0x65, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70,
+ 0x75, 0x74, 0x12, 0x2c, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b, 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc8, 0x01,
+ 0x00, 0xc0, 0x01, 0x01, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
+ 0x22, 0x4b, 0x0a, 0x1f, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x51,
+ 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e,
+ 0x70, 0x75, 0x74, 0x12, 0x28, 0x0a, 0x0b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x5f, 0x70, 0x61, 0x72,
+ 0x61, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10,
+ 0x01, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x42, 0x88, 0x01,
+ 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48,
+ 0x74, 0x74, 0x70, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
+ 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72,
+ 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74,
+ 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_http_inputs_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_http_inputs_proto_rawDescData = file_envoy_type_matcher_v3_http_inputs_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_http_inputs_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_http_inputs_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_http_inputs_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_http_inputs_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_http_inputs_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_http_inputs_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_envoy_type_matcher_v3_http_inputs_proto_goTypes = []interface{}{
+ (*HttpRequestHeaderMatchInput)(nil), // 0: envoy.type.matcher.v3.HttpRequestHeaderMatchInput
+ (*HttpRequestTrailerMatchInput)(nil), // 1: envoy.type.matcher.v3.HttpRequestTrailerMatchInput
+ (*HttpResponseHeaderMatchInput)(nil), // 2: envoy.type.matcher.v3.HttpResponseHeaderMatchInput
+ (*HttpResponseTrailerMatchInput)(nil), // 3: envoy.type.matcher.v3.HttpResponseTrailerMatchInput
+ (*HttpRequestQueryParamMatchInput)(nil), // 4: envoy.type.matcher.v3.HttpRequestQueryParamMatchInput
+}
+var file_envoy_type_matcher_v3_http_inputs_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_http_inputs_proto_init() }
+func file_envoy_type_matcher_v3_http_inputs_proto_init() {
+ if File_envoy_type_matcher_v3_http_inputs_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpRequestHeaderMatchInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpRequestTrailerMatchInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpResponseHeaderMatchInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpResponseTrailerMatchInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_http_inputs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpRequestQueryParamMatchInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_http_inputs_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_http_inputs_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_http_inputs_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_http_inputs_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_http_inputs_proto = out.File
+ file_envoy_type_matcher_v3_http_inputs_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_http_inputs_proto_goTypes = nil
+ file_envoy_type_matcher_v3_http_inputs_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.validate.go
new file mode 100644
index 000000000..78de165bd
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs.pb.validate.go
@@ -0,0 +1,615 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/http_inputs.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on HttpRequestHeaderMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HttpRequestHeaderMatchInput) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpRequestHeaderMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// HttpRequestHeaderMatchInputMultiError, or nil if none found.
+func (m *HttpRequestHeaderMatchInput) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpRequestHeaderMatchInput) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if !_HttpRequestHeaderMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) {
+ err := HttpRequestHeaderMatchInputValidationError{
+ field: "HeaderName",
+ reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return HttpRequestHeaderMatchInputMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpRequestHeaderMatchInputMultiError is an error wrapping multiple
+// validation errors returned by HttpRequestHeaderMatchInput.ValidateAll() if
+// the designated constraints aren't met.
+type HttpRequestHeaderMatchInputMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpRequestHeaderMatchInputMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpRequestHeaderMatchInputMultiError) AllErrors() []error { return m }
+
+// HttpRequestHeaderMatchInputValidationError is the validation error returned
+// by HttpRequestHeaderMatchInput.Validate if the designated constraints
+// aren't met.
+type HttpRequestHeaderMatchInputValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpRequestHeaderMatchInputValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpRequestHeaderMatchInputValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpRequestHeaderMatchInputValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpRequestHeaderMatchInputValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpRequestHeaderMatchInputValidationError) ErrorName() string {
+ return "HttpRequestHeaderMatchInputValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpRequestHeaderMatchInputValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpRequestHeaderMatchInput.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpRequestHeaderMatchInputValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpRequestHeaderMatchInputValidationError{}
+
+var _HttpRequestHeaderMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
+
+// Validate checks the field values on HttpRequestTrailerMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HttpRequestTrailerMatchInput) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpRequestTrailerMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// HttpRequestTrailerMatchInputMultiError, or nil if none found.
+func (m *HttpRequestTrailerMatchInput) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpRequestTrailerMatchInput) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if !_HttpRequestTrailerMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) {
+ err := HttpRequestTrailerMatchInputValidationError{
+ field: "HeaderName",
+ reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return HttpRequestTrailerMatchInputMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpRequestTrailerMatchInputMultiError is an error wrapping multiple
+// validation errors returned by HttpRequestTrailerMatchInput.ValidateAll() if
+// the designated constraints aren't met.
+type HttpRequestTrailerMatchInputMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpRequestTrailerMatchInputMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpRequestTrailerMatchInputMultiError) AllErrors() []error { return m }
+
+// HttpRequestTrailerMatchInputValidationError is the validation error returned
+// by HttpRequestTrailerMatchInput.Validate if the designated constraints
+// aren't met.
+type HttpRequestTrailerMatchInputValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpRequestTrailerMatchInputValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpRequestTrailerMatchInputValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpRequestTrailerMatchInputValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpRequestTrailerMatchInputValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpRequestTrailerMatchInputValidationError) ErrorName() string {
+ return "HttpRequestTrailerMatchInputValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpRequestTrailerMatchInputValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpRequestTrailerMatchInput.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpRequestTrailerMatchInputValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpRequestTrailerMatchInputValidationError{}
+
+var _HttpRequestTrailerMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
+
+// Validate checks the field values on HttpResponseHeaderMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HttpResponseHeaderMatchInput) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpResponseHeaderMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// HttpResponseHeaderMatchInputMultiError, or nil if none found.
+func (m *HttpResponseHeaderMatchInput) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpResponseHeaderMatchInput) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if !_HttpResponseHeaderMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) {
+ err := HttpResponseHeaderMatchInputValidationError{
+ field: "HeaderName",
+ reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return HttpResponseHeaderMatchInputMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpResponseHeaderMatchInputMultiError is an error wrapping multiple
+// validation errors returned by HttpResponseHeaderMatchInput.ValidateAll() if
+// the designated constraints aren't met.
+type HttpResponseHeaderMatchInputMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpResponseHeaderMatchInputMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpResponseHeaderMatchInputMultiError) AllErrors() []error { return m }
+
+// HttpResponseHeaderMatchInputValidationError is the validation error returned
+// by HttpResponseHeaderMatchInput.Validate if the designated constraints
+// aren't met.
+type HttpResponseHeaderMatchInputValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpResponseHeaderMatchInputValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpResponseHeaderMatchInputValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpResponseHeaderMatchInputValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpResponseHeaderMatchInputValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpResponseHeaderMatchInputValidationError) ErrorName() string {
+ return "HttpResponseHeaderMatchInputValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpResponseHeaderMatchInputValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpResponseHeaderMatchInput.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpResponseHeaderMatchInputValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpResponseHeaderMatchInputValidationError{}
+
+var _HttpResponseHeaderMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
+
+// Validate checks the field values on HttpResponseTrailerMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HttpResponseTrailerMatchInput) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpResponseTrailerMatchInput with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// HttpResponseTrailerMatchInputMultiError, or nil if none found.
+func (m *HttpResponseTrailerMatchInput) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpResponseTrailerMatchInput) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if !_HttpResponseTrailerMatchInput_HeaderName_Pattern.MatchString(m.GetHeaderName()) {
+ err := HttpResponseTrailerMatchInputValidationError{
+ field: "HeaderName",
+ reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return HttpResponseTrailerMatchInputMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpResponseTrailerMatchInputMultiError is an error wrapping multiple
+// validation errors returned by HttpResponseTrailerMatchInput.ValidateAll()
+// if the designated constraints aren't met.
+type HttpResponseTrailerMatchInputMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpResponseTrailerMatchInputMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpResponseTrailerMatchInputMultiError) AllErrors() []error { return m }
+
+// HttpResponseTrailerMatchInputValidationError is the validation error
+// returned by HttpResponseTrailerMatchInput.Validate if the designated
+// constraints aren't met.
+type HttpResponseTrailerMatchInputValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpResponseTrailerMatchInputValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpResponseTrailerMatchInputValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpResponseTrailerMatchInputValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpResponseTrailerMatchInputValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpResponseTrailerMatchInputValidationError) ErrorName() string {
+ return "HttpResponseTrailerMatchInputValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpResponseTrailerMatchInputValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpResponseTrailerMatchInput.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpResponseTrailerMatchInputValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpResponseTrailerMatchInputValidationError{}
+
+var _HttpResponseTrailerMatchInput_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
+
+// Validate checks the field values on HttpRequestQueryParamMatchInput with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HttpRequestQueryParamMatchInput) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpRequestQueryParamMatchInput with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// HttpRequestQueryParamMatchInputMultiError, or nil if none found.
+func (m *HttpRequestQueryParamMatchInput) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpRequestQueryParamMatchInput) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetQueryParam()) < 1 {
+ err := HttpRequestQueryParamMatchInputValidationError{
+ field: "QueryParam",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return HttpRequestQueryParamMatchInputMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpRequestQueryParamMatchInputMultiError is an error wrapping multiple
+// validation errors returned by HttpRequestQueryParamMatchInput.ValidateAll()
+// if the designated constraints aren't met.
+type HttpRequestQueryParamMatchInputMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpRequestQueryParamMatchInputMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpRequestQueryParamMatchInputMultiError) AllErrors() []error { return m }
+
+// HttpRequestQueryParamMatchInputValidationError is the validation error
+// returned by HttpRequestQueryParamMatchInput.Validate if the designated
+// constraints aren't met.
+type HttpRequestQueryParamMatchInputValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpRequestQueryParamMatchInputValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpRequestQueryParamMatchInputValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpRequestQueryParamMatchInputValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpRequestQueryParamMatchInputValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpRequestQueryParamMatchInputValidationError) ErrorName() string {
+ return "HttpRequestQueryParamMatchInputValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpRequestQueryParamMatchInputValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpRequestQueryParamMatchInput.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpRequestQueryParamMatchInputValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpRequestQueryParamMatchInputValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs_vtproto.pb.go
new file mode 100644
index 000000000..ecf552dc0
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/http_inputs_vtproto.pb.go
@@ -0,0 +1,289 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/http_inputs.proto
+
+package matcherv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *HttpRequestHeaderMatchInput) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpRequestHeaderMatchInput) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpRequestHeaderMatchInput) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.HeaderName) > 0 {
+ i -= len(m.HeaderName)
+ copy(dAtA[i:], m.HeaderName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.HeaderName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpRequestTrailerMatchInput) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpRequestTrailerMatchInput) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpRequestTrailerMatchInput) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.HeaderName) > 0 {
+ i -= len(m.HeaderName)
+ copy(dAtA[i:], m.HeaderName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.HeaderName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpResponseHeaderMatchInput) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpResponseHeaderMatchInput) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpResponseHeaderMatchInput) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.HeaderName) > 0 {
+ i -= len(m.HeaderName)
+ copy(dAtA[i:], m.HeaderName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.HeaderName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpResponseTrailerMatchInput) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpResponseTrailerMatchInput) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpResponseTrailerMatchInput) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.HeaderName) > 0 {
+ i -= len(m.HeaderName)
+ copy(dAtA[i:], m.HeaderName)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.HeaderName)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpRequestQueryParamMatchInput) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpRequestQueryParamMatchInput) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpRequestQueryParamMatchInput) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.QueryParam) > 0 {
+ i -= len(m.QueryParam)
+ copy(dAtA[i:], m.QueryParam)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.QueryParam)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpRequestHeaderMatchInput) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.HeaderName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpRequestTrailerMatchInput) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.HeaderName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpResponseHeaderMatchInput) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.HeaderName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpResponseTrailerMatchInput) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.HeaderName)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpRequestQueryParamMatchInput) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.QueryParam)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.go
new file mode 100644
index 000000000..14a093334
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.go
@@ -0,0 +1,303 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/metadata.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// [#next-major-version: MetadataMatcher should use StructMatcher]
+type MetadataMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The filter name to retrieve the Struct from the Metadata.
+ Filter string `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"`
+ // The path to retrieve the Value from the Struct.
+ Path []*MetadataMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
+ // The MetadataMatcher is matched if the value retrieved by path is matched to this value.
+ Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
+ // If true, the match result will be inverted.
+ Invert bool `protobuf:"varint,4,opt,name=invert,proto3" json:"invert,omitempty"`
+}
+
+func (x *MetadataMatcher) Reset() {
+ *x = MetadataMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataMatcher) ProtoMessage() {}
+
+func (x *MetadataMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataMatcher.ProtoReflect.Descriptor instead.
+func (*MetadataMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_metadata_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *MetadataMatcher) GetFilter() string {
+ if x != nil {
+ return x.Filter
+ }
+ return ""
+}
+
+func (x *MetadataMatcher) GetPath() []*MetadataMatcher_PathSegment {
+ if x != nil {
+ return x.Path
+ }
+ return nil
+}
+
+func (x *MetadataMatcher) GetValue() *ValueMatcher {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+func (x *MetadataMatcher) GetInvert() bool {
+ if x != nil {
+ return x.Invert
+ }
+ return false
+}
+
+// Specifies the segment in a path to retrieve value from Metadata.
+// Note: Currently it's not supported to retrieve a value from a list in Metadata. This means that
+// if the segment key refers to a list, it has to be the last segment in a path.
+type MetadataMatcher_PathSegment struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Segment:
+ //
+ // *MetadataMatcher_PathSegment_Key
+ Segment isMetadataMatcher_PathSegment_Segment `protobuf_oneof:"segment"`
+}
+
+func (x *MetadataMatcher_PathSegment) Reset() {
+ *x = MetadataMatcher_PathSegment{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataMatcher_PathSegment) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataMatcher_PathSegment) ProtoMessage() {}
+
+func (x *MetadataMatcher_PathSegment) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_metadata_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataMatcher_PathSegment.ProtoReflect.Descriptor instead.
+func (*MetadataMatcher_PathSegment) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_metadata_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (m *MetadataMatcher_PathSegment) GetSegment() isMetadataMatcher_PathSegment_Segment {
+ if m != nil {
+ return m.Segment
+ }
+ return nil
+}
+
+func (x *MetadataMatcher_PathSegment) GetKey() string {
+ if x, ok := x.GetSegment().(*MetadataMatcher_PathSegment_Key); ok {
+ return x.Key
+ }
+ return ""
+}
+
+type isMetadataMatcher_PathSegment_Segment interface {
+ isMetadataMatcher_PathSegment_Segment()
+}
+
+type MetadataMatcher_PathSegment_Key struct {
+ // If specified, use the key to retrieve the value in a Struct.
+ Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"`
+}
+
+func (*MetadataMatcher_PathSegment_Key) isMetadataMatcher_PathSegment_Segment() {}
+
+var File_envoy_type_matcher_v3_metadata_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_metadata_proto_rawDesc = []byte{
+ 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xff, 0x02, 0x0a, 0x0f,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12,
+ 0x1f, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
+ 0x12, 0x50, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65,
+ 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61,
+ 0x74, 0x68, 0x12, 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01,
+ 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72,
+ 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x1a,
+ 0x71, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b,
+ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04,
+ 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x35, 0x9a, 0xc5, 0x88,
+ 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65,
+ 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8,
+ 0x42, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x86, 0x01,
+ 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46,
+ 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c,
+ 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70,
+ 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_metadata_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_metadata_proto_rawDescData = file_envoy_type_matcher_v3_metadata_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_metadata_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_metadata_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_metadata_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_metadata_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_envoy_type_matcher_v3_metadata_proto_goTypes = []interface{}{
+ (*MetadataMatcher)(nil), // 0: envoy.type.matcher.v3.MetadataMatcher
+ (*MetadataMatcher_PathSegment)(nil), // 1: envoy.type.matcher.v3.MetadataMatcher.PathSegment
+ (*ValueMatcher)(nil), // 2: envoy.type.matcher.v3.ValueMatcher
+}
+var file_envoy_type_matcher_v3_metadata_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.matcher.v3.MetadataMatcher.path:type_name -> envoy.type.matcher.v3.MetadataMatcher.PathSegment
+ 2, // 1: envoy.type.matcher.v3.MetadataMatcher.value:type_name -> envoy.type.matcher.v3.ValueMatcher
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_metadata_proto_init() }
+func file_envoy_type_matcher_v3_metadata_proto_init() {
+ if File_envoy_type_matcher_v3_metadata_proto != nil {
+ return
+ }
+ file_envoy_type_matcher_v3_value_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataMatcher_PathSegment); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_matcher_v3_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*MetadataMatcher_PathSegment_Key)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_metadata_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_metadata_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_metadata_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_metadata_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_metadata_proto = out.File
+ file_envoy_type_matcher_v3_metadata_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_metadata_proto_goTypes = nil
+ file_envoy_type_matcher_v3_metadata_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.validate.go
new file mode 100644
index 000000000..27c898ee0
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata.pb.validate.go
@@ -0,0 +1,378 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/metadata.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on MetadataMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *MetadataMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MetadataMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MetadataMatcherMultiError, or nil if none found.
+func (m *MetadataMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MetadataMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetFilter()) < 1 {
+ err := MetadataMatcherValidationError{
+ field: "Filter",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetPath()) < 1 {
+ err := MetadataMatcherValidationError{
+ field: "Path",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetPath() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MetadataMatcherValidationError{
+ field: fmt.Sprintf("Path[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MetadataMatcherValidationError{
+ field: fmt.Sprintf("Path[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MetadataMatcherValidationError{
+ field: fmt.Sprintf("Path[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if m.GetValue() == nil {
+ err := MetadataMatcherValidationError{
+ field: "Value",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetValue()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MetadataMatcherValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MetadataMatcherValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MetadataMatcherValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for Invert
+
+ if len(errors) > 0 {
+ return MetadataMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataMatcherMultiError is an error wrapping multiple validation errors
+// returned by MetadataMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type MetadataMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MetadataMatcherMultiError) AllErrors() []error { return m }
+
+// MetadataMatcherValidationError is the validation error returned by
+// MetadataMatcher.Validate if the designated constraints aren't met.
+type MetadataMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataMatcherValidationError) ErrorName() string { return "MetadataMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e MetadataMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMetadataMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataMatcherValidationError{}
+
+// Validate checks the field values on MetadataMatcher_PathSegment with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *MetadataMatcher_PathSegment) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MetadataMatcher_PathSegment with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MetadataMatcher_PathSegmentMultiError, or nil if none found.
+func (m *MetadataMatcher_PathSegment) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MetadataMatcher_PathSegment) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofSegmentPresent := false
+ switch v := m.Segment.(type) {
+ case *MetadataMatcher_PathSegment_Key:
+ if v == nil {
+ err := MetadataMatcher_PathSegmentValidationError{
+ field: "Segment",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofSegmentPresent = true
+
+ if utf8.RuneCountInString(m.GetKey()) < 1 {
+ err := MetadataMatcher_PathSegmentValidationError{
+ field: "Key",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofSegmentPresent {
+ err := MetadataMatcher_PathSegmentValidationError{
+ field: "Segment",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return MetadataMatcher_PathSegmentMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataMatcher_PathSegmentMultiError is an error wrapping multiple
+// validation errors returned by MetadataMatcher_PathSegment.ValidateAll() if
+// the designated constraints aren't met.
+type MetadataMatcher_PathSegmentMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataMatcher_PathSegmentMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MetadataMatcher_PathSegmentMultiError) AllErrors() []error { return m }
+
+// MetadataMatcher_PathSegmentValidationError is the validation error returned
+// by MetadataMatcher_PathSegment.Validate if the designated constraints
+// aren't met.
+type MetadataMatcher_PathSegmentValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataMatcher_PathSegmentValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataMatcher_PathSegmentValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataMatcher_PathSegmentValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataMatcher_PathSegmentValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataMatcher_PathSegmentValidationError) ErrorName() string {
+ return "MetadataMatcher_PathSegmentValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MetadataMatcher_PathSegmentValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMetadataMatcher_PathSegment.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataMatcher_PathSegmentValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataMatcher_PathSegmentValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata_vtproto.pb.go
new file mode 100644
index 000000000..4050e14c2
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/metadata_vtproto.pb.go
@@ -0,0 +1,195 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/metadata.proto
+
+package matcherv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *MetadataMatcher_PathSegment) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetadataMatcher_PathSegment) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataMatcher_PathSegment) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Segment.(*MetadataMatcher_PathSegment_Key); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MetadataMatcher_PathSegment_Key) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataMatcher_PathSegment_Key) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+func (m *MetadataMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetadataMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Invert {
+ i--
+ if m.Invert {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ }
+ if m.Value != nil {
+ size, err := m.Value.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Path) > 0 {
+ for iNdEx := len(m.Path) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Path[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Filter) > 0 {
+ i -= len(m.Filter)
+ copy(dAtA[i:], m.Filter)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Filter)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MetadataMatcher_PathSegment) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Segment.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *MetadataMatcher_PathSegment_Key) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *MetadataMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Filter)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Path) > 0 {
+ for _, e := range m.Path {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.Value != nil {
+ l = m.Value.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.Invert {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.go
new file mode 100644
index 000000000..d6083cb27
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.go
@@ -0,0 +1,189 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/node.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Specifies the way to match a Node.
+// The match follows AND semantics.
+type NodeMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Specifies match criteria on the node id.
+ NodeId *StringMatcher `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
+ // Specifies match criteria on the node metadata.
+ NodeMetadatas []*StructMatcher `protobuf:"bytes,2,rep,name=node_metadatas,json=nodeMetadatas,proto3" json:"node_metadatas,omitempty"`
+}
+
+func (x *NodeMatcher) Reset() {
+ *x = NodeMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_node_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NodeMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NodeMatcher) ProtoMessage() {}
+
+func (x *NodeMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_node_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use NodeMatcher.ProtoReflect.Descriptor instead.
+func (*NodeMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_node_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *NodeMatcher) GetNodeId() *StringMatcher {
+ if x != nil {
+ return x.NodeId
+ }
+ return nil
+}
+
+func (x *NodeMatcher) GetNodeMetadatas() []*StructMatcher {
+ if x != nil {
+ return x.NodeMetadatas
+ }
+ return nil
+}
+
+var File_envoy_type_matcher_v3_node_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_node_proto_rawDesc = []byte{
+ 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33,
+ 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65,
+ 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0xc0, 0x01, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x12, 0x3d, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65,
+ 0x49, 0x64, 0x12, 0x4b, 0x0a, 0x0e, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x52, 0x0d, 0x6e, 0x6f, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x73, 0x3a,
+ 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x82, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10,
+ 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f,
+ 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76,
+ 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_node_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_node_proto_rawDescData = file_envoy_type_matcher_v3_node_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_node_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_node_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_node_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_node_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_node_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_node_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_type_matcher_v3_node_proto_goTypes = []interface{}{
+ (*NodeMatcher)(nil), // 0: envoy.type.matcher.v3.NodeMatcher
+ (*StringMatcher)(nil), // 1: envoy.type.matcher.v3.StringMatcher
+ (*StructMatcher)(nil), // 2: envoy.type.matcher.v3.StructMatcher
+}
+var file_envoy_type_matcher_v3_node_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.matcher.v3.NodeMatcher.node_id:type_name -> envoy.type.matcher.v3.StringMatcher
+ 2, // 1: envoy.type.matcher.v3.NodeMatcher.node_metadatas:type_name -> envoy.type.matcher.v3.StructMatcher
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_node_proto_init() }
+func file_envoy_type_matcher_v3_node_proto_init() {
+ if File_envoy_type_matcher_v3_node_proto != nil {
+ return
+ }
+ file_envoy_type_matcher_v3_string_proto_init()
+ file_envoy_type_matcher_v3_struct_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_node_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NodeMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_node_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_node_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_node_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_node_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_node_proto = out.File
+ file_envoy_type_matcher_v3_node_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_node_proto_goTypes = nil
+ file_envoy_type_matcher_v3_node_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.validate.go
new file mode 100644
index 000000000..62aa27f7a
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node.pb.validate.go
@@ -0,0 +1,199 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/node.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on NodeMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *NodeMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on NodeMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in NodeMatcherMultiError, or
+// nil if none found.
+func (m *NodeMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *NodeMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetNodeId()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, NodeMatcherValidationError{
+ field: "NodeId",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, NodeMatcherValidationError{
+ field: "NodeId",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNodeId()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return NodeMatcherValidationError{
+ field: "NodeId",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ for idx, item := range m.GetNodeMetadatas() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, NodeMatcherValidationError{
+ field: fmt.Sprintf("NodeMetadatas[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, NodeMatcherValidationError{
+ field: fmt.Sprintf("NodeMetadatas[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return NodeMatcherValidationError{
+ field: fmt.Sprintf("NodeMetadatas[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return NodeMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// NodeMatcherMultiError is an error wrapping multiple validation errors
+// returned by NodeMatcher.ValidateAll() if the designated constraints aren't met.
+type NodeMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m NodeMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m NodeMatcherMultiError) AllErrors() []error { return m }
+
+// NodeMatcherValidationError is the validation error returned by
+// NodeMatcher.Validate if the designated constraints aren't met.
+type NodeMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e NodeMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e NodeMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e NodeMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e NodeMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e NodeMatcherValidationError) ErrorName() string { return "NodeMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e NodeMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sNodeMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = NodeMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = NodeMatcherValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node_vtproto.pb.go
new file mode 100644
index 000000000..3bea65da7
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/node_vtproto.pb.go
@@ -0,0 +1,94 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/node.proto
+
+package matcherv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *NodeMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *NodeMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *NodeMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.NodeMetadatas) > 0 {
+ for iNdEx := len(m.NodeMetadatas) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.NodeMetadatas[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if m.NodeId != nil {
+ size, err := m.NodeId.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *NodeMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.NodeId != nil {
+ l = m.NodeId.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.NodeMetadatas) > 0 {
+ for _, e := range m.NodeMetadatas {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.go
new file mode 100644
index 000000000..2ad4bccfa
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.go
@@ -0,0 +1,213 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/number.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/type/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Specifies the way to match a double value.
+type DoubleMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to MatchPattern:
+ //
+ // *DoubleMatcher_Range
+ // *DoubleMatcher_Exact
+ MatchPattern isDoubleMatcher_MatchPattern `protobuf_oneof:"match_pattern"`
+}
+
+func (x *DoubleMatcher) Reset() {
+ *x = DoubleMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_number_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DoubleMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DoubleMatcher) ProtoMessage() {}
+
+func (x *DoubleMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_number_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DoubleMatcher.ProtoReflect.Descriptor instead.
+func (*DoubleMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_number_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *DoubleMatcher) GetMatchPattern() isDoubleMatcher_MatchPattern {
+ if m != nil {
+ return m.MatchPattern
+ }
+ return nil
+}
+
+func (x *DoubleMatcher) GetRange() *v3.DoubleRange {
+ if x, ok := x.GetMatchPattern().(*DoubleMatcher_Range); ok {
+ return x.Range
+ }
+ return nil
+}
+
+func (x *DoubleMatcher) GetExact() float64 {
+ if x, ok := x.GetMatchPattern().(*DoubleMatcher_Exact); ok {
+ return x.Exact
+ }
+ return 0
+}
+
+type isDoubleMatcher_MatchPattern interface {
+ isDoubleMatcher_MatchPattern()
+}
+
+type DoubleMatcher_Range struct {
+ // If specified, the input double value must be in the range specified here.
+ // Note: The range is using half-open interval semantics [start, end).
+ Range *v3.DoubleRange `protobuf:"bytes,1,opt,name=range,proto3,oneof"`
+}
+
+type DoubleMatcher_Exact struct {
+ // If specified, the input double value must be equal to the value specified here.
+ Exact float64 `protobuf:"fixed64,2,opt,name=exact,proto3,oneof"`
+}
+
+func (*DoubleMatcher_Range) isDoubleMatcher_MatchPattern() {}
+
+func (*DoubleMatcher_Exact) isDoubleMatcher_MatchPattern() {}
+
+var File_envoy_type_matcher_v3_number_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_number_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x19, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x6e, 0x67, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69,
+ 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x0d, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x48, 0x00,
+ 0x52, 0x05, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74, 0x3a,
+ 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c,
+ 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x84,
+ 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b,
+ 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70,
+ 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d,
+ 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65,
+ 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_number_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_number_proto_rawDescData = file_envoy_type_matcher_v3_number_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_number_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_number_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_number_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_number_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_number_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_number_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_type_matcher_v3_number_proto_goTypes = []interface{}{
+ (*DoubleMatcher)(nil), // 0: envoy.type.matcher.v3.DoubleMatcher
+ (*v3.DoubleRange)(nil), // 1: envoy.type.v3.DoubleRange
+}
+var file_envoy_type_matcher_v3_number_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.matcher.v3.DoubleMatcher.range:type_name -> envoy.type.v3.DoubleRange
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_number_proto_init() }
+func file_envoy_type_matcher_v3_number_proto_init() {
+ if File_envoy_type_matcher_v3_number_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_number_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DoubleMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_matcher_v3_number_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*DoubleMatcher_Range)(nil),
+ (*DoubleMatcher_Exact)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_number_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_number_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_number_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_number_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_number_proto = out.File
+ file_envoy_type_matcher_v3_number_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_number_proto_goTypes = nil
+ file_envoy_type_matcher_v3_number_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.validate.go
new file mode 100644
index 000000000..b019d7d01
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number.pb.validate.go
@@ -0,0 +1,208 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/number.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on DoubleMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *DoubleMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DoubleMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in DoubleMatcherMultiError, or
+// nil if none found.
+func (m *DoubleMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DoubleMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofMatchPatternPresent := false
+ switch v := m.MatchPattern.(type) {
+ case *DoubleMatcher_Range:
+ if v == nil {
+ err := DoubleMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if all {
+ switch v := interface{}(m.GetRange()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, DoubleMatcherValidationError{
+ field: "Range",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, DoubleMatcherValidationError{
+ field: "Range",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRange()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return DoubleMatcherValidationError{
+ field: "Range",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *DoubleMatcher_Exact:
+ if v == nil {
+ err := DoubleMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+ // no validation rules for Exact
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofMatchPatternPresent {
+ err := DoubleMatcherValidationError{
+ field: "MatchPattern",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return DoubleMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// DoubleMatcherMultiError is an error wrapping multiple validation errors
+// returned by DoubleMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type DoubleMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DoubleMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DoubleMatcherMultiError) AllErrors() []error { return m }
+
+// DoubleMatcherValidationError is the validation error returned by
+// DoubleMatcher.Validate if the designated constraints aren't met.
+type DoubleMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DoubleMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DoubleMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DoubleMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DoubleMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DoubleMatcherValidationError) ErrorName() string { return "DoubleMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e DoubleMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDoubleMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DoubleMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DoubleMatcherValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number_vtproto.pb.go
new file mode 100644
index 000000000..7315258ab
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/number_vtproto.pb.go
@@ -0,0 +1,160 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/number.proto
+
+package matcherv3
+
+import (
+ binary "encoding/binary"
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ math "math"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *DoubleMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DoubleMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DoubleMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.MatchPattern.(*DoubleMatcher_Exact); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*DoubleMatcher_Range); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DoubleMatcher_Range) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DoubleMatcher_Range) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Range != nil {
+ if vtmsg, ok := interface{}(m.Range).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Range)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *DoubleMatcher_Exact) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DoubleMatcher_Exact) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= 8
+ binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Exact))))
+ i--
+ dAtA[i] = 0x11
+ return len(dAtA) - i, nil
+}
+func (m *DoubleMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.MatchPattern.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DoubleMatcher_Range) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Range != nil {
+ if size, ok := interface{}(m.Range).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Range)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *DoubleMatcher_Exact) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 9
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.go
new file mode 100644
index 000000000..aac680dbe
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.go
@@ -0,0 +1,197 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/path.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Specifies the way to match a path on HTTP request.
+type PathMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Rule:
+ //
+ // *PathMatcher_Path
+ Rule isPathMatcher_Rule `protobuf_oneof:"rule"`
+}
+
+func (x *PathMatcher) Reset() {
+ *x = PathMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_path_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PathMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PathMatcher) ProtoMessage() {}
+
+func (x *PathMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_path_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use PathMatcher.ProtoReflect.Descriptor instead.
+func (*PathMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_path_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *PathMatcher) GetRule() isPathMatcher_Rule {
+ if m != nil {
+ return m.Rule
+ }
+ return nil
+}
+
+func (x *PathMatcher) GetPath() *StringMatcher {
+ if x, ok := x.GetRule().(*PathMatcher_Path); ok {
+ return x.Path
+ }
+ return nil
+}
+
+type isPathMatcher_Rule interface {
+ isPathMatcher_Rule()
+}
+
+type PathMatcher_Path struct {
+ // The “path“ must match the URL path portion of the :path header. The query and fragment
+ // string (if present) are removed in the URL path portion.
+ // For example, the path “/data“ will match the “:path“ header “/data#fragment?param=value“.
+ Path *StringMatcher `protobuf:"bytes,1,opt,name=path,proto3,oneof"`
+}
+
+func (*PathMatcher_Path) isPathMatcher_Rule() {}
+
+var File_envoy_type_matcher_v3_path_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_path_proto_rawDesc = []byte{
+ 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33,
+ 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75,
+ 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64,
+ 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x74,
+ 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53,
+ 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42,
+ 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x25,
+ 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x0b, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x03, 0xf8,
+ 0x42, 0x01, 0x42, 0x82, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69,
+ 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x42, 0x09, 0x50, 0x61, 0x74, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
+ 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
+ 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79,
+ 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_path_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_path_proto_rawDescData = file_envoy_type_matcher_v3_path_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_path_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_path_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_path_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_path_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_path_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_path_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_type_matcher_v3_path_proto_goTypes = []interface{}{
+ (*PathMatcher)(nil), // 0: envoy.type.matcher.v3.PathMatcher
+ (*StringMatcher)(nil), // 1: envoy.type.matcher.v3.StringMatcher
+}
+var file_envoy_type_matcher_v3_path_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.matcher.v3.PathMatcher.path:type_name -> envoy.type.matcher.v3.StringMatcher
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_path_proto_init() }
+func file_envoy_type_matcher_v3_path_proto_init() {
+ if File_envoy_type_matcher_v3_path_proto != nil {
+ return
+ }
+ file_envoy_type_matcher_v3_string_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_path_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PathMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_matcher_v3_path_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*PathMatcher_Path)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_path_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_path_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_path_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_path_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_path_proto = out.File
+ file_envoy_type_matcher_v3_path_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_path_proto_goTypes = nil
+ file_envoy_type_matcher_v3_path_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.validate.go
new file mode 100644
index 000000000..a978c99ab
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path.pb.validate.go
@@ -0,0 +1,205 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/path.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on PathMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *PathMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on PathMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in PathMatcherMultiError, or
+// nil if none found.
+func (m *PathMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *PathMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofRulePresent := false
+ switch v := m.Rule.(type) {
+ case *PathMatcher_Path:
+ if v == nil {
+ err := PathMatcherValidationError{
+ field: "Rule",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofRulePresent = true
+
+ if m.GetPath() == nil {
+ err := PathMatcherValidationError{
+ field: "Path",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPath()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, PathMatcherValidationError{
+ field: "Path",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, PathMatcherValidationError{
+ field: "Path",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPath()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return PathMatcherValidationError{
+ field: "Path",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofRulePresent {
+ err := PathMatcherValidationError{
+ field: "Rule",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return PathMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// PathMatcherMultiError is an error wrapping multiple validation errors
+// returned by PathMatcher.ValidateAll() if the designated constraints aren't met.
+type PathMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PathMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PathMatcherMultiError) AllErrors() []error { return m }
+
+// PathMatcherValidationError is the validation error returned by
+// PathMatcher.Validate if the designated constraints aren't met.
+type PathMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PathMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PathMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PathMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PathMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PathMatcherValidationError) ErrorName() string { return "PathMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e PathMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sPathMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PathMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PathMatcherValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path_vtproto.pb.go
new file mode 100644
index 000000000..044fe9db2
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/path_vtproto.pb.go
@@ -0,0 +1,110 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/path.proto
+
+package matcherv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *PathMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *PathMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PathMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Rule.(*PathMatcher_Path); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *PathMatcher_Path) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *PathMatcher_Path) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Path != nil {
+ size, err := m.Path.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *PathMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Rule.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *PathMatcher_Path) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Path != nil {
+ l = m.Path.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.go
new file mode 100644
index 000000000..383bb267c
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.go
@@ -0,0 +1,415 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/regex.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/go-control-plane/envoy/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// A regex matcher designed for safety when used with untrusted input.
+type RegexMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to EngineType:
+ //
+ // *RegexMatcher_GoogleRe2
+ EngineType isRegexMatcher_EngineType `protobuf_oneof:"engine_type"`
+ // The regex match string. The string must be supported by the configured engine. The regex is matched
+ // against the full string, not as a partial match.
+ Regex string `protobuf:"bytes,2,opt,name=regex,proto3" json:"regex,omitempty"`
+}
+
+func (x *RegexMatcher) Reset() {
+ *x = RegexMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegexMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegexMatcher) ProtoMessage() {}
+
+func (x *RegexMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegexMatcher.ProtoReflect.Descriptor instead.
+func (*RegexMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *RegexMatcher) GetEngineType() isRegexMatcher_EngineType {
+ if m != nil {
+ return m.EngineType
+ }
+ return nil
+}
+
+// Deprecated: Marked as deprecated in envoy/type/matcher/v3/regex.proto.
+func (x *RegexMatcher) GetGoogleRe2() *RegexMatcher_GoogleRE2 {
+ if x, ok := x.GetEngineType().(*RegexMatcher_GoogleRe2); ok {
+ return x.GoogleRe2
+ }
+ return nil
+}
+
+func (x *RegexMatcher) GetRegex() string {
+ if x != nil {
+ return x.Regex
+ }
+ return ""
+}
+
+type isRegexMatcher_EngineType interface {
+ isRegexMatcher_EngineType()
+}
+
+type RegexMatcher_GoogleRe2 struct {
+ // Google's RE2 regex engine.
+ //
+ // Deprecated: Marked as deprecated in envoy/type/matcher/v3/regex.proto.
+ GoogleRe2 *RegexMatcher_GoogleRE2 `protobuf:"bytes,1,opt,name=google_re2,json=googleRe2,proto3,oneof"`
+}
+
+func (*RegexMatcher_GoogleRe2) isRegexMatcher_EngineType() {}
+
+// Describes how to match a string and then produce a new string using a regular
+// expression and a substitution string.
+type RegexMatchAndSubstitute struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The regular expression used to find portions of a string (hereafter called
+ // the "subject string") that should be replaced. When a new string is
+ // produced during the substitution operation, the new string is initially
+ // the same as the subject string, but then all matches in the subject string
+ // are replaced by the substitution string. If replacing all matches isn't
+ // desired, regular expression anchors can be used to ensure a single match,
+ // so as to replace just one occurrence of a pattern. Capture groups can be
+ // used in the pattern to extract portions of the subject string, and then
+ // referenced in the substitution string.
+ Pattern *RegexMatcher `protobuf:"bytes,1,opt,name=pattern,proto3" json:"pattern,omitempty"`
+ // The string that should be substituted into matching portions of the
+ // subject string during a substitution operation to produce a new string.
+ // Capture groups in the pattern can be referenced in the substitution
+ // string. Note, however, that the syntax for referring to capture groups is
+ // defined by the chosen regular expression engine. Google's `RE2
+ // `_ regular expression engine uses a
+ // backslash followed by the capture group number to denote a numbered
+ // capture group. E.g., “\1“ refers to capture group 1, and “\2“ refers
+ // to capture group 2.
+ Substitution string `protobuf:"bytes,2,opt,name=substitution,proto3" json:"substitution,omitempty"`
+}
+
+func (x *RegexMatchAndSubstitute) Reset() {
+ *x = RegexMatchAndSubstitute{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegexMatchAndSubstitute) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegexMatchAndSubstitute) ProtoMessage() {}
+
+func (x *RegexMatchAndSubstitute) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegexMatchAndSubstitute.ProtoReflect.Descriptor instead.
+func (*RegexMatchAndSubstitute) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_regex_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RegexMatchAndSubstitute) GetPattern() *RegexMatcher {
+ if x != nil {
+ return x.Pattern
+ }
+ return nil
+}
+
+func (x *RegexMatchAndSubstitute) GetSubstitution() string {
+ if x != nil {
+ return x.Substitution
+ }
+ return ""
+}
+
+// Google's `RE2 `_ regex engine. The regex string must adhere to
+// the documented `syntax `_. The engine is designed
+// to complete execution in linear time as well as limit the amount of memory used.
+//
+// Envoy supports program size checking via runtime. The runtime keys “re2.max_program_size.error_level“
+// and “re2.max_program_size.warn_level“ can be set to integers as the maximum program size or
+// complexity that a compiled regex can have before an exception is thrown or a warning is
+// logged, respectively. “re2.max_program_size.error_level“ defaults to 100, and
+// “re2.max_program_size.warn_level“ has no default if unset (will not check/log a warning).
+//
+// Envoy emits two stats for tracking the program size of regexes: the histogram “re2.program_size“,
+// which records the program size, and the counter “re2.exceeded_warn_level“, which is incremented
+// each time the program size exceeds the warn level threshold.
+type RegexMatcher_GoogleRE2 struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // This field controls the RE2 "program size" which is a rough estimate of how complex a
+ // compiled regex is to evaluate. A regex that has a program size greater than the configured
+ // value will fail to compile. In this case, the configured max program size can be increased
+ // or the regex can be simplified. If not specified, the default is 100.
+ //
+ // This field is deprecated; regexp validation should be performed on the management server
+ // instead of being done by each individual client.
+ //
+ // .. note::
+ //
+ // Although this field is deprecated, the program size will still be checked against the
+ // global ``re2.max_program_size.error_level`` runtime value.
+ //
+ // Deprecated: Marked as deprecated in envoy/type/matcher/v3/regex.proto.
+ MaxProgramSize *wrapperspb.UInt32Value `protobuf:"bytes,1,opt,name=max_program_size,json=maxProgramSize,proto3" json:"max_program_size,omitempty"`
+}
+
+func (x *RegexMatcher_GoogleRE2) Reset() {
+ *x = RegexMatcher_GoogleRE2{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegexMatcher_GoogleRE2) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegexMatcher_GoogleRE2) ProtoMessage() {}
+
+func (x *RegexMatcher_GoogleRE2) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_regex_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RegexMatcher_GoogleRE2.ProtoReflect.Descriptor instead.
+func (*RegexMatcher_GoogleRE2) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_regex_proto_rawDescGZIP(), []int{0, 0}
+}
+
+// Deprecated: Marked as deprecated in envoy/type/matcher/v3/regex.proto.
+func (x *RegexMatcher_GoogleRE2) GetMaxProgramSize() *wrapperspb.UInt32Value {
+ if x != nil {
+ return x.MaxProgramSize
+ }
+ return nil
+}
+
+var File_envoy_type_matcher_v3_regex_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_regex_proto_rawDesc = []byte{
+ 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70,
+ 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x64, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd6, 0x02, 0x0a, 0x0c, 0x52,
+ 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x0a, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x42, 0x0b,
+ 0x92, 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x48, 0x00, 0x52, 0x09, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x65, 0x32, 0x12, 0x1d, 0x0a, 0x05, 0x72, 0x65, 0x67, 0x65,
+ 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
+ 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x1a, 0x92, 0x01, 0x0a, 0x09, 0x47, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x52, 0x45, 0x32, 0x12, 0x53, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x6f,
+ 0x67, 0x72, 0x61, 0x6d, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x0b, 0x92,
+ 0xc7, 0x86, 0xd8, 0x04, 0x03, 0x33, 0x2e, 0x30, 0x18, 0x01, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x50,
+ 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x53, 0x69, 0x7a, 0x65, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e,
+ 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x52, 0x45, 0x32, 0x3a, 0x26, 0x9a, 0xc5,
+ 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x42, 0x0d, 0x0a, 0x0b, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x22, 0xc6, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x41, 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x12,
+ 0x47, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52,
+ 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x2f, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x73,
+ 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0b,
+ 0xfa, 0x42, 0x08, 0x72, 0x06, 0xc8, 0x01, 0x00, 0xc0, 0x01, 0x02, 0x52, 0x0c, 0x73, 0x75, 0x62,
+ 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x31, 0x9a, 0xc5, 0x88, 0x1e, 0x2c,
+ 0x0a, 0x2a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x41,
+ 0x6e, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x65, 0x42, 0x83, 0x01, 0xba,
+ 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x52, 0x65,
+ 0x67, 0x65, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78,
+ 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61,
+ 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_regex_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_regex_proto_rawDescData = file_envoy_type_matcher_v3_regex_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_regex_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_regex_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_regex_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_regex_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_regex_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_regex_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_envoy_type_matcher_v3_regex_proto_goTypes = []interface{}{
+ (*RegexMatcher)(nil), // 0: envoy.type.matcher.v3.RegexMatcher
+ (*RegexMatchAndSubstitute)(nil), // 1: envoy.type.matcher.v3.RegexMatchAndSubstitute
+ (*RegexMatcher_GoogleRE2)(nil), // 2: envoy.type.matcher.v3.RegexMatcher.GoogleRE2
+ (*wrapperspb.UInt32Value)(nil), // 3: google.protobuf.UInt32Value
+}
+var file_envoy_type_matcher_v3_regex_proto_depIdxs = []int32{
+ 2, // 0: envoy.type.matcher.v3.RegexMatcher.google_re2:type_name -> envoy.type.matcher.v3.RegexMatcher.GoogleRE2
+ 0, // 1: envoy.type.matcher.v3.RegexMatchAndSubstitute.pattern:type_name -> envoy.type.matcher.v3.RegexMatcher
+ 3, // 2: envoy.type.matcher.v3.RegexMatcher.GoogleRE2.max_program_size:type_name -> google.protobuf.UInt32Value
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_regex_proto_init() }
+func file_envoy_type_matcher_v3_regex_proto_init() {
+ if File_envoy_type_matcher_v3_regex_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_regex_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegexMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_regex_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegexMatchAndSubstitute); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_regex_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegexMatcher_GoogleRE2); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_matcher_v3_regex_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*RegexMatcher_GoogleRe2)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_regex_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_regex_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_regex_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_regex_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_regex_proto = out.File
+ file_envoy_type_matcher_v3_regex_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_regex_proto_goTypes = nil
+ file_envoy_type_matcher_v3_regex_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.validate.go
new file mode 100644
index 000000000..bb00d0cd7
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex.pb.validate.go
@@ -0,0 +1,479 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/regex.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on RegexMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *RegexMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RegexMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in RegexMatcherMultiError, or
+// nil if none found.
+func (m *RegexMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RegexMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetRegex()) < 1 {
+ err := RegexMatcherValidationError{
+ field: "Regex",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ switch v := m.EngineType.(type) {
+ case *RegexMatcher_GoogleRe2:
+ if v == nil {
+ err := RegexMatcherValidationError{
+ field: "EngineType",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetGoogleRe2()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RegexMatcherValidationError{
+ field: "GoogleRe2",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RegexMatcherValidationError{
+ field: "GoogleRe2",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetGoogleRe2()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RegexMatcherValidationError{
+ field: "GoogleRe2",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+
+ if len(errors) > 0 {
+ return RegexMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// RegexMatcherMultiError is an error wrapping multiple validation errors
+// returned by RegexMatcher.ValidateAll() if the designated constraints aren't met.
+type RegexMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RegexMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RegexMatcherMultiError) AllErrors() []error { return m }
+
+// RegexMatcherValidationError is the validation error returned by
+// RegexMatcher.Validate if the designated constraints aren't met.
+type RegexMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RegexMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RegexMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RegexMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RegexMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RegexMatcherValidationError) ErrorName() string { return "RegexMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e RegexMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRegexMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RegexMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RegexMatcherValidationError{}
+
+// Validate checks the field values on RegexMatchAndSubstitute with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *RegexMatchAndSubstitute) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RegexMatchAndSubstitute with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// RegexMatchAndSubstituteMultiError, or nil if none found.
+func (m *RegexMatchAndSubstitute) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RegexMatchAndSubstitute) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetPattern() == nil {
+ err := RegexMatchAndSubstituteValidationError{
+ field: "Pattern",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetPattern()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RegexMatchAndSubstituteValidationError{
+ field: "Pattern",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RegexMatchAndSubstituteValidationError{
+ field: "Pattern",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetPattern()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RegexMatchAndSubstituteValidationError{
+ field: "Pattern",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if !_RegexMatchAndSubstitute_Substitution_Pattern.MatchString(m.GetSubstitution()) {
+ err := RegexMatchAndSubstituteValidationError{
+ field: "Substitution",
+ reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return RegexMatchAndSubstituteMultiError(errors)
+ }
+
+ return nil
+}
+
+// RegexMatchAndSubstituteMultiError is an error wrapping multiple validation
+// errors returned by RegexMatchAndSubstitute.ValidateAll() if the designated
+// constraints aren't met.
+type RegexMatchAndSubstituteMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RegexMatchAndSubstituteMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RegexMatchAndSubstituteMultiError) AllErrors() []error { return m }
+
+// RegexMatchAndSubstituteValidationError is the validation error returned by
+// RegexMatchAndSubstitute.Validate if the designated constraints aren't met.
+type RegexMatchAndSubstituteValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RegexMatchAndSubstituteValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RegexMatchAndSubstituteValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RegexMatchAndSubstituteValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RegexMatchAndSubstituteValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RegexMatchAndSubstituteValidationError) ErrorName() string {
+ return "RegexMatchAndSubstituteValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e RegexMatchAndSubstituteValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRegexMatchAndSubstitute.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RegexMatchAndSubstituteValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RegexMatchAndSubstituteValidationError{}
+
+var _RegexMatchAndSubstitute_Substitution_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
+
+// Validate checks the field values on RegexMatcher_GoogleRE2 with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *RegexMatcher_GoogleRE2) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RegexMatcher_GoogleRE2 with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// RegexMatcher_GoogleRE2MultiError, or nil if none found.
+func (m *RegexMatcher_GoogleRE2) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RegexMatcher_GoogleRE2) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetMaxProgramSize()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RegexMatcher_GoogleRE2ValidationError{
+ field: "MaxProgramSize",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RegexMatcher_GoogleRE2ValidationError{
+ field: "MaxProgramSize",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMaxProgramSize()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RegexMatcher_GoogleRE2ValidationError{
+ field: "MaxProgramSize",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return RegexMatcher_GoogleRE2MultiError(errors)
+ }
+
+ return nil
+}
+
+// RegexMatcher_GoogleRE2MultiError is an error wrapping multiple validation
+// errors returned by RegexMatcher_GoogleRE2.ValidateAll() if the designated
+// constraints aren't met.
+type RegexMatcher_GoogleRE2MultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RegexMatcher_GoogleRE2MultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RegexMatcher_GoogleRE2MultiError) AllErrors() []error { return m }
+
+// RegexMatcher_GoogleRE2ValidationError is the validation error returned by
+// RegexMatcher_GoogleRE2.Validate if the designated constraints aren't met.
+type RegexMatcher_GoogleRE2ValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RegexMatcher_GoogleRE2ValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RegexMatcher_GoogleRE2ValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RegexMatcher_GoogleRE2ValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RegexMatcher_GoogleRE2ValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RegexMatcher_GoogleRE2ValidationError) ErrorName() string {
+ return "RegexMatcher_GoogleRE2ValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e RegexMatcher_GoogleRE2ValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRegexMatcher_GoogleRE2.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RegexMatcher_GoogleRE2ValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RegexMatcher_GoogleRE2ValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex_vtproto.pb.go
new file mode 100644
index 000000000..234f07193
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/regex_vtproto.pb.go
@@ -0,0 +1,246 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/regex.proto
+
+package matcherv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *RegexMatcher_GoogleRE2) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RegexMatcher_GoogleRE2) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RegexMatcher_GoogleRE2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.MaxProgramSize != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.MaxProgramSize).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *RegexMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RegexMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RegexMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Regex) > 0 {
+ i -= len(m.Regex)
+ copy(dAtA[i:], m.Regex)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Regex)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if msg, ok := m.EngineType.(*RegexMatcher_GoogleRe2); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *RegexMatcher_GoogleRe2) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RegexMatcher_GoogleRe2) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.GoogleRe2 != nil {
+ size, err := m.GoogleRe2.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *RegexMatchAndSubstitute) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RegexMatchAndSubstitute) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RegexMatchAndSubstitute) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Substitution) > 0 {
+ i -= len(m.Substitution)
+ copy(dAtA[i:], m.Substitution)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Substitution)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Pattern != nil {
+ size, err := m.Pattern.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *RegexMatcher_GoogleRE2) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.MaxProgramSize != nil {
+ l = (*wrapperspb.UInt32Value)(m.MaxProgramSize).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *RegexMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.EngineType.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ l = len(m.Regex)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *RegexMatcher_GoogleRe2) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.GoogleRe2 != nil {
+ l = m.GoogleRe2.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *RegexMatchAndSubstitute) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Pattern != nil {
+ l = m.Pattern.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.Substitution)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.go
new file mode 100644
index 000000000..3da1aae4e
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.go
@@ -0,0 +1,204 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/status_code_input.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Match input indicates that matching should be done on the response status
+// code.
+type HttpResponseStatusCodeMatchInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *HttpResponseStatusCodeMatchInput) Reset() {
+ *x = HttpResponseStatusCodeMatchInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpResponseStatusCodeMatchInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpResponseStatusCodeMatchInput) ProtoMessage() {}
+
+func (x *HttpResponseStatusCodeMatchInput) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpResponseStatusCodeMatchInput.ProtoReflect.Descriptor instead.
+func (*HttpResponseStatusCodeMatchInput) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_status_code_input_proto_rawDescGZIP(), []int{0}
+}
+
+// Match input indicates that the matching should be done on the class of the
+// response status code. For eg: 1xx, 2xx, 3xx, 4xx or 5xx.
+type HttpResponseStatusCodeClassMatchInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *HttpResponseStatusCodeClassMatchInput) Reset() {
+ *x = HttpResponseStatusCodeClassMatchInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpResponseStatusCodeClassMatchInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpResponseStatusCodeClassMatchInput) ProtoMessage() {}
+
+func (x *HttpResponseStatusCodeClassMatchInput) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpResponseStatusCodeClassMatchInput.ProtoReflect.Descriptor instead.
+func (*HttpResponseStatusCodeClassMatchInput) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_status_code_input_proto_rawDescGZIP(), []int{1}
+}
+
+var File_envoy_type_matcher_v3_status_code_input_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_status_code_input_proto_rawDesc = []byte{
+ 0x0a, 0x2d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x63,
+ 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
+ 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, 0x20, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x27, 0x0a, 0x25, 0x48, 0x74, 0x74,
+ 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43,
+ 0x6f, 0x64, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x49, 0x6e, 0x70,
+ 0x75, 0x74, 0x42, 0x8d, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69,
+ 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x42, 0x14, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e,
+ 0x70, 0x75, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78,
+ 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61,
+ 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_status_code_input_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_status_code_input_proto_rawDescData = file_envoy_type_matcher_v3_status_code_input_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_status_code_input_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_status_code_input_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_status_code_input_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_status_code_input_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_status_code_input_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_status_code_input_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_envoy_type_matcher_v3_status_code_input_proto_goTypes = []interface{}{
+ (*HttpResponseStatusCodeMatchInput)(nil), // 0: envoy.type.matcher.v3.HttpResponseStatusCodeMatchInput
+ (*HttpResponseStatusCodeClassMatchInput)(nil), // 1: envoy.type.matcher.v3.HttpResponseStatusCodeClassMatchInput
+}
+var file_envoy_type_matcher_v3_status_code_input_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_status_code_input_proto_init() }
+func file_envoy_type_matcher_v3_status_code_input_proto_init() {
+ if File_envoy_type_matcher_v3_status_code_input_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpResponseStatusCodeMatchInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_status_code_input_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpResponseStatusCodeClassMatchInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_status_code_input_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_status_code_input_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_status_code_input_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_status_code_input_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_status_code_input_proto = out.File
+ file_envoy_type_matcher_v3_status_code_input_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_status_code_input_proto_goTypes = nil
+ file_envoy_type_matcher_v3_status_code_input_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.validate.go
new file mode 100644
index 000000000..b09b90c13
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input.pb.validate.go
@@ -0,0 +1,247 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/status_code_input.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on HttpResponseStatusCodeMatchInput with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the first error encountered is returned, or nil if there are
+// no violations.
+func (m *HttpResponseStatusCodeMatchInput) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpResponseStatusCodeMatchInput with
+// the rules defined in the proto definition for this message. If any rules
+// are violated, the result is a list of violation errors wrapped in
+// HttpResponseStatusCodeMatchInputMultiError, or nil if none found.
+func (m *HttpResponseStatusCodeMatchInput) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpResponseStatusCodeMatchInput) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return HttpResponseStatusCodeMatchInputMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpResponseStatusCodeMatchInputMultiError is an error wrapping multiple
+// validation errors returned by
+// HttpResponseStatusCodeMatchInput.ValidateAll() if the designated
+// constraints aren't met.
+type HttpResponseStatusCodeMatchInputMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpResponseStatusCodeMatchInputMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpResponseStatusCodeMatchInputMultiError) AllErrors() []error { return m }
+
+// HttpResponseStatusCodeMatchInputValidationError is the validation error
+// returned by HttpResponseStatusCodeMatchInput.Validate if the designated
+// constraints aren't met.
+type HttpResponseStatusCodeMatchInputValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpResponseStatusCodeMatchInputValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpResponseStatusCodeMatchInputValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpResponseStatusCodeMatchInputValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpResponseStatusCodeMatchInputValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpResponseStatusCodeMatchInputValidationError) ErrorName() string {
+ return "HttpResponseStatusCodeMatchInputValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpResponseStatusCodeMatchInputValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpResponseStatusCodeMatchInput.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpResponseStatusCodeMatchInputValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpResponseStatusCodeMatchInputValidationError{}
+
+// Validate checks the field values on HttpResponseStatusCodeClassMatchInput
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *HttpResponseStatusCodeClassMatchInput) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpResponseStatusCodeClassMatchInput
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// HttpResponseStatusCodeClassMatchInputMultiError, or nil if none found.
+func (m *HttpResponseStatusCodeClassMatchInput) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpResponseStatusCodeClassMatchInput) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return HttpResponseStatusCodeClassMatchInputMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpResponseStatusCodeClassMatchInputMultiError is an error wrapping
+// multiple validation errors returned by
+// HttpResponseStatusCodeClassMatchInput.ValidateAll() if the designated
+// constraints aren't met.
+type HttpResponseStatusCodeClassMatchInputMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpResponseStatusCodeClassMatchInputMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpResponseStatusCodeClassMatchInputMultiError) AllErrors() []error { return m }
+
+// HttpResponseStatusCodeClassMatchInputValidationError is the validation error
+// returned by HttpResponseStatusCodeClassMatchInput.Validate if the
+// designated constraints aren't met.
+type HttpResponseStatusCodeClassMatchInputValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpResponseStatusCodeClassMatchInputValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpResponseStatusCodeClassMatchInputValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpResponseStatusCodeClassMatchInputValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpResponseStatusCodeClassMatchInputValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpResponseStatusCodeClassMatchInputValidationError) ErrorName() string {
+ return "HttpResponseStatusCodeClassMatchInputValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HttpResponseStatusCodeClassMatchInputValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpResponseStatusCodeClassMatchInput.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpResponseStatusCodeClassMatchInputValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpResponseStatusCodeClassMatchInputValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input_vtproto.pb.go
new file mode 100644
index 000000000..156377f50
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/status_code_input_vtproto.pb.go
@@ -0,0 +1,104 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/status_code_input.proto
+
+package matcherv3
+
+import (
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *HttpResponseStatusCodeMatchInput) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpResponseStatusCodeMatchInput) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpResponseStatusCodeMatchInput) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpResponseStatusCodeClassMatchInput) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpResponseStatusCodeClassMatchInput) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpResponseStatusCodeClassMatchInput) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpResponseStatusCodeMatchInput) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HttpResponseStatusCodeClassMatchInput) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.go
new file mode 100644
index 000000000..2ebed9084
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.go
@@ -0,0 +1,400 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/string.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v3 "github.com/cncf/xds/go/xds/core/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Specifies the way to match a string.
+// [#next-free-field: 9]
+type StringMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to MatchPattern:
+ //
+ // *StringMatcher_Exact
+ // *StringMatcher_Prefix
+ // *StringMatcher_Suffix
+ // *StringMatcher_SafeRegex
+ // *StringMatcher_Contains
+ // *StringMatcher_Custom
+ MatchPattern isStringMatcher_MatchPattern `protobuf_oneof:"match_pattern"`
+ // If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. This
+ // has no effect for the safe_regex match.
+ // For example, the matcher “data“ will match both input string “Data“ and “data“ if set to true.
+ IgnoreCase bool `protobuf:"varint,6,opt,name=ignore_case,json=ignoreCase,proto3" json:"ignore_case,omitempty"`
+}
+
+func (x *StringMatcher) Reset() {
+ *x = StringMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_string_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StringMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringMatcher) ProtoMessage() {}
+
+func (x *StringMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_string_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringMatcher.ProtoReflect.Descriptor instead.
+func (*StringMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_string_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *StringMatcher) GetMatchPattern() isStringMatcher_MatchPattern {
+ if m != nil {
+ return m.MatchPattern
+ }
+ return nil
+}
+
+func (x *StringMatcher) GetExact() string {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Exact); ok {
+ return x.Exact
+ }
+ return ""
+}
+
+func (x *StringMatcher) GetPrefix() string {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Prefix); ok {
+ return x.Prefix
+ }
+ return ""
+}
+
+func (x *StringMatcher) GetSuffix() string {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Suffix); ok {
+ return x.Suffix
+ }
+ return ""
+}
+
+func (x *StringMatcher) GetSafeRegex() *RegexMatcher {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_SafeRegex); ok {
+ return x.SafeRegex
+ }
+ return nil
+}
+
+func (x *StringMatcher) GetContains() string {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Contains); ok {
+ return x.Contains
+ }
+ return ""
+}
+
+func (x *StringMatcher) GetCustom() *v3.TypedExtensionConfig {
+ if x, ok := x.GetMatchPattern().(*StringMatcher_Custom); ok {
+ return x.Custom
+ }
+ return nil
+}
+
+func (x *StringMatcher) GetIgnoreCase() bool {
+ if x != nil {
+ return x.IgnoreCase
+ }
+ return false
+}
+
+type isStringMatcher_MatchPattern interface {
+ isStringMatcher_MatchPattern()
+}
+
+type StringMatcher_Exact struct {
+ // The input string must match exactly the string specified here.
+ //
+ // Examples:
+ //
+ // * “abc“ only matches the value “abc“.
+ Exact string `protobuf:"bytes,1,opt,name=exact,proto3,oneof"`
+}
+
+type StringMatcher_Prefix struct {
+ // The input string must have the prefix specified here.
+ // Note: empty prefix is not allowed, please use regex instead.
+ //
+ // Examples:
+ //
+ // * “abc“ matches the value “abc.xyz“
+ Prefix string `protobuf:"bytes,2,opt,name=prefix,proto3,oneof"`
+}
+
+type StringMatcher_Suffix struct {
+ // The input string must have the suffix specified here.
+ // Note: empty prefix is not allowed, please use regex instead.
+ //
+ // Examples:
+ //
+ // * “abc“ matches the value “xyz.abc“
+ Suffix string `protobuf:"bytes,3,opt,name=suffix,proto3,oneof"`
+}
+
+type StringMatcher_SafeRegex struct {
+ // The input string must match the regular expression specified here.
+ SafeRegex *RegexMatcher `protobuf:"bytes,5,opt,name=safe_regex,json=safeRegex,proto3,oneof"`
+}
+
+type StringMatcher_Contains struct {
+ // The input string must have the substring specified here.
+ // Note: empty contains match is not allowed, please use regex instead.
+ //
+ // Examples:
+ //
+ // * “abc“ matches the value “xyz.abc.def“
+ Contains string `protobuf:"bytes,7,opt,name=contains,proto3,oneof"`
+}
+
+type StringMatcher_Custom struct {
+ // Use an extension as the matcher type.
+ // [#extension-category: envoy.string_matcher]
+ Custom *v3.TypedExtensionConfig `protobuf:"bytes,8,opt,name=custom,proto3,oneof"`
+}
+
+func (*StringMatcher_Exact) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_Prefix) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_Suffix) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_SafeRegex) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_Contains) isStringMatcher_MatchPattern() {}
+
+func (*StringMatcher_Custom) isStringMatcher_MatchPattern() {}
+
+// Specifies a list of ways to match a string.
+type ListStringMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Patterns []*StringMatcher `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"`
+}
+
+func (x *ListStringMatcher) Reset() {
+ *x = ListStringMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_string_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListStringMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListStringMatcher) ProtoMessage() {}
+
+func (x *ListStringMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_string_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListStringMatcher.ProtoReflect.Descriptor instead.
+func (*ListStringMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_string_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListStringMatcher) GetPatterns() []*StringMatcher {
+ if x != nil {
+ return x.Patterns
+ }
+ return nil
+}
+
+var File_envoy_type_matcher_v3_string_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_string_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f,
+ 0x76, 0x33, 0x2f, 0x72, 0x65, 0x67, 0x65, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b,
+ 0x78, 0x64, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x65, 0x78, 0x74, 0x65,
+ 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70,
+ 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74,
+ 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61,
+ 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8e, 0x03, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x78, 0x61, 0x63,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x65, 0x78, 0x61, 0x63, 0x74,
+ 0x12, 0x21, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06, 0x70, 0x72, 0x65,
+ 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x06,
+ 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x4e, 0x0a, 0x0a, 0x73, 0x61, 0x66, 0x65, 0x5f, 0x72,
+ 0x65, 0x67, 0x65, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x2e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42,
+ 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x09, 0x73, 0x61, 0x66,
+ 0x65, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, 0x25, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
+ 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10,
+ 0x01, 0x48, 0x00, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3b, 0x0a,
+ 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e,
+ 0x78, 0x64, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65,
+ 0x64, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x67,
+ 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0a, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x43, 0x61, 0x73, 0x65, 0x3a, 0x27, 0x9a, 0xc5, 0x88,
+ 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61,
+ 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05,
+ 0x52, 0x05, 0x72, 0x65, 0x67, 0x65, 0x78, 0x22, 0x8c, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74,
+ 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4a, 0x0a,
+ 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52,
+ 0x08, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x73, 0x3a, 0x2b, 0x9a, 0xc5, 0x88, 0x1e, 0x26,
+ 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x84, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10,
+ 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63,
+ 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72,
+ 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
+ 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d,
+ 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
+ 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76, 0x33, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_string_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_string_proto_rawDescData = file_envoy_type_matcher_v3_string_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_string_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_string_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_string_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_string_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_string_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_string_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_envoy_type_matcher_v3_string_proto_goTypes = []interface{}{
+ (*StringMatcher)(nil), // 0: envoy.type.matcher.v3.StringMatcher
+ (*ListStringMatcher)(nil), // 1: envoy.type.matcher.v3.ListStringMatcher
+ (*RegexMatcher)(nil), // 2: envoy.type.matcher.v3.RegexMatcher
+ (*v3.TypedExtensionConfig)(nil), // 3: xds.core.v3.TypedExtensionConfig
+}
+var file_envoy_type_matcher_v3_string_proto_depIdxs = []int32{
+ 2, // 0: envoy.type.matcher.v3.StringMatcher.safe_regex:type_name -> envoy.type.matcher.v3.RegexMatcher
+ 3, // 1: envoy.type.matcher.v3.StringMatcher.custom:type_name -> xds.core.v3.TypedExtensionConfig
+ 0, // 2: envoy.type.matcher.v3.ListStringMatcher.patterns:type_name -> envoy.type.matcher.v3.StringMatcher
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_string_proto_init() }
+func file_envoy_type_matcher_v3_string_proto_init() {
+ if File_envoy_type_matcher_v3_string_proto != nil {
+ return
+ }
+ file_envoy_type_matcher_v3_regex_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_string_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StringMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_string_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListStringMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_matcher_v3_string_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*StringMatcher_Exact)(nil),
+ (*StringMatcher_Prefix)(nil),
+ (*StringMatcher_Suffix)(nil),
+ (*StringMatcher_SafeRegex)(nil),
+ (*StringMatcher_Contains)(nil),
+ (*StringMatcher_Custom)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_string_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_string_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_string_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_string_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_string_proto = out.File
+ file_envoy_type_matcher_v3_string_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_string_proto_goTypes = nil
+ file_envoy_type_matcher_v3_string_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.validate.go
new file mode 100644
index 000000000..98e3925f6
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string.pb.validate.go
@@ -0,0 +1,482 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/string.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on StringMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *StringMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StringMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in StringMatcherMultiError, or
+// nil if none found.
+func (m *StringMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StringMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for IgnoreCase
+
+ oneofMatchPatternPresent := false
+ switch v := m.MatchPattern.(type) {
+ case *StringMatcher_Exact:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+ // no validation rules for Exact
+ case *StringMatcher_Prefix:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if utf8.RuneCountInString(m.GetPrefix()) < 1 {
+ err := StringMatcherValidationError{
+ field: "Prefix",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ case *StringMatcher_Suffix:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if utf8.RuneCountInString(m.GetSuffix()) < 1 {
+ err := StringMatcherValidationError{
+ field: "Suffix",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ case *StringMatcher_SafeRegex:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if m.GetSafeRegex() == nil {
+ err := StringMatcherValidationError{
+ field: "SafeRegex",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetSafeRegex()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StringMatcherValidationError{
+ field: "SafeRegex",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StringMatcherValidationError{
+ field: "SafeRegex",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSafeRegex()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StringMatcherValidationError{
+ field: "SafeRegex",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *StringMatcher_Contains:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if utf8.RuneCountInString(m.GetContains()) < 1 {
+ err := StringMatcherValidationError{
+ field: "Contains",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ case *StringMatcher_Custom:
+ if v == nil {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if all {
+ switch v := interface{}(m.GetCustom()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StringMatcherValidationError{
+ field: "Custom",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StringMatcherValidationError{
+ field: "Custom",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCustom()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StringMatcherValidationError{
+ field: "Custom",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofMatchPatternPresent {
+ err := StringMatcherValidationError{
+ field: "MatchPattern",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return StringMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// StringMatcherMultiError is an error wrapping multiple validation errors
+// returned by StringMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type StringMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StringMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StringMatcherMultiError) AllErrors() []error { return m }
+
+// StringMatcherValidationError is the validation error returned by
+// StringMatcher.Validate if the designated constraints aren't met.
+type StringMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StringMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StringMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StringMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StringMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StringMatcherValidationError) ErrorName() string { return "StringMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StringMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStringMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StringMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StringMatcherValidationError{}
+
+// Validate checks the field values on ListStringMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *ListStringMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ListStringMatcher with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ListStringMatcherMultiError, or nil if none found.
+func (m *ListStringMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ListStringMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetPatterns()) < 1 {
+ err := ListStringMatcherValidationError{
+ field: "Patterns",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetPatterns() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ListStringMatcherValidationError{
+ field: fmt.Sprintf("Patterns[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ListStringMatcherValidationError{
+ field: fmt.Sprintf("Patterns[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ListStringMatcherValidationError{
+ field: fmt.Sprintf("Patterns[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return ListStringMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// ListStringMatcherMultiError is an error wrapping multiple validation errors
+// returned by ListStringMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type ListStringMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ListStringMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ListStringMatcherMultiError) AllErrors() []error { return m }
+
+// ListStringMatcherValidationError is the validation error returned by
+// ListStringMatcher.Validate if the designated constraints aren't met.
+type ListStringMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ListStringMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ListStringMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ListStringMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ListStringMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ListStringMatcherValidationError) ErrorName() string {
+ return "ListStringMatcherValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ListStringMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sListStringMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ListStringMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ListStringMatcherValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string_vtproto.pb.go
new file mode 100644
index 000000000..9c016e2e7
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/string_vtproto.pb.go
@@ -0,0 +1,370 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/string.proto
+
+package matcherv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *StringMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StringMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StringMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.MatchPattern.(*StringMatcher_Custom); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*StringMatcher_Contains); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if m.IgnoreCase {
+ i--
+ if m.IgnoreCase {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x30
+ }
+ if msg, ok := m.MatchPattern.(*StringMatcher_SafeRegex); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*StringMatcher_Suffix); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*StringMatcher_Prefix); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*StringMatcher_Exact); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *StringMatcher_Exact) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StringMatcher_Exact) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.Exact)
+ copy(dAtA[i:], m.Exact)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Exact)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+func (m *StringMatcher_Prefix) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StringMatcher_Prefix) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.Prefix)
+ copy(dAtA[i:], m.Prefix)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Prefix)))
+ i--
+ dAtA[i] = 0x12
+ return len(dAtA) - i, nil
+}
+func (m *StringMatcher_Suffix) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StringMatcher_Suffix) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.Suffix)
+ copy(dAtA[i:], m.Suffix)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Suffix)))
+ i--
+ dAtA[i] = 0x1a
+ return len(dAtA) - i, nil
+}
+func (m *StringMatcher_SafeRegex) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StringMatcher_SafeRegex) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.SafeRegex != nil {
+ size, err := m.SafeRegex.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x2a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *StringMatcher_Contains) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StringMatcher_Contains) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.Contains)
+ copy(dAtA[i:], m.Contains)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Contains)))
+ i--
+ dAtA[i] = 0x3a
+ return len(dAtA) - i, nil
+}
+func (m *StringMatcher_Custom) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StringMatcher_Custom) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Custom != nil {
+ if vtmsg, ok := interface{}(m.Custom).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Custom)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x42
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x42
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ListStringMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListStringMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ListStringMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Patterns) > 0 {
+ for iNdEx := len(m.Patterns) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Patterns[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *StringMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.MatchPattern.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ if m.IgnoreCase {
+ n += 2
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *StringMatcher_Exact) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Exact)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *StringMatcher_Prefix) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Prefix)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *StringMatcher_Suffix) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Suffix)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *StringMatcher_SafeRegex) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.SafeRegex != nil {
+ l = m.SafeRegex.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *StringMatcher_Contains) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Contains)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *StringMatcher_Custom) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Custom != nil {
+ if size, ok := interface{}(m.Custom).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Custom)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ListStringMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Patterns) > 0 {
+ for _, e := range m.Patterns {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.go
new file mode 100644
index 000000000..ef844bc7f
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.go
@@ -0,0 +1,329 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/struct.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// StructMatcher provides a general interface to check if a given value is matched in
+// google.protobuf.Struct. It uses “path“ to retrieve the value
+// from the struct and then check if it's matched to the specified value.
+//
+// For example, for the following Struct:
+//
+// .. code-block:: yaml
+//
+// fields:
+// a:
+// struct_value:
+// fields:
+// b:
+// struct_value:
+// fields:
+// c:
+// string_value: pro
+// t:
+// list_value:
+// values:
+// - string_value: m
+// - string_value: n
+//
+// The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value "pro"
+// from the Metadata which is matched to the specified prefix match.
+//
+// .. code-block:: yaml
+//
+// path:
+// - key: a
+// - key: b
+// - key: c
+// value:
+// string_match:
+// prefix: pr
+//
+// The following StructMatcher is matched as the code will match one of the string values in the
+// list at the path [a, t].
+//
+// .. code-block:: yaml
+//
+// path:
+// - key: a
+// - key: t
+// value:
+// list_match:
+// one_of:
+// string_match:
+// exact: m
+//
+// An example use of StructMatcher is to match metadata in envoy.v*.core.Node.
+type StructMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The path to retrieve the Value from the Struct.
+ Path []*StructMatcher_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
+ // The StructMatcher is matched if the value retrieved by path is matched to this value.
+ Value *ValueMatcher `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *StructMatcher) Reset() {
+ *x = StructMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StructMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StructMatcher) ProtoMessage() {}
+
+func (x *StructMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StructMatcher.ProtoReflect.Descriptor instead.
+func (*StructMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_struct_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *StructMatcher) GetPath() []*StructMatcher_PathSegment {
+ if x != nil {
+ return x.Path
+ }
+ return nil
+}
+
+func (x *StructMatcher) GetValue() *ValueMatcher {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+// Specifies the segment in a path to retrieve value from Struct.
+type StructMatcher_PathSegment struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Segment:
+ //
+ // *StructMatcher_PathSegment_Key
+ Segment isStructMatcher_PathSegment_Segment `protobuf_oneof:"segment"`
+}
+
+func (x *StructMatcher_PathSegment) Reset() {
+ *x = StructMatcher_PathSegment{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StructMatcher_PathSegment) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StructMatcher_PathSegment) ProtoMessage() {}
+
+func (x *StructMatcher_PathSegment) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_struct_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StructMatcher_PathSegment.ProtoReflect.Descriptor instead.
+func (*StructMatcher_PathSegment) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_struct_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (m *StructMatcher_PathSegment) GetSegment() isStructMatcher_PathSegment_Segment {
+ if m != nil {
+ return m.Segment
+ }
+ return nil
+}
+
+func (x *StructMatcher_PathSegment) GetKey() string {
+ if x, ok := x.GetSegment().(*StructMatcher_PathSegment_Key); ok {
+ return x.Key
+ }
+ return ""
+}
+
+type isStructMatcher_PathSegment_Segment interface {
+ isStructMatcher_PathSegment_Segment()
+}
+
+type StructMatcher_PathSegment_Key struct {
+ // If specified, use the key to retrieve the value in a Struct.
+ Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"`
+}
+
+func (*StructMatcher_PathSegment_Key) isStructMatcher_PathSegment_Segment() {}
+
+var File_envoy_type_matcher_v3_struct_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_struct_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x21, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f,
+ 0x76, 0x33, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75,
+ 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbe, 0x02, 0x0a, 0x0d, 0x53, 0x74,
+ 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x04, 0x70,
+ 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76,
+ 0x33, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
+ 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05,
+ 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x43, 0x0a, 0x05, 0x76,
+ 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
+ 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42,
+ 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x1a, 0x6f, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12,
+ 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42,
+ 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x33, 0x9a, 0xc5,
+ 0x88, 0x1e, 0x2e, 0x0a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e,
+ 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42,
+ 0x01, 0x3a, 0x27, 0x9a, 0xc5, 0x88, 0x1e, 0x22, 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x74, 0x72,
+ 0x75, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x84, 0x01, 0xba, 0x80, 0xc8,
+ 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70,
+ 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0b, 0x53, 0x74, 0x72, 0x75,
+ 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79,
+ 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e,
+ 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76,
+ 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_struct_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_struct_proto_rawDescData = file_envoy_type_matcher_v3_struct_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_struct_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_struct_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_struct_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_struct_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_struct_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_struct_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_envoy_type_matcher_v3_struct_proto_goTypes = []interface{}{
+ (*StructMatcher)(nil), // 0: envoy.type.matcher.v3.StructMatcher
+ (*StructMatcher_PathSegment)(nil), // 1: envoy.type.matcher.v3.StructMatcher.PathSegment
+ (*ValueMatcher)(nil), // 2: envoy.type.matcher.v3.ValueMatcher
+}
+var file_envoy_type_matcher_v3_struct_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.matcher.v3.StructMatcher.path:type_name -> envoy.type.matcher.v3.StructMatcher.PathSegment
+ 2, // 1: envoy.type.matcher.v3.StructMatcher.value:type_name -> envoy.type.matcher.v3.ValueMatcher
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_struct_proto_init() }
+func file_envoy_type_matcher_v3_struct_proto_init() {
+ if File_envoy_type_matcher_v3_struct_proto != nil {
+ return
+ }
+ file_envoy_type_matcher_v3_value_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_struct_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StructMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_struct_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StructMatcher_PathSegment); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_matcher_v3_struct_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*StructMatcher_PathSegment_Key)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_struct_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_struct_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_struct_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_struct_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_struct_proto = out.File
+ file_envoy_type_matcher_v3_struct_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_struct_proto_goTypes = nil
+ file_envoy_type_matcher_v3_struct_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.validate.go
new file mode 100644
index 000000000..d69c1547f
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct.pb.validate.go
@@ -0,0 +1,364 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/struct.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on StructMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *StructMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StructMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in StructMatcherMultiError, or
+// nil if none found.
+func (m *StructMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StructMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetPath()) < 1 {
+ err := StructMatcherValidationError{
+ field: "Path",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetPath() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StructMatcherValidationError{
+ field: fmt.Sprintf("Path[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StructMatcherValidationError{
+ field: fmt.Sprintf("Path[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StructMatcherValidationError{
+ field: fmt.Sprintf("Path[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if m.GetValue() == nil {
+ err := StructMatcherValidationError{
+ field: "Value",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if all {
+ switch v := interface{}(m.GetValue()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, StructMatcherValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, StructMatcherValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetValue()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return StructMatcherValidationError{
+ field: "Value",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if len(errors) > 0 {
+ return StructMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// StructMatcherMultiError is an error wrapping multiple validation errors
+// returned by StructMatcher.ValidateAll() if the designated constraints
+// aren't met.
+type StructMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StructMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StructMatcherMultiError) AllErrors() []error { return m }
+
+// StructMatcherValidationError is the validation error returned by
+// StructMatcher.Validate if the designated constraints aren't met.
+type StructMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StructMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StructMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StructMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StructMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StructMatcherValidationError) ErrorName() string { return "StructMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e StructMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStructMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StructMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StructMatcherValidationError{}
+
+// Validate checks the field values on StructMatcher_PathSegment with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *StructMatcher_PathSegment) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on StructMatcher_PathSegment with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// StructMatcher_PathSegmentMultiError, or nil if none found.
+func (m *StructMatcher_PathSegment) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *StructMatcher_PathSegment) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofSegmentPresent := false
+ switch v := m.Segment.(type) {
+ case *StructMatcher_PathSegment_Key:
+ if v == nil {
+ err := StructMatcher_PathSegmentValidationError{
+ field: "Segment",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofSegmentPresent = true
+
+ if utf8.RuneCountInString(m.GetKey()) < 1 {
+ err := StructMatcher_PathSegmentValidationError{
+ field: "Key",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofSegmentPresent {
+ err := StructMatcher_PathSegmentValidationError{
+ field: "Segment",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return StructMatcher_PathSegmentMultiError(errors)
+ }
+
+ return nil
+}
+
+// StructMatcher_PathSegmentMultiError is an error wrapping multiple validation
+// errors returned by StructMatcher_PathSegment.ValidateAll() if the
+// designated constraints aren't met.
+type StructMatcher_PathSegmentMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m StructMatcher_PathSegmentMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m StructMatcher_PathSegmentMultiError) AllErrors() []error { return m }
+
+// StructMatcher_PathSegmentValidationError is the validation error returned by
+// StructMatcher_PathSegment.Validate if the designated constraints aren't met.
+type StructMatcher_PathSegmentValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e StructMatcher_PathSegmentValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e StructMatcher_PathSegmentValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e StructMatcher_PathSegmentValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e StructMatcher_PathSegmentValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e StructMatcher_PathSegmentValidationError) ErrorName() string {
+ return "StructMatcher_PathSegmentValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e StructMatcher_PathSegmentValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sStructMatcher_PathSegment.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = StructMatcher_PathSegmentValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = StructMatcher_PathSegmentValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct_vtproto.pb.go
new file mode 100644
index 000000000..d36052b83
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/struct_vtproto.pb.go
@@ -0,0 +1,171 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/struct.proto
+
+package matcherv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *StructMatcher_PathSegment) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StructMatcher_PathSegment) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StructMatcher_PathSegment) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Segment.(*StructMatcher_PathSegment_Key); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *StructMatcher_PathSegment_Key) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StructMatcher_PathSegment_Key) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+func (m *StructMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *StructMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *StructMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Value != nil {
+ size, err := m.Value.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if len(m.Path) > 0 {
+ for iNdEx := len(m.Path) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Path[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *StructMatcher_PathSegment) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Segment.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *StructMatcher_PathSegment_Key) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *StructMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.Path) > 0 {
+ for _, e := range m.Path {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ if m.Value != nil {
+ l = m.Value.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.go
new file mode 100644
index 000000000..7ba125cf3
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.go
@@ -0,0 +1,552 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/matcher/v3/value.proto
+
+package matcherv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported.
+// StructValue is not supported and is always not matched.
+// [#next-free-field: 8]
+type ValueMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Specifies how to match a value.
+ //
+ // Types that are assignable to MatchPattern:
+ //
+ // *ValueMatcher_NullMatch_
+ // *ValueMatcher_DoubleMatch
+ // *ValueMatcher_StringMatch
+ // *ValueMatcher_BoolMatch
+ // *ValueMatcher_PresentMatch
+ // *ValueMatcher_ListMatch
+ // *ValueMatcher_OrMatch
+ MatchPattern isValueMatcher_MatchPattern `protobuf_oneof:"match_pattern"`
+}
+
+func (x *ValueMatcher) Reset() {
+ *x = ValueMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ValueMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValueMatcher) ProtoMessage() {}
+
+func (x *ValueMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValueMatcher.ProtoReflect.Descriptor instead.
+func (*ValueMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_value_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *ValueMatcher) GetMatchPattern() isValueMatcher_MatchPattern {
+ if m != nil {
+ return m.MatchPattern
+ }
+ return nil
+}
+
+func (x *ValueMatcher) GetNullMatch() *ValueMatcher_NullMatch {
+ if x, ok := x.GetMatchPattern().(*ValueMatcher_NullMatch_); ok {
+ return x.NullMatch
+ }
+ return nil
+}
+
+func (x *ValueMatcher) GetDoubleMatch() *DoubleMatcher {
+ if x, ok := x.GetMatchPattern().(*ValueMatcher_DoubleMatch); ok {
+ return x.DoubleMatch
+ }
+ return nil
+}
+
+func (x *ValueMatcher) GetStringMatch() *StringMatcher {
+ if x, ok := x.GetMatchPattern().(*ValueMatcher_StringMatch); ok {
+ return x.StringMatch
+ }
+ return nil
+}
+
+func (x *ValueMatcher) GetBoolMatch() bool {
+ if x, ok := x.GetMatchPattern().(*ValueMatcher_BoolMatch); ok {
+ return x.BoolMatch
+ }
+ return false
+}
+
+func (x *ValueMatcher) GetPresentMatch() bool {
+ if x, ok := x.GetMatchPattern().(*ValueMatcher_PresentMatch); ok {
+ return x.PresentMatch
+ }
+ return false
+}
+
+func (x *ValueMatcher) GetListMatch() *ListMatcher {
+ if x, ok := x.GetMatchPattern().(*ValueMatcher_ListMatch); ok {
+ return x.ListMatch
+ }
+ return nil
+}
+
+func (x *ValueMatcher) GetOrMatch() *OrMatcher {
+ if x, ok := x.GetMatchPattern().(*ValueMatcher_OrMatch); ok {
+ return x.OrMatch
+ }
+ return nil
+}
+
+type isValueMatcher_MatchPattern interface {
+ isValueMatcher_MatchPattern()
+}
+
+type ValueMatcher_NullMatch_ struct {
+ // If specified, a match occurs if and only if the target value is a NullValue.
+ NullMatch *ValueMatcher_NullMatch `protobuf:"bytes,1,opt,name=null_match,json=nullMatch,proto3,oneof"`
+}
+
+type ValueMatcher_DoubleMatch struct {
+ // If specified, a match occurs if and only if the target value is a double value and is
+ // matched to this field.
+ DoubleMatch *DoubleMatcher `protobuf:"bytes,2,opt,name=double_match,json=doubleMatch,proto3,oneof"`
+}
+
+type ValueMatcher_StringMatch struct {
+ // If specified, a match occurs if and only if the target value is a string value and is
+ // matched to this field.
+ StringMatch *StringMatcher `protobuf:"bytes,3,opt,name=string_match,json=stringMatch,proto3,oneof"`
+}
+
+type ValueMatcher_BoolMatch struct {
+ // If specified, a match occurs if and only if the target value is a bool value and is equal
+ // to this field.
+ BoolMatch bool `protobuf:"varint,4,opt,name=bool_match,json=boolMatch,proto3,oneof"`
+}
+
+type ValueMatcher_PresentMatch struct {
+ // If specified, value match will be performed based on whether the path is referring to a
+ // valid primitive value in the metadata. If the path is referring to a non-primitive value,
+ // the result is always not matched.
+ PresentMatch bool `protobuf:"varint,5,opt,name=present_match,json=presentMatch,proto3,oneof"`
+}
+
+type ValueMatcher_ListMatch struct {
+ // If specified, a match occurs if and only if the target value is a list value and
+ // is matched to this field.
+ ListMatch *ListMatcher `protobuf:"bytes,6,opt,name=list_match,json=listMatch,proto3,oneof"`
+}
+
+type ValueMatcher_OrMatch struct {
+ // If specified, a match occurs if and only if any of the alternatives in the match accept the value.
+ OrMatch *OrMatcher `protobuf:"bytes,7,opt,name=or_match,json=orMatch,proto3,oneof"`
+}
+
+func (*ValueMatcher_NullMatch_) isValueMatcher_MatchPattern() {}
+
+func (*ValueMatcher_DoubleMatch) isValueMatcher_MatchPattern() {}
+
+func (*ValueMatcher_StringMatch) isValueMatcher_MatchPattern() {}
+
+func (*ValueMatcher_BoolMatch) isValueMatcher_MatchPattern() {}
+
+func (*ValueMatcher_PresentMatch) isValueMatcher_MatchPattern() {}
+
+func (*ValueMatcher_ListMatch) isValueMatcher_MatchPattern() {}
+
+func (*ValueMatcher_OrMatch) isValueMatcher_MatchPattern() {}
+
+// Specifies the way to match a list value.
+type ListMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to MatchPattern:
+ //
+ // *ListMatcher_OneOf
+ MatchPattern isListMatcher_MatchPattern `protobuf_oneof:"match_pattern"`
+}
+
+func (x *ListMatcher) Reset() {
+ *x = ListMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListMatcher) ProtoMessage() {}
+
+func (x *ListMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListMatcher.ProtoReflect.Descriptor instead.
+func (*ListMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_value_proto_rawDescGZIP(), []int{1}
+}
+
+func (m *ListMatcher) GetMatchPattern() isListMatcher_MatchPattern {
+ if m != nil {
+ return m.MatchPattern
+ }
+ return nil
+}
+
+func (x *ListMatcher) GetOneOf() *ValueMatcher {
+ if x, ok := x.GetMatchPattern().(*ListMatcher_OneOf); ok {
+ return x.OneOf
+ }
+ return nil
+}
+
+type isListMatcher_MatchPattern interface {
+ isListMatcher_MatchPattern()
+}
+
+type ListMatcher_OneOf struct {
+ // If specified, at least one of the values in the list must match the value specified.
+ OneOf *ValueMatcher `protobuf:"bytes,1,opt,name=one_of,json=oneOf,proto3,oneof"`
+}
+
+func (*ListMatcher_OneOf) isListMatcher_MatchPattern() {}
+
+// Specifies a list of alternatives for the match.
+type OrMatcher struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ValueMatchers []*ValueMatcher `protobuf:"bytes,1,rep,name=value_matchers,json=valueMatchers,proto3" json:"value_matchers,omitempty"`
+}
+
+func (x *OrMatcher) Reset() {
+ *x = OrMatcher{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OrMatcher) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OrMatcher) ProtoMessage() {}
+
+func (x *OrMatcher) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use OrMatcher.ProtoReflect.Descriptor instead.
+func (*OrMatcher) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_value_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *OrMatcher) GetValueMatchers() []*ValueMatcher {
+ if x != nil {
+ return x.ValueMatchers
+ }
+ return nil
+}
+
+// NullMatch is an empty message to specify a null value.
+type ValueMatcher_NullMatch struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *ValueMatcher_NullMatch) Reset() {
+ *x = ValueMatcher_NullMatch{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ValueMatcher_NullMatch) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ValueMatcher_NullMatch) ProtoMessage() {}
+
+func (x *ValueMatcher_NullMatch) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_matcher_v3_value_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ValueMatcher_NullMatch.ProtoReflect.Descriptor instead.
+func (*ValueMatcher_NullMatch) Descriptor() ([]byte, []int) {
+ return file_envoy_type_matcher_v3_value_proto_rawDescGZIP(), []int{0, 0}
+}
+
+var File_envoy_type_matcher_v3_value_proto protoreflect.FileDescriptor
+
+var file_envoy_type_matcher_v3_value_proto_rawDesc = []byte{
+ 0x0a, 0x21, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76,
+ 0x33, 0x2f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2f, 0x76, 0x33, 0x2f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbd, 0x04,
+ 0x0a, 0x0c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x4e,
+ 0x0a, 0x0a, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x48, 0x00, 0x52, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x49,
+ 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x6f, 0x75,
+ 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f,
+ 0x75, 0x62, 0x6c, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x49, 0x0a, 0x0c, 0x73, 0x74, 0x72,
+ 0x69, 0x6e, 0x67, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x4d,
+ 0x61, 0x74, 0x63, 0x68, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x25, 0x0a, 0x0d, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74,
+ 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c,
+ 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x43, 0x0a, 0x0a,
+ 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x22, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63,
+ 0x68, 0x12, 0x3d, 0x0a, 0x08, 0x6f, 0x72, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x4f, 0x72, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x48, 0x00, 0x52, 0x07, 0x6f, 0x72, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x1a, 0x3d, 0x0a, 0x09, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x30, 0x9a,
+ 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x3a,
+ 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65,
+ 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x88, 0x01,
+ 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x3c, 0x0a,
+ 0x06, 0x6f, 0x6e, 0x65, 0x5f, 0x6f, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x4f, 0x66, 0x3a, 0x25, 0x9a, 0xc5, 0x88,
+ 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x42, 0x14, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x70, 0x61, 0x74, 0x74,
+ 0x65, 0x72, 0x6e, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0x61, 0x0a, 0x09, 0x4f, 0x72, 0x4d, 0x61,
+ 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x54, 0x0a, 0x0e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d,
+ 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x02, 0x52, 0x0d, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x42, 0x83, 0x01, 0xba, 0x80,
+ 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x0a, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79,
+ 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e,
+ 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x61, 0x74,
+ 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x76,
+ 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_matcher_v3_value_proto_rawDescOnce sync.Once
+ file_envoy_type_matcher_v3_value_proto_rawDescData = file_envoy_type_matcher_v3_value_proto_rawDesc
+)
+
+func file_envoy_type_matcher_v3_value_proto_rawDescGZIP() []byte {
+ file_envoy_type_matcher_v3_value_proto_rawDescOnce.Do(func() {
+ file_envoy_type_matcher_v3_value_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_matcher_v3_value_proto_rawDescData)
+ })
+ return file_envoy_type_matcher_v3_value_proto_rawDescData
+}
+
+var file_envoy_type_matcher_v3_value_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_envoy_type_matcher_v3_value_proto_goTypes = []interface{}{
+ (*ValueMatcher)(nil), // 0: envoy.type.matcher.v3.ValueMatcher
+ (*ListMatcher)(nil), // 1: envoy.type.matcher.v3.ListMatcher
+ (*OrMatcher)(nil), // 2: envoy.type.matcher.v3.OrMatcher
+ (*ValueMatcher_NullMatch)(nil), // 3: envoy.type.matcher.v3.ValueMatcher.NullMatch
+ (*DoubleMatcher)(nil), // 4: envoy.type.matcher.v3.DoubleMatcher
+ (*StringMatcher)(nil), // 5: envoy.type.matcher.v3.StringMatcher
+}
+var file_envoy_type_matcher_v3_value_proto_depIdxs = []int32{
+ 3, // 0: envoy.type.matcher.v3.ValueMatcher.null_match:type_name -> envoy.type.matcher.v3.ValueMatcher.NullMatch
+ 4, // 1: envoy.type.matcher.v3.ValueMatcher.double_match:type_name -> envoy.type.matcher.v3.DoubleMatcher
+ 5, // 2: envoy.type.matcher.v3.ValueMatcher.string_match:type_name -> envoy.type.matcher.v3.StringMatcher
+ 1, // 3: envoy.type.matcher.v3.ValueMatcher.list_match:type_name -> envoy.type.matcher.v3.ListMatcher
+ 2, // 4: envoy.type.matcher.v3.ValueMatcher.or_match:type_name -> envoy.type.matcher.v3.OrMatcher
+ 0, // 5: envoy.type.matcher.v3.ListMatcher.one_of:type_name -> envoy.type.matcher.v3.ValueMatcher
+ 0, // 6: envoy.type.matcher.v3.OrMatcher.value_matchers:type_name -> envoy.type.matcher.v3.ValueMatcher
+ 7, // [7:7] is the sub-list for method output_type
+ 7, // [7:7] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_matcher_v3_value_proto_init() }
+func file_envoy_type_matcher_v3_value_proto_init() {
+ if File_envoy_type_matcher_v3_value_proto != nil {
+ return
+ }
+ file_envoy_type_matcher_v3_number_proto_init()
+ file_envoy_type_matcher_v3_string_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_matcher_v3_value_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ValueMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_value_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_value_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OrMatcher); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_matcher_v3_value_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ValueMatcher_NullMatch); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_matcher_v3_value_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*ValueMatcher_NullMatch_)(nil),
+ (*ValueMatcher_DoubleMatch)(nil),
+ (*ValueMatcher_StringMatch)(nil),
+ (*ValueMatcher_BoolMatch)(nil),
+ (*ValueMatcher_PresentMatch)(nil),
+ (*ValueMatcher_ListMatch)(nil),
+ (*ValueMatcher_OrMatch)(nil),
+ }
+ file_envoy_type_matcher_v3_value_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*ListMatcher_OneOf)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_matcher_v3_value_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_matcher_v3_value_proto_goTypes,
+ DependencyIndexes: file_envoy_type_matcher_v3_value_proto_depIdxs,
+ MessageInfos: file_envoy_type_matcher_v3_value_proto_msgTypes,
+ }.Build()
+ File_envoy_type_matcher_v3_value_proto = out.File
+ file_envoy_type_matcher_v3_value_proto_rawDesc = nil
+ file_envoy_type_matcher_v3_value_proto_goTypes = nil
+ file_envoy_type_matcher_v3_value_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.validate.go
new file mode 100644
index 000000000..9814aa0db
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value.pb.validate.go
@@ -0,0 +1,791 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/matcher/v3/value.proto
+
+package matcherv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on ValueMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ValueMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ValueMatcher with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ValueMatcherMultiError, or
+// nil if none found.
+func (m *ValueMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ValueMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofMatchPatternPresent := false
+ switch v := m.MatchPattern.(type) {
+ case *ValueMatcher_NullMatch_:
+ if v == nil {
+ err := ValueMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if all {
+ switch v := interface{}(m.GetNullMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "NullMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "NullMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetNullMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ValueMatcherValidationError{
+ field: "NullMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ValueMatcher_DoubleMatch:
+ if v == nil {
+ err := ValueMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if all {
+ switch v := interface{}(m.GetDoubleMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "DoubleMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "DoubleMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetDoubleMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ValueMatcherValidationError{
+ field: "DoubleMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ValueMatcher_StringMatch:
+ if v == nil {
+ err := ValueMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if all {
+ switch v := interface{}(m.GetStringMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "StringMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "StringMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetStringMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ValueMatcherValidationError{
+ field: "StringMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ValueMatcher_BoolMatch:
+ if v == nil {
+ err := ValueMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+ // no validation rules for BoolMatch
+ case *ValueMatcher_PresentMatch:
+ if v == nil {
+ err := ValueMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+ // no validation rules for PresentMatch
+ case *ValueMatcher_ListMatch:
+ if v == nil {
+ err := ValueMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if all {
+ switch v := interface{}(m.GetListMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "ListMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "ListMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetListMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ValueMatcherValidationError{
+ field: "ListMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *ValueMatcher_OrMatch:
+ if v == nil {
+ err := ValueMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if all {
+ switch v := interface{}(m.GetOrMatch()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "OrMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ValueMatcherValidationError{
+ field: "OrMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOrMatch()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ValueMatcherValidationError{
+ field: "OrMatch",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofMatchPatternPresent {
+ err := ValueMatcherValidationError{
+ field: "MatchPattern",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ValueMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// ValueMatcherMultiError is an error wrapping multiple validation errors
+// returned by ValueMatcher.ValidateAll() if the designated constraints aren't met.
+type ValueMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ValueMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ValueMatcherMultiError) AllErrors() []error { return m }
+
+// ValueMatcherValidationError is the validation error returned by
+// ValueMatcher.Validate if the designated constraints aren't met.
+type ValueMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ValueMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ValueMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ValueMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ValueMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ValueMatcherValidationError) ErrorName() string { return "ValueMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ValueMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sValueMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ValueMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ValueMatcherValidationError{}
+
+// Validate checks the field values on ListMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *ListMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ListMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in ListMatcherMultiError, or
+// nil if none found.
+func (m *ListMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ListMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofMatchPatternPresent := false
+ switch v := m.MatchPattern.(type) {
+ case *ListMatcher_OneOf:
+ if v == nil {
+ err := ListMatcherValidationError{
+ field: "MatchPattern",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofMatchPatternPresent = true
+
+ if all {
+ switch v := interface{}(m.GetOneOf()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, ListMatcherValidationError{
+ field: "OneOf",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, ListMatcherValidationError{
+ field: "OneOf",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetOneOf()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return ListMatcherValidationError{
+ field: "OneOf",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofMatchPatternPresent {
+ err := ListMatcherValidationError{
+ field: "MatchPattern",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return ListMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// ListMatcherMultiError is an error wrapping multiple validation errors
+// returned by ListMatcher.ValidateAll() if the designated constraints aren't met.
+type ListMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ListMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ListMatcherMultiError) AllErrors() []error { return m }
+
+// ListMatcherValidationError is the validation error returned by
+// ListMatcher.Validate if the designated constraints aren't met.
+type ListMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ListMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ListMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ListMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ListMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ListMatcherValidationError) ErrorName() string { return "ListMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e ListMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sListMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ListMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ListMatcherValidationError{}
+
+// Validate checks the field values on OrMatcher with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *OrMatcher) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on OrMatcher with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in OrMatcherMultiError, or nil
+// if none found.
+func (m *OrMatcher) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *OrMatcher) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(m.GetValueMatchers()) < 2 {
+ err := OrMatcherValidationError{
+ field: "ValueMatchers",
+ reason: "value must contain at least 2 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetValueMatchers() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, OrMatcherValidationError{
+ field: fmt.Sprintf("ValueMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, OrMatcherValidationError{
+ field: fmt.Sprintf("ValueMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return OrMatcherValidationError{
+ field: fmt.Sprintf("ValueMatchers[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return OrMatcherMultiError(errors)
+ }
+
+ return nil
+}
+
+// OrMatcherMultiError is an error wrapping multiple validation errors returned
+// by OrMatcher.ValidateAll() if the designated constraints aren't met.
+type OrMatcherMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m OrMatcherMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m OrMatcherMultiError) AllErrors() []error { return m }
+
+// OrMatcherValidationError is the validation error returned by
+// OrMatcher.Validate if the designated constraints aren't met.
+type OrMatcherValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e OrMatcherValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e OrMatcherValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e OrMatcherValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e OrMatcherValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e OrMatcherValidationError) ErrorName() string { return "OrMatcherValidationError" }
+
+// Error satisfies the builtin error interface
+func (e OrMatcherValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sOrMatcher.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = OrMatcherValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = OrMatcherValidationError{}
+
+// Validate checks the field values on ValueMatcher_NullMatch with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *ValueMatcher_NullMatch) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on ValueMatcher_NullMatch with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// ValueMatcher_NullMatchMultiError, or nil if none found.
+func (m *ValueMatcher_NullMatch) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *ValueMatcher_NullMatch) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return ValueMatcher_NullMatchMultiError(errors)
+ }
+
+ return nil
+}
+
+// ValueMatcher_NullMatchMultiError is an error wrapping multiple validation
+// errors returned by ValueMatcher_NullMatch.ValidateAll() if the designated
+// constraints aren't met.
+type ValueMatcher_NullMatchMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m ValueMatcher_NullMatchMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m ValueMatcher_NullMatchMultiError) AllErrors() []error { return m }
+
+// ValueMatcher_NullMatchValidationError is the validation error returned by
+// ValueMatcher_NullMatch.Validate if the designated constraints aren't met.
+type ValueMatcher_NullMatchValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e ValueMatcher_NullMatchValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e ValueMatcher_NullMatchValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e ValueMatcher_NullMatchValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e ValueMatcher_NullMatchValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e ValueMatcher_NullMatchValidationError) ErrorName() string {
+ return "ValueMatcher_NullMatchValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e ValueMatcher_NullMatchValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sValueMatcher_NullMatch.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = ValueMatcher_NullMatchValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = ValueMatcher_NullMatchValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value_vtproto.pb.go
new file mode 100644
index 000000000..852f5cead
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/matcher/v3/value_vtproto.pb.go
@@ -0,0 +1,545 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/matcher/v3/value.proto
+
+package matcherv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *ValueMatcher_NullMatch) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ValueMatcher_NullMatch) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ValueMatcher_NullMatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ValueMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ValueMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ValueMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.MatchPattern.(*ValueMatcher_OrMatch); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*ValueMatcher_ListMatch); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*ValueMatcher_PresentMatch); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*ValueMatcher_BoolMatch); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*ValueMatcher_StringMatch); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*ValueMatcher_DoubleMatch); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.MatchPattern.(*ValueMatcher_NullMatch_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ValueMatcher_NullMatch_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ValueMatcher_NullMatch_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.NullMatch != nil {
+ size, err := m.NullMatch.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ValueMatcher_DoubleMatch) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ValueMatcher_DoubleMatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.DoubleMatch != nil {
+ size, err := m.DoubleMatch.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ValueMatcher_StringMatch) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ValueMatcher_StringMatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.StringMatch != nil {
+ size, err := m.StringMatch.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ValueMatcher_BoolMatch) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ValueMatcher_BoolMatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.BoolMatch {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x20
+ return len(dAtA) - i, nil
+}
+func (m *ValueMatcher_PresentMatch) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ValueMatcher_PresentMatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i--
+ if m.PresentMatch {
+ dAtA[i] = 1
+ } else {
+ dAtA[i] = 0
+ }
+ i--
+ dAtA[i] = 0x28
+ return len(dAtA) - i, nil
+}
+func (m *ValueMatcher_ListMatch) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ValueMatcher_ListMatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.ListMatch != nil {
+ size, err := m.ListMatch.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x32
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x32
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ValueMatcher_OrMatch) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ValueMatcher_OrMatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.OrMatch != nil {
+ size, err := m.OrMatch.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x3a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x3a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *ListMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *ListMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ListMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.MatchPattern.(*ListMatcher_OneOf); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ListMatcher_OneOf) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *ListMatcher_OneOf) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.OneOf != nil {
+ size, err := m.OneOf.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *OrMatcher) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *OrMatcher) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *OrMatcher) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.ValueMatchers) > 0 {
+ for iNdEx := len(m.ValueMatchers) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.ValueMatchers[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ }
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *ValueMatcher_NullMatch) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ValueMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.MatchPattern.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ValueMatcher_NullMatch_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.NullMatch != nil {
+ l = m.NullMatch.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ValueMatcher_DoubleMatch) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.DoubleMatch != nil {
+ l = m.DoubleMatch.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ValueMatcher_StringMatch) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.StringMatch != nil {
+ l = m.StringMatch.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ValueMatcher_BoolMatch) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *ValueMatcher_PresentMatch) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 2
+ return n
+}
+func (m *ValueMatcher_ListMatch) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.ListMatch != nil {
+ l = m.ListMatch.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ValueMatcher_OrMatch) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.OrMatch != nil {
+ l = m.OrMatch.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *ListMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.MatchPattern.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *ListMatcher_OneOf) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.OneOf != nil {
+ l = m.OneOf.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *OrMatcher) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if len(m.ValueMatchers) > 0 {
+ for _, e := range m.ValueMatchers {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3/metadata.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3/metadata.pb.go
new file mode 100644
index 000000000..7a6ac07a5
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3/metadata.pb.go
@@ -0,0 +1,683 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/metadata/v3/metadata.proto
+
+package metadatav3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// MetadataKey provides a general interface using “key“ and “path“ to retrieve value from
+// :ref:`Metadata `.
+//
+// For example, for the following Metadata:
+//
+// .. code-block:: yaml
+//
+// filter_metadata:
+// envoy.xxx:
+// prop:
+// foo: bar
+// xyz:
+// hello: envoy
+//
+// The following MetadataKey will retrieve a string value "bar" from the Metadata.
+//
+// .. code-block:: yaml
+//
+// key: envoy.xxx
+// path:
+// - key: prop
+// - key: foo
+type MetadataKey struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The key name of Metadata to retrieve the Struct from the metadata.
+ // Typically, it represents a builtin subsystem or custom extension.
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ // The path to retrieve the Value from the Struct. It can be a prefix or a full path,
+ // e.g. “[prop, xyz]“ for a struct or “[prop, foo]“ for a string in the example,
+ // which depends on the particular scenario.
+ //
+ // Note: Due to that only the key type segment is supported, the path can not specify a list
+ // unless the list is the last segment.
+ Path []*MetadataKey_PathSegment `protobuf:"bytes,2,rep,name=path,proto3" json:"path,omitempty"`
+}
+
+func (x *MetadataKey) Reset() {
+ *x = MetadataKey{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataKey) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataKey) ProtoMessage() {}
+
+func (x *MetadataKey) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataKey.ProtoReflect.Descriptor instead.
+func (*MetadataKey) Descriptor() ([]byte, []int) {
+ return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *MetadataKey) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+func (x *MetadataKey) GetPath() []*MetadataKey_PathSegment {
+ if x != nil {
+ return x.Path
+ }
+ return nil
+}
+
+// Describes what kind of metadata.
+type MetadataKind struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Kind:
+ //
+ // *MetadataKind_Request_
+ // *MetadataKind_Route_
+ // *MetadataKind_Cluster_
+ // *MetadataKind_Host_
+ Kind isMetadataKind_Kind `protobuf_oneof:"kind"`
+}
+
+func (x *MetadataKind) Reset() {
+ *x = MetadataKind{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataKind) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataKind) ProtoMessage() {}
+
+func (x *MetadataKind) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataKind.ProtoReflect.Descriptor instead.
+func (*MetadataKind) Descriptor() ([]byte, []int) {
+ return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1}
+}
+
+func (m *MetadataKind) GetKind() isMetadataKind_Kind {
+ if m != nil {
+ return m.Kind
+ }
+ return nil
+}
+
+func (x *MetadataKind) GetRequest() *MetadataKind_Request {
+ if x, ok := x.GetKind().(*MetadataKind_Request_); ok {
+ return x.Request
+ }
+ return nil
+}
+
+func (x *MetadataKind) GetRoute() *MetadataKind_Route {
+ if x, ok := x.GetKind().(*MetadataKind_Route_); ok {
+ return x.Route
+ }
+ return nil
+}
+
+func (x *MetadataKind) GetCluster() *MetadataKind_Cluster {
+ if x, ok := x.GetKind().(*MetadataKind_Cluster_); ok {
+ return x.Cluster
+ }
+ return nil
+}
+
+func (x *MetadataKind) GetHost() *MetadataKind_Host {
+ if x, ok := x.GetKind().(*MetadataKind_Host_); ok {
+ return x.Host
+ }
+ return nil
+}
+
+type isMetadataKind_Kind interface {
+ isMetadataKind_Kind()
+}
+
+type MetadataKind_Request_ struct {
+ // Request kind of metadata.
+ Request *MetadataKind_Request `protobuf:"bytes,1,opt,name=request,proto3,oneof"`
+}
+
+type MetadataKind_Route_ struct {
+ // Route kind of metadata.
+ Route *MetadataKind_Route `protobuf:"bytes,2,opt,name=route,proto3,oneof"`
+}
+
+type MetadataKind_Cluster_ struct {
+ // Cluster kind of metadata.
+ Cluster *MetadataKind_Cluster `protobuf:"bytes,3,opt,name=cluster,proto3,oneof"`
+}
+
+type MetadataKind_Host_ struct {
+ // Host kind of metadata.
+ Host *MetadataKind_Host `protobuf:"bytes,4,opt,name=host,proto3,oneof"`
+}
+
+func (*MetadataKind_Request_) isMetadataKind_Kind() {}
+
+func (*MetadataKind_Route_) isMetadataKind_Kind() {}
+
+func (*MetadataKind_Cluster_) isMetadataKind_Kind() {}
+
+func (*MetadataKind_Host_) isMetadataKind_Kind() {}
+
+// Specifies the segment in a path to retrieve value from Metadata.
+// Currently it is only supported to specify the key, i.e. field name, as one segment of a path.
+type MetadataKey_PathSegment struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Segment:
+ //
+ // *MetadataKey_PathSegment_Key
+ Segment isMetadataKey_PathSegment_Segment `protobuf_oneof:"segment"`
+}
+
+func (x *MetadataKey_PathSegment) Reset() {
+ *x = MetadataKey_PathSegment{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataKey_PathSegment) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataKey_PathSegment) ProtoMessage() {}
+
+func (x *MetadataKey_PathSegment) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataKey_PathSegment.ProtoReflect.Descriptor instead.
+func (*MetadataKey_PathSegment) Descriptor() ([]byte, []int) {
+ return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (m *MetadataKey_PathSegment) GetSegment() isMetadataKey_PathSegment_Segment {
+ if m != nil {
+ return m.Segment
+ }
+ return nil
+}
+
+func (x *MetadataKey_PathSegment) GetKey() string {
+ if x, ok := x.GetSegment().(*MetadataKey_PathSegment_Key); ok {
+ return x.Key
+ }
+ return ""
+}
+
+type isMetadataKey_PathSegment_Segment interface {
+ isMetadataKey_PathSegment_Segment()
+}
+
+type MetadataKey_PathSegment_Key struct {
+ // If specified, use the key to retrieve the value in a Struct.
+ Key string `protobuf:"bytes,1,opt,name=key,proto3,oneof"`
+}
+
+func (*MetadataKey_PathSegment_Key) isMetadataKey_PathSegment_Segment() {}
+
+// Represents dynamic metadata associated with the request.
+type MetadataKind_Request struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *MetadataKind_Request) Reset() {
+ *x = MetadataKind_Request{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataKind_Request) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataKind_Request) ProtoMessage() {}
+
+func (x *MetadataKind_Request) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataKind_Request.ProtoReflect.Descriptor instead.
+func (*MetadataKind_Request) Descriptor() ([]byte, []int) {
+ return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 0}
+}
+
+// Represents metadata from :ref:`the route`.
+type MetadataKind_Route struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *MetadataKind_Route) Reset() {
+ *x = MetadataKind_Route{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataKind_Route) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataKind_Route) ProtoMessage() {}
+
+func (x *MetadataKind_Route) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataKind_Route.ProtoReflect.Descriptor instead.
+func (*MetadataKind_Route) Descriptor() ([]byte, []int) {
+ return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 1}
+}
+
+// Represents metadata from :ref:`the upstream cluster`.
+type MetadataKind_Cluster struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *MetadataKind_Cluster) Reset() {
+ *x = MetadataKind_Cluster{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataKind_Cluster) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataKind_Cluster) ProtoMessage() {}
+
+func (x *MetadataKind_Cluster) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataKind_Cluster.ProtoReflect.Descriptor instead.
+func (*MetadataKind_Cluster) Descriptor() ([]byte, []int) {
+ return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 2}
+}
+
+// Represents metadata from :ref:`the upstream
+// host`.
+type MetadataKind_Host struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *MetadataKind_Host) Reset() {
+ *x = MetadataKind_Host{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MetadataKind_Host) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MetadataKind_Host) ProtoMessage() {}
+
+func (x *MetadataKind_Host) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_metadata_v3_metadata_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MetadataKind_Host.ProtoReflect.Descriptor instead.
+func (*MetadataKind_Host) Descriptor() ([]byte, []int) {
+ return file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP(), []int{1, 3}
+}
+
+var File_envoy_type_metadata_v3_metadata_proto protoreflect.FileDescriptor
+
+var file_envoy_type_metadata_v3_metadata_proto_rawDesc = []byte{
+ 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x1a,
+ 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69,
+ 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x02, 0x0a, 0x0b, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x03, 0x6b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
+ 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4d, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67,
+ 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x04,
+ 0x70, 0x61, 0x74, 0x68, 0x1a, 0x71, 0x0a, 0x0b, 0x50, 0x61, 0x74, 0x68, 0x53, 0x65, 0x67, 0x6d,
+ 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x03, 0x6b, 0x65, 0x79,
+ 0x3a, 0x35, 0x9a, 0xc5, 0x88, 0x1e, 0x30, 0x0a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x2e, 0x50, 0x61, 0x74, 0x68,
+ 0x53, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x07, 0x73, 0x65, 0x67, 0x6d, 0x65,
+ 0x6e, 0x74, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x3a, 0x29, 0x9a, 0xc5, 0x88, 0x1e, 0x24, 0x0a, 0x22,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b,
+ 0x65, 0x79, 0x22, 0xd2, 0x04, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b,
+ 0x69, 0x6e, 0x64, 0x12, 0x48, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x42, 0x0a,
+ 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69,
+ 0x6e, 0x64, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x00, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74,
+ 0x65, 0x12, 0x48, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72,
+ 0x48, 0x00, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x3f, 0x0a, 0x04, 0x68,
+ 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e,
+ 0x48, 0x6f, 0x73, 0x74, 0x48, 0x00, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x1a, 0x3d, 0x0a, 0x07,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b,
+ 0x69, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x0a, 0x05, 0x52,
+ 0x6f, 0x75, 0x74, 0x65, 0x3a, 0x30, 0x9a, 0xc5, 0x88, 0x1e, 0x2b, 0x0a, 0x29, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64,
+ 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x1a, 0x3d, 0x0a, 0x07, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65,
+ 0x72, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d, 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32,
+ 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x43, 0x6c,
+ 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x37, 0x0a, 0x04, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x2f, 0x9a,
+ 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x2a,
+ 0x9a, 0xc5, 0x88, 0x1e, 0x25, 0x0a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x32, 0x2e, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x42, 0x0b, 0x0a, 0x04, 0x6b, 0x69,
+ 0x6e, 0x64, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x89, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02,
+ 0x10, 0x02, 0x0a, 0x24, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78,
+ 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x42, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79,
+ 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e,
+ 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_metadata_v3_metadata_proto_rawDescOnce sync.Once
+ file_envoy_type_metadata_v3_metadata_proto_rawDescData = file_envoy_type_metadata_v3_metadata_proto_rawDesc
+)
+
+func file_envoy_type_metadata_v3_metadata_proto_rawDescGZIP() []byte {
+ file_envoy_type_metadata_v3_metadata_proto_rawDescOnce.Do(func() {
+ file_envoy_type_metadata_v3_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_metadata_v3_metadata_proto_rawDescData)
+ })
+ return file_envoy_type_metadata_v3_metadata_proto_rawDescData
+}
+
+var file_envoy_type_metadata_v3_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_envoy_type_metadata_v3_metadata_proto_goTypes = []interface{}{
+ (*MetadataKey)(nil), // 0: envoy.type.metadata.v3.MetadataKey
+ (*MetadataKind)(nil), // 1: envoy.type.metadata.v3.MetadataKind
+ (*MetadataKey_PathSegment)(nil), // 2: envoy.type.metadata.v3.MetadataKey.PathSegment
+ (*MetadataKind_Request)(nil), // 3: envoy.type.metadata.v3.MetadataKind.Request
+ (*MetadataKind_Route)(nil), // 4: envoy.type.metadata.v3.MetadataKind.Route
+ (*MetadataKind_Cluster)(nil), // 5: envoy.type.metadata.v3.MetadataKind.Cluster
+ (*MetadataKind_Host)(nil), // 6: envoy.type.metadata.v3.MetadataKind.Host
+}
+var file_envoy_type_metadata_v3_metadata_proto_depIdxs = []int32{
+ 2, // 0: envoy.type.metadata.v3.MetadataKey.path:type_name -> envoy.type.metadata.v3.MetadataKey.PathSegment
+ 3, // 1: envoy.type.metadata.v3.MetadataKind.request:type_name -> envoy.type.metadata.v3.MetadataKind.Request
+ 4, // 2: envoy.type.metadata.v3.MetadataKind.route:type_name -> envoy.type.metadata.v3.MetadataKind.Route
+ 5, // 3: envoy.type.metadata.v3.MetadataKind.cluster:type_name -> envoy.type.metadata.v3.MetadataKind.Cluster
+ 6, // 4: envoy.type.metadata.v3.MetadataKind.host:type_name -> envoy.type.metadata.v3.MetadataKind.Host
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_metadata_v3_metadata_proto_init() }
+func file_envoy_type_metadata_v3_metadata_proto_init() {
+ if File_envoy_type_metadata_v3_metadata_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_metadata_v3_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataKey); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_metadata_v3_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataKind); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_metadata_v3_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataKey_PathSegment); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_metadata_v3_metadata_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataKind_Request); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_metadata_v3_metadata_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataKind_Route); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_metadata_v3_metadata_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataKind_Cluster); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_metadata_v3_metadata_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MetadataKind_Host); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_metadata_v3_metadata_proto_msgTypes[1].OneofWrappers = []interface{}{
+ (*MetadataKind_Request_)(nil),
+ (*MetadataKind_Route_)(nil),
+ (*MetadataKind_Cluster_)(nil),
+ (*MetadataKind_Host_)(nil),
+ }
+ file_envoy_type_metadata_v3_metadata_proto_msgTypes[2].OneofWrappers = []interface{}{
+ (*MetadataKey_PathSegment_Key)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_metadata_v3_metadata_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_metadata_v3_metadata_proto_goTypes,
+ DependencyIndexes: file_envoy_type_metadata_v3_metadata_proto_depIdxs,
+ MessageInfos: file_envoy_type_metadata_v3_metadata_proto_msgTypes,
+ }.Build()
+ File_envoy_type_metadata_v3_metadata_proto = out.File
+ file_envoy_type_metadata_v3_metadata_proto_rawDesc = nil
+ file_envoy_type_metadata_v3_metadata_proto_goTypes = nil
+ file_envoy_type_metadata_v3_metadata_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3/metadata.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3/metadata.pb.validate.go
new file mode 100644
index 000000000..adc8c8ed5
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3/metadata.pb.validate.go
@@ -0,0 +1,1025 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/metadata/v3/metadata.proto
+
+package metadatav3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on MetadataKey with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *MetadataKey) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MetadataKey with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in MetadataKeyMultiError, or
+// nil if none found.
+func (m *MetadataKey) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MetadataKey) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetKey()) < 1 {
+ err := MetadataKeyValidationError{
+ field: "Key",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(m.GetPath()) < 1 {
+ err := MetadataKeyValidationError{
+ field: "Path",
+ reason: "value must contain at least 1 item(s)",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ for idx, item := range m.GetPath() {
+ _, _ = idx, item
+
+ if all {
+ switch v := interface{}(item).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MetadataKeyValidationError{
+ field: fmt.Sprintf("Path[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MetadataKeyValidationError{
+ field: fmt.Sprintf("Path[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(item).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MetadataKeyValidationError{
+ field: fmt.Sprintf("Path[%v]", idx),
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ }
+
+ if len(errors) > 0 {
+ return MetadataKeyMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataKeyMultiError is an error wrapping multiple validation errors
+// returned by MetadataKey.ValidateAll() if the designated constraints aren't met.
+type MetadataKeyMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataKeyMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MetadataKeyMultiError) AllErrors() []error { return m }
+
+// MetadataKeyValidationError is the validation error returned by
+// MetadataKey.Validate if the designated constraints aren't met.
+type MetadataKeyValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataKeyValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataKeyValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataKeyValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataKeyValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataKeyValidationError) ErrorName() string { return "MetadataKeyValidationError" }
+
+// Error satisfies the builtin error interface
+func (e MetadataKeyValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMetadataKey.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataKeyValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataKeyValidationError{}
+
+// Validate checks the field values on MetadataKind with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *MetadataKind) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MetadataKind with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in MetadataKindMultiError, or
+// nil if none found.
+func (m *MetadataKind) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MetadataKind) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofKindPresent := false
+ switch v := m.Kind.(type) {
+ case *MetadataKind_Request_:
+ if v == nil {
+ err := MetadataKindValidationError{
+ field: "Kind",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofKindPresent = true
+
+ if all {
+ switch v := interface{}(m.GetRequest()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MetadataKindValidationError{
+ field: "Request",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MetadataKindValidationError{
+ field: "Request",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequest()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MetadataKindValidationError{
+ field: "Request",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *MetadataKind_Route_:
+ if v == nil {
+ err := MetadataKindValidationError{
+ field: "Kind",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofKindPresent = true
+
+ if all {
+ switch v := interface{}(m.GetRoute()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MetadataKindValidationError{
+ field: "Route",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MetadataKindValidationError{
+ field: "Route",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRoute()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MetadataKindValidationError{
+ field: "Route",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *MetadataKind_Cluster_:
+ if v == nil {
+ err := MetadataKindValidationError{
+ field: "Kind",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofKindPresent = true
+
+ if all {
+ switch v := interface{}(m.GetCluster()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MetadataKindValidationError{
+ field: "Cluster",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MetadataKindValidationError{
+ field: "Cluster",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetCluster()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MetadataKindValidationError{
+ field: "Cluster",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *MetadataKind_Host_:
+ if v == nil {
+ err := MetadataKindValidationError{
+ field: "Kind",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofKindPresent = true
+
+ if all {
+ switch v := interface{}(m.GetHost()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, MetadataKindValidationError{
+ field: "Host",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, MetadataKindValidationError{
+ field: "Host",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetHost()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return MetadataKindValidationError{
+ field: "Host",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofKindPresent {
+ err := MetadataKindValidationError{
+ field: "Kind",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return MetadataKindMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataKindMultiError is an error wrapping multiple validation errors
+// returned by MetadataKind.ValidateAll() if the designated constraints aren't met.
+type MetadataKindMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataKindMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MetadataKindMultiError) AllErrors() []error { return m }
+
+// MetadataKindValidationError is the validation error returned by
+// MetadataKind.Validate if the designated constraints aren't met.
+type MetadataKindValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataKindValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataKindValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataKindValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataKindValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataKindValidationError) ErrorName() string { return "MetadataKindValidationError" }
+
+// Error satisfies the builtin error interface
+func (e MetadataKindValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMetadataKind.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataKindValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataKindValidationError{}
+
+// Validate checks the field values on MetadataKey_PathSegment with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *MetadataKey_PathSegment) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MetadataKey_PathSegment with the
+// rules defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MetadataKey_PathSegmentMultiError, or nil if none found.
+func (m *MetadataKey_PathSegment) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MetadataKey_PathSegment) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofSegmentPresent := false
+ switch v := m.Segment.(type) {
+ case *MetadataKey_PathSegment_Key:
+ if v == nil {
+ err := MetadataKey_PathSegmentValidationError{
+ field: "Segment",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofSegmentPresent = true
+
+ if utf8.RuneCountInString(m.GetKey()) < 1 {
+ err := MetadataKey_PathSegmentValidationError{
+ field: "Key",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofSegmentPresent {
+ err := MetadataKey_PathSegmentValidationError{
+ field: "Segment",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return MetadataKey_PathSegmentMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataKey_PathSegmentMultiError is an error wrapping multiple validation
+// errors returned by MetadataKey_PathSegment.ValidateAll() if the designated
+// constraints aren't met.
+type MetadataKey_PathSegmentMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataKey_PathSegmentMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MetadataKey_PathSegmentMultiError) AllErrors() []error { return m }
+
+// MetadataKey_PathSegmentValidationError is the validation error returned by
+// MetadataKey_PathSegment.Validate if the designated constraints aren't met.
+type MetadataKey_PathSegmentValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataKey_PathSegmentValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataKey_PathSegmentValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataKey_PathSegmentValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataKey_PathSegmentValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataKey_PathSegmentValidationError) ErrorName() string {
+ return "MetadataKey_PathSegmentValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MetadataKey_PathSegmentValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMetadataKey_PathSegment.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataKey_PathSegmentValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataKey_PathSegmentValidationError{}
+
+// Validate checks the field values on MetadataKind_Request with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *MetadataKind_Request) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MetadataKind_Request with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MetadataKind_RequestMultiError, or nil if none found.
+func (m *MetadataKind_Request) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MetadataKind_Request) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return MetadataKind_RequestMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataKind_RequestMultiError is an error wrapping multiple validation
+// errors returned by MetadataKind_Request.ValidateAll() if the designated
+// constraints aren't met.
+type MetadataKind_RequestMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataKind_RequestMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MetadataKind_RequestMultiError) AllErrors() []error { return m }
+
+// MetadataKind_RequestValidationError is the validation error returned by
+// MetadataKind_Request.Validate if the designated constraints aren't met.
+type MetadataKind_RequestValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataKind_RequestValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataKind_RequestValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataKind_RequestValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataKind_RequestValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataKind_RequestValidationError) ErrorName() string {
+ return "MetadataKind_RequestValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MetadataKind_RequestValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMetadataKind_Request.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataKind_RequestValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataKind_RequestValidationError{}
+
+// Validate checks the field values on MetadataKind_Route with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *MetadataKind_Route) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MetadataKind_Route with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MetadataKind_RouteMultiError, or nil if none found.
+func (m *MetadataKind_Route) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MetadataKind_Route) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return MetadataKind_RouteMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataKind_RouteMultiError is an error wrapping multiple validation errors
+// returned by MetadataKind_Route.ValidateAll() if the designated constraints
+// aren't met.
+type MetadataKind_RouteMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataKind_RouteMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MetadataKind_RouteMultiError) AllErrors() []error { return m }
+
+// MetadataKind_RouteValidationError is the validation error returned by
+// MetadataKind_Route.Validate if the designated constraints aren't met.
+type MetadataKind_RouteValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataKind_RouteValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataKind_RouteValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataKind_RouteValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataKind_RouteValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataKind_RouteValidationError) ErrorName() string {
+ return "MetadataKind_RouteValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MetadataKind_RouteValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMetadataKind_Route.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataKind_RouteValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataKind_RouteValidationError{}
+
+// Validate checks the field values on MetadataKind_Cluster with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *MetadataKind_Cluster) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MetadataKind_Cluster with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MetadataKind_ClusterMultiError, or nil if none found.
+func (m *MetadataKind_Cluster) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MetadataKind_Cluster) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return MetadataKind_ClusterMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataKind_ClusterMultiError is an error wrapping multiple validation
+// errors returned by MetadataKind_Cluster.ValidateAll() if the designated
+// constraints aren't met.
+type MetadataKind_ClusterMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataKind_ClusterMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MetadataKind_ClusterMultiError) AllErrors() []error { return m }
+
+// MetadataKind_ClusterValidationError is the validation error returned by
+// MetadataKind_Cluster.Validate if the designated constraints aren't met.
+type MetadataKind_ClusterValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataKind_ClusterValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataKind_ClusterValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataKind_ClusterValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataKind_ClusterValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataKind_ClusterValidationError) ErrorName() string {
+ return "MetadataKind_ClusterValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MetadataKind_ClusterValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMetadataKind_Cluster.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataKind_ClusterValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataKind_ClusterValidationError{}
+
+// Validate checks the field values on MetadataKind_Host with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *MetadataKind_Host) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on MetadataKind_Host with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// MetadataKind_HostMultiError, or nil if none found.
+func (m *MetadataKind_Host) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *MetadataKind_Host) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return MetadataKind_HostMultiError(errors)
+ }
+
+ return nil
+}
+
+// MetadataKind_HostMultiError is an error wrapping multiple validation errors
+// returned by MetadataKind_Host.ValidateAll() if the designated constraints
+// aren't met.
+type MetadataKind_HostMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m MetadataKind_HostMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m MetadataKind_HostMultiError) AllErrors() []error { return m }
+
+// MetadataKind_HostValidationError is the validation error returned by
+// MetadataKind_Host.Validate if the designated constraints aren't met.
+type MetadataKind_HostValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e MetadataKind_HostValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e MetadataKind_HostValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e MetadataKind_HostValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e MetadataKind_HostValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e MetadataKind_HostValidationError) ErrorName() string {
+ return "MetadataKind_HostValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e MetadataKind_HostValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sMetadataKind_Host.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = MetadataKind_HostValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = MetadataKind_HostValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3/metadata_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3/metadata_vtproto.pb.go
new file mode 100644
index 000000000..efbf1efc3
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3/metadata_vtproto.pb.go
@@ -0,0 +1,563 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/metadata/v3/metadata.proto
+
+package metadatav3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *MetadataKey_PathSegment) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetadataKey_PathSegment) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKey_PathSegment) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Segment.(*MetadataKey_PathSegment_Key); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MetadataKey_PathSegment_Key) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKey_PathSegment_Key) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ return len(dAtA) - i, nil
+}
+func (m *MetadataKey) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetadataKey) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKey) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Path) > 0 {
+ for iNdEx := len(m.Path) - 1; iNdEx >= 0; iNdEx-- {
+ size, err := m.Path[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ }
+ if len(m.Key) > 0 {
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MetadataKind_Request) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetadataKind_Request) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKind_Request) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MetadataKind_Route) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetadataKind_Route) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKind_Route) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MetadataKind_Cluster) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetadataKind_Cluster) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKind_Cluster) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MetadataKind_Host) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetadataKind_Host) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKind_Host) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MetadataKind) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *MetadataKind) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKind) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Kind.(*MetadataKind_Host_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Kind.(*MetadataKind_Cluster_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Kind.(*MetadataKind_Route_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Kind.(*MetadataKind_Request_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *MetadataKind_Request_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKind_Request_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Request != nil {
+ size, err := m.Request.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *MetadataKind_Route_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKind_Route_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Route != nil {
+ size, err := m.Route.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *MetadataKind_Cluster_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKind_Cluster_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Cluster != nil {
+ size, err := m.Cluster.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *MetadataKind_Host_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *MetadataKind_Host_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Host != nil {
+ size, err := m.Host.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *MetadataKey_PathSegment) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Segment.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *MetadataKey_PathSegment_Key) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ return n
+}
+func (m *MetadataKey) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if len(m.Path) > 0 {
+ for _, e := range m.Path {
+ l = e.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *MetadataKind_Request) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *MetadataKind_Route) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *MetadataKind_Cluster) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *MetadataKind_Host) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *MetadataKind) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Kind.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *MetadataKind_Request_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Request != nil {
+ l = m.Request.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *MetadataKind_Route_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Route != nil {
+ l = m.Route.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *MetadataKind_Cluster_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Cluster != nil {
+ l = m.Cluster.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *MetadataKind_Host_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Host != nil {
+ l = m.Host.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3/custom_tag.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3/custom_tag.pb.go
new file mode 100644
index 000000000..388e4749e
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3/custom_tag.pb.go
@@ -0,0 +1,609 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/tracing/v3/custom_tag.proto
+
+package tracingv3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ v3 "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Describes custom tags for the active span.
+// [#next-free-field: 6]
+type CustomTag struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Used to populate the tag name.
+ Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
+ // Used to specify what kind of custom tag.
+ //
+ // Types that are assignable to Type:
+ //
+ // *CustomTag_Literal_
+ // *CustomTag_Environment_
+ // *CustomTag_RequestHeader
+ // *CustomTag_Metadata_
+ Type isCustomTag_Type `protobuf_oneof:"type"`
+}
+
+func (x *CustomTag) Reset() {
+ *x = CustomTag{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CustomTag) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CustomTag) ProtoMessage() {}
+
+func (x *CustomTag) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CustomTag.ProtoReflect.Descriptor instead.
+func (*CustomTag) Descriptor() ([]byte, []int) {
+ return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CustomTag) GetTag() string {
+ if x != nil {
+ return x.Tag
+ }
+ return ""
+}
+
+func (m *CustomTag) GetType() isCustomTag_Type {
+ if m != nil {
+ return m.Type
+ }
+ return nil
+}
+
+func (x *CustomTag) GetLiteral() *CustomTag_Literal {
+ if x, ok := x.GetType().(*CustomTag_Literal_); ok {
+ return x.Literal
+ }
+ return nil
+}
+
+func (x *CustomTag) GetEnvironment() *CustomTag_Environment {
+ if x, ok := x.GetType().(*CustomTag_Environment_); ok {
+ return x.Environment
+ }
+ return nil
+}
+
+func (x *CustomTag) GetRequestHeader() *CustomTag_Header {
+ if x, ok := x.GetType().(*CustomTag_RequestHeader); ok {
+ return x.RequestHeader
+ }
+ return nil
+}
+
+func (x *CustomTag) GetMetadata() *CustomTag_Metadata {
+ if x, ok := x.GetType().(*CustomTag_Metadata_); ok {
+ return x.Metadata
+ }
+ return nil
+}
+
+type isCustomTag_Type interface {
+ isCustomTag_Type()
+}
+
+type CustomTag_Literal_ struct {
+ // A literal custom tag.
+ Literal *CustomTag_Literal `protobuf:"bytes,2,opt,name=literal,proto3,oneof"`
+}
+
+type CustomTag_Environment_ struct {
+ // An environment custom tag.
+ Environment *CustomTag_Environment `protobuf:"bytes,3,opt,name=environment,proto3,oneof"`
+}
+
+type CustomTag_RequestHeader struct {
+ // A request header custom tag.
+ RequestHeader *CustomTag_Header `protobuf:"bytes,4,opt,name=request_header,json=requestHeader,proto3,oneof"`
+}
+
+type CustomTag_Metadata_ struct {
+ // A custom tag to obtain tag value from the metadata.
+ Metadata *CustomTag_Metadata `protobuf:"bytes,5,opt,name=metadata,proto3,oneof"`
+}
+
+func (*CustomTag_Literal_) isCustomTag_Type() {}
+
+func (*CustomTag_Environment_) isCustomTag_Type() {}
+
+func (*CustomTag_RequestHeader) isCustomTag_Type() {}
+
+func (*CustomTag_Metadata_) isCustomTag_Type() {}
+
+// Literal type custom tag with static value for the tag value.
+type CustomTag_Literal struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Static literal value to populate the tag value.
+ Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *CustomTag_Literal) Reset() {
+ *x = CustomTag_Literal{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CustomTag_Literal) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CustomTag_Literal) ProtoMessage() {}
+
+func (x *CustomTag_Literal) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CustomTag_Literal.ProtoReflect.Descriptor instead.
+func (*CustomTag_Literal) Descriptor() ([]byte, []int) {
+ return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *CustomTag_Literal) GetValue() string {
+ if x != nil {
+ return x.Value
+ }
+ return ""
+}
+
+// Environment type custom tag with environment name and default value.
+type CustomTag_Environment struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Environment variable name to obtain the value to populate the tag value.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // When the environment variable is not found,
+ // the tag value will be populated with this default value if specified,
+ // otherwise no tag will be populated.
+ DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+}
+
+func (x *CustomTag_Environment) Reset() {
+ *x = CustomTag_Environment{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CustomTag_Environment) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CustomTag_Environment) ProtoMessage() {}
+
+func (x *CustomTag_Environment) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CustomTag_Environment.ProtoReflect.Descriptor instead.
+func (*CustomTag_Environment) Descriptor() ([]byte, []int) {
+ return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0, 1}
+}
+
+func (x *CustomTag_Environment) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CustomTag_Environment) GetDefaultValue() string {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return ""
+}
+
+// Header type custom tag with header name and default value.
+type CustomTag_Header struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Header name to obtain the value to populate the tag value.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // When the header does not exist,
+ // the tag value will be populated with this default value if specified,
+ // otherwise no tag will be populated.
+ DefaultValue string `protobuf:"bytes,2,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+}
+
+func (x *CustomTag_Header) Reset() {
+ *x = CustomTag_Header{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CustomTag_Header) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CustomTag_Header) ProtoMessage() {}
+
+func (x *CustomTag_Header) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CustomTag_Header.ProtoReflect.Descriptor instead.
+func (*CustomTag_Header) Descriptor() ([]byte, []int) {
+ return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0, 2}
+}
+
+func (x *CustomTag_Header) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CustomTag_Header) GetDefaultValue() string {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return ""
+}
+
+// Metadata type custom tag using
+// :ref:`MetadataKey ` to retrieve the protobuf value
+// from :ref:`Metadata `, and populate the tag value with
+// `the canonical JSON `_
+// representation of it.
+type CustomTag_Metadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Specify what kind of metadata to obtain tag value from.
+ Kind *v3.MetadataKind `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
+ // Metadata key to define the path to retrieve the tag value.
+ MetadataKey *v3.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"`
+ // When no valid metadata is found,
+ // the tag value would be populated with this default value if specified,
+ // otherwise no tag would be populated.
+ DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`
+}
+
+func (x *CustomTag_Metadata) Reset() {
+ *x = CustomTag_Metadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CustomTag_Metadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CustomTag_Metadata) ProtoMessage() {}
+
+func (x *CustomTag_Metadata) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CustomTag_Metadata.ProtoReflect.Descriptor instead.
+func (*CustomTag_Metadata) Descriptor() ([]byte, []int) {
+ return file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP(), []int{0, 3}
+}
+
+func (x *CustomTag_Metadata) GetKind() *v3.MetadataKind {
+ if x != nil {
+ return x.Kind
+ }
+ return nil
+}
+
+func (x *CustomTag_Metadata) GetMetadataKey() *v3.MetadataKey {
+ if x != nil {
+ return x.MetadataKey
+ }
+ return nil
+}
+
+func (x *CustomTag_Metadata) GetDefaultValue() string {
+ if x != nil {
+ return x.DefaultValue
+ }
+ return ""
+}
+
+var File_envoy_type_tracing_v3_custom_tag_proto protoreflect.FileDescriptor
+
+var file_envoy_type_tracing_v3_custom_tag_proto_rawDesc = []byte{
+ 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72, 0x61,
+ 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x2f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x74,
+ 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x1a,
+ 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e,
+ 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69,
+ 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0xd4, 0x07, 0x0a, 0x09, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x12,
+ 0x19, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42,
+ 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x44, 0x0a, 0x07, 0x6c, 0x69,
+ 0x74, 0x65, 0x72, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67,
+ 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x4c, 0x69,
+ 0x74, 0x65, 0x72, 0x61, 0x6c, 0x48, 0x00, 0x52, 0x07, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c,
+ 0x12, 0x50, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43, 0x75,
+ 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d,
+ 0x65, 0x6e, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65,
+ 0x6e, 0x74, 0x12, 0x50, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65,
+ 0x61, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e,
+ 0x76, 0x33, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x48, 0x65, 0x61,
+ 0x64, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65,
+ 0x61, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x2e, 0x43,
+ 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x58, 0x0a,
+ 0x07, 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x12, 0x1d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01,
+ 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x2e, 0x9a, 0xc5, 0x88, 0x1e, 0x29, 0x0a, 0x27,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69,
+ 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e,
+ 0x4c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x1a, 0x83, 0x01, 0x0a, 0x0b, 0x45, 0x6e, 0x76, 0x69,
+ 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x32, 0x9a, 0xc5, 0x88, 0x1e, 0x2d,
+ 0x0a, 0x2b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61,
+ 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61,
+ 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x1a, 0x7f, 0x0a,
+ 0x06, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, 0x10, 0x01, 0xc8, 0x01,
+ 0x00, 0xc0, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65,
+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a,
+ 0x2d, 0x9a, 0xc5, 0x88, 0x1e, 0x28, 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75,
+ 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x1a, 0xe2,
+ 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x38, 0x0a, 0x04, 0x6b,
+ 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e,
+ 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x69, 0x6e, 0x64, 0x52,
+ 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x46, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79,
+ 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a,
+ 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x2f, 0x9a, 0xc5, 0x88, 0x1e, 0x2a, 0x0a, 0x28, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x32,
+ 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0x3a, 0x26, 0x9a, 0xc5, 0x88, 0x1e, 0x21, 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76,
+ 0x32, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x54, 0x61, 0x67, 0x42, 0x0b, 0x0a, 0x04, 0x74,
+ 0x79, 0x70, 0x65, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x87, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06,
+ 0x02, 0x10, 0x02, 0x0a, 0x23, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f,
+ 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x74, 0x72,
+ 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d,
+ 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78,
+ 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61,
+ 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x74, 0x72,
+ 0x61, 0x63, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x72, 0x61, 0x63, 0x69, 0x6e, 0x67,
+ 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_tracing_v3_custom_tag_proto_rawDescOnce sync.Once
+ file_envoy_type_tracing_v3_custom_tag_proto_rawDescData = file_envoy_type_tracing_v3_custom_tag_proto_rawDesc
+)
+
+func file_envoy_type_tracing_v3_custom_tag_proto_rawDescGZIP() []byte {
+ file_envoy_type_tracing_v3_custom_tag_proto_rawDescOnce.Do(func() {
+ file_envoy_type_tracing_v3_custom_tag_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_tracing_v3_custom_tag_proto_rawDescData)
+ })
+ return file_envoy_type_tracing_v3_custom_tag_proto_rawDescData
+}
+
+var file_envoy_type_tracing_v3_custom_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_envoy_type_tracing_v3_custom_tag_proto_goTypes = []interface{}{
+ (*CustomTag)(nil), // 0: envoy.type.tracing.v3.CustomTag
+ (*CustomTag_Literal)(nil), // 1: envoy.type.tracing.v3.CustomTag.Literal
+ (*CustomTag_Environment)(nil), // 2: envoy.type.tracing.v3.CustomTag.Environment
+ (*CustomTag_Header)(nil), // 3: envoy.type.tracing.v3.CustomTag.Header
+ (*CustomTag_Metadata)(nil), // 4: envoy.type.tracing.v3.CustomTag.Metadata
+ (*v3.MetadataKind)(nil), // 5: envoy.type.metadata.v3.MetadataKind
+ (*v3.MetadataKey)(nil), // 6: envoy.type.metadata.v3.MetadataKey
+}
+var file_envoy_type_tracing_v3_custom_tag_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.tracing.v3.CustomTag.literal:type_name -> envoy.type.tracing.v3.CustomTag.Literal
+ 2, // 1: envoy.type.tracing.v3.CustomTag.environment:type_name -> envoy.type.tracing.v3.CustomTag.Environment
+ 3, // 2: envoy.type.tracing.v3.CustomTag.request_header:type_name -> envoy.type.tracing.v3.CustomTag.Header
+ 4, // 3: envoy.type.tracing.v3.CustomTag.metadata:type_name -> envoy.type.tracing.v3.CustomTag.Metadata
+ 5, // 4: envoy.type.tracing.v3.CustomTag.Metadata.kind:type_name -> envoy.type.metadata.v3.MetadataKind
+ 6, // 5: envoy.type.tracing.v3.CustomTag.Metadata.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey
+ 6, // [6:6] is the sub-list for method output_type
+ 6, // [6:6] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_tracing_v3_custom_tag_proto_init() }
+func file_envoy_type_tracing_v3_custom_tag_proto_init() {
+ if File_envoy_type_tracing_v3_custom_tag_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CustomTag); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CustomTag_Literal); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CustomTag_Environment); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CustomTag_Header); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CustomTag_Metadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_tracing_v3_custom_tag_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*CustomTag_Literal_)(nil),
+ (*CustomTag_Environment_)(nil),
+ (*CustomTag_RequestHeader)(nil),
+ (*CustomTag_Metadata_)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_tracing_v3_custom_tag_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_tracing_v3_custom_tag_proto_goTypes,
+ DependencyIndexes: file_envoy_type_tracing_v3_custom_tag_proto_depIdxs,
+ MessageInfos: file_envoy_type_tracing_v3_custom_tag_proto_msgTypes,
+ }.Build()
+ File_envoy_type_tracing_v3_custom_tag_proto = out.File
+ file_envoy_type_tracing_v3_custom_tag_proto_rawDesc = nil
+ file_envoy_type_tracing_v3_custom_tag_proto_goTypes = nil
+ file_envoy_type_tracing_v3_custom_tag_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3/custom_tag.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3/custom_tag.pb.validate.go
new file mode 100644
index 000000000..d15de9b68
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3/custom_tag.pb.validate.go
@@ -0,0 +1,847 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/tracing/v3/custom_tag.proto
+
+package tracingv3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on CustomTag with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *CustomTag) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CustomTag with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in CustomTagMultiError, or nil
+// if none found.
+func (m *CustomTag) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CustomTag) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetTag()) < 1 {
+ err := CustomTagValidationError{
+ field: "Tag",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ oneofTypePresent := false
+ switch v := m.Type.(type) {
+ case *CustomTag_Literal_:
+ if v == nil {
+ err := CustomTagValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetLiteral()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CustomTagValidationError{
+ field: "Literal",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CustomTagValidationError{
+ field: "Literal",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetLiteral()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CustomTagValidationError{
+ field: "Literal",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CustomTag_Environment_:
+ if v == nil {
+ err := CustomTagValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetEnvironment()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CustomTagValidationError{
+ field: "Environment",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CustomTagValidationError{
+ field: "Environment",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetEnvironment()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CustomTagValidationError{
+ field: "Environment",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CustomTag_RequestHeader:
+ if v == nil {
+ err := CustomTagValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetRequestHeader()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CustomTagValidationError{
+ field: "RequestHeader",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CustomTagValidationError{
+ field: "RequestHeader",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequestHeader()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CustomTagValidationError{
+ field: "RequestHeader",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *CustomTag_Metadata_:
+ if v == nil {
+ err := CustomTagValidationError{
+ field: "Type",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofTypePresent = true
+
+ if all {
+ switch v := interface{}(m.GetMetadata()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CustomTagValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CustomTagValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CustomTagValidationError{
+ field: "Metadata",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofTypePresent {
+ err := CustomTagValidationError{
+ field: "Type",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return CustomTagMultiError(errors)
+ }
+
+ return nil
+}
+
+// CustomTagMultiError is an error wrapping multiple validation errors returned
+// by CustomTag.ValidateAll() if the designated constraints aren't met.
+type CustomTagMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CustomTagMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CustomTagMultiError) AllErrors() []error { return m }
+
+// CustomTagValidationError is the validation error returned by
+// CustomTag.Validate if the designated constraints aren't met.
+type CustomTagValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CustomTagValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CustomTagValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CustomTagValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CustomTagValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CustomTagValidationError) ErrorName() string { return "CustomTagValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CustomTagValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCustomTag.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CustomTagValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CustomTagValidationError{}
+
+// Validate checks the field values on CustomTag_Literal with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *CustomTag_Literal) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CustomTag_Literal with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CustomTag_LiteralMultiError, or nil if none found.
+func (m *CustomTag_Literal) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CustomTag_Literal) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetValue()) < 1 {
+ err := CustomTag_LiteralValidationError{
+ field: "Value",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return CustomTag_LiteralMultiError(errors)
+ }
+
+ return nil
+}
+
+// CustomTag_LiteralMultiError is an error wrapping multiple validation errors
+// returned by CustomTag_Literal.ValidateAll() if the designated constraints
+// aren't met.
+type CustomTag_LiteralMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CustomTag_LiteralMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CustomTag_LiteralMultiError) AllErrors() []error { return m }
+
+// CustomTag_LiteralValidationError is the validation error returned by
+// CustomTag_Literal.Validate if the designated constraints aren't met.
+type CustomTag_LiteralValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CustomTag_LiteralValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CustomTag_LiteralValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CustomTag_LiteralValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CustomTag_LiteralValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CustomTag_LiteralValidationError) ErrorName() string {
+ return "CustomTag_LiteralValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CustomTag_LiteralValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCustomTag_Literal.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CustomTag_LiteralValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CustomTag_LiteralValidationError{}
+
+// Validate checks the field values on CustomTag_Environment with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *CustomTag_Environment) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CustomTag_Environment with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CustomTag_EnvironmentMultiError, or nil if none found.
+func (m *CustomTag_Environment) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CustomTag_Environment) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := CustomTag_EnvironmentValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for DefaultValue
+
+ if len(errors) > 0 {
+ return CustomTag_EnvironmentMultiError(errors)
+ }
+
+ return nil
+}
+
+// CustomTag_EnvironmentMultiError is an error wrapping multiple validation
+// errors returned by CustomTag_Environment.ValidateAll() if the designated
+// constraints aren't met.
+type CustomTag_EnvironmentMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CustomTag_EnvironmentMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CustomTag_EnvironmentMultiError) AllErrors() []error { return m }
+
+// CustomTag_EnvironmentValidationError is the validation error returned by
+// CustomTag_Environment.Validate if the designated constraints aren't met.
+type CustomTag_EnvironmentValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CustomTag_EnvironmentValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CustomTag_EnvironmentValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CustomTag_EnvironmentValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CustomTag_EnvironmentValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CustomTag_EnvironmentValidationError) ErrorName() string {
+ return "CustomTag_EnvironmentValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CustomTag_EnvironmentValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCustomTag_Environment.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CustomTag_EnvironmentValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CustomTag_EnvironmentValidationError{}
+
+// Validate checks the field values on CustomTag_Header with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *CustomTag_Header) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CustomTag_Header with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CustomTag_HeaderMultiError, or nil if none found.
+func (m *CustomTag_Header) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CustomTag_Header) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetName()) < 1 {
+ err := CustomTag_HeaderValidationError{
+ field: "Name",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if !_CustomTag_Header_Name_Pattern.MatchString(m.GetName()) {
+ err := CustomTag_HeaderValidationError{
+ field: "Name",
+ reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ // no validation rules for DefaultValue
+
+ if len(errors) > 0 {
+ return CustomTag_HeaderMultiError(errors)
+ }
+
+ return nil
+}
+
+// CustomTag_HeaderMultiError is an error wrapping multiple validation errors
+// returned by CustomTag_Header.ValidateAll() if the designated constraints
+// aren't met.
+type CustomTag_HeaderMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CustomTag_HeaderMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CustomTag_HeaderMultiError) AllErrors() []error { return m }
+
+// CustomTag_HeaderValidationError is the validation error returned by
+// CustomTag_Header.Validate if the designated constraints aren't met.
+type CustomTag_HeaderValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CustomTag_HeaderValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CustomTag_HeaderValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CustomTag_HeaderValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CustomTag_HeaderValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CustomTag_HeaderValidationError) ErrorName() string { return "CustomTag_HeaderValidationError" }
+
+// Error satisfies the builtin error interface
+func (e CustomTag_HeaderValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCustomTag_Header.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CustomTag_HeaderValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CustomTag_HeaderValidationError{}
+
+var _CustomTag_Header_Name_Pattern = regexp.MustCompile("^[^\x00\n\r]*$")
+
+// Validate checks the field values on CustomTag_Metadata with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *CustomTag_Metadata) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on CustomTag_Metadata with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// CustomTag_MetadataMultiError, or nil if none found.
+func (m *CustomTag_Metadata) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *CustomTag_Metadata) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if all {
+ switch v := interface{}(m.GetKind()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CustomTag_MetadataValidationError{
+ field: "Kind",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CustomTag_MetadataValidationError{
+ field: "Kind",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetKind()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CustomTag_MetadataValidationError{
+ field: "Kind",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ if all {
+ switch v := interface{}(m.GetMetadataKey()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, CustomTag_MetadataValidationError{
+ field: "MetadataKey",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, CustomTag_MetadataValidationError{
+ field: "MetadataKey",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return CustomTag_MetadataValidationError{
+ field: "MetadataKey",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ // no validation rules for DefaultValue
+
+ if len(errors) > 0 {
+ return CustomTag_MetadataMultiError(errors)
+ }
+
+ return nil
+}
+
+// CustomTag_MetadataMultiError is an error wrapping multiple validation errors
+// returned by CustomTag_Metadata.ValidateAll() if the designated constraints
+// aren't met.
+type CustomTag_MetadataMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m CustomTag_MetadataMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m CustomTag_MetadataMultiError) AllErrors() []error { return m }
+
+// CustomTag_MetadataValidationError is the validation error returned by
+// CustomTag_Metadata.Validate if the designated constraints aren't met.
+type CustomTag_MetadataValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e CustomTag_MetadataValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e CustomTag_MetadataValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e CustomTag_MetadataValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e CustomTag_MetadataValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e CustomTag_MetadataValidationError) ErrorName() string {
+ return "CustomTag_MetadataValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e CustomTag_MetadataValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sCustomTag_Metadata.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = CustomTag_MetadataValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = CustomTag_MetadataValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3/custom_tag_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3/custom_tag_vtproto.pb.go
new file mode 100644
index 000000000..e558c5d07
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/tracing/v3/custom_tag_vtproto.pb.go
@@ -0,0 +1,556 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/tracing/v3/custom_tag.proto
+
+package tracingv3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ proto "google.golang.org/protobuf/proto"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *CustomTag_Literal) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomTag_Literal) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CustomTag_Literal) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Value) > 0 {
+ i -= len(m.Value)
+ copy(dAtA[i:], m.Value)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Value)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CustomTag_Environment) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomTag_Environment) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CustomTag_Environment) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.DefaultValue) > 0 {
+ i -= len(m.DefaultValue)
+ copy(dAtA[i:], m.DefaultValue)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefaultValue)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CustomTag_Header) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomTag_Header) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CustomTag_Header) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.DefaultValue) > 0 {
+ i -= len(m.DefaultValue)
+ copy(dAtA[i:], m.DefaultValue)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefaultValue)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.Name) > 0 {
+ i -= len(m.Name)
+ copy(dAtA[i:], m.Name)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CustomTag_Metadata) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomTag_Metadata) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CustomTag_Metadata) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.DefaultValue) > 0 {
+ i -= len(m.DefaultValue)
+ copy(dAtA[i:], m.DefaultValue)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefaultValue)))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.MetadataKey != nil {
+ if vtmsg, ok := interface{}(m.MetadataKey).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.MetadataKey)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.Kind != nil {
+ if vtmsg, ok := interface{}(m.Kind).(interface {
+ MarshalToSizedBufferVTStrict([]byte) (int, error)
+ }); ok {
+ size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ } else {
+ encoded, err := proto.Marshal(m.Kind)
+ if err != nil {
+ return 0, err
+ }
+ i -= len(encoded)
+ copy(dAtA[i:], encoded)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded)))
+ }
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CustomTag) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *CustomTag) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CustomTag) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Type.(*CustomTag_Metadata_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Type.(*CustomTag_RequestHeader); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Type.(*CustomTag_Environment_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Type.(*CustomTag_Literal_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if len(m.Tag) > 0 {
+ i -= len(m.Tag)
+ copy(dAtA[i:], m.Tag)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tag)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *CustomTag_Literal_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CustomTag_Literal_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Literal != nil {
+ size, err := m.Literal.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CustomTag_Environment_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CustomTag_Environment_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Environment != nil {
+ size, err := m.Environment.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CustomTag_RequestHeader) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CustomTag_RequestHeader) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RequestHeader != nil {
+ size, err := m.RequestHeader.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x22
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x22
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CustomTag_Metadata_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *CustomTag_Metadata_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.Metadata != nil {
+ size, err := m.Metadata.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x2a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x2a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *CustomTag_Literal) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Value)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CustomTag_Environment) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.DefaultValue)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CustomTag_Header) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Name)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.DefaultValue)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CustomTag_Metadata) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Kind != nil {
+ if size, ok := interface{}(m.Kind).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.Kind)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.MetadataKey != nil {
+ if size, ok := interface{}(m.MetadataKey).(interface {
+ SizeVT() int
+ }); ok {
+ l = size.SizeVT()
+ } else {
+ l = proto.Size(m.MetadataKey)
+ }
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ l = len(m.DefaultValue)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CustomTag) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Tag)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if vtmsg, ok := m.Type.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *CustomTag_Literal_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Literal != nil {
+ l = m.Literal.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *CustomTag_Environment_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Environment != nil {
+ l = m.Environment.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *CustomTag_RequestHeader) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RequestHeader != nil {
+ l = m.RequestHeader.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *CustomTag_Metadata_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Metadata != nil {
+ l = m.Metadata.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.go
new file mode 100644
index 000000000..af620911f
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.go
@@ -0,0 +1,333 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/v3/hash_policy.proto
+
+package typev3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Specifies the hash policy
+type HashPolicy struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to PolicySpecifier:
+ //
+ // *HashPolicy_SourceIp_
+ // *HashPolicy_FilterState_
+ PolicySpecifier isHashPolicy_PolicySpecifier `protobuf_oneof:"policy_specifier"`
+}
+
+func (x *HashPolicy) Reset() {
+ *x = HashPolicy{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HashPolicy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HashPolicy) ProtoMessage() {}
+
+func (x *HashPolicy) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HashPolicy.ProtoReflect.Descriptor instead.
+func (*HashPolicy) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_hash_policy_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *HashPolicy) GetPolicySpecifier() isHashPolicy_PolicySpecifier {
+ if m != nil {
+ return m.PolicySpecifier
+ }
+ return nil
+}
+
+func (x *HashPolicy) GetSourceIp() *HashPolicy_SourceIp {
+ if x, ok := x.GetPolicySpecifier().(*HashPolicy_SourceIp_); ok {
+ return x.SourceIp
+ }
+ return nil
+}
+
+func (x *HashPolicy) GetFilterState() *HashPolicy_FilterState {
+ if x, ok := x.GetPolicySpecifier().(*HashPolicy_FilterState_); ok {
+ return x.FilterState
+ }
+ return nil
+}
+
+type isHashPolicy_PolicySpecifier interface {
+ isHashPolicy_PolicySpecifier()
+}
+
+type HashPolicy_SourceIp_ struct {
+ SourceIp *HashPolicy_SourceIp `protobuf:"bytes,1,opt,name=source_ip,json=sourceIp,proto3,oneof"`
+}
+
+type HashPolicy_FilterState_ struct {
+ FilterState *HashPolicy_FilterState `protobuf:"bytes,2,opt,name=filter_state,json=filterState,proto3,oneof"`
+}
+
+func (*HashPolicy_SourceIp_) isHashPolicy_PolicySpecifier() {}
+
+func (*HashPolicy_FilterState_) isHashPolicy_PolicySpecifier() {}
+
+// The source IP will be used to compute the hash used by hash-based load balancing
+// algorithms.
+type HashPolicy_SourceIp struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *HashPolicy_SourceIp) Reset() {
+ *x = HashPolicy_SourceIp{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HashPolicy_SourceIp) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HashPolicy_SourceIp) ProtoMessage() {}
+
+func (x *HashPolicy_SourceIp) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HashPolicy_SourceIp.ProtoReflect.Descriptor instead.
+func (*HashPolicy_SourceIp) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_hash_policy_proto_rawDescGZIP(), []int{0, 0}
+}
+
+// An Object in the :ref:`filterState ` will be used
+// to compute the hash used by hash-based load balancing algorithms.
+type HashPolicy_FilterState struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the Object in the filterState, which is an Envoy::Hashable object. If there is no
+ // data associated with the key, or the stored object is not Envoy::Hashable, no hash will be
+ // produced.
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+}
+
+func (x *HashPolicy_FilterState) Reset() {
+ *x = HashPolicy_FilterState{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HashPolicy_FilterState) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HashPolicy_FilterState) ProtoMessage() {}
+
+func (x *HashPolicy_FilterState) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_hash_policy_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HashPolicy_FilterState.ProtoReflect.Descriptor instead.
+func (*HashPolicy_FilterState) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_hash_policy_proto_rawDescGZIP(), []int{0, 1}
+}
+
+func (x *HashPolicy_FilterState) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+var File_envoy_type_v3_hash_policy_proto protoreflect.FileDescriptor
+
+var file_envoy_type_v3_hash_policy_proto_rawDesc = []byte{
+ 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x68, 0x61, 0x73, 0x68, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33,
+ 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaf, 0x02, 0x0a, 0x0a,
+ 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x41, 0x0a, 0x09, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x61,
+ 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49,
+ 0x70, 0x48, 0x00, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x12, 0x4a, 0x0a,
+ 0x0c, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x46,
+ 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x66, 0x69,
+ 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x31, 0x0a, 0x08, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x49, 0x70, 0x3a, 0x25, 0x9a, 0xc5, 0x88, 0x1e, 0x20, 0x0a, 0x1e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x70, 0x1a, 0x28, 0x0a, 0x0b,
+ 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x19, 0x0a, 0x03, 0x6b,
+ 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10,
+ 0x01, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x42, 0x17, 0x0a, 0x10, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5f, 0x73,
+ 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x75, 0xba,
+ 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70,
+ 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0f, 0x48, 0x61, 0x73, 0x68, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67,
+ 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79,
+ 0x70, 0x65, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_v3_hash_policy_proto_rawDescOnce sync.Once
+ file_envoy_type_v3_hash_policy_proto_rawDescData = file_envoy_type_v3_hash_policy_proto_rawDesc
+)
+
+func file_envoy_type_v3_hash_policy_proto_rawDescGZIP() []byte {
+ file_envoy_type_v3_hash_policy_proto_rawDescOnce.Do(func() {
+ file_envoy_type_v3_hash_policy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_hash_policy_proto_rawDescData)
+ })
+ return file_envoy_type_v3_hash_policy_proto_rawDescData
+}
+
+var file_envoy_type_v3_hash_policy_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_envoy_type_v3_hash_policy_proto_goTypes = []interface{}{
+ (*HashPolicy)(nil), // 0: envoy.type.v3.HashPolicy
+ (*HashPolicy_SourceIp)(nil), // 1: envoy.type.v3.HashPolicy.SourceIp
+ (*HashPolicy_FilterState)(nil), // 2: envoy.type.v3.HashPolicy.FilterState
+}
+var file_envoy_type_v3_hash_policy_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.v3.HashPolicy.source_ip:type_name -> envoy.type.v3.HashPolicy.SourceIp
+ 2, // 1: envoy.type.v3.HashPolicy.filter_state:type_name -> envoy.type.v3.HashPolicy.FilterState
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_v3_hash_policy_proto_init() }
+func file_envoy_type_v3_hash_policy_proto_init() {
+ if File_envoy_type_v3_hash_policy_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_v3_hash_policy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HashPolicy); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_v3_hash_policy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HashPolicy_SourceIp); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_v3_hash_policy_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HashPolicy_FilterState); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_v3_hash_policy_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*HashPolicy_SourceIp_)(nil),
+ (*HashPolicy_FilterState_)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_v3_hash_policy_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_v3_hash_policy_proto_goTypes,
+ DependencyIndexes: file_envoy_type_v3_hash_policy_proto_depIdxs,
+ MessageInfos: file_envoy_type_v3_hash_policy_proto_msgTypes,
+ }.Build()
+ File_envoy_type_v3_hash_policy_proto = out.File
+ file_envoy_type_v3_hash_policy_proto_rawDesc = nil
+ file_envoy_type_v3_hash_policy_proto_goTypes = nil
+ file_envoy_type_v3_hash_policy_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.validate.go
new file mode 100644
index 000000000..5ec37f540
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy.pb.validate.go
@@ -0,0 +1,451 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/v3/hash_policy.proto
+
+package typev3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on HashPolicy with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *HashPolicy) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HashPolicy with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in HashPolicyMultiError, or
+// nil if none found.
+func (m *HashPolicy) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HashPolicy) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofPolicySpecifierPresent := false
+ switch v := m.PolicySpecifier.(type) {
+ case *HashPolicy_SourceIp_:
+ if v == nil {
+ err := HashPolicyValidationError{
+ field: "PolicySpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofPolicySpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetSourceIp()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HashPolicyValidationError{
+ field: "SourceIp",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HashPolicyValidationError{
+ field: "SourceIp",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetSourceIp()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HashPolicyValidationError{
+ field: "SourceIp",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *HashPolicy_FilterState_:
+ if v == nil {
+ err := HashPolicyValidationError{
+ field: "PolicySpecifier",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofPolicySpecifierPresent = true
+
+ if all {
+ switch v := interface{}(m.GetFilterState()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, HashPolicyValidationError{
+ field: "FilterState",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, HashPolicyValidationError{
+ field: "FilterState",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetFilterState()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return HashPolicyValidationError{
+ field: "FilterState",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofPolicySpecifierPresent {
+ err := HashPolicyValidationError{
+ field: "PolicySpecifier",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return HashPolicyMultiError(errors)
+ }
+
+ return nil
+}
+
+// HashPolicyMultiError is an error wrapping multiple validation errors
+// returned by HashPolicy.ValidateAll() if the designated constraints aren't met.
+type HashPolicyMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HashPolicyMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HashPolicyMultiError) AllErrors() []error { return m }
+
+// HashPolicyValidationError is the validation error returned by
+// HashPolicy.Validate if the designated constraints aren't met.
+type HashPolicyValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HashPolicyValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HashPolicyValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HashPolicyValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HashPolicyValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HashPolicyValidationError) ErrorName() string { return "HashPolicyValidationError" }
+
+// Error satisfies the builtin error interface
+func (e HashPolicyValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHashPolicy.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HashPolicyValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HashPolicyValidationError{}
+
+// Validate checks the field values on HashPolicy_SourceIp with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HashPolicy_SourceIp) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HashPolicy_SourceIp with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// HashPolicy_SourceIpMultiError, or nil if none found.
+func (m *HashPolicy_SourceIp) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HashPolicy_SourceIp) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if len(errors) > 0 {
+ return HashPolicy_SourceIpMultiError(errors)
+ }
+
+ return nil
+}
+
+// HashPolicy_SourceIpMultiError is an error wrapping multiple validation
+// errors returned by HashPolicy_SourceIp.ValidateAll() if the designated
+// constraints aren't met.
+type HashPolicy_SourceIpMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HashPolicy_SourceIpMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HashPolicy_SourceIpMultiError) AllErrors() []error { return m }
+
+// HashPolicy_SourceIpValidationError is the validation error returned by
+// HashPolicy_SourceIp.Validate if the designated constraints aren't met.
+type HashPolicy_SourceIpValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HashPolicy_SourceIpValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HashPolicy_SourceIpValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HashPolicy_SourceIpValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HashPolicy_SourceIpValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HashPolicy_SourceIpValidationError) ErrorName() string {
+ return "HashPolicy_SourceIpValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HashPolicy_SourceIpValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHashPolicy_SourceIp.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HashPolicy_SourceIpValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HashPolicy_SourceIpValidationError{}
+
+// Validate checks the field values on HashPolicy_FilterState with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the first error encountered is returned, or nil if there are no violations.
+func (m *HashPolicy_FilterState) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HashPolicy_FilterState with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// HashPolicy_FilterStateMultiError, or nil if none found.
+func (m *HashPolicy_FilterState) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HashPolicy_FilterState) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if utf8.RuneCountInString(m.GetKey()) < 1 {
+ err := HashPolicy_FilterStateValidationError{
+ field: "Key",
+ reason: "value length must be at least 1 runes",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return HashPolicy_FilterStateMultiError(errors)
+ }
+
+ return nil
+}
+
+// HashPolicy_FilterStateMultiError is an error wrapping multiple validation
+// errors returned by HashPolicy_FilterState.ValidateAll() if the designated
+// constraints aren't met.
+type HashPolicy_FilterStateMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HashPolicy_FilterStateMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HashPolicy_FilterStateMultiError) AllErrors() []error { return m }
+
+// HashPolicy_FilterStateValidationError is the validation error returned by
+// HashPolicy_FilterState.Validate if the designated constraints aren't met.
+type HashPolicy_FilterStateValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HashPolicy_FilterStateValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HashPolicy_FilterStateValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HashPolicy_FilterStateValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HashPolicy_FilterStateValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HashPolicy_FilterStateValidationError) ErrorName() string {
+ return "HashPolicy_FilterStateValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e HashPolicy_FilterStateValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHashPolicy_FilterState.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HashPolicy_FilterStateValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HashPolicy_FilterStateValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy_vtproto.pb.go
new file mode 100644
index 000000000..bcc199596
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/hash_policy_vtproto.pb.go
@@ -0,0 +1,251 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/v3/hash_policy.proto
+
+package typev3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *HashPolicy_SourceIp) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HashPolicy_SourceIp) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HashPolicy_SourceIp) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HashPolicy_FilterState) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HashPolicy_FilterState) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HashPolicy_FilterState) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if len(m.Key) > 0 {
+ i -= len(m.Key)
+ copy(dAtA[i:], m.Key)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Key)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HashPolicy) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HashPolicy) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HashPolicy) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.PolicySpecifier.(*HashPolicy_FilterState_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.PolicySpecifier.(*HashPolicy_SourceIp_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HashPolicy_SourceIp_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HashPolicy_SourceIp_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.SourceIp != nil {
+ size, err := m.SourceIp.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0xa
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+func (m *HashPolicy_FilterState_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HashPolicy_FilterState_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.FilterState != nil {
+ size, err := m.FilterState.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *HashPolicy_SourceIp) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HashPolicy_FilterState) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.Key)
+ if l > 0 {
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HashPolicy) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.PolicySpecifier.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *HashPolicy_SourceIp_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.SourceIp != nil {
+ l = m.SourceIp.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *HashPolicy_FilterState_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.FilterState != nil {
+ l = m.FilterState.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.go
new file mode 100644
index 000000000..74f4e24df
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.go
@@ -0,0 +1,144 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/v3/http.proto
+
+package typev3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type CodecClientType int32
+
+const (
+ CodecClientType_HTTP1 CodecClientType = 0
+ CodecClientType_HTTP2 CodecClientType = 1
+ // [#not-implemented-hide:] QUIC implementation is not production ready yet. Use this enum with
+ // caution to prevent accidental execution of QUIC code. I.e. `!= HTTP2` is no longer sufficient
+ // to distinguish HTTP1 and HTTP2 traffic.
+ CodecClientType_HTTP3 CodecClientType = 2
+)
+
+// Enum value maps for CodecClientType.
+var (
+ CodecClientType_name = map[int32]string{
+ 0: "HTTP1",
+ 1: "HTTP2",
+ 2: "HTTP3",
+ }
+ CodecClientType_value = map[string]int32{
+ "HTTP1": 0,
+ "HTTP2": 1,
+ "HTTP3": 2,
+ }
+)
+
+func (x CodecClientType) Enum() *CodecClientType {
+ p := new(CodecClientType)
+ *p = x
+ return p
+}
+
+func (x CodecClientType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (CodecClientType) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_type_v3_http_proto_enumTypes[0].Descriptor()
+}
+
+func (CodecClientType) Type() protoreflect.EnumType {
+ return &file_envoy_type_v3_http_proto_enumTypes[0]
+}
+
+func (x CodecClientType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use CodecClientType.Descriptor instead.
+func (CodecClientType) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_type_v3_http_proto_rawDescGZIP(), []int{0}
+}
+
+var File_envoy_type_v3_http_proto protoreflect.FileDescriptor
+
+var file_envoy_type_v3_http_proto_rawDesc = []byte{
+ 0x0a, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0x32, 0x0a, 0x0f, 0x43, 0x6f, 0x64, 0x65,
+ 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x09, 0x0a, 0x05, 0x48,
+ 0x54, 0x54, 0x50, 0x31, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10,
+ 0x01, 0x12, 0x09, 0x0a, 0x05, 0x48, 0x54, 0x54, 0x50, 0x33, 0x10, 0x02, 0x42, 0x6f, 0xba, 0x80,
+ 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x76, 0x33, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
+ 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72,
+ 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74,
+ 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_v3_http_proto_rawDescOnce sync.Once
+ file_envoy_type_v3_http_proto_rawDescData = file_envoy_type_v3_http_proto_rawDesc
+)
+
+func file_envoy_type_v3_http_proto_rawDescGZIP() []byte {
+ file_envoy_type_v3_http_proto_rawDescOnce.Do(func() {
+ file_envoy_type_v3_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_http_proto_rawDescData)
+ })
+ return file_envoy_type_v3_http_proto_rawDescData
+}
+
+var file_envoy_type_v3_http_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_envoy_type_v3_http_proto_goTypes = []interface{}{
+ (CodecClientType)(0), // 0: envoy.type.v3.CodecClientType
+}
+var file_envoy_type_v3_http_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_v3_http_proto_init() }
+func file_envoy_type_v3_http_proto_init() {
+ if File_envoy_type_v3_http_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_v3_http_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 0,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_v3_http_proto_goTypes,
+ DependencyIndexes: file_envoy_type_v3_http_proto_depIdxs,
+ EnumInfos: file_envoy_type_v3_http_proto_enumTypes,
+ }.Build()
+ File_envoy_type_v3_http_proto = out.File
+ file_envoy_type_v3_http_proto_rawDesc = nil
+ file_envoy_type_v3_http_proto_goTypes = nil
+ file_envoy_type_v3_http_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.validate.go
new file mode 100644
index 000000000..e2c41e26f
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http.pb.validate.go
@@ -0,0 +1,37 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/v3/http.proto
+
+package typev3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.go
new file mode 100644
index 000000000..f7e952b3a
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.go
@@ -0,0 +1,458 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/v3/http_status.proto
+
+package typev3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// HTTP response codes supported in Envoy.
+// For more details: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
+type StatusCode int32
+
+const (
+ // Empty - This code not part of the HTTP status code specification, but it is needed for proto
+ // `enum` type.
+ StatusCode_Empty StatusCode = 0
+ StatusCode_Continue StatusCode = 100
+ StatusCode_OK StatusCode = 200
+ StatusCode_Created StatusCode = 201
+ StatusCode_Accepted StatusCode = 202
+ StatusCode_NonAuthoritativeInformation StatusCode = 203
+ StatusCode_NoContent StatusCode = 204
+ StatusCode_ResetContent StatusCode = 205
+ StatusCode_PartialContent StatusCode = 206
+ StatusCode_MultiStatus StatusCode = 207
+ StatusCode_AlreadyReported StatusCode = 208
+ StatusCode_IMUsed StatusCode = 226
+ StatusCode_MultipleChoices StatusCode = 300
+ StatusCode_MovedPermanently StatusCode = 301
+ StatusCode_Found StatusCode = 302
+ StatusCode_SeeOther StatusCode = 303
+ StatusCode_NotModified StatusCode = 304
+ StatusCode_UseProxy StatusCode = 305
+ StatusCode_TemporaryRedirect StatusCode = 307
+ StatusCode_PermanentRedirect StatusCode = 308
+ StatusCode_BadRequest StatusCode = 400
+ StatusCode_Unauthorized StatusCode = 401
+ StatusCode_PaymentRequired StatusCode = 402
+ StatusCode_Forbidden StatusCode = 403
+ StatusCode_NotFound StatusCode = 404
+ StatusCode_MethodNotAllowed StatusCode = 405
+ StatusCode_NotAcceptable StatusCode = 406
+ StatusCode_ProxyAuthenticationRequired StatusCode = 407
+ StatusCode_RequestTimeout StatusCode = 408
+ StatusCode_Conflict StatusCode = 409
+ StatusCode_Gone StatusCode = 410
+ StatusCode_LengthRequired StatusCode = 411
+ StatusCode_PreconditionFailed StatusCode = 412
+ StatusCode_PayloadTooLarge StatusCode = 413
+ StatusCode_URITooLong StatusCode = 414
+ StatusCode_UnsupportedMediaType StatusCode = 415
+ StatusCode_RangeNotSatisfiable StatusCode = 416
+ StatusCode_ExpectationFailed StatusCode = 417
+ StatusCode_MisdirectedRequest StatusCode = 421
+ StatusCode_UnprocessableEntity StatusCode = 422
+ StatusCode_Locked StatusCode = 423
+ StatusCode_FailedDependency StatusCode = 424
+ StatusCode_UpgradeRequired StatusCode = 426
+ StatusCode_PreconditionRequired StatusCode = 428
+ StatusCode_TooManyRequests StatusCode = 429
+ StatusCode_RequestHeaderFieldsTooLarge StatusCode = 431
+ StatusCode_InternalServerError StatusCode = 500
+ StatusCode_NotImplemented StatusCode = 501
+ StatusCode_BadGateway StatusCode = 502
+ StatusCode_ServiceUnavailable StatusCode = 503
+ StatusCode_GatewayTimeout StatusCode = 504
+ StatusCode_HTTPVersionNotSupported StatusCode = 505
+ StatusCode_VariantAlsoNegotiates StatusCode = 506
+ StatusCode_InsufficientStorage StatusCode = 507
+ StatusCode_LoopDetected StatusCode = 508
+ StatusCode_NotExtended StatusCode = 510
+ StatusCode_NetworkAuthenticationRequired StatusCode = 511
+)
+
+// Enum value maps for StatusCode.
+var (
+ StatusCode_name = map[int32]string{
+ 0: "Empty",
+ 100: "Continue",
+ 200: "OK",
+ 201: "Created",
+ 202: "Accepted",
+ 203: "NonAuthoritativeInformation",
+ 204: "NoContent",
+ 205: "ResetContent",
+ 206: "PartialContent",
+ 207: "MultiStatus",
+ 208: "AlreadyReported",
+ 226: "IMUsed",
+ 300: "MultipleChoices",
+ 301: "MovedPermanently",
+ 302: "Found",
+ 303: "SeeOther",
+ 304: "NotModified",
+ 305: "UseProxy",
+ 307: "TemporaryRedirect",
+ 308: "PermanentRedirect",
+ 400: "BadRequest",
+ 401: "Unauthorized",
+ 402: "PaymentRequired",
+ 403: "Forbidden",
+ 404: "NotFound",
+ 405: "MethodNotAllowed",
+ 406: "NotAcceptable",
+ 407: "ProxyAuthenticationRequired",
+ 408: "RequestTimeout",
+ 409: "Conflict",
+ 410: "Gone",
+ 411: "LengthRequired",
+ 412: "PreconditionFailed",
+ 413: "PayloadTooLarge",
+ 414: "URITooLong",
+ 415: "UnsupportedMediaType",
+ 416: "RangeNotSatisfiable",
+ 417: "ExpectationFailed",
+ 421: "MisdirectedRequest",
+ 422: "UnprocessableEntity",
+ 423: "Locked",
+ 424: "FailedDependency",
+ 426: "UpgradeRequired",
+ 428: "PreconditionRequired",
+ 429: "TooManyRequests",
+ 431: "RequestHeaderFieldsTooLarge",
+ 500: "InternalServerError",
+ 501: "NotImplemented",
+ 502: "BadGateway",
+ 503: "ServiceUnavailable",
+ 504: "GatewayTimeout",
+ 505: "HTTPVersionNotSupported",
+ 506: "VariantAlsoNegotiates",
+ 507: "InsufficientStorage",
+ 508: "LoopDetected",
+ 510: "NotExtended",
+ 511: "NetworkAuthenticationRequired",
+ }
+ StatusCode_value = map[string]int32{
+ "Empty": 0,
+ "Continue": 100,
+ "OK": 200,
+ "Created": 201,
+ "Accepted": 202,
+ "NonAuthoritativeInformation": 203,
+ "NoContent": 204,
+ "ResetContent": 205,
+ "PartialContent": 206,
+ "MultiStatus": 207,
+ "AlreadyReported": 208,
+ "IMUsed": 226,
+ "MultipleChoices": 300,
+ "MovedPermanently": 301,
+ "Found": 302,
+ "SeeOther": 303,
+ "NotModified": 304,
+ "UseProxy": 305,
+ "TemporaryRedirect": 307,
+ "PermanentRedirect": 308,
+ "BadRequest": 400,
+ "Unauthorized": 401,
+ "PaymentRequired": 402,
+ "Forbidden": 403,
+ "NotFound": 404,
+ "MethodNotAllowed": 405,
+ "NotAcceptable": 406,
+ "ProxyAuthenticationRequired": 407,
+ "RequestTimeout": 408,
+ "Conflict": 409,
+ "Gone": 410,
+ "LengthRequired": 411,
+ "PreconditionFailed": 412,
+ "PayloadTooLarge": 413,
+ "URITooLong": 414,
+ "UnsupportedMediaType": 415,
+ "RangeNotSatisfiable": 416,
+ "ExpectationFailed": 417,
+ "MisdirectedRequest": 421,
+ "UnprocessableEntity": 422,
+ "Locked": 423,
+ "FailedDependency": 424,
+ "UpgradeRequired": 426,
+ "PreconditionRequired": 428,
+ "TooManyRequests": 429,
+ "RequestHeaderFieldsTooLarge": 431,
+ "InternalServerError": 500,
+ "NotImplemented": 501,
+ "BadGateway": 502,
+ "ServiceUnavailable": 503,
+ "GatewayTimeout": 504,
+ "HTTPVersionNotSupported": 505,
+ "VariantAlsoNegotiates": 506,
+ "InsufficientStorage": 507,
+ "LoopDetected": 508,
+ "NotExtended": 510,
+ "NetworkAuthenticationRequired": 511,
+ }
+)
+
+func (x StatusCode) Enum() *StatusCode {
+ p := new(StatusCode)
+ *p = x
+ return p
+}
+
+func (x StatusCode) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (StatusCode) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_type_v3_http_status_proto_enumTypes[0].Descriptor()
+}
+
+func (StatusCode) Type() protoreflect.EnumType {
+ return &file_envoy_type_v3_http_status_proto_enumTypes[0]
+}
+
+func (x StatusCode) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use StatusCode.Descriptor instead.
+func (StatusCode) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_type_v3_http_status_proto_rawDescGZIP(), []int{0}
+}
+
+// HTTP status.
+type HttpStatus struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Supplies HTTP response code.
+ Code StatusCode `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.type.v3.StatusCode" json:"code,omitempty"`
+}
+
+func (x *HttpStatus) Reset() {
+ *x = HttpStatus{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_http_status_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *HttpStatus) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*HttpStatus) ProtoMessage() {}
+
+func (x *HttpStatus) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_http_status_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use HttpStatus.ProtoReflect.Descriptor instead.
+func (*HttpStatus) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_http_status_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *HttpStatus) GetCode() StatusCode {
+ if x != nil {
+ return x.Code
+ }
+ return StatusCode_Empty
+}
+
+var File_envoy_type_v3_http_status_proto protoreflect.FileDescriptor
+
+var file_envoy_type_v3_http_status_proto_rawDesc = []byte{
+ 0x0a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33,
+ 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x65, 0x0a, 0x0a, 0x48,
+ 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x39, 0x0a, 0x04, 0x63, 0x6f, 0x64,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f,
+ 0x64, 0x65, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0x82, 0x01, 0x04, 0x10, 0x01, 0x20, 0x00, 0x52, 0x04,
+ 0x63, 0x6f, 0x64, 0x65, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x2a, 0xb5, 0x09, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64,
+ 0x65, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08,
+ 0x43, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x10, 0x64, 0x12, 0x07, 0x0a, 0x02, 0x4f, 0x4b,
+ 0x10, 0xc8, 0x01, 0x12, 0x0c, 0x0a, 0x07, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x10, 0xc9,
+ 0x01, 0x12, 0x0d, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x10, 0xca, 0x01,
+ 0x12, 0x20, 0x0a, 0x1b, 0x4e, 0x6f, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x61,
+ 0x74, 0x69, 0x76, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10,
+ 0xcb, 0x01, 0x12, 0x0e, 0x0a, 0x09, 0x4e, 0x6f, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10,
+ 0xcc, 0x01, 0x12, 0x11, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65,
+ 0x6e, 0x74, 0x10, 0xcd, 0x01, 0x12, 0x13, 0x0a, 0x0e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c,
+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x10, 0xce, 0x01, 0x12, 0x10, 0x0a, 0x0b, 0x4d, 0x75,
+ 0x6c, 0x74, 0x69, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10, 0xcf, 0x01, 0x12, 0x14, 0x0a, 0x0f,
+ 0x41, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10,
+ 0xd0, 0x01, 0x12, 0x0b, 0x0a, 0x06, 0x49, 0x4d, 0x55, 0x73, 0x65, 0x64, 0x10, 0xe2, 0x01, 0x12,
+ 0x14, 0x0a, 0x0f, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x43, 0x68, 0x6f, 0x69, 0x63,
+ 0x65, 0x73, 0x10, 0xac, 0x02, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x6f, 0x76, 0x65, 0x64, 0x50, 0x65,
+ 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x10, 0xad, 0x02, 0x12, 0x0a, 0x0a, 0x05,
+ 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xae, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x53, 0x65, 0x65, 0x4f,
+ 0x74, 0x68, 0x65, 0x72, 0x10, 0xaf, 0x02, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x4d, 0x6f,
+ 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x10, 0xb0, 0x02, 0x12, 0x0d, 0x0a, 0x08, 0x55, 0x73, 0x65,
+ 0x50, 0x72, 0x6f, 0x78, 0x79, 0x10, 0xb1, 0x02, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x65, 0x6d, 0x70,
+ 0x6f, 0x72, 0x61, 0x72, 0x79, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0xb3, 0x02,
+ 0x12, 0x16, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x64,
+ 0x69, 0x72, 0x65, 0x63, 0x74, 0x10, 0xb4, 0x02, 0x12, 0x0f, 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0x90, 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x55, 0x6e, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x10, 0x91, 0x03, 0x12, 0x14, 0x0a, 0x0f,
+ 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10,
+ 0x92, 0x03, 0x12, 0x0e, 0x0a, 0x09, 0x46, 0x6f, 0x72, 0x62, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x10,
+ 0x93, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0x94,
+ 0x03, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e, 0x6f, 0x74, 0x41, 0x6c,
+ 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x10, 0x95, 0x03, 0x12, 0x12, 0x0a, 0x0d, 0x4e, 0x6f, 0x74, 0x41,
+ 0x63, 0x63, 0x65, 0x70, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x10, 0x96, 0x03, 0x12, 0x20, 0x0a, 0x1b,
+ 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0x97, 0x03, 0x12, 0x13,
+ 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
+ 0x10, 0x98, 0x03, 0x12, 0x0d, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x10,
+ 0x99, 0x03, 0x12, 0x09, 0x0a, 0x04, 0x47, 0x6f, 0x6e, 0x65, 0x10, 0x9a, 0x03, 0x12, 0x13, 0x0a,
+ 0x0e, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10,
+ 0x9b, 0x03, 0x12, 0x17, 0x0a, 0x12, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69,
+ 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x9c, 0x03, 0x12, 0x14, 0x0a, 0x0f, 0x50,
+ 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x6f, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x10, 0x9d,
+ 0x03, 0x12, 0x0f, 0x0a, 0x0a, 0x55, 0x52, 0x49, 0x54, 0x6f, 0x6f, 0x4c, 0x6f, 0x6e, 0x67, 0x10,
+ 0x9e, 0x03, 0x12, 0x19, 0x0a, 0x14, 0x55, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65,
+ 0x64, 0x4d, 0x65, 0x64, 0x69, 0x61, 0x54, 0x79, 0x70, 0x65, 0x10, 0x9f, 0x03, 0x12, 0x18, 0x0a,
+ 0x13, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4e, 0x6f, 0x74, 0x53, 0x61, 0x74, 0x69, 0x73, 0x66, 0x69,
+ 0x61, 0x62, 0x6c, 0x65, 0x10, 0xa0, 0x03, 0x12, 0x16, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x65, 0x63,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0xa1, 0x03, 0x12,
+ 0x17, 0x0a, 0x12, 0x4d, 0x69, 0x73, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x10, 0xa5, 0x03, 0x12, 0x18, 0x0a, 0x13, 0x55, 0x6e, 0x70, 0x72,
+ 0x6f, 0x63, 0x65, 0x73, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x10,
+ 0xa6, 0x03, 0x12, 0x0b, 0x0a, 0x06, 0x4c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x10, 0xa7, 0x03, 0x12,
+ 0x15, 0x0a, 0x10, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65,
+ 0x6e, 0x63, 0x79, 0x10, 0xa8, 0x03, 0x12, 0x14, 0x0a, 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0xaa, 0x03, 0x12, 0x19, 0x0a, 0x14,
+ 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
+ 0x69, 0x72, 0x65, 0x64, 0x10, 0xac, 0x03, 0x12, 0x14, 0x0a, 0x0f, 0x54, 0x6f, 0x6f, 0x4d, 0x61,
+ 0x6e, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x10, 0xad, 0x03, 0x12, 0x20, 0x0a,
+ 0x1b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x46, 0x69,
+ 0x65, 0x6c, 0x64, 0x73, 0x54, 0x6f, 0x6f, 0x4c, 0x61, 0x72, 0x67, 0x65, 0x10, 0xaf, 0x03, 0x12,
+ 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x65,
+ 0x72, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf4, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x4e, 0x6f, 0x74,
+ 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x10, 0xf5, 0x03, 0x12, 0x0f,
+ 0x0a, 0x0a, 0x42, 0x61, 0x64, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x10, 0xf6, 0x03, 0x12,
+ 0x17, 0x0a, 0x12, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69,
+ 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xf7, 0x03, 0x12, 0x13, 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x65,
+ 0x77, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x10, 0xf8, 0x03, 0x12, 0x1c, 0x0a,
+ 0x17, 0x48, 0x54, 0x54, 0x50, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x53,
+ 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x10, 0xf9, 0x03, 0x12, 0x1a, 0x0a, 0x15, 0x56,
+ 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x41, 0x6c, 0x73, 0x6f, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69,
+ 0x61, 0x74, 0x65, 0x73, 0x10, 0xfa, 0x03, 0x12, 0x18, 0x0a, 0x13, 0x49, 0x6e, 0x73, 0x75, 0x66,
+ 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x10, 0xfb,
+ 0x03, 0x12, 0x11, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65,
+ 0x64, 0x10, 0xfc, 0x03, 0x12, 0x10, 0x0a, 0x0b, 0x4e, 0x6f, 0x74, 0x45, 0x78, 0x74, 0x65, 0x6e,
+ 0x64, 0x65, 0x64, 0x10, 0xfe, 0x03, 0x12, 0x22, 0x0a, 0x1d, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72,
+ 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x10, 0xff, 0x03, 0x42, 0x75, 0xba, 0x80, 0xc8, 0xd1,
+ 0x06, 0x02, 0x10, 0x02, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72,
+ 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76,
+ 0x33, 0x42, 0x0f, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63,
+ 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76,
+ 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_v3_http_status_proto_rawDescOnce sync.Once
+ file_envoy_type_v3_http_status_proto_rawDescData = file_envoy_type_v3_http_status_proto_rawDesc
+)
+
+func file_envoy_type_v3_http_status_proto_rawDescGZIP() []byte {
+ file_envoy_type_v3_http_status_proto_rawDescOnce.Do(func() {
+ file_envoy_type_v3_http_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_http_status_proto_rawDescData)
+ })
+ return file_envoy_type_v3_http_status_proto_rawDescData
+}
+
+var file_envoy_type_v3_http_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_envoy_type_v3_http_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_type_v3_http_status_proto_goTypes = []interface{}{
+ (StatusCode)(0), // 0: envoy.type.v3.StatusCode
+ (*HttpStatus)(nil), // 1: envoy.type.v3.HttpStatus
+}
+var file_envoy_type_v3_http_status_proto_depIdxs = []int32{
+ 0, // 0: envoy.type.v3.HttpStatus.code:type_name -> envoy.type.v3.StatusCode
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_v3_http_status_proto_init() }
+func file_envoy_type_v3_http_status_proto_init() {
+ if File_envoy_type_v3_http_status_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_v3_http_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*HttpStatus); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_v3_http_status_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_v3_http_status_proto_goTypes,
+ DependencyIndexes: file_envoy_type_v3_http_status_proto_depIdxs,
+ EnumInfos: file_envoy_type_v3_http_status_proto_enumTypes,
+ MessageInfos: file_envoy_type_v3_http_status_proto_msgTypes,
+ }.Build()
+ File_envoy_type_v3_http_status_proto = out.File
+ file_envoy_type_v3_http_status_proto_rawDesc = nil
+ file_envoy_type_v3_http_status_proto_goTypes = nil
+ file_envoy_type_v3_http_status_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.validate.go
new file mode 100644
index 000000000..d3f76e937
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status.pb.validate.go
@@ -0,0 +1,162 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/v3/http_status.proto
+
+package typev3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on HttpStatus with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *HttpStatus) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on HttpStatus with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in HttpStatusMultiError, or
+// nil if none found.
+func (m *HttpStatus) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *HttpStatus) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if _, ok := _HttpStatus_Code_NotInLookup[m.GetCode()]; ok {
+ err := HttpStatusValidationError{
+ field: "Code",
+ reason: "value must not be in list [Empty]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if _, ok := StatusCode_name[int32(m.GetCode())]; !ok {
+ err := HttpStatusValidationError{
+ field: "Code",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return HttpStatusMultiError(errors)
+ }
+
+ return nil
+}
+
+// HttpStatusMultiError is an error wrapping multiple validation errors
+// returned by HttpStatus.ValidateAll() if the designated constraints aren't met.
+type HttpStatusMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m HttpStatusMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m HttpStatusMultiError) AllErrors() []error { return m }
+
+// HttpStatusValidationError is the validation error returned by
+// HttpStatus.Validate if the designated constraints aren't met.
+type HttpStatusValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e HttpStatusValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e HttpStatusValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e HttpStatusValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e HttpStatusValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e HttpStatusValidationError) ErrorName() string { return "HttpStatusValidationError" }
+
+// Error satisfies the builtin error interface
+func (e HttpStatusValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sHttpStatus.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = HttpStatusValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = HttpStatusValidationError{}
+
+var _HttpStatus_Code_NotInLookup = map[StatusCode]struct{}{
+ 0: {},
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status_vtproto.pb.go
new file mode 100644
index 000000000..f25340d84
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/http_status_vtproto.pb.go
@@ -0,0 +1,70 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/v3/http_status.proto
+
+package typev3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *HttpStatus) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *HttpStatus) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *HttpStatus) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Code != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Code))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *HttpStatus) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Code != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Code))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.go
new file mode 100644
index 000000000..45eb66186
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.go
@@ -0,0 +1,316 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/v3/percent.proto
+
+package typev3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Fraction percentages support several fixed denominator values.
+type FractionalPercent_DenominatorType int32
+
+const (
+ // 100.
+ //
+ // **Example**: 1/100 = 1%.
+ FractionalPercent_HUNDRED FractionalPercent_DenominatorType = 0
+ // 10,000.
+ //
+ // **Example**: 1/10000 = 0.01%.
+ FractionalPercent_TEN_THOUSAND FractionalPercent_DenominatorType = 1
+ // 1,000,000.
+ //
+ // **Example**: 1/1000000 = 0.0001%.
+ FractionalPercent_MILLION FractionalPercent_DenominatorType = 2
+)
+
+// Enum value maps for FractionalPercent_DenominatorType.
+var (
+ FractionalPercent_DenominatorType_name = map[int32]string{
+ 0: "HUNDRED",
+ 1: "TEN_THOUSAND",
+ 2: "MILLION",
+ }
+ FractionalPercent_DenominatorType_value = map[string]int32{
+ "HUNDRED": 0,
+ "TEN_THOUSAND": 1,
+ "MILLION": 2,
+ }
+)
+
+func (x FractionalPercent_DenominatorType) Enum() *FractionalPercent_DenominatorType {
+ p := new(FractionalPercent_DenominatorType)
+ *p = x
+ return p
+}
+
+func (x FractionalPercent_DenominatorType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (FractionalPercent_DenominatorType) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_type_v3_percent_proto_enumTypes[0].Descriptor()
+}
+
+func (FractionalPercent_DenominatorType) Type() protoreflect.EnumType {
+ return &file_envoy_type_v3_percent_proto_enumTypes[0]
+}
+
+func (x FractionalPercent_DenominatorType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use FractionalPercent_DenominatorType.Descriptor instead.
+func (FractionalPercent_DenominatorType) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{1, 0}
+}
+
+// Identifies a percentage, in the range [0.0, 100.0].
+type Percent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Value float64 `protobuf:"fixed64,1,opt,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *Percent) Reset() {
+ *x = Percent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_percent_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Percent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Percent) ProtoMessage() {}
+
+func (x *Percent) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_percent_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Percent.ProtoReflect.Descriptor instead.
+func (*Percent) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Percent) GetValue() float64 {
+ if x != nil {
+ return x.Value
+ }
+ return 0
+}
+
+// A fractional percentage is used in cases in which for performance reasons performing floating
+// point to integer conversions during randomness calculations is undesirable. The message includes
+// both a numerator and denominator that together determine the final fractional value.
+//
+// * **Example**: 1/100 = 1%.
+// * **Example**: 3/10000 = 0.03%.
+type FractionalPercent struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Specifies the numerator. Defaults to 0.
+ Numerator uint32 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"`
+ // Specifies the denominator. If the denominator specified is less than the numerator, the final
+ // fractional percentage is capped at 1 (100%).
+ Denominator FractionalPercent_DenominatorType `protobuf:"varint,2,opt,name=denominator,proto3,enum=envoy.type.v3.FractionalPercent_DenominatorType" json:"denominator,omitempty"`
+}
+
+func (x *FractionalPercent) Reset() {
+ *x = FractionalPercent{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_percent_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FractionalPercent) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FractionalPercent) ProtoMessage() {}
+
+func (x *FractionalPercent) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_percent_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FractionalPercent.ProtoReflect.Descriptor instead.
+func (*FractionalPercent) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_percent_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *FractionalPercent) GetNumerator() uint32 {
+ if x != nil {
+ return x.Numerator
+ }
+ return 0
+}
+
+func (x *FractionalPercent) GetDenominator() FractionalPercent_DenominatorType {
+ if x != nil {
+ return x.Denominator
+ }
+ return FractionalPercent_HUNDRED
+}
+
+var File_envoy_type_v3_percent_proto protoreflect.FileDescriptor
+
+var file_envoy_type_v3_percent_proto_rawDesc = []byte{
+ 0x0a, 0x1b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64,
+ 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70,
+ 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17,
+ 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x53, 0x0a, 0x07, 0x50, 0x65, 0x72, 0x63, 0x65,
+ 0x6e, 0x74, 0x12, 0x2d, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x01, 0x42, 0x17, 0xfa, 0x42, 0x14, 0x12, 0x12, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59,
+ 0x40, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
+ 0x65, 0x3a, 0x19, 0x9a, 0xc5, 0x88, 0x1e, 0x14, 0x0a, 0x12, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0xf3, 0x01, 0x0a,
+ 0x11, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65,
+ 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72,
+ 0x12, 0x5c, 0x0a, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
+ 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x2e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61,
+ 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10,
+ 0x01, 0x52, 0x0b, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x22, 0x3d,
+ 0x0a, 0x0f, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x6f, 0x72, 0x54, 0x79, 0x70,
+ 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x55, 0x4e, 0x44, 0x52, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10,
+ 0x0a, 0x0c, 0x54, 0x45, 0x4e, 0x5f, 0x54, 0x48, 0x4f, 0x55, 0x53, 0x41, 0x4e, 0x44, 0x10, 0x01,
+ 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x3a, 0x23, 0x9a,
+ 0xc5, 0x88, 0x1e, 0x1e, 0x0a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x50, 0x65, 0x72, 0x63, 0x65,
+ 0x6e, 0x74, 0x42, 0x72, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x1b, 0x69, 0x6f,
+ 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x0c, 0x50, 0x65, 0x72, 0x63, 0x65,
+ 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79,
+ 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e,
+ 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b,
+ 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_v3_percent_proto_rawDescOnce sync.Once
+ file_envoy_type_v3_percent_proto_rawDescData = file_envoy_type_v3_percent_proto_rawDesc
+)
+
+func file_envoy_type_v3_percent_proto_rawDescGZIP() []byte {
+ file_envoy_type_v3_percent_proto_rawDescOnce.Do(func() {
+ file_envoy_type_v3_percent_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_percent_proto_rawDescData)
+ })
+ return file_envoy_type_v3_percent_proto_rawDescData
+}
+
+var file_envoy_type_v3_percent_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_envoy_type_v3_percent_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_envoy_type_v3_percent_proto_goTypes = []interface{}{
+ (FractionalPercent_DenominatorType)(0), // 0: envoy.type.v3.FractionalPercent.DenominatorType
+ (*Percent)(nil), // 1: envoy.type.v3.Percent
+ (*FractionalPercent)(nil), // 2: envoy.type.v3.FractionalPercent
+}
+var file_envoy_type_v3_percent_proto_depIdxs = []int32{
+ 0, // 0: envoy.type.v3.FractionalPercent.denominator:type_name -> envoy.type.v3.FractionalPercent.DenominatorType
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_v3_percent_proto_init() }
+func file_envoy_type_v3_percent_proto_init() {
+ if File_envoy_type_v3_percent_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_v3_percent_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Percent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_v3_percent_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FractionalPercent); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_v3_percent_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_v3_percent_proto_goTypes,
+ DependencyIndexes: file_envoy_type_v3_percent_proto_depIdxs,
+ EnumInfos: file_envoy_type_v3_percent_proto_enumTypes,
+ MessageInfos: file_envoy_type_v3_percent_proto_msgTypes,
+ }.Build()
+ File_envoy_type_v3_percent_proto = out.File
+ file_envoy_type_v3_percent_proto_rawDesc = nil
+ file_envoy_type_v3_percent_proto_goTypes = nil
+ file_envoy_type_v3_percent_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.validate.go
new file mode 100644
index 000000000..2929f39f8
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent.pb.validate.go
@@ -0,0 +1,261 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/v3/percent.proto
+
+package typev3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Percent with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Percent) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Percent with the rules defined in the
+// proto definition for this message. If any rules are violated, the result is
+// a list of violation errors wrapped in PercentMultiError, or nil if none found.
+func (m *Percent) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Percent) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if val := m.GetValue(); val < 0 || val > 100 {
+ err := PercentValidationError{
+ field: "Value",
+ reason: "value must be inside range [0, 100]",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return PercentMultiError(errors)
+ }
+
+ return nil
+}
+
+// PercentMultiError is an error wrapping multiple validation errors returned
+// by Percent.ValidateAll() if the designated constraints aren't met.
+type PercentMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m PercentMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m PercentMultiError) AllErrors() []error { return m }
+
+// PercentValidationError is the validation error returned by Percent.Validate
+// if the designated constraints aren't met.
+type PercentValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e PercentValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e PercentValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e PercentValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e PercentValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e PercentValidationError) ErrorName() string { return "PercentValidationError" }
+
+// Error satisfies the builtin error interface
+func (e PercentValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sPercent.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = PercentValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = PercentValidationError{}
+
+// Validate checks the field values on FractionalPercent with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *FractionalPercent) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on FractionalPercent with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// FractionalPercentMultiError, or nil if none found.
+func (m *FractionalPercent) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *FractionalPercent) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Numerator
+
+ if _, ok := FractionalPercent_DenominatorType_name[int32(m.GetDenominator())]; !ok {
+ err := FractionalPercentValidationError{
+ field: "Denominator",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return FractionalPercentMultiError(errors)
+ }
+
+ return nil
+}
+
+// FractionalPercentMultiError is an error wrapping multiple validation errors
+// returned by FractionalPercent.ValidateAll() if the designated constraints
+// aren't met.
+type FractionalPercentMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m FractionalPercentMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m FractionalPercentMultiError) AllErrors() []error { return m }
+
+// FractionalPercentValidationError is the validation error returned by
+// FractionalPercent.Validate if the designated constraints aren't met.
+type FractionalPercentValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e FractionalPercentValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e FractionalPercentValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e FractionalPercentValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e FractionalPercentValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e FractionalPercentValidationError) ErrorName() string {
+ return "FractionalPercentValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e FractionalPercentValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sFractionalPercent.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = FractionalPercentValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = FractionalPercentValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent_vtproto.pb.go
new file mode 100644
index 000000000..82c60c5d9
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/percent_vtproto.pb.go
@@ -0,0 +1,132 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/v3/percent.proto
+
+package typev3
+
+import (
+ binary "encoding/binary"
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ math "math"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *Percent) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Percent) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Percent) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Value != 0 {
+ i -= 8
+ binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value))))
+ i--
+ dAtA[i] = 0x9
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *FractionalPercent) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *FractionalPercent) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *FractionalPercent) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Denominator != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Denominator))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.Numerator != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Numerator))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Percent) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Value != 0 {
+ n += 9
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *FractionalPercent) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Numerator != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Numerator))
+ }
+ if m.Denominator != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Denominator))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.go
new file mode 100644
index 000000000..63be48f3c
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.go
@@ -0,0 +1,324 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/v3/range.proto
+
+package typev3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Specifies the int64 start and end of the range using half-open interval semantics [start,
+// end).
+type Int64Range struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // start of the range (inclusive)
+ Start int64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
+ // end of the range (exclusive)
+ End int64 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
+}
+
+func (x *Int64Range) Reset() {
+ *x = Int64Range{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_range_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int64Range) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int64Range) ProtoMessage() {}
+
+func (x *Int64Range) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_range_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int64Range.ProtoReflect.Descriptor instead.
+func (*Int64Range) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_range_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Int64Range) GetStart() int64 {
+ if x != nil {
+ return x.Start
+ }
+ return 0
+}
+
+func (x *Int64Range) GetEnd() int64 {
+ if x != nil {
+ return x.End
+ }
+ return 0
+}
+
+// Specifies the int32 start and end of the range using half-open interval semantics [start,
+// end).
+type Int32Range struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // start of the range (inclusive)
+ Start int32 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"`
+ // end of the range (exclusive)
+ End int32 `protobuf:"varint,2,opt,name=end,proto3" json:"end,omitempty"`
+}
+
+func (x *Int32Range) Reset() {
+ *x = Int32Range{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_range_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int32Range) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int32Range) ProtoMessage() {}
+
+func (x *Int32Range) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_range_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int32Range.ProtoReflect.Descriptor instead.
+func (*Int32Range) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_range_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Int32Range) GetStart() int32 {
+ if x != nil {
+ return x.Start
+ }
+ return 0
+}
+
+func (x *Int32Range) GetEnd() int32 {
+ if x != nil {
+ return x.End
+ }
+ return 0
+}
+
+// Specifies the double start and end of the range using half-open interval semantics [start,
+// end).
+type DoubleRange struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // start of the range (inclusive)
+ Start float64 `protobuf:"fixed64,1,opt,name=start,proto3" json:"start,omitempty"`
+ // end of the range (exclusive)
+ End float64 `protobuf:"fixed64,2,opt,name=end,proto3" json:"end,omitempty"`
+}
+
+func (x *DoubleRange) Reset() {
+ *x = DoubleRange{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_range_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DoubleRange) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DoubleRange) ProtoMessage() {}
+
+func (x *DoubleRange) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_range_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DoubleRange.ProtoReflect.Descriptor instead.
+func (*DoubleRange) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_range_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DoubleRange) GetStart() float64 {
+ if x != nil {
+ return x.Start
+ }
+ return 0
+}
+
+func (x *DoubleRange) GetEnd() float64 {
+ if x != nil {
+ return x.End
+ }
+ return 0
+}
+
+var File_envoy_type_v3_range_proto protoreflect.FileDescriptor
+
+var file_envoy_type_v3_range_proto_rawDesc = []byte{
+ 0x0a, 0x19, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61,
+ 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f,
+ 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x0a,
+ 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74,
+ 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74,
+ 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65,
+ 0x6e, 0x64, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65, 0x6e, 0x76, 0x6f, 0x79,
+ 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x61, 0x6e, 0x67, 0x65,
+ 0x22, 0x52, 0x0a, 0x0a, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x14,
+ 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73,
+ 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x3a, 0x1c, 0x9a, 0xc5, 0x88, 0x1e, 0x17, 0x0a, 0x15, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52,
+ 0x61, 0x6e, 0x67, 0x65, 0x22, 0x54, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61,
+ 0x6e, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x01, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x3a, 0x1d, 0x9a, 0xc5, 0x88,
+ 0x1e, 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x44,
+ 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x70, 0xba, 0x80, 0xc8, 0xd1,
+ 0x06, 0x02, 0x10, 0x02, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72,
+ 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76,
+ 0x33, 0x42, 0x0a, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
+ 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
+ 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79,
+ 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_v3_range_proto_rawDescOnce sync.Once
+ file_envoy_type_v3_range_proto_rawDescData = file_envoy_type_v3_range_proto_rawDesc
+)
+
+func file_envoy_type_v3_range_proto_rawDescGZIP() []byte {
+ file_envoy_type_v3_range_proto_rawDescOnce.Do(func() {
+ file_envoy_type_v3_range_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_range_proto_rawDescData)
+ })
+ return file_envoy_type_v3_range_proto_rawDescData
+}
+
+var file_envoy_type_v3_range_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_envoy_type_v3_range_proto_goTypes = []interface{}{
+ (*Int64Range)(nil), // 0: envoy.type.v3.Int64Range
+ (*Int32Range)(nil), // 1: envoy.type.v3.Int32Range
+ (*DoubleRange)(nil), // 2: envoy.type.v3.DoubleRange
+}
+var file_envoy_type_v3_range_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_v3_range_proto_init() }
+func file_envoy_type_v3_range_proto_init() {
+ if File_envoy_type_v3_range_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_v3_range_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int64Range); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_v3_range_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int32Range); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_v3_range_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DoubleRange); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_v3_range_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_v3_range_proto_goTypes,
+ DependencyIndexes: file_envoy_type_v3_range_proto_depIdxs,
+ MessageInfos: file_envoy_type_v3_range_proto_msgTypes,
+ }.Build()
+ File_envoy_type_v3_range_proto = out.File
+ file_envoy_type_v3_range_proto_rawDesc = nil
+ file_envoy_type_v3_range_proto_goTypes = nil
+ file_envoy_type_v3_range_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.validate.go
new file mode 100644
index 000000000..6bf697e9b
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range.pb.validate.go
@@ -0,0 +1,346 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/v3/range.proto
+
+package typev3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on Int64Range with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Int64Range) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Int64Range with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in Int64RangeMultiError, or
+// nil if none found.
+func (m *Int64Range) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Int64Range) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Start
+
+ // no validation rules for End
+
+ if len(errors) > 0 {
+ return Int64RangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// Int64RangeMultiError is an error wrapping multiple validation errors
+// returned by Int64Range.ValidateAll() if the designated constraints aren't met.
+type Int64RangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Int64RangeMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Int64RangeMultiError) AllErrors() []error { return m }
+
+// Int64RangeValidationError is the validation error returned by
+// Int64Range.Validate if the designated constraints aren't met.
+type Int64RangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Int64RangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Int64RangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Int64RangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Int64RangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Int64RangeValidationError) ErrorName() string { return "Int64RangeValidationError" }
+
+// Error satisfies the builtin error interface
+func (e Int64RangeValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInt64Range.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Int64RangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Int64RangeValidationError{}
+
+// Validate checks the field values on Int32Range with the rules defined in the
+// proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *Int32Range) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on Int32Range with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in Int32RangeMultiError, or
+// nil if none found.
+func (m *Int32Range) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *Int32Range) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Start
+
+ // no validation rules for End
+
+ if len(errors) > 0 {
+ return Int32RangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// Int32RangeMultiError is an error wrapping multiple validation errors
+// returned by Int32Range.ValidateAll() if the designated constraints aren't met.
+type Int32RangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m Int32RangeMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m Int32RangeMultiError) AllErrors() []error { return m }
+
+// Int32RangeValidationError is the validation error returned by
+// Int32Range.Validate if the designated constraints aren't met.
+type Int32RangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e Int32RangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e Int32RangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e Int32RangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e Int32RangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e Int32RangeValidationError) ErrorName() string { return "Int32RangeValidationError" }
+
+// Error satisfies the builtin error interface
+func (e Int32RangeValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sInt32Range.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = Int32RangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = Int32RangeValidationError{}
+
+// Validate checks the field values on DoubleRange with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *DoubleRange) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on DoubleRange with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in DoubleRangeMultiError, or
+// nil if none found.
+func (m *DoubleRange) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *DoubleRange) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for Start
+
+ // no validation rules for End
+
+ if len(errors) > 0 {
+ return DoubleRangeMultiError(errors)
+ }
+
+ return nil
+}
+
+// DoubleRangeMultiError is an error wrapping multiple validation errors
+// returned by DoubleRange.ValidateAll() if the designated constraints aren't met.
+type DoubleRangeMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m DoubleRangeMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m DoubleRangeMultiError) AllErrors() []error { return m }
+
+// DoubleRangeValidationError is the validation error returned by
+// DoubleRange.Validate if the designated constraints aren't met.
+type DoubleRangeValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e DoubleRangeValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e DoubleRangeValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e DoubleRangeValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e DoubleRangeValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e DoubleRangeValidationError) ErrorName() string { return "DoubleRangeValidationError" }
+
+// Error satisfies the builtin error interface
+func (e DoubleRangeValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sDoubleRange.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = DoubleRangeValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = DoubleRangeValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range_vtproto.pb.go
new file mode 100644
index 000000000..7309b8c14
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/range_vtproto.pb.go
@@ -0,0 +1,200 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/v3/range.proto
+
+package typev3
+
+import (
+ binary "encoding/binary"
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ math "math"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *Int64Range) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Int64Range) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Int64Range) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.End != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.End))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.Start != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Start))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Int32Range) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *Int32Range) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *Int32Range) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.End != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.End))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.Start != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Start))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *DoubleRange) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *DoubleRange) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *DoubleRange) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.End != 0 {
+ i -= 8
+ binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.End))))
+ i--
+ dAtA[i] = 0x11
+ }
+ if m.Start != 0 {
+ i -= 8
+ binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Start))))
+ i--
+ dAtA[i] = 0x9
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *Int64Range) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Start != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Start))
+ }
+ if m.End != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.End))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *Int32Range) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Start != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Start))
+ }
+ if m.End != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.End))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *DoubleRange) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.Start != 0 {
+ n += 9
+ }
+ if m.End != 0 {
+ n += 9
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.go
new file mode 100644
index 000000000..e7663f294
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.go
@@ -0,0 +1,407 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/v3/ratelimit_strategy.proto
+
+package typev3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/cncf/xds/go/xds/annotations/v3"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Choose between allow all and deny all.
+type RateLimitStrategy_BlanketRule int32
+
+const (
+ RateLimitStrategy_ALLOW_ALL RateLimitStrategy_BlanketRule = 0
+ RateLimitStrategy_DENY_ALL RateLimitStrategy_BlanketRule = 1
+)
+
+// Enum value maps for RateLimitStrategy_BlanketRule.
+var (
+ RateLimitStrategy_BlanketRule_name = map[int32]string{
+ 0: "ALLOW_ALL",
+ 1: "DENY_ALL",
+ }
+ RateLimitStrategy_BlanketRule_value = map[string]int32{
+ "ALLOW_ALL": 0,
+ "DENY_ALL": 1,
+ }
+)
+
+func (x RateLimitStrategy_BlanketRule) Enum() *RateLimitStrategy_BlanketRule {
+ p := new(RateLimitStrategy_BlanketRule)
+ *p = x
+ return p
+}
+
+func (x RateLimitStrategy_BlanketRule) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (RateLimitStrategy_BlanketRule) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_type_v3_ratelimit_strategy_proto_enumTypes[0].Descriptor()
+}
+
+func (RateLimitStrategy_BlanketRule) Type() protoreflect.EnumType {
+ return &file_envoy_type_v3_ratelimit_strategy_proto_enumTypes[0]
+}
+
+func (x RateLimitStrategy_BlanketRule) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use RateLimitStrategy_BlanketRule.Descriptor instead.
+func (RateLimitStrategy_BlanketRule) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_type_v3_ratelimit_strategy_proto_rawDescGZIP(), []int{0, 0}
+}
+
+type RateLimitStrategy struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Strategy:
+ //
+ // *RateLimitStrategy_BlanketRule_
+ // *RateLimitStrategy_RequestsPerTimeUnit_
+ // *RateLimitStrategy_TokenBucket
+ Strategy isRateLimitStrategy_Strategy `protobuf_oneof:"strategy"`
+}
+
+func (x *RateLimitStrategy) Reset() {
+ *x = RateLimitStrategy{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RateLimitStrategy) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RateLimitStrategy) ProtoMessage() {}
+
+func (x *RateLimitStrategy) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RateLimitStrategy.ProtoReflect.Descriptor instead.
+func (*RateLimitStrategy) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_ratelimit_strategy_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *RateLimitStrategy) GetStrategy() isRateLimitStrategy_Strategy {
+ if m != nil {
+ return m.Strategy
+ }
+ return nil
+}
+
+func (x *RateLimitStrategy) GetBlanketRule() RateLimitStrategy_BlanketRule {
+ if x, ok := x.GetStrategy().(*RateLimitStrategy_BlanketRule_); ok {
+ return x.BlanketRule
+ }
+ return RateLimitStrategy_ALLOW_ALL
+}
+
+func (x *RateLimitStrategy) GetRequestsPerTimeUnit() *RateLimitStrategy_RequestsPerTimeUnit {
+ if x, ok := x.GetStrategy().(*RateLimitStrategy_RequestsPerTimeUnit_); ok {
+ return x.RequestsPerTimeUnit
+ }
+ return nil
+}
+
+func (x *RateLimitStrategy) GetTokenBucket() *TokenBucket {
+ if x, ok := x.GetStrategy().(*RateLimitStrategy_TokenBucket); ok {
+ return x.TokenBucket
+ }
+ return nil
+}
+
+type isRateLimitStrategy_Strategy interface {
+ isRateLimitStrategy_Strategy()
+}
+
+type RateLimitStrategy_BlanketRule_ struct {
+ // Allow or Deny the requests.
+ // If unset, allow all.
+ BlanketRule RateLimitStrategy_BlanketRule `protobuf:"varint,1,opt,name=blanket_rule,json=blanketRule,proto3,enum=envoy.type.v3.RateLimitStrategy_BlanketRule,oneof"`
+}
+
+type RateLimitStrategy_RequestsPerTimeUnit_ struct {
+ // Best-effort limit of the number of requests per time unit, f.e. requests per second.
+ // Does not prescribe any specific rate limiting algorithm, see :ref:`RequestsPerTimeUnit
+ // ` for details.
+ RequestsPerTimeUnit *RateLimitStrategy_RequestsPerTimeUnit `protobuf:"bytes,2,opt,name=requests_per_time_unit,json=requestsPerTimeUnit,proto3,oneof"`
+}
+
+type RateLimitStrategy_TokenBucket struct {
+ // Limit the requests by consuming tokens from the Token Bucket.
+ // Allow the same number of requests as the number of tokens available in
+ // the token bucket.
+ TokenBucket *TokenBucket `protobuf:"bytes,3,opt,name=token_bucket,json=tokenBucket,proto3,oneof"`
+}
+
+func (*RateLimitStrategy_BlanketRule_) isRateLimitStrategy_Strategy() {}
+
+func (*RateLimitStrategy_RequestsPerTimeUnit_) isRateLimitStrategy_Strategy() {}
+
+func (*RateLimitStrategy_TokenBucket) isRateLimitStrategy_Strategy() {}
+
+// Best-effort limit of the number of requests per time unit.
+//
+// Allows to specify the desired requests per second (RPS, QPS), requests per minute (QPM, RPM),
+// etc., without specifying a rate limiting algorithm implementation.
+//
+// “RequestsPerTimeUnit“ strategy does not demand any specific rate limiting algorithm to be
+// used (in contrast to the :ref:`TokenBucket `,
+// for example). It implies that the implementation details of rate limiting algorithm are
+// irrelevant as long as the configured number of "requests per time unit" is achieved.
+//
+// Note that the “TokenBucket“ is still a valid implementation of the “RequestsPerTimeUnit“
+// strategy, and may be chosen to enforce the rate limit. However, there's no guarantee it will be
+// the “TokenBucket“ in particular, and not the Leaky Bucket, the Sliding Window, or any other
+// rate limiting algorithm that fulfills the requirements.
+type RateLimitStrategy_RequestsPerTimeUnit struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The desired number of requests per :ref:`time_unit
+ // ` to allow.
+ // If set to “0“, deny all (equivalent to “BlanketRule.DENY_ALL“).
+ //
+ // .. note::
+ //
+ // Note that the algorithm implementation determines the course of action for the requests
+ // over the limit. As long as the ``requests_per_time_unit`` converges on the desired value,
+ // it's allowed to treat this field as a soft-limit: allow bursts, redistribute the allowance
+ // over time, etc.
+ RequestsPerTimeUnit uint64 `protobuf:"varint,1,opt,name=requests_per_time_unit,json=requestsPerTimeUnit,proto3" json:"requests_per_time_unit,omitempty"`
+ // The unit of time. Ignored when :ref:`requests_per_time_unit
+ // `
+ // is “0“ (deny all).
+ TimeUnit RateLimitUnit `protobuf:"varint,2,opt,name=time_unit,json=timeUnit,proto3,enum=envoy.type.v3.RateLimitUnit" json:"time_unit,omitempty"`
+}
+
+func (x *RateLimitStrategy_RequestsPerTimeUnit) Reset() {
+ *x = RateLimitStrategy_RequestsPerTimeUnit{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RateLimitStrategy_RequestsPerTimeUnit) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RateLimitStrategy_RequestsPerTimeUnit) ProtoMessage() {}
+
+func (x *RateLimitStrategy_RequestsPerTimeUnit) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RateLimitStrategy_RequestsPerTimeUnit.ProtoReflect.Descriptor instead.
+func (*RateLimitStrategy_RequestsPerTimeUnit) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_ratelimit_strategy_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *RateLimitStrategy_RequestsPerTimeUnit) GetRequestsPerTimeUnit() uint64 {
+ if x != nil {
+ return x.RequestsPerTimeUnit
+ }
+ return 0
+}
+
+func (x *RateLimitStrategy_RequestsPerTimeUnit) GetTimeUnit() RateLimitUnit {
+ if x != nil {
+ return x.TimeUnit
+ }
+ return RateLimitUnit_UNKNOWN
+}
+
+var File_envoy_type_v3_ratelimit_strategy_proto protoreflect.FileDescriptor
+
+var file_envoy_type_v3_ratelimit_strategy_proto_rawDesc = []byte{
+ 0x0a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65,
+ 0x67, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74,
+ 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74,
+ 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x78,
+ 0x64, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76,
+ 0x33, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d,
+ 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76,
+ 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xed, 0x03, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c,
+ 0x69, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x5b, 0x0a, 0x0c,
+ 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x65, 0x74, 0x5f, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e,
+ 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x74, 0x72, 0x61,
+ 0x74, 0x65, 0x67, 0x79, 0x2e, 0x42, 0x6c, 0x61, 0x6e, 0x6b, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65,
+ 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x62, 0x6c,
+ 0x61, 0x6e, 0x6b, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x6b, 0x0a, 0x16, 0x72, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75,
+ 0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
+ 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69,
+ 0x6d, 0x69, 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x2e, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x48,
+ 0x00, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x54, 0x69,
+ 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f,
+ 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x1a, 0x8f, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x12,
+ 0x33, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f,
+ 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
+ 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x54, 0x69, 0x6d, 0x65,
+ 0x55, 0x6e, 0x69, 0x74, 0x12, 0x43, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69,
+ 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69,
+ 0x74, 0x55, 0x6e, 0x69, 0x74, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52,
+ 0x08, 0x74, 0x69, 0x6d, 0x65, 0x55, 0x6e, 0x69, 0x74, 0x22, 0x2a, 0x0a, 0x0b, 0x42, 0x6c, 0x61,
+ 0x6e, 0x6b, 0x65, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x4c, 0x4c, 0x4f,
+ 0x57, 0x5f, 0x41, 0x4c, 0x4c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x45, 0x4e, 0x59, 0x5f,
+ 0x41, 0x4c, 0x4c, 0x10, 0x01, 0x42, 0x0f, 0x0a, 0x08, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67,
+ 0x79, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x42, 0x84, 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10,
+ 0x02, 0xd2, 0xc6, 0xa4, 0xe1, 0x06, 0x02, 0x08, 0x01, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e,
+ 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74,
+ 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x16, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69,
+ 0x74, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
+ 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72,
+ 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74,
+ 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_v3_ratelimit_strategy_proto_rawDescOnce sync.Once
+ file_envoy_type_v3_ratelimit_strategy_proto_rawDescData = file_envoy_type_v3_ratelimit_strategy_proto_rawDesc
+)
+
+func file_envoy_type_v3_ratelimit_strategy_proto_rawDescGZIP() []byte {
+ file_envoy_type_v3_ratelimit_strategy_proto_rawDescOnce.Do(func() {
+ file_envoy_type_v3_ratelimit_strategy_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_ratelimit_strategy_proto_rawDescData)
+ })
+ return file_envoy_type_v3_ratelimit_strategy_proto_rawDescData
+}
+
+var file_envoy_type_v3_ratelimit_strategy_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_envoy_type_v3_ratelimit_strategy_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_envoy_type_v3_ratelimit_strategy_proto_goTypes = []interface{}{
+ (RateLimitStrategy_BlanketRule)(0), // 0: envoy.type.v3.RateLimitStrategy.BlanketRule
+ (*RateLimitStrategy)(nil), // 1: envoy.type.v3.RateLimitStrategy
+ (*RateLimitStrategy_RequestsPerTimeUnit)(nil), // 2: envoy.type.v3.RateLimitStrategy.RequestsPerTimeUnit
+ (*TokenBucket)(nil), // 3: envoy.type.v3.TokenBucket
+ (RateLimitUnit)(0), // 4: envoy.type.v3.RateLimitUnit
+}
+var file_envoy_type_v3_ratelimit_strategy_proto_depIdxs = []int32{
+ 0, // 0: envoy.type.v3.RateLimitStrategy.blanket_rule:type_name -> envoy.type.v3.RateLimitStrategy.BlanketRule
+ 2, // 1: envoy.type.v3.RateLimitStrategy.requests_per_time_unit:type_name -> envoy.type.v3.RateLimitStrategy.RequestsPerTimeUnit
+ 3, // 2: envoy.type.v3.RateLimitStrategy.token_bucket:type_name -> envoy.type.v3.TokenBucket
+ 4, // 3: envoy.type.v3.RateLimitStrategy.RequestsPerTimeUnit.time_unit:type_name -> envoy.type.v3.RateLimitUnit
+ 4, // [4:4] is the sub-list for method output_type
+ 4, // [4:4] is the sub-list for method input_type
+ 4, // [4:4] is the sub-list for extension type_name
+ 4, // [4:4] is the sub-list for extension extendee
+ 0, // [0:4] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_v3_ratelimit_strategy_proto_init() }
+func file_envoy_type_v3_ratelimit_strategy_proto_init() {
+ if File_envoy_type_v3_ratelimit_strategy_proto != nil {
+ return
+ }
+ file_envoy_type_v3_ratelimit_unit_proto_init()
+ file_envoy_type_v3_token_bucket_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RateLimitStrategy); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RateLimitStrategy_RequestsPerTimeUnit); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_envoy_type_v3_ratelimit_strategy_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*RateLimitStrategy_BlanketRule_)(nil),
+ (*RateLimitStrategy_RequestsPerTimeUnit_)(nil),
+ (*RateLimitStrategy_TokenBucket)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_v3_ratelimit_strategy_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_v3_ratelimit_strategy_proto_goTypes,
+ DependencyIndexes: file_envoy_type_v3_ratelimit_strategy_proto_depIdxs,
+ EnumInfos: file_envoy_type_v3_ratelimit_strategy_proto_enumTypes,
+ MessageInfos: file_envoy_type_v3_ratelimit_strategy_proto_msgTypes,
+ }.Build()
+ File_envoy_type_v3_ratelimit_strategy_proto = out.File
+ file_envoy_type_v3_ratelimit_strategy_proto_rawDesc = nil
+ file_envoy_type_v3_ratelimit_strategy_proto_goTypes = nil
+ file_envoy_type_v3_ratelimit_strategy_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.validate.go
new file mode 100644
index 000000000..eebce17ea
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy.pb.validate.go
@@ -0,0 +1,381 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/v3/ratelimit_strategy.proto
+
+package typev3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on RateLimitStrategy with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *RateLimitStrategy) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RateLimitStrategy with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// RateLimitStrategyMultiError, or nil if none found.
+func (m *RateLimitStrategy) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RateLimitStrategy) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ oneofStrategyPresent := false
+ switch v := m.Strategy.(type) {
+ case *RateLimitStrategy_BlanketRule_:
+ if v == nil {
+ err := RateLimitStrategyValidationError{
+ field: "Strategy",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofStrategyPresent = true
+
+ if _, ok := RateLimitStrategy_BlanketRule_name[int32(m.GetBlanketRule())]; !ok {
+ err := RateLimitStrategyValidationError{
+ field: "BlanketRule",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ case *RateLimitStrategy_RequestsPerTimeUnit_:
+ if v == nil {
+ err := RateLimitStrategyValidationError{
+ field: "Strategy",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofStrategyPresent = true
+
+ if all {
+ switch v := interface{}(m.GetRequestsPerTimeUnit()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RateLimitStrategyValidationError{
+ field: "RequestsPerTimeUnit",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RateLimitStrategyValidationError{
+ field: "RequestsPerTimeUnit",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetRequestsPerTimeUnit()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RateLimitStrategyValidationError{
+ field: "RequestsPerTimeUnit",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ case *RateLimitStrategy_TokenBucket:
+ if v == nil {
+ err := RateLimitStrategyValidationError{
+ field: "Strategy",
+ reason: "oneof value cannot be a typed-nil",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+ oneofStrategyPresent = true
+
+ if all {
+ switch v := interface{}(m.GetTokenBucket()).(type) {
+ case interface{ ValidateAll() error }:
+ if err := v.ValidateAll(); err != nil {
+ errors = append(errors, RateLimitStrategyValidationError{
+ field: "TokenBucket",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ case interface{ Validate() error }:
+ if err := v.Validate(); err != nil {
+ errors = append(errors, RateLimitStrategyValidationError{
+ field: "TokenBucket",
+ reason: "embedded message failed validation",
+ cause: err,
+ })
+ }
+ }
+ } else if v, ok := interface{}(m.GetTokenBucket()).(interface{ Validate() error }); ok {
+ if err := v.Validate(); err != nil {
+ return RateLimitStrategyValidationError{
+ field: "TokenBucket",
+ reason: "embedded message failed validation",
+ cause: err,
+ }
+ }
+ }
+
+ default:
+ _ = v // ensures v is used
+ }
+ if !oneofStrategyPresent {
+ err := RateLimitStrategyValidationError{
+ field: "Strategy",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return RateLimitStrategyMultiError(errors)
+ }
+
+ return nil
+}
+
+// RateLimitStrategyMultiError is an error wrapping multiple validation errors
+// returned by RateLimitStrategy.ValidateAll() if the designated constraints
+// aren't met.
+type RateLimitStrategyMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RateLimitStrategyMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RateLimitStrategyMultiError) AllErrors() []error { return m }
+
+// RateLimitStrategyValidationError is the validation error returned by
+// RateLimitStrategy.Validate if the designated constraints aren't met.
+type RateLimitStrategyValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RateLimitStrategyValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RateLimitStrategyValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RateLimitStrategyValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RateLimitStrategyValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RateLimitStrategyValidationError) ErrorName() string {
+ return "RateLimitStrategyValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e RateLimitStrategyValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRateLimitStrategy.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RateLimitStrategyValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RateLimitStrategyValidationError{}
+
+// Validate checks the field values on RateLimitStrategy_RequestsPerTimeUnit
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the first error encountered is returned, or nil if
+// there are no violations.
+func (m *RateLimitStrategy_RequestsPerTimeUnit) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on RateLimitStrategy_RequestsPerTimeUnit
+// with the rules defined in the proto definition for this message. If any
+// rules are violated, the result is a list of violation errors wrapped in
+// RateLimitStrategy_RequestsPerTimeUnitMultiError, or nil if none found.
+func (m *RateLimitStrategy_RequestsPerTimeUnit) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *RateLimitStrategy_RequestsPerTimeUnit) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for RequestsPerTimeUnit
+
+ if _, ok := RateLimitUnit_name[int32(m.GetTimeUnit())]; !ok {
+ err := RateLimitStrategy_RequestsPerTimeUnitValidationError{
+ field: "TimeUnit",
+ reason: "value must be one of the defined enum values",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if len(errors) > 0 {
+ return RateLimitStrategy_RequestsPerTimeUnitMultiError(errors)
+ }
+
+ return nil
+}
+
+// RateLimitStrategy_RequestsPerTimeUnitMultiError is an error wrapping
+// multiple validation errors returned by
+// RateLimitStrategy_RequestsPerTimeUnit.ValidateAll() if the designated
+// constraints aren't met.
+type RateLimitStrategy_RequestsPerTimeUnitMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m RateLimitStrategy_RequestsPerTimeUnitMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m RateLimitStrategy_RequestsPerTimeUnitMultiError) AllErrors() []error { return m }
+
+// RateLimitStrategy_RequestsPerTimeUnitValidationError is the validation error
+// returned by RateLimitStrategy_RequestsPerTimeUnit.Validate if the
+// designated constraints aren't met.
+type RateLimitStrategy_RequestsPerTimeUnitValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) ErrorName() string {
+ return "RateLimitStrategy_RequestsPerTimeUnitValidationError"
+}
+
+// Error satisfies the builtin error interface
+func (e RateLimitStrategy_RequestsPerTimeUnitValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sRateLimitStrategy_RequestsPerTimeUnit.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = RateLimitStrategy_RequestsPerTimeUnitValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = RateLimitStrategy_RequestsPerTimeUnitValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy_vtproto.pb.go
new file mode 100644
index 000000000..c35990b76
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_strategy_vtproto.pb.go
@@ -0,0 +1,241 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/v3/ratelimit_strategy.proto
+
+package typev3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *RateLimitStrategy_RequestsPerTimeUnit) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RateLimitStrategy_RequestsPerTimeUnit) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RateLimitStrategy_RequestsPerTimeUnit) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.TimeUnit != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TimeUnit))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.RequestsPerTimeUnit != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.RequestsPerTimeUnit))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *RateLimitStrategy) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *RateLimitStrategy) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RateLimitStrategy) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if msg, ok := m.Strategy.(*RateLimitStrategy_TokenBucket); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Strategy.(*RateLimitStrategy_RequestsPerTimeUnit_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ if msg, ok := m.Strategy.(*RateLimitStrategy_BlanketRule_); ok {
+ size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *RateLimitStrategy_BlanketRule_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RateLimitStrategy_BlanketRule_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.BlanketRule))
+ i--
+ dAtA[i] = 0x8
+ return len(dAtA) - i, nil
+}
+func (m *RateLimitStrategy_RequestsPerTimeUnit_) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RateLimitStrategy_RequestsPerTimeUnit_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.RequestsPerTimeUnit != nil {
+ size, err := m.RequestsPerTimeUnit.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x12
+ }
+ return len(dAtA) - i, nil
+}
+func (m *RateLimitStrategy_TokenBucket) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *RateLimitStrategy_TokenBucket) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ if m.TokenBucket != nil {
+ size, err := m.TokenBucket.MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ } else {
+ i = protohelpers.EncodeVarint(dAtA, i, 0)
+ i--
+ dAtA[i] = 0x1a
+ }
+ return len(dAtA) - i, nil
+}
+func (m *RateLimitStrategy_RequestsPerTimeUnit) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RequestsPerTimeUnit != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.RequestsPerTimeUnit))
+ }
+ if m.TimeUnit != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.TimeUnit))
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *RateLimitStrategy) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if vtmsg, ok := m.Strategy.(interface{ SizeVT() int }); ok {
+ n += vtmsg.SizeVT()
+ }
+ n += len(m.unknownFields)
+ return n
+}
+
+func (m *RateLimitStrategy_BlanketRule_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.BlanketRule))
+ return n
+}
+func (m *RateLimitStrategy_RequestsPerTimeUnit_) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.RequestsPerTimeUnit != nil {
+ l = m.RequestsPerTimeUnit.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
+func (m *RateLimitStrategy_TokenBucket) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.TokenBucket != nil {
+ l = m.TokenBucket.SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ } else {
+ n += 2
+ }
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.go
new file mode 100644
index 000000000..368688888
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.go
@@ -0,0 +1,165 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/v3/ratelimit_unit.proto
+
+package typev3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Identifies the unit of of time for rate limit.
+type RateLimitUnit int32
+
+const (
+ // The time unit is not known.
+ RateLimitUnit_UNKNOWN RateLimitUnit = 0
+ // The time unit representing a second.
+ RateLimitUnit_SECOND RateLimitUnit = 1
+ // The time unit representing a minute.
+ RateLimitUnit_MINUTE RateLimitUnit = 2
+ // The time unit representing an hour.
+ RateLimitUnit_HOUR RateLimitUnit = 3
+ // The time unit representing a day.
+ RateLimitUnit_DAY RateLimitUnit = 4
+ // The time unit representing a month.
+ RateLimitUnit_MONTH RateLimitUnit = 5
+ // The time unit representing a year.
+ RateLimitUnit_YEAR RateLimitUnit = 6
+)
+
+// Enum value maps for RateLimitUnit.
+var (
+ RateLimitUnit_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "SECOND",
+ 2: "MINUTE",
+ 3: "HOUR",
+ 4: "DAY",
+ 5: "MONTH",
+ 6: "YEAR",
+ }
+ RateLimitUnit_value = map[string]int32{
+ "UNKNOWN": 0,
+ "SECOND": 1,
+ "MINUTE": 2,
+ "HOUR": 3,
+ "DAY": 4,
+ "MONTH": 5,
+ "YEAR": 6,
+ }
+)
+
+func (x RateLimitUnit) Enum() *RateLimitUnit {
+ p := new(RateLimitUnit)
+ *p = x
+ return p
+}
+
+func (x RateLimitUnit) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (RateLimitUnit) Descriptor() protoreflect.EnumDescriptor {
+ return file_envoy_type_v3_ratelimit_unit_proto_enumTypes[0].Descriptor()
+}
+
+func (RateLimitUnit) Type() protoreflect.EnumType {
+ return &file_envoy_type_v3_ratelimit_unit_proto_enumTypes[0]
+}
+
+func (x RateLimitUnit) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use RateLimitUnit.Descriptor instead.
+func (RateLimitUnit) EnumDescriptor() ([]byte, []int) {
+ return file_envoy_type_v3_ratelimit_unit_proto_rawDescGZIP(), []int{0}
+}
+
+var File_envoy_type_v3_ratelimit_unit_proto protoreflect.FileDescriptor
+
+var file_envoy_type_v3_ratelimit_unit_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x75, 0x6e, 0x69, 0x74, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65,
+ 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2a, 0x5c, 0x0a, 0x0d, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x55,
+ 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00,
+ 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06,
+ 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x55, 0x52,
+ 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x4d,
+ 0x4f, 0x4e, 0x54, 0x48, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x59, 0x45, 0x41, 0x52, 0x10, 0x06,
+ 0x42, 0x78, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65,
+ 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e,
+ 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x12, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d,
+ 0x69, 0x74, 0x55, 0x6e, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70,
+ 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d,
+ 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65,
+ 0x2f, 0x76, 0x33, 0x3b, 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_v3_ratelimit_unit_proto_rawDescOnce sync.Once
+ file_envoy_type_v3_ratelimit_unit_proto_rawDescData = file_envoy_type_v3_ratelimit_unit_proto_rawDesc
+)
+
+func file_envoy_type_v3_ratelimit_unit_proto_rawDescGZIP() []byte {
+ file_envoy_type_v3_ratelimit_unit_proto_rawDescOnce.Do(func() {
+ file_envoy_type_v3_ratelimit_unit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_ratelimit_unit_proto_rawDescData)
+ })
+ return file_envoy_type_v3_ratelimit_unit_proto_rawDescData
+}
+
+var file_envoy_type_v3_ratelimit_unit_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_envoy_type_v3_ratelimit_unit_proto_goTypes = []interface{}{
+ (RateLimitUnit)(0), // 0: envoy.type.v3.RateLimitUnit
+}
+var file_envoy_type_v3_ratelimit_unit_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_v3_ratelimit_unit_proto_init() }
+func file_envoy_type_v3_ratelimit_unit_proto_init() {
+ if File_envoy_type_v3_ratelimit_unit_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_v3_ratelimit_unit_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 0,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_v3_ratelimit_unit_proto_goTypes,
+ DependencyIndexes: file_envoy_type_v3_ratelimit_unit_proto_depIdxs,
+ EnumInfos: file_envoy_type_v3_ratelimit_unit_proto_enumTypes,
+ }.Build()
+ File_envoy_type_v3_ratelimit_unit_proto = out.File
+ file_envoy_type_v3_ratelimit_unit_proto_rawDesc = nil
+ file_envoy_type_v3_ratelimit_unit_proto_goTypes = nil
+ file_envoy_type_v3_ratelimit_unit_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.validate.go
new file mode 100644
index 000000000..17658400e
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/ratelimit_unit.pb.validate.go
@@ -0,0 +1,37 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/v3/ratelimit_unit.proto
+
+package typev3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.go
new file mode 100644
index 000000000..630e6567c
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.go
@@ -0,0 +1,181 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/v3/semantic_version.proto
+
+package typev3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Envoy uses SemVer (https://semver.org/). Major/minor versions indicate
+// expected behaviors and APIs, the patch version field is used only
+// for security fixes and can be generally ignored.
+type SemanticVersion struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ MajorNumber uint32 `protobuf:"varint,1,opt,name=major_number,json=majorNumber,proto3" json:"major_number,omitempty"`
+ MinorNumber uint32 `protobuf:"varint,2,opt,name=minor_number,json=minorNumber,proto3" json:"minor_number,omitempty"`
+ Patch uint32 `protobuf:"varint,3,opt,name=patch,proto3" json:"patch,omitempty"`
+}
+
+func (x *SemanticVersion) Reset() {
+ *x = SemanticVersion{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_semantic_version_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SemanticVersion) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SemanticVersion) ProtoMessage() {}
+
+func (x *SemanticVersion) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_semantic_version_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SemanticVersion.ProtoReflect.Descriptor instead.
+func (*SemanticVersion) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_semantic_version_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *SemanticVersion) GetMajorNumber() uint32 {
+ if x != nil {
+ return x.MajorNumber
+ }
+ return 0
+}
+
+func (x *SemanticVersion) GetMinorNumber() uint32 {
+ if x != nil {
+ return x.MinorNumber
+ }
+ return 0
+}
+
+func (x *SemanticVersion) GetPatch() uint32 {
+ if x != nil {
+ return x.Patch
+ }
+ return 0
+}
+
+var File_envoy_type_v3_semantic_version_proto protoreflect.FileDescriptor
+
+var file_envoy_type_v3_semantic_version_proto_rawDesc = []byte{
+ 0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x76, 0x33, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
+ 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e,
+ 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x90, 0x01, 0x0a, 0x0f, 0x53, 0x65, 0x6d, 0x61,
+ 0x6e, 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d,
+ 0x61, 0x6a, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x0b, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21,
+ 0x0a, 0x0c, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x4e, 0x75, 0x6d, 0x62, 0x65,
+ 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x3a, 0x21, 0x9a, 0xc5, 0x88, 0x1e, 0x1c, 0x0a, 0x1a,
+ 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x53, 0x65, 0x6d, 0x61, 0x6e,
+ 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x7a, 0xba, 0x80, 0xc8, 0xd1,
+ 0x06, 0x02, 0x10, 0x02, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72,
+ 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76,
+ 0x33, 0x42, 0x14, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79,
+ 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e,
+ 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b,
+ 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_v3_semantic_version_proto_rawDescOnce sync.Once
+ file_envoy_type_v3_semantic_version_proto_rawDescData = file_envoy_type_v3_semantic_version_proto_rawDesc
+)
+
+func file_envoy_type_v3_semantic_version_proto_rawDescGZIP() []byte {
+ file_envoy_type_v3_semantic_version_proto_rawDescOnce.Do(func() {
+ file_envoy_type_v3_semantic_version_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_semantic_version_proto_rawDescData)
+ })
+ return file_envoy_type_v3_semantic_version_proto_rawDescData
+}
+
+var file_envoy_type_v3_semantic_version_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_type_v3_semantic_version_proto_goTypes = []interface{}{
+ (*SemanticVersion)(nil), // 0: envoy.type.v3.SemanticVersion
+}
+var file_envoy_type_v3_semantic_version_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_v3_semantic_version_proto_init() }
+func file_envoy_type_v3_semantic_version_proto_init() {
+ if File_envoy_type_v3_semantic_version_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_v3_semantic_version_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SemanticVersion); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_v3_semantic_version_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_v3_semantic_version_proto_goTypes,
+ DependencyIndexes: file_envoy_type_v3_semantic_version_proto_depIdxs,
+ MessageInfos: file_envoy_type_v3_semantic_version_proto_msgTypes,
+ }.Build()
+ File_envoy_type_v3_semantic_version_proto = out.File
+ file_envoy_type_v3_semantic_version_proto_rawDesc = nil
+ file_envoy_type_v3_semantic_version_proto_goTypes = nil
+ file_envoy_type_v3_semantic_version_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.validate.go
new file mode 100644
index 000000000..af3b6ee41
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version.pb.validate.go
@@ -0,0 +1,143 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/v3/semantic_version.proto
+
+package typev3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on SemanticVersion with the rules defined
+// in the proto definition for this message. If any rules are violated, the
+// first error encountered is returned, or nil if there are no violations.
+func (m *SemanticVersion) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on SemanticVersion with the rules
+// defined in the proto definition for this message. If any rules are
+// violated, the result is a list of violation errors wrapped in
+// SemanticVersionMultiError, or nil if none found.
+func (m *SemanticVersion) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *SemanticVersion) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ // no validation rules for MajorNumber
+
+ // no validation rules for MinorNumber
+
+ // no validation rules for Patch
+
+ if len(errors) > 0 {
+ return SemanticVersionMultiError(errors)
+ }
+
+ return nil
+}
+
+// SemanticVersionMultiError is an error wrapping multiple validation errors
+// returned by SemanticVersion.ValidateAll() if the designated constraints
+// aren't met.
+type SemanticVersionMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m SemanticVersionMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m SemanticVersionMultiError) AllErrors() []error { return m }
+
+// SemanticVersionValidationError is the validation error returned by
+// SemanticVersion.Validate if the designated constraints aren't met.
+type SemanticVersionValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e SemanticVersionValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e SemanticVersionValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e SemanticVersionValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e SemanticVersionValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e SemanticVersionValidationError) ErrorName() string { return "SemanticVersionValidationError" }
+
+// Error satisfies the builtin error interface
+func (e SemanticVersionValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sSemanticVersion.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = SemanticVersionValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = SemanticVersionValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version_vtproto.pb.go
new file mode 100644
index 000000000..13810fe82
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/semantic_version_vtproto.pb.go
@@ -0,0 +1,86 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/v3/semantic_version.proto
+
+package typev3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *SemanticVersion) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *SemanticVersion) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *SemanticVersion) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.Patch != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Patch))
+ i--
+ dAtA[i] = 0x18
+ }
+ if m.MinorNumber != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MinorNumber))
+ i--
+ dAtA[i] = 0x10
+ }
+ if m.MajorNumber != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MajorNumber))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *SemanticVersion) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.MajorNumber != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.MajorNumber))
+ }
+ if m.MinorNumber != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.MinorNumber))
+ }
+ if m.Patch != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.Patch))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.go
new file mode 100644
index 000000000..9c21f2454
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.go
@@ -0,0 +1,204 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v5.26.1
+// source: envoy/type/v3/token_bucket.proto
+
+package typev3
+
+import (
+ _ "github.com/cncf/xds/go/udpa/annotations"
+ _ "github.com/envoyproxy/protoc-gen-validate/validate"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Configures a token bucket, typically used for rate limiting.
+type TokenBucket struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The maximum tokens that the bucket can hold. This is also the number of tokens that the bucket
+ // initially contains.
+ MaxTokens uint32 `protobuf:"varint,1,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"`
+ // The number of tokens added to the bucket during each fill interval. If not specified, defaults
+ // to a single token.
+ TokensPerFill *wrapperspb.UInt32Value `protobuf:"bytes,2,opt,name=tokens_per_fill,json=tokensPerFill,proto3" json:"tokens_per_fill,omitempty"`
+ // The fill interval that tokens are added to the bucket. During each fill interval
+ // “tokens_per_fill“ are added to the bucket. The bucket will never contain more than
+ // “max_tokens“ tokens.
+ FillInterval *durationpb.Duration `protobuf:"bytes,3,opt,name=fill_interval,json=fillInterval,proto3" json:"fill_interval,omitempty"`
+}
+
+func (x *TokenBucket) Reset() {
+ *x = TokenBucket{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_envoy_type_v3_token_bucket_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TokenBucket) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TokenBucket) ProtoMessage() {}
+
+func (x *TokenBucket) ProtoReflect() protoreflect.Message {
+ mi := &file_envoy_type_v3_token_bucket_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TokenBucket.ProtoReflect.Descriptor instead.
+func (*TokenBucket) Descriptor() ([]byte, []int) {
+ return file_envoy_type_v3_token_bucket_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *TokenBucket) GetMaxTokens() uint32 {
+ if x != nil {
+ return x.MaxTokens
+ }
+ return 0
+}
+
+func (x *TokenBucket) GetTokensPerFill() *wrapperspb.UInt32Value {
+ if x != nil {
+ return x.TokensPerFill
+ }
+ return nil
+}
+
+func (x *TokenBucket) GetFillInterval() *durationpb.Duration {
+ if x != nil {
+ return x.FillInterval
+ }
+ return nil
+}
+
+var File_envoy_type_v3_token_bucket_proto protoreflect.FileDescriptor
+
+var file_envoy_type_v3_token_bucket_proto_rawDesc = []byte{
+ 0x0a, 0x20, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f,
+ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x0d, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76,
+ 0x33, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xef, 0x01, 0x0a,
+ 0x0b, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x26, 0x0a, 0x0a,
+ 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
+ 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x20, 0x00, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x4d, 0x0a, 0x0f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x70,
+ 0x65, 0x72, 0x5f, 0x66, 0x69, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x07, 0xfa, 0x42, 0x04,
+ 0x2a, 0x02, 0x20, 0x00, 0x52, 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x50, 0x65, 0x72, 0x46,
+ 0x69, 0x6c, 0x6c, 0x12, 0x4a, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x69, 0x6e, 0x74, 0x65,
+ 0x72, 0x76, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0a, 0xfa, 0x42, 0x07, 0xaa, 0x01, 0x04, 0x08, 0x01, 0x2a,
+ 0x00, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x3a,
+ 0x1d, 0x9a, 0xc5, 0x88, 0x1e, 0x18, 0x0a, 0x16, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x42, 0x76,
+ 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x1b, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76,
+ 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79,
+ 0x70, 0x65, 0x2e, 0x76, 0x33, 0x42, 0x10, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x75, 0x63, 0x6b,
+ 0x65, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79,
+ 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e,
+ 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x3b,
+ 0x74, 0x79, 0x70, 0x65, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_envoy_type_v3_token_bucket_proto_rawDescOnce sync.Once
+ file_envoy_type_v3_token_bucket_proto_rawDescData = file_envoy_type_v3_token_bucket_proto_rawDesc
+)
+
+func file_envoy_type_v3_token_bucket_proto_rawDescGZIP() []byte {
+ file_envoy_type_v3_token_bucket_proto_rawDescOnce.Do(func() {
+ file_envoy_type_v3_token_bucket_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_type_v3_token_bucket_proto_rawDescData)
+ })
+ return file_envoy_type_v3_token_bucket_proto_rawDescData
+}
+
+var file_envoy_type_v3_token_bucket_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_envoy_type_v3_token_bucket_proto_goTypes = []interface{}{
+ (*TokenBucket)(nil), // 0: envoy.type.v3.TokenBucket
+ (*wrapperspb.UInt32Value)(nil), // 1: google.protobuf.UInt32Value
+ (*durationpb.Duration)(nil), // 2: google.protobuf.Duration
+}
+var file_envoy_type_v3_token_bucket_proto_depIdxs = []int32{
+ 1, // 0: envoy.type.v3.TokenBucket.tokens_per_fill:type_name -> google.protobuf.UInt32Value
+ 2, // 1: envoy.type.v3.TokenBucket.fill_interval:type_name -> google.protobuf.Duration
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_envoy_type_v3_token_bucket_proto_init() }
+func file_envoy_type_v3_token_bucket_proto_init() {
+ if File_envoy_type_v3_token_bucket_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_envoy_type_v3_token_bucket_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TokenBucket); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_envoy_type_v3_token_bucket_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_envoy_type_v3_token_bucket_proto_goTypes,
+ DependencyIndexes: file_envoy_type_v3_token_bucket_proto_depIdxs,
+ MessageInfos: file_envoy_type_v3_token_bucket_proto_msgTypes,
+ }.Build()
+ File_envoy_type_v3_token_bucket_proto = out.File
+ file_envoy_type_v3_token_bucket_proto_rawDesc = nil
+ file_envoy_type_v3_token_bucket_proto_goTypes = nil
+ file_envoy_type_v3_token_bucket_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.validate.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.validate.go
new file mode 100644
index 000000000..4f2607621
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket.pb.validate.go
@@ -0,0 +1,203 @@
+//go:build !disable_pgv
+// Code generated by protoc-gen-validate. DO NOT EDIT.
+// source: envoy/type/v3/token_bucket.proto
+
+package typev3
+
+import (
+ "bytes"
+ "errors"
+ "fmt"
+ "net"
+ "net/mail"
+ "net/url"
+ "regexp"
+ "sort"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+// ensure the imports are used
+var (
+ _ = bytes.MinRead
+ _ = errors.New("")
+ _ = fmt.Print
+ _ = utf8.UTFMax
+ _ = (*regexp.Regexp)(nil)
+ _ = (*strings.Reader)(nil)
+ _ = net.IPv4len
+ _ = time.Duration(0)
+ _ = (*url.URL)(nil)
+ _ = (*mail.Address)(nil)
+ _ = anypb.Any{}
+ _ = sort.Sort
+)
+
+// Validate checks the field values on TokenBucket with the rules defined in
+// the proto definition for this message. If any rules are violated, the first
+// error encountered is returned, or nil if there are no violations.
+func (m *TokenBucket) Validate() error {
+ return m.validate(false)
+}
+
+// ValidateAll checks the field values on TokenBucket with the rules defined in
+// the proto definition for this message. If any rules are violated, the
+// result is a list of violation errors wrapped in TokenBucketMultiError, or
+// nil if none found.
+func (m *TokenBucket) ValidateAll() error {
+ return m.validate(true)
+}
+
+func (m *TokenBucket) validate(all bool) error {
+ if m == nil {
+ return nil
+ }
+
+ var errors []error
+
+ if m.GetMaxTokens() <= 0 {
+ err := TokenBucketValidationError{
+ field: "MaxTokens",
+ reason: "value must be greater than 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if wrapper := m.GetTokensPerFill(); wrapper != nil {
+
+ if wrapper.GetValue() <= 0 {
+ err := TokenBucketValidationError{
+ field: "TokensPerFill",
+ reason: "value must be greater than 0",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+
+ if m.GetFillInterval() == nil {
+ err := TokenBucketValidationError{
+ field: "FillInterval",
+ reason: "value is required",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ if d := m.GetFillInterval(); d != nil {
+ dur, err := d.AsDuration(), d.CheckValid()
+ if err != nil {
+ err = TokenBucketValidationError{
+ field: "FillInterval",
+ reason: "value is not a valid duration",
+ cause: err,
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ } else {
+
+ gt := time.Duration(0*time.Second + 0*time.Nanosecond)
+
+ if dur <= gt {
+ err := TokenBucketValidationError{
+ field: "FillInterval",
+ reason: "value must be greater than 0s",
+ }
+ if !all {
+ return err
+ }
+ errors = append(errors, err)
+ }
+
+ }
+ }
+
+ if len(errors) > 0 {
+ return TokenBucketMultiError(errors)
+ }
+
+ return nil
+}
+
+// TokenBucketMultiError is an error wrapping multiple validation errors
+// returned by TokenBucket.ValidateAll() if the designated constraints aren't met.
+type TokenBucketMultiError []error
+
+// Error returns a concatenation of all the error messages it wraps.
+func (m TokenBucketMultiError) Error() string {
+ var msgs []string
+ for _, err := range m {
+ msgs = append(msgs, err.Error())
+ }
+ return strings.Join(msgs, "; ")
+}
+
+// AllErrors returns a list of validation violation errors.
+func (m TokenBucketMultiError) AllErrors() []error { return m }
+
+// TokenBucketValidationError is the validation error returned by
+// TokenBucket.Validate if the designated constraints aren't met.
+type TokenBucketValidationError struct {
+ field string
+ reason string
+ cause error
+ key bool
+}
+
+// Field function returns field value.
+func (e TokenBucketValidationError) Field() string { return e.field }
+
+// Reason function returns reason value.
+func (e TokenBucketValidationError) Reason() string { return e.reason }
+
+// Cause function returns cause value.
+func (e TokenBucketValidationError) Cause() error { return e.cause }
+
+// Key function returns key value.
+func (e TokenBucketValidationError) Key() bool { return e.key }
+
+// ErrorName returns error name.
+func (e TokenBucketValidationError) ErrorName() string { return "TokenBucketValidationError" }
+
+// Error satisfies the builtin error interface
+func (e TokenBucketValidationError) Error() string {
+ cause := ""
+ if e.cause != nil {
+ cause = fmt.Sprintf(" | caused by: %v", e.cause)
+ }
+
+ key := ""
+ if e.key {
+ key = "key for "
+ }
+
+ return fmt.Sprintf(
+ "invalid %sTokenBucket.%s: %s%s",
+ key,
+ e.field,
+ e.reason,
+ cause)
+}
+
+var _ error = TokenBucketValidationError{}
+
+var _ interface {
+ Field() string
+ Reason() string
+ Key() bool
+ Cause() error
+ ErrorName() string
+} = TokenBucketValidationError{}
diff --git a/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket_vtproto.pb.go b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket_vtproto.pb.go
new file mode 100644
index 000000000..8ab53eaf2
--- /dev/null
+++ b/vendor/github.com/envoyproxy/go-control-plane/envoy/type/v3/token_bucket_vtproto.pb.go
@@ -0,0 +1,100 @@
+//go:build vtprotobuf
+// +build vtprotobuf
+
+// Code generated by protoc-gen-go-vtproto. DO NOT EDIT.
+// source: envoy/type/v3/token_bucket.proto
+
+package typev3
+
+import (
+ protohelpers "github.com/planetscale/vtprotobuf/protohelpers"
+ durationpb "github.com/planetscale/vtprotobuf/types/known/durationpb"
+ wrapperspb "github.com/planetscale/vtprotobuf/types/known/wrapperspb"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+func (m *TokenBucket) MarshalVTStrict() (dAtA []byte, err error) {
+ if m == nil {
+ return nil, nil
+ }
+ size := m.SizeVT()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *TokenBucket) MarshalToVTStrict(dAtA []byte) (int, error) {
+ size := m.SizeVT()
+ return m.MarshalToSizedBufferVTStrict(dAtA[:size])
+}
+
+func (m *TokenBucket) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) {
+ if m == nil {
+ return 0, nil
+ }
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if m.unknownFields != nil {
+ i -= len(m.unknownFields)
+ copy(dAtA[i:], m.unknownFields)
+ }
+ if m.FillInterval != nil {
+ size, err := (*durationpb.Duration)(m.FillInterval).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x1a
+ }
+ if m.TokensPerFill != nil {
+ size, err := (*wrapperspb.UInt32Value)(m.TokensPerFill).MarshalToSizedBufferVTStrict(dAtA[:i])
+ if err != nil {
+ return 0, err
+ }
+ i -= size
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(size))
+ i--
+ dAtA[i] = 0x12
+ }
+ if m.MaxTokens != 0 {
+ i = protohelpers.EncodeVarint(dAtA, i, uint64(m.MaxTokens))
+ i--
+ dAtA[i] = 0x8
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *TokenBucket) SizeVT() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ if m.MaxTokens != 0 {
+ n += 1 + protohelpers.SizeOfVarint(uint64(m.MaxTokens))
+ }
+ if m.TokensPerFill != nil {
+ l = (*wrapperspb.UInt32Value)(m.TokensPerFill).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ if m.FillInterval != nil {
+ l = (*durationpb.Duration)(m.FillInterval).SizeVT()
+ n += 1 + l + protohelpers.SizeOfVarint(uint64(l))
+ }
+ n += len(m.unknownFields)
+ return n
+}
diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/LICENSE b/vendor/github.com/envoyproxy/protoc-gen-validate/LICENSE
new file mode 100644
index 000000000..d64569567
--- /dev/null
+++ b/vendor/github.com/envoyproxy/protoc-gen-validate/LICENSE
@@ -0,0 +1,202 @@
+
+ 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/github.com/envoyproxy/protoc-gen-validate/validate/BUILD b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD
new file mode 100644
index 000000000..a9d38c51b
--- /dev/null
+++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD
@@ -0,0 +1,74 @@
+load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")
+load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
+load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library")
+load("@rules_java//java:defs.bzl", "java_proto_library")
+load("@rules_proto//proto:defs.bzl", "proto_library")
+load("@io_bazel_rules_go//go:def.bzl", "go_library")
+
+package(
+ default_visibility =
+ ["//visibility:public"],
+)
+
+proto_library(
+ name = "validate_proto",
+ srcs = ["validate.proto"],
+ deps = [
+ "@com_google_protobuf//:descriptor_proto",
+ "@com_google_protobuf//:duration_proto",
+ "@com_google_protobuf//:timestamp_proto",
+ ],
+)
+
+cc_proto_library(
+ name = "validate_cc",
+ deps = [":validate_proto"],
+)
+
+py_proto_library(
+ name = "validate_py",
+ srcs = ["validate.proto"],
+ deps = ["@com_google_protobuf//:protobuf_python"],
+)
+
+go_proto_library(
+ name = "validate_go_proto",
+ importpath = "github.com/envoyproxy/protoc-gen-validate/validate",
+ proto = ":validate_proto",
+)
+
+cc_library(
+ name = "cc_validate",
+ hdrs = ["validate.h"],
+)
+
+go_library(
+ name = "validate_go",
+ embed = [":validate_go_proto"],
+ importpath = "github.com/envoyproxy/protoc-gen-validate/validate",
+)
+
+java_proto_library(
+ name = "validate_java",
+ deps = [":validate_proto"],
+)
+
+filegroup(
+ name = "validate_src",
+ srcs = ["validate.proto"],
+)
+
+alias(
+ name = "go_default_library",
+ actual = ":validate",
+ deprecation = "Use :validate instead of :go_default_library. Details about the new naming convention: https://github.com/bazelbuild/bazel-gazelle/pull/863",
+ visibility = ["//visibility:public"],
+)
+
+# this alias allows build files generated with Gazelle in other repositories
+# to find validate as an external dependency
+alias(
+ name = "validate",
+ actual = ":validate_go",
+ visibility = ["//visibility:public"],
+)
diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h
new file mode 100644
index 000000000..d6cf6c9d9
--- /dev/null
+++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h
@@ -0,0 +1,183 @@
+#ifndef _VALIDATE_H
+#define _VALIDATE_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#if !defined(_WIN32)
+#include
+#else
+#include
+#include
+
+// uses macros to #define a ton of symbols,
+// many of which interfere with our code here and down
+// the line in various extensions.
+#undef DELETE
+#undef ERROR
+#undef GetMessage
+#undef interface
+#undef TRUE
+#undef min
+
+#endif
+
+#include "google/protobuf/message.h"
+
+namespace pgv {
+using std::string;
+
+class UnimplementedException : public std::runtime_error {
+public:
+ UnimplementedException() : std::runtime_error("not yet implemented") {}
+ UnimplementedException(const std::string& message) : std::runtime_error(message) {}
+ // Thrown by C++ validation code that is not yet implemented.
+};
+
+using ValidationMsg = std::string;
+
+class BaseValidator {
+public:
+ /**
+ * Validate/check a generic message object with a registered validator for the concrete message
+ * type.
+ * @param m supplies the message to check.
+ * @param err supplies the place to return error information.
+ * @return true if the validation passes OR there is no registered validator for the concrete
+ * message type. false is returned if validation explicitly fails.
+ */
+ static bool AbstractCheckMessage(const google::protobuf::Message& m, ValidationMsg* err) {
+ // Polymorphic lookup is used to see if there is a matching concrete validator. If so, call it.
+ // Otherwise return success.
+ auto it = abstractValidators().find(std::type_index(typeid(m)));
+ if (it == abstractValidators().end()) {
+ return true;
+ }
+ return it->second(m, err);
+ }
+
+protected:
+ // Used to implement AbstractCheckMessage() above. Every message that is linked into the binary
+ // will register itself by type_index, allowing for polymorphic lookup later.
+ static std::unordered_map>&
+ abstractValidators() {
+ static auto* validator_map = new std::unordered_map<
+ std::type_index, std::function>();
+ return *validator_map;
+ }
+};
+
+template class Validator : public BaseValidator {
+public:
+ Validator(std::function check) : check_(check) {
+ abstractValidators()[std::type_index(typeid(T))] = [this](const google::protobuf::Message& m,
+ ValidationMsg* err) -> bool {
+ return check_(dynamic_cast(m), err);
+ };
+ }
+
+private:
+ std::function check_;
+};
+
+static inline std::string String(const ValidationMsg& msg) { return std::string(msg); }
+
+static inline bool IsPrefix(const string& maybe_prefix, const string& search_in) {
+ return search_in.compare(0, maybe_prefix.size(), maybe_prefix) == 0;
+}
+
+static inline bool IsSuffix(const string& maybe_suffix, const string& search_in) {
+ return maybe_suffix.size() <= search_in.size() &&
+ search_in.compare(search_in.size() - maybe_suffix.size(), maybe_suffix.size(),
+ maybe_suffix) == 0;
+}
+
+static inline bool Contains(const string& search_in, const string& to_find) {
+ return search_in.find(to_find) != string::npos;
+}
+
+static inline bool NotContains(const string& search_in, const string& to_find) {
+ return !Contains(search_in, to_find);
+}
+
+static inline bool IsIpv4(const string& to_validate) {
+ struct sockaddr_in sa;
+ return !(inet_pton(AF_INET, to_validate.c_str(), &sa.sin_addr) < 1);
+}
+
+static inline bool IsIpv6(const string& to_validate) {
+ struct sockaddr_in6 sa_six;
+ return !(inet_pton(AF_INET6, to_validate.c_str(), &sa_six.sin6_addr) < 1);
+}
+
+static inline bool IsIp(const string& to_validate) {
+ return IsIpv4(to_validate) || IsIpv6(to_validate);
+}
+
+static inline bool IsHostname(const string& to_validate) {
+ if (to_validate.length() > 253) {
+ return false;
+ }
+
+ const std::regex dot_regex{"\\."};
+ const auto iter_end = std::sregex_token_iterator();
+ auto iter = std::sregex_token_iterator(to_validate.begin(), to_validate.end(), dot_regex, -1);
+ for (; iter != iter_end; ++iter) {
+ const std::string& part = *iter;
+ if (part.empty() || part.length() > 63) {
+ return false;
+ }
+ if (part.at(0) == '-') {
+ return false;
+ }
+ if (part.at(part.length() - 1) == '-') {
+ return false;
+ }
+ for (const auto& character : part) {
+ if ((character < 'A' || character > 'Z') && (character < 'a' || character > 'z') &&
+ (character < '0' || character > '9') && character != '-') {
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+namespace {
+
+inline int OneCharLen(const char* src) {
+ return "\1\1\1\1\1\1\1\1\1\1\1\1\2\2\3\4"[(*src & 0xFF) >> 4];
+}
+
+inline int UTF8FirstLetterNumBytes(const char *utf8_str, int str_len) {
+ if (str_len == 0)
+ return 0;
+ return OneCharLen(utf8_str);
+}
+
+inline size_t Utf8Len(const string& narrow_string) {
+ const char* str_char = narrow_string.c_str();
+ ptrdiff_t byte_len = narrow_string.length();
+ size_t unicode_len = 0;
+ int char_len = 1;
+ while (byte_len > 0 && char_len > 0) {
+ char_len = UTF8FirstLetterNumBytes(str_char, byte_len);
+ str_char += char_len;
+ byte_len -= char_len;
+ ++unicode_len;
+ }
+ return unicode_len;
+}
+
+} // namespace
+
+} // namespace pgv
+
+#endif // _VALIDATE_H
diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go
new file mode 100644
index 000000000..6df95e89e
--- /dev/null
+++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go
@@ -0,0 +1,4106 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.30.0
+// protoc v3.21.12
+// source: validate/validate.proto
+
+package validate
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ durationpb "google.golang.org/protobuf/types/known/durationpb"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// WellKnownRegex contain some well-known patterns.
+type KnownRegex int32
+
+const (
+ KnownRegex_UNKNOWN KnownRegex = 0
+ // HTTP header name as defined by RFC 7230.
+ KnownRegex_HTTP_HEADER_NAME KnownRegex = 1
+ // HTTP header value as defined by RFC 7230.
+ KnownRegex_HTTP_HEADER_VALUE KnownRegex = 2
+)
+
+// Enum value maps for KnownRegex.
+var (
+ KnownRegex_name = map[int32]string{
+ 0: "UNKNOWN",
+ 1: "HTTP_HEADER_NAME",
+ 2: "HTTP_HEADER_VALUE",
+ }
+ KnownRegex_value = map[string]int32{
+ "UNKNOWN": 0,
+ "HTTP_HEADER_NAME": 1,
+ "HTTP_HEADER_VALUE": 2,
+ }
+)
+
+func (x KnownRegex) Enum() *KnownRegex {
+ p := new(KnownRegex)
+ *p = x
+ return p
+}
+
+func (x KnownRegex) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (KnownRegex) Descriptor() protoreflect.EnumDescriptor {
+ return file_validate_validate_proto_enumTypes[0].Descriptor()
+}
+
+func (KnownRegex) Type() protoreflect.EnumType {
+ return &file_validate_validate_proto_enumTypes[0]
+}
+
+func (x KnownRegex) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Do not use.
+func (x *KnownRegex) UnmarshalJSON(b []byte) error {
+ num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b)
+ if err != nil {
+ return err
+ }
+ *x = KnownRegex(num)
+ return nil
+}
+
+// Deprecated: Use KnownRegex.Descriptor instead.
+func (KnownRegex) EnumDescriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{0}
+}
+
+// FieldRules encapsulates the rules for each type of field. Depending on the
+// field, the correct set should be used to ensure proper validations.
+type FieldRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Message *MessageRules `protobuf:"bytes,17,opt,name=message" json:"message,omitempty"`
+ // Types that are assignable to Type:
+ //
+ // *FieldRules_Float
+ // *FieldRules_Double
+ // *FieldRules_Int32
+ // *FieldRules_Int64
+ // *FieldRules_Uint32
+ // *FieldRules_Uint64
+ // *FieldRules_Sint32
+ // *FieldRules_Sint64
+ // *FieldRules_Fixed32
+ // *FieldRules_Fixed64
+ // *FieldRules_Sfixed32
+ // *FieldRules_Sfixed64
+ // *FieldRules_Bool
+ // *FieldRules_String_
+ // *FieldRules_Bytes
+ // *FieldRules_Enum
+ // *FieldRules_Repeated
+ // *FieldRules_Map
+ // *FieldRules_Any
+ // *FieldRules_Duration
+ // *FieldRules_Timestamp
+ Type isFieldRules_Type `protobuf_oneof:"type"`
+}
+
+func (x *FieldRules) Reset() {
+ *x = FieldRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FieldRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FieldRules) ProtoMessage() {}
+
+func (x *FieldRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FieldRules.ProtoReflect.Descriptor instead.
+func (*FieldRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *FieldRules) GetMessage() *MessageRules {
+ if x != nil {
+ return x.Message
+ }
+ return nil
+}
+
+func (m *FieldRules) GetType() isFieldRules_Type {
+ if m != nil {
+ return m.Type
+ }
+ return nil
+}
+
+func (x *FieldRules) GetFloat() *FloatRules {
+ if x, ok := x.GetType().(*FieldRules_Float); ok {
+ return x.Float
+ }
+ return nil
+}
+
+func (x *FieldRules) GetDouble() *DoubleRules {
+ if x, ok := x.GetType().(*FieldRules_Double); ok {
+ return x.Double
+ }
+ return nil
+}
+
+func (x *FieldRules) GetInt32() *Int32Rules {
+ if x, ok := x.GetType().(*FieldRules_Int32); ok {
+ return x.Int32
+ }
+ return nil
+}
+
+func (x *FieldRules) GetInt64() *Int64Rules {
+ if x, ok := x.GetType().(*FieldRules_Int64); ok {
+ return x.Int64
+ }
+ return nil
+}
+
+func (x *FieldRules) GetUint32() *UInt32Rules {
+ if x, ok := x.GetType().(*FieldRules_Uint32); ok {
+ return x.Uint32
+ }
+ return nil
+}
+
+func (x *FieldRules) GetUint64() *UInt64Rules {
+ if x, ok := x.GetType().(*FieldRules_Uint64); ok {
+ return x.Uint64
+ }
+ return nil
+}
+
+func (x *FieldRules) GetSint32() *SInt32Rules {
+ if x, ok := x.GetType().(*FieldRules_Sint32); ok {
+ return x.Sint32
+ }
+ return nil
+}
+
+func (x *FieldRules) GetSint64() *SInt64Rules {
+ if x, ok := x.GetType().(*FieldRules_Sint64); ok {
+ return x.Sint64
+ }
+ return nil
+}
+
+func (x *FieldRules) GetFixed32() *Fixed32Rules {
+ if x, ok := x.GetType().(*FieldRules_Fixed32); ok {
+ return x.Fixed32
+ }
+ return nil
+}
+
+func (x *FieldRules) GetFixed64() *Fixed64Rules {
+ if x, ok := x.GetType().(*FieldRules_Fixed64); ok {
+ return x.Fixed64
+ }
+ return nil
+}
+
+func (x *FieldRules) GetSfixed32() *SFixed32Rules {
+ if x, ok := x.GetType().(*FieldRules_Sfixed32); ok {
+ return x.Sfixed32
+ }
+ return nil
+}
+
+func (x *FieldRules) GetSfixed64() *SFixed64Rules {
+ if x, ok := x.GetType().(*FieldRules_Sfixed64); ok {
+ return x.Sfixed64
+ }
+ return nil
+}
+
+func (x *FieldRules) GetBool() *BoolRules {
+ if x, ok := x.GetType().(*FieldRules_Bool); ok {
+ return x.Bool
+ }
+ return nil
+}
+
+func (x *FieldRules) GetString_() *StringRules {
+ if x, ok := x.GetType().(*FieldRules_String_); ok {
+ return x.String_
+ }
+ return nil
+}
+
+func (x *FieldRules) GetBytes() *BytesRules {
+ if x, ok := x.GetType().(*FieldRules_Bytes); ok {
+ return x.Bytes
+ }
+ return nil
+}
+
+func (x *FieldRules) GetEnum() *EnumRules {
+ if x, ok := x.GetType().(*FieldRules_Enum); ok {
+ return x.Enum
+ }
+ return nil
+}
+
+func (x *FieldRules) GetRepeated() *RepeatedRules {
+ if x, ok := x.GetType().(*FieldRules_Repeated); ok {
+ return x.Repeated
+ }
+ return nil
+}
+
+func (x *FieldRules) GetMap() *MapRules {
+ if x, ok := x.GetType().(*FieldRules_Map); ok {
+ return x.Map
+ }
+ return nil
+}
+
+func (x *FieldRules) GetAny() *AnyRules {
+ if x, ok := x.GetType().(*FieldRules_Any); ok {
+ return x.Any
+ }
+ return nil
+}
+
+func (x *FieldRules) GetDuration() *DurationRules {
+ if x, ok := x.GetType().(*FieldRules_Duration); ok {
+ return x.Duration
+ }
+ return nil
+}
+
+func (x *FieldRules) GetTimestamp() *TimestampRules {
+ if x, ok := x.GetType().(*FieldRules_Timestamp); ok {
+ return x.Timestamp
+ }
+ return nil
+}
+
+type isFieldRules_Type interface {
+ isFieldRules_Type()
+}
+
+type FieldRules_Float struct {
+ // Scalar Field Types
+ Float *FloatRules `protobuf:"bytes,1,opt,name=float,oneof"`
+}
+
+type FieldRules_Double struct {
+ Double *DoubleRules `protobuf:"bytes,2,opt,name=double,oneof"`
+}
+
+type FieldRules_Int32 struct {
+ Int32 *Int32Rules `protobuf:"bytes,3,opt,name=int32,oneof"`
+}
+
+type FieldRules_Int64 struct {
+ Int64 *Int64Rules `protobuf:"bytes,4,opt,name=int64,oneof"`
+}
+
+type FieldRules_Uint32 struct {
+ Uint32 *UInt32Rules `protobuf:"bytes,5,opt,name=uint32,oneof"`
+}
+
+type FieldRules_Uint64 struct {
+ Uint64 *UInt64Rules `protobuf:"bytes,6,opt,name=uint64,oneof"`
+}
+
+type FieldRules_Sint32 struct {
+ Sint32 *SInt32Rules `protobuf:"bytes,7,opt,name=sint32,oneof"`
+}
+
+type FieldRules_Sint64 struct {
+ Sint64 *SInt64Rules `protobuf:"bytes,8,opt,name=sint64,oneof"`
+}
+
+type FieldRules_Fixed32 struct {
+ Fixed32 *Fixed32Rules `protobuf:"bytes,9,opt,name=fixed32,oneof"`
+}
+
+type FieldRules_Fixed64 struct {
+ Fixed64 *Fixed64Rules `protobuf:"bytes,10,opt,name=fixed64,oneof"`
+}
+
+type FieldRules_Sfixed32 struct {
+ Sfixed32 *SFixed32Rules `protobuf:"bytes,11,opt,name=sfixed32,oneof"`
+}
+
+type FieldRules_Sfixed64 struct {
+ Sfixed64 *SFixed64Rules `protobuf:"bytes,12,opt,name=sfixed64,oneof"`
+}
+
+type FieldRules_Bool struct {
+ Bool *BoolRules `protobuf:"bytes,13,opt,name=bool,oneof"`
+}
+
+type FieldRules_String_ struct {
+ String_ *StringRules `protobuf:"bytes,14,opt,name=string,oneof"`
+}
+
+type FieldRules_Bytes struct {
+ Bytes *BytesRules `protobuf:"bytes,15,opt,name=bytes,oneof"`
+}
+
+type FieldRules_Enum struct {
+ // Complex Field Types
+ Enum *EnumRules `protobuf:"bytes,16,opt,name=enum,oneof"`
+}
+
+type FieldRules_Repeated struct {
+ Repeated *RepeatedRules `protobuf:"bytes,18,opt,name=repeated,oneof"`
+}
+
+type FieldRules_Map struct {
+ Map *MapRules `protobuf:"bytes,19,opt,name=map,oneof"`
+}
+
+type FieldRules_Any struct {
+ // Well-Known Field Types
+ Any *AnyRules `protobuf:"bytes,20,opt,name=any,oneof"`
+}
+
+type FieldRules_Duration struct {
+ Duration *DurationRules `protobuf:"bytes,21,opt,name=duration,oneof"`
+}
+
+type FieldRules_Timestamp struct {
+ Timestamp *TimestampRules `protobuf:"bytes,22,opt,name=timestamp,oneof"`
+}
+
+func (*FieldRules_Float) isFieldRules_Type() {}
+
+func (*FieldRules_Double) isFieldRules_Type() {}
+
+func (*FieldRules_Int32) isFieldRules_Type() {}
+
+func (*FieldRules_Int64) isFieldRules_Type() {}
+
+func (*FieldRules_Uint32) isFieldRules_Type() {}
+
+func (*FieldRules_Uint64) isFieldRules_Type() {}
+
+func (*FieldRules_Sint32) isFieldRules_Type() {}
+
+func (*FieldRules_Sint64) isFieldRules_Type() {}
+
+func (*FieldRules_Fixed32) isFieldRules_Type() {}
+
+func (*FieldRules_Fixed64) isFieldRules_Type() {}
+
+func (*FieldRules_Sfixed32) isFieldRules_Type() {}
+
+func (*FieldRules_Sfixed64) isFieldRules_Type() {}
+
+func (*FieldRules_Bool) isFieldRules_Type() {}
+
+func (*FieldRules_String_) isFieldRules_Type() {}
+
+func (*FieldRules_Bytes) isFieldRules_Type() {}
+
+func (*FieldRules_Enum) isFieldRules_Type() {}
+
+func (*FieldRules_Repeated) isFieldRules_Type() {}
+
+func (*FieldRules_Map) isFieldRules_Type() {}
+
+func (*FieldRules_Any) isFieldRules_Type() {}
+
+func (*FieldRules_Duration) isFieldRules_Type() {}
+
+func (*FieldRules_Timestamp) isFieldRules_Type() {}
+
+// FloatRules describes the constraints applied to `float` values
+type FloatRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *float32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *float32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *float32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *float32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *float32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []float32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []float32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *FloatRules) Reset() {
+ *x = FloatRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FloatRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FloatRules) ProtoMessage() {}
+
+func (x *FloatRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use FloatRules.ProtoReflect.Descriptor instead.
+func (*FloatRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *FloatRules) GetConst() float32 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *FloatRules) GetLt() float32 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *FloatRules) GetLte() float32 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *FloatRules) GetGt() float32 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *FloatRules) GetGte() float32 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *FloatRules) GetIn() []float32 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *FloatRules) GetNotIn() []float32 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *FloatRules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// DoubleRules describes the constraints applied to `double` values
+type DoubleRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *float64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *float64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *float64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *float64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *float64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []float64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []float64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *DoubleRules) Reset() {
+ *x = DoubleRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DoubleRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DoubleRules) ProtoMessage() {}
+
+func (x *DoubleRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DoubleRules.ProtoReflect.Descriptor instead.
+func (*DoubleRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DoubleRules) GetConst() float64 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *DoubleRules) GetLt() float64 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *DoubleRules) GetLte() float64 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *DoubleRules) GetGt() float64 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *DoubleRules) GetGte() float64 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *DoubleRules) GetIn() []float64 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *DoubleRules) GetNotIn() []float64 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *DoubleRules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// Int32Rules describes the constraints applied to `int32` values
+type Int32Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *int32 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *int32 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *int32 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *int32 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []int32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []int32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *Int32Rules) Reset() {
+ *x = Int32Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int32Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int32Rules) ProtoMessage() {}
+
+func (x *Int32Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int32Rules.ProtoReflect.Descriptor instead.
+func (*Int32Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *Int32Rules) GetConst() int32 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *Int32Rules) GetLt() int32 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *Int32Rules) GetLte() int32 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *Int32Rules) GetGt() int32 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *Int32Rules) GetGte() int32 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *Int32Rules) GetIn() []int32 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *Int32Rules) GetNotIn() []int32 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *Int32Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// Int64Rules describes the constraints applied to `int64` values
+type Int64Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *int64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *int64 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *int64 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *int64 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *int64 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []int64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []int64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *Int64Rules) Reset() {
+ *x = Int64Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Int64Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Int64Rules) ProtoMessage() {}
+
+func (x *Int64Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead.
+func (*Int64Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *Int64Rules) GetConst() int64 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetLt() int64 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetLte() int64 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetGt() int64 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetGte() int64 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *Int64Rules) GetIn() []int64 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *Int64Rules) GetNotIn() []int64 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *Int64Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// UInt32Rules describes the constraints applied to `uint32` values
+type UInt32Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *uint32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *uint32 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *uint32 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *uint32 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *uint32 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []uint32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []uint32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *UInt32Rules) Reset() {
+ *x = UInt32Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UInt32Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UInt32Rules) ProtoMessage() {}
+
+func (x *UInt32Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UInt32Rules.ProtoReflect.Descriptor instead.
+func (*UInt32Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *UInt32Rules) GetConst() uint32 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *UInt32Rules) GetLt() uint32 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *UInt32Rules) GetLte() uint32 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *UInt32Rules) GetGt() uint32 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *UInt32Rules) GetGte() uint32 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *UInt32Rules) GetIn() []uint32 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *UInt32Rules) GetNotIn() []uint32 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *UInt32Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// UInt64Rules describes the constraints applied to `uint64` values
+type UInt64Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *uint64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *uint64 `protobuf:"varint,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *uint64 `protobuf:"varint,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *uint64 `protobuf:"varint,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *uint64 `protobuf:"varint,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []uint64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []uint64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *UInt64Rules) Reset() {
+ *x = UInt64Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UInt64Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UInt64Rules) ProtoMessage() {}
+
+func (x *UInt64Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UInt64Rules.ProtoReflect.Descriptor instead.
+func (*UInt64Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *UInt64Rules) GetConst() uint64 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *UInt64Rules) GetLt() uint64 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *UInt64Rules) GetLte() uint64 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *UInt64Rules) GetGt() uint64 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *UInt64Rules) GetGte() uint64 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *UInt64Rules) GetIn() []uint64 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *UInt64Rules) GetNotIn() []uint64 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *UInt64Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// SInt32Rules describes the constraints applied to `sint32` values
+type SInt32Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *int32 `protobuf:"zigzag32,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *int32 `protobuf:"zigzag32,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *int32 `protobuf:"zigzag32,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *int32 `protobuf:"zigzag32,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *int32 `protobuf:"zigzag32,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []int32 `protobuf:"zigzag32,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []int32 `protobuf:"zigzag32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *SInt32Rules) Reset() {
+ *x = SInt32Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SInt32Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SInt32Rules) ProtoMessage() {}
+
+func (x *SInt32Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SInt32Rules.ProtoReflect.Descriptor instead.
+func (*SInt32Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *SInt32Rules) GetConst() int32 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *SInt32Rules) GetLt() int32 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *SInt32Rules) GetLte() int32 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *SInt32Rules) GetGt() int32 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *SInt32Rules) GetGte() int32 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *SInt32Rules) GetIn() []int32 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *SInt32Rules) GetNotIn() []int32 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *SInt32Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// SInt64Rules describes the constraints applied to `sint64` values
+type SInt64Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *int64 `protobuf:"zigzag64,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *int64 `protobuf:"zigzag64,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *int64 `protobuf:"zigzag64,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *int64 `protobuf:"zigzag64,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *int64 `protobuf:"zigzag64,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []int64 `protobuf:"zigzag64,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []int64 `protobuf:"zigzag64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *SInt64Rules) Reset() {
+ *x = SInt64Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SInt64Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SInt64Rules) ProtoMessage() {}
+
+func (x *SInt64Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SInt64Rules.ProtoReflect.Descriptor instead.
+func (*SInt64Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *SInt64Rules) GetConst() int64 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *SInt64Rules) GetLt() int64 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *SInt64Rules) GetLte() int64 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *SInt64Rules) GetGt() int64 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *SInt64Rules) GetGte() int64 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *SInt64Rules) GetIn() []int64 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *SInt64Rules) GetNotIn() []int64 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *SInt64Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// Fixed32Rules describes the constraints applied to `fixed32` values
+type Fixed32Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *uint32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *uint32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *uint32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *uint32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *uint32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []uint32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []uint32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *Fixed32Rules) Reset() {
+ *x = Fixed32Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Fixed32Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Fixed32Rules) ProtoMessage() {}
+
+func (x *Fixed32Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Fixed32Rules.ProtoReflect.Descriptor instead.
+func (*Fixed32Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *Fixed32Rules) GetConst() uint32 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *Fixed32Rules) GetLt() uint32 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *Fixed32Rules) GetLte() uint32 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *Fixed32Rules) GetGt() uint32 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *Fixed32Rules) GetGte() uint32 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *Fixed32Rules) GetIn() []uint32 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *Fixed32Rules) GetNotIn() []uint32 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *Fixed32Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// Fixed64Rules describes the constraints applied to `fixed64` values
+type Fixed64Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *uint64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *uint64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *uint64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *uint64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *uint64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []uint64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []uint64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *Fixed64Rules) Reset() {
+ *x = Fixed64Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Fixed64Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Fixed64Rules) ProtoMessage() {}
+
+func (x *Fixed64Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use Fixed64Rules.ProtoReflect.Descriptor instead.
+func (*Fixed64Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *Fixed64Rules) GetConst() uint64 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *Fixed64Rules) GetLt() uint64 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *Fixed64Rules) GetLte() uint64 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *Fixed64Rules) GetGt() uint64 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *Fixed64Rules) GetGte() uint64 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *Fixed64Rules) GetIn() []uint64 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *Fixed64Rules) GetNotIn() []uint64 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *Fixed64Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// SFixed32Rules describes the constraints applied to `sfixed32` values
+type SFixed32Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *int32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *int32 `protobuf:"fixed32,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *int32 `protobuf:"fixed32,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *int32 `protobuf:"fixed32,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *int32 `protobuf:"fixed32,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []int32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []int32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *SFixed32Rules) Reset() {
+ *x = SFixed32Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SFixed32Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SFixed32Rules) ProtoMessage() {}
+
+func (x *SFixed32Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SFixed32Rules.ProtoReflect.Descriptor instead.
+func (*SFixed32Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *SFixed32Rules) GetConst() int32 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *SFixed32Rules) GetLt() int32 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *SFixed32Rules) GetLte() int32 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *SFixed32Rules) GetGt() int32 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *SFixed32Rules) GetGte() int32 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *SFixed32Rules) GetIn() []int32 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *SFixed32Rules) GetNotIn() []int32 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *SFixed32Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// SFixed64Rules describes the constraints applied to `sfixed64` values
+type SFixed64Rules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *int64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *int64 `protobuf:"fixed64,2,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ Lte *int64 `protobuf:"fixed64,3,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ Gt *int64 `protobuf:"fixed64,4,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ Gte *int64 `protobuf:"fixed64,5,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []int64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []int64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *SFixed64Rules) Reset() {
+ *x = SFixed64Rules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SFixed64Rules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SFixed64Rules) ProtoMessage() {}
+
+func (x *SFixed64Rules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use SFixed64Rules.ProtoReflect.Descriptor instead.
+func (*SFixed64Rules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *SFixed64Rules) GetConst() int64 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *SFixed64Rules) GetLt() int64 {
+ if x != nil && x.Lt != nil {
+ return *x.Lt
+ }
+ return 0
+}
+
+func (x *SFixed64Rules) GetLte() int64 {
+ if x != nil && x.Lte != nil {
+ return *x.Lte
+ }
+ return 0
+}
+
+func (x *SFixed64Rules) GetGt() int64 {
+ if x != nil && x.Gt != nil {
+ return *x.Gt
+ }
+ return 0
+}
+
+func (x *SFixed64Rules) GetGte() int64 {
+ if x != nil && x.Gte != nil {
+ return *x.Gte
+ }
+ return 0
+}
+
+func (x *SFixed64Rules) GetIn() []int64 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *SFixed64Rules) GetNotIn() []int64 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (x *SFixed64Rules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// BoolRules describes the constraints applied to `bool` values
+type BoolRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *bool `protobuf:"varint,1,opt,name=const" json:"const,omitempty"`
+}
+
+func (x *BoolRules) Reset() {
+ *x = BoolRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BoolRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BoolRules) ProtoMessage() {}
+
+func (x *BoolRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[13]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BoolRules.ProtoReflect.Descriptor instead.
+func (*BoolRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *BoolRules) GetConst() bool {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return false
+}
+
+// StringRules describe the constraints applied to `string` values
+type StringRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *string `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"`
+ // Len specifies that this field must be the specified number of
+ // characters (Unicode code points). Note that the number of
+ // characters may differ from the number of bytes in the string.
+ Len *uint64 `protobuf:"varint,19,opt,name=len" json:"len,omitempty"`
+ // MinLen specifies that this field must be the specified number of
+ // characters (Unicode code points) at a minimum. Note that the number of
+ // characters may differ from the number of bytes in the string.
+ MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"`
+ // MaxLen specifies that this field must be the specified number of
+ // characters (Unicode code points) at a maximum. Note that the number of
+ // characters may differ from the number of bytes in the string.
+ MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"`
+ // LenBytes specifies that this field must be the specified number of bytes
+ LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"`
+ // MinBytes specifies that this field must be the specified number of bytes
+ // at a minimum
+ MinBytes *uint64 `protobuf:"varint,4,opt,name=min_bytes,json=minBytes" json:"min_bytes,omitempty"`
+ // MaxBytes specifies that this field must be the specified number of bytes
+ // at a maximum
+ MaxBytes *uint64 `protobuf:"varint,5,opt,name=max_bytes,json=maxBytes" json:"max_bytes,omitempty"`
+ // Pattern specifies that this field must match against the specified
+ // regular expression (RE2 syntax). The included expression should elide
+ // any delimiters.
+ Pattern *string `protobuf:"bytes,6,opt,name=pattern" json:"pattern,omitempty"`
+ // Prefix specifies that this field must have the specified substring at
+ // the beginning of the string.
+ Prefix *string `protobuf:"bytes,7,opt,name=prefix" json:"prefix,omitempty"`
+ // Suffix specifies that this field must have the specified substring at
+ // the end of the string.
+ Suffix *string `protobuf:"bytes,8,opt,name=suffix" json:"suffix,omitempty"`
+ // Contains specifies that this field must have the specified substring
+ // anywhere in the string.
+ Contains *string `protobuf:"bytes,9,opt,name=contains" json:"contains,omitempty"`
+ // NotContains specifies that this field cannot have the specified substring
+ // anywhere in the string.
+ NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains" json:"not_contains,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []string `protobuf:"bytes,10,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []string `protobuf:"bytes,11,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // WellKnown rules provide advanced constraints against common string
+ // patterns
+ //
+ // Types that are assignable to WellKnown:
+ //
+ // *StringRules_Email
+ // *StringRules_Hostname
+ // *StringRules_Ip
+ // *StringRules_Ipv4
+ // *StringRules_Ipv6
+ // *StringRules_Uri
+ // *StringRules_UriRef
+ // *StringRules_Address
+ // *StringRules_Uuid
+ // *StringRules_WellKnownRegex
+ WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"`
+ // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
+ // strict header validation.
+ // By default, this is true, and HTTP header validations are RFC-compliant.
+ // Setting to false will enable a looser validations that only disallows
+ // \r\n\0 characters, which can be used to bypass header matching rules.
+ Strict *bool `protobuf:"varint,25,opt,name=strict,def=1" json:"strict,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,26,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+// Default values for StringRules fields.
+const (
+ Default_StringRules_Strict = bool(true)
+)
+
+func (x *StringRules) Reset() {
+ *x = StringRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StringRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StringRules) ProtoMessage() {}
+
+func (x *StringRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[14]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use StringRules.ProtoReflect.Descriptor instead.
+func (*StringRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *StringRules) GetConst() string {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return ""
+}
+
+func (x *StringRules) GetLen() uint64 {
+ if x != nil && x.Len != nil {
+ return *x.Len
+ }
+ return 0
+}
+
+func (x *StringRules) GetMinLen() uint64 {
+ if x != nil && x.MinLen != nil {
+ return *x.MinLen
+ }
+ return 0
+}
+
+func (x *StringRules) GetMaxLen() uint64 {
+ if x != nil && x.MaxLen != nil {
+ return *x.MaxLen
+ }
+ return 0
+}
+
+func (x *StringRules) GetLenBytes() uint64 {
+ if x != nil && x.LenBytes != nil {
+ return *x.LenBytes
+ }
+ return 0
+}
+
+func (x *StringRules) GetMinBytes() uint64 {
+ if x != nil && x.MinBytes != nil {
+ return *x.MinBytes
+ }
+ return 0
+}
+
+func (x *StringRules) GetMaxBytes() uint64 {
+ if x != nil && x.MaxBytes != nil {
+ return *x.MaxBytes
+ }
+ return 0
+}
+
+func (x *StringRules) GetPattern() string {
+ if x != nil && x.Pattern != nil {
+ return *x.Pattern
+ }
+ return ""
+}
+
+func (x *StringRules) GetPrefix() string {
+ if x != nil && x.Prefix != nil {
+ return *x.Prefix
+ }
+ return ""
+}
+
+func (x *StringRules) GetSuffix() string {
+ if x != nil && x.Suffix != nil {
+ return *x.Suffix
+ }
+ return ""
+}
+
+func (x *StringRules) GetContains() string {
+ if x != nil && x.Contains != nil {
+ return *x.Contains
+ }
+ return ""
+}
+
+func (x *StringRules) GetNotContains() string {
+ if x != nil && x.NotContains != nil {
+ return *x.NotContains
+ }
+ return ""
+}
+
+func (x *StringRules) GetIn() []string {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *StringRules) GetNotIn() []string {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (m *StringRules) GetWellKnown() isStringRules_WellKnown {
+ if m != nil {
+ return m.WellKnown
+ }
+ return nil
+}
+
+func (x *StringRules) GetEmail() bool {
+ if x, ok := x.GetWellKnown().(*StringRules_Email); ok {
+ return x.Email
+ }
+ return false
+}
+
+func (x *StringRules) GetHostname() bool {
+ if x, ok := x.GetWellKnown().(*StringRules_Hostname); ok {
+ return x.Hostname
+ }
+ return false
+}
+
+func (x *StringRules) GetIp() bool {
+ if x, ok := x.GetWellKnown().(*StringRules_Ip); ok {
+ return x.Ip
+ }
+ return false
+}
+
+func (x *StringRules) GetIpv4() bool {
+ if x, ok := x.GetWellKnown().(*StringRules_Ipv4); ok {
+ return x.Ipv4
+ }
+ return false
+}
+
+func (x *StringRules) GetIpv6() bool {
+ if x, ok := x.GetWellKnown().(*StringRules_Ipv6); ok {
+ return x.Ipv6
+ }
+ return false
+}
+
+func (x *StringRules) GetUri() bool {
+ if x, ok := x.GetWellKnown().(*StringRules_Uri); ok {
+ return x.Uri
+ }
+ return false
+}
+
+func (x *StringRules) GetUriRef() bool {
+ if x, ok := x.GetWellKnown().(*StringRules_UriRef); ok {
+ return x.UriRef
+ }
+ return false
+}
+
+func (x *StringRules) GetAddress() bool {
+ if x, ok := x.GetWellKnown().(*StringRules_Address); ok {
+ return x.Address
+ }
+ return false
+}
+
+func (x *StringRules) GetUuid() bool {
+ if x, ok := x.GetWellKnown().(*StringRules_Uuid); ok {
+ return x.Uuid
+ }
+ return false
+}
+
+func (x *StringRules) GetWellKnownRegex() KnownRegex {
+ if x, ok := x.GetWellKnown().(*StringRules_WellKnownRegex); ok {
+ return x.WellKnownRegex
+ }
+ return KnownRegex_UNKNOWN
+}
+
+func (x *StringRules) GetStrict() bool {
+ if x != nil && x.Strict != nil {
+ return *x.Strict
+ }
+ return Default_StringRules_Strict
+}
+
+func (x *StringRules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+type isStringRules_WellKnown interface {
+ isStringRules_WellKnown()
+}
+
+type StringRules_Email struct {
+ // Email specifies that the field must be a valid email address as
+ // defined by RFC 5322
+ Email bool `protobuf:"varint,12,opt,name=email,oneof"`
+}
+
+type StringRules_Hostname struct {
+ // Hostname specifies that the field must be a valid hostname as
+ // defined by RFC 1034. This constraint does not support
+ // internationalized domain names (IDNs).
+ Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"`
+}
+
+type StringRules_Ip struct {
+ // Ip specifies that the field must be a valid IP (v4 or v6) address.
+ // Valid IPv6 addresses should not include surrounding square brackets.
+ Ip bool `protobuf:"varint,14,opt,name=ip,oneof"`
+}
+
+type StringRules_Ipv4 struct {
+ // Ipv4 specifies that the field must be a valid IPv4 address.
+ Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"`
+}
+
+type StringRules_Ipv6 struct {
+ // Ipv6 specifies that the field must be a valid IPv6 address. Valid
+ // IPv6 addresses should not include surrounding square brackets.
+ Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"`
+}
+
+type StringRules_Uri struct {
+ // Uri specifies that the field must be a valid, absolute URI as defined
+ // by RFC 3986
+ Uri bool `protobuf:"varint,17,opt,name=uri,oneof"`
+}
+
+type StringRules_UriRef struct {
+ // UriRef specifies that the field must be a valid URI as defined by RFC
+ // 3986 and may be relative or absolute.
+ UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,oneof"`
+}
+
+type StringRules_Address struct {
+ // Address specifies that the field must be either a valid hostname as
+ // defined by RFC 1034 (which does not support internationalized domain
+ // names or IDNs), or it can be a valid IP (v4 or v6).
+ Address bool `protobuf:"varint,21,opt,name=address,oneof"`
+}
+
+type StringRules_Uuid struct {
+ // Uuid specifies that the field must be a valid UUID as defined by
+ // RFC 4122
+ Uuid bool `protobuf:"varint,22,opt,name=uuid,oneof"`
+}
+
+type StringRules_WellKnownRegex struct {
+ // WellKnownRegex specifies a common well known pattern defined as a regex.
+ WellKnownRegex KnownRegex `protobuf:"varint,24,opt,name=well_known_regex,json=wellKnownRegex,enum=validate.KnownRegex,oneof"`
+}
+
+func (*StringRules_Email) isStringRules_WellKnown() {}
+
+func (*StringRules_Hostname) isStringRules_WellKnown() {}
+
+func (*StringRules_Ip) isStringRules_WellKnown() {}
+
+func (*StringRules_Ipv4) isStringRules_WellKnown() {}
+
+func (*StringRules_Ipv6) isStringRules_WellKnown() {}
+
+func (*StringRules_Uri) isStringRules_WellKnown() {}
+
+func (*StringRules_UriRef) isStringRules_WellKnown() {}
+
+func (*StringRules_Address) isStringRules_WellKnown() {}
+
+func (*StringRules_Uuid) isStringRules_WellKnown() {}
+
+func (*StringRules_WellKnownRegex) isStringRules_WellKnown() {}
+
+// BytesRules describe the constraints applied to `bytes` values
+type BytesRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const []byte `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"`
+ // Len specifies that this field must be the specified number of bytes
+ Len *uint64 `protobuf:"varint,13,opt,name=len" json:"len,omitempty"`
+ // MinLen specifies that this field must be the specified number of bytes
+ // at a minimum
+ MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"`
+ // MaxLen specifies that this field must be the specified number of bytes
+ // at a maximum
+ MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"`
+ // Pattern specifies that this field must match against the specified
+ // regular expression (RE2 syntax). The included expression should elide
+ // any delimiters.
+ Pattern *string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"`
+ // Prefix specifies that this field must have the specified bytes at the
+ // beginning of the string.
+ Prefix []byte `protobuf:"bytes,5,opt,name=prefix" json:"prefix,omitempty"`
+ // Suffix specifies that this field must have the specified bytes at the
+ // end of the string.
+ Suffix []byte `protobuf:"bytes,6,opt,name=suffix" json:"suffix,omitempty"`
+ // Contains specifies that this field must have the specified bytes
+ // anywhere in the string.
+ Contains []byte `protobuf:"bytes,7,opt,name=contains" json:"contains,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In [][]byte `protobuf:"bytes,8,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn [][]byte `protobuf:"bytes,9,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+ // WellKnown rules provide advanced constraints against common byte
+ // patterns
+ //
+ // Types that are assignable to WellKnown:
+ //
+ // *BytesRules_Ip
+ // *BytesRules_Ipv4
+ // *BytesRules_Ipv6
+ WellKnown isBytesRules_WellKnown `protobuf_oneof:"well_known"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,14,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *BytesRules) Reset() {
+ *x = BytesRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BytesRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BytesRules) ProtoMessage() {}
+
+func (x *BytesRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[15]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use BytesRules.ProtoReflect.Descriptor instead.
+func (*BytesRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *BytesRules) GetConst() []byte {
+ if x != nil {
+ return x.Const
+ }
+ return nil
+}
+
+func (x *BytesRules) GetLen() uint64 {
+ if x != nil && x.Len != nil {
+ return *x.Len
+ }
+ return 0
+}
+
+func (x *BytesRules) GetMinLen() uint64 {
+ if x != nil && x.MinLen != nil {
+ return *x.MinLen
+ }
+ return 0
+}
+
+func (x *BytesRules) GetMaxLen() uint64 {
+ if x != nil && x.MaxLen != nil {
+ return *x.MaxLen
+ }
+ return 0
+}
+
+func (x *BytesRules) GetPattern() string {
+ if x != nil && x.Pattern != nil {
+ return *x.Pattern
+ }
+ return ""
+}
+
+func (x *BytesRules) GetPrefix() []byte {
+ if x != nil {
+ return x.Prefix
+ }
+ return nil
+}
+
+func (x *BytesRules) GetSuffix() []byte {
+ if x != nil {
+ return x.Suffix
+ }
+ return nil
+}
+
+func (x *BytesRules) GetContains() []byte {
+ if x != nil {
+ return x.Contains
+ }
+ return nil
+}
+
+func (x *BytesRules) GetIn() [][]byte {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *BytesRules) GetNotIn() [][]byte {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+func (m *BytesRules) GetWellKnown() isBytesRules_WellKnown {
+ if m != nil {
+ return m.WellKnown
+ }
+ return nil
+}
+
+func (x *BytesRules) GetIp() bool {
+ if x, ok := x.GetWellKnown().(*BytesRules_Ip); ok {
+ return x.Ip
+ }
+ return false
+}
+
+func (x *BytesRules) GetIpv4() bool {
+ if x, ok := x.GetWellKnown().(*BytesRules_Ipv4); ok {
+ return x.Ipv4
+ }
+ return false
+}
+
+func (x *BytesRules) GetIpv6() bool {
+ if x, ok := x.GetWellKnown().(*BytesRules_Ipv6); ok {
+ return x.Ipv6
+ }
+ return false
+}
+
+func (x *BytesRules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+type isBytesRules_WellKnown interface {
+ isBytesRules_WellKnown()
+}
+
+type BytesRules_Ip struct {
+ // Ip specifies that the field must be a valid IP (v4 or v6) address in
+ // byte format
+ Ip bool `protobuf:"varint,10,opt,name=ip,oneof"`
+}
+
+type BytesRules_Ipv4 struct {
+ // Ipv4 specifies that the field must be a valid IPv4 address in byte
+ // format
+ Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"`
+}
+
+type BytesRules_Ipv6 struct {
+ // Ipv6 specifies that the field must be a valid IPv6 address in byte
+ // format
+ Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"`
+}
+
+func (*BytesRules_Ip) isBytesRules_WellKnown() {}
+
+func (*BytesRules_Ipv4) isBytesRules_WellKnown() {}
+
+func (*BytesRules_Ipv6) isBytesRules_WellKnown() {}
+
+// EnumRules describe the constraints applied to enum values
+type EnumRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Const specifies that this field must be exactly the specified value
+ Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"`
+ // DefinedOnly specifies that this field must be only one of the defined
+ // values for this enum, failing on any undefined value.
+ DefinedOnly *bool `protobuf:"varint,2,opt,name=defined_only,json=definedOnly" json:"defined_only,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []int32 `protobuf:"varint,3,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []int32 `protobuf:"varint,4,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+}
+
+func (x *EnumRules) Reset() {
+ *x = EnumRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *EnumRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EnumRules) ProtoMessage() {}
+
+func (x *EnumRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[16]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use EnumRules.ProtoReflect.Descriptor instead.
+func (*EnumRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *EnumRules) GetConst() int32 {
+ if x != nil && x.Const != nil {
+ return *x.Const
+ }
+ return 0
+}
+
+func (x *EnumRules) GetDefinedOnly() bool {
+ if x != nil && x.DefinedOnly != nil {
+ return *x.DefinedOnly
+ }
+ return false
+}
+
+func (x *EnumRules) GetIn() []int32 {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *EnumRules) GetNotIn() []int32 {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+// MessageRules describe the constraints applied to embedded message values.
+// For message-type fields, validation is performed recursively.
+type MessageRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Skip specifies that the validation rules of this field should not be
+ // evaluated
+ Skip *bool `protobuf:"varint,1,opt,name=skip" json:"skip,omitempty"`
+ // Required specifies that this field must be set
+ Required *bool `protobuf:"varint,2,opt,name=required" json:"required,omitempty"`
+}
+
+func (x *MessageRules) Reset() {
+ *x = MessageRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MessageRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageRules) ProtoMessage() {}
+
+func (x *MessageRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[17]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MessageRules.ProtoReflect.Descriptor instead.
+func (*MessageRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *MessageRules) GetSkip() bool {
+ if x != nil && x.Skip != nil {
+ return *x.Skip
+ }
+ return false
+}
+
+func (x *MessageRules) GetRequired() bool {
+ if x != nil && x.Required != nil {
+ return *x.Required
+ }
+ return false
+}
+
+// RepeatedRules describe the constraints applied to `repeated` values
+type RepeatedRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // MinItems specifies that this field must have the specified number of
+ // items at a minimum
+ MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems" json:"min_items,omitempty"`
+ // MaxItems specifies that this field must have the specified number of
+ // items at a maximum
+ MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems" json:"max_items,omitempty"`
+ // Unique specifies that all elements in this field must be unique. This
+ // constraint is only applicable to scalar and enum types (messages are not
+ // supported).
+ Unique *bool `protobuf:"varint,3,opt,name=unique" json:"unique,omitempty"`
+ // Items specifies the constraints to be applied to each item in the field.
+ // Repeated message fields will still execute validation against each item
+ // unless skip is specified here.
+ Items *FieldRules `protobuf:"bytes,4,opt,name=items" json:"items,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,5,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *RepeatedRules) Reset() {
+ *x = RepeatedRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RepeatedRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepeatedRules) ProtoMessage() {}
+
+func (x *RepeatedRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[18]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead.
+func (*RepeatedRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *RepeatedRules) GetMinItems() uint64 {
+ if x != nil && x.MinItems != nil {
+ return *x.MinItems
+ }
+ return 0
+}
+
+func (x *RepeatedRules) GetMaxItems() uint64 {
+ if x != nil && x.MaxItems != nil {
+ return *x.MaxItems
+ }
+ return 0
+}
+
+func (x *RepeatedRules) GetUnique() bool {
+ if x != nil && x.Unique != nil {
+ return *x.Unique
+ }
+ return false
+}
+
+func (x *RepeatedRules) GetItems() *FieldRules {
+ if x != nil {
+ return x.Items
+ }
+ return nil
+}
+
+func (x *RepeatedRules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// MapRules describe the constraints applied to `map` values
+type MapRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // MinPairs specifies that this field must have the specified number of
+ // KVs at a minimum
+ MinPairs *uint64 `protobuf:"varint,1,opt,name=min_pairs,json=minPairs" json:"min_pairs,omitempty"`
+ // MaxPairs specifies that this field must have the specified number of
+ // KVs at a maximum
+ MaxPairs *uint64 `protobuf:"varint,2,opt,name=max_pairs,json=maxPairs" json:"max_pairs,omitempty"`
+ // NoSparse specifies values in this field cannot be unset. This only
+ // applies to map's with message value types.
+ NoSparse *bool `protobuf:"varint,3,opt,name=no_sparse,json=noSparse" json:"no_sparse,omitempty"`
+ // Keys specifies the constraints to be applied to each key in the field.
+ Keys *FieldRules `protobuf:"bytes,4,opt,name=keys" json:"keys,omitempty"`
+ // Values specifies the constraints to be applied to the value of each key
+ // in the field. Message values will still have their validations evaluated
+ // unless skip is specified here.
+ Values *FieldRules `protobuf:"bytes,5,opt,name=values" json:"values,omitempty"`
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ IgnoreEmpty *bool `protobuf:"varint,6,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"`
+}
+
+func (x *MapRules) Reset() {
+ *x = MapRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MapRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MapRules) ProtoMessage() {}
+
+func (x *MapRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[19]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use MapRules.ProtoReflect.Descriptor instead.
+func (*MapRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *MapRules) GetMinPairs() uint64 {
+ if x != nil && x.MinPairs != nil {
+ return *x.MinPairs
+ }
+ return 0
+}
+
+func (x *MapRules) GetMaxPairs() uint64 {
+ if x != nil && x.MaxPairs != nil {
+ return *x.MaxPairs
+ }
+ return 0
+}
+
+func (x *MapRules) GetNoSparse() bool {
+ if x != nil && x.NoSparse != nil {
+ return *x.NoSparse
+ }
+ return false
+}
+
+func (x *MapRules) GetKeys() *FieldRules {
+ if x != nil {
+ return x.Keys
+ }
+ return nil
+}
+
+func (x *MapRules) GetValues() *FieldRules {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+func (x *MapRules) GetIgnoreEmpty() bool {
+ if x != nil && x.IgnoreEmpty != nil {
+ return *x.IgnoreEmpty
+ }
+ return false
+}
+
+// AnyRules describe constraints applied exclusively to the
+// `google.protobuf.Any` well-known type
+type AnyRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Required specifies that this field must be set
+ Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
+ // In specifies that this field's `type_url` must be equal to one of the
+ // specified values.
+ In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field's `type_url` must not be equal to any of
+ // the specified values.
+ NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+}
+
+func (x *AnyRules) Reset() {
+ *x = AnyRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AnyRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AnyRules) ProtoMessage() {}
+
+func (x *AnyRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[20]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use AnyRules.ProtoReflect.Descriptor instead.
+func (*AnyRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *AnyRules) GetRequired() bool {
+ if x != nil && x.Required != nil {
+ return *x.Required
+ }
+ return false
+}
+
+func (x *AnyRules) GetIn() []string {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *AnyRules) GetNotIn() []string {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+// DurationRules describe the constraints applied exclusively to the
+// `google.protobuf.Duration` well-known type
+type DurationRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Required specifies that this field must be set
+ Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
+ // Const specifies that this field must be exactly the specified value
+ Const *durationpb.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *durationpb.Duration `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // inclusive
+ Lte *durationpb.Duration `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive
+ Gt *durationpb.Duration `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than the specified value,
+ // inclusive
+ Gte *durationpb.Duration `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"`
+ // In specifies that this field must be equal to one of the specified
+ // values
+ In []*durationpb.Duration `protobuf:"bytes,7,rep,name=in" json:"in,omitempty"`
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ NotIn []*durationpb.Duration `protobuf:"bytes,8,rep,name=not_in,json=notIn" json:"not_in,omitempty"`
+}
+
+func (x *DurationRules) Reset() {
+ *x = DurationRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DurationRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DurationRules) ProtoMessage() {}
+
+func (x *DurationRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[21]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DurationRules.ProtoReflect.Descriptor instead.
+func (*DurationRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *DurationRules) GetRequired() bool {
+ if x != nil && x.Required != nil {
+ return *x.Required
+ }
+ return false
+}
+
+func (x *DurationRules) GetConst() *durationpb.Duration {
+ if x != nil {
+ return x.Const
+ }
+ return nil
+}
+
+func (x *DurationRules) GetLt() *durationpb.Duration {
+ if x != nil {
+ return x.Lt
+ }
+ return nil
+}
+
+func (x *DurationRules) GetLte() *durationpb.Duration {
+ if x != nil {
+ return x.Lte
+ }
+ return nil
+}
+
+func (x *DurationRules) GetGt() *durationpb.Duration {
+ if x != nil {
+ return x.Gt
+ }
+ return nil
+}
+
+func (x *DurationRules) GetGte() *durationpb.Duration {
+ if x != nil {
+ return x.Gte
+ }
+ return nil
+}
+
+func (x *DurationRules) GetIn() []*durationpb.Duration {
+ if x != nil {
+ return x.In
+ }
+ return nil
+}
+
+func (x *DurationRules) GetNotIn() []*durationpb.Duration {
+ if x != nil {
+ return x.NotIn
+ }
+ return nil
+}
+
+// TimestampRules describe the constraints applied exclusively to the
+// `google.protobuf.Timestamp` well-known type
+type TimestampRules struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Required specifies that this field must be set
+ Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"`
+ // Const specifies that this field must be exactly the specified value
+ Const *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"`
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ Lt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"`
+ // Lte specifies that this field must be less than the specified value,
+ // inclusive
+ Lte *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"`
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive
+ Gt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"`
+ // Gte specifies that this field must be greater than the specified value,
+ // inclusive
+ Gte *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"`
+ // LtNow specifies that this must be less than the current time. LtNow
+ // can only be used with the Within rule.
+ LtNow *bool `protobuf:"varint,7,opt,name=lt_now,json=ltNow" json:"lt_now,omitempty"`
+ // GtNow specifies that this must be greater than the current time. GtNow
+ // can only be used with the Within rule.
+ GtNow *bool `protobuf:"varint,8,opt,name=gt_now,json=gtNow" json:"gt_now,omitempty"`
+ // Within specifies that this field must be within this duration of the
+ // current time. This constraint can be used alone or with the LtNow and
+ // GtNow rules.
+ Within *durationpb.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"`
+}
+
+func (x *TimestampRules) Reset() {
+ *x = TimestampRules{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_validate_validate_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TimestampRules) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TimestampRules) ProtoMessage() {}
+
+func (x *TimestampRules) ProtoReflect() protoreflect.Message {
+ mi := &file_validate_validate_proto_msgTypes[22]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TimestampRules.ProtoReflect.Descriptor instead.
+func (*TimestampRules) Descriptor() ([]byte, []int) {
+ return file_validate_validate_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *TimestampRules) GetRequired() bool {
+ if x != nil && x.Required != nil {
+ return *x.Required
+ }
+ return false
+}
+
+func (x *TimestampRules) GetConst() *timestamppb.Timestamp {
+ if x != nil {
+ return x.Const
+ }
+ return nil
+}
+
+func (x *TimestampRules) GetLt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.Lt
+ }
+ return nil
+}
+
+func (x *TimestampRules) GetLte() *timestamppb.Timestamp {
+ if x != nil {
+ return x.Lte
+ }
+ return nil
+}
+
+func (x *TimestampRules) GetGt() *timestamppb.Timestamp {
+ if x != nil {
+ return x.Gt
+ }
+ return nil
+}
+
+func (x *TimestampRules) GetGte() *timestamppb.Timestamp {
+ if x != nil {
+ return x.Gte
+ }
+ return nil
+}
+
+func (x *TimestampRules) GetLtNow() bool {
+ if x != nil && x.LtNow != nil {
+ return *x.LtNow
+ }
+ return false
+}
+
+func (x *TimestampRules) GetGtNow() bool {
+ if x != nil && x.GtNow != nil {
+ return *x.GtNow
+ }
+ return false
+}
+
+func (x *TimestampRules) GetWithin() *durationpb.Duration {
+ if x != nil {
+ return x.Within
+ }
+ return nil
+}
+
+var file_validate_validate_proto_extTypes = []protoimpl.ExtensionInfo{
+ {
+ ExtendedType: (*descriptorpb.MessageOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 1071,
+ Name: "validate.disabled",
+ Tag: "varint,1071,opt,name=disabled",
+ Filename: "validate/validate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.MessageOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 1072,
+ Name: "validate.ignored",
+ Tag: "varint,1072,opt,name=ignored",
+ Filename: "validate/validate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.OneofOptions)(nil),
+ ExtensionType: (*bool)(nil),
+ Field: 1071,
+ Name: "validate.required",
+ Tag: "varint,1071,opt,name=required",
+ Filename: "validate/validate.proto",
+ },
+ {
+ ExtendedType: (*descriptorpb.FieldOptions)(nil),
+ ExtensionType: (*FieldRules)(nil),
+ Field: 1071,
+ Name: "validate.rules",
+ Tag: "bytes,1071,opt,name=rules",
+ Filename: "validate/validate.proto",
+ },
+}
+
+// Extension fields to descriptorpb.MessageOptions.
+var (
+ // Disabled nullifies any validation rules for this message, including any
+ // message fields associated with it that do support validation.
+ //
+ // optional bool disabled = 1071;
+ E_Disabled = &file_validate_validate_proto_extTypes[0]
+ // Ignore skips generation of validation methods for this message.
+ //
+ // optional bool ignored = 1072;
+ E_Ignored = &file_validate_validate_proto_extTypes[1]
+)
+
+// Extension fields to descriptorpb.OneofOptions.
+var (
+ // Required ensures that exactly one the field options in a oneof is set;
+ // validation fails if no fields in the oneof are set.
+ //
+ // optional bool required = 1071;
+ E_Required = &file_validate_validate_proto_extTypes[2]
+)
+
+// Extension fields to descriptorpb.FieldOptions.
+var (
+ // Rules specify the validations to be performed on this field. By default,
+ // no validation is performed against a field.
+ //
+ // optional validate.FieldRules rules = 1071;
+ E_Rules = &file_validate_validate_proto_extTypes[3]
+)
+
+var File_validate_validate_proto protoreflect.FileDescriptor
+
+var file_validate_validate_proto_rawDesc = []byte{
+ 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64,
+ 0x61, 0x74, 0x65, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x08, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64,
+ 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
+ 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x07,
+ 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
+ 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05,
+ 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06,
+ 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69,
+ 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x49,
+ 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74,
+ 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x49,
+ 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e,
+ 0x74, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55,
+ 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69,
+ 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e,
+ 0x53, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73,
+ 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18,
+ 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2e, 0x53, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06,
+ 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33,
+ 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48,
+ 0x00, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69,
+ 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75,
+ 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x35,
+ 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x46, 0x69, 0x78,
+ 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x73, 0x66, 0x69,
+ 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36,
+ 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2e, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73,
+ 0x48, 0x00, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x04,
+ 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48,
+ 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e,
+ 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00,
+ 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65,
+ 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52,
+ 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e,
+ 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75,
+ 0x6d, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x12, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x52,
+ 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08,
+ 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18,
+ 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70,
+ 0x12, 0x26, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e,
+ 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65,
+ 0x73, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c,
+ 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75,
+ 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x16, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x09,
+ 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70,
+ 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73,
+ 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52,
+ 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x02, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x02, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x02, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e,
+ 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f,
+ 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x02, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49,
+ 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74,
+ 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45,
+ 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52,
+ 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02,
+ 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03,
+ 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e,
+ 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x01, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15,
+ 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x01, 0x52, 0x05,
+ 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f,
+ 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e,
+ 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0a, 0x49, 0x6e, 0x74,
+ 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a,
+ 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a,
+ 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12,
+ 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x67, 0x74, 0x12,
+ 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x67, 0x74,
+ 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69,
+ 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28,
+ 0x05, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f,
+ 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b,
+ 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0a,
+ 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
+ 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74,
+ 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x6c, 0x74,
+ 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6c,
+ 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02,
+ 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52,
+ 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03,
+ 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07,
+ 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69,
+ 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1,
+ 0x01, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14,
+ 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63,
+ 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0d, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06,
+ 0x20, 0x03, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f,
+ 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12,
+ 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18,
+ 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70,
+ 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c,
+ 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x04, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74,
+ 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02,
+ 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x04, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06,
+ 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f,
+ 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d,
+ 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72,
+ 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x53, 0x49, 0x6e, 0x74, 0x33,
+ 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02,
+ 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03,
+ 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e,
+ 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10,
+ 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x67, 0x74, 0x65,
+ 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x11, 0x52, 0x02, 0x69, 0x6e,
+ 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11,
+ 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72,
+ 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69,
+ 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x53,
+ 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
+ 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74,
+ 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x02, 0x6c, 0x74,
+ 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6c,
+ 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x12, 0x52, 0x02,
+ 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x12, 0x52,
+ 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x12,
+ 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07,
+ 0x20, 0x03, 0x28, 0x12, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69,
+ 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb2,
+ 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12,
+ 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05,
+ 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x07, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x07, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x07, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18,
+ 0x06, 0x20, 0x03, 0x28, 0x07, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74,
+ 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x07, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e,
+ 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79,
+ 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d,
+ 0x70, 0x74, 0x79, 0x22, 0xb2, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52,
+ 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x06, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02,
+ 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x06, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03,
+ 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e,
+ 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x06, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15,
+ 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x06, 0x52, 0x05,
+ 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f,
+ 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e,
+ 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb3, 0x01, 0x0a, 0x0d, 0x53, 0x46, 0x69,
+ 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
+ 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74,
+ 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x02, 0x6c, 0x74,
+ 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, 0x6c,
+ 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x02,
+ 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0f, 0x52,
+ 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0f,
+ 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07,
+ 0x20, 0x03, 0x28, 0x0f, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69,
+ 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb3,
+ 0x01, 0x0a, 0x0d, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73,
+ 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52,
+ 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x10, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x10, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x10, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x10, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e,
+ 0x18, 0x06, 0x20, 0x03, 0x28, 0x10, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f,
+ 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x10, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49,
+ 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74,
+ 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45,
+ 0x6d, 0x70, 0x74, 0x79, 0x22, 0x21, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65,
+ 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x22, 0xd4, 0x05, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69,
+ 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x10, 0x0a,
+ 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12,
+ 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
+ 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f,
+ 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65,
+ 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x14,
+ 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x65, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b,
+ 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d,
+ 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08,
+ 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74,
+ 0x65, 0x72, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65,
+ 0x72, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75,
+ 0x66, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66,
+ 0x69, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x21,
+ 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x17,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
+ 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69,
+ 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x0b, 0x20, 0x03, 0x28,
+ 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69,
+ 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c,
+ 0x12, 0x1c, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01,
+ 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10,
+ 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70,
+ 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00,
+ 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x10,
+ 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x12, 0x0a, 0x03,
+ 0x75, 0x72, 0x69, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69,
+ 0x12, 0x19, 0x0a, 0x07, 0x75, 0x72, 0x69, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x12, 0x20, 0x01, 0x28,
+ 0x08, 0x48, 0x00, 0x52, 0x06, 0x75, 0x72, 0x69, 0x52, 0x65, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x61,
+ 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07,
+ 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18,
+ 0x16, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x40, 0x0a,
+ 0x10, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65,
+ 0x78, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61,
+ 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x48, 0x00, 0x52,
+ 0x0e, 0x77, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12,
+ 0x1c, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x3a,
+ 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x12, 0x21, 0x0a,
+ 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x1a, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79,
+ 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0xe2,
+ 0x02, 0x0a, 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a,
+ 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x6f,
+ 0x6e, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04,
+ 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x17,
+ 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
+ 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65,
+ 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72,
+ 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66,
+ 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69,
+ 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x0e, 0x0a,
+ 0x02, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a,
+ 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x6e,
+ 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08,
+ 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x0b,
+ 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x14, 0x0a, 0x04,
+ 0x69, 0x70, 0x76, 0x36, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70,
+ 0x76, 0x36, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70,
+ 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
+ 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e,
+ 0x6f, 0x77, 0x6e, 0x22, 0x6b, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x73,
+ 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65,
+ 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65,
+ 0x66, 0x69, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74,
+ 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e,
+ 0x22, 0x3e, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73,
+ 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04,
+ 0x73, 0x6b, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64,
+ 0x22, 0xb0, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c,
+ 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12,
+ 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06,
+ 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e,
+ 0x69, 0x71, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46,
+ 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73,
+ 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d,
+ 0x70, 0x74, 0x79, 0x22, 0xdc, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73,
+ 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1b, 0x0a,
+ 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04,
+ 0x52, 0x08, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f,
+ 0x5f, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e,
+ 0x6f, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+ 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x04, 0x6b, 0x65, 0x79,
+ 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12,
+ 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70,
+ 0x74, 0x79, 0x22, 0x4d, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a,
+ 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f,
+ 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49,
+ 0x6e, 0x22, 0xe9, 0x02, 0x0a, 0x0d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75,
+ 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12,
+ 0x2f, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74,
+ 0x12, 0x29, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
+ 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x6c,
+ 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x02, 0x67, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x67, 0x74, 0x65,
+ 0x12, 0x29, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
+ 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x30, 0x0a, 0x06, 0x6e,
+ 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x22, 0xf3, 0x02,
+ 0x0a, 0x0e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73,
+ 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x05,
+ 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x2a,
+ 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x6c, 0x74,
+ 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
+ 0x52, 0x02, 0x67, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x67,
+ 0x74, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x05, 0x6c, 0x74, 0x4e, 0x6f, 0x77, 0x12, 0x15, 0x0a, 0x06, 0x67, 0x74, 0x5f,
+ 0x6e, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, 0x74, 0x4e, 0x6f, 0x77,
+ 0x12, 0x31, 0x0a, 0x06, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x77, 0x69, 0x74,
+ 0x68, 0x69, 0x6e, 0x2a, 0x46, 0x0a, 0x0a, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65,
+ 0x78, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14,
+ 0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x41,
+ 0x4d, 0x45, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41,
+ 0x44, 0x45, 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x3a, 0x3c, 0x0a, 0x08, 0x64,
+ 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x3a, 0x0a, 0x07, 0x69, 0x67, 0x6e,
+ 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x67,
+ 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3a, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
+ 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
+ 0x64, 0x3a, 0x4a, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65,
+ 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c,
+ 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x50, 0x0a,
+ 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70,
+ 0x67, 0x76, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5a, 0x32, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f,
+ 0x78, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x76, 0x61,
+ 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
+}
+
+var (
+ file_validate_validate_proto_rawDescOnce sync.Once
+ file_validate_validate_proto_rawDescData = file_validate_validate_proto_rawDesc
+)
+
+func file_validate_validate_proto_rawDescGZIP() []byte {
+ file_validate_validate_proto_rawDescOnce.Do(func() {
+ file_validate_validate_proto_rawDescData = protoimpl.X.CompressGZIP(file_validate_validate_proto_rawDescData)
+ })
+ return file_validate_validate_proto_rawDescData
+}
+
+var file_validate_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
+var file_validate_validate_proto_goTypes = []interface{}{
+ (KnownRegex)(0), // 0: validate.KnownRegex
+ (*FieldRules)(nil), // 1: validate.FieldRules
+ (*FloatRules)(nil), // 2: validate.FloatRules
+ (*DoubleRules)(nil), // 3: validate.DoubleRules
+ (*Int32Rules)(nil), // 4: validate.Int32Rules
+ (*Int64Rules)(nil), // 5: validate.Int64Rules
+ (*UInt32Rules)(nil), // 6: validate.UInt32Rules
+ (*UInt64Rules)(nil), // 7: validate.UInt64Rules
+ (*SInt32Rules)(nil), // 8: validate.SInt32Rules
+ (*SInt64Rules)(nil), // 9: validate.SInt64Rules
+ (*Fixed32Rules)(nil), // 10: validate.Fixed32Rules
+ (*Fixed64Rules)(nil), // 11: validate.Fixed64Rules
+ (*SFixed32Rules)(nil), // 12: validate.SFixed32Rules
+ (*SFixed64Rules)(nil), // 13: validate.SFixed64Rules
+ (*BoolRules)(nil), // 14: validate.BoolRules
+ (*StringRules)(nil), // 15: validate.StringRules
+ (*BytesRules)(nil), // 16: validate.BytesRules
+ (*EnumRules)(nil), // 17: validate.EnumRules
+ (*MessageRules)(nil), // 18: validate.MessageRules
+ (*RepeatedRules)(nil), // 19: validate.RepeatedRules
+ (*MapRules)(nil), // 20: validate.MapRules
+ (*AnyRules)(nil), // 21: validate.AnyRules
+ (*DurationRules)(nil), // 22: validate.DurationRules
+ (*TimestampRules)(nil), // 23: validate.TimestampRules
+ (*durationpb.Duration)(nil), // 24: google.protobuf.Duration
+ (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp
+ (*descriptorpb.MessageOptions)(nil), // 26: google.protobuf.MessageOptions
+ (*descriptorpb.OneofOptions)(nil), // 27: google.protobuf.OneofOptions
+ (*descriptorpb.FieldOptions)(nil), // 28: google.protobuf.FieldOptions
+}
+var file_validate_validate_proto_depIdxs = []int32{
+ 18, // 0: validate.FieldRules.message:type_name -> validate.MessageRules
+ 2, // 1: validate.FieldRules.float:type_name -> validate.FloatRules
+ 3, // 2: validate.FieldRules.double:type_name -> validate.DoubleRules
+ 4, // 3: validate.FieldRules.int32:type_name -> validate.Int32Rules
+ 5, // 4: validate.FieldRules.int64:type_name -> validate.Int64Rules
+ 6, // 5: validate.FieldRules.uint32:type_name -> validate.UInt32Rules
+ 7, // 6: validate.FieldRules.uint64:type_name -> validate.UInt64Rules
+ 8, // 7: validate.FieldRules.sint32:type_name -> validate.SInt32Rules
+ 9, // 8: validate.FieldRules.sint64:type_name -> validate.SInt64Rules
+ 10, // 9: validate.FieldRules.fixed32:type_name -> validate.Fixed32Rules
+ 11, // 10: validate.FieldRules.fixed64:type_name -> validate.Fixed64Rules
+ 12, // 11: validate.FieldRules.sfixed32:type_name -> validate.SFixed32Rules
+ 13, // 12: validate.FieldRules.sfixed64:type_name -> validate.SFixed64Rules
+ 14, // 13: validate.FieldRules.bool:type_name -> validate.BoolRules
+ 15, // 14: validate.FieldRules.string:type_name -> validate.StringRules
+ 16, // 15: validate.FieldRules.bytes:type_name -> validate.BytesRules
+ 17, // 16: validate.FieldRules.enum:type_name -> validate.EnumRules
+ 19, // 17: validate.FieldRules.repeated:type_name -> validate.RepeatedRules
+ 20, // 18: validate.FieldRules.map:type_name -> validate.MapRules
+ 21, // 19: validate.FieldRules.any:type_name -> validate.AnyRules
+ 22, // 20: validate.FieldRules.duration:type_name -> validate.DurationRules
+ 23, // 21: validate.FieldRules.timestamp:type_name -> validate.TimestampRules
+ 0, // 22: validate.StringRules.well_known_regex:type_name -> validate.KnownRegex
+ 1, // 23: validate.RepeatedRules.items:type_name -> validate.FieldRules
+ 1, // 24: validate.MapRules.keys:type_name -> validate.FieldRules
+ 1, // 25: validate.MapRules.values:type_name -> validate.FieldRules
+ 24, // 26: validate.DurationRules.const:type_name -> google.protobuf.Duration
+ 24, // 27: validate.DurationRules.lt:type_name -> google.protobuf.Duration
+ 24, // 28: validate.DurationRules.lte:type_name -> google.protobuf.Duration
+ 24, // 29: validate.DurationRules.gt:type_name -> google.protobuf.Duration
+ 24, // 30: validate.DurationRules.gte:type_name -> google.protobuf.Duration
+ 24, // 31: validate.DurationRules.in:type_name -> google.protobuf.Duration
+ 24, // 32: validate.DurationRules.not_in:type_name -> google.protobuf.Duration
+ 25, // 33: validate.TimestampRules.const:type_name -> google.protobuf.Timestamp
+ 25, // 34: validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp
+ 25, // 35: validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp
+ 25, // 36: validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp
+ 25, // 37: validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp
+ 24, // 38: validate.TimestampRules.within:type_name -> google.protobuf.Duration
+ 26, // 39: validate.disabled:extendee -> google.protobuf.MessageOptions
+ 26, // 40: validate.ignored:extendee -> google.protobuf.MessageOptions
+ 27, // 41: validate.required:extendee -> google.protobuf.OneofOptions
+ 28, // 42: validate.rules:extendee -> google.protobuf.FieldOptions
+ 1, // 43: validate.rules:type_name -> validate.FieldRules
+ 44, // [44:44] is the sub-list for method output_type
+ 44, // [44:44] is the sub-list for method input_type
+ 43, // [43:44] is the sub-list for extension type_name
+ 39, // [39:43] is the sub-list for extension extendee
+ 0, // [0:39] is the sub-list for field type_name
+}
+
+func init() { file_validate_validate_proto_init() }
+func file_validate_validate_proto_init() {
+ if File_validate_validate_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_validate_validate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FieldRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FloatRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DoubleRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int32Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Int64Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UInt32Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UInt64Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SInt32Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SInt64Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Fixed32Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Fixed64Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SFixed32Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SFixed64Rules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BoolRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StringRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BytesRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*EnumRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MessageRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RepeatedRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MapRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AnyRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DurationRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_validate_validate_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TimestampRules); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_validate_validate_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*FieldRules_Float)(nil),
+ (*FieldRules_Double)(nil),
+ (*FieldRules_Int32)(nil),
+ (*FieldRules_Int64)(nil),
+ (*FieldRules_Uint32)(nil),
+ (*FieldRules_Uint64)(nil),
+ (*FieldRules_Sint32)(nil),
+ (*FieldRules_Sint64)(nil),
+ (*FieldRules_Fixed32)(nil),
+ (*FieldRules_Fixed64)(nil),
+ (*FieldRules_Sfixed32)(nil),
+ (*FieldRules_Sfixed64)(nil),
+ (*FieldRules_Bool)(nil),
+ (*FieldRules_String_)(nil),
+ (*FieldRules_Bytes)(nil),
+ (*FieldRules_Enum)(nil),
+ (*FieldRules_Repeated)(nil),
+ (*FieldRules_Map)(nil),
+ (*FieldRules_Any)(nil),
+ (*FieldRules_Duration)(nil),
+ (*FieldRules_Timestamp)(nil),
+ }
+ file_validate_validate_proto_msgTypes[14].OneofWrappers = []interface{}{
+ (*StringRules_Email)(nil),
+ (*StringRules_Hostname)(nil),
+ (*StringRules_Ip)(nil),
+ (*StringRules_Ipv4)(nil),
+ (*StringRules_Ipv6)(nil),
+ (*StringRules_Uri)(nil),
+ (*StringRules_UriRef)(nil),
+ (*StringRules_Address)(nil),
+ (*StringRules_Uuid)(nil),
+ (*StringRules_WellKnownRegex)(nil),
+ }
+ file_validate_validate_proto_msgTypes[15].OneofWrappers = []interface{}{
+ (*BytesRules_Ip)(nil),
+ (*BytesRules_Ipv4)(nil),
+ (*BytesRules_Ipv6)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_validate_validate_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 23,
+ NumExtensions: 4,
+ NumServices: 0,
+ },
+ GoTypes: file_validate_validate_proto_goTypes,
+ DependencyIndexes: file_validate_validate_proto_depIdxs,
+ EnumInfos: file_validate_validate_proto_enumTypes,
+ MessageInfos: file_validate_validate_proto_msgTypes,
+ ExtensionInfos: file_validate_validate_proto_extTypes,
+ }.Build()
+ File_validate_validate_proto = out.File
+ file_validate_validate_proto_rawDesc = nil
+ file_validate_validate_proto_goTypes = nil
+ file_validate_validate_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto
new file mode 100644
index 000000000..5aa965393
--- /dev/null
+++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto
@@ -0,0 +1,862 @@
+syntax = "proto2";
+package validate;
+
+option go_package = "github.com/envoyproxy/protoc-gen-validate/validate";
+option java_package = "io.envoyproxy.pgv.validate";
+
+import "google/protobuf/descriptor.proto";
+import "google/protobuf/duration.proto";
+import "google/protobuf/timestamp.proto";
+
+// Validation rules applied at the message level
+extend google.protobuf.MessageOptions {
+ // Disabled nullifies any validation rules for this message, including any
+ // message fields associated with it that do support validation.
+ optional bool disabled = 1071;
+ // Ignore skips generation of validation methods for this message.
+ optional bool ignored = 1072;
+}
+
+// Validation rules applied at the oneof level
+extend google.protobuf.OneofOptions {
+ // Required ensures that exactly one the field options in a oneof is set;
+ // validation fails if no fields in the oneof are set.
+ optional bool required = 1071;
+}
+
+// Validation rules applied at the field level
+extend google.protobuf.FieldOptions {
+ // Rules specify the validations to be performed on this field. By default,
+ // no validation is performed against a field.
+ optional FieldRules rules = 1071;
+}
+
+// FieldRules encapsulates the rules for each type of field. Depending on the
+// field, the correct set should be used to ensure proper validations.
+message FieldRules {
+ optional MessageRules message = 17;
+ oneof type {
+ // Scalar Field Types
+ FloatRules float = 1;
+ DoubleRules double = 2;
+ Int32Rules int32 = 3;
+ Int64Rules int64 = 4;
+ UInt32Rules uint32 = 5;
+ UInt64Rules uint64 = 6;
+ SInt32Rules sint32 = 7;
+ SInt64Rules sint64 = 8;
+ Fixed32Rules fixed32 = 9;
+ Fixed64Rules fixed64 = 10;
+ SFixed32Rules sfixed32 = 11;
+ SFixed64Rules sfixed64 = 12;
+ BoolRules bool = 13;
+ StringRules string = 14;
+ BytesRules bytes = 15;
+
+ // Complex Field Types
+ EnumRules enum = 16;
+ RepeatedRules repeated = 18;
+ MapRules map = 19;
+
+ // Well-Known Field Types
+ AnyRules any = 20;
+ DurationRules duration = 21;
+ TimestampRules timestamp = 22;
+ }
+}
+
+// FloatRules describes the constraints applied to `float` values
+message FloatRules {
+ // Const specifies that this field must be exactly the specified value
+ optional float const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional float lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional float lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional float gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional float gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated float in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated float not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// DoubleRules describes the constraints applied to `double` values
+message DoubleRules {
+ // Const specifies that this field must be exactly the specified value
+ optional double const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional double lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional double lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional double gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional double gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated double in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated double not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// Int32Rules describes the constraints applied to `int32` values
+message Int32Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional int32 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional int32 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional int32 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional int32 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional int32 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated int32 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated int32 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// Int64Rules describes the constraints applied to `int64` values
+message Int64Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional int64 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional int64 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional int64 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional int64 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional int64 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated int64 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated int64 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// UInt32Rules describes the constraints applied to `uint32` values
+message UInt32Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional uint32 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional uint32 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional uint32 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional uint32 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional uint32 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated uint32 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated uint32 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// UInt64Rules describes the constraints applied to `uint64` values
+message UInt64Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional uint64 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional uint64 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional uint64 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional uint64 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional uint64 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated uint64 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated uint64 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// SInt32Rules describes the constraints applied to `sint32` values
+message SInt32Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional sint32 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional sint32 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional sint32 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional sint32 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional sint32 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated sint32 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated sint32 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// SInt64Rules describes the constraints applied to `sint64` values
+message SInt64Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional sint64 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional sint64 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional sint64 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional sint64 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional sint64 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated sint64 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated sint64 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// Fixed32Rules describes the constraints applied to `fixed32` values
+message Fixed32Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional fixed32 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional fixed32 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional fixed32 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional fixed32 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional fixed32 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated fixed32 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated fixed32 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// Fixed64Rules describes the constraints applied to `fixed64` values
+message Fixed64Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional fixed64 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional fixed64 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional fixed64 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional fixed64 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional fixed64 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated fixed64 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated fixed64 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// SFixed32Rules describes the constraints applied to `sfixed32` values
+message SFixed32Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional sfixed32 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional sfixed32 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional sfixed32 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional sfixed32 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional sfixed32 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated sfixed32 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated sfixed32 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// SFixed64Rules describes the constraints applied to `sfixed64` values
+message SFixed64Rules {
+ // Const specifies that this field must be exactly the specified value
+ optional sfixed64 const = 1;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional sfixed64 lt = 2;
+
+ // Lte specifies that this field must be less than or equal to the
+ // specified value, inclusive
+ optional sfixed64 lte = 3;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive. If the value of Gt is larger than a specified Lt or Lte, the
+ // range is reversed.
+ optional sfixed64 gt = 4;
+
+ // Gte specifies that this field must be greater than or equal to the
+ // specified value, inclusive. If the value of Gte is larger than a
+ // specified Lt or Lte, the range is reversed.
+ optional sfixed64 gte = 5;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated sfixed64 in = 6;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated sfixed64 not_in = 7;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 8;
+}
+
+// BoolRules describes the constraints applied to `bool` values
+message BoolRules {
+ // Const specifies that this field must be exactly the specified value
+ optional bool const = 1;
+}
+
+// StringRules describe the constraints applied to `string` values
+message StringRules {
+ // Const specifies that this field must be exactly the specified value
+ optional string const = 1;
+
+ // Len specifies that this field must be the specified number of
+ // characters (Unicode code points). Note that the number of
+ // characters may differ from the number of bytes in the string.
+ optional uint64 len = 19;
+
+ // MinLen specifies that this field must be the specified number of
+ // characters (Unicode code points) at a minimum. Note that the number of
+ // characters may differ from the number of bytes in the string.
+ optional uint64 min_len = 2;
+
+ // MaxLen specifies that this field must be the specified number of
+ // characters (Unicode code points) at a maximum. Note that the number of
+ // characters may differ from the number of bytes in the string.
+ optional uint64 max_len = 3;
+
+ // LenBytes specifies that this field must be the specified number of bytes
+ optional uint64 len_bytes = 20;
+
+ // MinBytes specifies that this field must be the specified number of bytes
+ // at a minimum
+ optional uint64 min_bytes = 4;
+
+ // MaxBytes specifies that this field must be the specified number of bytes
+ // at a maximum
+ optional uint64 max_bytes = 5;
+
+ // Pattern specifies that this field must match against the specified
+ // regular expression (RE2 syntax). The included expression should elide
+ // any delimiters.
+ optional string pattern = 6;
+
+ // Prefix specifies that this field must have the specified substring at
+ // the beginning of the string.
+ optional string prefix = 7;
+
+ // Suffix specifies that this field must have the specified substring at
+ // the end of the string.
+ optional string suffix = 8;
+
+ // Contains specifies that this field must have the specified substring
+ // anywhere in the string.
+ optional string contains = 9;
+
+ // NotContains specifies that this field cannot have the specified substring
+ // anywhere in the string.
+ optional string not_contains = 23;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated string in = 10;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated string not_in = 11;
+
+ // WellKnown rules provide advanced constraints against common string
+ // patterns
+ oneof well_known {
+ // Email specifies that the field must be a valid email address as
+ // defined by RFC 5322
+ bool email = 12;
+
+ // Hostname specifies that the field must be a valid hostname as
+ // defined by RFC 1034. This constraint does not support
+ // internationalized domain names (IDNs).
+ bool hostname = 13;
+
+ // Ip specifies that the field must be a valid IP (v4 or v6) address.
+ // Valid IPv6 addresses should not include surrounding square brackets.
+ bool ip = 14;
+
+ // Ipv4 specifies that the field must be a valid IPv4 address.
+ bool ipv4 = 15;
+
+ // Ipv6 specifies that the field must be a valid IPv6 address. Valid
+ // IPv6 addresses should not include surrounding square brackets.
+ bool ipv6 = 16;
+
+ // Uri specifies that the field must be a valid, absolute URI as defined
+ // by RFC 3986
+ bool uri = 17;
+
+ // UriRef specifies that the field must be a valid URI as defined by RFC
+ // 3986 and may be relative or absolute.
+ bool uri_ref = 18;
+
+ // Address specifies that the field must be either a valid hostname as
+ // defined by RFC 1034 (which does not support internationalized domain
+ // names or IDNs), or it can be a valid IP (v4 or v6).
+ bool address = 21;
+
+ // Uuid specifies that the field must be a valid UUID as defined by
+ // RFC 4122
+ bool uuid = 22;
+
+ // WellKnownRegex specifies a common well known pattern defined as a regex.
+ KnownRegex well_known_regex = 24;
+ }
+
+ // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
+ // strict header validation.
+ // By default, this is true, and HTTP header validations are RFC-compliant.
+ // Setting to false will enable a looser validations that only disallows
+ // \r\n\0 characters, which can be used to bypass header matching rules.
+ optional bool strict = 25 [default = true];
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 26;
+}
+
+// WellKnownRegex contain some well-known patterns.
+enum KnownRegex {
+ UNKNOWN = 0;
+
+ // HTTP header name as defined by RFC 7230.
+ HTTP_HEADER_NAME = 1;
+
+ // HTTP header value as defined by RFC 7230.
+ HTTP_HEADER_VALUE = 2;
+}
+
+// BytesRules describe the constraints applied to `bytes` values
+message BytesRules {
+ // Const specifies that this field must be exactly the specified value
+ optional bytes const = 1;
+
+ // Len specifies that this field must be the specified number of bytes
+ optional uint64 len = 13;
+
+ // MinLen specifies that this field must be the specified number of bytes
+ // at a minimum
+ optional uint64 min_len = 2;
+
+ // MaxLen specifies that this field must be the specified number of bytes
+ // at a maximum
+ optional uint64 max_len = 3;
+
+ // Pattern specifies that this field must match against the specified
+ // regular expression (RE2 syntax). The included expression should elide
+ // any delimiters.
+ optional string pattern = 4;
+
+ // Prefix specifies that this field must have the specified bytes at the
+ // beginning of the string.
+ optional bytes prefix = 5;
+
+ // Suffix specifies that this field must have the specified bytes at the
+ // end of the string.
+ optional bytes suffix = 6;
+
+ // Contains specifies that this field must have the specified bytes
+ // anywhere in the string.
+ optional bytes contains = 7;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated bytes in = 8;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated bytes not_in = 9;
+
+ // WellKnown rules provide advanced constraints against common byte
+ // patterns
+ oneof well_known {
+ // Ip specifies that the field must be a valid IP (v4 or v6) address in
+ // byte format
+ bool ip = 10;
+
+ // Ipv4 specifies that the field must be a valid IPv4 address in byte
+ // format
+ bool ipv4 = 11;
+
+ // Ipv6 specifies that the field must be a valid IPv6 address in byte
+ // format
+ bool ipv6 = 12;
+ }
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 14;
+}
+
+// EnumRules describe the constraints applied to enum values
+message EnumRules {
+ // Const specifies that this field must be exactly the specified value
+ optional int32 const = 1;
+
+ // DefinedOnly specifies that this field must be only one of the defined
+ // values for this enum, failing on any undefined value.
+ optional bool defined_only = 2;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated int32 in = 3;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated int32 not_in = 4;
+}
+
+// MessageRules describe the constraints applied to embedded message values.
+// For message-type fields, validation is performed recursively.
+message MessageRules {
+ // Skip specifies that the validation rules of this field should not be
+ // evaluated
+ optional bool skip = 1;
+
+ // Required specifies that this field must be set
+ optional bool required = 2;
+}
+
+// RepeatedRules describe the constraints applied to `repeated` values
+message RepeatedRules {
+ // MinItems specifies that this field must have the specified number of
+ // items at a minimum
+ optional uint64 min_items = 1;
+
+ // MaxItems specifies that this field must have the specified number of
+ // items at a maximum
+ optional uint64 max_items = 2;
+
+ // Unique specifies that all elements in this field must be unique. This
+ // constraint is only applicable to scalar and enum types (messages are not
+ // supported).
+ optional bool unique = 3;
+
+ // Items specifies the constraints to be applied to each item in the field.
+ // Repeated message fields will still execute validation against each item
+ // unless skip is specified here.
+ optional FieldRules items = 4;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 5;
+}
+
+// MapRules describe the constraints applied to `map` values
+message MapRules {
+ // MinPairs specifies that this field must have the specified number of
+ // KVs at a minimum
+ optional uint64 min_pairs = 1;
+
+ // MaxPairs specifies that this field must have the specified number of
+ // KVs at a maximum
+ optional uint64 max_pairs = 2;
+
+ // NoSparse specifies values in this field cannot be unset. This only
+ // applies to map's with message value types.
+ optional bool no_sparse = 3;
+
+ // Keys specifies the constraints to be applied to each key in the field.
+ optional FieldRules keys = 4;
+
+ // Values specifies the constraints to be applied to the value of each key
+ // in the field. Message values will still have their validations evaluated
+ // unless skip is specified here.
+ optional FieldRules values = 5;
+
+ // IgnoreEmpty specifies that the validation rules of this field should be
+ // evaluated only if the field is not empty
+ optional bool ignore_empty = 6;
+}
+
+// AnyRules describe constraints applied exclusively to the
+// `google.protobuf.Any` well-known type
+message AnyRules {
+ // Required specifies that this field must be set
+ optional bool required = 1;
+
+ // In specifies that this field's `type_url` must be equal to one of the
+ // specified values.
+ repeated string in = 2;
+
+ // NotIn specifies that this field's `type_url` must not be equal to any of
+ // the specified values.
+ repeated string not_in = 3;
+}
+
+// DurationRules describe the constraints applied exclusively to the
+// `google.protobuf.Duration` well-known type
+message DurationRules {
+ // Required specifies that this field must be set
+ optional bool required = 1;
+
+ // Const specifies that this field must be exactly the specified value
+ optional google.protobuf.Duration const = 2;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional google.protobuf.Duration lt = 3;
+
+ // Lt specifies that this field must be less than the specified value,
+ // inclusive
+ optional google.protobuf.Duration lte = 4;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive
+ optional google.protobuf.Duration gt = 5;
+
+ // Gte specifies that this field must be greater than the specified value,
+ // inclusive
+ optional google.protobuf.Duration gte = 6;
+
+ // In specifies that this field must be equal to one of the specified
+ // values
+ repeated google.protobuf.Duration in = 7;
+
+ // NotIn specifies that this field cannot be equal to one of the specified
+ // values
+ repeated google.protobuf.Duration not_in = 8;
+}
+
+// TimestampRules describe the constraints applied exclusively to the
+// `google.protobuf.Timestamp` well-known type
+message TimestampRules {
+ // Required specifies that this field must be set
+ optional bool required = 1;
+
+ // Const specifies that this field must be exactly the specified value
+ optional google.protobuf.Timestamp const = 2;
+
+ // Lt specifies that this field must be less than the specified value,
+ // exclusive
+ optional google.protobuf.Timestamp lt = 3;
+
+ // Lte specifies that this field must be less than the specified value,
+ // inclusive
+ optional google.protobuf.Timestamp lte = 4;
+
+ // Gt specifies that this field must be greater than the specified value,
+ // exclusive
+ optional google.protobuf.Timestamp gt = 5;
+
+ // Gte specifies that this field must be greater than the specified value,
+ // inclusive
+ optional google.protobuf.Timestamp gte = 6;
+
+ // LtNow specifies that this must be less than the current time. LtNow
+ // can only be used with the Within rule.
+ optional bool lt_now = 7;
+
+ // GtNow specifies that this must be greater than the current time. GtNow
+ // can only be used with the Within rule.
+ optional bool gt_now = 8;
+
+ // Within specifies that this field must be within this duration of the
+ // current time. This constraint can be used alone or with the LtNow and
+ // GtNow rules.
+ optional google.protobuf.Duration within = 9;
+}
diff --git a/vendor/github.com/fatih/color/.travis.yml b/vendor/github.com/fatih/color/.travis.yml
deleted file mode 100644
index 95f8a1ff5..000000000
--- a/vendor/github.com/fatih/color/.travis.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-language: go
-go:
- - 1.8.x
- - tip
-
diff --git a/vendor/github.com/fatih/color/Gopkg.lock b/vendor/github.com/fatih/color/Gopkg.lock
deleted file mode 100644
index 7d879e9ca..000000000
--- a/vendor/github.com/fatih/color/Gopkg.lock
+++ /dev/null
@@ -1,27 +0,0 @@
-# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
-
-
-[[projects]]
- name = "github.com/mattn/go-colorable"
- packages = ["."]
- revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072"
- version = "v0.0.9"
-
-[[projects]]
- name = "github.com/mattn/go-isatty"
- packages = ["."]
- revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39"
- version = "v0.0.3"
-
-[[projects]]
- branch = "master"
- name = "golang.org/x/sys"
- packages = ["unix"]
- revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd"
-
-[solve-meta]
- analyzer-name = "dep"
- analyzer-version = 1
- inputs-digest = "e8a50671c3cb93ea935bf210b1cd20702876b9d9226129be581ef646d1565cdc"
- solver-name = "gps-cdcl"
- solver-version = 1
diff --git a/vendor/github.com/fatih/color/Gopkg.toml b/vendor/github.com/fatih/color/Gopkg.toml
deleted file mode 100644
index ff1617f71..000000000
--- a/vendor/github.com/fatih/color/Gopkg.toml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-# Gopkg.toml example
-#
-# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
-# for detailed Gopkg.toml documentation.
-#
-# required = ["github.com/user/thing/cmd/thing"]
-# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
-#
-# [[constraint]]
-# name = "github.com/user/project"
-# version = "1.0.0"
-#
-# [[constraint]]
-# name = "github.com/user/project2"
-# branch = "dev"
-# source = "github.com/myfork/project2"
-#
-# [[override]]
-# name = "github.com/x/y"
-# version = "2.4.0"
-
-
-[[constraint]]
- name = "github.com/mattn/go-colorable"
- version = "0.0.9"
-
-[[constraint]]
- name = "github.com/mattn/go-isatty"
- version = "0.0.3"
diff --git a/vendor/github.com/fatih/color/README.md b/vendor/github.com/fatih/color/README.md
index 3fc954460..d135bfe02 100644
--- a/vendor/github.com/fatih/color/README.md
+++ b/vendor/github.com/fatih/color/README.md
@@ -1,25 +1,18 @@
-# Color [![GoDoc](https://godoc.org/github.com/fatih/color?status.svg)](https://godoc.org/github.com/fatih/color) [![Build Status](https://img.shields.io/travis/fatih/color.svg?style=flat-square)](https://travis-ci.org/fatih/color)
-
-
+# color [![](https://github.com/fatih/color/workflows/build/badge.svg)](https://github.com/fatih/color/actions) [![PkgGoDev](https://pkg.go.dev/badge/github.com/fatih/color)](https://pkg.go.dev/github.com/fatih/color)
Color lets you use colorized outputs in terms of [ANSI Escape
Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors) in Go (Golang). It
has support for Windows too! The API can be used in several ways, pick one that
suits you.
-
-![Color](https://i.imgur.com/c1JI0lA.png)
-
+![Color](https://user-images.githubusercontent.com/438920/96832689-03b3e000-13f4-11eb-9803-46f4c4de3406.jpg)
## Install
-```bash
+```
go get github.com/fatih/color
```
-Note that the `vendor` folder is here for stability. Remove the folder if you
-already have the dependencies in your GOPATH.
-
## Examples
### Standard colors
@@ -37,6 +30,18 @@ color.Magenta("And many others ..")
```
+### RGB colors
+
+If your terminal supports 24-bit colors, you can use RGB color codes.
+
+```go
+color.RGB(255, 128, 0).Println("foreground orange")
+color.RGB(230, 42, 42).Println("foreground red")
+
+color.BgRGB(255, 128, 0).Println("background orange")
+color.BgRGB(230, 42, 42).Println("background red")
+```
+
### Mix and reuse colors
```go
@@ -56,6 +61,11 @@ boldRed.Println("This will print text in bold red.")
whiteBackground := red.Add(color.BgWhite)
whiteBackground.Println("Red text with white background.")
+
+// Mix with RGB color codes
+color.RGB(255, 128, 0).AddBgRGB(0, 0, 0).Println("orange with black background")
+
+color.BgRGB(255, 128, 0).AddRGB(255, 255, 255).Println("orange background with white foreground")
```
### Use your own output (io.Writer)
@@ -84,7 +94,7 @@ notice("Don't forget this...")
### Custom fprint functions (FprintFunc)
```go
-blue := color.New(FgBlue).FprintfFunc()
+blue := color.New(color.FgBlue).FprintfFunc()
blue(myWriter, "important notice: %s", stars)
// Mix up with multiple attributes
@@ -130,17 +140,19 @@ fmt.Println("All text will now be bold magenta.")
```
### Disable/Enable color
-
+
There might be a case where you want to explicitly disable/enable color output. the
`go-isatty` package will automatically disable color output for non-tty output streams
-(for example if the output were piped directly to `less`)
+(for example if the output were piped directly to `less`).
-`Color` has support to disable/enable colors both globally and for single color
-definitions. For example suppose you have a CLI app and a `--no-color` bool flag. You
-can easily disable the color output with:
+The `color` package also disables color output if the [`NO_COLOR`](https://no-color.org) environment
+variable is set to a non-empty string.
-```go
+`Color` has support to disable/enable colors programmatically both globally and
+for single color definitions. For example suppose you have a CLI app and a
+`-no-color` bool flag. You can easily disable the color output with:
+```go
var flagNoColor = flag.Bool("no-color", false, "Disable color output")
if *flagNoColor {
@@ -162,18 +174,16 @@ c.EnableColor()
c.Println("This prints again cyan...")
```
-## Todo
+## GitHub Actions
-* Save/Return previous values
-* Evaluate fmt.Formatter interface
+To output color in GitHub Actions (or other CI systems that support ANSI colors), make sure to set `color.NoColor = false` so that it bypasses the check for non-tty output streams.
## Credits
- * [Fatih Arslan](https://github.com/fatih)
- * Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable)
+* [Fatih Arslan](https://github.com/fatih)
+* Windows support via @mattn: [colorable](https://github.com/mattn/go-colorable)
## License
The MIT License (MIT) - see [`LICENSE.md`](https://github.com/fatih/color/blob/master/LICENSE.md) for more details
-
diff --git a/vendor/github.com/fatih/color/color.go b/vendor/github.com/fatih/color/color.go
index 91c8e9f06..ee39b408e 100644
--- a/vendor/github.com/fatih/color/color.go
+++ b/vendor/github.com/fatih/color/color.go
@@ -15,12 +15,14 @@ import (
var (
// NoColor defines if the output is colorized or not. It's dynamically set to
// false or true based on the stdout's file descriptor referring to a terminal
- // or not. This is a global option and affects all colors. For more control
- // over each color block use the methods DisableColor() individually.
- NoColor = os.Getenv("TERM") == "dumb" ||
+ // or not. It's also set to true if the NO_COLOR environment variable is
+ // set (regardless of its value). This is a global option and affects all
+ // colors. For more control over each color block use the methods
+ // DisableColor() individually.
+ NoColor = noColorIsSet() || os.Getenv("TERM") == "dumb" ||
(!isatty.IsTerminal(os.Stdout.Fd()) && !isatty.IsCygwinTerminal(os.Stdout.Fd()))
- // Output defines the standard output of the print functions. By default
+ // Output defines the standard output of the print functions. By default,
// os.Stdout is used.
Output = colorable.NewColorableStdout()
@@ -33,6 +35,11 @@ var (
colorsCacheMu sync.Mutex // protects colorsCache
)
+// noColorIsSet returns true if the environment variable NO_COLOR is set to a non-empty string.
+func noColorIsSet() bool {
+ return os.Getenv("NO_COLOR") != ""
+}
+
// Color defines a custom color object which is defined by SGR parameters.
type Color struct {
params []Attribute
@@ -58,6 +65,29 @@ const (
CrossedOut
)
+const (
+ ResetBold Attribute = iota + 22
+ ResetItalic
+ ResetUnderline
+ ResetBlinking
+ _
+ ResetReversed
+ ResetConcealed
+ ResetCrossedOut
+)
+
+var mapResetAttributes map[Attribute]Attribute = map[Attribute]Attribute{
+ Bold: ResetBold,
+ Faint: ResetBold,
+ Italic: ResetItalic,
+ Underline: ResetUnderline,
+ BlinkSlow: ResetBlinking,
+ BlinkRapid: ResetBlinking,
+ ReverseVideo: ResetReversed,
+ Concealed: ResetConcealed,
+ CrossedOut: ResetCrossedOut,
+}
+
// Foreground text colors
const (
FgBlack Attribute = iota + 30
@@ -68,6 +98,9 @@ const (
FgMagenta
FgCyan
FgWhite
+
+ // used internally for 256 and 24-bit coloring
+ foreground
)
// Foreground Hi-Intensity text colors
@@ -92,6 +125,9 @@ const (
BgMagenta
BgCyan
BgWhite
+
+ // used internally for 256 and 24-bit coloring
+ background
)
// Background Hi-Intensity text colors
@@ -108,11 +144,42 @@ const (
// New returns a newly created color object.
func New(value ...Attribute) *Color {
- c := &Color{params: make([]Attribute, 0)}
+ c := &Color{
+ params: make([]Attribute, 0),
+ }
+
+ if noColorIsSet() {
+ c.noColor = boolPtr(true)
+ }
+
c.Add(value...)
return c
}
+// RGB returns a new foreground color in 24-bit RGB.
+func RGB(r, g, b int) *Color {
+ return New(foreground, 2, Attribute(r), Attribute(g), Attribute(b))
+}
+
+// BgRGB returns a new background color in 24-bit RGB.
+func BgRGB(r, g, b int) *Color {
+ return New(background, 2, Attribute(r), Attribute(g), Attribute(b))
+}
+
+// AddRGB is used to chain foreground RGB SGR parameters. Use as many as parameters to combine
+// and create custom color objects. Example: .Add(34, 0, 12).Add(255, 128, 0).
+func (c *Color) AddRGB(r, g, b int) *Color {
+ c.params = append(c.params, foreground, 2, Attribute(r), Attribute(g), Attribute(b))
+ return c
+}
+
+// AddRGB is used to chain background RGB SGR parameters. Use as many as parameters to combine
+// and create custom color objects. Example: .Add(34, 0, 12).Add(255, 128, 0).
+func (c *Color) AddBgRGB(r, g, b int) *Color {
+ c.params = append(c.params, background, 2, Attribute(r), Attribute(g), Attribute(b))
+ return c
+}
+
// Set sets the given parameters immediately. It will change the color of
// output with the given SGR parameters until color.Unset() is called.
func Set(p ...Attribute) *Color {
@@ -137,7 +204,7 @@ func (c *Color) Set() *Color {
return c
}
- fmt.Fprintf(Output, c.format())
+ fmt.Fprint(Output, c.format())
return c
}
@@ -149,16 +216,21 @@ func (c *Color) unset() {
Unset()
}
-func (c *Color) setWriter(w io.Writer) *Color {
+// SetWriter is used to set the SGR sequence with the given io.Writer. This is
+// a low-level function, and users should use the higher-level functions, such
+// as color.Fprint, color.Print, etc.
+func (c *Color) SetWriter(w io.Writer) *Color {
if c.isNoColorSet() {
return c
}
- fmt.Fprintf(w, c.format())
+ fmt.Fprint(w, c.format())
return c
}
-func (c *Color) unsetWriter(w io.Writer) {
+// UnsetWriter resets all escape attributes and clears the output with the give
+// io.Writer. Usually should be called after SetWriter().
+func (c *Color) UnsetWriter(w io.Writer) {
if c.isNoColorSet() {
return
}
@@ -177,20 +249,14 @@ func (c *Color) Add(value ...Attribute) *Color {
return c
}
-func (c *Color) prepend(value Attribute) {
- c.params = append(c.params, 0)
- copy(c.params[1:], c.params[0:])
- c.params[0] = value
-}
-
// Fprint formats using the default formats for its operands and writes to w.
// Spaces are added between operands when neither is a string.
// It returns the number of bytes written and any write error encountered.
// On Windows, users should wrap w with colorable.NewColorable() if w is of
// type *os.File.
func (c *Color) Fprint(w io.Writer, a ...interface{}) (n int, err error) {
- c.setWriter(w)
- defer c.unsetWriter(w)
+ c.SetWriter(w)
+ defer c.UnsetWriter(w)
return fmt.Fprint(w, a...)
}
@@ -212,8 +278,8 @@ func (c *Color) Print(a ...interface{}) (n int, err error) {
// On Windows, users should wrap w with colorable.NewColorable() if w is of
// type *os.File.
func (c *Color) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
- c.setWriter(w)
- defer c.unsetWriter(w)
+ c.SetWriter(w)
+ defer c.UnsetWriter(w)
return fmt.Fprintf(w, format, a...)
}
@@ -233,10 +299,7 @@ func (c *Color) Printf(format string, a ...interface{}) (n int, err error) {
// On Windows, users should wrap w with colorable.NewColorable() if w is of
// type *os.File.
func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
- c.setWriter(w)
- defer c.unsetWriter(w)
-
- return fmt.Fprintln(w, a...)
+ return fmt.Fprintln(w, c.wrap(sprintln(a...)))
}
// Println formats using the default formats for its operands and writes to
@@ -245,10 +308,7 @@ func (c *Color) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
// encountered. This is the standard fmt.Print() method wrapped with the given
// color.
func (c *Color) Println(a ...interface{}) (n int, err error) {
- c.Set()
- defer c.unset()
-
- return fmt.Fprintln(Output, a...)
+ return fmt.Fprintln(Output, c.wrap(sprintln(a...)))
}
// Sprint is just like Print, but returns a string instead of printing it.
@@ -258,7 +318,7 @@ func (c *Color) Sprint(a ...interface{}) string {
// Sprintln is just like Println, but returns a string instead of printing it.
func (c *Color) Sprintln(a ...interface{}) string {
- return c.wrap(fmt.Sprintln(a...))
+ return c.wrap(sprintln(a...)) + "\n"
}
// Sprintf is just like Printf, but returns a string instead of printing it.
@@ -340,7 +400,7 @@ func (c *Color) SprintfFunc() func(format string, a ...interface{}) string {
// string. Windows users should use this in conjunction with color.Output.
func (c *Color) SprintlnFunc() func(a ...interface{}) string {
return func(a ...interface{}) string {
- return c.wrap(fmt.Sprintln(a...))
+ return c.wrap(sprintln(a...)) + "\n"
}
}
@@ -370,7 +430,18 @@ func (c *Color) format() string {
}
func (c *Color) unformat() string {
- return fmt.Sprintf("%s[%dm", escape, Reset)
+ //return fmt.Sprintf("%s[%dm", escape, Reset)
+ //for each element in sequence let's use the specific reset escape, or the generic one if not found
+ format := make([]string, len(c.params))
+ for i, v := range c.params {
+ format[i] = strconv.Itoa(int(Reset))
+ ra, ok := mapResetAttributes[v]
+ if ok {
+ format[i] = strconv.Itoa(int(ra))
+ }
+ }
+
+ return fmt.Sprintf("%s[%sm", escape, strings.Join(format, ";"))
}
// DisableColor disables the color output. Useful to not change any existing
@@ -381,13 +452,13 @@ func (c *Color) DisableColor() {
}
// EnableColor enables the color output. Use it in conjunction with
-// DisableColor(). Otherwise this method has no side effects.
+// DisableColor(). Otherwise, this method has no side effects.
func (c *Color) EnableColor() {
c.noColor = boolPtr(false)
}
func (c *Color) isNoColorSet() bool {
- // check first if we have user setted action
+ // check first if we have user set action
if c.noColor != nil {
return *c.noColor
}
@@ -398,6 +469,12 @@ func (c *Color) isNoColorSet() bool {
// Equals returns a boolean value indicating whether two colors are equal.
func (c *Color) Equals(c2 *Color) bool {
+ if c == nil && c2 == nil {
+ return true
+ }
+ if c == nil || c2 == nil {
+ return false
+ }
if len(c.params) != len(c2.params) {
return false
}
@@ -601,3 +678,8 @@ func HiCyanString(format string, a ...interface{}) string { return colorString(f
func HiWhiteString(format string, a ...interface{}) string {
return colorString(format, FgHiWhite, a...)
}
+
+// sprintln is a helper function to format a string with fmt.Sprintln and trim the trailing newline.
+func sprintln(a ...interface{}) string {
+ return strings.TrimSuffix(fmt.Sprintln(a...), "\n")
+}
diff --git a/vendor/github.com/fatih/color/color_windows.go b/vendor/github.com/fatih/color/color_windows.go
new file mode 100644
index 000000000..be01c558e
--- /dev/null
+++ b/vendor/github.com/fatih/color/color_windows.go
@@ -0,0 +1,19 @@
+package color
+
+import (
+ "os"
+
+ "golang.org/x/sys/windows"
+)
+
+func init() {
+ // Opt-in for ansi color support for current process.
+ // https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences
+ var outMode uint32
+ out := windows.Handle(os.Stdout.Fd())
+ if err := windows.GetConsoleMode(out, &outMode); err != nil {
+ return
+ }
+ outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING
+ _ = windows.SetConsoleMode(out, outMode)
+}
diff --git a/vendor/github.com/fatih/color/doc.go b/vendor/github.com/fatih/color/doc.go
index cf1e96500..9491ad541 100644
--- a/vendor/github.com/fatih/color/doc.go
+++ b/vendor/github.com/fatih/color/doc.go
@@ -5,106 +5,105 @@ that suits you.
Use simple and default helper functions with predefined foreground colors:
- color.Cyan("Prints text in cyan.")
+ color.Cyan("Prints text in cyan.")
- // a newline will be appended automatically
- color.Blue("Prints %s in blue.", "text")
+ // a newline will be appended automatically
+ color.Blue("Prints %s in blue.", "text")
- // More default foreground colors..
- color.Red("We have red")
- color.Yellow("Yellow color too!")
- color.Magenta("And many others ..")
+ // More default foreground colors..
+ color.Red("We have red")
+ color.Yellow("Yellow color too!")
+ color.Magenta("And many others ..")
- // Hi-intensity colors
- color.HiGreen("Bright green color.")
- color.HiBlack("Bright black means gray..")
- color.HiWhite("Shiny white color!")
+ // Hi-intensity colors
+ color.HiGreen("Bright green color.")
+ color.HiBlack("Bright black means gray..")
+ color.HiWhite("Shiny white color!")
-However there are times where custom color mixes are required. Below are some
+However, there are times when custom color mixes are required. Below are some
examples to create custom color objects and use the print functions of each
separate color object.
- // Create a new color object
- c := color.New(color.FgCyan).Add(color.Underline)
- c.Println("Prints cyan text with an underline.")
+ // Create a new color object
+ c := color.New(color.FgCyan).Add(color.Underline)
+ c.Println("Prints cyan text with an underline.")
- // Or just add them to New()
- d := color.New(color.FgCyan, color.Bold)
- d.Printf("This prints bold cyan %s\n", "too!.")
+ // Or just add them to New()
+ d := color.New(color.FgCyan, color.Bold)
+ d.Printf("This prints bold cyan %s\n", "too!.")
- // Mix up foreground and background colors, create new mixes!
- red := color.New(color.FgRed)
+ // Mix up foreground and background colors, create new mixes!
+ red := color.New(color.FgRed)
- boldRed := red.Add(color.Bold)
- boldRed.Println("This will print text in bold red.")
+ boldRed := red.Add(color.Bold)
+ boldRed.Println("This will print text in bold red.")
- whiteBackground := red.Add(color.BgWhite)
- whiteBackground.Println("Red text with White background.")
+ whiteBackground := red.Add(color.BgWhite)
+ whiteBackground.Println("Red text with White background.")
- // Use your own io.Writer output
- color.New(color.FgBlue).Fprintln(myWriter, "blue color!")
+ // Use your own io.Writer output
+ color.New(color.FgBlue).Fprintln(myWriter, "blue color!")
- blue := color.New(color.FgBlue)
- blue.Fprint(myWriter, "This will print text in blue.")
+ blue := color.New(color.FgBlue)
+ blue.Fprint(myWriter, "This will print text in blue.")
You can create PrintXxx functions to simplify even more:
- // Create a custom print function for convenient
- red := color.New(color.FgRed).PrintfFunc()
- red("warning")
- red("error: %s", err)
+ // Create a custom print function for convenient
+ red := color.New(color.FgRed).PrintfFunc()
+ red("warning")
+ red("error: %s", err)
- // Mix up multiple attributes
- notice := color.New(color.Bold, color.FgGreen).PrintlnFunc()
- notice("don't forget this...")
+ // Mix up multiple attributes
+ notice := color.New(color.Bold, color.FgGreen).PrintlnFunc()
+ notice("don't forget this...")
You can also FprintXxx functions to pass your own io.Writer:
- blue := color.New(FgBlue).FprintfFunc()
- blue(myWriter, "important notice: %s", stars)
-
- // Mix up with multiple attributes
- success := color.New(color.Bold, color.FgGreen).FprintlnFunc()
- success(myWriter, don't forget this...")
+ blue := color.New(FgBlue).FprintfFunc()
+ blue(myWriter, "important notice: %s", stars)
+ // Mix up with multiple attributes
+ success := color.New(color.Bold, color.FgGreen).FprintlnFunc()
+ success(myWriter, don't forget this...")
Or create SprintXxx functions to mix strings with other non-colorized strings:
- yellow := New(FgYellow).SprintFunc()
- red := New(FgRed).SprintFunc()
+ yellow := New(FgYellow).SprintFunc()
+ red := New(FgRed).SprintFunc()
- fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error"))
+ fmt.Printf("this is a %s and this is %s.\n", yellow("warning"), red("error"))
- info := New(FgWhite, BgGreen).SprintFunc()
- fmt.Printf("this %s rocks!\n", info("package"))
+ info := New(FgWhite, BgGreen).SprintFunc()
+ fmt.Printf("this %s rocks!\n", info("package"))
Windows support is enabled by default. All Print functions work as intended.
-However only for color.SprintXXX functions, user should use fmt.FprintXXX and
+However, only for color.SprintXXX functions, user should use fmt.FprintXXX and
set the output to color.Output:
- fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS"))
+ fmt.Fprintf(color.Output, "Windows support: %s", color.GreenString("PASS"))
- info := New(FgWhite, BgGreen).SprintFunc()
- fmt.Fprintf(color.Output, "this %s rocks!\n", info("package"))
+ info := New(FgWhite, BgGreen).SprintFunc()
+ fmt.Fprintf(color.Output, "this %s rocks!\n", info("package"))
Using with existing code is possible. Just use the Set() method to set the
standard output to the given parameters. That way a rewrite of an existing
code is not required.
- // Use handy standard colors.
- color.Set(color.FgYellow)
+ // Use handy standard colors.
+ color.Set(color.FgYellow)
- fmt.Println("Existing text will be now in Yellow")
- fmt.Printf("This one %s\n", "too")
+ fmt.Println("Existing text will be now in Yellow")
+ fmt.Printf("This one %s\n", "too")
- color.Unset() // don't forget to unset
+ color.Unset() // don't forget to unset
- // You can mix up parameters
- color.Set(color.FgMagenta, color.Bold)
- defer color.Unset() // use it in your function
+ // You can mix up parameters
+ color.Set(color.FgMagenta, color.Bold)
+ defer color.Unset() // use it in your function
- fmt.Println("All text will be now bold magenta.")
+ fmt.Println("All text will be now bold magenta.")
There might be a case where you want to disable color output (for example to
pipe the standard output of your app to somewhere else). `Color` has support to
@@ -112,22 +111,24 @@ disable colors both globally and for single color definition. For example
suppose you have a CLI app and a `--no-color` bool flag. You can easily disable
the color output with:
- var flagNoColor = flag.Bool("no-color", false, "Disable color output")
+ var flagNoColor = flag.Bool("no-color", false, "Disable color output")
+
+ if *flagNoColor {
+ color.NoColor = true // disables colorized output
+ }
- if *flagNoColor {
- color.NoColor = true // disables colorized output
- }
+You can also disable the color by setting the NO_COLOR environment variable to any value.
It also has support for single color definitions (local). You can
disable/enable color output on the fly:
- c := color.New(color.FgCyan)
- c.Println("Prints cyan text")
+ c := color.New(color.FgCyan)
+ c.Println("Prints cyan text")
- c.DisableColor()
- c.Println("This is printed without any color")
+ c.DisableColor()
+ c.Println("This is printed without any color")
- c.EnableColor()
- c.Println("This prints again cyan...")
+ c.EnableColor()
+ c.Println("This prints again cyan...")
*/
package color
diff --git a/vendor/github.com/felixge/httpsnoop/.gitignore b/vendor/github.com/felixge/httpsnoop/.gitignore
new file mode 100644
index 000000000..e69de29bb
diff --git a/vendor/github.com/felixge/httpsnoop/LICENSE.txt b/vendor/github.com/felixge/httpsnoop/LICENSE.txt
new file mode 100644
index 000000000..e028b46a9
--- /dev/null
+++ b/vendor/github.com/felixge/httpsnoop/LICENSE.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2016 Felix Geisendörfer (felix@debuggable.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.
diff --git a/vendor/github.com/felixge/httpsnoop/Makefile b/vendor/github.com/felixge/httpsnoop/Makefile
new file mode 100644
index 000000000..4e12afdd9
--- /dev/null
+++ b/vendor/github.com/felixge/httpsnoop/Makefile
@@ -0,0 +1,10 @@
+.PHONY: ci generate clean
+
+ci: clean generate
+ go test -race -v ./...
+
+generate:
+ go generate .
+
+clean:
+ rm -rf *_generated*.go
diff --git a/vendor/github.com/felixge/httpsnoop/README.md b/vendor/github.com/felixge/httpsnoop/README.md
new file mode 100644
index 000000000..cf6b42f3d
--- /dev/null
+++ b/vendor/github.com/felixge/httpsnoop/README.md
@@ -0,0 +1,95 @@
+# httpsnoop
+
+Package httpsnoop provides an easy way to capture http related metrics (i.e.
+response time, bytes written, and http status code) from your application's
+http.Handlers.
+
+Doing this requires non-trivial wrapping of the http.ResponseWriter interface,
+which is also exposed for users interested in a more low-level API.
+
+[![Go Reference](https://pkg.go.dev/badge/github.com/felixge/httpsnoop.svg)](https://pkg.go.dev/github.com/felixge/httpsnoop)
+[![Build Status](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml/badge.svg)](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml)
+
+## Usage Example
+
+```go
+// myH is your app's http handler, perhaps a http.ServeMux or similar.
+var myH http.Handler
+// wrappedH wraps myH in order to log every request.
+wrappedH := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ m := httpsnoop.CaptureMetrics(myH, w, r)
+ log.Printf(
+ "%s %s (code=%d dt=%s written=%d)",
+ r.Method,
+ r.URL,
+ m.Code,
+ m.Duration,
+ m.Written,
+ )
+})
+http.ListenAndServe(":8080", wrappedH)
+```
+
+## Why this package exists
+
+Instrumenting an application's http.Handler is surprisingly difficult.
+
+However if you google for e.g. "capture ResponseWriter status code" you'll find
+lots of advise and code examples that suggest it to be a fairly trivial
+undertaking. Unfortunately everything I've seen so far has a high chance of
+breaking your application.
+
+The main problem is that a `http.ResponseWriter` often implements additional
+interfaces such as `http.Flusher`, `http.CloseNotifier`, `http.Hijacker`, `http.Pusher`, and
+`io.ReaderFrom`. So the naive approach of just wrapping `http.ResponseWriter`
+in your own struct that also implements the `http.ResponseWriter` interface
+will hide the additional interfaces mentioned above. This has a high change of
+introducing subtle bugs into any non-trivial application.
+
+Another approach I've seen people take is to return a struct that implements
+all of the interfaces above. However, that's also problematic, because it's
+difficult to fake some of these interfaces behaviors when the underlying
+`http.ResponseWriter` doesn't have an implementation. It's also dangerous,
+because an application may choose to operate differently, merely because it
+detects the presence of these additional interfaces.
+
+This package solves this problem by checking which additional interfaces a
+`http.ResponseWriter` implements, returning a wrapped version implementing the
+exact same set of interfaces.
+
+Additionally this package properly handles edge cases such as `WriteHeader` not
+being called, or called more than once, as well as concurrent calls to
+`http.ResponseWriter` methods, and even calls happening after the wrapped
+`ServeHTTP` has already returned.
+
+Unfortunately this package is not perfect either. It's possible that it is
+still missing some interfaces provided by the go core (let me know if you find
+one), and it won't work for applications adding their own interfaces into the
+mix. You can however use `httpsnoop.Unwrap(w)` to access the underlying
+`http.ResponseWriter` and type-assert the result to its other interfaces.
+
+However, hopefully the explanation above has sufficiently scared you of rolling
+your own solution to this problem. httpsnoop may still break your application,
+but at least it tries to avoid it as much as possible.
+
+Anyway, the real problem here is that smuggling additional interfaces inside
+`http.ResponseWriter` is a problematic design choice, but it probably goes as
+deep as the Go language specification itself. But that's okay, I still prefer
+Go over the alternatives ;).
+
+## Performance
+
+```
+BenchmarkBaseline-8 20000 94912 ns/op
+BenchmarkCaptureMetrics-8 20000 95461 ns/op
+```
+
+As you can see, using `CaptureMetrics` on a vanilla http.Handler introduces an
+overhead of ~500 ns per http request on my machine. However, the margin of
+error appears to be larger than that, therefor it should be reasonable to
+assume that the overhead introduced by `CaptureMetrics` is absolutely
+negligible.
+
+## License
+
+MIT
diff --git a/vendor/github.com/felixge/httpsnoop/capture_metrics.go b/vendor/github.com/felixge/httpsnoop/capture_metrics.go
new file mode 100644
index 000000000..bec7b71b3
--- /dev/null
+++ b/vendor/github.com/felixge/httpsnoop/capture_metrics.go
@@ -0,0 +1,86 @@
+package httpsnoop
+
+import (
+ "io"
+ "net/http"
+ "time"
+)
+
+// Metrics holds metrics captured from CaptureMetrics.
+type Metrics struct {
+ // Code is the first http response code passed to the WriteHeader func of
+ // the ResponseWriter. If no such call is made, a default code of 200 is
+ // assumed instead.
+ Code int
+ // Duration is the time it took to execute the handler.
+ Duration time.Duration
+ // Written is the number of bytes successfully written by the Write or
+ // ReadFrom function of the ResponseWriter. ResponseWriters may also write
+ // data to their underlaying connection directly (e.g. headers), but those
+ // are not tracked. Therefor the number of Written bytes will usually match
+ // the size of the response body.
+ Written int64
+}
+
+// CaptureMetrics wraps the given hnd, executes it with the given w and r, and
+// returns the metrics it captured from it.
+func CaptureMetrics(hnd http.Handler, w http.ResponseWriter, r *http.Request) Metrics {
+ return CaptureMetricsFn(w, func(ww http.ResponseWriter) {
+ hnd.ServeHTTP(ww, r)
+ })
+}
+
+// CaptureMetricsFn wraps w and calls fn with the wrapped w and returns the
+// resulting metrics. This is very similar to CaptureMetrics (which is just
+// sugar on top of this func), but is a more usable interface if your
+// application doesn't use the Go http.Handler interface.
+func CaptureMetricsFn(w http.ResponseWriter, fn func(http.ResponseWriter)) Metrics {
+ m := Metrics{Code: http.StatusOK}
+ m.CaptureMetrics(w, fn)
+ return m
+}
+
+// CaptureMetrics wraps w and calls fn with the wrapped w and updates
+// Metrics m with the resulting metrics. This is similar to CaptureMetricsFn,
+// but allows one to customize starting Metrics object.
+func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWriter)) {
+ var (
+ start = time.Now()
+ headerWritten bool
+ hooks = Hooks{
+ WriteHeader: func(next WriteHeaderFunc) WriteHeaderFunc {
+ return func(code int) {
+ next(code)
+
+ if !(code >= 100 && code <= 199) && !headerWritten {
+ m.Code = code
+ headerWritten = true
+ }
+ }
+ },
+
+ Write: func(next WriteFunc) WriteFunc {
+ return func(p []byte) (int, error) {
+ n, err := next(p)
+
+ m.Written += int64(n)
+ headerWritten = true
+ return n, err
+ }
+ },
+
+ ReadFrom: func(next ReadFromFunc) ReadFromFunc {
+ return func(src io.Reader) (int64, error) {
+ n, err := next(src)
+
+ headerWritten = true
+ m.Written += n
+ return n, err
+ }
+ },
+ }
+ )
+
+ fn(Wrap(w, hooks))
+ m.Duration += time.Since(start)
+}
diff --git a/vendor/github.com/felixge/httpsnoop/docs.go b/vendor/github.com/felixge/httpsnoop/docs.go
new file mode 100644
index 000000000..203c35b3c
--- /dev/null
+++ b/vendor/github.com/felixge/httpsnoop/docs.go
@@ -0,0 +1,10 @@
+// Package httpsnoop provides an easy way to capture http related metrics (i.e.
+// response time, bytes written, and http status code) from your application's
+// http.Handlers.
+//
+// Doing this requires non-trivial wrapping of the http.ResponseWriter
+// interface, which is also exposed for users interested in a more low-level
+// API.
+package httpsnoop
+
+//go:generate go run codegen/main.go
diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go
new file mode 100644
index 000000000..101cedde6
--- /dev/null
+++ b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go
@@ -0,0 +1,436 @@
+// +build go1.8
+// Code generated by "httpsnoop/codegen"; DO NOT EDIT.
+
+package httpsnoop
+
+import (
+ "bufio"
+ "io"
+ "net"
+ "net/http"
+)
+
+// HeaderFunc is part of the http.ResponseWriter interface.
+type HeaderFunc func() http.Header
+
+// WriteHeaderFunc is part of the http.ResponseWriter interface.
+type WriteHeaderFunc func(code int)
+
+// WriteFunc is part of the http.ResponseWriter interface.
+type WriteFunc func(b []byte) (int, error)
+
+// FlushFunc is part of the http.Flusher interface.
+type FlushFunc func()
+
+// CloseNotifyFunc is part of the http.CloseNotifier interface.
+type CloseNotifyFunc func() <-chan bool
+
+// HijackFunc is part of the http.Hijacker interface.
+type HijackFunc func() (net.Conn, *bufio.ReadWriter, error)
+
+// ReadFromFunc is part of the io.ReaderFrom interface.
+type ReadFromFunc func(src io.Reader) (int64, error)
+
+// PushFunc is part of the http.Pusher interface.
+type PushFunc func(target string, opts *http.PushOptions) error
+
+// Hooks defines a set of method interceptors for methods included in
+// http.ResponseWriter as well as some others. You can think of them as
+// middleware for the function calls they target. See Wrap for more details.
+type Hooks struct {
+ Header func(HeaderFunc) HeaderFunc
+ WriteHeader func(WriteHeaderFunc) WriteHeaderFunc
+ Write func(WriteFunc) WriteFunc
+ Flush func(FlushFunc) FlushFunc
+ CloseNotify func(CloseNotifyFunc) CloseNotifyFunc
+ Hijack func(HijackFunc) HijackFunc
+ ReadFrom func(ReadFromFunc) ReadFromFunc
+ Push func(PushFunc) PushFunc
+}
+
+// Wrap returns a wrapped version of w that provides the exact same interface
+// as w. Specifically if w implements any combination of:
+//
+// - http.Flusher
+// - http.CloseNotifier
+// - http.Hijacker
+// - io.ReaderFrom
+// - http.Pusher
+//
+// The wrapped version will implement the exact same combination. If no hooks
+// are set, the wrapped version also behaves exactly as w. Hooks targeting
+// methods not supported by w are ignored. Any other hooks will intercept the
+// method they target and may modify the call's arguments and/or return values.
+// The CaptureMetrics implementation serves as a working example for how the
+// hooks can be used.
+func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter {
+ rw := &rw{w: w, h: hooks}
+ _, i0 := w.(http.Flusher)
+ _, i1 := w.(http.CloseNotifier)
+ _, i2 := w.(http.Hijacker)
+ _, i3 := w.(io.ReaderFrom)
+ _, i4 := w.(http.Pusher)
+ switch {
+ // combination 1/32
+ case !i0 && !i1 && !i2 && !i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ }{rw, rw}
+ // combination 2/32
+ case !i0 && !i1 && !i2 && !i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Pusher
+ }{rw, rw, rw}
+ // combination 3/32
+ case !i0 && !i1 && !i2 && i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ io.ReaderFrom
+ }{rw, rw, rw}
+ // combination 4/32
+ case !i0 && !i1 && !i2 && i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ io.ReaderFrom
+ http.Pusher
+ }{rw, rw, rw, rw}
+ // combination 5/32
+ case !i0 && !i1 && i2 && !i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Hijacker
+ }{rw, rw, rw}
+ // combination 6/32
+ case !i0 && !i1 && i2 && !i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Hijacker
+ http.Pusher
+ }{rw, rw, rw, rw}
+ // combination 7/32
+ case !i0 && !i1 && i2 && i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Hijacker
+ io.ReaderFrom
+ }{rw, rw, rw, rw}
+ // combination 8/32
+ case !i0 && !i1 && i2 && i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Hijacker
+ io.ReaderFrom
+ http.Pusher
+ }{rw, rw, rw, rw, rw}
+ // combination 9/32
+ case !i0 && i1 && !i2 && !i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ }{rw, rw, rw}
+ // combination 10/32
+ case !i0 && i1 && !i2 && !i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ http.Pusher
+ }{rw, rw, rw, rw}
+ // combination 11/32
+ case !i0 && i1 && !i2 && i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ io.ReaderFrom
+ }{rw, rw, rw, rw}
+ // combination 12/32
+ case !i0 && i1 && !i2 && i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ io.ReaderFrom
+ http.Pusher
+ }{rw, rw, rw, rw, rw}
+ // combination 13/32
+ case !i0 && i1 && i2 && !i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ http.Hijacker
+ }{rw, rw, rw, rw}
+ // combination 14/32
+ case !i0 && i1 && i2 && !i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ http.Hijacker
+ http.Pusher
+ }{rw, rw, rw, rw, rw}
+ // combination 15/32
+ case !i0 && i1 && i2 && i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ http.Hijacker
+ io.ReaderFrom
+ }{rw, rw, rw, rw, rw}
+ // combination 16/32
+ case !i0 && i1 && i2 && i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ http.Hijacker
+ io.ReaderFrom
+ http.Pusher
+ }{rw, rw, rw, rw, rw, rw}
+ // combination 17/32
+ case i0 && !i1 && !i2 && !i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ }{rw, rw, rw}
+ // combination 18/32
+ case i0 && !i1 && !i2 && !i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.Pusher
+ }{rw, rw, rw, rw}
+ // combination 19/32
+ case i0 && !i1 && !i2 && i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ io.ReaderFrom
+ }{rw, rw, rw, rw}
+ // combination 20/32
+ case i0 && !i1 && !i2 && i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ io.ReaderFrom
+ http.Pusher
+ }{rw, rw, rw, rw, rw}
+ // combination 21/32
+ case i0 && !i1 && i2 && !i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.Hijacker
+ }{rw, rw, rw, rw}
+ // combination 22/32
+ case i0 && !i1 && i2 && !i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.Hijacker
+ http.Pusher
+ }{rw, rw, rw, rw, rw}
+ // combination 23/32
+ case i0 && !i1 && i2 && i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.Hijacker
+ io.ReaderFrom
+ }{rw, rw, rw, rw, rw}
+ // combination 24/32
+ case i0 && !i1 && i2 && i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.Hijacker
+ io.ReaderFrom
+ http.Pusher
+ }{rw, rw, rw, rw, rw, rw}
+ // combination 25/32
+ case i0 && i1 && !i2 && !i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ }{rw, rw, rw, rw}
+ // combination 26/32
+ case i0 && i1 && !i2 && !i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ http.Pusher
+ }{rw, rw, rw, rw, rw}
+ // combination 27/32
+ case i0 && i1 && !i2 && i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ io.ReaderFrom
+ }{rw, rw, rw, rw, rw}
+ // combination 28/32
+ case i0 && i1 && !i2 && i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ io.ReaderFrom
+ http.Pusher
+ }{rw, rw, rw, rw, rw, rw}
+ // combination 29/32
+ case i0 && i1 && i2 && !i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ http.Hijacker
+ }{rw, rw, rw, rw, rw}
+ // combination 30/32
+ case i0 && i1 && i2 && !i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ http.Hijacker
+ http.Pusher
+ }{rw, rw, rw, rw, rw, rw}
+ // combination 31/32
+ case i0 && i1 && i2 && i3 && !i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ http.Hijacker
+ io.ReaderFrom
+ }{rw, rw, rw, rw, rw, rw}
+ // combination 32/32
+ case i0 && i1 && i2 && i3 && i4:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ http.Hijacker
+ io.ReaderFrom
+ http.Pusher
+ }{rw, rw, rw, rw, rw, rw, rw}
+ }
+ panic("unreachable")
+}
+
+type rw struct {
+ w http.ResponseWriter
+ h Hooks
+}
+
+func (w *rw) Unwrap() http.ResponseWriter {
+ return w.w
+}
+
+func (w *rw) Header() http.Header {
+ f := w.w.(http.ResponseWriter).Header
+ if w.h.Header != nil {
+ f = w.h.Header(f)
+ }
+ return f()
+}
+
+func (w *rw) WriteHeader(code int) {
+ f := w.w.(http.ResponseWriter).WriteHeader
+ if w.h.WriteHeader != nil {
+ f = w.h.WriteHeader(f)
+ }
+ f(code)
+}
+
+func (w *rw) Write(b []byte) (int, error) {
+ f := w.w.(http.ResponseWriter).Write
+ if w.h.Write != nil {
+ f = w.h.Write(f)
+ }
+ return f(b)
+}
+
+func (w *rw) Flush() {
+ f := w.w.(http.Flusher).Flush
+ if w.h.Flush != nil {
+ f = w.h.Flush(f)
+ }
+ f()
+}
+
+func (w *rw) CloseNotify() <-chan bool {
+ f := w.w.(http.CloseNotifier).CloseNotify
+ if w.h.CloseNotify != nil {
+ f = w.h.CloseNotify(f)
+ }
+ return f()
+}
+
+func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ f := w.w.(http.Hijacker).Hijack
+ if w.h.Hijack != nil {
+ f = w.h.Hijack(f)
+ }
+ return f()
+}
+
+func (w *rw) ReadFrom(src io.Reader) (int64, error) {
+ f := w.w.(io.ReaderFrom).ReadFrom
+ if w.h.ReadFrom != nil {
+ f = w.h.ReadFrom(f)
+ }
+ return f(src)
+}
+
+func (w *rw) Push(target string, opts *http.PushOptions) error {
+ f := w.w.(http.Pusher).Push
+ if w.h.Push != nil {
+ f = w.h.Push(f)
+ }
+ return f(target, opts)
+}
+
+type Unwrapper interface {
+ Unwrap() http.ResponseWriter
+}
+
+// Unwrap returns the underlying http.ResponseWriter from within zero or more
+// layers of httpsnoop wrappers.
+func Unwrap(w http.ResponseWriter) http.ResponseWriter {
+ if rw, ok := w.(Unwrapper); ok {
+ // recurse until rw.Unwrap() returns a non-Unwrapper
+ return Unwrap(rw.Unwrap())
+ } else {
+ return w
+ }
+}
diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go
new file mode 100644
index 000000000..e0951df15
--- /dev/null
+++ b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go
@@ -0,0 +1,278 @@
+// +build !go1.8
+// Code generated by "httpsnoop/codegen"; DO NOT EDIT.
+
+package httpsnoop
+
+import (
+ "bufio"
+ "io"
+ "net"
+ "net/http"
+)
+
+// HeaderFunc is part of the http.ResponseWriter interface.
+type HeaderFunc func() http.Header
+
+// WriteHeaderFunc is part of the http.ResponseWriter interface.
+type WriteHeaderFunc func(code int)
+
+// WriteFunc is part of the http.ResponseWriter interface.
+type WriteFunc func(b []byte) (int, error)
+
+// FlushFunc is part of the http.Flusher interface.
+type FlushFunc func()
+
+// CloseNotifyFunc is part of the http.CloseNotifier interface.
+type CloseNotifyFunc func() <-chan bool
+
+// HijackFunc is part of the http.Hijacker interface.
+type HijackFunc func() (net.Conn, *bufio.ReadWriter, error)
+
+// ReadFromFunc is part of the io.ReaderFrom interface.
+type ReadFromFunc func(src io.Reader) (int64, error)
+
+// Hooks defines a set of method interceptors for methods included in
+// http.ResponseWriter as well as some others. You can think of them as
+// middleware for the function calls they target. See Wrap for more details.
+type Hooks struct {
+ Header func(HeaderFunc) HeaderFunc
+ WriteHeader func(WriteHeaderFunc) WriteHeaderFunc
+ Write func(WriteFunc) WriteFunc
+ Flush func(FlushFunc) FlushFunc
+ CloseNotify func(CloseNotifyFunc) CloseNotifyFunc
+ Hijack func(HijackFunc) HijackFunc
+ ReadFrom func(ReadFromFunc) ReadFromFunc
+}
+
+// Wrap returns a wrapped version of w that provides the exact same interface
+// as w. Specifically if w implements any combination of:
+//
+// - http.Flusher
+// - http.CloseNotifier
+// - http.Hijacker
+// - io.ReaderFrom
+//
+// The wrapped version will implement the exact same combination. If no hooks
+// are set, the wrapped version also behaves exactly as w. Hooks targeting
+// methods not supported by w are ignored. Any other hooks will intercept the
+// method they target and may modify the call's arguments and/or return values.
+// The CaptureMetrics implementation serves as a working example for how the
+// hooks can be used.
+func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter {
+ rw := &rw{w: w, h: hooks}
+ _, i0 := w.(http.Flusher)
+ _, i1 := w.(http.CloseNotifier)
+ _, i2 := w.(http.Hijacker)
+ _, i3 := w.(io.ReaderFrom)
+ switch {
+ // combination 1/16
+ case !i0 && !i1 && !i2 && !i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ }{rw, rw}
+ // combination 2/16
+ case !i0 && !i1 && !i2 && i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ io.ReaderFrom
+ }{rw, rw, rw}
+ // combination 3/16
+ case !i0 && !i1 && i2 && !i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Hijacker
+ }{rw, rw, rw}
+ // combination 4/16
+ case !i0 && !i1 && i2 && i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Hijacker
+ io.ReaderFrom
+ }{rw, rw, rw, rw}
+ // combination 5/16
+ case !i0 && i1 && !i2 && !i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ }{rw, rw, rw}
+ // combination 6/16
+ case !i0 && i1 && !i2 && i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ io.ReaderFrom
+ }{rw, rw, rw, rw}
+ // combination 7/16
+ case !i0 && i1 && i2 && !i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ http.Hijacker
+ }{rw, rw, rw, rw}
+ // combination 8/16
+ case !i0 && i1 && i2 && i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.CloseNotifier
+ http.Hijacker
+ io.ReaderFrom
+ }{rw, rw, rw, rw, rw}
+ // combination 9/16
+ case i0 && !i1 && !i2 && !i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ }{rw, rw, rw}
+ // combination 10/16
+ case i0 && !i1 && !i2 && i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ io.ReaderFrom
+ }{rw, rw, rw, rw}
+ // combination 11/16
+ case i0 && !i1 && i2 && !i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.Hijacker
+ }{rw, rw, rw, rw}
+ // combination 12/16
+ case i0 && !i1 && i2 && i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.Hijacker
+ io.ReaderFrom
+ }{rw, rw, rw, rw, rw}
+ // combination 13/16
+ case i0 && i1 && !i2 && !i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ }{rw, rw, rw, rw}
+ // combination 14/16
+ case i0 && i1 && !i2 && i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ io.ReaderFrom
+ }{rw, rw, rw, rw, rw}
+ // combination 15/16
+ case i0 && i1 && i2 && !i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ http.Hijacker
+ }{rw, rw, rw, rw, rw}
+ // combination 16/16
+ case i0 && i1 && i2 && i3:
+ return struct {
+ Unwrapper
+ http.ResponseWriter
+ http.Flusher
+ http.CloseNotifier
+ http.Hijacker
+ io.ReaderFrom
+ }{rw, rw, rw, rw, rw, rw}
+ }
+ panic("unreachable")
+}
+
+type rw struct {
+ w http.ResponseWriter
+ h Hooks
+}
+
+func (w *rw) Unwrap() http.ResponseWriter {
+ return w.w
+}
+
+func (w *rw) Header() http.Header {
+ f := w.w.(http.ResponseWriter).Header
+ if w.h.Header != nil {
+ f = w.h.Header(f)
+ }
+ return f()
+}
+
+func (w *rw) WriteHeader(code int) {
+ f := w.w.(http.ResponseWriter).WriteHeader
+ if w.h.WriteHeader != nil {
+ f = w.h.WriteHeader(f)
+ }
+ f(code)
+}
+
+func (w *rw) Write(b []byte) (int, error) {
+ f := w.w.(http.ResponseWriter).Write
+ if w.h.Write != nil {
+ f = w.h.Write(f)
+ }
+ return f(b)
+}
+
+func (w *rw) Flush() {
+ f := w.w.(http.Flusher).Flush
+ if w.h.Flush != nil {
+ f = w.h.Flush(f)
+ }
+ f()
+}
+
+func (w *rw) CloseNotify() <-chan bool {
+ f := w.w.(http.CloseNotifier).CloseNotify
+ if w.h.CloseNotify != nil {
+ f = w.h.CloseNotify(f)
+ }
+ return f()
+}
+
+func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) {
+ f := w.w.(http.Hijacker).Hijack
+ if w.h.Hijack != nil {
+ f = w.h.Hijack(f)
+ }
+ return f()
+}
+
+func (w *rw) ReadFrom(src io.Reader) (int64, error) {
+ f := w.w.(io.ReaderFrom).ReadFrom
+ if w.h.ReadFrom != nil {
+ f = w.h.ReadFrom(f)
+ }
+ return f(src)
+}
+
+type Unwrapper interface {
+ Unwrap() http.ResponseWriter
+}
+
+// Unwrap returns the underlying http.ResponseWriter from within zero or more
+// layers of httpsnoop wrappers.
+func Unwrap(w http.ResponseWriter) http.ResponseWriter {
+ if rw, ok := w.(Unwrapper); ok {
+ // recurse until rw.Unwrap() returns a non-Unwrapper
+ return Unwrap(rw.Unwrap())
+ } else {
+ return w
+ }
+}
diff --git a/vendor/github.com/getsops/gopgagent/LICENSE b/vendor/github.com/getsops/gopgagent/LICENSE
new file mode 100644
index 000000000..261eeb9e9
--- /dev/null
+++ b/vendor/github.com/getsops/gopgagent/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/go.mozilla.org/gopgagent/gpgagent.go b/vendor/github.com/getsops/gopgagent/gpgagent.go
similarity index 93%
rename from vendor/go.mozilla.org/gopgagent/gpgagent.go
rename to vendor/github.com/getsops/gopgagent/gpgagent.go
index b16ec0e03..74b56af67 100644
--- a/vendor/go.mozilla.org/gopgagent/gpgagent.go
+++ b/vendor/github.com/getsops/gopgagent/gpgagent.go
@@ -26,6 +26,7 @@ import (
"encoding/hex"
"errors"
"fmt"
+ "io/fs"
"io"
"net"
@@ -68,6 +69,16 @@ func NewConn() (*Conn, error) {
return nil, ErrNoAgent
}
sockFile := path.Join(currentUser.HomeDir, ".gnupg", "S.gpg-agent")
+ IsSocket := func(path string) bool {
+ fileInfo, err := os.Stat(path)
+ if err != nil {
+ return false
+ }
+ return fileInfo.Mode().Type() == fs.ModeSocket
+ }
+ if runtimeDir, ok := os.LookupEnv("XDG_RUNTIME_DIR"); IsSocket(sockFile) == false && ok {
+ sockFile = path.Join(runtimeDir, "gnupg", "S.gpg-agent")
+ }
addr = &net.UnixAddr{Net: "unix", Name: sockFile}
}
uc, err := net.DialUnix("unix", nil, addr)
diff --git a/vendor/github.com/getsops/sops/v3/.gitignore b/vendor/github.com/getsops/sops/v3/.gitignore
new file mode 100644
index 000000000..5eb4a860c
--- /dev/null
+++ b/vendor/github.com/getsops/sops/v3/.gitignore
@@ -0,0 +1,5 @@
+bin/
+dist/
+functional-tests/sops
+vendor/
+profile.out
diff --git a/vendor/github.com/getsops/sops/v3/.goreleaser.yaml b/vendor/github.com/getsops/sops/v3/.goreleaser.yaml
new file mode 100644
index 000000000..b28f8d52c
--- /dev/null
+++ b/vendor/github.com/getsops/sops/v3/.goreleaser.yaml
@@ -0,0 +1,370 @@
+# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
+
+project_name: sops
+
+# xref: https://goreleaser.com/customization/hooks/
+before:
+ hooks:
+ - go mod download
+
+# xref: https://goreleaser.com/customization/env/
+env:
+ - CGO_ENABLED=0
+ - PKG=github.com/getsops/sops/v3/version
+ - COSIGN_YES=true
+
+# xref: https://goreleaser.com/customization/reportsizes/
+report_sizes: true
+
+# xref: https://goreleaser.com/customization/build/
+builds:
+ - id: binary-linux
+ main: ./cmd/sops
+ binary: "{{ .ProjectName }}"
+ flags:
+ - -trimpath
+ - -mod=readonly
+ ldflags:
+ - >
+ -s -w
+ -X "{{ .Env.PKG }}.Version={{ .Version }}"
+ goos:
+ - linux
+ goarch:
+ - amd64
+ - arm64
+ # Modified timestamp on the binary, set to ensure reproducible builds.
+ mod_timestamp: "{{ .CommitTimestamp }}"
+
+ - id: binary-darwin
+ main: ./cmd/sops
+ binary: "{{ .ProjectName }}"
+ flags:
+ - -trimpath
+ - -mod=readonly
+ ldflags:
+ - >
+ -s -w
+ -X {{ .Env.PKG }}.Version={{ .Version }}
+ goos:
+ - darwin
+ goarch:
+ - amd64
+ - arm64
+ # Modified timestamp on the binary, set to ensure reproducible builds.
+ mod_timestamp: "{{ .CommitTimestamp }}"
+
+ - id: binary-windows
+ main: ./cmd/sops
+ binary: "{{ .ProjectName }}"
+ flags:
+ - -trimpath
+ - -buildmode=pie
+ - -mod=readonly
+ ldflags:
+ - >
+ -s -w
+ -X {{ .Env.PKG }}.Version={{ .Version }}
+ goos:
+ - windows
+ goarch:
+ - amd64
+ # Modified timestamp on the binary, set to ensure reproducible builds.
+ mod_timestamp: "{{ .CommitTimestamp }}"
+
+# xref: https://goreleaser.com/customization/universalbinaries/
+universal_binaries:
+ - id: binary-darwin-universal
+ ids:
+ - binary-darwin
+ name_template: '{{ .ProjectName }}'
+ # We want to continue to ship individual binaries for darwin/amd64 and
+ # darwin/arm64.
+ replace: false
+ # Modified timestamp on the binary, set to ensure reproducible builds.
+ # NB: Available in GoReleaser >=1.20.0.
+ mod_timestamp: "{{ .CommitTimestamp }}"
+
+# xref: https://goreleaser.com/customization/nfpm/
+nfpms:
+ - id: deb
+ package_name: '{{ .ProjectName }}'
+ file_name_template: '{{ .ConventionalFileName }}'
+ vendor: CNCF SOPS
+ homepage: https://github.com/{{ .Env.GITHUB_REPOSITORY }}
+ maintainer: SOPS maintainers
+ description: Simple and flexible tool for managing secrets
+ license: MPL-2.0
+ formats:
+ - deb
+ - rpm
+
+# xref: https://goreleaser.com/customization/snapshots/
+snapshot:
+ name_template: "{{ incpatch .Version }}-dev-{{ .ShortCommit }}"
+
+# xref: https://goreleaser.com/customization/archive/#disable-archiving
+archives:
+ - id: archive-unix
+ format: binary
+ builds:
+ - binary-linux
+ - binary-darwin
+ # NB: specifically crafted to ensure compatibility with release artifacts < v3.8.0.
+ name_template: '{{ .ProjectName }}-v{{ .Version }}.{{ .Os }}.{{ .Arch }}'
+
+ - id: archive-windows
+ format: binary
+ builds:
+ - binary-windows
+ # NB: specifically crafted to ensure compatibility with release artifacts < v3.8.0.
+ name_template: '{{ .ProjectName }}-v{{ .Version }}'
+
+ - id: archive-darwin-universal
+ format: binary
+ builds:
+ - binary-darwin-universal
+ # NB: specifically crafted to ensure compatibility with release artifacts < v3.8.0.
+ # We can't bundle this with the other unix archive, because .Arch becomes "all".
+ # Before v3.8.0, this used to be _just_ the AMD64 binary.
+ name_template: '{{ .ProjectName }}-v{{ .Version }}.darwin'
+
+# xref: https://goreleaser.com/customization/checksum/
+checksum:
+ name_template: "{{ .ProjectName }}-v{{ .Version }}.checksums.txt"
+ algorithm: sha256
+ ids:
+ - archive-unix
+ - archive-windows
+ - archive-darwin-universal
+
+# xref: https://goreleaser.com/customization/sbom/
+sboms:
+ - id: binary-sbom
+ artifacts: binary
+ documents:
+ - "{{ .ArtifactName }}.spdx.sbom.json"
+
+# xref: https://goreleaser.com/customization/sign/
+signs:
+ - cmd: cosign
+ artifacts: checksum
+ signature: '{{ trimsuffix .Env.artifact ".txt" }}.sig'
+ certificate: '{{ trimsuffix .Env.artifact ".txt" }}.pem'
+ args:
+ - "sign-blob"
+ - "--output-signature"
+ - "${signature}"
+ - "--output-certificate"
+ - "${certificate}"
+ - "${artifact}"
+ output: true
+
+# xref: https://goreleaser.com/customization/docker/
+dockers:
+ - image_templates:
+ - 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-amd64'
+ - 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-amd64'
+ use: buildx
+ goos: linux
+ goarch: amd64
+ ids:
+ - binary-linux
+ dockerfile: .release/Dockerfile
+ build_flag_templates:
+ - "--pull"
+ - "--platform=linux/amd64"
+ - "--label=org.opencontainers.image.created={{ .Date }}"
+ - "--label=org.opencontainers.image.title={{ .ProjectName }}"
+ - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
+ - "--label=org.opencontainers.image.version={{ .Version }}"
+ - "--label=org.opencontainers.image.source={{ .GitURL }}"
+
+ - image_templates:
+ - 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-arm64'
+ - 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-arm64'
+ use: buildx
+ goos: linux
+ goarch: arm64
+ ids:
+ - binary-linux
+ dockerfile: .release/Dockerfile
+ build_flag_templates:
+ - "--pull"
+ - "--platform=linux/arm64"
+ - "--label=org.opencontainers.image.created={{ .Date }}"
+ - "--label=org.opencontainers.image.title={{ .ProjectName }}"
+ - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
+ - "--label=org.opencontainers.image.version={{ .Version }}"
+ - "--label=org.opencontainers.image.source={{ .GitURL }}"
+
+ - image_templates:
+ - 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine-amd64'
+ - 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine-amd64'
+ use: buildx
+ goos: linux
+ goarch: amd64
+ ids:
+ - binary-linux
+ dockerfile: .release/alpine.Dockerfile
+ build_flag_templates:
+ - "--pull"
+ - "--platform=linux/amd64"
+ - "--label=org.opencontainers.image.created={{ .Date }}"
+ - "--label=org.opencontainers.image.title={{ .ProjectName }}"
+ - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
+ - "--label=org.opencontainers.image.version={{ .Version }}"
+ - "--label=org.opencontainers.image.source={{ .GitURL }}"
+
+ - image_templates:
+ - 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine-arm64'
+ - 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine-arm64'
+ use: buildx
+ goos: linux
+ goarch: arm64
+ ids:
+ - binary-linux
+ dockerfile: .release/alpine.Dockerfile
+ build_flag_templates:
+ - "--pull"
+ - "--platform=linux/arm64"
+ - "--label=org.opencontainers.image.created={{ .Date }}"
+ - "--label=org.opencontainers.image.title={{ .ProjectName }}"
+ - "--label=org.opencontainers.image.revision={{ .FullCommit }}"
+ - "--label=org.opencontainers.image.version={{ .Version }}"
+ - "--label=org.opencontainers.image.source={{ .GitURL }}"
+
+# xref: https://goreleaser.com/customization/docker_manifest/
+docker_manifests:
+ - name_template: 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}'
+ image_templates:
+ - 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-amd64'
+ - 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-arm64'
+
+ - name_template: 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine'
+ image_templates:
+ - 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine-amd64'
+ - 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine-arm64'
+
+ - name_template: 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}'
+ image_templates:
+ - 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-amd64'
+ - 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-arm64'
+
+ - name_template: 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine'
+ image_templates:
+ - 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine-amd64'
+ - 'quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine-arm64'
+
+# xref: https://goreleaser.com/customization/docker_sign/
+docker_signs:
+ - cmd: cosign
+ artifacts: all
+ output: true
+ args:
+ - "sign"
+ - "${artifact}@${digest}"
+
+# xref: https://goreleaser.com/customization/changelog/
+changelog:
+ # xref: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuration-options
+ # xref: https://docs.github.com/en/free-pro-team@latest/rest/releases/releases?apiVersion=2022-11-28#generate-release-notes-content-for-a-release
+ use: github-native
+
+# xref: https://goreleaser.com/customization/release/
+release:
+ prerelease: auto
+ header: |
+ ## Installation
+
+ To install `{{ .ProjectName }}`, download one of the pre-built binaries provided for your platform from the artifacts attached to this release.
+
+ For instance, if you are using Linux on an AMD64 architecture:
+
+ ```shell
+ # Download the binary
+ curl -LO https://github.com/{{ .Env.GITHUB_REPOSITORY }}/releases/download/{{ .Tag }}/{{ .ProjectName }}-v{{ .Version }}.linux.amd64
+
+ # Move the binary in to your PATH
+ mv {{ .ProjectName }}-v{{ .Version }}.linux.amd64 /usr/local/bin/{{ .ProjectName }}
+
+ # Make the binary executable
+ chmod +x /usr/local/bin/{{ .ProjectName }}
+ ```
+
+ ### Verify checksums file signature
+
+ The checksums file provided within the artifacts attached to this release is signed using [Cosign](https://docs.sigstore.dev/cosign/overview/) with GitHub OIDC. To validate the signature of this file, run the following commands:
+
+ ```shell
+ # Download the checksums file, certificate and signature
+ curl -LO https://github.com/{{ .Env.GITHUB_REPOSITORY }}/releases/download/{{ .Tag }}/{{ .ProjectName }}-v{{ .Version }}.checksums.txt
+ curl -LO https://github.com/{{ .Env.GITHUB_REPOSITORY }}/releases/download/{{ .Tag }}/{{ .ProjectName }}-v{{ .Version }}.checksums.pem
+ curl -LO https://github.com/{{ .Env.GITHUB_REPOSITORY }}/releases/download/{{ .Tag }}/{{ .ProjectName }}-v{{ .Version }}.checksums.sig
+
+ # Verify the checksums file
+ cosign verify-blob {{ .ProjectName }}-v{{ .Version }}.checksums.txt \
+ --certificate {{ .ProjectName }}-v{{ .Version }}.checksums.pem \
+ --signature {{ .ProjectName }}-v{{ .Version }}.checksums.sig \
+ --certificate-identity-regexp=https://github.com/{{ .Env.GITHUB_REPOSITORY_OWNER }} \
+ --certificate-oidc-issuer=https://token.actions.githubusercontent.com
+ ```
+
+ ### Verify binary integrity
+
+ To verify the integrity of the downloaded binary, you can utilize the checksums file after having validated its signature:
+
+ ```shell
+ # Verify the binary using the checksums file
+ sha256sum -c {{ .ProjectName }}-v{{ .Version }}.checksums.txt --ignore-missing
+ ```
+
+ ### Verify artifact provenance
+
+ The [SLSA provenance](https://slsa.dev/provenance/v0.2) of the binaries, packages, and SBOMs can be found within the artifacts associated with this release. It is presented through an [in-toto](https://in-toto.io/) link metadata file named `sops-v{{ .Version }}.intoto.jsonl`. To verify the provenance of an artifact, you can utilize the [`slsa-verifier`](https://github.com/slsa-framework/slsa-verifier#artifacts) tool:
+
+ ```shell
+ # Download the metadata file
+ curl -LO https://github.com/{{ .Env.GITHUB_REPOSITORY }}/releases/download/{{ .Tag }}/sops-v{{ .Version }}.intoto.jsonl
+
+ # Verify the provenance of the artifact
+ slsa-verifier verify-artifact \
+ --provenance-path sops-v{{ .Version }}.intoto.jsonl \
+ --source-uri github.com/{{ .Env.GITHUB_REPOSITORY }} \
+ --source-tag {{ .Tag }}
+ ```
+
+ ## Container Images
+
+ The `{{ .ProjectName }}` binaries are also available as container images, based on Debian (slim) and Alpine Linux. The Debian-based container images include any dependencies which may be required to make use of certain key services, such as GnuPG, AWS KMS, Azure Key Vault, and Google Cloud KMS. The Alpine-based container images are smaller in size, but do not include these dependencies.
+
+ These container images are available for the following architectures: `linux/amd64` and `linux/arm64`.
+
+ ### GitHub Container Registry
+
+ - `ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}`
+ - `ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine`
+
+ ### Quay.io
+
+ - `quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}`
+ - `quay.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }}-alpine`
+
+ ### Verify container image signature
+
+ The container images are signed using [Cosign](https://docs.sigstore.dev/cosign/overview/) with GitHub OIDC. To validate the signature of an image, run the following command:
+
+ ```shell
+ cosign verify ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:v{{ .Version }} \
+ --certificate-identity-regexp=https://github.com/{{ .Env.GITHUB_REPOSITORY_OWNER }} \
+ --certificate-oidc-issuer=https://token.actions.githubusercontent.com \
+ -o text
+ ```
+
+ ### Verify container image provenance
+
+ The container images include [SLSA provenance](https://slsa.dev/provenance/v0.2) attestations. For more information around the verification of this, please refer to the [`slsa-verifier` documentation](https://github.com/slsa-framework/slsa-verifier#containers).
+
+ ## Software Bill of Materials
+
+ The Software Bill of Materials (SBOM) for each binary is accessible within the artifacts enclosed with this release. It is presented as an [SPDX](https://spdx.dev/) JSON file, formatted as `.spdx.sbom.json`.
diff --git a/vendor/github.com/getsops/sops/v3/.sops.yaml b/vendor/github.com/getsops/sops/v3/.sops.yaml
new file mode 100644
index 000000000..3fce56874
--- /dev/null
+++ b/vendor/github.com/getsops/sops/v3/.sops.yaml
@@ -0,0 +1,4 @@
+creation_rules:
+ - pgp: >-
+ FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4,
+ D7229043384BCC60326C6FB9D8720D957C3D3074
diff --git a/vendor/github.com/getsops/sops/v3/CHANGELOG.rst b/vendor/github.com/getsops/sops/v3/CHANGELOG.rst
new file mode 100644
index 000000000..dff3e040a
--- /dev/null
+++ b/vendor/github.com/getsops/sops/v3/CHANGELOG.rst
@@ -0,0 +1,527 @@
+Changelog
+=========
+
+3.9.3
+-----
+
+Improvements:
+
+* Dependency updates (#1699, #1703, #1710, #1714, #1715, #1723).
+* Add ``persist-credentials: false`` to checkouts in GitHub workflows (#1704).
+* Tests: use container images from https://github.com/getsops/ci-container-images (#1722).
+
+Bugfixes:
+
+* GnuPG: do not incorrectly trim fingerprint in presence of exclamation marks for specfic subkey selection (#1720).
+* ``updatekeys`` subcommand: fix ``--input-type`` CLI flag being ignored (#1721).
+
+Project changes:
+
+* CI dependency updates (#1698, #1708, #1717).
+* Rust dependency updates (#1707, #1716, #1725).
+
+
+3.9.2
+-----
+
+Improvements:
+
+* Dependency updates (#1645, #1649, #1653, #1662, #1686, #1693).
+* Update compiled Protobuf definitions (#1688).
+* Remove unused variables and simplify conditional (##1687).
+
+Bugfixes:
+
+* Handle whitespace in Azure Key Vault URLs (#1652).
+* Correctly handle comments during JSON serialization (#1647).
+
+Project changes:
+
+* CI dependency updates (#1644, #1648, #1654, #1664, #1673, #1677, #1685).
+* Rust dependency updates (#1655, #1663, #1670, #1676, #1689).
+* Update and improve Protobuf code generation (#1688).
+
+
+3.9.1
+-----
+
+Improvements:
+
+* Dependency updates (#1550, #1554, #1558, #1562, #1565, #1568, #1575, #1581, #1589, #1593, #1602, #1603, #1618, #1629, #1635, #1639, #1640).
+* Clarify naming of the configuration file in the documentation (#1569).
+* Build with Go 1.22 (#1589).
+* Specify filename of missing file in error messages (#1625).
+* ``updatekeys`` subcommand: show changes in ``shamir_threshold`` (#1609).
+
+Bugfixes:
+
+* Fix the URL used for determining the latest SOPS version (#1553).
+* ``updatekeys`` subcommand: actually use option ``--shamir-secret-sharing-threshold`` (#1608).
+* Fix ``--config`` being ignored in subcommands by ``loadConfig`` (#1613).
+* Allow ``edit`` subcommand to create files (#1596).
+* Do not encrypt if a key group is empty, or there are no key groups (#1600).
+* Do not ignore config errors when trying to parse a config file (#1614).
+
+Project changes:
+
+* CI dependency updates (#1551, #1555, #1559, #1564, #1566, #1574, #1584, #1586, #1590, #1592, #1619, #1628, #1634).
+* Improve CI workflows (#1548, #1630).
+* Ignore user-set environment variable ``SOPS_AGE_KEY_FILE`` in tests (#1595).
+* Add example of using Age recipients in ``.sops.yaml`` (#1607).
+* Add linting check for Rust code formatting (#1604).
+* Set Rust version globally via ``rust-toolchain.toml`` for functional tests (#1612).
+* Improve test coverage (#1617).
+* Improve tests (#1622, #1624).
+* Simplify branch rules to check DCO and ``check`` task instead of an explicit list of tasks in the CLI workflow (#1621).
+* Build with Go 1.22 and 1.23 in CI and update Vault to 1.14 (#1531).
+* Build release with Go 1.22 (#1615).
+* Fix Dependabot config for Docker; add Dependabot config for Rust (#1632).
+* Lock Rust package versions for functional tests for improved reproducibility (#1637).
+* Rust dependency updates (#1638).
+
+3.9.0
+-----
+Features:
+
+* Add ``--mac-only-encrypted`` to compute MAC only over values which end up encrypted (#973)
+* Allow configuration of indentation for YAML and JSON stores (#1273, #1372)
+* Introduce a ``--pristine`` flag to ``sops exec-env`` (#912)
+* Allow to pass multiple paths to ``sops updatekeys`` (#1274)
+* Allow to override ``fileName`` with different value (#1332)
+* Sort masterkeys according to ``--decryption-order`` (#1345)
+* Add separate subcommands for encryption, decryption, rotating, editing, and setting values (#1391)
+* Add ``filestatus`` command (#545)
+* Add command ``unset`` (#1475)
+* Merge key for key groups and make keys unique (#1493)
+* Support using comments to select parts to encrypt (#974, #1392)
+
+Deprecations:
+
+* Deprecate the ``--background`` option to ``exec-env`` and ``exec-file`` (#1379)
+
+Improvements:
+
+* Warn/fail if the wrong number of arguments is provided (#1342)
+* Warn if more than one command is used (#1388)
+* Dependency updates (#1327, #1328, #1330, #1336, #1334, #1344, #1348, #1354, #1357, #1360, #1373, #1381, #1383, #1385, #1408, #1428, #1429, #1427, #1439, #1454, #1460, #1466, #1489, #1519, #1525, #1528, #1540, #1543, #1545)
+* Build with Go 1.21 (#1427)
+* Improve README.rst (#1339, #1399, #1350)
+* Fix typos (#1337, #1477, #1484)
+* Polish the ``sops help`` output a bit (#1341, #1544)
+* Improve and fix tests (#1346, #1349, #1370, #1390, #1396, #1492)
+* Create a constant for the ``sops`` metadata key (#1398)
+* Refactoring: move extraction of encryption and rotation options to separate functions (#1389)
+
+Bug fixes:
+
+* Respect ``aws_profile`` from keygroup config (#1049)
+* Fix a bug where not having a config results in a panic (#1371)
+* Consolidate Flatten/Unflatten pre/post processing (#1356)
+* INI and DotEnv stores: ``shamir_threshold`` is an integer (#1394)
+* Make check whether file contains invalid keys for encryption dependent on output store (#1393)
+* Do not panic if ``updatekeys`` is used with a config that has no creation rules defined (#1506)
+* ``exec-file``: if ``--filename`` is used, use the provided filename without random suffix (#1474)
+* Do not use DotEnv store for ``exec-env``, but specialized environment serializing code (#1436)
+* Decryption: do not fail if no matching ``creation_rule`` is present in config file (#1434)
+
+Project changes:
+
+* CI dependency updates (#1347, #1359, #1376, #1382, #1386, #1425, #1432, #1498, #1503, #1508, #1510, #1516, #1521, #1492, #1534)
+* Adjust Makefile to new goreleaser 6.0.0 release (#1526)
+
+3.8.1
+-----
+Improvements:
+
+* Improve handling of errors when binary store handles bad data (#1289)
+* On macOS, prefer ``XDG_CONFIG_HOME`` over os.UserConfigDir() (#1291)
+* Dependency updates (#1306, #1319, #1325)
+* pgp: better error reporting for missing GPG binary during import of keys (#1286)
+* Fix descriptions of unencrypted-regex and encrypted-regex flags, and ensure unencrypted_regex is considered in config validation (#1300)
+* stores/json: improve error messages when parsing invalid JSON (#1307)
+
+Bug fixes:
+
+* pgp: improve handling of GnuPG home dir (#1298)
+* Do not crash if an empty YAML file is encrypted (#1290)
+* Handling of various ignored errors (#1304, #1311)
+* pgp: do not require abs path for ``SOPS_GPG_EXEC`` (#1309)
+* Report key rotation errors (#1317)
+* Ensure wrapping of errors in main package (#1318)
+
+Project changes:
+
+* Enrich AWS authentication documentation (#1272)
+* Add linting for RST and MD files (#1287)
+* Delete SOPS encrypted file we don't have keys for (#1288)
+* CI dependency updates (#1295, #1301)
+* pgp: make error the last return value (#1310)
+* Improve documentation files (#1320)
+
+3.8.0
+-----
+Features:
+
+* Support ``--version`` without network requests using ``--disable-version-check`` (#1115)
+* Support ``--input-type`` for updatekeys command (#1116)
+
+Improvements:
+
+* pgp: modernize and improve, and add tests (#1054, #1282)
+* azkv: update SDK to latest, add tests, tidy (#1067, #1092, #1256)
+* age: improve identity loading, add tests, tidy (#1064)
+* kms: AWS SDK V2, allow creds config, add tests (#1065, #1257)
+* gcpkms: update SDK to latest, add tests, tidy (#1072, #1255)
+* hcvault: update API, add tests, tidy (#1085)
+* Do not report version when upstream ``--version`` check fails (#1124)
+* Use GitHub endpoints in ``--version`` command (#1261)
+* Close temporary file before invoking editor to widen support on Windows (#1265)
+* Update dependencies (#1063, #1091, #1147, #1242, #1260, #1264, #1275, #1280, #1283)
+* Deal with various deprecations of dependencies (#1113, #1262)
+
+Bug fixes:
+
+* Ensure YAML comments are not displaced (#1069)
+* Ensure default Google credentials can be used again after introduction of ``GOOGLE_CREDENTIALS`` (#1249)
+* Avoid duplicate logging of errors in some key sources (#1146, #1281)
+* Using ``--set`` on a root level key does no longer truncate existing values (#899)
+* Ensure stable order of SOPS parameters in dotenv file (#1101)
+
+Project changes:
+
+* Update Go to 1.20 (#1148)
+* Update rustc functional tests to v1.70.0 (#1234)
+* Remove remaining CircleCI workflow (#1237)
+* Run CLI workflow on main (#1243)
+* Delete obsolete ``validation/`` artifact (#1248)
+* Rename Go module to ``github.com/getsops/sops/v3`` (#1247)
+* Revamp release automation, including (Cosign) signed container images and checksums file, SLSA3 provenance and SBOMs (#1250)
+* Update various bits of documentation (#1244)
+* Add missing ``--encrypt`` flag from Vault example (#1060)
+* Add documentation on how to use age in ``.sops.yaml`` (#1192)
+* Improve Make targets and address various issues (#1258)
+* Ensure clean working tree in CI (#1267)
+* Fix CHANGELOG.rst formatting (#1269)
+* Pin GitHub Actions to full length commit SHA and add CodeQL (#1276)
+* Enable Dependabot for Docker, GitHub Actions and Go Mod (#1277)
+* Generate versioned ``.intoto.jsonl`` (#1278)
+* Update CI dependencies (#1279)
+
+3.7.3
+-----
+Changes:
+
+* Upgrade dependencies (#1024, #1045)
+* Build alpine container in CI (#1018, #1032, #1025)
+* keyservice: accept KeyServiceServer in LocalClient (#1035)
+* Add support for GCP Service Account within ``GOOGLE_CREDENTIALS`` (#953)
+
+Bug fixes:
+
+* Upload the correct binary for the linux amd64 build (#1026)
+* Fix bug when specifying multiple age recipients (#966)
+* Allow for empty yaml maps (#908)
+* Limit AWS role names to 64 characters (#1037)
+
+3.7.2
+-----
+Changes:
+
+* README updates (#861, #860)
+* Various test fixes (#909, #906, #1008)
+* Added Linux and Darwin arm64 releases (#911, #891)
+* Upgrade to go v1.17 (#1012)
+* Support SOPS_AGE_KEY environment variable (#1006)
+
+Bug fixes:
+
+* Make sure comments in yaml files are not duplicated (#866)
+* Make sure configuration file paths work correctly relative to the config file in us (#853)
+
+3.7.1
+-----
+Changes:
+
+* Security fix
+* Add release workflow (#843)
+* Fix issue where CI wouldn't run against master (#848)
+* Trim extra whitespace around age keys (#846)
+
+3.7.0
+-----
+Features:
+
+* Add support for age (#688)
+* Add filename to exec-file (#761)
+
+Changes:
+
+* On failed decryption with GPG, return the error returned by GPG to the sops user (#762)
+* Use yaml.v3 instead of modified yaml.v2 for handling YAML files (#791)
+* Update aws-sdk-go to version v1.37.18 (#823)
+
+Project Changes:
+
+* Switch from TravisCI to Github Actions (#792)
+
+3.6.1
+-----
+Features:
+
+* Add support for --unencrypted-regex (#715)
+
+Changes:
+
+* Use keys.openpgp.org instead of gpg.mozilla.org (#732)
+* Upgrade AWS SDK version (#714)
+* Support --input-type for exec-file (#699)
+
+Bug fixes:
+
+* Fixes broken Vault tests (#731)
+* Revert "Add standard newline/quoting behavior to dotenv store" (#706)
+
+
+3.6.0
+-----
+Features:
+
+* Support for encrypting data through the use of Hashicorp Vault (#655)
+* ``sops publish`` now supports ``--recursive`` flag for publishing all files in a directory (#602)
+* ``sops publish`` now supports ``--omit-extensions`` flag for omitting the extension in the destination path (#602)
+* sops now supports JSON arrays of arrays (#642)
+
+Improvements:
+
+* Updates and standardization for the dotenv store (#612, #622)
+* Close temp files after using them for edit command (#685)
+
+Bug fixes:
+
+* AWS SDK usage now correctly resolves the ``~/.aws/config`` file (#680)
+* ``sops updatekeys`` now correctly matches config rules (#682)
+* ``sops updatekeys`` now correctly uses the config path cli flag (#672)
+* Partially empty sops config files don't break the use of sops anymore (#662)
+* Fix possible infinite loop in PGP's passphrase prompt call (#690)
+
+Project changes:
+
+* Dockerfile now based off of golang version 1.14 (#649)
+* Push alpine version of docker image to Dockerhub (#609)
+* Push major, major.minor, and major.minor.patch tagged docker images to Dockerhub (#607)
+* Removed out of date contact information (#668)
+* Update authors in the cli help text (#645)
+
+
+3.5.0
+-----
+Features:
+
+* ``sops exec-env`` and ``sops exec-file``, two new commands for utilizing sops secrets within a temporary file or env vars
+
+Bug fixes:
+
+* Sanitize AWS STS session name, as sops creates it based off of the machines hostname
+* Fix for ``decrypt.Data`` to support ``.ini`` files
+* Various package fixes related to switching to Go Modules
+* Fixes for Vault-related tests running locally and in CI.
+
+Project changes:
+
+* Change to proper use of go modules, changing to primary module name to ``go.mozilla.org/sops/v3``
+* Change tags to requiring a ``v`` prefix.
+* Add documentation for ``sops updatekeys`` command
+
+3.4.0
+-----
+Features:
+
+* ``sops publish``, a new command for publishing sops encrypted secrets to S3, GCS, or Hashicorp Vault
+* Support for multiple Azure authentication mechanisms
+* Azure Keyvault support to the sops config file
+* ``encrypted_regex`` option to the sops config file
+
+Bug fixes:
+
+* Return non-zero exit code for invalid CLI flags
+* Broken path handling for sops editing on Windows
+* ``go lint/fmt`` violations
+* Check for pgp fingerprint before slicing it
+
+Project changes:
+
+* Build container using golang 1.12
+* Switch to using go modules
+* Hashicorp Vault server in Travis CI build
+* Mozilla Publice License file to repo
+* Replaced expiring test gpg keys
+
+3.3.1
+-----
+
+Bug fixes:
+
+* Make sure the pgp key fingerprint is longer than 16 characters before
+ slicing it. (#463)
+* Allow for ``--set`` value to be a string. (#461)
+
+Project changes:
+
+* Using ``develop`` as a staging branch to create releases off of. What
+ is in ``master`` is now the current stable release.
+* Upgrade to using Go 1.12 to build sops
+* Updated all vendored packages
+
+3.3.0
+-----
+
+New features:
+
+* Multi-document support for YAML files
+* Support referencing AWS KMS keys by their alias
+* Support for INI files
+* Support for AWS CLI profiles
+* Comment support in .env files
+* Added vi to the list of known editors
+* Added a way to specify the GPG key server to use through the
+ SOPS_GPG_KEYSERVER environment variable
+
+Bug fixes:
+
+* Now uses $HOME instead of ~ (which didn't work) to find the GPG home
+* Fix panic when vim was not available as an editor, but other
+ alternative editors were
+* Fix issue with AWS KMS Encryption Contexts (#445) with more than one
+ context value failing to decrypt intermittently. Includes an
+ automatic fix for old files affected by this issue.
+
+Project infrastructure changes:
+
+* Added integration tests for AWS KMS
+* Added Code of Conduct
+
+
+3.2.0
+-----
+
+* Added --output flag to write output a file directly instead of
+ through stdout
+* Added support for dotenv files
+
+3.1.1
+-----
+
+* Fix incorrect version number from previous release
+
+3.1.0
+-----
+
+* Add support for Azure Key Service
+
+* Fix bug that prevented JSON escapes in input files from working
+
+3.0.5
+-----
+
+* Prevent files from being encrypted twice
+
+* Fix empty comments not being decrypted correctly
+
+* If keyservicecmd returns an error, log it.
+
+* Initial sops workspace auditing support (still wip)
+
+* Refactor Store interface to reflect operations SOPS performs
+
+3.0.3
+-----
+
+* --set now works with nested data structures and not just simple
+ values
+
+* Changed default log level to warn instead of info
+
+* Avoid creating empty files when using the editor mode to create new
+ files and not making any changes to the example files
+
+* Output unformatted strings when using --extract instead of encoding
+ them to yaml
+
+* Allow forcing binary input and output types from command line flags
+
+* Deprecate filename_regex in favor of path_regex. filename_regex had
+ a bug and matched on the whole file path, when it should have only
+ matched on the file name. path_regex on the other hand is documented
+ to match on the whole file path.
+
+* Add an encrypted-suffix option, the exact opposite of
+ unencrypted-suffix
+
+* Allow specifying unencrypted_suffix and encrypted_suffix rules in
+ the .sops.yaml configuration file
+
+* Introduce key service flag optionally prompting users on
+ encryption/decryption
+
+3.0.1
+-----
+
+* Don't consider io.EOF returned by Decoder.Token as error
+
+* add IsBinary: true to FileHints when encoding with crypto/openpgp
+
+* some improvements to error messages
+
+3.0.0
+-----
+
+* Shamir secret sharing scheme support allows SOPS to require multiple master
+ keys to access a data key and decrypt a file. See ``sops groups -help`` and the
+ documentation in README.
+
+* Keyservice to forward access to a local master key on a socket, similar to
+ gpg-agent. See ``sops keyservice --help`` and the documentation in README.
+
+* Encrypt comments by default
+
+* Support for Google Compute Platform KMS
+
+* Refactor of the store logic to separate the internal representation SOPS
+ has of files from the external representation used in JSON and YAML files
+
+* Reencoding of versions as string on sops 1.X files.
+ **WARNING** this change breaks backward compatibility.
+ SOPS shows an error message with instructions on how to solve
+ this if it happens.
+
+* Added command to reconfigure the keys used to encrypt/decrypt a file based on the .sops.yaml config file
+
+* Retrieve missing PGP keys from gpg.mozilla.org
+
+* Improved error messages for errors when decrypting files
+
+
+2.0.0
+-----
+
+* [major] rewrite in Go
+
+1.14
+----
+
+* [medium] Support AWS KMS Encryption Contexts
+* [minor] Support insertion in encrypted documents via --set
+* [minor] Read location of gpg binary from SOPS_GPG_EXEC env variables
+
+1.13
+----
+
+* [minor] handle $EDITOR variable with parameters
+
+1.12
+----
+
+* [minor] make sure filename_regex gets applied to file names, not paths
+* [minor] move check of latest version under the -V flag
+* [medium] fix handling of binary data to preserve file integrity
+* [minor] try to use configuration when encrypting existing files
diff --git a/vendor/github.com/getsops/sops/v3/CODE_OF_CONDUCT.md b/vendor/github.com/getsops/sops/v3/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..ce578ea48
--- /dev/null
+++ b/vendor/github.com/getsops/sops/v3/CODE_OF_CONDUCT.md
@@ -0,0 +1,5 @@
+# Code of Conduct
+
+This project adheres to the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).
+
+By participating, you are expected to honor this code.
diff --git a/vendor/github.com/getsops/sops/v3/CONTRIBUTING.md b/vendor/github.com/getsops/sops/v3/CONTRIBUTING.md
new file mode 100644
index 000000000..947dcfd48
--- /dev/null
+++ b/vendor/github.com/getsops/sops/v3/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+# Contributing to SOPS
+
+The SOPS project welcomes contributions from everyone. Here are a few guidelines
+and instructions if you are thinking of helping with the development of SOPS.
+
+## Getting started
+
+- Make sure you have Go 1.19 or greater installed. You can find information on
+ how to install Go [here](https://go.dev/doc/install)
+- Clone the Git repository and switch into SOPS's directory.
+- Run the tests with `make test`. They should all pass.
+- If you modify documentation (RST or MD files), run `make checkdocs` to run
+ [rstcheck](https://pypi.org/project/rstcheck/) and
+ [markdownlint](https://github.com/markdownlint/markdownlint). These should also
+ pass. If you need help in fixing issues, create a pull request (see below) and
+ ask for help.
+- Fork the project on GitHub.
+- Add your fork to Git's remotes:
+ - If you use SSH authentication:
+ `git remote add git@github.com:/sops.git`.
+ - Otherwise: `git remote add https://github.com//sops.git`.
+- Make any changes you want to SOPS, commit them, and push them to your fork.
+- **Create a pull request against `main`**, and a maintainer will come by and
+ review your code. They may ask for some changes, and hopefully your
+ contribution will be merged!
+
+## Guidelines
+
+- Unless it's particularly hard, changes that fix a bug should have a regression
+ test to make sure that the bug is not introduced again.
+- New features and changes to existing features should be documented, and, if
+ possible, tested.
+
+## Communication
+
+If you need any help contributing to SOPS, several maintainers are on the
+[`#sops-dev` channel](https://cloud-native.slack.com/archives/C059800AJBT) on
+the [CNCF Slack](https://slack.cncf.io).
diff --git a/vendor/github.com/getsops/sops/v3/DCO b/vendor/github.com/getsops/sops/v3/DCO
new file mode 100644
index 000000000..716561d5d
--- /dev/null
+++ b/vendor/github.com/getsops/sops/v3/DCO
@@ -0,0 +1,36 @@
+Developer Certificate of Origin
+Version 1.1
+
+Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
+660 York Street, Suite 102,
+San Francisco, CA 94110 USA
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+
+
+Developer's Certificate of Origin 1.1
+
+By making a contribution to this project, I certify that:
+
+(a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+(b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+(c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified
+ it.
+
+(d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
diff --git a/vendor/go.mozilla.org/sops/v3/LICENSE b/vendor/github.com/getsops/sops/v3/LICENSE
similarity index 100%
rename from vendor/go.mozilla.org/sops/v3/LICENSE
rename to vendor/github.com/getsops/sops/v3/LICENSE
diff --git a/vendor/github.com/getsops/sops/v3/Makefile b/vendor/github.com/getsops/sops/v3/Makefile
new file mode 100644
index 000000000..1712c17d3
--- /dev/null
+++ b/vendor/github.com/getsops/sops/v3/Makefile
@@ -0,0 +1,136 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+PROJECT := github.com/getsops/sops/v3
+PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
+BIN_DIR := $(PROJECT_DIR)/bin
+
+GO := GOPROXY=https://proxy.golang.org go
+GO_TEST_FLAGS ?= -race -coverprofile=profile.out -covermode=atomic
+
+GITHUB_REPOSITORY ?= github.com/getsops/sops
+
+STATICCHECK := $(BIN_DIR)/staticcheck
+STATICCHECK_VERSION := latest
+
+SYFT := $(BIN_DIR)/syft
+SYFT_VERSION ?= v0.87.0
+
+GORELEASER := $(BIN_DIR)/goreleaser
+GORELEASER_VERSION ?= v1.20.0
+
+PROTOC_GO := $(BIN_DIR)/protoc-gen-go
+PROTOC_GO_VERSION ?= v1.35.2
+
+PROTOC_GO_GRPC := $(BIN_DIR)/protoc-gen-go-grpc
+PROTOC_GO_GRPC_VERSION ?= v1.5.1
+
+RSTCHECK := $(shell command -v rstcheck)
+MARKDOWNLINT := $(shell command -v mdl)
+
+export PATH := $(BIN_DIR):$(PATH)
+
+.PHONY: all
+all: test vet generate install functional-tests
+
+.PHONY: origin-build
+origin-build: test vet generate install functional-tests-all
+
+.PHONY: install
+install:
+ $(GO) install github.com/getsops/sops/v3/cmd/sops
+
+.PHONY: staticcheck
+staticcheck: install-staticcheck
+ $(STATICCHECK) ./...
+
+.PHONY: vendor
+vendor:
+ $(GO) mod tidy
+ $(GO) mod vendor
+
+.PHONY: vet
+vet:
+ $(GO) vet ./...
+
+
+.PHONY: checkdocs
+checkdocs: checkrst checkmd
+
+.PHONY: checkrst
+RST_FILES=$(shell find . -name '*.rst' | grep -v /vendor/ | sort)
+checkrst: $(RST_FILES)
+ @if [ "$(RSTCHECK)" == "" ]; then echo "Need rstcheck to lint RST files. Install rstcheck from your system package repository or from PyPI (https://pypi.org/project/rstcheck/)."; exit 1; fi
+ $(RSTCHECK) --report-level warning $^
+
+.PHONY: checkmd
+MD_FILES=$(shell find . -name '*.md' | grep -v /vendor/ | sort)
+checkmd: $(MD_FILES)
+ @if [ "$(MARKDOWNLINT)" == "" ]; then echo "Need markdownlint to lint RST files. Install markdownlint from your system package repository or from https://github.com/markdownlint/markdownlint."; exit 1; fi
+ $(MARKDOWNLINT) $^
+
+.PHONY: test
+test: vendor
+ gpg --import pgp/sops_functional_tests_key.asc 2>&1 1>/dev/null || exit 0
+ unset SOPS_AGE_KEY_FILE; LANG=en_US.UTF-8 $(GO) test $(GO_TEST_FLAGS) ./...
+
+.PHONY: showcoverage
+showcoverage: test
+ $(GO) tool cover -html=profile.out
+
+.PHONY: generate
+generate: install-protoc-go install-protoc-go-grpc keyservice/keyservice.pb.go
+ $(GO) generate
+
+%.pb.go: %.proto
+ protoc --plugin gen-go=$(PROTOC_GO) --plugin gen-go-grpc=$(PLUGIN_GO_GRPC) --go-grpc_opt=require_unimplemented_servers=false --go-grpc_out=. --go_out=. $<
+
+.PHONY: functional-tests
+functional-tests:
+ $(GO) build -o functional-tests/sops github.com/getsops/sops/v3/cmd/sops
+ cd functional-tests && cargo test
+
+.PHONY: functional-tests-all
+functional-tests-all:
+ $(GO) build -o functional-tests/sops github.com/getsops/sops/v3/cmd/sops
+ # Ignored tests are ones that require external services (e.g. AWS KMS)
+ # TODO: Once `--include-ignored` lands in rust stable, switch to that.
+ cd functional-tests && cargo test && cargo test -- --ignored
+
+.PHONY: release-snapshot
+release-snapshot: install-goreleaser install-syft
+ GITHUB_REPOSITORY=$(GITHUB_REPOSITORY) $(GORELEASER) release --clean --snapshot --skip=sign
+
+.PHONY: clean
+clean:
+ rm -rf $(BIN_DIR) profile.out functional-tests/sops
+
+.PHONY: install-staticcheck
+install-staticcheck:
+ $(call go-install-tool,$(STATICCHECK),honnef.co/go/tools/cmd/staticcheck@$(STATICCHECK_VERSION),$(STATICCHECK_VERSION))
+
+.PHONY: install-goreleaser
+install-goreleaser:
+ $(call go-install-tool,$(GORELEASER),github.com/goreleaser/goreleaser@$(GORELEASER_VERSION),$(GORELEASER_VERSION))
+
+.PHONY: install-syft
+install-syft:
+ $(call go-install-tool,$(SYFT),github.com/anchore/syft/cmd/syft@$(SYFT_VERSION),$(SYFT_VERSION))
+
+.PHONY: install-protoc-go
+install-protoc-go:
+ $(call go-install-tool,$(PROTOC_GO),google.golang.org/protobuf/cmd/protoc-gen-go@$(PROTOC_GO_VERSION),$(PROTOC_GO_VERSION))
+
+.PHONY: install-protoc-go-grpc
+install-protoc-go-grpc:
+ $(call go-install-tool,$(PROTOC_GO_GRPC),google.golang.org/grpc/cmd/protoc-gen-go-grpc@$(PROTOC_GO_GRPC_VERSION),$(PROTOC_GO_GRPC_VERSION))
+
+# go-install-tool will 'go install' any package $2 and install it to $1.
+define go-install-tool
+@[ -f $(1)-$(3) ] || { \
+set -e ;\
+GOBIN=$$(dirname $(1)) go install $(2) ;\
+touch $(1)-$(3) ;\
+}
+endef
diff --git a/vendor/github.com/getsops/sops/v3/README.rst b/vendor/github.com/getsops/sops/v3/README.rst
new file mode 100644
index 000000000..a4a5e7b65
--- /dev/null
+++ b/vendor/github.com/getsops/sops/v3/README.rst
@@ -0,0 +1,1910 @@
+SOPS: Secrets OPerationS
+========================
+
+**SOPS** is an editor of encrypted files that supports YAML, JSON, ENV, INI and BINARY
+formats and encrypts with AWS KMS, GCP KMS, Azure Key Vault, age, and PGP.
+(`demo `_)
+
+.. image:: https://i.imgur.com/X0TM5NI.gif
+
+------------
+
+.. image:: https://pkg.go.dev/badge/github.com/getsops/sops/v3.svg
+ :target: https://pkg.go.dev/github.com/getsops/sops/v3
+
+Download
+--------
+
+Stable release
+~~~~~~~~~~~~~~
+Binaries and packages of the latest stable release are available at `https://github.com/getsops/sops/releases `_.
+
+Development branch
+~~~~~~~~~~~~~~~~~~
+For the adventurous, unstable features are available in the `main` branch, which you can install from source:
+
+.. code:: bash
+
+ $ mkdir -p $GOPATH/src/github.com/getsops/sops/
+ $ git clone https://github.com/getsops/sops.git $GOPATH/src/github.com/getsops/sops/
+ $ cd $GOPATH/src/github.com/getsops/sops/
+ $ make install
+
+(requires Go >= 1.19)
+
+If you don't have Go installed, set it up with:
+
+.. code:: bash
+
+ $ {apt,yum,brew} install golang
+ $ echo 'export GOPATH=~/go' >> ~/.bashrc
+ $ source ~/.bashrc
+ $ mkdir $GOPATH
+
+Or whatever variation of the above fits your system and shell.
+
+To use **SOPS** as a library, take a look at the `decrypt package `_.
+
+.. sectnum::
+.. contents:: Table of Contents
+
+Usage
+-----
+
+For a quick presentation of SOPS, check out this Youtube tutorial:
+
+.. image:: https://img.youtube.com/vi/V2PRhxphH2w/0.jpg
+ :target: https://www.youtube.com/watch?v=V2PRhxphH2w
+
+If you're using AWS KMS, create one or multiple master keys in the IAM console
+and export them, comma separated, in the **SOPS_KMS_ARN** env variable. It is
+recommended to use at least two master keys in different regions.
+
+.. code:: bash
+
+ export SOPS_KMS_ARN="arn:aws:kms:us-east-1:656532927350:key/920aff2e-c5f1-4040-943a-047fa387b27e,arn:aws:kms:ap-southeast-1:656532927350:key/9006a8aa-0fa6-4c14-930e-a2dfb916de1d"
+
+SOPS uses `aws-sdk-go-v2 `_ to communicate with AWS KMS. It will automatically
+read the credentials from the ``~/.aws/credentials`` file which can be created with the ``aws configure`` command.
+
+An example of the ``~/.aws/credentials`` file is shown below:
+
+.. code:: sh
+
+ $ cat ~/.aws/credentials
+ [default]
+ aws_access_key_id = AKI.....
+ aws_secret_access_key = mw......
+
+In addition to the ``~/.aws/credentials`` file, you can also use the ``AWS_ACCESS_KEY_ID`` and ``AWS_SECRET_ACCESS_KEY``
+environment variables to specify your credentials:
+
+.. code:: bash
+
+ export AWS_ACCESS_KEY_ID="AKI......"
+ export AWS_SECRET_ACCESS_KEY="mw......"
+
+For more information and additional environment variables, see
+`specifying credentials `_.
+
+If you want to use PGP, export the fingerprints of the public keys, comma
+separated, in the **SOPS_PGP_FP** env variable.
+
+.. code:: bash
+
+ export SOPS_PGP_FP="85D77543B3D624B63CEA9E6DBC17301B491B3F21,E60892BB9BD89A69F759A1A0A3D652173B763E8F"
+
+Note: you can use both PGP and KMS simultaneously.
+
+Then simply call ``sops edit`` with a file path as argument. It will handle the
+encryption/decryption transparently and open the cleartext file in an editor
+
+.. code:: sh
+
+ $ sops edit mynewtestfile.yaml
+ mynewtestfile.yaml doesn't exist, creating it.
+ please wait while an encryption key is being generated and stored in a secure fashion
+ file written to mynewtestfile.yaml
+
+Editing will happen in whatever ``$EDITOR`` is set to, or, if it's not set, in vim.
+Keep in mind that SOPS will wait for the editor to exit, and then try to reencrypt
+the file. Some GUI editors (atom, sublime) spawn a child process and then exit
+immediately. They usually have an option to wait for the main editor window to be
+closed before exiting. See `#127