pb

package
v0.0.0-...-748ecea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// optional api.annotations.v1.MethodRule method_rule = 71599529;
	E_MethodRule = &file_api_annotations_v1_annotations_proto_extTypes[0]
)

Extension fields to descriptorpb.MethodOptions.

View Source
var (
	// optional api.annotations.v1.ServiceRule service_rule = 51562530;
	E_ServiceRule = &file_api_annotations_v1_annotations_proto_extTypes[1]
)

Extension fields to descriptorpb.ServiceOptions.

View Source
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

Error satisfies the builtin error interface

func (MethodRuleValidationError) ErrorName

func (e MethodRuleValidationError) ErrorName() string

ErrorName returns error name.

func (MethodRuleValidationError) Field

Field function returns field value.

func (MethodRuleValidationError) Key

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

Cause function returns cause value.

func (ServiceRuleValidationError) Error

Error satisfies the builtin error interface

func (ServiceRuleValidationError) ErrorName

func (e ServiceRuleValidationError) ErrorName() string

ErrorName returns error name.

func (ServiceRuleValidationError) Field

Field function returns field value.

func (ServiceRuleValidationError) Key

Key function returns key value.

func (ServiceRuleValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL