Interface for credential stores which are used to store and lookup credentials to authenticate against external services.
Description
The ICredentialStore interface is used to store and look up credentials used to authenticate against external services.
Methods
Lookup
Lookups credential parameters by its key.
Lookup(ctx context.Context, correlationId string, key string) (*CredentialParams, error)
- ctx: context.Context - operation context.
- correlationId: string - (optional) transaction id used to trace execution through the call chain.
- key: string - key used to uniquely identify the credential.
- returns: (*CredentialParams, error) - found credential parameters or nil if nothing was found.
Store
Stores credential parameters into the store.
Store(ctx context.Context, correlationId string, key string, credential *CredentialParams) error
- ctx: context.Context - operation context.
- correlationId: string - (optional) transaction id used to trace execution through the call chain.
- key: string - key used to uniquely identify the credential.
- credential: *CredentialParams - credential to be stored.
- returns: error - return error if not stored