Documentation ¶
Index ¶
- type ActivationStrategy
- type Client
- type FeatureCheckResponse
- type FeatureClient
- func (c *FeatureClient) CheckWithContext(id string, context interface{}) (FeatureCheckResponse, error)
- func (c *FeatureClient) CheckWithoutContext(id string) (FeatureCheckResponse, error)
- func (c *FeatureClient) Create(feat FeatureModel) error
- func (c *FeatureClient) Delete(id string) error
- func (c *FeatureClient) Get(id string) (FeatureModel, error)
- func (c *FeatureClient) List(page int, pageSize int) (FeaturesResponse, error)
- func (c *FeatureClient) ListAll() ([]FeatureModel, error)
- func (c *FeatureClient) Update(feat FeatureModel) error
- type FeatureModel
- type FeaturesResponse
- type Metadata
- type SwaggerClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivationStrategy ¶
type ActivationStrategy string
ActivationStrategy represents the different way to activate a feature
const ( NoStrategy ActivationStrategy = "NO_STRATEGY" ReleaseDate ActivationStrategy = "RELEASE_DATE" Script ActivationStrategy = "SCRIPT" GlobalScript ActivationStrategy = "GLOBAL_SCRIPT" )
type Client ¶
Client represents the izanami client
func (*Client) Feature ¶
func (c *Client) Feature() *FeatureClient
Feature creates a specific client for feature management
func (*Client) Swagger ¶
func (c *Client) Swagger() *SwaggerClient
Swagger creates a specific client for getting swagger.json
type FeatureCheckResponse ¶
type FeatureCheckResponse struct {
Active bool `json:"active"`
}
FeatureCheckResponse represents the hhtp response for a feature check
type FeatureClient ¶
type FeatureClient struct {
// contains filtered or unexported fields
}
FeatureClient represents a client for feature management
func (*FeatureClient) CheckWithContext ¶
func (c *FeatureClient) CheckWithContext(id string, context interface{}) (FeatureCheckResponse, error)
CheckWithContext if a feature is enable for the given context
func (*FeatureClient) CheckWithoutContext ¶
func (c *FeatureClient) CheckWithoutContext(id string) (FeatureCheckResponse, error)
CheckWithoutContext if a feature is enable
func (*FeatureClient) Create ¶
func (c *FeatureClient) Create(feat FeatureModel) error
Create a new feature
func (*FeatureClient) Delete ¶
func (c *FeatureClient) Delete(id string) error
Delete a feature by its id
func (*FeatureClient) Get ¶
func (c *FeatureClient) Get(id string) (FeatureModel, error)
Get a feature by its id
func (*FeatureClient) List ¶
func (c *FeatureClient) List(page int, pageSize int) (FeaturesResponse, error)
List features on the given page.
func (*FeatureClient) ListAll ¶
func (c *FeatureClient) ListAll() ([]FeatureModel, error)
ListAll browses all pages and returns all features
func (*FeatureClient) Update ¶
func (c *FeatureClient) Update(feat FeatureModel) error
Update the given feature
type FeatureModel ¶
type FeatureModel struct { ID string `json:"id"` Enabled bool `json:"enabled"` Parameters map[string]string `json:"parameters"` Strategy ActivationStrategy `json:"activationStrategy"` }
Feature represents a feature in izanami point of view
type FeaturesResponse ¶
type FeaturesResponse struct { Results []FeatureModel `json:"results"` Metadata Metadata `json:"metadata"` }
FeaturesResponse represents the http response for listAll
type Metadata ¶
type Metadata struct { Page int `json:"page"` PageSize int `json:"pageSize"` Count int `json:"count"` NbPages int `json:"nbPages"` }
Metadata represents metadata parts of http response
type SwaggerClient ¶
type SwaggerClient struct {
// contains filtered or unexported fields
}
SwaggerClient represents a client for swagger endpoints