Documentation
¶
Index ¶
- Variables
- func BoolPtr(b bool) *bool
- func Copy(fromValue, toValue interface{})
- func DeepFieldTypes(p interface{}) []reflect.StructField
- func GetTotalPages(total int64, perPage int) int
- func TimePtr(t time.Time) *time.Time
- type H
- type MapStringSlicePb
- func (*MapStringSlicePb) Descriptor() ([]byte, []int)deprecated
- func (x *MapStringSlicePb) GetMapValue() map[string]*StringSlicePb
- func (*MapStringSlicePb) ProtoMessage()
- func (x *MapStringSlicePb) ProtoReflect() protoreflect.Message
- func (x *MapStringSlicePb) Reset()
- func (m *MapStringSlicePb) Scan(value interface{}) error
- func (x *MapStringSlicePb) String() string
- type MultiInputs
- type Number
- type PageParams
- type PageResult
- type StringSliceMap
- type StringSlicePb
- type Time
Constants ¶
This section is empty.
Variables ¶
View Source
var File_map_slice_proto protoreflect.FileDescriptor
Functions ¶
func DeepFieldTypes ¶
func DeepFieldTypes(p interface{}) []reflect.StructField
Types ¶
type MapStringSlicePb ¶
type MapStringSlicePb struct { MapValue map[string]*StringSlicePb `` /* 173-byte string literal not displayed */ // contains filtered or unexported fields }
func (*MapStringSlicePb) Descriptor
deprecated
func (*MapStringSlicePb) Descriptor() ([]byte, []int)
Deprecated: Use MapStringSlicePb.ProtoReflect.Descriptor instead.
func (*MapStringSlicePb) GetMapValue ¶
func (x *MapStringSlicePb) GetMapValue() map[string]*StringSlicePb
func (*MapStringSlicePb) ProtoMessage ¶
func (*MapStringSlicePb) ProtoMessage()
func (*MapStringSlicePb) ProtoReflect ¶
func (x *MapStringSlicePb) ProtoReflect() protoreflect.Message
func (*MapStringSlicePb) Reset ¶
func (x *MapStringSlicePb) Reset()
func (*MapStringSlicePb) Scan ¶
func (m *MapStringSlicePb) Scan(value interface{}) error
Scan implements the Scanner interface.
func (*MapStringSlicePb) String ¶
func (x *MapStringSlicePb) String() string
type MultiInputs ¶
type MultiInputs struct {
// contains filtered or unexported fields
}
func MakeInputs ¶
func MakeInputs(args ...interface{}) *MultiInputs
func (*MultiInputs) Add ¶
func (i *MultiInputs) Add(input interface{})
func (*MultiInputs) MustGetInSequence ¶
func (i *MultiInputs) MustGetInSequence() interface{}
type Number ¶
type PageParams ¶
type PageParams struct { PerPage int `query:"per_page" binding:"required"` PageNum int `query:"page_number" binding:"required"` }
func (*PageParams) SetPageParams ¶
func (p *PageParams) SetPageParams(defaultPerPage int)
type PageResult ¶
func NewPageResult ¶
func NewPageResult(perPage, pageNum int, total int64) PageResult
NewPageResult 根据输入生成page,一般由于数据库操作时用了offset等操作,total和len(data)不一致 perPage: 每页数量 pageNum: 当前页 total: 总数
func (PageResult) Json ¶
func (p PageResult) Json(key string, data interface{}) map[string]interface{}
type StringSliceMap ¶
func (StringSliceMap) HaveIntersection ¶
func (n StringSliceMap) HaveIntersection(key string, input StringSliceMap) bool
func (*StringSliceMap) Scan ¶
func (n *StringSliceMap) Scan(value interface{}) error
Scan implements the Scanner interface.
func (StringSliceMap) Value ¶
func (n StringSliceMap) Value() (driver.Value, error)
Value implements the driver Valuer interface.
type StringSlicePb ¶
type StringSlicePb struct { Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*StringSlicePb) Descriptor
deprecated
func (*StringSlicePb) Descriptor() ([]byte, []int)
Deprecated: Use StringSlicePb.ProtoReflect.Descriptor instead.
func (*StringSlicePb) GetValue ¶
func (x *StringSlicePb) GetValue() []string
func (*StringSlicePb) ProtoMessage ¶
func (*StringSlicePb) ProtoMessage()
func (*StringSlicePb) ProtoReflect ¶
func (x *StringSlicePb) ProtoReflect() protoreflect.Message
func (*StringSlicePb) Reset ¶
func (x *StringSlicePb) Reset()
func (*StringSlicePb) String ¶
func (x *StringSlicePb) String() string
Click to show internal directories.
Click to hide internal directories.