Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) AddFeatureOwners(feature *Feature, ownerIDs []int64) error
- func (c *Client) CreateEnvironment(environment *Environment) error
- func (c *Client) CreateFeature(feature *Feature) error
- func (c *Client) CreateFeatureMVOption(featureMVOption *FeatureMultivariateOption) error
- func (c *Client) CreateFeatureSegment(featureSegment *FeatureSegment) error
- func (c *Client) CreateIdentity(environmentKey string, identity *Identity) error
- func (c *Client) CreateProject(project *Project) error
- func (c *Client) CreateSegment(segment *Segment) error
- func (c *Client) CreateSegmentOverride(featureState *FeatureState) error
- func (c *Client) CreateServerSideEnvKey(environmentKey string, key *ServerSideEnvKey) error
- func (c *Client) CreateTag(tag *Tag) error
- func (c *Client) CreateTrait(environmentKey string, identityID int64, trait *Trait) error
- func (c *Client) DeleteEnvironment(apiKey string) 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) DeleteIdentity(environmentKey string, identityID int64) error
- func (c *Client) DeleteProject(projectID int64) error
- func (c *Client) DeleteSegment(projectID, segmentID int64) error
- func (c *Client) DeleteServerSideEnvKey(environmentKey string, keyID int64) error
- func (c *Client) DeleteTag(projectID, tagID int64) error
- func (c *Client) DeleteTrait(environmentKey string, identityID int64, traitID int64) error
- func (c *Client) GetEnvironment(apiKey string) (*Environment, error)
- func (c *Client) GetEnvironmentByUUID(uuid 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) GetIdentity(environmentKey string, identityID int64) (*Identity, error)
- func (c *Client) GetOrganisationByUUID(orgUUID string) (*Organisation, 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) GetServerSideEnvKeys(environmentKey string) ([]ServerSideEnvKey, error)
- func (c *Client) GetTag(projectUUID string, tagUUID string) (*Tag, error)
- func (c *Client) GetTraits(environmentKey string, identityID int64) ([]Trait, error)
- func (c *Client) RemoveFeatureOwners(feature *Feature, ownerIDs []int64) error
- func (c *Client) UpdateEnvironment(environment *Environment) 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) UpdateProject(project *Project) error
- func (c *Client) UpdateSegment(segment *Segment) error
- func (c *Client) UpdateServerSideEnvKey(environmentKey string, key *ServerSideEnvKey) error
- func (c *Client) UpdateTag(tag *Tag) error
- func (c *Client) UpdateTrait(environmentKey string, identityID int64, trait *Trait) error
- type Condition
- type Environment
- type Feature
- type FeatureMVOptionNotFoundError
- type FeatureMultivariateOption
- type FeatureNotFoundError
- type FeatureSegment
- type FeatureState
- type FeatureStateNotFoundError
- type FeatureStateValue
- type Identity
- type Organisation
- type Project
- type Rule
- type Segment
- type SegmentNotFoundError
- type ServerSideEnvKey
- type Tag
- type Trait
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) AddFeatureOwners ¶ added in v0.5.0
func (*Client) CreateEnvironment ¶ added in v0.9.0
func (c *Client) CreateEnvironment(environment *Environment) error
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) CreateIdentity ¶ added in v0.9.0
func (*Client) CreateProject ¶ added in v0.9.0
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) CreateServerSideEnvKey ¶ added in v0.9.0
func (c *Client) CreateServerSideEnvKey(environmentKey string, key *ServerSideEnvKey) error
func (*Client) CreateTrait ¶ added in v0.9.0
func (*Client) DeleteEnvironment ¶ added in v0.9.0
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) DeleteIdentity ¶ added in v0.9.0
func (*Client) DeleteProject ¶ added in v0.9.0
func (*Client) DeleteSegment ¶ added in v0.3.0
func (*Client) DeleteServerSideEnvKey ¶ added in v0.9.0
func (*Client) DeleteTrait ¶ added in v0.9.0
func (*Client) GetEnvironment ¶ added in v0.4.0
func (c *Client) GetEnvironment(apiKey string) (*Environment, error)
func (*Client) GetEnvironmentByUUID ¶ added in v0.10.0
func (c *Client) GetEnvironmentByUUID(uuid 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) GetIdentity ¶ added in v0.9.0
func (*Client) GetOrganisationByUUID ¶ added in v0.10.0
func (c *Client) GetOrganisationByUUID(orgUUID string) (*Organisation, 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) GetServerSideEnvKeys ¶ added in v0.9.0
func (c *Client) GetServerSideEnvKeys(environmentKey string) ([]ServerSideEnvKey, error)
func (*Client) RemoveFeatureOwners ¶ added in v0.5.0
func (*Client) UpdateEnvironment ¶ added in v0.9.0
func (c *Client) UpdateEnvironment(environment *Environment) error
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) UpdateProject ¶ added in v0.9.0
func (*Client) UpdateSegment ¶ added in v0.3.0
func (*Client) UpdateServerSideEnvKey ¶ added in v0.9.0
func (c *Client) UpdateServerSideEnvKey(environmentKey string, key *ServerSideEnvKey) error
type Environment ¶ added in v0.4.0
type Environment struct {
ID int64 `json:"id,omitempty"`
UUID string `json:"uuid,omitempty"`
Name string `json:"name"`
APIKey string `json:"api_key,omitempty"`
Description string `json:"description"`
ProjectID int64 `json:"project"`
AllowClientTraits bool `json:"allow_client_traits,omitempty"`
BannerText string `json:"banner_text,omitempty"`
BannerColour string `json:"banner_colour,omitempty"`
HideDisabledFlags bool `json:"hide_disabled_flags,omitempty"`
HideSensitiveData bool `json:"hide_sensitive_data,omitempty"`
UseIdentityCompositeKeyForHashing bool `json:"use_identity_composite_key_for_hashing,omitempty"`
MinimumChangeRequestApprovals int64 `json:"minimum_change_request_approvals,omitempty"`
}
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"`
Tags []int64 `json:"tags"`
ProjectUUID string `json:"-"`
ProjectID *int64 `json:"project,omitempty"`
}
func (*Feature) UnmarshalJSON ¶ added in v0.5.0
type FeatureMVOptionNotFoundError ¶ added in v0.6.0
type FeatureMVOptionNotFoundError struct {
// contains filtered or unexported fields
}
func (FeatureMVOptionNotFoundError) Error ¶ added in v0.6.0
func (e FeatureMVOptionNotFoundError) Error() string
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 FeatureNotFoundError ¶ added in v0.6.0
type FeatureNotFoundError struct {
// contains filtered or unexported fields
}
func (FeatureNotFoundError) Error ¶ added in v0.6.0
func (e FeatureNotFoundError) Error() string
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 FeatureStateNotFoundError ¶ added in v0.6.0
type FeatureStateNotFoundError struct {
// contains filtered or unexported fields
}
func (FeatureStateNotFoundError) Error ¶ added in v0.6.0
func (e FeatureStateNotFoundError) Error() string
type FeatureStateValue ¶
type Organisation ¶ added in v0.10.0
type Project ¶ added in v0.1.0
type Project struct {
ID int64 `json:"id,omitempty"`
UUID string `json:"uuid,omitempty"`
Name string `json:"name"`
Organisation int64 `json:"organisation"`
HideDisabledFlags bool `json:"hide_disabled_flags,omitempty"`
PreventFlagDefaults bool `json:"prevent_flag_defaults,omitempty"`
OnlyAllowLowerCaseFeatureNames bool `json:"only_allow_lower_case_feature_names,omitempty"`
FeatureNameRegex string `json:"feature_name_regex,omitempty"`
StaleFlagsLimitDays int64 `json:"stale_flags_limit_days,omitempty"`
EnableRealtimeUpdates bool `json:"enable_realtime_updates,omitempty"`
}
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"`
}
type SegmentNotFoundError ¶ added in v0.6.0
type SegmentNotFoundError struct {
// contains filtered or unexported fields
}
func (SegmentNotFoundError) Error ¶ added in v0.6.0
func (e SegmentNotFoundError) Error() string
type ServerSideEnvKey ¶ added in v0.9.0
type Trait ¶ added in v0.9.0
type Trait struct {
ID int64 `json:"id,omitempty"`
TraitKey string `json:"trait_key"`
ValueType string `json:"value_type"`
IntegerValue *int `json:"integer_value,omitempty"`
StringValue *string `json:"string_value,omitempty"`
BooleanValue *bool `json:"boolean_value,omitempty"`
FloatValue *float64 `json:"float_value,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.
