Documentation ¶
Index ¶
- Variables
- type MethodRule
- func (*MethodRule) Descriptor() ([]byte, []int)deprecated
- func (x *MethodRule) GetCodes() []code.Code
- func (x *MethodRule) GetNeedAuthorization() bool
- func (x *MethodRule) GetResponseMetadata() []string
- func (msg *MethodRule) MarshalJSON() ([]byte, error)
- func (*MethodRule) ProtoMessage()
- func (x *MethodRule) ProtoReflect() protoreflect.Message
- func (x *MethodRule) Reset()
- func (x *MethodRule) String() string
- func (msg *MethodRule) UnmarshalJSON(b []byte) error
- func (m *MethodRule) Validate() error
- func (m *MethodRule) ValidateAll() error
- type MethodRuleMultiError
- type MethodRuleValidationError
- type ServiceRule
- func (*ServiceRule) Descriptor() ([]byte, []int)deprecated
- func (x *ServiceRule) GetCodes() []code.Code
- func (msg *ServiceRule) MarshalJSON() ([]byte, error)
- func (*ServiceRule) ProtoMessage()
- func (x *ServiceRule) ProtoReflect() protoreflect.Message
- func (x *ServiceRule) Reset()
- func (x *ServiceRule) String() string
- func (msg *ServiceRule) UnmarshalJSON(b []byte) error
- func (m *ServiceRule) Validate() error
- func (m *ServiceRule) ValidateAll() error
- type ServiceRuleMultiError
- type ServiceRuleValidationError
- func (e ServiceRuleValidationError) Cause() error
- func (e ServiceRuleValidationError) Error() string
- func (e ServiceRuleValidationError) ErrorName() string
- func (e ServiceRuleValidationError) Field() string
- func (e ServiceRuleValidationError) Key() bool
- func (e ServiceRuleValidationError) Reason() string
Constants ¶
This section is empty.
Variables ¶
var (
// optional api.annotations.v1.MethodRule method_rule = 71599529;
E_MethodRule = &file_api_annotations_v1_annotations_proto_extTypes[0]
)
Extension fields to descriptorpb.MethodOptions.
var (
// optional api.annotations.v1.ServiceRule service_rule = 51562530;
E_ServiceRule = &file_api_annotations_v1_annotations_proto_extTypes[1]
)
Extension fields to descriptorpb.ServiceOptions.
var File_api_annotations_v1_annotations_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type MethodRule ¶
type MethodRule struct { Codes []code.Code `protobuf:"varint,1,rep,packed,name=codes,proto3,enum=google.rpc.Code" json:"codes,omitempty"` NeedAuthorization bool `protobuf:"varint,2,opt,name=need_authorization,json=needAuthorization,proto3" json:"need_authorization,omitempty"` ResponseMetadata []string `protobuf:"bytes,3,rep,name=response_metadata,json=responseMetadata,proto3" json:"response_metadata,omitempty"` // contains filtered or unexported fields }
func (*MethodRule) Descriptor
deprecated
func (*MethodRule) Descriptor() ([]byte, []int)
Deprecated: Use MethodRule.ProtoReflect.Descriptor instead.
func (*MethodRule) GetCodes ¶
func (x *MethodRule) GetCodes() []code.Code
func (*MethodRule) GetNeedAuthorization ¶
func (x *MethodRule) GetNeedAuthorization() bool
func (*MethodRule) GetResponseMetadata ¶
func (x *MethodRule) GetResponseMetadata() []string
func (*MethodRule) MarshalJSON ¶
func (msg *MethodRule) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*MethodRule) ProtoMessage ¶
func (*MethodRule) ProtoMessage()
func (*MethodRule) ProtoReflect ¶
func (x *MethodRule) ProtoReflect() protoreflect.Message
func (*MethodRule) Reset ¶
func (x *MethodRule) Reset()
func (*MethodRule) String ¶
func (x *MethodRule) String() string
func (*MethodRule) UnmarshalJSON ¶
func (msg *MethodRule) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*MethodRule) Validate ¶
func (m *MethodRule) Validate() error
Validate checks the field values on MethodRule 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 (*MethodRule) ValidateAll ¶
func (m *MethodRule) ValidateAll() error
ValidateAll checks the field values on MethodRule 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 MethodRuleMultiError, or nil if none found.
type MethodRuleMultiError ¶
type MethodRuleMultiError []error
MethodRuleMultiError is an error wrapping multiple validation errors returned by MethodRule.ValidateAll() if the designated constraints aren't met.
func (MethodRuleMultiError) AllErrors ¶
func (m MethodRuleMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (MethodRuleMultiError) Error ¶
func (m MethodRuleMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type MethodRuleValidationError ¶
type MethodRuleValidationError struct {
// contains filtered or unexported fields
}
MethodRuleValidationError is the validation error returned by MethodRule.Validate if the designated constraints aren't met.
func (MethodRuleValidationError) Cause ¶
func (e MethodRuleValidationError) Cause() error
Cause function returns cause value.
func (MethodRuleValidationError) Error ¶
func (e MethodRuleValidationError) Error() string
Error satisfies the builtin error interface
func (MethodRuleValidationError) ErrorName ¶
func (e MethodRuleValidationError) ErrorName() string
ErrorName returns error name.
func (MethodRuleValidationError) Field ¶
func (e MethodRuleValidationError) Field() string
Field function returns field value.
func (MethodRuleValidationError) Key ¶
func (e MethodRuleValidationError) Key() bool
Key function returns key value.
func (MethodRuleValidationError) Reason ¶
func (e MethodRuleValidationError) Reason() string
Reason function returns reason value.
type ServiceRule ¶
type ServiceRule struct { Codes []code.Code `protobuf:"varint,1,rep,packed,name=codes,proto3,enum=google.rpc.Code" json:"codes,omitempty"` // contains filtered or unexported fields }
func (*ServiceRule) Descriptor
deprecated
func (*ServiceRule) Descriptor() ([]byte, []int)
Deprecated: Use ServiceRule.ProtoReflect.Descriptor instead.
func (*ServiceRule) GetCodes ¶
func (x *ServiceRule) GetCodes() []code.Code
func (*ServiceRule) MarshalJSON ¶
func (msg *ServiceRule) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*ServiceRule) ProtoMessage ¶
func (*ServiceRule) ProtoMessage()
func (*ServiceRule) ProtoReflect ¶
func (x *ServiceRule) ProtoReflect() protoreflect.Message
func (*ServiceRule) Reset ¶
func (x *ServiceRule) Reset()
func (*ServiceRule) String ¶
func (x *ServiceRule) String() string
func (*ServiceRule) UnmarshalJSON ¶
func (msg *ServiceRule) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*ServiceRule) Validate ¶
func (m *ServiceRule) Validate() error
Validate checks the field values on ServiceRule 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 (*ServiceRule) ValidateAll ¶
func (m *ServiceRule) ValidateAll() error
ValidateAll checks the field values on ServiceRule 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 ServiceRuleMultiError, or nil if none found.
type ServiceRuleMultiError ¶
type ServiceRuleMultiError []error
ServiceRuleMultiError is an error wrapping multiple validation errors returned by ServiceRule.ValidateAll() if the designated constraints aren't met.
func (ServiceRuleMultiError) AllErrors ¶
func (m ServiceRuleMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ServiceRuleMultiError) Error ¶
func (m ServiceRuleMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ServiceRuleValidationError ¶
type ServiceRuleValidationError struct {
// contains filtered or unexported fields
}
ServiceRuleValidationError is the validation error returned by ServiceRule.Validate if the designated constraints aren't met.
func (ServiceRuleValidationError) Cause ¶
func (e ServiceRuleValidationError) Cause() error
Cause function returns cause value.
func (ServiceRuleValidationError) Error ¶
func (e ServiceRuleValidationError) Error() string
Error satisfies the builtin error interface
func (ServiceRuleValidationError) ErrorName ¶
func (e ServiceRuleValidationError) ErrorName() string
ErrorName returns error name.
func (ServiceRuleValidationError) Field ¶
func (e ServiceRuleValidationError) Field() string
Field function returns field value.
func (ServiceRuleValidationError) Key ¶
func (e ServiceRuleValidationError) Key() bool
Key function returns key value.
func (ServiceRuleValidationError) Reason ¶
func (e ServiceRuleValidationError) Reason() string
Reason function returns reason value.