models

package
v0.0.0-...-f219ead Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	gorm.Model
	Ip             string
	Hostname       string `gorm:"uniqueIndex:idx_hostname_deleted;not null"`
	Os             string
	Platform       string
	Version        string
	AgentKey       string               `gorm:"type:string;index"`
	Commands       []AgentCommand       `gorm:"foreignKey:AgentID"`
	AgentConfigs   []AgentConfiguration `gorm:"foreignKey:AgentID"`
	AgentModules   []AgentConfiguration `gorm:"foreignKey:AgentID"`
	DeletedAt      *time.Time           `gorm:"uniqueIndex:idx_hostname_deleted;index:idx_agent_delete"`
	RegisterBy     string               `gorm:"not null"`
	DeletedBy      string               `gorm:""`
	AgentTypeID    *uint
	AgentType      *AgentType `gorm:"foreignKey:AgentTypeID"`
	AgentGroupID   *uint
	AgentGroup     *AgentGroup `gorm:"foreignKey:AgentGroupID"`
	Mac            string
	OsMajorVersion string
	OsMinorVersion string
	Aliases        string
	Addresses      string
}

type AgentCommand

type AgentCommand struct {
	gorm.Model
	AgentID       uint
	Command       string
	CommandStatus AgentCommandStatus
	Result        string
	Agent         Agent  `gorm:"foreignKey:AgentID"`
	ExecutedBy    string `gorm:"not null"`
	CmdId         string `gorm:"not null"`
	OriginType    string `gorm:"not null"`
	OriginId      string `gorm:"not null"`
	Reason        string `gorm:"not null"`
}

type AgentCommandStatus

type AgentCommandStatus int32
const (
	Queue    AgentCommandStatus = 1
	Pending  AgentCommandStatus = 2
	Executed AgentCommandStatus = 3
	Error    AgentCommandStatus = 4
)

type AgentConfiguration

type AgentConfiguration struct {
	gorm.Model
	AgentID         uint
	ConfKey         string
	ConfValue       string
	ConfName        string
	ConfDescription string
	ConfDatatype    string
	ConfRequired    bool
	ConfRegex       string
}

type AgentGroup

type AgentGroup struct {
	gorm.Model
	Id               uint
	GroupName        string `gorm:"uniqueIndex:idx_group_deleted;not null"`
	GroupDescription string
	DeletedAt        *time.Time `gorm:"uniqueIndex:idx_group_deleted"`
}

type AgentMalwareDetection

type AgentMalwareDetection struct {
	gorm.Model
	AgentID     uint
	FilePath    string
	Sha256      string
	Md5         string
	Description string
	Status      MalwareStatus
}

type AgentMalwareExclusion

type AgentMalwareExclusion struct {
	gorm.Model
	AgentID            uint
	ExcludeFilePath    string
	ExcludedBy         string
	ExcludeDescription string
}

type AgentMalwareHistory

type AgentMalwareHistory struct {
	gorm.Model
	MalwareId  uint
	PrevStatus MalwareStatus
	ToStatus   MalwareStatus
	ChangedBy  string
}

type AgentModule

type AgentModule struct {
	gorm.Model
	AgentID       uint
	ShortName     string
	LargeName     string
	Description   string
	Enabled       bool
	AllowDisabled bool
	ModuleConfigs []AgentModuleConfiguration `gorm:"foreignKey:AgentModuleID"`
}

type AgentModuleConfiguration

type AgentModuleConfiguration struct {
	AgentModuleID   uint
	ShortName       string
	ConfKey         string
	ConfValue       string
	ConfName        string
	ConfDescription string
	ConfDatatype    string
	ConfRequired    bool
	ConfRegex       string
}

type AgentType

type AgentType struct {
	gorm.Model
	TypeName string
}

type Collector

type Collector struct {
	gorm.Model
	CollectorKey string                 `json:"collectorKey" gorm:"uniqueIndex;type:varchar(255)"`
	Ip           string                 `json:"ip" gorm:"type:varchar(100)"`
	Hostname     string                 `json:"hostname" gorm:"type:varchar(255)"`
	Version      string                 `json:"version" gorm:"type:varchar(100)"`
	Module       CollectorModule        `json:"module" gorm:"type:varchar(100)"`
	Groups       []CollectorConfigGroup `json:"configuration" gorm:"foreignKey:CollectorID"`
	DeletedBy    string                 `json:"deletedBy" gorm:"type:varchar(255)"`
}

type CollectorConfigGroup

type CollectorConfigGroup struct {
	ID               uint                           `gorm:"primaryKey"`
	GroupName        string                         `json:"groupName" gorm:"type:varchar(255)"`
	GroupDescription string                         `json:"groupDescription" gorm:"type:text"`
	Configurations   []CollectorGroupConfigurations `json:"collectorGroupConfigs" gorm:"foreignKey:ConfigGroupID"`
	CollectorID      uint                           `json:"collectorId"`
}

type CollectorGroupConfigurations

type CollectorGroupConfigurations struct {
	ConfigGroupID   uint   `gorm:"primaryKey"`
	ConfKey         string `json:"confKey" gorm:"primaryKey;type:varchar(255)"`
	ConfValue       string `json:"confValue" gorm:"type:text"`
	ConfName        string `json:"confName" gorm:"type:varchar(255)"`
	ConfDescription string `json:"confDescription" gorm:"type:text"`
	ConfDataType    string `json:"confDataType" gorm:"type:varchar(100)"`
	ConfRequired    bool   `json:"confRequired" gorm:"type:boolean"`
}

type CollectorModule

type CollectorModule string
const (
	AS_400 CollectorModule = "AS_400"
)

type LastSeen

type LastSeen struct {
	Key      string    `gorm:"primaryKey"`
	LastPing time.Time `gorm:"index"`
}

type LogCollectorClass

type LogCollectorClass string
const (
	CollectorClass LogCollectorClass = "collector"
	AgentClass     LogCollectorClass = "agent"
)

type MalwareStatus

type MalwareStatus string
const (
	New      MalwareStatus = "NEW"
	Deleted  MalwareStatus = "DELETED"
	Excluded MalwareStatus = "EXCLUDED"
	Restored MalwareStatus = "RESTORED"
)

type Status

type Status int32
const (
	Online  Status = 0
	Offline Status = 1
	Unknown Status = 2
)

Jump to

Keyboard shortcuts

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