dbschema

package
v1.4.21 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithPrefix = func(tableName string) string {
	return "" + tableName
}

Functions

This section is empty.

Types

type NgingCommand

type NgingCommand struct {
	Id            uint   `db:"id,omitempty,pk" bson:"id,omitempty" comment:"ID" json:"id" xml:"id"`
	Name          string `db:"name" bson:"name" comment:"名称" json:"name" xml:"name"`
	Description   string `db:"description" bson:"description" comment:"说明" json:"description" xml:"description"`
	Command       string `db:"command" bson:"command" comment:"命令" json:"command" xml:"command"`
	WorkDirectory string `db:"work_directory" bson:"work_directory" comment:"工作目录" json:"work_directory" xml:"work_directory"`
	Env           string `db:"env" bson:"env" comment:"环境变量(一行一个,格式为:var1=val1)" json:"env" xml:"env"`
	Created       uint   `db:"created" bson:"created" comment:"添加时间" json:"created" xml:"created"`
	Updated       uint   `db:"updated" bson:"updated" comment:"修改时间" json:"updated" xml:"updated"`
	Disabled      string `db:"disabled" bson:"disabled" comment:"是否禁用" json:"disabled" xml:"disabled"`
	Remote        string `db:"remote" bson:"remote" comment:"是否(Y/N)执行远程SSH命令(A表示两者同时支持)" json:"remote" xml:"remote"`
	SshAccountId  string `` /* 129-byte string literal not displayed */
	// contains filtered or unexported fields
}

NgingCommand 指令集

func NewNgingCommand

func NewNgingCommand(ctx echo.Context) *NgingCommand

func (*NgingCommand) AsKV

func (a *NgingCommand) AsKV(keyField string, valueField string, inputRows ...[]*NgingCommand) param.Store

func (*NgingCommand) AsMap

func (a *NgingCommand) AsMap(onlyFields ...string) param.Store

func (*NgingCommand) AsRow

func (a *NgingCommand) AsRow(onlyFields ...string) param.Store

func (*NgingCommand) Base_ added in v1.4.0

func (a *NgingCommand) Base_() factory.Baser

func (*NgingCommand) BatchValidate

func (a *NgingCommand) BatchValidate(kvset map[string]interface{}) error

func (*NgingCommand) CPAFrom

func (a *NgingCommand) CPAFrom(source factory.Model) factory.Model

func (*NgingCommand) ConnID added in v1.1.0

func (a *NgingCommand) ConnID() int

func (*NgingCommand) Context

func (a *NgingCommand) Context() echo.Context

func (*NgingCommand) Count

func (a *NgingCommand) Count(mw func(db.Result) db.Result, args ...interface{}) (int64, error)

func (*NgingCommand) Delete

func (a *NgingCommand) Delete(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingCommand) Deletex

func (a *NgingCommand) Deletex(mw func(db.Result) db.Result, args ...interface{}) (affected int64, err error)

func (*NgingCommand) EventOFF

func (a *NgingCommand) EventOFF(off ...bool) factory.Model

func (*NgingCommand) EventON

func (a *NgingCommand) EventON(on ...bool) factory.Model

func (*NgingCommand) Exists

func (a *NgingCommand) Exists(mw func(db.Result) db.Result, args ...interface{}) (bool, error)

func (*NgingCommand) FromRow

func (a *NgingCommand) FromRow(row map[string]interface{})

func (*NgingCommand) Get

func (a *NgingCommand) Get(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingCommand) GroupBy

func (a *NgingCommand) GroupBy(keyField string, inputRows ...[]*NgingCommand) map[string][]*NgingCommand

func (*NgingCommand) InitObjects

func (a *NgingCommand) InitObjects() *[]*NgingCommand

func (*NgingCommand) Insert

func (a *NgingCommand) Insert() (pk interface{}, err error)

func (*NgingCommand) KeyBy

func (a *NgingCommand) KeyBy(keyField string, inputRows ...[]*NgingCommand) map[string]*NgingCommand

func (*NgingCommand) List

func (a *NgingCommand) List(recv interface{}, mw func(db.Result) db.Result, page, size int, args ...interface{}) (func() int64, error)

func (*NgingCommand) ListByOffset

