Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateFeature(feature *Feature) error
- func (c *Client) DeleteFeature(projectID, featureID int64) error
- func (c *Client) GetEnvironmentFeatureState(environmentAPIKey string, featureName string) (*FeatureState, error)
- func (c *Client) GetFeature(featureUUID string) (*Feature, error)
- func (c *Client) GetProject(projectUUID string) (*Project, error)
- func (c *Client) GetProjectByID(projectID int64) (*Project, error)
- func (c *Client) UpdateFeature(feature *Feature) error
- func (c *Client) UpdateFeatureState(featureState *FeatureState) (*FeatureState, error)
- type Feature
- type FeatureState
- type FeatureStateValue
- type MultivariateOption
- type Project
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 (*Client) CreateFeature ¶ added in v0.1.0
func (*Client) DeleteFeature ¶ added in v0.1.0
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) GetFeature ¶ added in v0.1.0
func (*Client) GetProject ¶ added in v0.1.0
func (*Client) GetProjectByID ¶ added in v0.1.0
func (*Client) UpdateFeature ¶ added in v0.1.0
func (*Client) UpdateFeatureState ¶
func (c *Client) UpdateFeatureState(featureState *FeatureState) (*FeatureState, error)
Update the feature state
type Feature ¶ added in v0.1.0
type Feature struct {
Name string `json:"name"`
UUID string `json:"uuid,omitempty"`
ID *int64 `json:"id,omitempty"`
Type *string `json:"type,omitempty"`
Description *string `json:"description,omitempty"`
InitialValue string `json:"initial_value,omitempty"`
DefaultEnabled bool `json:"default_enabled,omitempty"`
IsArchived bool `json:"is_archived,omitempty"`
Owners *[]int64 `json:"owners,omitempty"`
MultivariateOptions *[]MultivariateOption `json:"multivariate_options,omitempty"`
ProjectUUID string `json:"-"`
ProjectID *int64 `json:"project,omitempty"`
}
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 MultivariateOption ¶ added in v0.1.0
type MultivariateOption struct {
Type string `json:"type"`
ID *int64 `json:"id,omitempty"`
IntegerValue *int64 `json:"integer_value,omitempty"`
StringValue *string `json:"string_value,omitempty"`
BooleanValue *bool `json:"boolean_value,omitempty"`
DefaultPercentageAllocation float64 `json:"default_percentage_allocation"`
}
Click to show internal directories.
Click to hide internal directories.
