Documentation ¶
Index ¶
- Variables
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetCode() int32
- func (x *Error) GetDetail() *anypb.Any
- func (x *Error) GetMessage() string
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- func (m *Error) Validate() error
- func (m *Error) ValidateAll() error
- type ErrorMultiError
- type ErrorValidationError
- type PageReq
- func (*PageReq) Descriptor() ([]byte, []int)deprecated
- func (x *PageReq) GetLimit() int64
- func (x *PageReq) GetOffset() int64
- func (*PageReq) ProtoMessage()
- func (x *PageReq) ProtoReflect() protoreflect.Message
- func (x *PageReq) Reset()
- func (x *PageReq) String() string
- func (m *PageReq) Validate() error
- func (m *PageReq) ValidateAll() error
- type PageReqMultiError
- type PageReqValidationError
- type PageRes
- func (*PageRes) Descriptor() ([]byte, []int)deprecated
- func (x *PageRes) GetCurrentPage() int64
- func (x *PageRes) GetPageSize() int64
- func (x *PageRes) GetTotal() int64
- func (x *PageRes) GetTotalPage() int64
- func (*PageRes) ProtoMessage()
- func (x *PageRes) ProtoReflect() protoreflect.Message
- func (x *PageRes) Reset()
- func (x *PageRes) String() string
- func (m *PageRes) Validate() error
- func (m *PageRes) ValidateAll() error
- type PageResMultiError
- type PageResValidationError
Constants ¶
This section is empty.
Variables ¶
var File_base_response_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error 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"` Detail *anypb.Any `protobuf:"bytes,3,opt,name=detail,proto3" json:"detail,omitempty"` // contains filtered or unexported fields }
Error 错误消息定义
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
func (*Error) Validate ¶
Validate checks the field values on Error 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 (*Error) ValidateAll ¶
ValidateAll checks the field values on Error 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 ErrorMultiError, or nil if none found.
type ErrorMultiError ¶
type ErrorMultiError []error
ErrorMultiError is an error wrapping multiple validation errors returned by Error.ValidateAll() if the designated constraints aren't met.
func (ErrorMultiError) AllErrors ¶
func (m ErrorMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ErrorMultiError) Error ¶
func (m ErrorMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ErrorValidationError ¶
type ErrorValidationError struct {
// contains filtered or unexported fields
}
ErrorValidationError is the validation error returned by Error.Validate if the designated constraints aren't met.
func (ErrorValidationError) Cause ¶
func (e ErrorValidationError) Cause() error
Cause function returns cause value.
func (ErrorValidationError) Error ¶
func (e ErrorValidationError) Error() string
Error satisfies the builtin error interface
func (ErrorValidationError) ErrorName ¶
func (e ErrorValidationError) ErrorName() string
ErrorName returns error name.
func (ErrorValidationError) Field ¶
func (e ErrorValidationError) Field() string
Field function returns field value.
func (ErrorValidationError) Key ¶
func (e ErrorValidationError) Key() bool
Key function returns key value.
func (ErrorValidationError) Reason ¶
func (e ErrorValidationError) Reason() string
Reason function returns reason value.
type PageReq ¶
type PageReq struct { Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
PageReq 分页请求
func (*PageReq) Descriptor
deprecated
func (*PageReq) ProtoMessage ¶
func (*PageReq) ProtoMessage()
func (*PageReq) ProtoReflect ¶
func (x *PageReq) ProtoReflect() protoreflect.Message
func (*PageReq) Validate ¶
Validate checks the field values on PageReq 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 (*PageReq) ValidateAll ¶
ValidateAll checks the field values on PageReq 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 PageReqMultiError, or nil if none found.
type PageReqMultiError ¶
type PageReqMultiError []error
PageReqMultiError is an error wrapping multiple validation errors returned by PageReq.ValidateAll() if the designated constraints aren't met.
func (PageReqMultiError) AllErrors ¶
func (m PageReqMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PageReqMultiError) Error ¶
func (m PageReqMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PageReqValidationError ¶
type PageReqValidationError struct {
// contains filtered or unexported fields
}
PageReqValidationError is the validation error returned by PageReq.Validate if the designated constraints aren't met.
func (PageReqValidationError) Cause ¶
func (e PageReqValidationError) Cause() error
Cause function returns cause value.
func (PageReqValidationError) Error ¶
func (e PageReqValidationError) Error() string
Error satisfies the builtin error interface
func (PageReqValidationError) ErrorName ¶
func (e PageReqValidationError) ErrorName() string
ErrorName returns error name.
func (PageReqValidationError) Field ¶
func (e PageReqValidationError) Field() string
Field function returns field value.
func (PageReqValidationError) Key ¶
func (e PageReqValidationError) Key() bool
Key function returns key value.
func (PageReqValidationError) Reason ¶
func (e PageReqValidationError) Reason() string
Reason function returns reason value.
type PageRes ¶
type PageRes struct { Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` CurrentPage int64 `protobuf:"varint,2,opt,name=current_page,json=currentPage,proto3" json:"current_page,omitempty"` TotalPage int64 `protobuf:"varint,3,opt,name=total_page,json=totalPage,proto3" json:"total_page,omitempty"` PageSize int64 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
PageRes 分页请求返回
func (*PageRes) Descriptor
deprecated
func (*PageRes) GetCurrentPage ¶
func (*PageRes) GetPageSize ¶
func (*PageRes) GetTotalPage ¶
func (*PageRes) ProtoMessage ¶
func (*PageRes) ProtoMessage()
func (*PageRes) ProtoReflect ¶
func (x *PageRes) ProtoReflect() protoreflect.Message
func (*PageRes) Validate ¶
Validate checks the field values on PageRes 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 (*PageRes) ValidateAll ¶
ValidateAll checks the field values on PageRes 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 PageResMultiError, or nil if none found.
type PageResMultiError ¶
type PageResMultiError []error
PageResMultiError is an error wrapping multiple validation errors returned by PageRes.ValidateAll() if the designated constraints aren't met.
func (PageResMultiError) AllErrors ¶
func (m PageResMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PageResMultiError) Error ¶
func (m PageResMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PageResValidationError ¶
type PageResValidationError struct {
// contains filtered or unexported fields
}
PageResValidationError is the validation error returned by PageRes.Validate if the designated constraints aren't met.
func (PageResValidationError) Cause ¶
func (e PageResValidationError) Cause() error
Cause function returns cause value.
func (PageResValidationError) Error ¶
func (e PageResValidationError) Error() string
Error satisfies the builtin error interface
func (PageResValidationError) ErrorName ¶
func (e PageResValidationError) ErrorName() string
ErrorName returns error name.
func (PageResValidationError) Field ¶
func (e PageResValidationError) Field() string
Field function returns field value.
func (PageResValidationError) Key ¶
func (e PageResValidationError) Key() bool
Key function returns key value.
func (PageResValidationError) Reason ¶
func (e PageResValidationError) Reason() string
Reason function returns reason value.