func (a *NgingCommand) ListByOffset(recv interface{}, mw func(db.Result) db.Result, offset, size int, args ...interface{}) (func() int64, error)

func (*NgingCommand) ListPage

func (a *NgingCommand) ListPage(cond *db.Compounds, sorts ...interface{}) error

func (*NgingCommand) ListPageAs

func (a *NgingCommand) ListPageAs(recv interface{}, cond *db.Compounds, sorts ...interface{}) error

func (*NgingCommand) Name_

func (a *NgingCommand) Name_() string

func (*NgingCommand) Namer

func (a *NgingCommand) Namer() func(factory.Model) string

func (*NgingCommand) New

func (a *NgingCommand) New(structName string, connID ...int) factory.Model

func (*NgingCommand) NewObjects

func (a *NgingCommand) NewObjects() factory.Ranger

func (*NgingCommand) NewParam

func (a *NgingCommand) NewParam() *factory.Param

func (*NgingCommand) Objects

func (a *NgingCommand) Objects() []*NgingCommand

func (*NgingCommand) Param

func (a *NgingCommand) Param(mw func(db.Result) db.Result, args ...interface{}) *factory.Param

func (*NgingCommand) Reset

func (a *NgingCommand) Reset() *NgingCommand

func (*NgingCommand) Set

func (a *NgingCommand) Set(key interface{}, value ...interface{})

func (*NgingCommand) SetConnID

func (a *NgingCommand) SetConnID(connID int) factory.Model

func (*NgingCommand) SetContext

func (a *NgingCommand) SetContext(ctx echo.Context) factory.Model

func (*NgingCommand) SetNamer

func (a *NgingCommand) SetNamer(namer func(factory.Model) string) factory.Model

func (*NgingCommand) SetParam

func (a *NgingCommand) SetParam(param *factory.Param) factory.Model

func (*NgingCommand) Short_

func (a *NgingCommand) Short_() string

func (*NgingCommand) Struct_

func (a *NgingCommand) Struct_() string

func (*NgingCommand) Trans

func (a *NgingCommand) Trans() factory.Transactioner

func (*NgingCommand) Update

func (a *NgingCommand) Update(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingCommand) UpdateByFields

func (a *NgingCommand) UpdateByFields(mw func(db.Result) db.Result, fields []string, args ...interface{}) (err error)

func (*NgingCommand) UpdateField

func (a *NgingCommand) UpdateField(mw func(db.Result) db.Result, field string, value interface{}, args ...interface{}) (err error)

func (*NgingCommand) UpdateFields

func (a *NgingCommand) UpdateFields(mw func(db.Result) db.Result, kvset map[string]interface{}, args ...interface{}) (err error)

func (*NgingCommand) UpdateValues

func (a *NgingCommand) UpdateValues(mw func(db.Result) db.Result, keysValues *db.KeysValues, args ...interface{}) (err error)

func (*NgingCommand) Updatex

func (a *NgingCommand) Updatex(mw func(db.Result) db.Result, args ...interface{}) (affected int64, err error)

func (*NgingCommand) UpdatexByFields

func (a *NgingCommand) UpdatexByFields(mw func(db.Result) db.Result, fields []string, args ...interface{}) (affected int64, err error)

func (*NgingCommand) UpdatexField added in v1.2.0

func (a *NgingCommand) UpdatexField(mw func(db.Result) db.Result, field string, value interface{}, args ...interface{}) (affected int64, err error)

func (*NgingCommand) UpdatexFields added in v1.2.0

func (a *NgingCommand) UpdatexFields(mw func(db.Result) db.Result, kvset map[string]interface{}, args ...interface{}) (affected int64, err error)

func (*NgingCommand) Upsert

func (a *NgingCommand) Upsert(mw func(db.Result) db.Result, args ...interface{}) (pk interface{}, err error)

func (*NgingCommand) Use

func (*NgingCommand) Validate

func (a *NgingCommand) Validate(field string, value interface{}) error

func (*NgingCommand) XObjects

func (a *NgingCommand) XObjects() Slice_NgingCommand

type NgingForeverProcess

