flipt

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFliptServerError  = errors.New("something went wrong with the flipt server")
	ErrFliptFlagNotFound = errors.New("flag not found")
)

Functions

func BatchEvaluate

func BatchEvaluate(w http.ResponseWriter, r *http.Request)

Types

type EvaluateResponse

type EvaluateResponse struct {
	FlagKey string `json:"flagKey"`
	Match   bool   `json:"match"`
}

type FlagResponse

type FlagResponse struct {
	Key     string `json:"key"`
	Enabled bool   `json:"enabled"`
}

type Flipt

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

func NewFliptClient

func NewFliptClient(host string) *Flipt

func (*Flipt) IsEnabled

func (f *Flipt) IsEnabled(flagKey string, evaluate map[string]string) (bool, error)

func (*Flipt) SendRequest

func (f *Flipt) SendRequest(method, path string, body io.Reader) (*Response, error)

type Response

type Response struct {
	Status     string
	StatusCode int
	Method     string
	Body       []byte
}

Jump to

Keyboard shortcuts

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