tables

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(simpleDB simplesql.Database) error

Types

type ClusterRow

type ClusterRow struct {
	ID        string `db:"id" orm:"op=create key=primary_key filter=In"`
	Version   uint64 `db:"version" orm:"op=create,update"`
	Name      string `db:"name" orm:"op=create composite_unique_key:name,deleted_at filter=In"`
	DeletedAt int64  `db:"deleted_at"`
	State     string `db:"state" orm:"op=create,update filter=In,NotIn"`
	Message   string `db:"message" orm:"op=create,update"`
}

type ClusterTable

type ClusterTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewClusterTable

func NewClusterTable(db simplesql.Database) *ClusterTable

func (*ClusterTable) Delete

func (s *ClusterTable) Delete(ctx context.Context, execer sqlx.ExecerContext, id string, version uint64) error

func (*ClusterTable) Get

func (*ClusterTable) Insert

func (s *ClusterTable) Insert(ctx context.Context, execer sqlx.ExecerContext, row ClusterRow) error

func (*ClusterTable) List

func (*ClusterTable) Update

func (s *ClusterTable) Update(
	ctx context.Context, execer sqlx.ExecerContext, id string, version uint64, updateFields ClusterTableUpdateFields,
) error

type ClusterTableKeys

type ClusterTableKeys struct {
	ID   *string `db:"id"`
	Name *string `db:"name"`
}

type ClusterTableSelectFilters

type ClusterTableSelectFilters struct {
	IDIn       []string `db:"id:in"`        // IN condition
	NameIn     []string `db:"name:in"`      // IN condition
	StateIn    []string `db:"state:in"`     // IN condition
	StateNotIn []string `db:"state:not_in"` // NOT IN condition
	VersionGte *uint64  `db:"version:gte"`  // Greater than or equal condition
	VersionLte *uint64  `db:"version:lte"`  // Less than or equal condition
	VersionEq  *uint64  `db:"version:eq"`   // Equal condition

	IncludeDeleted bool   `db:"include_deleted"` // Special boolean handling
	Limit          uint32 `db:"limit"`
}

type ClusterTableUpdateFields

type ClusterTableUpdateFields struct {
	State     *string `db:"state"`
	Message   *string `db:"message"`
	DeletedAt *int64  `db:"deleted_at"`
}

type ComputeCapabilityKeys

type ComputeCapabilityKeys struct {
	ID   *string `db:"id"`
	Name *string `db:"name"`
}

type ComputeCapabilityRow

type ComputeCapabilityRow struct {
	ID        string `db:"id" orm:"op=create key=primary_key filter=In"`
	Version   uint64 `db:"version" orm:"op=create,update"`
	Name      string `db:"name" orm:"op=create composite_unique_key:Name,isDeleted filter=In"`
	DeletedAt int64  `db:"deleted_at"`
	State     string `db:"state" orm:"op=create,update filter=In,NotIn"`
	Message   string `db:"message" orm:"op=create,update"`

	Type  string `db:"type" orm:"op=create filter=In,NotIn"`
	Score uint32 `db:"score" orm:"op=create,update"`
}

type ComputeCapabilityTable

type ComputeCapabilityTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewComputeCapabilityTable

func NewComputeCapabilityTable(db simplesql.Database) *ComputeCapabilityTable

func (*ComputeCapabilityTable) Delete

func (s *ComputeCapabilityTable) Delete(ctx context.Context, execer sqlx.ExecerContext, id string, version uint64) error

func (*ComputeCapabilityTable) Get

func (*ComputeCapabilityTable) Insert

func (*ComputeCapabilityTable) List

func (*ComputeCapabilityTable) Update

func (s *ComputeCapabilityTable) Update(
	ctx context.Context, execer sqlx.ExecerContext, id string, version uint64, updateFields ComputeCapabilityTableUpdateFields,
) error

type ComputeCapabilityTableSelectFilters

type ComputeCapabilityTableSelectFilters struct {
	IDIn       []string `db:"id:in"`        // IN condition
	NameIn     []string `db:"name:in"`      // IN condition
	StateIn    []string `db:"state:in"`     // IN condition
	StateNotIn []string `db:"state:not_in"` // NOT IN condition
	VersionGte *uint64  `db:"version:gte"`  // Greater than or equal condition
	VersionLte *uint64  `db:"version:lte"`  // Less than or equal condition
	VersionEq  *uint64  `db:"version:eq"`   // Equal condition

	IncludeDeleted bool   `db:"include_deleted"` // Special boolean handling
	Limit          uint32 `db:"limit"`

	TypeIn []string `db:"type:in"` // IN condition
}

