Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControllerState ¶
ControllerState provides a state access layer for accessing a controller's ssh keys via controller config.
func NewControllerState ¶
func NewControllerState(factory database.TxnRunnerFactory) *ControllerState
NewControllerState constructs a new state for interacting with the underlying authorised keys of a controller via controller config.
func (*ControllerState) GetControllerConfigKeys ¶
func (st *ControllerState) GetControllerConfigKeys( ctx context.Context, keys []string, ) (map[string]string, error)
GetControllerConfigKeys returns the controller config key and values for the keys supplied. If one or more keys supplied do not exist in the controller's config they will be omitted from the final result.
func (*ControllerState) GetUserAuthorizedKeysForModel ¶
func (s *ControllerState) GetUserAuthorizedKeysForModel( ctx context.Context, modelUUID model.UUID, ) ([]string, error)
GetUserAuthorizedKeysForModel is responsible for returning all of the user authorized keys for a model. The following errors can be expected: - modelerrors.NotFound if the model does not exist.
type State ¶
State defines the access mechanism for interacting with authorized keys in the context of the model database.
func NewState ¶
func NewState(factory database.TxnRunnerFactory) *State
NewState constructs a new state for interacting with the underlying authorised keys of a model.
func (*State) CheckMachineExists ¶
CheckMachineExists checks to see if the given machine exists in the model. If the machine does not exist an error satisfying machineerrors.MachineNotFound is returned.