service

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAdvertiseService

func AddAdvertiseService(advertise model.Advertise) (err error)

AddAdvertiseService 新增广告

func AllAdvertiseService

func AllAdvertiseService() (advertises []model.Advertise, err error)

AllAdvertiseService 加载所有广告

func DeleteAdvertiseService

func DeleteAdvertiseService(id int64) (err error)

DeleteAdvertiseService 删除一条广告

func GetEfficientAdvertiseService

func GetEfficientAdvertiseService() (advertises []model.Advertise, err error)

GetEfficientAdvertiseService 加载正在生效的广告

Types

type CaptchaCode

type CaptchaCode struct {
	UserId         int64       `json:"user_id"`
	GroupId        int64       `json:"group_id"`
	Code           string      `json:"code"`
	CaptchaMessage *tb.Message `json:"message_id"`
	PendingMessage *tb.Message `json:"pending_message"`
	GroupTitle     string      `json:"group_title"`
	CreatedAt      int64       `json:"created_at"`
}

CaptchaCode 验证码

type CaptchaCodeTable

type CaptchaCodeTable struct {
	UserCaptchaCode map[string]*CaptchaCode
	sync.RWMutex
}

func NewCaptchaCodeTable

func NewCaptchaCodeTable() *CaptchaCodeTable

func (*CaptchaCodeTable) Del

func (t *CaptchaCodeTable) Del(key string)

func (*CaptchaCodeTable) Get

func (t *CaptchaCodeTable) Get(key string) *CaptchaCode

func (*CaptchaCodeTable) Set

func (t *CaptchaCodeTable) Set(key string, val *CaptchaCode)

type CaptchaPending

type CaptchaPending struct {
	UserId         int64       `json:"user_id"`
	GroupId        int64       `json:"group_id"`
	JoinAt         int64       `json:"join_at"`
	PendingMessage *tb.Message `json:"pending_message"`
}

type CaptchaPendingTable

type CaptchaPendingTable struct {
	UserCaptchaPending map[string]*CaptchaPending
	sync.RWMutex
}

func NewCaptchaPendingTable

func NewCaptchaPendingTable() *CaptchaPendingTable

func (*CaptchaPendingTable) Del

func (t *CaptchaPendingTable) Del(key string)

func (*CaptchaPendingTable) Get

func (*CaptchaPendingTable) Set

func (t *CaptchaPendingTable) Set(key string, val *CaptchaPending)

Jump to

Keyboard shortcuts

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