type ComputeCapabilityTableUpdateFields

type ComputeCapabilityTableUpdateFields struct {
	State     *string `db:"state"`
	Message   *string `db:"message"`
	DeletedAt *int64  `db:"deleted_at"`
}

type DeploymentMatchingCapabilityTable

type DeploymentMatchingCapabilityTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func (*DeploymentMatchingCapabilityTable) Insert

type DeploymentPlanApplicationPersistentVolumeRow

type DeploymentPlanApplicationPersistentVolumeRow struct {
	DeploymentPlanID string `db:"deployment_plan_id" orm:"op=create filter=In"`
	PayloadName      string `db:"payload_name" orm:"op=create filter=In"`
	StorageClass     string `db:"storage_class" orm:"op=create"`
	Capacity         uint32 `db:"capacity" orm:"op=create"`
	MountPath        string `db:"mount_path" orm:"op=create"`
}

type DeploymentPlanApplicationPersistentVolumeTable

type DeploymentPlanApplicationPersistentVolumeTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func (*DeploymentPlanApplicationPersistentVolumeTable) Insert

type DeploymentPlanApplicationPersistentVolumeTableSelectFilters

type DeploymentPlanApplicationPersistentVolumeTableSelectFilters struct {
	DeploymentPlanIDIn []string `db:"deployment_plan_id:in"` // IN condition
	PayloadNameIn      []string `db:"payload_name:in"`       // IN condition
}

type DeploymentPlanApplicationPortRow

type DeploymentPlanApplicationPortRow struct {
	DeploymentPlanID string `db:"deployment_plan_id" orm:"op=create filter=In"`
	PayloadName      string `db:"payload_name" orm:"op=create filter=In"`
	Protocol         string `db:"protocol" orm:"op=create filter=In"`
	Port             uint32 `db:"port" orm:"op=create"`
}

type DeploymentPlanApplicationPortTable

type DeploymentPlanApplicationPortTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func (*DeploymentPlanApplicationPortTable) Insert

type DeploymentPlanApplicationPortTableSelectFilters

type DeploymentPlanApplicationPortTableSelectFilters struct {
	DeploymentPlanIDIn []string `db:"deployment_plan_id:in"` // IN condition
	PayloadNameIn      []string `db:"payload_name:in"`       // IN condition
}

type DeploymentPlanApplicationRow

type DeploymentPlanApplicationRow struct {
	DeploymentPlanID string `db:"deployment_plan_id" orm:"op=create filter=In"`
	PayloadName      string `db:"payload_name" orm:"op=create filter=In"`
	Cores            uint32 `db:"cores" orm:"op=create"`
	Memory           uint32 `db:"memory" orm:"op=create"`
}

type DeploymentPlanApplicationTable

type DeploymentPlanApplicationTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewDeploymentPlanApplicationTable

func NewDeploymentPlanApplicationTable(db simplesql.Database) *DeploymentPlanApplicationTable

func (*DeploymentPlanApplicationTable) Insert

type DeploymentPlanApplicationTableSelectFilters

type DeploymentPlanApplicationTableSelectFilters struct {
	DeploymentPlanIDIn []string `db:"deployment_plan_id:in"` // IN condition
	PayloadNameIn      []string `db:"payload_name:in"`       // IN condition
}

type DeploymentPlanDeploymentPayloadCoordinatesRow

type DeploymentPlanDeploymentPayloadCoordinatesRow struct {
	DeploymentPlanID string `db:"deployment_plan_id" orm:"op=create filter=In"`
	DeploymentID     string `db:"deployment_id" orm:"op=create filter=In"`
	PayloadName      string `db:"payload_name" orm:"op=create"`
	Coordinates      string `db:"coordinates" orm:"op=create"`
}

type DeploymentPlanDeploymentPayloadCoordinatesTable

type DeploymentPlanDeploymentPayloadCoordinatesTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func (*DeploymentPlanDeploymentPayloadCoordinatesTable) Insert

