model

package
v0.0.0-...-fd64f6c Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigType = map[string]proto.ConfigType{
	"PIPELINE_CONFIG": proto.ConfigType_PIPELINE_CONFIG,
	"AGENT_CONFIG":    proto.ConfigType_AGENT_CONFIG,
}

Functions

This section is empty.

Types

type Agent

type Agent struct {
	AgentID        string          `json:"AgentID" gorm:"primaryKey;column:agent_id"`
	AgentType      string          `json:"AgentType"`
	Attributes     AgentAttributes `json:"Attributes"`
	Tags           []string        `json:"Tags" gorm:"-"`
	SerializedTags string          `json:"-" gorm:"column:tags;type:json"`
	RunningStatus  string          `json:"RunningStatus"`
	StartupTime    int64           `json:"StartupTime"`
	Interval       int32           `json:"Interval"`
}

func (*Agent) AfterFind

func (a *Agent) AfterFind(tx *gorm.DB) (err error)

func (*Agent) BeforeSave

func (a *Agent) BeforeSave(tx *gorm.DB) (err error)

func (*Agent) ParseProto

func (a *Agent) ParseProto(pa *proto.Agent)

func (Agent) TableName

func (Agent) TableName() string

func (*Agent) ToProto

func (a *Agent) ToProto() *proto.Agent

type AgentAttributes

type AgentAttributes struct {
	Version  string            `json:"Version"`
	Category string            `json:"Category"`
	IP       string            `json:"IP"`
	Hostname string            `json:"Hostname"`
	Region   string            `json:"Region"`
	Zone     string            `json:"Zone"`
	Extras   map[string]string `json:"Extras"`
}

func (*AgentAttributes) ParseProto

func (a *AgentAttributes) ParseProto(pa *proto.AgentAttributes)

func (*AgentAttributes) Scan

func (a *AgentAttributes) Scan(value interface{}) error

func (*AgentAttributes) ToProto

func (a *AgentAttributes) ToProto() *proto.AgentAttributes

func (AgentAttributes) Value

func (a AgentAttributes) Value() (driver.Value, error)

type AgentGroup

type AgentGroup struct {
	Name                     string           `json:"Name" gorm:"primaryKey"`
	Description              string           `json:"Description"`
	Tags                     []AgentGroupTag  `json:"Tags" gorm:"-"`
	SerializedTags           string           `json:"-" gorm:"column:tags;type:json"`
	AppliedConfigs           map[string]int64 `json:"AppliedConfigs" gorm:"-"`
	SerializedAppliedConfigs string           `json:"-" gorm:"column:applied_configs;type:json"`
}

func (*AgentGroup) AfterFind

func (a *AgentGroup) AfterFind(tx *gorm.DB) (err error)

func (*AgentGroup) BeforeSave

func (a *AgentGroup) BeforeSave(tx *gorm.DB) (err error)

func (*AgentGroup) ParseProto

func (a *AgentGroup) ParseProto(pa *proto.AgentGroup)

func (AgentGroup) TableName

func (AgentGroup) TableName() string

func (*AgentGroup) ToProto

func (a *AgentGroup) ToProto() *proto.AgentGroup

type AgentGroupTag

type AgentGroupTag struct {
	Name  string `json:"Name"`
	Value string `json:"Value"`
}

type Command

type Command struct {
	Type string            `json:"Type"`
	Name string            `json:"Name"`
	ID   string            `json:"ID"`
	Args map[string]string `json:"Args"`
}

func (*Command) ParseProto

func (c *Command) ParseProto(pc *proto.Command)

func (*Command) ToProto

func (c *Command) ToProto() *proto.Command

type ConfigDetail

type ConfigDetail struct {
	Type    string `json:"Type"`
	Name    string `json:"Name" gorm:"primaryKey"`
	Version int64  `json:"Version"`
	Context string `json:"Context"`
	Detail  string `json:"Detail"`
	DelTag  bool   `json:"DelTag"`
}

func (*ConfigDetail) ParseProto

func (c *ConfigDetail) ParseProto(pc *proto.ConfigDetail)

func (ConfigDetail) TableName

func (ConfigDetail) TableName() string

func (*ConfigDetail) ToProto

func (c *ConfigDetail) ToProto() *proto.ConfigDetail

Jump to

Keyboard shortcuts

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