Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(registry facade.FacadeRegistry)
Register is called to expose a package of facades onto a given registry.
Types ¶
type KeyUpdaterAPI ¶
type KeyUpdaterAPI struct {
// contains filtered or unexported fields
}
KeyUpdaterAPI implements the KeyUpdater interface and is the concrete implementation of the api end point.
func (*KeyUpdaterAPI) AuthorisedKeys ¶
func (api *KeyUpdaterAPI) AuthorisedKeys( ctx context.Context, arg params.Entities, ) (params.StringsResults, error)
AuthorisedKeys reports the authorised ssh keys for the specified machines. The current implementation fetches all keys on the model that have been granted for use on a machine. The following param error codes can be expected: - params.CodeTagInvalid When a tag provided does not parse and is considered invalid. - params.CodeTagKindNotSupported When a tag has been supplied that is not a machine tag. - params.CodeUnathorized When the caller does not have permissions to get the authorised keys for a requested tag. - params.CodeMachineInvalidID When one of the machine tag's translates to a invalid machine id. - params.CodeMachineNotFound When one of the machine's does not exist.
func (*KeyUpdaterAPI) WatchAuthorisedKeys ¶
func (api *KeyUpdaterAPI) WatchAuthorisedKeys(ctx context.Context, arg params.Entities) (params.NotifyWatchResults, error)
WatchAuthorisedKeys starts a watcher to track changes to the authorised ssh keys for the specified machines. The following param error codes can be expected: - params.CodeTagInvalid When a tag provided does not parse and is considered invalid. - params.CodeTagKindNotSupported When a tag has been supplied that is not a machine tag. - params.CodeUnathorized When the caller does not have permissions to get the authorised keys for a requested tag. - params.CodeMachineInvalidID When one of the machine tags id is invalid.
type KeyUpdaterService ¶
type KeyUpdaterService interface { // GetAuthorisedKeysForMachine is responsible for fetching the authorised keys // that should be available on a machine. The following errors can be // expected: // - [github.com/juju/errors.NotValid] if the machine id is not valid. // - [github.com/juju/juju/domain/machine/errors.NotFound] if the machine does // not exist. GetAuthorisedKeysForMachine(context.Context, coremachine.Name) ([]string, error) // WatchAuthorisedKeysForMachine will watch for authorised key changes for a // give machine name. The following errors can be expected: // - [github.com/juju/errors.NotValid] if the machine id is not valid. WatchAuthorisedKeysForMachine(context.Context, coremachine.Name) (watcher.NotifyWatcher, error) }
KeyUpdaterService is the interface for retrieving the authorised keys of a model.