type DeploymentPlanDeploymentPayloadCoordinatesTableSelectFilters

type DeploymentPlanDeploymentPayloadCoordinatesTableSelectFilters struct {
	DeploymentPlanIDIn []string `db:"deployment_plan_id:in"` // IN condition
	DeploymentIDIn     []string `db:"deployment_id:in"`      // IN condition
}

type DeploymentPlanDeploymentRow

type DeploymentPlanDeploymentRow struct {
	ID               string `db:"id" orm:"op=create key=primary_key filter=In"`
	DeploymentPlanID string `db:"deployment_plan_id" orm:"op=create filter=In"`
	InstanceCount    uint32 `db:"instance_count" orm:"op=create"`
	State            string `db:"state" orm:"op=create,update filter=In,NotIn"`
	Message          string `db:"message" orm:"op=create,update"`
}

type DeploymentPlanDeploymentTable

type DeploymentPlanDeploymentTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewDeploymentPlanDeploymentTable

func NewDeploymentPlanDeploymentTable(db simplesql.Database) *DeploymentPlanDeploymentTable

func (*DeploymentPlanDeploymentTable) Insert

func (*DeploymentPlanDeploymentTable) Update

func (s *DeploymentPlanDeploymentTable) Update(
	ctx context.Context, execer sqlx.ExecerContext, deploymentID string, deploymentPlanID string, updateFields DeploymentPlanDeploymentTableUpdateFields,
) error

type DeploymentPlanDeploymentTableSelectFilters

type DeploymentPlanDeploymentTableSelectFilters struct {
	IDIn               []string `db:"id:in"`                 // IN condition
	StateIn            []string `db:"state:in"`              // IN condition
	StateNotIn         []string `db:"state:not_in"`          // NOT IN condition
	DeploymentPlanIDIn []string `db:"deployment_plan_id:in"` // IN condition

}

type DeploymentPlanDeploymentTableUpdateFields

type DeploymentPlanDeploymentTableUpdateFields struct {
	State   *string `db:"state"`
	Message *string `db:"message"`
}

type DeploymentPlanKeys

type DeploymentPlanKeys struct {
	ID   *string `db:"id"`
	Name *string `db:"name"`
}

type DeploymentPlanMatchingCapabilityRow

type DeploymentPlanMatchingCapabilityRow struct {
	DeploymentPlanID string `db:"deployment_plan_id" orm:"op=create filter=In"`
	CapabilityType   string `db:"capability_type" orm:"op=create"`
	Comparator       string `db:"comparator" orm:"op=create"`
	CapabilityNames  string `db:"capability_names" orm:"op=create"`
}

type DeploymentPlanMatchingCapabilityTableSelectFilters

type DeploymentPlanMatchingCapabilityTableSelectFilters struct {
	DeploymentPlanIDIn []string `db:"deployment_plan_id:in"` // IN condition
}

type DeploymentPlanRow

type DeploymentPlanRow struct {
	ID          string `db:"id" orm:"op=create key=primary_key filter=In"`
	Version     uint64 `db:"version" orm:"op=create,update"`
	Name        string `db:"name" orm:"op=create composite_unique_key:Name,isDeleted filter=In"`
	DeletedAt   int64  `db:"deleted_at"`
	State       string `db:"state" orm:"op=create,update filter=In,NotIn"`
	Message     string `db:"message" orm:"op=create,update"`
	Namespace   string `db:"namespace" orm:"op=create filter=In"`
	ServiceName string `db:"service_name" orm:"op=create filter=In"`
}

type DeploymentPlanTable

type DeploymentPlanTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewDeploymentPlanTable

func NewDeploymentPlanTable(db simplesql.Database) *DeploymentPlanTable

func (*DeploymentPlanTable) Delete

func (s *DeploymentPlanTable) Delete(ctx context.Context, execer sqlx.ExecerContext, id string, version uint64) error

func (*DeploymentPlanTable) Get

func (*DeploymentPlanTable) Insert

func (*DeploymentPlanTable) List

func (*DeploymentPlanTable) Update

func (s *DeploymentPlanTable) Update(
	ctx context.Context, execer sqlx.ExecerContext, id string, version uint64, updateFields DeploymentPlanTableUpdateFields,
) error

