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
- type Option
- type Options
- type Setting
Constants ¶
const ( // SettingForbidden is the status code returned when a setting is forbidden. SettingForbidden = 403 // 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 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 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 retreival.
type Option ¶
type Option func(o *Options)
Option is a function that sets options for client operations.
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.