type NgingForeverProcess struct {
	Id           uint   `db:"id,omitempty,pk" bson:"id,omitempty" comment:"ID" json:"id" xml:"id"`
	Uid          uint   `db:"uid" bson:"uid" comment:"添加人ID" json:"uid" xml:"uid"`
	Name         string `db:"name" bson:"name" comment:"名称" json:"name" xml:"name"`
	Command      string `db:"command" bson:"command" comment:"命令" json:"command" xml:"command"`
	Workdir      string `db:"workdir" bson:"workdir" comment:"工作目录" json:"workdir" xml:"workdir"`
	Env          string `db:"env" bson:"env" comment:"环境变量" json:"env" xml:"env"`
	Args         string `db:"args" bson:"args" comment:"命令参数" json:"args" xml:"args"`
	Pidfile      string `db:"pidfile" bson:"pidfile" comment:"PID记录文件" json:"pidfile" xml:"pidfile"`
	Logfile      string `db:"logfile" bson:"logfile" comment:"日志记录文件" json:"logfile" xml:"logfile"`
	Errfile      string `db:"errfile" bson:"errfile" comment:"错误记录文件" json:"errfile" xml:"errfile"`
	LogCharset   string `db:"log_charset" bson:"log_charset" comment:"日志字符集" json:"log_charset" xml:"log_charset"`
	Respawn      uint   `db:"respawn" bson:"respawn" comment:"重试次数(进程被外部程序结束后自动启动)" json:"respawn" xml:"respawn"`
	Delay        string `db:"delay" bson:"delay" comment:"延迟启动(例如1ms/1s/1m/1h)" json:"delay" xml:"delay"`
	Ping         string `db:"ping" bson:"ping" comment:"心跳时间(例如1ms/1s/1m/1h)" json:"ping" xml:"ping"`
	Pid          int    `db:"pid" bson:"pid" comment:"PID" json:"pid" xml:"pid"`
	Status       string `db:"status" bson:"status" comment:"进程运行状态" json:"status" xml:"status"`
	Debug        string `db:"debug" bson:"debug" comment:"DEBUG" json:"debug" xml:"debug"`
	Disabled     string `db:"disabled" bson:"disabled" comment:"是否禁用" json:"disabled" xml:"disabled"`
	Created      uint   `db:"created" bson:"created" comment:"创建时间" json:"created" xml:"created"`
	Updated      uint   `db:"updated" bson:"updated" comment:"修改时间" json:"updated" xml:"updated"`
	Error        string `db:"error" bson:"error" comment:"错误信息" json:"error" xml:"error"`
	Lastrun      uint   `db:"lastrun" bson:"lastrun" comment:"上次运行时间" json:"lastrun" xml:"lastrun"`
	Description  string `db:"description" bson:"description" comment:"说明" json:"description" xml:"description"`
	User         string `db:"user" bson:"user" comment:"用户名" json:"user" xml:"user"`
	Options      string `db:"options" bson:"options" comment:"其它选项值(JSON)" json:"options" xml:"options"`
	EnableNotify uint   `db:"enable_notify" bson:"enable_notify" comment:"是否启用通知" json:"enable_notify" xml:"enable_notify"`
	NotifyEmail  string `db:"notify_email" bson:"notify_email" comment:"通知人列表" json:"notify_email" xml:"notify_email"`
	// contains filtered or unexported fields
}

NgingForeverProcess 持久进程

func NewNgingForeverProcess

func NewNgingForeverProcess(ctx echo.Context) *NgingForeverProcess

func (*NgingForeverProcess) AsKV

func (a *NgingForeverProcess) AsKV(keyField string, valueField string, inputRows ...[]*NgingForeverProcess) param.Store

func (*NgingForeverProcess) AsMap

func (a *NgingForeverProcess) AsMap(onlyFields ...string) param.Store

func (*NgingForeverProcess) AsRow

func (a *NgingForeverProcess) AsRow(onlyFields ...string) param.Store

func (*NgingForeverProcess) Base_ added in v1.4.0

func (a *NgingForeverProcess) Base_() factory.Baser

func (*NgingForeverProcess) BatchValidate

func (a *NgingForeverProcess) BatchValidate(kvset map[string]interface{}) error

func (*NgingForeverProcess) CPAFrom

func (a *NgingForeverProcess) CPAFrom(source factory.Model) factory.Model

func (*NgingForeverProcess) ConnID added in v1.1.0

func (a *NgingForeverProcess) ConnID() int

func (*NgingForeverProcess) Context