type DeploymentPlanTableSelectFilters

type DeploymentPlanTableSelectFilters struct {
	IDIn          []string `db:"id:in"`           // IN condition
	NameIn        []string `db:"name:in"`         // IN condition
	StateIn       []string `db:"state:in"`        // IN condition
	StateNotIn    []string `db:"state:not_in"`    // NOT IN condition
	VersionGte    *uint64  `db:"version:gte"`     // Greater than or equal condition
	VersionLte    *uint64  `db:"version:lte"`     // Less than or equal condition
	VersionEq     *uint64  `db:"version:eq"`      // Equal condition
	ServiceNameIn []string `db:"service_name:in"` // IN condition
	NamespaceIn   []string `db:"namespace:in"`    // IN condition

	IncludeDeleted bool   `db:"include_deleted"` // Special boolean handling
	Limit          uint32 `db:"limit"`
}

type DeploymentPlanTableUpdateFields

type DeploymentPlanTableUpdateFields struct {
	State     *string `db:"state"`
	Message   *string `db:"message"`
	DeletedAt *int64  `db:"deleted_at"`
}

type MetaInstanceKeys

type MetaInstanceKeys struct {
	ID   *string `db:"id"`
	Name *string `db:"name"`
}

type MetaInstanceOperationRow

type MetaInstanceOperationRow struct {
	ID             string `db:"id" orm:"op=create key=primary_key filter=In"`
	MetaInstanceID string `db:"meta_instance_id" orm:"op=create filter=In"`
	Type           string `db:"type" orm:"op=create"`
	IntentID       string `db:"intent_id" orm:"op=create"`
	State          string `db:"state" orm:"op=create,update filter=In,NotIn"`
	Message        string `db:"message" orm:"op=create,update"`
}

type MetaInstanceOperationTable

type MetaInstanceOperationTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewMetaInstanceOperationTable

func NewMetaInstanceOperationTable(db simplesql.Database) *MetaInstanceOperationTable

func (*MetaInstanceOperationTable) Delete

func (s *MetaInstanceOperationTable) Delete(ctx context.Context, execer sqlx.ExecerContext, operationID string, metaInstanceID string) error

func (*MetaInstanceOperationTable) Insert

func (*MetaInstanceOperationTable) List

func (*MetaInstanceOperationTable) Update

func (s *MetaInstanceOperationTable) Update(
	ctx context.Context, execer sqlx.ExecerContext, operationID string, metaInstanceID string, updateFields MetaInstanceOperationTableUpdateFields,
) error

TODO: Auto-generate this function

type MetaInstanceOperationTableSelectFilters

type MetaInstanceOperationTableSelectFilters struct {
	IDIn             []string `db:"id:in"`               // IN condition
	MetaInstanceIDIn []string `db:"meta_instance_id:in"` // IN condition
	StateIn          []string `db:"state:in"`            // IN condition
	StateNotIn       []string `db:"state:not_in"`        // NOT IN condition
}

type MetaInstanceOperationTableUpdateFields

type MetaInstanceOperationTableUpdateFields struct {
	State   *string `db:"state"`
	Message *string `db:"message"`
}

type MetaInstanceRow

type MetaInstanceRow struct {
	ID               string `db:"id" orm:"op=create key=primary_key filter=In"`
	Version          uint64 `db:"version" orm:"op=create,update"`
	Name             string `db:"name" orm:"op=create composite_unique_key:name,deleted_at filter=In"`
	DeletedAt        int64  `db:"deleted_at"`
	State            string `db:"state" orm:"op=create,update filter=In,NotIn"`
	Message          string `db:"message" orm:"op=create,update"`
	DeploymentPlanID string `db:"deployment_plan_id" orm:"op=create filter=In"`
	DeploymentID     string `db:"deployment_id" orm:"op=create,update filter=In"`
}

type MetaInstanceRuntimeInstanceRow

type MetaInstanceRuntimeInstanceRow struct {
	ID             string `db:"id" orm:"op=create key=primary_key filter=In"`
	MetaInstanceID string `db:"meta_instance_id" orm:"op=create filter=In"`
	NodeID         string `db:"node_id" orm:"op=create filter=In"`
	IsActive       bool   `db:"is_active" orm:"op=create,update filter=In"`
	State          string `db:"state" orm:"op=create,update filter=In,NotIn"`
	Message        string `db:"message" orm:"op=create,update"`
}

