dao

package
v0.0.0-...-8c33a01 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NodeDao = new(nodeDao)
View Source
var NotifyDao = new(notifyDao)
View Source
var TagDao = new(tagDao)
View Source
var UserDao = new(userDao)

Functions

func CreateEngine

func CreateEngine(path string, config *config.Database) (err error)

func Timestamp

func Timestamp() string

Types

type JSON

type JSON map[string]interface{}

func (JSON) GetInt

func (json JSON) GetInt(name string) (int, bool)

func (JSON) GetString

func (json JSON) GetString(name string) (string, bool)

func (JSON) Int

func (json JSON) Int(name string, def int) int

func (JSON) String

func (json JSON) String(name string) string

type Node

type Node struct {
	Tag        string     `json:"tag" xorm:"tag"`
	Key        string     `json:"key" xorm:"varchar(32) notnull pk 'key'"`
	Token      string     `json:"token" xorm:"token"`
	Ip         string     `json:"ip" xorm:"ip"`
	Address    string     `json:"address" xorm:"address"`
	ProgramNum int        `json:"programNum" xorm:"programNum"`
	Status     NodeStatus `json:"status" xorm:"-"`
	Time       string     `json:"time" xorm:"time"`
}

type NodeStatus

type NodeStatus string
const (
	NodeStatusOnline  NodeStatus = "online"
	NodeStatusOutline NodeStatus = "outline"
)

type Notify

type Notify struct {
	Name       string    `json:"name" yaml:"name" toml:"name" xorm:"varchar(64) notnull pk 'name'"`
	Config     string    `json:"config" yaml:"config" toml:"config" xorm:"config"`
	CreateTime time.Time `json:"createTime" yaml:"createTime" toml:"createTime" xorm:"createTime"`
}

type Page

type Page struct {
	Total int64       `json:"total"`
	Page  int         `json:"page"`
	Limit int         `json:"limit"`
	Data  interface{} `json:"data"`
}

type Tag

type Tag struct {
	Name  string `json:"name" yaml:"name" toml:"name" xorm:"varchar(64) notnull pk 'name'"`
	Class string `json:"class" yaml:"class" toml:"class" xorm:"class"`
}

type User

type User struct {
	Name   string `json:"name" yaml:"name" toml:"name" xorm:"varchar(32) notnull pk 'name'"`
	Passwd string `json:"-" xorm:"passwd"`
	Time   string `json:"time" yaml:"time" toml:"time" xorm:"time"`
}

type XormLogger

type XormLogger struct {
	// contains filtered or unexported fields
}

func (*XormLogger) Debug

func (self *XormLogger) Debug(v ...interface{})

func (*XormLogger) Debugf

func (self *XormLogger) Debugf(format string, v ...interface{})

func (*XormLogger) Error

func (self *XormLogger) Error(v ...interface{})

func (*XormLogger) Errorf

func (self *XormLogger) Errorf(format string, v ...interface{})

func (*XormLogger) Info

func (self *XormLogger) Info(v ...interface{})

func (*XormLogger) Infof

func (self *XormLogger) Infof(format string, v ...interface{})

func (*XormLogger) IsShowSQL

func (self *XormLogger) IsShowSQL() bool

func (*XormLogger) Level

func (self *XormLogger) Level() log.LogLevel

func (*XormLogger) SetLevel

func (self *XormLogger) SetLevel(l log.LogLevel)

func (*XormLogger) ShowSQL

func (self *XormLogger) ShowSQL(show ...bool)

func (*XormLogger) Warn

func (self *XormLogger) Warn(v ...interface{})

func (*XormLogger) Warnf

func (self *XormLogger) Warnf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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