models

package
v0.0.0-...-df8abf9 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CRON_SUCCESS = 0  // 任务执行成功
	CRON_ERROR   = -1 // 任务执行出错
	CRON_TIMEOUT = -2 // 任务执行超时
)
View Source
const (
	SYS  = 1
	MAIL = 2
	ERR  = 3
)

Variables

This section is empty.

Functions

func CronDelById

func CronDelById(id int) (int64, error)

func CronLogAdd

func CronLogAdd(cron *AppCronLog) (int64, error)

func CronLogDelById

func CronLogDelById(id int) (int64, error)

func DebugAdd

func DebugAdd(utype int, msg string)

func FuncDelById

func FuncDelById(id int) (int64, error)

func Init

func Init()

func ItemDelById

func ItemDelById(id int) (int64, error)

func LogAdd

func LogAdd(uid int, utype int, msg string)

func RoleDelById

func RoleDelById(id int) (int64, error)

func ServerDelById

func ServerDelById(id int) (int64, error)

func TableName

func TableName(name string) string

func UserDelById

func UserDelById(id int) (int64, error)

Types

type AppCron

type AppCron struct {
	Id         int
	Name       string
	Desc       string
	ItemId     int
	CronSpec   string
	Cmd        string
	Concurrent int
	ExecNum    int
	PrevTime   int64
	Notify     int
	Timeout    int
	Status     int
	UpdateTime int64
	CreateTime int64
}

func CronGetById

func CronGetById(id int) (*AppCron, error)

func CronGetByName

func CronGetByName(name string) (*AppCron, error)

func CronGetList

func CronGetList(page, pageSize int, filters ...interface{}) ([]*AppCron, int64)

func (*AppCron) TableName

func (u *AppCron) TableName() string

func (*AppCron) Update

func (u *AppCron) Update(fields ...string) error

type AppCronLog

type AppCronLog struct {
	Id          int
	CronId      int
	Output      string
	Error       string
	ProcessTime int
	Status      int
	CreateTime  int64
}

func CronLogGetById

func CronLogGetById(id int) (*AppCronLog, error)

func CronLogGetByName

func CronLogGetByName(name string) (*AppCronLog, error)

func CronLogGetList

func CronLogGetList(page, pageSize int, filters ...interface{}) ([]*AppCronLog, int64)

func (*AppCronLog) TableName

func (u *AppCronLog) TableName() string

func (*AppCronLog) Update

func (u *AppCronLog) Update(fields ...string) error

type AppDebug

type AppDebug struct {
	Id      int
	Type    int
	Msg     string
	AddTime int64
}

func DebugGetList

func DebugGetList(page, pageSize int, filters ...interface{}) ([]*AppDebug, int64)

func (*AppDebug) TableName

func (u *AppDebug) TableName() string

func (*AppDebug) Update

func (u *AppDebug) Update(fields ...string) error

type AppItem

type AppItem struct {
	Id         int
	Name       string
	Desc       string
	Mail       string
	Type       int
	Sign       string
	ServerId   int
	Status     int
	UpdateTime int64
	CreateTime int64
}

func ItemGetById

func ItemGetById(id int) (*AppItem, error)

func ItemGetByName

func ItemGetByName(name string) (*AppItem, error)

func ItemGetList

func ItemGetList(page, pageSize int, filters ...interface{}) ([]*AppItem, int64)

func (*AppItem) TableName

func (u *AppItem) TableName() string

func (*AppItem) Update

func (u *AppItem) Update(fields ...string) error

type AppServer

type AppServer struct {
	Id         int
	Ip         string
	Port       int
	Desc       string
	Type       int
	User       string
	Pwd        string
	Status     int
	UpdateTime int64
	CreateTime int64
}

func ServerGetById

func ServerGetById(id int) (*AppServer, error)

func ServerGetByName

func ServerGetByName(name string) (*AppServer, error)

func ServerGetList

func ServerGetList(page, pageSize int, filters ...interface{}) ([]*AppServer, int64)

func (*AppServer) TableName

func (u *AppServer) TableName() string

func (*AppServer) Update

func (u *AppServer) Update(fields ...string) error

type SysFunc

type SysFunc struct {
	Id         int
	Name       string
	Pid        int
	Controller string
	Action     string
	Type       int
	IsMenu     int
	Icon       string
	Desc       string
	Sort       int
	Status     int
	UpdateTime int64
	CreateTime int64
}

func FuncGetById

func FuncGetById(id int) (*SysFunc, error)

func FuncGetListByPid

func FuncGetListByPid(pid int64) ([]SysFunc, error)

func (*SysFunc) TableName

func (u *SysFunc) TableName() string

func (*SysFunc) Update

func (u *SysFunc) Update(fields ...string) error

type SysFuncNav

type SysFuncNav struct {
	Info      SysFunc
	List      []SysFunc
	MenuOpen  bool
	ListCount int
}

func FuncGetList

func FuncGetList() []SysFuncNav

func FuncGetNav

func FuncGetNav(curController string, curAction string) (navNow []SysFuncNav, menuNameNow string, funcNameNow string, isAuthNow bool)

func FuncInGetNav

func FuncInGetNav(in string, curController string, curAction string) (navNow []SysFuncNav, menuNameNow string, funcNameNow string)

type SysLog

type SysLog struct {
	Id      int
	Uid     int
	Type    int
	Msg     string
	AddTime int64
}

func LogGetList

func LogGetList(page, pageSize int, filters ...interface{}) ([]*SysLog, int64)

func (*SysLog) TableName

func (u *SysLog) TableName() string

func (*SysLog) Update

func (u *SysLog) Update(fields ...string) error

type SysRole

type SysRole struct {
	Id         int
	Name       string
	Desc       string
	List       string
	Status     int
	UpdateTime int64
	CreateTime int64
}

func RoleGetAll

func RoleGetAll() ([]*SysRole, int64)

func RoleGetById

func RoleGetById(id int) (*SysRole, error)

func RoleGetList

func RoleGetList(page, pageSize int, filters ...interface{}) ([]*SysRole, int64)

func (*SysRole) TableName

func (u *SysRole) TableName() string

func (*SysRole) Update

func (u *SysRole) Update(fields ...string) error

type SysUser

type SysUser struct {
	Id         int
	Username   string
	Nick       string
	Sex        int
	Password   string
	Mail       string
	Tel        string
	Roleid     int
	Status     int
	UpdateTime int64
	CreateTime int64
}

func UserGetById

func UserGetById(id int) (*SysUser, error)

func UserGetByName

func UserGetByName(username string) (*SysUser, error)

func UserGetList

func UserGetList(page, pageSize int, filters ...interface{}) ([]*SysUser, int64)

func (*SysUser) TableName

func (u *SysUser) TableName() string

func (*SysUser) Update

func (u *SysUser) Update(fields ...string) error

Jump to

Keyboard shortcuts

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