type MetaInstanceRuntimeInstanceTable

type MetaInstanceRuntimeInstanceTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func (*MetaInstanceRuntimeInstanceTable) Delete

func (s *MetaInstanceRuntimeInstanceTable) Delete(ctx context.Context, execer sqlx.ExecerContext, runtimeInstanceID string, metaInstanceID string) error

func (*MetaInstanceRuntimeInstanceTable) Insert

func (*MetaInstanceRuntimeInstanceTable) Update

func (s *MetaInstanceRuntimeInstanceTable) Update(
	ctx context.Context, execer sqlx.ExecerContext, runtimeInstanceID string, metaInstanceID string, updateFields MetaInstanceRuntimeInstanceTableUpdateFields,
) error

type MetaInstanceRuntimeInstanceTableSelectFilters

type MetaInstanceRuntimeInstanceTableSelectFilters struct {
	IDIn             []string `db:"id:in"`               // IN condition
	MetaInstanceIDIn []string `db:"meta_instance_id:in"` // IN condition
	NodeIDIn         []string `db:"node_id:in"`          // IN condition
	IsActive         *bool    `db:"is_active"`           // Equal condition
	StateIn          []string `db:"state:in"`            // IN condition
	StateNotIn       []string `db:"state:not_in"`        // NOT IN condition
}

type MetaInstanceRuntimeInstanceTableUpdateFields

type MetaInstanceRuntimeInstanceTableUpdateFields struct {
	State    *string `db:"state"`
	Message  *string `db:"message"`
	IsActive *bool   `db:"is_active"`
}

type MetaInstanceTable

type MetaInstanceTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewMetaInstanceTable

func NewMetaInstanceTable(db simplesql.Database) *MetaInstanceTable

func (*MetaInstanceTable) Delete

func (s *MetaInstanceTable) Delete(ctx context.Context, execer sqlx.ExecerContext, id string, version uint64) error

func (*MetaInstanceTable) Get

func (*MetaInstanceTable) Insert

func (*MetaInstanceTable) List

func (*MetaInstanceTable) Update

func (s *MetaInstanceTable) Update(
	ctx context.Context, execer sqlx.ExecerContext, id string, version uint64, updateFields MetaInstanceTableUpdateFields,
) error

type MetaInstanceTableSelectFilters

type MetaInstanceTableSelectFilters struct {
	IDIn               []string `db:"id:in"`                 // IN condition
	NameIn             []string `db:"name:in"`               // IN condition
	StateIn            []string `db:"state:in"`              // IN condition
	StateNotIn         []string `db:"state:not_in"`          // NOT IN condition
	VersionGte         *uint64  `db:"version:gte"`           // Greater than or equal condition
	VersionLte         *uint64  `db:"version:lte"`           // Less than or equal condition
	VersionEq          *uint64  `db:"version:eq"`            // Equal condition
	DeploymentIDIn     []string `db:"deployment_id:in"`      // IN condition
	DeploymentPlanIDIn []string `db:"deployment_plan_id:in"` // IN condition

	IncludeDeleted bool   `db:"include_deleted"` // Special boolean handling
	Limit          uint32 `db:"limit"`
}

type MetaInstanceTableUpdateFields

type MetaInstanceTableUpdateFields struct {
	State        *string `db:"state"`
	Message      *string `db:"message"`
	DeploymentID *string `db:"deployment_id"`
	DeletedAt    *int64  `db:"deleted_at"`
}

type NodeCapabilityRow

type NodeCapabilityRow struct {
	NodeID       string `db:"node_id" orm:"op=create filter=In"`
	CapabilityID string `db:"capability_id" orm:"op=create filter=In"`
}

type NodeCapabilityTable

type NodeCapabilityTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewNodeCapabilityTable

func NewNodeCapabilityTable(db simplesql.Database) *NodeCapabilityTable

func (*NodeCapabilityTable) Delete

func (s *NodeCapabilityTable) Delete(ctx context.Context, execer sqlx.ExecerContext, nodeID string, capabilityID string) error

func (*NodeCapabilityTable) Insert

func (*NodeCapabilityTable) List

type NodeCapabilityTableSelectFilters

