entities

package
v0.0.0-...-7eda018 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureCloudData

type AzureCloudData struct {
	VMName          string `json:"vmname"`
	ResourceGroup   string `json:"resource_group"`
	Location        string `json:"location"`
	VMSize          string `json:"vmsize"`
	DataDisksNumber int    `json:"data_disks_number"`
	Offer           string `json:"offer"`
	SKU             string `json:"sku"`
	AdminUsername   string `json:"admin_username"`
}

type Check

type Check struct {
	ID        string `gorm:"primaryKey"`
	CreatedAt time.Time
	Payload   datatypes.JSON
}

func (*Check) ToModel

func (c *Check) ToModel() (*models.Check, error)

type CheckList

type CheckList []*Check

func (CheckList) ToModel

func (c CheckList) ToModel() (models.ChecksCatalog, error)

type ChecksResult

type ChecksResult struct {
	ID        int64
	CreatedAt time.Time
	GroupID   string
	Payload   datatypes.JSON
}

func (*ChecksResult) ToModel

func (c *ChecksResult) ToModel() (*models.ChecksResult, error)

type Cluster

type Cluster struct {
	ID              string `gorm:"primaryKey"`
	Name            string
	ClusterType     string
	SID             string `gorm:"column:sid"`
	ResourcesNumber int
	HostsNumber     int
	Health          *HealthState  `gorm:"foreignkey:id"`
	Tags            []*models.Tag `gorm:"polymorphic:Resource;polymorphicValue:clusters"`
	UpdatedAt       time.Time
	Hosts           []*Host        `gorm:"foreignkey:cluster_id"`
	Details         datatypes.JSON `json:"payload" binding:"required"`
}

func (*Cluster) ToModel

func (c *Cluster) ToModel() *models.Cluster

type ClusterResource

type ClusterResource struct {
	ID        string `json:"id"`
	Type      string `json:"type"`
	Role      string `json:"role"`
	Status    string `json:"status"`
	FailCount int    `json:"fail_count"`
}

func (*ClusterResource) ToModel

func (r *ClusterResource) ToModel() *models.ClusterResource

type HANAClusterDetails

type HANAClusterDetails struct {
	SystemReplicationMode          string             `json:"system_replication_mode"`
	SystemReplicationOperationMode string             `json:"system_replication_operation_mode"`
	SecondarySyncState             string             `json:"secondary_sync_state"`
	SRHealthState                  string             `json:"sr_health_state"`
	CIBLastWritten                 time.Time          `json:"cib_last_written"`
	FencingType                    string             `json:"fencing_type"`
	StoppedResources               []*ClusterResource `json:"stopped_resources"`
	Nodes                          []*HANAClusterNode `json:"nodes"`
	SBDDevices                     []*SBDDevice       `json:"sbd_devices"`
}

func (*HANAClusterDetails) ToModel

type HANAClusterNode

type HANAClusterNode struct {
	Name       string             `json:"name"`
	Site       string             `json:"site"`
	Attributes map[string]string  `json:"attributes"`
	Resources  []*ClusterResource `json:"resources"`
	VirtualIPs []string           `json:"virtual_ips"`
	HANAStatus string             `json:"hana_status"`
}

func (*HANAClusterNode) ToModel

func (n *HANAClusterNode) ToModel() *models.HANAClusterNode

type HealthState

type HealthState struct {
	ID             string `gorm:"primaryKey"`
	Health         string
	PartialHealths datatypes.JSON
}

type Host

type Host struct {
	AgentID            string `gorm:"primaryKey"`
	SSHAddress         string
	Name               string
	IPAddresses        pq.StringArray `gorm:"type:text[]"`
	CloudProvider      string
	ClusterID          string
	ClusterName        string
	ClusterType        string
	SAPSystemInstances SAPSystemInstances `gorm:"foreignkey:AgentID"`
	AgentVersion       string
	Heartbeat          *HostHeartbeat    `gorm:"foreignKey:AgentID"`
	Subscription       *SlesSubscription `gorm:"foreignKey:AgentID"`
	Tags               []*models.Tag     `gorm:"polymorphic:Resource;polymorphicValue:hosts"`
	UpdatedAt          time.Time
	CloudData          datatypes.JSON
}

func (*Host) ToModel

func (h *Host) ToModel() *models.Host

type HostHeartbeat

type HostHeartbeat struct {
	AgentID   string `gorm:"primaryKey"`
	UpdatedAt time.Time
}

type HostTelemetry

type HostTelemetry struct {
	AgentID       string    `gorm:"column:agent_id; primaryKey"`
	HostName      string    `gorm:"column:host_name"`
	SLESVersion   string    `gorm:"column:sles_version"`
	CPUCount      int       `gorm:"column:cpu_count"`
	SocketCount   int       `gorm:"column:socket_count"`
	TotalMemoryMB int       `gorm:"column:total_memory_mb"`
	CloudProvider string    `gorm:"column:cloud_provider"`
	UpdatedAt     time.Time `gorm:"column:updated_at"`
}

func (HostTelemetry) TableName

func (HostTelemetry) TableName() string

type SAPSystemInstance

type SAPSystemInstance struct {
	ID                      string `gorm:"primaryKey"`
	AgentID                 string `gorm:"primaryKey"`
	Type                    string
	SID                     string `gorm:"column:sid"`
	InstanceNumber          string `gorm:"primaryKey"`
	Features                string
	Description             string
	StartPriority           string
	Status                  string
	SAPHostname             string
	HttpPort                int
	HttpsPort               int
	SystemReplication       string
	SystemReplicationStatus string
	DBHost                  string
	DBName                  string
	DBAddress               string
	Tenants                 pq.StringArray `gorm:"type:text[]"`
	Host                    *Host          `gorm:"foreignKey:AgentID"`
	UpdatedAt               time.Time
	Tags                    []*models.Tag `gorm:"foreignKey:ResourceID"`
}

type SAPSystemInstances

type SAPSystemInstances []*SAPSystemInstance

func (SAPSystemInstances) ToModel

func (s SAPSystemInstances) ToModel() []*models.SAPSystem

type SBDDevice

type SBDDevice struct {
	Device string `json:"device"`
	Status string `json:"status"`
}

func (*SBDDevice) ToModel

func (s *SBDDevice) ToModel() *models.SBDDevice

type Settings

type Settings struct {
	InstallationID string `gorm:"primaryKey"`
	EulaAccepted   bool
}

type SlesSubscription

type SlesSubscription struct {
	AgentID            string `gorm:"primaryKey"`
	ID                 string `gorm:"primaryKey"`
	Version            string
	Type               string
	Arch               string
	Status             string
	StartsAt           string
	ExpiresAt          string
	SubscriptionStatus string
}

func (*SlesSubscription) ToModel

Jump to

Keyboard shortcuts

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