Documentation ¶
Index ¶
- Variables
- type TestReq
- func (*TestReq) Descriptor() ([]byte, []int)deprecated
- func (x *TestReq) GetMessage() string
- func (*TestReq) ProtoMessage()
- func (x *TestReq) ProtoReflect() protoreflect.Message
- func (x *TestReq) Reset()
- func (x *TestReq) String() string
- func (m *TestReq) Validate() error
- func (m *TestReq) ValidateAll() error
- type TestReqMultiError
- type TestReqValidationError
- type TestResp
- func (*TestResp) Descriptor() ([]byte, []int)deprecated
- func (x *TestResp) GetCode() int32
- func (x *TestResp) GetData() *TestRespData
- func (x *TestResp) GetMessage() string
- func (x *TestResp) GetMetadata() map[string]string
- func (x *TestResp) GetReason() string
- func (*TestResp) ProtoMessage()
- func (x *TestResp) ProtoReflect() protoreflect.Message
- func (x *TestResp) Reset()
- func (x *TestResp) String() string
- func (m *TestResp) Validate() error
- func (m *TestResp) ValidateAll() error
- type TestRespData
- func (*TestRespData) Descriptor() ([]byte, []int)deprecated
- func (x *TestRespData) GetMessage() string
- func (*TestRespData) ProtoMessage()
- func (x *TestRespData) ProtoReflect() protoreflect.Message
- func (x *TestRespData) Reset()
- func (x *TestRespData) String() string
- func (m *TestRespData) Validate() error
- func (m *TestRespData) ValidateAll() error
- type TestRespDataMultiError
- type TestRespDataValidationError
- func (e TestRespDataValidationError) Cause() error
- func (e TestRespDataValidationError) Error() string
- func (e TestRespDataValidationError) ErrorName() string
- func (e TestRespDataValidationError) Field() string
- func (e TestRespDataValidationError) Key() bool
- func (e TestRespDataValidationError) Reason() string
- type TestRespMultiError
- type TestRespValidationError
Constants ¶
This section is empty.
Variables ¶
var File_api_testing_service_v1_resources_testdata_resource_v1_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type TestReq ¶
type TestReq struct { // 请求消息 Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
TestReq 请求
func (*TestReq) Descriptor
deprecated
func (*TestReq) GetMessage ¶
func (*TestReq) ProtoMessage ¶
func (*TestReq) ProtoMessage()
func (*TestReq) ProtoReflect ¶
func (x *TestReq) ProtoReflect() protoreflect.Message
func (*TestReq) Validate ¶
Validate checks the field values on TestReq 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 (*TestReq) ValidateAll ¶
ValidateAll checks the field values on TestReq 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 TestReqMultiError, or nil if none found.
type TestReqMultiError ¶
type TestReqMultiError []error
TestReqMultiError is an error wrapping multiple validation errors returned by TestReq.ValidateAll() if the designated constraints aren't met.
func (TestReqMultiError) AllErrors ¶
func (m TestReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TestReqMultiError) Error ¶
func (m TestReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TestReqValidationError ¶
type TestReqValidationError struct {
// contains filtered or unexported fields
}
TestReqValidationError is the validation error returned by TestReq.Validate if the designated constraints aren't met.
func (TestReqValidationError) Cause ¶
func (e TestReqValidationError) Cause() error
Cause function returns cause value.
func (TestReqValidationError) Error ¶
func (e TestReqValidationError) Error() string
Error satisfies the builtin error interface
func (TestReqValidationError) ErrorName ¶
func (e TestReqValidationError) ErrorName() string
ErrorName returns error name.
func (TestReqValidationError) Field ¶
func (e TestReqValidationError) Field() string
Field function returns field value.
func (TestReqValidationError) Key ¶
func (e TestReqValidationError) Key() bool
Key function returns key value.
func (TestReqValidationError) Reason ¶
func (e TestReqValidationError) Reason() string
Reason function returns reason value.
type TestResp ¶
type TestResp struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ Data *TestRespData `protobuf:"bytes,100,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
TestResp 响应
func (*TestResp) Descriptor
deprecated
func (*TestResp) GetData ¶
func (x *TestResp) GetData() *TestRespData
func (*TestResp) GetMessage ¶
func (*TestResp) GetMetadata ¶
func (*TestResp) ProtoMessage ¶
func (*TestResp) ProtoMessage()
func (*TestResp) ProtoReflect ¶
func (x *TestResp) ProtoReflect() protoreflect.Message
func (*TestResp) Validate ¶
Validate checks the field values on TestResp 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 (*TestResp) ValidateAll ¶
ValidateAll checks the field values on TestResp 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 TestRespMultiError, or nil if none found.
type TestRespData ¶
type TestRespData struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*TestRespData) Descriptor
deprecated
func (*TestRespData) Descriptor() ([]byte, []int)
Deprecated: Use TestRespData.ProtoReflect.Descriptor instead.
func (*TestRespData) GetMessage ¶
func (x *TestRespData) GetMessage() string
func (*TestRespData) ProtoMessage ¶
func (*TestRespData) ProtoMessage()
func (*TestRespData) ProtoReflect ¶
func (x *TestRespData) ProtoReflect() protoreflect.Message
func (*TestRespData) Reset ¶
func (x *TestRespData) Reset()
func (*TestRespData) String ¶
func (x *TestRespData) String() string
func (*TestRespData) Validate ¶
func (m *TestRespData) Validate() error
Validate checks the field values on TestRespData 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 (*TestRespData) ValidateAll ¶
func (m *TestRespData) ValidateAll() error
ValidateAll checks the field values on TestRespData 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 TestRespDataMultiError, or nil if none found.
type TestRespDataMultiError ¶
type TestRespDataMultiError []error
TestRespDataMultiError is an error wrapping multiple validation errors returned by TestRespData.ValidateAll() if the designated constraints aren't met.
func (TestRespDataMultiError) AllErrors ¶
func (m TestRespDataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TestRespDataMultiError) Error ¶
func (m TestRespDataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TestRespDataValidationError ¶
type TestRespDataValidationError struct {
// contains filtered or unexported fields
}
TestRespDataValidationError is the validation error returned by TestRespData.Validate if the designated constraints aren't met.
func (TestRespDataValidationError) Cause ¶
func (e TestRespDataValidationError) Cause() error
Cause function returns cause value.
func (TestRespDataValidationError) Error ¶
func (e TestRespDataValidationError) Error() string
Error satisfies the builtin error interface
func (TestRespDataValidationError) ErrorName ¶
func (e TestRespDataValidationError) ErrorName() string
ErrorName returns error name.
func (TestRespDataValidationError) Field ¶
func (e TestRespDataValidationError) Field() string
Field function returns field value.
func (TestRespDataValidationError) Key ¶
func (e TestRespDataValidationError) Key() bool
Key function returns key value.
func (TestRespDataValidationError) Reason ¶
func (e TestRespDataValidationError) Reason() string
Reason function returns reason value.
type TestRespMultiError ¶
type TestRespMultiError []error
TestRespMultiError is an error wrapping multiple validation errors returned by TestResp.ValidateAll() if the designated constraints aren't met.
func (TestRespMultiError) AllErrors ¶
func (m TestRespMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (TestRespMultiError) Error ¶
func (m TestRespMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type TestRespValidationError ¶
type TestRespValidationError struct {
// contains filtered or unexported fields
}
TestRespValidationError is the validation error returned by TestResp.Validate if the designated constraints aren't met.
func (TestRespValidationError) Cause ¶
func (e TestRespValidationError) Cause() error
Cause function returns cause value.
func (TestRespValidationError) Error ¶
func (e TestRespValidationError) Error() string
Error satisfies the builtin error interface
func (TestRespValidationError) ErrorName ¶
func (e TestRespValidationError) ErrorName() string
ErrorName returns error name.
func (TestRespValidationError) Field ¶
func (e TestRespValidationError) Field() string
Field function returns field value.
func (TestRespValidationError) Key ¶
func (e TestRespValidationError) Key() bool
Key function returns key value.
func (TestRespValidationError) Reason ¶
func (e TestRespValidationError) Reason() string
Reason function returns reason value.