Documentation
¶
Index ¶
- func Register(registry facade.FacadeRegistry)
- type CloudService
- type CredentialService
- type CredentialValidatorAPI
- func (api *CredentialValidatorAPI) ModelCredential(ctx context.Context) (params.ModelCredential, error)
- func (api *CredentialValidatorAPI) WatchCredential(ctx context.Context, tag params.Entity) (params.NotifyWatchResult, error)
- func (api *CredentialValidatorAPI) WatchModelCredential(ctx context.Context) (params.NotifyWatchResult, error)
- type CredentialValidatorV2
- type ModelAccessor
- type ModelCredential
- type StateAccessor
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 CloudService ¶
type CloudService interface { // Cloud returns the named cloud. Cloud(ctx context.Context, name string) (*cloud.Cloud, error) }
CloudService provides access to clouds.
type CredentialService ¶
type CredentialService interface { // CloudCredential returns the cloud credential for the given tag. CloudCredential(ctx context.Context, key credential.Key) (cloud.Credential, error) // InvalidateCredential marks the cloud credential for the given name, cloud, owner as invalid. InvalidateCredential(ctx context.Context, key credential.Key, reason string) error // WatchCredential returns a watcher that observes changes to the specified // credential. WatchCredential(ctx context.Context, key credential.Key) (corewatcher.NotifyWatcher, error) }
CredentialService provides access to perform credentials operations.
type CredentialValidatorAPI ¶
type CredentialValidatorAPI struct { *credentialcommon.CredentialManagerAPI // contains filtered or unexported fields }
func (*CredentialValidatorAPI) ModelCredential ¶
func (api *CredentialValidatorAPI) ModelCredential(ctx context.Context) (params.ModelCredential, error)
ModelCredential returns cloud credential information for a model.
func (*CredentialValidatorAPI) WatchCredential ¶
func (api *CredentialValidatorAPI) WatchCredential(ctx context.Context, tag params.Entity) (params.NotifyWatchResult, error)
WatchCredential returns a NotifyWatcher that observes changes to a given cloud credential.
func (*CredentialValidatorAPI) WatchModelCredential ¶
func (api *CredentialValidatorAPI) WatchModelCredential(ctx context.Context) (params.NotifyWatchResult, error)
WatchModelCredential returns a NotifyWatcher that watches what cloud credential a model uses.
type CredentialValidatorV2 ¶
type CredentialValidatorV2 interface { // InvalidateModelCredential marks the cloud credential for this model as invalid. InvalidateModelCredential(context.Context, params.InvalidateCredentialArg) (params.ErrorResult, error) // ModelCredential returns cloud credential information for a model. ModelCredential(context.Context) (params.ModelCredential, error) // WatchCredential returns a NotifyWatcher that observes // changes to a given cloud credential. WatchCredential(context.Context, params.Entity) (params.NotifyWatchResult, error) // WatchModelCredential returns a NotifyWatcher that watches what cloud credential a model uses. WatchModelCredential(context.Context) (params.NotifyWatchResult, error) }
CredentialValidatorV2 defines the methods on version 2 facade for the credentialvalidator API endpoint.
type ModelAccessor ¶
type ModelAccessor interface { ModelTag() names.ModelTag CloudName() string WatchModelCredential() state.NotifyWatcher }
ModelAccessor exposes Model methods needed by credential validator.
type ModelCredential ¶
type ModelCredential struct { // Model is a model tag. Model names.ModelTag // Exists indicates whether the model has a cloud credential. // On some clouds, that only require "empty" auth, cloud credential // is not needed for the models to function properly. Exists bool // Credential is a cloud credential tag. Credential names.CloudCredentialTag // Valid indicates that this model's cloud authentication is valid. // // If this model has a cloud credential setup, // then this property indicates that this credential itself is valid. // // If this model has no cloud credential, then this property indicates // whether or not it is valid for this model to have no credential. // There are some clouds that do not require auth and, hence, // models on these clouds do not require credentials. // // If a model is on the cloud that does require credential and // the model's credential is not set, this property will be set to 'false'. Valid bool }
ModelCredential stores model's cloud credential information.
type StateAccessor ¶
type StateAccessor interface { credentialcommon.StateBackend Model() (ModelAccessor, error) }
StateAccessor exposes State methods needed by credential validator.