api

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const InfoNameSpace = "info"

Variables

View Source
var ErrNilValue = errors.New("value cannot be nil")
View Source
var ErrRepoExists = errors.New("repository already exists")
View Source
var ErrTypeChange = errors.New("cannot change existing feature types")

Functions

func KeyNotFoundError

func KeyNotFoundError(n string) error

Types

type Client

type Client struct {
	Store stores.IFace
	Repo  repo.IFace
	Stats *godspeed.Godspeed
	// contains filtered or unexported fields
}

func New

func New(st stores.IFace, rp repo.IFace, cfg *config.Config, stats *godspeed.Godspeed) (c *Client)

func (*Client) Commit

func (c *Client) Commit(ft *models.Feature, deleted bool) error

func (*Client) Delete

func (c *Client) Delete(key string, scope string) error

func (*Client) Get

func (c *Client) Get(key string, v interface{}) error

func (*Client) GetInfo

func (c *Client) GetInfo() (*models.Info, error)

func (*Client) InitRepo

func (c *Client) InitRepo(create bool) error

func (*Client) KVsToFeatureMap added in v0.2.2

func (c *Client) KVsToFeatureMap(kvb stores.KVBytes) (*models.FeatureMap, error)

KVsToFeatures helper for unmarshalling `KVBytes` to a `FeatureMap`

func (*Client) List

func (c *Client) List(prefix string, scope string) (models.Features, error)

func (*Client) Namespace

func (c *Client) Namespace() string

func (*Client) Push

func (c *Client) Push() error

func (*Client) SendStatEvent

func (c *Client) SendStatEvent(f *models.Feature, delete bool) error

func (*Client) Set

func (c *Client) Set(ft *models.Feature) error

func (*Client) UpdateCurrentSHA added in v0.2.2

func (c *Client) UpdateCurrentSHA() (string, error)

func (*Client) Watch

func (c *Client) Watch()

func (*Client) WriteOutputFile

func (c *Client) WriteOutputFile(kvb stores.KVBytes)

type ClientIFace

type ClientIFace interface {
	List(prefix string, scope string) (models.Features, error)
	Set(ft *models.Feature) error
	Get(key string, v interface{}) error
	Delete(key string, scope string) error
	GetInfo() (*models.Info, error)
	InitRepo(create bool) error
	Commit(ft *models.Feature, deleted bool) error
	Push() error
	UpdateCurrentSHA() (string, error)
	Watch()
	Namespace() string
}

Directories

Path Synopsis
Package ioutil2 provides extra functionality along similar lines to io/ioutil.
Package ioutil2 provides extra functionality along similar lines to io/ioutil.

Jump to

Keyboard shortcuts

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