Documentation ¶
Index ¶
- Variables
- func BoolPtr(b bool) *bool
- func Copy(fromValue, toValue interface{})
- func CopyTo[T any](fromValue any) T
- func CopyToPtr[T any](fromValue any) *T
- func DeepFieldProcess(p interface{}, ...) error
- func DeepFieldTypes(p interface{}) []reflect.StructField
- func GetTotalPages(total int64, perPage int) int
- func NewPtr[T any]() *T
- func TimePtr(t time.Time) *time.Time
- type Buffer
- func (b *Buffer) AppendBool(v bool)
- func (b *Buffer) AppendByte(v byte)
- func (b *Buffer) AppendFloat(f float64, bitSize int)
- func (b *Buffer) AppendInt(i int64)
- func (b *Buffer) AppendString(s string)
- func (b *Buffer) AppendUint(i uint64)
- func (b *Buffer) Bytes() []byte
- func (b *Buffer) Cap() int
- func (b *Buffer) Len() int
- func (b *Buffer) Reset()
- func (b *Buffer) String() string
- func (b *Buffer) Write(bs []byte) (int, error)
- 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 Pool
- type PoolElement
- type StringSliceMap
- type StringSlicePb
- type Time
Constants ¶
This section is empty.
Variables ¶
var File_map_slice_proto protoreflect.FileDescriptor
Functions ¶
func DeepFieldProcess ¶ added in v0.9.0
func DeepFieldTypes ¶
func DeepFieldTypes(p interface{}) []reflect.StructField
Types ¶
type Buffer ¶ added in v0.9.0
type Buffer struct {
// contains filtered or unexported fields
}
func (*Buffer) AppendBool ¶ added in v0.9.0
AppendBool appends a bool to the underlying buffer.
func (*Buffer) AppendByte ¶ added in v0.9.0
AppendByte writes a single byte to the Buffer.
func (*Buffer) AppendFloat ¶ added in v0.9.0
AppendFloat appends a float to the underlying buffer. It doesn't quote NaN or +/- Inf.
func (*Buffer) AppendInt ¶ added in v0.9.0
AppendInt appends an integer to the underlying buffer (assuming base 10).
func (*Buffer) AppendString ¶ added in v0.9.0
AppendString writes a string to the Buffer.
func (*Buffer) AppendUint ¶ added in v0.9.0
AppendUint appends an unsigned integer to the underlying buffer (assuming base 10).
func (*Buffer) Bytes ¶ added in v0.9.0
Bytes returns a mutable reference to the underlying byte slice.
func (*Buffer) Cap ¶ added in v0.9.0
Cap returns the capacity of the underlying byte slice.
func (*Buffer) Len ¶ added in v0.9.0
Len returns the length of the underlying byte slice.
func (*Buffer) Reset ¶ added in v0.9.0
func (b *Buffer) Reset()
Reset resets the underlying byte slice. Subsequent writes re-use the slice's backing array.
func (*Buffer) String ¶ added in v0.9.0
String returns a string copy of the underlying byte slice.
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 MakeMultiInputs ¶ added in v0.7.0
func MakeMultiInputs(args ...interface{}) *MultiInputs
func (*MultiInputs) Add ¶
func (mi *MultiInputs) Add(input interface{})
func (*MultiInputs) Bind ¶ added in v0.7.0
func (mi *MultiInputs) Bind(in interface{}) interface{}
type Number ¶
type PageParams ¶
func (*PageParams) SetDefault ¶ added in v0.7.0
func (p *PageParams) SetDefault(defaultPerPage int)
func (*PageParams) Valid ¶ added in v0.7.0
func (p *PageParams) Valid() bool
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 Pool ¶ added in v0.9.0
type Pool[T PoolElement] struct { // contains filtered or unexported fields }
func NewPool ¶ added in v0.9.0
func NewPool[T PoolElement](newFunc func() T) Pool[T]
NewPool make a new pool
type PoolElement ¶ added in v0.9.0
type PoolElement interface {
Reset()
}
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