Documentation ¶
Index ¶
- func DeploymentManagerToModel(record *DeploymentManager) generated.DeploymentManager
- func ResourcePoolToModel(record *ResourcePool) generated.ResourcePool
- func ResourceToModel(record *Resource, elements []Resource) generated.Resource
- func ResourceTypeToModel(record *ResourceType) generated.ResourceType
- func SubscriptionToModel(record *Subscription) generated.Subscription
- type DataChangeEvent
- type DataSource
- type DeploymentManager
- type Resource
- type ResourceClass
- type ResourceKind
- type ResourcePool
- type ResourceType
- type Subscription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeploymentManagerToModel ¶
func DeploymentManagerToModel(record *DeploymentManager) generated.DeploymentManager
DeploymentManagerToModel converts a DB tuple to an API Model
func ResourcePoolToModel ¶
func ResourcePoolToModel(record *ResourcePool) 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 SubscriptionToModel ¶
func SubscriptionToModel(record *Subscription) generated.Subscription
SubscriptionToModel converts a DB tuple to an API Model
Types ¶
type DataChangeEvent ¶
type DataChangeEvent struct { DataChangeID *uuid.UUID `db:"data_change_id"` ObjectType string `db:"object_type"` ObjectID uuid.UUID `db:"object_id"` ParentID *uuid.UUID `db:"parent_id"` BeforeState *string `db:"before_state"` AfterState *string `db:"after_state"` CreatedAt *time.Time `db:"created_at"` }
DataChangeEvent represents a record in the data_change_event table.
func (DataChangeEvent) OnConflict ¶
func (r DataChangeEvent) OnConflict() string
OnConflict returns the column or constraint to be used in the UPSERT operation
func (DataChangeEvent) PrimaryKey ¶
func (r DataChangeEvent) PrimaryKey() string
PrimaryKey returns the primary key column associated to this model
func (DataChangeEvent) TableName ¶
func (r DataChangeEvent) TableName() string
TableName returns the table name associated to this model
type DataSource ¶
type DataSource struct { DataSourceID *uuid.UUID `db:"data_source_id"` Name string `db:"name"` GenerationID int `db:"generation_id"` LastSnapshot *time.Time `db:"last_snapshot"` CreatedAt *time.Time `db:"created_at"` }
DataSource represents a record in the data_source table.
func (DataSource) OnConflict ¶
func (r DataSource) OnConflict() string
OnConflict returns the column or constraint to be used in the UPSERT operation
func (DataSource) PrimaryKey ¶
func (r DataSource) PrimaryKey() string
PrimaryKey returns the primary key column associated to this model
func (DataSource) TableName ¶
func (r DataSource) TableName() string
TableName returns the table name associated to this model
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]string `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
type ResourceKind ¶
type ResourceKind string
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]string `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]string `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
type Subscription ¶
type Subscription struct { SubscriptionID *uuid.UUID `db:"subscription_id"` ConsumerSubscriptionID *uuid.UUID `db:"consumer_subscription_id"` Filter *string `db:"filter"` Callback string `db:"callback"` EventCursor int `db:"event_cursor"` CreatedAt *time.Time `db:"created_at"` }
Subscription represents a record in the subscription table.
func SubscriptionFromModel ¶
func SubscriptionFromModel(object *generated.Subscription) *Subscription
SubscriptionFromModel converts an API model to a DB tuple
func (Subscription) OnConflict ¶
func (r Subscription) OnConflict() string
OnConflict returns the column or constraint to be used in the UPSERT operation
func (Subscription) PrimaryKey ¶
func (r Subscription) PrimaryKey() string
PrimaryKey returns the primary key column associated to this model
func (Subscription) TableName ¶
func (r Subscription) TableName() string
TableName returns the table name associated to this model