Documentation
¶
Index ¶
Constants ¶
View Source
const ( Undefined Type = -1 TypeEmail = iota TypeQuota )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailContent ¶ added in v1.1.0
func (*EmailContent) Marshal ¶ added in v1.1.0
func (c *EmailContent) Marshal() ([]byte, error)
func (*EmailContent) Unmarshal ¶ added in v1.1.0
func (c *EmailContent) Unmarshal(data []byte) error
type EmailScope ¶ added in v1.1.0
type EmailScope struct {
Type int8 `gorm:"not null;comment:Scope Type"`
RegisterStartTime int64 `json:"register_start_time"`
RegisterEndTime int64 `json:"register_end_time"`
Recipients []string `json:"recipients"` // list of email addresses
Additional []string `json:"additional"` // additional email addresses
Scheduled int64 `json:"scheduled"` // scheduled time (unix timestamp)
Interval uint8 `json:"interval"` // interval in seconds
Limit uint64 `json:"limit"` // daily send limit
}
func (*EmailScope) Marshal ¶ added in v1.1.0
func (s *EmailScope) Marshal() ([]byte, error)
func (*EmailScope) Unmarshal ¶ added in v1.1.0
func (s *EmailScope) Unmarshal(data []byte) error
type QuotaContent ¶ added in v1.1.0
type QuotaContent struct {
ResetTraffic bool `json:"reset_traffic"` // whether to reset traffic
Days uint64 `json:"days,omitempty"` // days to add
GiftType uint8 `json:"gift_type,omitempty"` // 1: Fixed, 2: Ratio
GiftValue uint64 `json:"gift_value,omitempty"` // value of the gift type
}
func (*QuotaContent) Marshal ¶ added in v1.1.0
func (c *QuotaContent) Marshal() ([]byte, error)
func (*QuotaContent) Unmarshal ¶ added in v1.1.0
func (c *QuotaContent) Unmarshal(data []byte) error
type QuotaScope ¶ added in v1.1.0
type QuotaScope struct {
Subscribers []int64 `json:"subscribers"` // Subscribe IDs
IsActive *bool `json:"is_active"` // filter by active status
StartTime int64 `json:"start_time"` // filter by subscription start time
EndTime int64 `json:"end_time"` // filter by subscription end time
Objects []int64 `json:"recipients"` // list of user subs IDs
}
func (*QuotaScope) Marshal ¶ added in v1.1.0
func (s *QuotaScope) Marshal() ([]byte, error)
func (*QuotaScope) Unmarshal ¶ added in v1.1.0
func (s *QuotaScope) Unmarshal(data []byte) error
type Task ¶ added in v1.1.0
type Task struct {
Id int64 `gorm:"primaryKey;autoIncrement;comment:ID"`
Type int8 `gorm:"not null;comment:Task Type"`
Scope string `gorm:"type:text;comment:Task Scope"`
Content string `gorm:"type:text;comment:Task Content"`
Status int8 `gorm:"not null;default:0;comment:Task Status: 0: Pending, 1: In Progress, 2: Completed, 3: Failed"`
Errors string `gorm:"type:text;comment:Task Errors"`
Total uint64 `gorm:"column:total;not null;default:0;comment:Total Number"`
Current uint64 `gorm:"column:current;not null;default:0;comment:Current Number"`
CreatedAt time.Time `gorm:"<-:create;comment:Creation Time"`
UpdatedAt time.Time `gorm:"comment:Update Time"`
}
Click to show internal directories.
Click to hide internal directories.