flagsmithapi

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: BSD-3-Clause Imports: 4 Imported by: 1

README

Feature Flag, Remote Config and A/B Testing platform, Flagsmith

Flagsmith is an open source, fully featured, Feature Flag and Remote Config service. Use our hosted API, deploy to your own private cloud, or run on-premise.

Flagsmith Go Admin API Client

This project provides a very(currently) limited access to the Flagsmith Admin APIs using Master API Key.

Documentation

Index

Constants

View Source
const BaseAPIURL = "https://api.flagsmith.com/api/v1"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(masterAPIKey string, baseURL string) *Client

func (*Client) GetEnvironmentFeatureState

func (c *Client) GetEnvironmentFeatureState(environmentAPIKey string, featureName string) (*FeatureState, error)

Get the feature state associated with the environment for a given feature

func (*Client) UpdateFeatureState

func (c *Client) UpdateFeatureState(featureState *FeatureState) (*FeatureState, error)

Update the feature state

type FeatureState

type FeatureState struct {
	ID                int64              `json:"id"`
	FeatureStateValue *FeatureStateValue `json:"feature_state_value"`
	Enabled           bool               `json:"enabled"`
	Feature           int64              `json:"feature"`
	Environment       int64              `json:"environment"`
}

func (*FeatureState) UnmarshalJSON

func (fs *FeatureState) UnmarshalJSON(data []byte) error

type FeatureStateValue

type FeatureStateValue struct {
	Type         string  `json:"type"`
	StringValue  *string `json:"string_value"`
	IntegerValue *int64  `json:"integer_value"`
	BooleanValue *bool   `json:"boolean_value"`
}

Jump to

Keyboard shortcuts

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