Documentation ¶
Index ¶
- func Convert(dst, src any) (err error)
- func Copy(dst, src any) error
- func CopyStruct(dst, src interface{})
- func CopyWithOption(dst, src any, opt Option) error
- func FileExist(path string) bool
- func NanoID(len ...int) (string, error)
- func ProjectPath() string
- func ReverseString(s string) string
- func UUID() string
- func UnicodeToString(u string) string
- type BaseError
- type Model
- type Option
- type Optional
- type Page
- type PageParam
- type Result
- func Fail() *Result
- func FailMsg(msg string) *Result
- func FailMsgCode(msg string, code int) *Result
- func FailMsgCodeData(msg string, code int, data any) *Result
- func FailMsgData(msg string, data any) *Result
- func Ok() *Result
- func OkCode(code int) *Result
- func OkData(data any) *Result
- func OkDataCode(data any, code int) *Result
- func OkDataMsg(data any, msg string) *Result
- func OkDataMsgCode(data any, msg string, code int) *Result
- func OkMsg(msg string) *Result
- type Slice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyStruct ¶ added in v0.1.0
func CopyStruct(dst, src interface{})
func CopyWithOption ¶ added in v0.1.0
func ProjectPath ¶
func ProjectPath() string
func ReverseString ¶
func UnicodeToString ¶
Types ¶
type Model ¶ added in v0.1.0
type Model struct { ID uint `json:"id" gorm:"column:id;primaryKey;comment:主键"` Tenant string `json:"-" gorm:"index;column:tenant;comment:租户"` CreatedAt time.Time `json:"createdAt" gorm:"autoCreateTime;default:current_timestamp;comment:创建日期"` UpdatedAt time.Time `json:"updatedAt" gorm:"autoUpdateTime;default:current_timestamp;comment:更新日期"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index;comment:逻辑删除"` }
type Optional ¶ added in v0.1.0
func OfNilables ¶ added in v0.1.0
type Page ¶ added in v0.1.0
type Result ¶ added in v0.1.0
type Result struct { Message string `json:"message,omitempty"` Code int `json:"code"` Data any `json:"data,omitempty"` }
func FailMsgCode ¶ added in v0.1.0
func FailMsgData ¶ added in v0.1.0
func OkDataCode ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.