Documentation ¶
Index ¶
- Constants
- func QueueJob(ctx context.Context, queries *Queries, worker string, jobType string, ...) (string, error)
- type AddNodeParams
- type AttachVolumeToInstanceParams
- type CreateInstanceParams
- type CreateJobParams
- type CreateNICParams
- type CreateNetworkParams
- type CreateResourceParams
- type CreateVolumeParams
- type DBTX
- type Instance
- type InstanceNic
- type Job
- type Network
- type Node
- type Openwrt
- type OpenwrtNetwork
- type PGNotifyMessage
- type Queries
- func (q *Queries) AddNode(ctx context.Context, arg AddNodeParams) (Node, error)
- func (q *Queries) AddOpenwrt(ctx context.Context, openwrtID string) (string, error)
- func (q *Queries) AttachVolumeToInstance(ctx context.Context, arg AttachVolumeToInstanceParams) (int64, error)
- func (q *Queries) CreateInstance(ctx context.Context, arg CreateInstanceParams) error
- func (q *Queries) CreateJob(ctx context.Context, arg CreateJobParams) error
- func (q *Queries) CreateNIC(ctx context.Context, arg CreateNICParams) error
- func (q *Queries) CreateNetwork(ctx context.Context, arg CreateNetworkParams) (int32, error)
- func (q *Queries) CreateResource(ctx context.Context, arg CreateResourceParams) error
- func (q *Queries) CreateTenant(ctx context.Context, name string) error
- func (q *Queries) CreateVolume(ctx context.Context, arg CreateVolumeParams) error
- func (q *Queries) DeleteInstance(ctx context.Context, resourceID string) error
- func (q *Queries) DeleteJob(ctx context.Context, jobID string) error
- func (q *Queries) DeleteNetwork(ctx context.Context, resourceID string) error
- func (q *Queries) DeleteNode(ctx context.Context, resourceID string) (int64, error)
- func (q *Queries) DeleteResource(ctx context.Context, resourceID string) error
- func (q *Queries) DeleteVolume(ctx context.Context, resourceID string) error
- func (q *Queries) DetachVolume(ctx context.Context, resourceID string) (int64, error)
- func (q *Queries) GetAllOpenwrtIDs(ctx context.Context) ([]string, error)
- func (q *Queries) GetAvailableNodes(ctx context.Context) ([]string, error)
- func (q *Queries) GetFailedJobs(ctx context.Context) ([]Job, error)
- func (q *Queries) GetInstance(ctx context.Context, resourceID string) (Instance, error)
- func (q *Queries) GetInstanceAttachedVolumes(ctx context.Context, instance sql.NullString) ([]Volume, error)
- func (q *Queries) GetInstanceNICs(ctx context.Context, instance string) ([]InstanceNic, error)
- func (q *Queries) GetJob(ctx context.Context, jobID string) (Job, error)
- func (q *Queries) GetNICs(ctx context.Context, instance string) ([]InstanceNic, error)
- func (q *Queries) GetNetwork(ctx context.Context, resourceID string) (Network, error)
- func (q *Queries) GetNextJob(ctx context.Context) (Job, error)
- func (q *Queries) GetNextJobForWorker(ctx context.Context, assignedWorker string) (Job, error)
- func (q *Queries) GetNodeByHostname(ctx context.Context, hostname string) (Node, error)
- func (q *Queries) GetNodeForInstance(ctx context.Context, resourceID string) (Node, error)
- func (q *Queries) GetNodes(ctx context.Context) ([]Node, error)
- func (q *Queries) GetOpenwrtByID(ctx context.Context, openwrtID string) (string, error)
- func (q *Queries) GetTrunkNIC(ctx context.Context, instance string) (InstanceNic, error)
- func (q *Queries) ListInstances(ctx context.Context, tenant string) ([]Instance, error)
- func (q *Queries) ListNetworks(ctx context.Context) ([]string, error)
- func (q *Queries) ListTenants(ctx context.Context) ([]Tenant, error)
- func (q *Queries) ListVolumes(ctx context.Context, tenant string) ([]Volume, error)
- func (q *Queries) SetInstanceState(ctx context.Context, arg SetInstanceStateParams) error
- func (q *Queries) SetJobState(ctx context.Context, arg SetJobStateParams) (int64, error)
- func (q *Queries) SetNodeAvailability(ctx context.Context, arg SetNodeAvailabilityParams) (int64, error)
- func (q *Queries) SetNodeForInstance(ctx context.Context, arg SetNodeForInstanceParams) (int64, error)
- func (q *Queries) SetNodeHostname(ctx context.Context, arg SetNodeHostnameParams) (int64, error)
- func (q *Queries) SetVlanSeq(ctx context.Context, setval int64) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type Resource
- type ResourceTag
- type SetInstanceStateParams
- type SetJobStateParams
- type SetNodeAvailabilityParams
- type SetNodeForInstanceParams
- type SetNodeHostnameParams
- type Tenant
- type Volume
Constants ¶
View Source
const ( DefaultTenantName = "default" // this is temporary until tenant management exists // tenants.state TenantStatePENDING = 0 TenantStatePROVISIONING = 1 TenantStateACTIVE = 2 TenantStateSUSPENDED = 3 TenantStateDELETED = 4 // jobs.state JobStateQUEUED = 0 JobStateRUNNING = 1 JobStateDONE = 2 JobStateFAILED = 3 // instances.state InstanceStatePENDING = 0 InstanceStateCREATING = 1 InstanceStateSTARTED = 2 InstanceStateSTOPPED = 3 InstanceStateDELETING = 4 InstanceStateDELETED = 5 InstanceStateERROR = 6 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddNodeParams ¶
type AttachVolumeToInstanceParams ¶
type AttachVolumeToInstanceParams struct { Instance sql.NullString ResourceID string }
type CreateInstanceParams ¶
type CreateJobParams ¶
type CreateNICParams ¶
type CreateNetworkParams ¶
type CreateResourceParams ¶
type CreateVolumeParams ¶
type InstanceNic ¶
type OpenwrtNetwork ¶
type PGNotifyMessage ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AddOpenwrt ¶
func (*Queries) AttachVolumeToInstance ¶
func (*Queries) CreateInstance ¶
func (q *Queries) CreateInstance(ctx context.Context, arg CreateInstanceParams) error
INSTANCES
func (*Queries) CreateJob ¶
func (q *Queries) CreateJob(ctx context.Context, arg CreateJobParams) error
JOBS
func (*Queries) CreateNIC ¶
func (q *Queries) CreateNIC(ctx context.Context, arg CreateNICParams) error
INSTANCE NICs
func (*Queries) CreateNetwork ¶
NETWORKS
func (*Queries) CreateResource ¶
func (q *Queries) CreateResource(ctx context.Context, arg CreateResourceParams) error
RESOURCES
func (*Queries) CreateTenant ¶
Copyright 2021 Entanglement Garden Developers SPDX-License-Identifier: AGPL-3.0-only TENANTS
func (*Queries) CreateVolume ¶
func (q *Queries) CreateVolume(ctx context.Context, arg CreateVolumeParams) error
VOLUMES
func (*Queries) DeleteInstance ¶
func (*Queries) DeleteNetwork ¶
func (*Queries) DeleteNode ¶
func (*Queries) DeleteResource ¶
func (*Queries) DeleteVolume ¶
func (*Queries) DetachVolume ¶
func (*Queries) GetAllOpenwrtIDs ¶
func (*Queries) GetAvailableNodes ¶
func (*Queries) GetInstance ¶
func (*Queries) GetInstanceAttachedVolumes ¶
func (*Queries) GetInstanceNICs ¶
func (*Queries) GetNetwork ¶
func (*Queries) GetNextJobForWorker ¶
func (*Queries) GetNodeByHostname ¶
func (*Queries) GetNodeForInstance ¶
func (*Queries) GetOpenwrtByID ¶
OPENWRTS
func (*Queries) GetTrunkNIC ¶
func (*Queries) ListInstances ¶
func (*Queries) ListNetworks ¶
func (*Queries) ListVolumes ¶
func (*Queries) SetInstanceState ¶
func (q *Queries) SetInstanceState(ctx context.Context, arg SetInstanceStateParams) error
func (*Queries) SetJobState ¶
func (*Queries) SetNodeAvailability ¶
func (*Queries) SetNodeForInstance ¶
func (*Queries) SetNodeHostname ¶
type ResourceTag ¶
type SetInstanceStateParams ¶
type SetJobStateParams ¶
type SetNodeForInstanceParams ¶
type SetNodeForInstanceParams struct { Node sql.NullString ResourceID string }
type SetNodeHostnameParams ¶
Click to show internal directories.
Click to hide internal directories.