Documentation ¶
Index ¶
- func AsBool(v any, defs ...bool) bool
- func AsFloat64(n any, defs ...float64) float64
- func AsInt64(n any, defs ...int64) int64
- func AsString(v any, defs ...string) string
- func BuildUrl(base, path string, params Map) string
- func Def[T any](defArgs []T, def T) (ret T)
- func DefZero[T any](defArgs []T) (ret T)
- func EnsureInterface[T any](_ T)
- func IfZero[T any](v T, def T) (ret T)
- func Iif[T any](v bool, t, f T) T
- func JsonEncode(v any) []byte
- func JsonEncodeString(v any) string
- func MustNoError(err error, msgArgs ...any)
- func MustNoError2(_ any, err error, msgArgs ...any)
- func MustTrue(v bool, msg string, args ...any)
- func Panic(msg string, args ...any)
- func Ptr[T any](v T) *T
- func SqlDatetime(t *time.Time) string
- type AnyJsonDataProvider
- type JsonDataProvider
- type JsonValue
- func (jv *JsonValue) AsFloat64(defs ...float64) float64
- func (jv *JsonValue) AsInt64(defs ...int64) int64
- func (jv *JsonValue) AsInterface() any
- func (jv *JsonValue) AsMap() Map
- func (jv *JsonValue) AsString(defs ...string) string
- func (jv *JsonValue) Get(key string) *JsonValue
- func (jv *JsonValue) GetInt64(key string, defs ...int64) int64
- func (jv *JsonValue) GetString(key string, defs ...string) string
- func (jv *JsonValue) JsonData() any
- type Map
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureInterface ¶
func EnsureInterface[T any](_ T)
func JsonEncode ¶
func JsonEncodeString ¶
func MustNoError ¶
func MustNoError2 ¶
func SqlDatetime ¶
Types ¶
type AnyJsonDataProvider ¶
type AnyJsonDataProvider struct {
// contains filtered or unexported fields
}
func (*AnyJsonDataProvider) JsonData ¶
func (a *AnyJsonDataProvider) JsonData() any
type JsonDataProvider ¶
type JsonDataProvider interface {
JsonData() any
}
func AsJsonDataProvider ¶
func AsJsonDataProvider(v any) JsonDataProvider
type JsonValue ¶
type JsonValue struct {
// contains filtered or unexported fields
}
func JsonDecodeString ¶
func (*JsonValue) AsInterface ¶
Click to show internal directories.
Click to hide internal directories.