Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Assessment ¶
type Assessment struct {
ID uuid.UUID `gorm:"primaryKey;column:id;type:VARCHAR(255);"`
CreatedAt time.Time `gorm:"not null;default:now()"`
UpdatedAt *time.Time
Name string `gorm:"not null;uniqueIndex:org_id_name"`
OrgID string `gorm:"not null;uniqueIndex:org_id_name;index:assessments_org_id_idx"`
Username string `gorm:"type:VARCHAR(255)"`
OwnerFirstName *string `gorm:"type:VARCHAR(100)"`
OwnerLastName *string `gorm:"type:VARCHAR(100)"`
SourceType string `gorm:"not null;type:VARCHAR(100)"`
SourceID *uuid.UUID `gorm:"type:TEXT"`
Snapshots []Snapshot `gorm:"foreignKey:AssessmentID;references:ID;constraint:OnDelete:CASCADE;"`
}
func (Assessment) String ¶
func (a Assessment) String() string
type AssessmentList ¶
type AssessmentList []Assessment
type ImageInfra ¶
type InventoryStats ¶
type InventoryStats struct {
Vms VmStats
Os OsStats
TotalCustomers int
TotalAssessments int
TotalInventories int
Storage []StorageCustomerStats
}
func NewInventoryStats ¶
func NewInventoryStats(assessments []Assessment) InventoryStats
type JSONField ¶
type JSONField[T any] struct { Data T }
JSONField wraps an arbitrary struct so that it can be included in a GORM model, for use in a JSON/JSONB field
func MakeJSONField ¶
Return a copy of 'data', wrapped in a JSONField object
func (JSONField[T]) MarshalJSON ¶
func (*JSONField[T]) UnmarshalJSON ¶
type OsStats ¶
type OsStats struct {
// TotalTypes is total of os types. (e.g. how many different os we found)
Total int
}
type Snapshot ¶
type Source ¶
type Source struct {
gorm.Model
ID uuid.UUID `gorm:"primaryKey;"`
Name string `gorm:"uniqueIndex:name_org_id;not null"`
VCenterID string
Username string
OrgID string `gorm:"uniqueIndex:name_org_id;not null"`
Inventory *JSONField[api.Inventory] `gorm:"type:jsonb"`
OnPremises bool
Agents []Agent `gorm:"constraint:OnDelete:CASCADE;"`
ImageInfra ImageInfra `gorm:"constraint:OnDelete:CASCADE;"`
Labels []Label `gorm:"foreignKey:SourceID;references:ID;constraint:OnDelete:CASCADE;"`
EmailDomain *string
}
type SourceList ¶
type SourceList []Source
type StorageCustomerStats ¶
Click to show internal directories.
Click to hide internal directories.