model

package
v3.13.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2017 License: Apache-2.0 Imports: 3 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 HealthView

type HealthView struct {
	Rdb  *Rdb  `json:"rdb"`
	Http *Http `json:"http"`
	Nqm  *Nqm  `json:"nqm"`
}

HealthView is the model for responsed JSON data in “/health` example:

{
   "rdb":{
      "dsn":"DSN....",
      "open_connections":10,
      "ping_result":0,
      "ping_message":""
   },
   "http":{
      "listening":":6040"
   },
   "nqm":{
      "heartbeat":{
         "count":21387
      }
   }
}

type Heartbeat

type Heartbeat struct {
	Count uint64 `json:"count"`
}

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 Http

type Http struct {
	Listening string `json:"listening"`
}

type Nqm

type Nqm struct {
	Heartbeat *Heartbeat `json:"heartbeat"`
}

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 Rdb

type Rdb struct {
	Dsn             string `json:"dsn"`
	OpenConnections int    `json:"open_connections"`
	PingResult      int    `json:"ping_result"`
	PingMessage     string `json:"ping_message"`
}

Jump to

Keyboard shortcuts

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