Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CredentialKeyGetter ¶
type CredentialKeyGetter func() (credential.Key, error)
CredentialKeyGetter is a function which returns a credential key.
type InvalidateCredentialFunc ¶
InvalidateCredentialFunc records a credential with the given key as being invalid.
type ModelCredentialInvalidator ¶
type ModelCredentialInvalidator interface { // InvalidateModelCredential invalidate cloud credential for the model. InvalidateModelCredential(context.Context, string) error }
ModelCredentialInvalidator defines a point of use interface for invalidating a model credential.
func NewCredentialInvalidator ¶
func NewCredentialInvalidator( keyGetter CredentialKeyGetter, invalidateFunc InvalidateCredentialFunc, legacyInvalidateFunc func(reason string) error, ) ModelCredentialInvalidator
NewCredentialInvalidator creates a credential validator with callbacks which update dqlite and mongo.
type ModelCredentialInvalidatorFunc ¶
ModelCredentialInvalidatorFunc records a credential as being invalid.
type ModelCredentialInvalidatorGetter ¶
type ModelCredentialInvalidatorGetter func() (ModelCredentialInvalidatorFunc, error)
ModelCredentialInvalidatorGetter returns a function which records a credential as being invalid.
type ProviderCallContext ¶
ProviderCallContext wraps a standard context and is used in provider api calls.
func WithCredentialInvalidator ¶
func WithCredentialInvalidator(ctx context.Context, invalidationFunc ModelCredentialInvalidatorFunc) ProviderCallContext
WithCredentialInvalidator returns a ProviderCallContext with the specified credential invalidation callback.
func WithoutCredentialInvalidator ¶
func WithoutCredentialInvalidator(ctx context.Context) ProviderCallContext
WithoutCredentialInvalidator returns a ProviderCallContext without any credential invalidation callback.
func (ProviderCallContext) InvalidateCredential ¶
func (ctx ProviderCallContext) InvalidateCredential(reason string) error
InvalidateCredential invalidates a credential with a reason.