model

package
v3.15.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentConfigResult

type AgentConfigResult struct {
	Key   string `gorm:"primary_key:true;column:key" json:"key" conform:"trim"`
	Value string `gorm:"column:value" json:"value" conform:"trim"`
}

func (AgentConfigResult) TableName

func (AgentConfigResult) TableName() string

type BossHost

type BossHost struct {
	Hostname string         `db:"hostname"`
	Ip       string         `db:"ip"`
	Activate sql.NullInt64  `db:"activate"`
	Platform sql.NullString `db:"platform"`
}

type HostgroupsResult

type HostgroupsResult struct {
	ID      int          `gorm:"primary_key:true;column:id" json:"id"`
	Name    string       `gorm:"column:grp_name" json:"name" conform:"trim"`
	Plugins []*PluginTag `json:"plugins"`

	IdsOfGroups   string `gorm:"column:gt_ids"`
	NamesOfGroups string `gorm:"column:gt_names"`
}

func (*HostgroupsResult) AfterLoad

func (hg *HostgroupsResult) AfterLoad()

func (*HostgroupsResult) MarshalJSON

func (hg *HostgroupsResult) MarshalJSON() ([]byte, error)

func (HostgroupsResult) TableName

func (HostgroupsResult) TableName() string

func (*HostgroupsResult) ToSimpleJson

func (hg *HostgroupsResult) ToSimpleJson() *json.Json

type HostsResult

type HostsResult struct {
	ID       int                  `gorm:"primary_key:true;column:id" json:"id"`
	Hostname string               `gorm:"column:hostname" json:"hostname" conform:"trim"`
	Groups   []*owlModel.GroupTag `json:"groups"`

	IdsOfGroups   string `gorm:"column:gt_ids"`
	NamesOfGroups string `gorm:"column:gt_names"`
}

func (*HostsResult) AfterLoad

func (host *HostsResult) AfterLoad()

func (*HostsResult) MarshalJSON

func (host *HostsResult) MarshalJSON() ([]byte, error)

func (HostsResult) TableName

func (HostsResult) TableName() string

func (*HostsResult) ToSimpleJson

func (host *HostsResult) ToSimpleJson() *json.Json

type LockStatus

type LockStatus byte
const (
	FREE LockStatus = iota
	LOCKED
)

func (*LockStatus) Scan

func (s *LockStatus) Scan(src interface{}) error

func (LockStatus) Value

func (s LockStatus) Value() (driver.Value, error)

type OwlSchedule

type OwlSchedule struct {
	Id             int32      `db:"sch_id"`
	Name           string     `db:"sch_name"`
	Lock           LockStatus `db:"sch_lock"`
	LastUpdateTime time.Time  `db:"sch_modify_time"`
}

func (*OwlSchedule) IsLocked

func (sch *OwlSchedule) IsLocked() bool

type OwlScheduleLog

type OwlScheduleLog struct {
	Uuid      cdb.DbUuid `db:"sl_uuid"`
	SchId     int32      `db:"sl_sch_id"`
	StartTime time.Time  `db:"sl_start_time"`
	EndTime   cdb.DbTime `db:"sl_end_time"`
	Timeout   int32      `db:"sl_timeout"`
	Status    TaskStatus `db:"sl_status"`
	Message   *string    `db:"sl_message"`
}

func (*OwlScheduleLog) GetUuidString

func (log *OwlScheduleLog) GetUuidString() string

func (*OwlScheduleLog) IsTimeout

func (log *OwlScheduleLog) IsTimeout(checkedTime time.Time) bool

type PingListLog

type PingListLog struct {
	NumberOfTargets int32     `db:"apll_number_of_targets"`
	AccessTime      time.Time `db:"apll_time_access"`
	RefreshTime     time.Time `db:"apll_time_refresh"`
}

type PluginTag

type PluginTag struct {
	ID  int32  `json:"id"`
	Dir string `json:"dir"`
}

func (*PluginTag) ToJson

func (pluginTag *PluginTag) ToJson() *json.Json

type PluginTags

type PluginTags []*PluginTag

func (PluginTags) ToJson

func (pluginTags PluginTags) ToJson() []*json.Json

type Schedule

type Schedule struct {
	Name    string
	Timeout int32
}

func NewSchedule

func NewSchedule(name string, timeout int) *Schedule

func (*Schedule) String

func (s *Schedule) String() string

type SyncForAdding

type SyncForAdding struct {
	Hosts      []*SyncHost
	Hostgroups []*SyncHostGroup
	Relations  map[string][]string
}

func (*SyncForAdding) Bind

func (p *SyncForAdding) Bind(c *gin.Context)

type SyncHost

type SyncHost struct {
	Activate int
	Name     string
	IP       string
}

type SyncHostGroup

type SyncHostGroup struct {
	Creator string
	Name    string
}

type TaskStatus

type TaskStatus owl.TaskStatus

func (*TaskStatus) Scan

func (s *TaskStatus) Scan(src interface{}) error

func (TaskStatus) ToJobStatus

func (s TaskStatus) ToJobStatus() owl.TaskStatus

func (TaskStatus) Value

func (s TaskStatus) Value() (driver.Value, error)

type UnableToLockSchedule

type UnableToLockSchedule struct {
	Uuid          uuid.UUID
	AcquiredTime  time.Time
	LastStartTime time.Time
	Timeout       int32
}

func (*UnableToLockSchedule) Error

func (t *UnableToLockSchedule) Error() string

Jump to

Keyboard shortcuts

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