type NodeCapabilityTableSelectFilters struct {
	NodeIDIn       []string `db:"node_id:in"`       // IN condition
	CapabilityIDIn []string `db:"capability_id:in"` // IN condition
}

type NodeDisruptionRow

type NodeDisruptionRow struct {
	ID        string `db:"id" orm:"op=create key=primary_key filter=In"`
	NodeID    string `db:"node_id" orm:"op=create filter=In"`
	EvictNode bool   `db:"evict_node" orm:"op=create,update filter=In"`
	StartTime uint64 `db:"start_time" orm:"op=create,update filter=gte,lte"`
	State     string `db:"state" orm:"op=create,update filter=In,NotIn"`
	Message   string `db:"message" orm:"op=create,update"`
}

type NodeDisruptionTable

type NodeDisruptionTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewNodeDisruptionTable

func NewNodeDisruptionTable(db simplesql.Database) *NodeDisruptionTable

func (*NodeDisruptionTable) Delete

func (s *NodeDisruptionTable) Delete(ctx context.Context, execer sqlx.ExecerContext, nodeID string, id string) error

TODO: This should also be auto-generated.

func (*NodeDisruptionTable) Insert

func (*NodeDisruptionTable) List

func (*NodeDisruptionTable) Update

func (s *NodeDisruptionTable) Update(
	ctx context.Context, execer sqlx.ExecerContext, nodeID string, id string, updateFields NodeDisruptionTableUpdateFields,
) error

TODO: This should also be auto-generated.

type NodeDisruptionTableSelectFilters

type NodeDisruptionTableSelectFilters struct {
	DisruptionIDIn []string `db:"disruption_id:in"` // IN condition
	NodeIDIn       []string `db:"node_id:in"`       // IN condition
	StateIn        []string `db:"state:in"`         // IN condition
	StateNotIn     []string `db:"state:not_in"`     // NOT IN condition
	StartTimeGte   *uint64  `db:"start_time:gte"`   // Greater than or equal condition
	StartTimeLte   *uint64  `db:"start_time:lte"`   // Less than or equal condition
}

type NodeDisruptionTableUpdateFields

type NodeDisruptionTableUpdateFields struct {
	State   *string `db:"state"`
	Message *string `db:"message"`
}

type NodeKeys

type NodeKeys struct {
	ID   *string `db:"id"`
	Name *string `db:"name"`
}

type NodeLocalVolumeRow

type NodeLocalVolumeRow struct {
	NodeID          string `db:"node_id" orm:"op=create filter=In"`
	MountPath       string `db:"mount_path" orm:"op=create"`
	StorageClass    string `db:"storage_class" orm:"op=create filter=In"`
	StorageCapacity uint32 `db:"storage_capacity" orm:"op=create"`
}

type NodeLocalVolumeTable

type NodeLocalVolumeTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewNodeLocalVolumeTable

func NewNodeLocalVolumeTable(db simplesql.Database) *NodeLocalVolumeTable

func (*NodeLocalVolumeTable) Delete

func (s *NodeLocalVolumeTable) Delete(ctx context.Context, execer sqlx.ExecerContext, nodeID string) error

func (*NodeLocalVolumeTable) Insert

func (*NodeLocalVolumeTable) List

TODO: This should also be auto-generated.

type NodeLocalVolumeTableSelectFilters

type NodeLocalVolumeTableSelectFilters struct {
	NodeIDIn       []string `db:"node_id:in"`       // IN condition
	StorageClassIn []string `db:"storage_class:in"` // IN condition
}

type NodePayloadRow

type NodePayloadRow struct {
	NodeID      string `db:"node_id" orm:"op=create key=primary_key filter=In"`
	PayloadName string `db:"payload_name" orm:"op=create key=primary_key filter=In"`
}

type NodePayloadTable

type NodePayloadTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewNodePayloadTable

func NewNodePayloadTable(db simplesql.Database) *NodePayloadTable

func (*NodePayloadTable) Delete

func (s *NodePayloadTable) Delete(ctx context.Context, execer sqlx.ExecerContext, nodeID string, payloadName string) error

func (*NodePayloadTable) Insert

func (*NodePayloadTable) List

type NodePayloadTableSelectFilters