func (a *NgingForeverProcess) Context() echo.Context

func (*NgingForeverProcess) Count

func (a *NgingForeverProcess) Count(mw func(db.Result) db.Result, args ...interface{}) (int64, error)

func (*NgingForeverProcess) Delete

func (a *NgingForeverProcess) Delete(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingForeverProcess) Deletex

func (a *NgingForeverProcess) Deletex(mw func(db.Result) db.Result, args ...interface{}) (affected int64, err error)

func (*NgingForeverProcess) EventOFF

func (a *NgingForeverProcess) EventOFF(off ...bool) factory.Model

func (*NgingForeverProcess) EventON

func (a *NgingForeverProcess) EventON(on ...bool) factory.Model

func (*NgingForeverProcess) Exists

func (a *NgingForeverProcess) Exists(mw func(db.Result) db.Result, args ...interface{}) (bool, error)

func (*NgingForeverProcess) FromRow

func (a *NgingForeverProcess) FromRow(row map[string]interface{})

func (*NgingForeverProcess) Get

func (a *NgingForeverProcess) Get(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingForeverProcess) GroupBy

func (a *NgingForeverProcess) GroupBy(keyField string, inputRows ...[]*NgingForeverProcess) map[string][]*NgingForeverProcess

func (*NgingForeverProcess) InitObjects

func (a *NgingForeverProcess) InitObjects() *[]*NgingForeverProcess

func (*NgingForeverProcess) Insert

func (a *NgingForeverProcess) Insert() (pk interface{}, err error)

func (*NgingForeverProcess) KeyBy

func (a *NgingForeverProcess) KeyBy(keyField string, inputRows ...[]*NgingForeverProcess) map[string]*NgingForeverProcess

func (*NgingForeverProcess) List

func (a *NgingForeverProcess) List(recv interface{}, mw func(db.Result) db.Result, page, size int, args ...interface{}) (func() int64, error)

func (*NgingForeverProcess) ListByOffset

func (a *NgingForeverProcess) ListByOffset(recv interface{}, mw func(db.Result) db.Result, offset, size int, args ...interface{}) (func() int64, error)

func (*NgingForeverProcess) ListPage

func (a *NgingForeverProcess) ListPage(cond *db.Compounds, sorts ...interface{}) error

func (*NgingForeverProcess) ListPageAs

func (a *NgingForeverProcess) ListPageAs(recv interface{}, cond *db.Compounds, sorts ...interface{}) error

func (*NgingForeverProcess) Name_

func (a *NgingForeverProcess) Name_() string

func (*NgingForeverProcess) Namer

func (a *NgingForeverProcess) Namer() func(factory.Model) string

func (*NgingForeverProcess) New

func (a *NgingForeverProcess) New(structName string, connID ...int) factory.Model

func (*NgingForeverProcess) NewObjects

func (a *NgingForeverProcess) NewObjects() factory.Ranger

func (*NgingForeverProcess) NewParam

func (a *NgingForeverProcess) NewParam() *factory.Param

func (*NgingForeverProcess) Objects

func (a *NgingForeverProcess) Objects() []*NgingForeverProcess

func (*NgingForeverProcess) Param

func (a *NgingForeverProcess) Param(mw func(db.Result) db.Result, args ...interface{}) *factory.Param

func (*NgingForeverProcess) Reset

func (*NgingForeverProcess) Set

func (a *NgingForeverProcess) Set(key interface{}, value ...interface{})

func (*NgingForeverProcess) SetConnID

func (a *NgingForeverProcess) SetConnID(connID int) factory.Model

func (*NgingForeverProcess) SetContext

func (a *NgingForeverProcess) SetContext(ctx echo.Context) factory.Model

func (*NgingForeverProcess) SetNamer

func (a *NgingForeverProcess) SetNamer(namer func(factory.Model) string) factory.Model

func (*NgingForeverProcess) SetParam

func (a *NgingForeverProcess) SetParam(param *factory.Param) factory.Model

func (*NgingForeverProcess) Short_

func (a *NgingForeverProcess) Short_() string

func (*NgingForeverProcess) Struct_

func (a *NgingForeverProcess) Struct_() string

func (*NgingForeverProcess) Trans

func (*NgingForeverProcess) Update

