Documentation
¶
Index ¶
- Variables
- type Column
- func (*Column) Descriptor() ([]byte, []int)deprecated
- func (x *Column) GetExp() string
- func (x *Column) GetLogic() string
- func (x *Column) GetName() string
- func (x *Column) GetValue() string
- func (*Column) ProtoMessage()
- func (x *Column) ProtoReflect() protoreflect.Message
- func (x *Column) Reset()
- func (x *Column) String() string
- func (m *Column) Validate() error
- func (m *Column) ValidateAll() error
- type ColumnMultiError
- type ColumnValidationError
- type Params
- func (*Params) Descriptor() ([]byte, []int)deprecated
- func (x *Params) GetColumns() []*Column
- func (x *Params) GetLimit() int32
- func (x *Params) GetPage() int32
- func (x *Params) GetSort() string
- func (*Params) ProtoMessage()
- func (x *Params) ProtoReflect() protoreflect.Message
- func (x *Params) Reset()
- func (x *Params) String() string
- func (m *Params) Validate() error
- func (m *Params) ValidateAll() error
- type ParamsMultiError
- type ParamsValidationError
Constants ¶
This section is empty.
Variables ¶
var File_api_types_types_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Column ¶
type Column struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 列名
Exp string `protobuf:"bytes,2,opt,name=exp,proto3" json:"exp,omitempty"` // 表达式,值为空时默认为=,有=、!=、>、>=、<、<=、like七种类型
Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` // 列值
Logic string `protobuf:"bytes,4,opt,name=logic,proto3" json:"logic,omitempty"` // 逻辑类型,值为空时默认为and,只有&(and)、||(or)两种类型
// contains filtered or unexported fields
}
func (*Column) Descriptor
deprecated
func (*Column) ProtoMessage ¶
func (*Column) ProtoMessage()
func (*Column) ProtoReflect ¶
func (x *Column) ProtoReflect() protoreflect.Message
func (*Column) Validate ¶
Validate checks the field values on Column 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 (*Column) ValidateAll ¶
ValidateAll checks the field values on Column 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 ColumnMultiError, or nil if none found.
type ColumnMultiError ¶
type ColumnMultiError []error
ColumnMultiError is an error wrapping multiple validation errors returned by Column.ValidateAll() if the designated constraints aren't met.
func (ColumnMultiError) AllErrors ¶
func (m ColumnMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ColumnMultiError) Error ¶
func (m ColumnMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ColumnValidationError ¶
type ColumnValidationError struct {
// contains filtered or unexported fields
}
ColumnValidationError is the validation error returned by Column.Validate if the designated constraints aren't met.
func (ColumnValidationError) Cause ¶
func (e ColumnValidationError) Cause() error
Cause function returns cause value.
func (ColumnValidationError) Error ¶
func (e ColumnValidationError) Error() string
Error satisfies the builtin error interface
func (ColumnValidationError) ErrorName ¶
func (e ColumnValidationError) ErrorName() string
ErrorName returns error name.
func (ColumnValidationError) Field ¶
func (e ColumnValidationError) Field() string
Field function returns field value.
func (ColumnValidationError) Key ¶
func (e ColumnValidationError) Key() bool
Key function returns key value.
func (ColumnValidationError) Reason ¶
func (e ColumnValidationError) Reason() string
Reason function returns reason value.
type Params ¶
type Params struct {
Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` // 页码,从0开始
Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // 每页行数
Sort string `protobuf:"bytes,3,opt,name=sort,proto3" json:"sort,omitempty"` // 排序字段,多列排序用逗号分隔
Columns []*Column `protobuf:"bytes,4,rep,name=columns,proto3" json:"columns,omitempty"` // 查询条件
// contains filtered or unexported fields
}
func (*Params) Descriptor
deprecated
func (*Params) GetColumns ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) ProtoReflect ¶
func (x *Params) ProtoReflect() protoreflect.Message
func (*Params) Validate ¶
Validate checks the field values on Params 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 (*Params) ValidateAll ¶
ValidateAll checks the field values on Params 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 ParamsMultiError, or nil if none found.
type ParamsMultiError ¶
type ParamsMultiError []error
ParamsMultiError is an error wrapping multiple validation errors returned by Params.ValidateAll() if the designated constraints aren't met.
func (ParamsMultiError) AllErrors ¶
func (m ParamsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ParamsMultiError) Error ¶
func (m ParamsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ParamsValidationError ¶
type ParamsValidationError struct {
// contains filtered or unexported fields
}
ParamsValidationError is the validation error returned by Params.Validate if the designated constraints aren't met.
func (ParamsValidationError) Cause ¶
func (e ParamsValidationError) Cause() error
Cause function returns cause value.
func (ParamsValidationError) Error ¶
func (e ParamsValidationError) Error() string
Error satisfies the builtin error interface
func (ParamsValidationError) ErrorName ¶
func (e ParamsValidationError) ErrorName() string
ErrorName returns error name.
func (ParamsValidationError) Field ¶
func (e ParamsValidationError) Field() string
Field function returns field value.
func (ParamsValidationError) Key ¶
func (e ParamsValidationError) Key() bool
Key function returns key value.
func (ParamsValidationError) Reason ¶
func (e ParamsValidationError) Reason() string
Reason function returns reason value.