mysql

package
v0.0.0-...-d62a2a9 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigMysql

type ConfigMysql struct {
}

func (*ConfigMysql) GetValue

func (cs *ConfigMysql) GetValue(k string) (v interface{}, errCode errcode.Err)

GetValue @description: 根据k获取v @param: k string @author: GJing @email: gjing1st@gmail.com @date: 2022/12/27 11:06 @success:

func (ConfigMysql) SetValue

func (cs ConfigMysql) SetValue(k string, v interface{}) (errCode errcode.Err)

SetValue @description: 修改值 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/29 10:57 @success:

type CrontabStore

type CrontabStore struct {
}

func (CrontabStore) Create

func (cs CrontabStore) Create(tx *gorm.DB, cron entity.Crontab) (id uint, err error)

Create @description: 创建定时任务数据 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/10/31 17:58 @success:

func (CrontabStore) Delete

func (cs CrontabStore) Delete(tx *gorm.DB, id uint) (err error)

Delete @description: 删除任务 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/11/1 11:11 @success:

func (CrontabStore) SearchWaitingStatus

func (cs CrontabStore) SearchWaitingStatus(cronTime time.Time) (cronList []entity.Crontab, err error)

SearchWaitingStatus @description: @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/11/1 10:54 @success:

func (CrontabStore) Update

func (cs CrontabStore) Update(tx *gorm.DB, articleId uint, cronTime time.Time) (err error)

Update @description: 修改定时时间 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/10/31 18:52 @success:

func (CrontabStore) UpdateStatus

func (cs CrontabStore) UpdateStatus(tx *gorm.DB, status int, id uint) (err error)

UpdateStatus @description: 修改状态 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/11/1 11:05 @success:

type StatisticStore

type StatisticStore struct {
}

func (StatisticStore) GetAll

func (ss StatisticStore) GetAll() (arr []entity.Statistic, err error)

GetAll @description: 获取所有统计数据 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/13 23:07 @success:

func (StatisticStore) GetByKey

func (ss StatisticStore) GetByKey(key string) (value string, err error)

GetByKey @description: 通过Key查询统计数据 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/13 22:58 @success:

func (StatisticStore) Save

func (ss StatisticStore) Save(tx *gorm.DB, s entity.Statistic) (err error)

Save @description: 保存统计数据 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/13 22:44 @success:

type SysLogMysql

type SysLogMysql struct {
}

func (SysLogMysql) Create

func (sm SysLogMysql) Create(tx *gorm.DB, data *entity.SysLog) (errCode errcode.Err)

Create @description: 创建管理员日志 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/28 14:59 @success:

func (SysLogMysql) List

func (sm SysLogMysql) List(req *request.SysLogList) (users []entity.SysLog, total int64, errCode errcode.Err)

List @description: 日志列表查询 @param: @author: GJing @email: gjing1st@gmail.com @date: 2023/2/9 11:30 @success:

func (SysLogMysql) TruncateTable

func (sm SysLogMysql) TruncateTable(tx *gorm.DB) (errCode errcode.Err)

TruncateTable @description: 清空日志表 @param: @author: GJing @email: gjing1st@gmail.com @date: 2023/3/24 10:51 @success:

type UserMysql

type UserMysql struct {
}

func (*UserMysql) Create

func (um *UserMysql) Create(tx *gorm.DB, user *entity.User) (id uint, errCode errcode.Err)

Create @description: mysql存储 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/27 16:00 @success:

func (UserMysql) DeleteById

func (um UserMysql) DeleteById(tx *gorm.DB, userid int) (errCode errcode.Err)

DeleteById @description: 通过id删除用户 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/30 11:28 @success:

func (UserMysql) GetByName

func (um UserMysql) GetByName(name string) (user *entity.User, errCode errcode.Err)

GetByName @description: 通过用户名查询用户信息 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/27 17:10 @success:

func (UserMysql) GetByNameAndSerialNum

func (um UserMysql) GetByNameAndSerialNum(name, serialNum string) (user *entity.User, errCode errcode.Err)

GetByNameAndSerialNum @description: 查询ukey管理员 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/29 15:36 @success:

func (UserMysql) List

func (um UserMysql) List(req *request.UserList) (users []entity.User, total int64, errCode errcode.Err)

List @description: 获取用户列表 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/28 17:31 @success:

func (UserMysql) ResetUser

func (um UserMysql) ResetUser(tx *gorm.DB) (errCode errcode.Err)

ResetUser @description: 删除管理员意外的其他用户 @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/29 18:38 @success:

func (UserMysql) UpdateToken

func (um UserMysql) UpdateToken(id uint, token string) (errCode errcode.Err)

UpdateToken @description: 修改数据库用户token @param: @author: GJing @email: gjing1st@gmail.com @date: 2022/12/27 18:14 @success:

Jump to

Keyboard shortcuts

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