func (a *NgingForeverProcess) Update(mw func(db.Result) db.Result, args ...interface{}) (err error)

func (*NgingForeverProcess) UpdateByFields

func (a *NgingForeverProcess) UpdateByFields(mw func(db.Result) db.Result, fields []string, args ...interface{}) (err error)

func (*NgingForeverProcess) UpdateField

func (a *NgingForeverProcess) UpdateField(mw func(db.Result) db.Result, field string, value interface{}, args ...interface{}) (err error)

func (*NgingForeverProcess) UpdateFields

func (a *NgingForeverProcess) UpdateFields(mw func(db.Result) db.Result, kvset map[string]interface{}, args ...interface{}) (err error)

func (*NgingForeverProcess) UpdateValues

func (a *NgingForeverProcess) UpdateValues(mw func(db.Result) db.Result, keysValues *db.KeysValues, args ...interface{}) (err error)

func (*NgingForeverProcess) Updatex

func (a *NgingForeverProcess) Updatex(mw func(db.Result) db.Result, args ...interface{}) (affected int64, err error)

func (*NgingForeverProcess) UpdatexByFields

func (a *NgingForeverProcess) UpdatexByFields(mw func(db.Result) db.Result, fields []string, args ...interface{}) (affected int64, err error)

func (*NgingForeverProcess) UpdatexField added in v1.2.0

func (a *NgingForeverProcess) UpdatexField(mw func(db.Result) db.Result, field string, value interface{}, args ...interface{}) (affected int64, err error)

func (*NgingForeverProcess) UpdatexFields added in v1.2.0

func (a *NgingForeverProcess) UpdatexFields(mw func(db.Result) db.Result, kvset map[string]interface{}, args ...interface{}) (affected int64, err error)

func (*NgingForeverProcess) Upsert

func (a *NgingForeverProcess) Upsert(mw func(db.Result) db.Result, args ...interface{}) (pk interface{}, err error)

func (*NgingForeverProcess) Use

func (*NgingForeverProcess) Validate

func (a *NgingForeverProcess) Validate(field string, value interface{}) error

func (*NgingForeverProcess) XObjects

type Slice_NgingCommand

type Slice_NgingCommand []*NgingCommand

func (Slice_NgingCommand) AsKV

func (s Slice_NgingCommand) AsKV(keyField string, valueField string) param.Store

func (Slice_NgingCommand) FromList

func (s Slice_NgingCommand) FromList(data interface{}) Slice_NgingCommand

func (Slice_NgingCommand) GroupBy

func (s Slice_NgingCommand) GroupBy(keyField string) map[string][]*NgingCommand

func (Slice_NgingCommand) KeyBy

func (s Slice_NgingCommand) KeyBy(keyField string) map[string]*NgingCommand

func (Slice_NgingCommand) Range

func (s Slice_NgingCommand) Range(fn func(m factory.Model) error) error

func (Slice_NgingCommand) RangeRaw

func (s Slice_NgingCommand) RangeRaw(fn func(m *NgingCommand) error) error

func (Slice_NgingCommand) Transform

func (s Slice_NgingCommand) Transform(transfers map[string]param.Transfer) []param.Store

type Slice_NgingForeverProcess

type Slice_NgingForeverProcess []*NgingForeverProcess

func (Slice_NgingForeverProcess) AsKV

func (s Slice_NgingForeverProcess) AsKV(keyField string, valueField string) param.Store

func (Slice_NgingForeverProcess) FromList

func (s Slice_NgingForeverProcess) FromList(data interface{}) Slice_NgingForeverProcess

func (Slice_NgingForeverProcess) GroupBy

func (s Slice_NgingForeverProcess) GroupBy(keyField string) map[string][]*NgingForeverProcess

func (Slice_NgingForeverProcess) KeyBy

func (Slice_NgingForeverProcess) Range

func (s Slice_NgingForeverProcess) Range(fn func(m factory.Model) error) error

func (Slice_NgingForeverProcess) RangeRaw

func (s Slice_NgingForeverProcess) RangeRaw(fn func(m *NgingForeverProcess) error) error

func (Slice_NgingForeverProcess) Transform

func (s Slice_NgingForeverProcess) Transform(transfers map[string]param.Transfer) []param.Store

Jump to

Keyboard shortcuts

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