mmodel

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SToString = func(data any) string {
	return fmt.Sprintf("%v", data)
}

Functions

func NewListMap

func NewListMap(cap int) *listMap

Types

type CmdCode added in v0.0.8

type CmdCode struct {
	Code string `json:"code"  form:"code" uri:"code" binding:"required"`
}

type CmdId added in v0.0.8

type CmdId struct {
	Id int64 `json:"id" form:"id" uri:"id"  binding:"required"`
}

type CmdIdStr added in v0.0.8

type CmdIdStr struct {
	Id string `json:"id"  form:"id" uri:"id"  binding:"required"`
}

type CmdPage

type CmdPage struct {
	Page String `json:"page" form:"page" uri:"page" binding:"required"`
	Size String `json:"size" form:"size" uri:"size" binding:"required"`
}

type CmdStat added in v0.0.8

type CmdStat struct {
	Id      string `json:"id"  binding:"required"`
	NewStat bool   `json:"newStat" `
	OldStat bool   `json:"oldStat" `
}

type Comparator

type Comparator interface {
	Equal(data *any) bool
}

type LocalDatetime

type LocalDatetime time.Time

func NowLocalDateTime

func NowLocalDateTime() *LocalDatetime

func ToLocalDateTime

func ToLocalDateTime(str string) LocalDatetime

func (LocalDatetime) IsNull

func (domain LocalDatetime) IsNull() bool

func (*LocalDatetime) MarshalJSON

func (domain *LocalDatetime) MarshalJSON() ([]byte, error)

func (*LocalDatetime) Scan

func (domain *LocalDatetime) Scan(src any) error

func (LocalDatetime) String

func (domain LocalDatetime) String() string

func (LocalDatetime) Time

func (domain LocalDatetime) Time() time.Time

func (*LocalDatetime) UnmarshalJSON

func (domain *LocalDatetime) UnmarshalJSON(data []byte) (err error)

func (LocalDatetime) Value

func (domain LocalDatetime) Value() (driver.Value, error)

type Pageable

type Pageable struct {
	Content        any   `json:"content"`
	Page           int64 `json:"page"`
	Size           int64 `json:"size"`
	First          bool  `json:"first"`
	Last           bool  `json:"last"`
	MaxPage        int64 `json:"lastPage"`
	TotalElements  int64 `json:"totalElements"`
	CurrentElement int64 `json:"currentElement"`
}

func (*Pageable) IsEmpty

func (domain *Pageable) IsEmpty() bool

func (*Pageable) NotEmpty

func (domain *Pageable) NotEmpty() bool

type Pair

type Pair struct {
	Key any `json:"key"`
	Val any `json:"val"`
}

func (*Pair) Equal

func (domain *Pair) Equal(data *any) bool

type Resp

type Resp struct {
	Code    int    `json:"code"`
	Data    any    `json:"data"`
	Message string `json:"message"`
}

func Fail

func Fail(message string) *Resp

func Failure

func Failure() *Resp

func Ok

func Ok() *Resp

func OkD

func OkD(data any) *Resp

func (*Resp) Ok

func (domain *Resp) Ok() *Resp

type String

type String string

func NowLocalDateTimeStr

func NowLocalDateTimeStr() String

func ReadString

func ReadString(data []byte) String

func (*String) Bool

func (domain *String) Bool() bool

func (*String) EqualFold

func (domain *String) EqualFold(val string) bool

func (*String) Float32

func (domain *String) Float32() float32

func (*String) Float64

func (domain *String) Float64() float64

func (*String) HasPrefix

func (domain *String) HasPrefix(prefix string) bool

func (*String) HasSuffix

func (domain *String) HasSuffix(suffix string) bool

func (*String) Index

func (domain *String) Index(substr string) int

func (*String) IndexAny

func (domain *String) IndexAny(chars string) int

func (*String) Int

func (domain *String) Int() int

func (*String) Int16

func (domain *String) Int16() int16

func (*String) Int32

func (domain *String) Int32() int32

func (*String) Int64

func (domain *String) Int64() int64

func (*String) Int8

func (domain *String) Int8() int8

func (*String) IsEmpty

func (domain *String) IsEmpty() bool

func (*String) LastIndex

func (domain *String) LastIndex(substr string) int

func (*String) LastIndexAny

func (domain *String) LastIndexAny(chars string) int

func (*String) Length

func (domain *String) Length() int

func (*String) LocalDateTime

func (domain *String) LocalDateTime() LocalDatetime

func (*String) Scan

func (domain *String) Scan(src any) error

func (*String) String

func (domain *String) String() string

func (*String) Time

func (domain *String) Time() time.Time

func (*String) UnmarshalJSON

func (domain *String) UnmarshalJSON(data []byte) (err error)

func (*String) Value

func (domain *String) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL