Documentation
¶
Index ¶
- Constants
- Variables
- type AccessKey
- type Client
- func NewClient(appConfiguration string, cred auth.Credential, options ...ClientOption) (*Client, error)
- func NewClientWithAccessKey(appConfiguration string, key AccessKey, options ...ClientOption) (*Client, error)
- func NewClientWithConnectionString(connectionString string, options ...ClientOption) (*Client, error)
- type ClientOption
- func WithClientLabel(label string) ClientOption
- func WithClientLabels(labels 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
- type Setting
Constants ¶
const (
// SettingNotFound is the status code returned when a setting is not found.
SettingNotFound = 404
)
Variables ¶
var ( // ErrParseConnectionString is returned when a connection string cannot be parsed. ErrParseConnectionString = errors.New("failed to parse connection string") )
Functions ¶
This section is empty.
Types ¶
type AccessKey ¶ added in v0.17.0
AccessKey contains the id and secret for access key authentication.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client contains methods to call the Azure App Config REST API and base settings for handling the requests.
func NewClient ¶
func NewClient(appConfiguration string, cred auth.Credential, options ...ClientOption) (*Client, error)
NewClient creates and returns a new *Client.
func NewClientWithAccessKey ¶ added in v0.17.0
func NewClientWithAccessKey(appConfiguration string, key AccessKey, options ...ClientOption) (*Client, error)
NewClientWithAccessKey creates and returns a new *Client with the provided access key.
func NewClientWithConnectionString ¶ added in v0.17.0
func NewClientWithConnectionString(connectionString string, options ...ClientOption) (*Client, error)
NewClientWithConnectionString creates and returns a new *Client with the provided connection string.
type ClientOption ¶
type ClientOption func(c *Client)
ClientOption is a function that sets options to *Client.
func WithClientLabel ¶ added in v0.21.0
func WithClientLabel(label string) ClientOption
WithClientLabel sets label on the setting client.
func WithClientLabels ¶ added in v0.21.0
func WithClientLabels(labels map[string]string) ClientOption
WithClientLabels sets labels on the setting client based on the provided map. The key of the map should be the setting name, and the value should be the label.
func WithCloud ¶ added in v0.14.0
func WithCloud(c cloud.Cloud) ClientOption
WithCloud sets the Azure cloud for setting retrieval.
func WithConcurrency ¶
func WithConcurrency(n int) ClientOption
WithConcurrency sets the concurrency for setting retrieval.
func WithHTTPClient ¶ added in v0.22.0
func WithHTTPClient(client request.Client) ClientOption
WithHTTPClient sets the HTTP client for setting retrieval.
func WithRetryPolicy ¶ added in v0.12.0
func WithRetryPolicy(r httpr.RetryPolicy) ClientOption
WithRetryPolicy sets the retry policy for setting retrieval.
func WithTimeout ¶
func WithTimeout(d time.Duration) ClientOption
WithTimeout sets timeout for setting retrieval.
type Option ¶
type Option func(o *Options)
Option is a function that sets options for client operations.
func WithLabel ¶
WithLabel sets label on the setting request. Overrides the label set on the client.
func WithLabels ¶ added in v0.16.0
WithLabels sets labels on the setting requests based on the provided map. The key of the map should be the setting name, and the value should be the label. Overrides the labels set on the client.