Documentation ¶
Index ¶
- Constants
- type Client
- type ClientOption
- func WithClientVersions(versions map[string]string) ClientOption
- func WithCloud(c cloud.Cloud) ClientOption
- func WithConcurrency(n int) ClientOption
- func WithHTTPClient(client request.Client) ClientOption
- func WithRetryPolicy(r httpr.RetryPolicy) ClientOption
- func WithTimeout(d time.Duration) ClientOption
- type Option
- type Options
- type Secret
Constants ¶
const (
// SecretNotFound is the error code returned when a secret is not found.
SecretNotFound = "SecretNotFound"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains methods to call the Azure Key Vault REST API and base settings for handling the requests.
func NewClient ¶
func NewClient(vault string, cred auth.Credential, options ...ClientOption) (*Client, error)
NewClient creates and returns a new *Client.
func (Client) GetSecrets ¶ added in v0.10.0
func (c Client) GetSecrets(ctx context.Context, names []string, options ...Option) (map[string]Secret, error)
GetSecrets gets secrets by names.
type ClientOption ¶
type ClientOption func(c *Client)
ClientOption is a function that sets options to *Client.
func WithClientVersions ¶ added in v0.22.0
func WithClientVersions(versions map[string]string) ClientOption
WithClientVersions sets secret versions on the secret client based on the provided map. The key of the map should be the secret name, and the value should be the version.
func WithCloud ¶ added in v0.14.0
func WithCloud(c cloud.Cloud) ClientOption
WithCloud sets the Azure cloud for secret retrieval.
func WithConcurrency ¶
func WithConcurrency(n int) ClientOption
WithConcurrency sets the concurrency for secret retrieval.
func WithHTTPClient ¶ added in v0.22.0
func WithHTTPClient(client request.Client) ClientOption
WithHTTPClient sets the HTTP client for secret retrieval.
func WithRetryPolicy ¶ added in v0.12.0
func WithRetryPolicy(r httpr.RetryPolicy) ClientOption
WithRetryPolicy sets the retry policy for secret retrieval.
func WithTimeout ¶
func WithTimeout(d time.Duration) ClientOption
WithTimeout sets timeout for secret retrieval.
type Option ¶ added in v0.10.0
type Option func(o *Options)
Option is a function that sets options for client operations.
func WithVersions ¶ added in v0.22.0
WithVersions sets secret versions on the secret requests based on the provided map. The key of the map should be the secret name, and the value should be the version. Overrides the versions set on the client.