type NodePayloadTableSelectFilters struct {
	NodeIDIn         []string `db:"node_id:in"`          // IN condition
	PayloadNameIn    []string `db:"payload_name:in"`     // IN condition
	PayloadNameNotIn []string `db:"payload_name:not_in"` // NOT IN condition
}

type NodeRow

type NodeRow struct {
	ID                   string `db:"id" orm:"op=create key=primary_key filter=In"`
	Version              uint64 `db:"version" orm:"op=create,update"`
	Name                 string `db:"name" orm:"op=create composite_unique_key:Name,isDeleted filter=In"`
	DeletedAt            int64  `db:"deleted_at"`
	State                string `db:"state" orm:"op=create,update filter=In,NotIn"`
	Message              string `db:"message" orm:"op=create,update"`
	UpdateDomain         string `db:"update_domain" orm:"op=create filter=In"`
	ClusterID            string `db:"cluster_id" orm:"op=create filter=In"`
	TotalCores           uint32 `db:"total_cores" orm:"op=create,update"`
	TotalMemory          uint32 `db:"total_memory" orm:"op=create,update"`
	SystemReservedCores  uint32 `db:"system_reserved_cores" orm:"op=create,update"`
	SystemReservedMemory uint32 `db:"system_reserved_memory" orm:"op=create,update"`
	RemainingCores       uint32 `db:"remaining_cores" orm:"op=create,update filter=lte,gte"`
	RemainingMemory      uint32 `db:"remaining_memory" orm:"op=create,update filter=lte,gte"`
}

type NodeSelectFilters

type NodeSelectFilters struct {
	IDIn               []string `db:"id:in"`        // IN condition
	NameIn             []string `db:"name:in"`      // IN condition
	StateIn            []string `db:"state:in"`     // IN condition
	StateNotIn         []string `db:"state:not_in"` // NOT IN condition
	VersionGte         *uint64  `db:"version:gte"`  // Greater than or equal condition
	VersionLte         *uint64  `db:"version:lte"`  // Less than or equal condition
	VersionEq          *uint64  `db:"version:eq"`   // Equal condition
	ClusterIDIn        []string `db:"cluster_id:in"`
	ClusterIDNotIn     []string `db:"cluster_id:not_in"`
	RemainingCoresGte  *uint32  `db:"remaining_memory:gte"` // Greater than or equal condition
	RemainingCoresLte  *uint32  `db:"remaining_memory:lte"` // Less than or equal condition
	RemainingMemoryGte *uint32  `db:"remaining_memory:gte"` // Greater than or equal condition
	RemainingMemoryLte *uint32  `db:"remaining_memory:lte"` // Less than or equal condition
	PayloadNameIn      []string `db:"payload_name:in"`      // IN condition
	PayloadNameNotIn   []string `db:"payload_name:not_in"`  // NOT IN condition
	UpdateDomainIn     []string `db:"update_domain:in"`

	IncludeDeleted bool   `db:"include_deleted"` // Special boolean handling
	Limit          uint32 `db:"limit"`
}

type NodeTable

type NodeTable struct {
	simplesql.Database
	// contains filtered or unexported fields
}

func NewNodeTable

func NewNodeTable(db simplesql.Database) *NodeTable

func (*NodeTable) Delete

func (s *NodeTable) Delete(ctx context.Context, execer sqlx.ExecerContext, id string, version uint64) error

func (*NodeTable) Get

func (s *NodeTable) Get(ctx context.Context, keys NodeKeys) (NodeRow, error)

func (*NodeTable) Insert

func (s *NodeTable) Insert(ctx context.Context, execer sqlx.ExecerContext, row NodeRow) error

func (*NodeTable) List

func (s *NodeTable) List(ctx context.Context, filters NodeSelectFilters) ([]NodeRow, error)

func (*NodeTable) Update

func (s *NodeTable) Update(
	ctx context.Context, execer sqlx.ExecerContext, id string, version uint64, updateFields NodeUpdateFields,
) error

type NodeUpdateFields

type NodeUpdateFields struct {
	State           *string `db:"state"`
	Message         *string `db:"message"`
	ClusterID       *string `db:"cluster_id"`
	DeletedAt       *int64  `db:"deleted_at"`
	RemainingCores  *uint32 `db:"remaining_cores"`
	RemainingMemory *uint32 `db:"remaining_memory"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL