Documentation
¶
Overview ¶
Package sunbeam provides the interface to talk to database
Index ¶
- func AddFeatureGate(ctx context.Context, s state.State, gateKey string, enabled bool) error
- func AddJujuUser(ctx context.Context, s state.State, name string, token string) error
- func AddManifest(ctx context.Context, s state.State, manifestid string, data string) error
- func AddNode(ctx context.Context, s state.State, name string, role []string, machineid int, ...) error
- func AddStorageBackend(ctx context.Context, s state.State, name string, backendType string, ...) error
- func CreateConfig(ctx context.Context, s state.State, key string, value string) error
- func DeleteConfig(ctx context.Context, s state.State, key string) error
- func DeleteFeatureGate(ctx context.Context, s state.State, gateKey string) error
- func DeleteJujuUser(ctx context.Context, s state.State, name string) error
- func DeleteManifest(ctx context.Context, s state.State, manifestid string) error
- func DeleteNode(ctx context.Context, s state.State, name string) error
- func DeleteStorageBackend(ctx context.Context, s state.State, name string) error
- func DeleteTerraformLock(ctx context.Context, s state.State, name string, lock string) (apitypes.Lock, error)
- func DeleteTerraformState(ctx context.Context, s state.State, name string) error
- func GetConfig(ctx context.Context, s state.State, key string) (string, error)
- func GetConfigItemKeys(ctx context.Context, s state.State, prefix *string) ([]string, error)
- func GetFeatureGate(ctx context.Context, s state.State, gateKey string) (apitypes.FeatureGate, error)
- func GetJujuUser(ctx context.Context, s state.State, name string) (apitypes.JujuUser, error)
- func GetManifest(ctx context.Context, s state.State, manifestid string) (apitypes.Manifest, error)
- func GetNode(ctx context.Context, s state.State, name string) (apitypes.Node, error)
- func GetStorageBackend(ctx context.Context, s state.State, name string) (apitypes.StorageBackend, error)
- func GetTerraformLock(ctx context.Context, s state.State, name string) (string, error)
- func GetTerraformLocks(ctx context.Context, s state.State) ([]string, error)
- func GetTerraformState(ctx context.Context, s state.State, name string) (string, error)
- func GetTerraformStates(ctx context.Context, s state.State) ([]string, error)
- func ListFeatureGates(ctx context.Context, s state.State) (apitypes.FeatureGates, error)
- func ListJujuUsers(ctx context.Context, s state.State) (apitypes.JujuUsers, error)
- func ListManifests(ctx context.Context, s state.State) (apitypes.Manifests, error)
- func ListNodes(ctx context.Context, s state.State, roles []string) (apitypes.Nodes, error)
- func ListStorageBackends(ctx context.Context, s state.State) (apitypes.StorageBackends, error)
- func StartFeatureGateSync(ctx context.Context, s state.State)
- func UpdateConfig(ctx context.Context, s state.State, key string, value string) error
- func UpdateFeatureGate(ctx context.Context, s state.State, gateKey string, enabled bool) error
- func UpdateJujuUser(ctx context.Context, s state.State, name string, token string) error
- func UpdateNode(ctx context.Context, s state.State, name string, role []string, machineid int, ...) error
- func UpdateStorageBackend(ctx context.Context, s state.State, name string, backendType string, ...) error
- func UpdateTerraformLock(ctx context.Context, s state.State, name string, lock string) (apitypes.Lock, error)
- func UpdateTerraformState(ctx context.Context, s state.State, name string, lockID string, state string) (apitypes.Lock, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFeatureGate ¶
AddFeatureGate adds a feature gate to the database.
func AddJujuUser ¶
AddJujuUser adds a Jujuuser to the database
func AddManifest ¶
AddManifest adds a manifest to the database
func AddNode ¶
func AddNode(ctx context.Context, s state.State, name string, role []string, machineid int, systemid string) error
AddNode adds a node to the database
func AddStorageBackend ¶
func AddStorageBackend(ctx context.Context, s state.State, name string, backendType string, principal string, modelUUID string, config string) error
AddStorageBackend adds a storage backend to the database
func CreateConfig ¶
CreateConfig adds a new ConfigItem to the database
func DeleteConfig ¶
DeleteConfig deletes a ConfigItem from the database
func DeleteFeatureGate ¶
DeleteFeatureGate deletes a feature gate from the database.
func DeleteJujuUser ¶
DeleteJujuUser deletes the juju user record from the database
func DeleteManifest ¶
DeleteManifest deletes a manifest from database
func DeleteNode ¶
DeleteNode deletes a node from database
func DeleteStorageBackend ¶
DeleteStorageBackend deletes a storage backend from database
func DeleteTerraformLock ¶
func DeleteTerraformLock(ctx context.Context, s state.State, name string, lock string) (apitypes.Lock, error)
DeleteTerraformLock deletes the terraform lock from the database
func DeleteTerraformState ¶
DeleteTerraformState deletes the terraform state from the database
func GetConfigItemKeys ¶
GetConfigItemKeys returns the list of ConfigItem keys from the database
func GetFeatureGate ¶
func GetFeatureGate(ctx context.Context, s state.State, gateKey string) (apitypes.FeatureGate, error)
GetFeatureGate returns a FeatureGate with the given gate key.
func GetJujuUser ¶
GetJujuUser returns a JujuUser with the given name
func GetManifest ¶
GetManifest returns a Manifest with the given id
func GetStorageBackend ¶
func GetStorageBackend(ctx context.Context, s state.State, name string) (apitypes.StorageBackend, error)
GetStorageBackend returns a StorageBackend with the given name
func GetTerraformLock ¶
GetTerraformLock returns the terraform lock from the database
func GetTerraformLocks ¶
GetTerraformLocks returns the list of terraform locks from the database
func GetTerraformState ¶
GetTerraformState returns the terraform state from the database
func GetTerraformStates ¶
GetTerraformStates returns the list of terraform states from the database
func ListFeatureGates ¶
ListFeatureGates returns all the feature gates.
func ListJujuUsers ¶
ListJujuUsers returns the jujuusers from the database
func ListManifests ¶
ListManifests return all the manifests
func ListStorageBackends ¶
ListStorageBackends return all the storage backends, filterable by role (Optional)
func StartFeatureGateSync ¶
StartFeatureGateSync starts a background goroutine that syncs feature gates from the cluster database to the local snap configuration.
func UpdateConfig ¶
UpdateConfig updates a ConfigItem in the database
func UpdateFeatureGate ¶
UpdateFeatureGate updates a feature gate record in the database.
func UpdateJujuUser ¶
UpdateJujuUser updates the juju user's token in the database
func UpdateNode ¶
func UpdateNode(ctx context.Context, s state.State, name string, role []string, machineid int, systemid string) error
UpdateNode updates a node record in the database
func UpdateStorageBackend ¶
func UpdateStorageBackend(ctx context.Context, s state.State, name string, backendType string, principal string, modelUUID string, config string) error
UpdateStorageBackend updates a storage backend record in the database
Types ¶
This section is empty.