Documentation ¶
Index ¶
- Variables
- type Result
- func (*Result) Descriptor() ([]byte, []int)deprecated
- func (x *Result) GetCode() int32
- func (x *Result) GetMessage() string
- func (x *Result) GetResult() *anypb.Any
- func (x *Result) GetType() string
- func (*Result) ProtoMessage()
- func (x *Result) ProtoReflect() protoreflect.Message
- func (x *Result) Reset()
- func (x *Result) String() string
- func (m *Result) Validate() error
- func (m *Result) ValidateAll() error
- type ResultData
- func (*ResultData) Descriptor() ([]byte, []int)deprecated
- func (x *ResultData) GetData() map[string]string
- func (x *ResultData) GetId() uint64
- func (*ResultData) ProtoMessage()
- func (x *ResultData) ProtoReflect() protoreflect.Message
- func (x *ResultData) Reset()
- func (x *ResultData) String() string
- func (m *ResultData) Validate() error
- func (m *ResultData) ValidateAll() error
- type ResultDataMultiError
- type ResultDataValidationError
- type ResultMultiError
- type ResultValidationError
Constants ¶
This section is empty.
Variables ¶
var File_common_common_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Result ¶
type Result struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Result *anypb.Any `protobuf:"bytes,3,opt,name=result,proto3,oneof" json:"result,omitempty"` Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
通用返回
func (*Result) Descriptor
deprecated
func (*Result) GetMessage ¶
func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
func (*Result) Validate ¶
Validate checks the field values on Result 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 (*Result) ValidateAll ¶
ValidateAll checks the field values on Result 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 ResultMultiError, or nil if none found.
type ResultData ¶
type ResultData struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Data map[string]string `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
通用返回数据
func (*ResultData) Descriptor
deprecated
func (*ResultData) Descriptor() ([]byte, []int)
Deprecated: Use ResultData.ProtoReflect.Descriptor instead.
func (*ResultData) GetData ¶
func (x *ResultData) GetData() map[string]string
func (*ResultData) GetId ¶
func (x *ResultData) GetId() uint64
func (*ResultData) ProtoMessage ¶
func (*ResultData) ProtoMessage()
func (*ResultData) ProtoReflect ¶
func (x *ResultData) ProtoReflect() protoreflect.Message
func (*ResultData) Reset ¶
func (x *ResultData) Reset()
func (*ResultData) String ¶
func (x *ResultData) String() string
func (*ResultData) Validate ¶
func (m *ResultData) Validate() error
Validate checks the field values on ResultData 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 (*ResultData) ValidateAll ¶
func (m *ResultData) ValidateAll() error
ValidateAll checks the field values on ResultData 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 ResultDataMultiError, or nil if none found.
type ResultDataMultiError ¶
type ResultDataMultiError []error
ResultDataMultiError is an error wrapping multiple validation errors returned by ResultData.ValidateAll() if the designated constraints aren't met.
func (ResultDataMultiError) AllErrors ¶
func (m ResultDataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ResultDataMultiError) Error ¶
func (m ResultDataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ResultDataValidationError ¶
type ResultDataValidationError struct {
// contains filtered or unexported fields
}
ResultDataValidationError is the validation error returned by ResultData.Validate if the designated constraints aren't met.
func (ResultDataValidationError) Cause ¶
func (e ResultDataValidationError) Cause() error
Cause function returns cause value.
func (ResultDataValidationError) Error ¶
func (e ResultDataValidationError) Error() string
Error satisfies the builtin error interface
func (ResultDataValidationError) ErrorName ¶
func (e ResultDataValidationError) ErrorName() string
ErrorName returns error name.
func (ResultDataValidationError) Field ¶
func (e ResultDataValidationError) Field() string
Field function returns field value.
func (ResultDataValidationError) Key ¶
func (e ResultDataValidationError) Key() bool
Key function returns key value.
func (ResultDataValidationError) Reason ¶
func (e ResultDataValidationError) Reason() string
Reason function returns reason value.
type ResultMultiError ¶
type ResultMultiError []error
ResultMultiError is an error wrapping multiple validation errors returned by Result.ValidateAll() if the designated constraints aren't met.
func (ResultMultiError) AllErrors ¶
func (m ResultMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ResultMultiError) Error ¶
func (m ResultMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ResultValidationError ¶
type ResultValidationError struct {
// contains filtered or unexported fields
}
ResultValidationError is the validation error returned by Result.Validate if the designated constraints aren't met.
func (ResultValidationError) Cause ¶
func (e ResultValidationError) Cause() error
Cause function returns cause value.
func (ResultValidationError) Error ¶
func (e ResultValidationError) Error() string
Error satisfies the builtin error interface
func (ResultValidationError) ErrorName ¶
func (e ResultValidationError) ErrorName() string
ErrorName returns error name.
func (ResultValidationError) Field ¶
func (e ResultValidationError) Field() string
Field function returns field value.
func (ResultValidationError) Key ¶
func (e ResultValidationError) Key() bool
Key function returns key value.
func (ResultValidationError) Reason ¶
func (e ResultValidationError) Reason() string
Reason function returns reason value.