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 ID string `json:"id" gorm:"primaryKey"` Status string StatusInfo string CredUrl string SourceID *string Source *Source Version string Associated bool }
func NewAgentFromApiResource ¶
func NewAgentFromApiResource(resource *apiAgent.AgentStatusUpdate) *Agent
func NewAgentFromID ¶
func (*Agent) ToApiResource ¶
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 Source ¶
type Source struct { ID openapi_types.UUID `json:"id" gorm:"primaryKey"` CreatedAt time.Time UpdatedAt time.Time DeletedAt gorm.DeletedAt `gorm:"index"` Inventory *JSONField[api.Inventory] `gorm:"type:jsonb"` Agents []Agent `gorm:"constraint:OnDelete:SET NULL;"` }
func NewSourceFromId ¶
func (*Source) ToApiResource ¶
type SourceList ¶
type SourceList []Source
func (SourceList) ToApiResource ¶
func (sl SourceList) ToApiResource() api.SourceList
Click to show internal directories.
Click to hide internal directories.