Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateFeature(feature *Feature) error
- func (c *Client) CreateFeatureMVOption(featureMVOption *FeatureMultivariateOption) error
- func (c *Client) CreateFeatureSegment(featureSegment *FeatureSegment) error
- func (c *Client) CreateSegment(segment *Segment) error
- func (c *Client) CreateSegmentOverride(featureState *FeatureState) error
- func (c *Client) DeleteFeature(projectID, featureID int64) error
- func (c *Client) DeleteFeatureMVOption(projectID, featureID, mvOptionID int64) error
- func (c *Client) DeleteFeatureSegment(featureSegmentID int64) error
- func (c *Client) DeleteSegment(projectID, segmentID int64) error
- func (c *Client) GetEnvironment(apiKey string) (*Environment, error)
- func (c *Client) GetEnvironmentFeatureState(environmentKey string, featureID int64) (*FeatureState, error)
- func (c *Client) GetFeature(featureUUID string) (*Feature, error)
- func (c *Client) GetFeatureMVOption(featureUUID, mvOptionUUID string) (*FeatureMultivariateOption, error)
- func (c *Client) GetFeatureSegmentByID(featureSegmentID int64) (*FeatureSegment, error)
- func (c *Client) GetFeatureState(featureStateUUID string) (*FeatureState, error)
- func (c *Client) GetProject(projectUUID string) (*Project, error)
- func (c *Client) GetProjectByID(projectID int64) (*Project, error)
- func (c *Client) GetSegment(segmentUUID string) (*Segment, error)
- func (c *Client) UpdateFeature(feature *Feature) error
- func (c *Client) UpdateFeatureMVOption(featureMVOption *FeatureMultivariateOption) error
- func (c *Client) UpdateFeatureSegmentPriority(featureSegmentID, priority int64) error
- func (c *Client) UpdateFeatureState(featureState *FeatureState, updateSegmentPriority bool) error
- func (c *Client) UpdateSegment(segment *Segment) error
- type Condition
- type Environment
- type Feature
- type FeatureMultivariateOption
- type FeatureSegment
- type FeatureState
- type FeatureStateValue
- type Project
- type Rule
- type Segment
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) CreateFeatureMVOption ¶ added in v0.2.0
func (c *Client) CreateFeatureMVOption(featureMVOption *FeatureMultivariateOption) error
func (*Client) CreateFeatureSegment ¶ added in v0.4.0
func (c *Client) CreateFeatureSegment(featureSegment *FeatureSegment) error
func (*Client) CreateSegment ¶ added in v0.3.0
func (*Client) CreateSegmentOverride ¶ added in v0.4.0
func (c *Client) CreateSegmentOverride(featureState *FeatureState) error
func (*Client) DeleteFeature ¶ added in v0.1.0
func (*Client) DeleteFeatureMVOption ¶ added in v0.2.0
func (*Client) DeleteFeatureSegment ¶ added in v0.4.0
func (*Client) DeleteSegment ¶ added in v0.3.0
func (*Client) GetEnvironment ¶ added in v0.4.0
func (c *Client) GetEnvironment(apiKey string) (*Environment, error)
func (*Client) GetEnvironmentFeatureState ¶
func (c *Client) GetEnvironmentFeatureState(environmentKey string, featureID int64) (*FeatureState, error)
Get the feature state associated with the environment for a given feature
func (*Client) GetFeature ¶ added in v0.1.0
func (*Client) GetFeatureMVOption ¶ added in v0.2.0
func (c *Client) GetFeatureMVOption(featureUUID, mvOptionUUID string) (*FeatureMultivariateOption, error)
func (*Client) GetFeatureSegmentByID ¶ added in v0.4.0
func (c *Client) GetFeatureSegmentByID(featureSegmentID int64) (*FeatureSegment, error)
func (*Client) GetFeatureState ¶ added in v0.4.0
func (c *Client) GetFeatureState(featureStateUUID string) (*FeatureState, error)
func (*Client) GetProject ¶ added in v0.1.0
func (*Client) GetProjectByID ¶ added in v0.1.0
func (*Client) GetSegment ¶ added in v0.3.0
func (*Client) UpdateFeature ¶ added in v0.1.0
func (*Client) UpdateFeatureMVOption ¶ added in v0.2.0
func (c *Client) UpdateFeatureMVOption(featureMVOption *FeatureMultivariateOption) error
func (*Client) UpdateFeatureSegmentPriority ¶ added in v0.4.0
func (*Client) UpdateFeatureState ¶
func (c *Client) UpdateFeatureState(featureState *FeatureState, updateSegmentPriority bool) error
Update the feature state
func (*Client) UpdateSegment ¶ added in v0.3.0
type Environment ¶ added in v0.4.0
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"`
ProjectUUID string `json:"-"`
ProjectID *int64 `json:"project,omitempty"`
}
type FeatureMultivariateOption ¶ added in v0.2.0
type FeatureMultivariateOption struct {
ID int64 `json:"id,omitempty"`
Type string `json:"type"`
UUID string `json:"uuid,omitempty"`
FeatureID *int64 `json:"feature,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"`
FeatureUUID string `json:"-"`
ProjectID *int64 `json:"-"`
}
type FeatureSegment ¶ added in v0.4.0
type FeatureState ¶
type FeatureState struct {
ID int64 `json:"id,omitempty"`
UUID string `json:"uuid,omitempty"`
FeatureStateValue *FeatureStateValue `json:"feature_state_value"`
Enabled bool `json:"enabled"`
Feature int64 `json:"feature"`
Environment *int64 `json:"environment"`
FeatureSegment *int64 `json:"feature_segment,omitempty"`
EnvironmentKey string `json:"-"`
Segment *int64 `json:"-"`
SegmentPriority *int64 `json:"-"`
}
func (*FeatureState) UnmarshalJSON ¶
func (fs *FeatureState) UnmarshalJSON(data []byte) error
type FeatureStateValue ¶
type Segment ¶ added in v0.3.0
type Segment struct {
ID *int64 `json:"id,omitempty"`
UUID string `json:"uuid,omitempty"`
Name string `json:"name"`
Description *string `json:"description,omitempty"`
ProjectID *int64 `json:"project"`
ProjectUUID string `json:"-"`
FeatureID *int64 `json:"feature,omitempty"`
Rules []Rule `json:"rules"`
}
Click to show internal directories.
Click to hide internal directories.
