client

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound     = fmt.Errorf("flag not found")
	ErrUnauthorized = fmt.Errorf("unauthorized")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(version, baseURL, token string) *Client

func (*Client) DeleteFlag

func (c *Client) DeleteFlag(ns, name string) error

func (*Client) GetFlag

func (c *Client) GetFlag(ns, name string) (*Flag, error)

func (*Client) ListFlags

func (c *Client) ListFlags(ns string) ([]*Flag, error)

func (*Client) SaveFlag

func (c *Client) SaveFlag(flag *Flag) (*Flag, error)

type Flag

type Flag struct {
	Namespace   string     `json:"namespace,omitempty"`
	Name        string     `json:"name,omitempty"`
	Description string     `json:"description,omitempty"`
	Rollout     []*Rollout `json:"rollout,omitempty"`
}

type Rollout

type Rollout struct {
	Percentage int  `json:"percentage,omitempty"`
	Value      bool `json:"value"`
}

type ServerError

type ServerError struct {
	// contains filtered or unexported fields
}

func (*ServerError) Error

func (err *ServerError) Error() string

Jump to

Keyboard shortcuts

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