models

package
v0.0.0-...-a52fffe Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WEB_NAME        = "web_name"
	WEB_KEYWORD     = "web_keyword"
	WEB_DESC        = "web_desc"
	WEB_STAT        = "web_stat"
	WEB_NOTICE      = "web_notice"
	WEB_NOTICE_MAIL = "web_notice_mail"

	MAIL_HOST       = "mail_host"
	MAIL_PORT       = "mail_port"
	MAIL_USER       = "mail_user"
	MAIL_PWD        = "mail_pwd"
	MAIL_QUEUE_SIZE = "mail_queue_size"
)
View Source
const (
	SYS  = 1
	MAIL = 2
	ERR  = 3
)

Variables

This section is empty.

Functions

func DebugAdd

func DebugAdd(utype int, msg string)

func FuncDelById

func FuncDelById(id int) (int64, error)

func Init

func Init()

func ItemCount

func ItemCount() int64

func ItemDelById

func ItemDelById(id int) (int64, error)

func ItemGetNameById

func ItemGetNameById(id int) string

func LogAdd

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

func MysqlPing

func MysqlPing() bool

func NovelCount

func NovelCount(from_id string) int64

func NovelDelById

func NovelDelById(id int) (int64, error)

func NovelTodayCount

func NovelTodayCount(from_id string) int64

func OptionGet

func OptionGet(name string, def string) string

func OptionSet

func OptionSet(name string, value string) bool

func RoleDelById

func RoleDelById(id int) (int64, error)

func TableName

func TableName(name string) string

func UserDelById

func UserDelById(id int) (int64, error)

Types

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
	IsOfficial      string
	PageCharset     string
	PageIndex       string
	PageIndexRule   string
	PathRule        string
	PathTpl         string
	PathPageExp     string
	NameRule        string
	DescRule        string
	AuthorRule      string
	CategoryRule    string
	StatusRule      string
	StatusEndMark   string
	ChapterPathRule string
	ChapterPathExp  string
	ChapterListRule string
	ContentExp      string
	ContentRule     string
	SosoExp         string
	SosoPageArgs    string
	SosoRule        string
	SpiderExp       string
	SpiderRange     string
	SpiderRule      string
	SpiderProgress  int
	ErrMsg          string
	Status          int
	CronUpTime      int64
	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 AppNovel

type AppNovel struct {
	Id             int
	FromId         int
	Url            string
	UniqueId       string
	Name           string
	Category       string
	Desc           string
	Author         string
	List           string
	ChapterNum     int
	LastChapter    string
	LastChapterUrl string
	BookStatus     int
	Status         int
	UpdateTime     int64
	CreateTime     int64
}

func CronNovelGetByNameAndFromId

func CronNovelGetByNameAndFromId(name string, fromid string) (*AppNovel, error)

func CronNovelGetByStatus

func CronNovelGetByStatus(status string, interval int64, num int) []*AppNovel

func NovelGetById

func NovelGetById(id int) (*AppNovel, error)

func NovelGetByIdStr

func NovelGetByIdStr(id string) (*AppNovel, error)

func NovelGetByName

func NovelGetByName(name string) (*AppNovel, error)

func NovelGetByUniqueId

func NovelGetByUniqueId(unique_id string) (*AppNovel, error)

func NovelGetList

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

func SosoNovelByKw

func SosoNovelByKw(kw string, page, pageSize int) ([]AppNovel, int64)

func (*AppNovel) TableName

func (u *AppNovel) TableName() string

func (*AppNovel) Update

func (u *AppNovel) 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 SysOption

type SysOption struct {
	Id         int
	Name       string
	Value      string
	UpdateTime int64
	CreateTime int64
}

func (*SysOption) TableName

func (u *SysOption) TableName() string

func (*SysOption) Update

func (u *SysOption) 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