models

package
v0.0.0-...-d23ef4a Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2018 License: MIT Imports: 8 Imported by: 51

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID         int64
	Username   string
	CreateDate time.Time
	Password   []byte
	Roles      Roles
	Enabled    bool
	UpdateDate time.Time
}

type Args

type Args []string

func (*Args) Scan

func (args *Args) Scan(value interface{}) error

func (Args) Value

func (args Args) Value() (driver.Value, error)

type AutoStart

type AutoStart struct {
	ID         int64
	Priority   int32
	StartDelay int32
	StopDelay  int32
	Parallel   bool
	Enable     bool
	CreateTime time.Time
	UpdateTime time.Time
	ProcessParam
}

type ByPriority

type ByPriority []AutoStart

func (ByPriority) Len

func (a ByPriority) Len() int

func (ByPriority) Less

func (a ByPriority) Less(i, j int) bool

func (ByPriority) Swap

func (a ByPriority) Swap(i, j int)

type Config

type Config struct {
	Key        string
	Value      interface{}
	CreateTime time.Time
	UpdateTime time.Time
	Expires    time.Duration
}

type Env

type Env map[string]string

type Level

type Level uint32
const (
	PanicLevel Level = iota
	FatalLevel
	ErrorLevel
	WarnLevel
	InfoLevel
	DebugLevel
)

func ParseLevel

func ParseLevel(lvl string) (Level, error)

func (*Level) Scan

func (level *Level) Scan(value interface{}) (err error)

func (Level) String

func (level Level) String() string

func (Level) Value

func (level Level) Value() (driver.Value, error)

type Log

type Log struct {
	ID         int64     `json:"id"`
	Message    string    `json:"message"`
	Name       string    `json:"name"`
	Level      Level     `json:"level"`
	CreateTime time.Time `json:"create_time"`
}

type Plugin

type Plugin struct {
	Name        string                `json:"name"`
	Desc        string                `json:"desc"`
	Maintainer  string                `json:"maintainer"`
	Homepage    string                `json:"homepage"`
	Version     utils.SemanticVersion `json:"version"`
	EnterPoint  string                `json:"enter_point"`
	Enable      bool                  `json:"enable"`
	InstallDir  string                `json:"install_dir"`
	WebsDir     string                `json:"webs_dir"`
	CoverFile   string                `json:"cover"`
	InstallTime time.Time             `json:"install_time"`
	UpdateTime  time.Time             `json:"update_time"`
}

type ProcessOption

type ProcessOption uint32
const (
	None                      = 0
	AutoRestart ProcessOption = 1 << iota
	HookLog
)

func ParseOption

func ParseOption(option string) (ret ProcessOption, err error)

func (ProcessOption) MarshalJSON

func (option ProcessOption) MarshalJSON() ([]byte, error)

func (*ProcessOption) Scan

func (option *ProcessOption) Scan(value interface{}) (err error)

func (ProcessOption) String

func (option ProcessOption) String() (ret string)

func (ProcessOption) Value

func (option ProcessOption) Value() (driver.Value, error)

type ProcessParam

type ProcessParam struct {
	Name    string        `json:"name"`
	Cmd     string        `json:"cmd"`
	Args    Args          `json:"args"`
	WorkDir string        `json:"work_dir"`
	Env     Env           `json:"env"`
	Option  ProcessOption `json:"option"`
}

type Roles

type Roles []string

func (*Roles) Scan

func (roles *Roles) Scan(value interface{}) error

func (Roles) Value

func (roles Roles) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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