Documentation
¶
Index ¶
- func DataChangeEventToModel(record *models2.DataChangeEvent) generated.InventoryChangeNotification
- func DataChangeEventToNotification(record *models2.DataChangeEvent) *notifier.Notification
- func DeploymentManagerToModel(record *DeploymentManager, options *commonapi.FieldOptions) generated.DeploymentManager
- func ResourcePoolToModel(record *ResourcePool, options *commonapi.FieldOptions) generated.ResourcePool
- func ResourceToModel(record *Resource, elements []Resource) generated.Resource
- func ResourceTypeToModel(record *ResourceType) generated.ResourceType
- func SubscriptionFromModel(object *generated.Subscription) *models2.Subscription
- func SubscriptionToInfo(record *models2.Subscription) *notifier.SubscriptionInfo
- func SubscriptionToModel(record *models2.Subscription) generated.Subscription
- type DeploymentManager
- type Resource
- type ResourceClass
- type ResourceKind
- type ResourcePool
- type ResourceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataChangeEventToModel ¶
func DataChangeEventToModel(record *models2.DataChangeEvent) generated.InventoryChangeNotification
DataChangeEventToModel converts a DB tuple to an API model
func DataChangeEventToNotification ¶
func DataChangeEventToNotification(record *models2.DataChangeEvent) *notifier.Notification
DataChangeEventToNotification converts a DataChangeEvent to a generic Notification
func DeploymentManagerToModel ¶
func DeploymentManagerToModel(record *DeploymentManager, options *commonapi.FieldOptions) generated.DeploymentManager
DeploymentManagerToModel converts a DB tuple to an API Model
func ResourcePoolToModel ¶
func ResourcePoolToModel(record *ResourcePool, options *commonapi.FieldOptions) generated.ResourcePool
ResourcePoolToModel converts a DB tuple to an API model
func ResourceToModel ¶
ResourceToModel converts a DB tuple to an API model
func ResourceTypeToModel ¶
func ResourceTypeToModel(record *ResourceType) generated.ResourceType
ResourceTypeToModel converts a DB tuple to an API Model
func SubscriptionFromModel ¶
func SubscriptionFromModel(object *generated.Subscription) *models2.Subscription
SubscriptionFromModel converts an API model to a DB tuple
func SubscriptionToInfo ¶
func SubscriptionToInfo(record *models2.Subscription) *notifier.SubscriptionInfo
SubscriptionToInfo converts a Subscription to a generic SubscriptionInfo
func SubscriptionToModel ¶
func SubscriptionToModel(record *models2.Subscription) generated.Subscription
SubscriptionToModel converts a DB tuple to an API Model
Types ¶
type DeploymentManager ¶
type DeploymentManager struct { DeploymentManagerID uuid.UUID `db:"deployment_manager_id"` // Non-nil because we always set this from named values Name string `db:"name"` Description string `db:"description"` OCloudID uuid.UUID `db:"o_cloud_id"` URL string `db:"url"` Locations []string `db:"locations"` Capabilities map[string]string `db:"capabilities"` CapacityInfo map[string]string `db:"capacity_info"` Extensions map[string]interface{} `db:"extensions"` DataSourceID uuid.UUID `db:"data_source_id"` GenerationID int `db:"generation_id"` ExternalID string `db:"external_id"` CreatedAt time.Time `db:"created_at"` }
DeploymentManager represents a record in the deployment_manager table.
func (DeploymentManager) OnConflict ¶
func (r DeploymentManager) OnConflict() string
OnConflict returns the column or constraint to be used in the UPSERT operation
func (DeploymentManager) PrimaryKey ¶
func (r DeploymentManager) PrimaryKey() string
PrimaryKey returns the primary key column associated to this model
func (DeploymentManager) TableName ¶
func (r DeploymentManager) TableName() string
TableName returns the table name associated to this model
type Resource ¶
type Resource struct { ResourceID uuid.UUID `db:"resource_id"` // Non-nil because we always set this from named values Description string `db:"description"` ResourceTypeID uuid.UUID `db:"resource_type_id"` GlobalAssetID *string `db:"global_asset_id"` ResourcePoolID uuid.UUID `db:"resource_pool_id"` Extensions map[string]interface{} `db:"extensions"` Groups *[]string `db:"groups"` Tags *[]string `db:"tags"` DataSourceID uuid.UUID `db:"data_source_id"` GenerationID int `db:"generation_id"` ExternalID string `db:"external_id"` CreatedAt *time.Time `db:"created_at"` }
Resource represents a record in the resource table.
func (Resource) OnConflict ¶
OnConflict returns the column or constraint to be used in the UPSERT operation
func (Resource) PrimaryKey ¶
PrimaryKey returns the primary key column associated to this model
type ResourceClass ¶
type ResourceClass string
const ( ResourceClassCompute ResourceClass = "COMPUTE" ResourceClassNetworking ResourceClass = "NETWORKING" ResourceClassStorage ResourceClass = "STORAGE" ResourceClassUndefined ResourceClass = "UNDEFINED" )
type ResourceKind ¶
type ResourceKind string
const ( ResourceKindPhysical ResourceKind = "PHYSICAL" ResourceKindLogical ResourceKind = "LOGICAL" ResourcekindUndefined ResourceKind = "UNDEFINED" )
type ResourcePool ¶
type ResourcePool struct { ResourcePoolID uuid.UUID `db:"resource_pool_id"` // Non-nil because we always set this from named values GlobalLocationID uuid.UUID `db:"global_location_id"` Name string `db:"name"` Description string `db:"description"` OCloudID uuid.UUID `db:"o_cloud_id"` Location *string `db:"location"` Extensions map[string]interface{} `db:"extensions"` DataSourceID uuid.UUID `db:"data_source_id"` GenerationID int `db:"generation_id"` ExternalID string `db:"external_id"` CreatedAt *time.Time `db:"created_at"` }
ResourcePool represents a record in the resource_pool table.
func (ResourcePool) OnConflict ¶
func (r ResourcePool) OnConflict() string
OnConflict returns the column or constraint to be used in the UPSERT operation
func (ResourcePool) PrimaryKey ¶
func (r ResourcePool) PrimaryKey() string
PrimaryKey returns the primary key column associated to this model
func (ResourcePool) TableName ¶
func (r ResourcePool) TableName() string
TableName returns the table name associated to this model
type ResourceType ¶
type ResourceType struct { ResourceTypeID uuid.UUID `db:"resource_type_id"` // Non-nil because we always set this from named values Name string `db:"name"` Description string `db:"description"` Vendor string `db:"vendor"` Model string `db:"model"` Version string `db:"version"` ResourceKind ResourceKind `db:"resource_kind"` ResourceClass ResourceClass `db:"resource_class"` Extensions map[string]interface{} `db:"extensions"` DataSourceID uuid.UUID `db:"data_source_id"` GenerationID int `db:"generation_id"` CreatedAt *time.Time `db:"created_at"` }
ResourceType represents a record in the resource_type table.
func (ResourceType) OnConflict ¶
func (r ResourceType) OnConflict() string
OnConflict returns the column or constraint to be used in the UPSERT operation
func (ResourceType) PrimaryKey ¶
func (r ResourceType) PrimaryKey() string
PrimaryKey returns the primary key column associated to this model
func (ResourceType) TableName ¶
func (r ResourceType) TableName() string
TableName returns the table name associated to this model