Documentation ¶
Index ¶
- func CastType(value *reflect.Value, from reflect.Kind, to reflect.Kind) bool
- func GetTagName(field reflect.StructField, name string) string
- func ToSnakeCase(str string) string
- func UpperFirst(str string) string
- type N
- func (n N) Float64() (float64, error)
- func (n N) Int() (int, error)
- func (n N) Int32() (int32, error)
- func (n N) Int64() (int64, error)
- func (n *N) MarshalJSON() ([]byte, error)
- func (n N) MustFloat64() float64
- func (n N) MustInt() int
- func (n N) MustInt32() int32
- func (n N) MustInt64() int64
- func (n N) MustToFixed(places int) float64
- func (n *N) Scan(src interface{}) error
- func (n N) ToFixed(places int) (float64, error)
- func (n *N) UnmarshalJSON(data []byte) error
- func (n *N) Value() (driver.Value, error)
- type P
- type R
- func (row R) Del(key string)
- func (row R) Get(key interface{}) interface{}
- func (row R) GetBool(key interface{}) bool
- func (row R) GetFloat(key interface{}, places int) float64
- func (row R) GetInt(key interface{}) int
- func (row R) GetString(key interface{}) string
- func (row R) GetTime(key interface{}) T
- func (row R) Has(key string) bool
- func (row R) IsEmpty() bool
- func (row R) Keys() []interface{}
- func (row R) KeysString() []string
- func (row *R) Merge(v ...interface{})
- func (row R) MustGet(key interface{}) interface{}
- func (row R) ToMap() map[string]interface{}
- func (row R) Value(key interface{}) interface{}
- type T
- func (t T) IsNull() bool
- func (t *T) MarshalJSON() ([]byte, error)
- func (t T) MustToTime(formats ...string) time.Time
- func (t *T) Scan(src interface{}) error
- func (t T) ToTime(formats ...string) (time.Time, error)
- func (t *T) UnmarshalJSON(data []byte) error
- func (t *T) Value() (driver.Value, error)
- type UploadFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTagName ¶
func GetTagName(field reflect.StructField, name string) string
GetTagName get the tag name of the reflect.StructField
func ToSnakeCase ¶
ToSnakeCase convert camel case string to snake case
Types ¶
type N ¶
type N struct {
Number interface{}
}
func (N) MustFloat64 ¶
MustFloat64 the return value is the type of float64
func (N) MustToFixed ¶
MustToFixed the return value is the type of float64 and keeps the given decimal places
func (N) ToFixed ¶
ToFixed the return value is the type of float64 and keeps the given decimal places
func (*N) UnmarshalJSON ¶
UnmarshalJSON for json marshalJSON
type P ¶
type P struct { Items []interface{} `json:"items"` Total int `json:"total"` TotalPages int `json:"total_pages"` PageSize int `json:"page_size"` CurrentPage int `json:"current_page"` NextPage int `json:"next_page"` PreviousPage int `json:"previous_page"` LastPage int `json:"last_page"` Options map[string]interface{} `json:"options,omtempty"` }
type R ¶
type R map[string]interface{}
func MakeRSlice ¶
func MakeRSlice(value ...interface{}) []R
MakeRSlice convert any struct to R slice
func MakeRows ¶
func MakeRows(value ...interface{}) []R
MakeRows convert any struct to R slice alias MakeRSlice
type T ¶
type T struct {
Time interface{}
}
func (T) MustToTime ¶
MustToTime cast the T to time.Time
func (*T) UnmarshalJSON ¶
UnmarshalJSON for json marshalJSON
type UploadFile ¶
type UploadFile struct { Name string TempFile string Size int64 Header textproto.MIMEHeader }
Click to show internal directories.
Click to hide internal directories.