Documentation
¶
Overview ¶
Package currency 提供定义货币支付的相关功能
Index ¶
- Variables
- func ErrBalanceNotEnough() error
- func Install(mod *user.Module, id string)
- func TypeValidator(v Type) bool
- type LogQuery
- type Module
- func (m *Module) Add(tx *orm.Tx, u *user.User, val uint, memo string, expire time.Time) error
- func (m *Module) Del(tx *orm.Tx, u *user.User, val uint64, memo string) error
- func (m *Module) Freeze(tx *orm.Tx, u *user.User, val uint, memo string) error
- func (m *Module) GetLogs(u *user.User, q *LogQuery) (*query.Page[logPO], error)
- func (m *Module) GetUserOverview(u *user.User, expire time.Time) (*OverviewVO, error)
- func (m *Module) Unfreeze(tx *orm.Tx, u *user.User, val int64, memo string) error
- type OverviewExpireVO
- type OverviewVO
- type Type
- func (t Type) IsValid() bool
- func (t Type) MarshalText() ([]byte, error)
- func (Type) OpenAPISchema(s *openapi.Schema)
- func (Type) PrimitiveType() core.PrimitiveType
- func (t *Type) Scan(src any) error
- func (t Type) String() string
- func (t *Type) UnmarshalText(p []byte) error
- func (t Type) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TypeRule = filter.V(TypeValidator, locales.InvalidValue) TypeSliceRule = filter.SV[[]Type](TypeValidator, locales.InvalidValue) TypeFilter = filter.NewBuilder(TypeRule) TypeSliceFilter = filter.NewBuilder(TypeSliceRule) )
Functions ¶
func TypeValidator ¶
Types ¶
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
func (*Module) GetUserOverview ¶
GetUserOverview 获取用户 u 的摘要信息
expire Expire 字段返回在此之前过期的积分,如果为空,则 Expire 不返回;
type OverviewExpireVO ¶
type OverviewVO ¶
type OverviewVO struct {
XMLName struct{} `json:"-" yaml:"-" cbor:"-" xml:"overview"`
Available int64 `json:"available" yaml:"available" cbor:"available" xml:"available"`
Freeze int64 `json:"freeze" yaml:"freeze" cbor:"freeze" xml:"freeze"`
Used int64 `json:"used" yaml:"used" cbor:"used" xml:"used"`
Expire []*OverviewExpireVO `json:"expire,omitempty" yaml:"expire,omitempty" cbor:"expire,omitempty" xml:"expire,omitempty"`
}
type Type ¶
type Type int8
Type 日志类型
func (Type) MarshalText ¶
MarshalText encoding.TextMarshaler
func (Type) OpenAPISchema ¶
func (Type) PrimitiveType ¶
func (Type) PrimitiveType() core.PrimitiveType
func (*Type) UnmarshalText ¶
UnmarshalText encoding.TextUnmarshaler
Click to show internal directories.
Click to hide internal directories.