client

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LabelNone     = "%00"
	FeaturePrefix = ".appconfig.featureflag/"
)
View Source
var (
	// KVNotFoundError The given App Configuration key-value was not found
	KVNotFoundError = AppConfigClientError{Message: "KV not found"}
	// UnexpectedError An unexpected error has occurred
	UnexpectedError = AppConfigClientError{Message: "Unexpected error"}
)

Functions

func IsNotFound added in v1.1.1

func IsNotFound(err error) bool

Types

type AppConfigClientError

type AppConfigClientError struct {
	Message string
	Info    string
	Err     error
}

AppConfigClientError Main type for AppConfigClient errors

func (AppConfigClientError) Error

func (err AppConfigClientError) Error() string

func (AppConfigClientError) Is

func (err AppConfigClientError) Is(target error) bool

Is Wether the given error is an AppConfigClientError

func (AppConfigClientError) Unwrap

func (err AppConfigClientError) Unwrap() error

type Client added in v1.0.0

type Client struct {
	*autorest.Client
	Endpoint string
}

func NewClient added in v1.0.0

func NewClient(endpoint string, authorizer autorest.Authorizer) (*Client, error)

func NewClientCli added in v1.0.0

func NewClientCli(endpoint string) (*Client, error)

func NewClientCreds added in v1.0.0

func NewClientCreds(endpoint string, clientID string, clientSecret string, tenantID string) (*Client, error)

func NewClientMsi added in v1.0.0

func NewClientMsi(endpoint string) (*Client, error)

func (*Client) DeleteFeature added in v1.1.0

func (client *Client) DeleteFeature(label string, key string) (bool, error)

func (*Client) DeleteKeyValue added in v1.0.0

func (client *Client) DeleteKeyValue(label string, key string) (bool, error)

func (*Client) GetFeature added in v1.1.0

func (client *Client) GetFeature(label string, key string) (FeatureResponse, error)

func (*Client) GetKeyValue added in v1.0.0

func (client *Client) GetKeyValue(label string, key string) (KeyValueResponse, error)

func (*Client) SetFeature added in v1.1.0

func (client *Client) SetFeature(key string, label string, enabled bool, description string) (KeyValueResponse, error)

func (*Client) SetKeyValue added in v1.0.0

func (client *Client) SetKeyValue(label string, key string, value string) (KeyValueResponse, error)

func (*Client) SetKeyValueSecret added in v1.0.0

func (client *Client) SetKeyValueSecret(key string, secretID string, label string) (KeyValueResponse, error)

type FeatureResponse added in v1.1.0

type FeatureResponse struct {
	Key          string
	Label        string
	ContentType  string `json:"content_type"`
	Description  string
	Enabled      bool
	LastModified string `json:"last_modified"`
	Tags         map[string]string
}

FeatureResponse represents a Key Value response

type KeyValueResponse

type KeyValueResponse struct {
	Key          string
	Label        string
	ContentType  string `json:"content_type"`
	Value        string
	LastModified string `json:"last_modified"`
	Tags         map[string]string
}

KeyValueResponse represents a Key Value response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL