Documentation
¶
Index ¶
- Constants
- type Agent
- type AgentList
- type Assessment
- type AssessmentList
- type CustomerAssessments
- type ImageInfra
- type InventoryStats
- type JSONField
- type Key
- type KeySerializer
- type Label
- type OsStats
- type RVToolsJobMetadata
- type Snapshot
- type Source
- type SourceList
- type StorageCustomerStats
- type VmStats
Constants ¶
View Source
const ( SnapshotVersionV1 = 1 + iota SnapshotVersionV2 )
View Source
const ( SourceTypeAgent string = "agent" SourceTypeRvtools string = "rvtools" )
View Source
const ( JobStatusPending = "pending" JobStatusParsing = "parsing" JobStatusValidating = "validating" JobStatusCompleted = "completed" JobStatusFailed = "failed" JobStatusCancelled = "cancelled" )
Job status constants
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 CustomerAssessments ¶ added in v0.2.2
type ImageInfra ¶
type InventoryStats ¶
type InventoryStats struct {
Vms VmStats
Os OsStats
TotalCustomers int
TotalAssessmentsByCustomerBySource map[string]CustomerAssessments
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 RVToolsJobMetadata ¶ added in v0.3.0
type RVToolsJobMetadata struct {
Status string `json:"status,omitempty"` // parsing, validating
Error string `json:"error,omitempty"` // error message if failed
AssessmentID *uuid.UUID `json:"assessment_id,omitempty"` // set when completed
}
RVToolsJobMetadata is stored in river_job.metadata to track progress and results.
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 []byte `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.