Documentation ¶
Index ¶
- Constants
- func NewKeyFromName(name string) (string, error)
- type Client
- type FlagsClient
- type MockClient
- func (c *MockClient) Create(ctx context.Context, accessToken, baseURI, name, key, projKey string) ([]byte, error)
- func (c *MockClient) Get(ctx context.Context, accessToken, baseURI, key, projKey, envKey string) ([]byte, error)
- func (c *MockClient) Update(ctx context.Context, accessToken, baseURI, key, projKey string, ...) ([]byte, error)
- type UpdateInput
Constants ¶
View Source
const MaxNameLength = 50
Variables ¶
This section is empty.
Functions ¶
func NewKeyFromName ¶
NewKeyFromName creates a valid key from the name.
Types ¶
type Client ¶
type Client interface { Create(ctx context.Context, accessToken, baseURI, name, key, projKey string) ([]byte, error) Get(ctx context.Context, accessToken, baseURI, key, projKey, envKey string) ([]byte, error) Update( ctx context.Context, accessToken, baseURI, key, projKey string, patch []UpdateInput, ) ([]byte, error) }
type FlagsClient ¶
type FlagsClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(cliVersion string) FlagsClient
func (FlagsClient) Update ¶
func (c FlagsClient) Update( ctx context.Context, accessToken, baseURI, key, projKey string, input []UpdateInput, ) ([]byte, error)
type MockClient ¶
func (*MockClient) Update ¶
func (c *MockClient) Update( ctx context.Context, accessToken, baseURI, key, projKey string, patch []UpdateInput, ) ([]byte, error)
type UpdateInput ¶
type UpdateInput struct { Op string `json:"op"` Path string `json:"path"` Value interface{} `json:"value"` }
func BuildToggleFlagPatch ¶
func BuildToggleFlagPatch(envKey string, enabled bool) []UpdateInput
Click to show internal directories.
Click to hide internal directories.