settings

package
v0.0.0-...-abd0671 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notify

type Notify struct {
	Name   string `json:"name" bson:"name"`     // 中文名称
	Alias  string `json:"alias" bson:"alias"`   // 英文名称
	Enable bool   `json:"enable" bson:"enable"` // 开启状态
}

Notify

type Settings

type Settings struct {
	Name           string     `json:"name" bson:"name"`                       // 固定名称
	UserLocal      bool       `json:"user_local" bson:"user_local"`           // 本地用户是否开启
	NotifyStrategy []Strategy `json:"notify_strategy" bson:"notify_strategy"` // 分派策略
	SendTime       bool       `json:"send_time" bson:"send_time"`             // 分派时间是否开启
	StartTime      string     `json:"start_time" bson:"start_time"`           // 开始时间
	EndTime        string     `json:"end_time" bson:"end_time"`               // 结束时间
	ModifyTime     time.Time  `json:"modify_time" bson:"modify_time"`         // 修改时间
}

Settings

func (Settings) GetUserSettings

func (s Settings) GetUserSettings() (r Settings)

GetUserSettings

func (Settings) Save

func (s Settings) Save() (err error)

ModifySettings

func (Settings) TableName

func (t Settings) TableName() string

TableName

type Strategy

type Strategy struct {
	Name   string   `json:"name" bson:"name"`     // 名称
	Notify []Notify `json:"notify" bson:"notify"` // 通知
}

Strategy

Jump to

Keyboard shortcuts

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