Documentation
¶
Overview ¶
Package rest provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Package rest provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (swagger *openapi3.T, err error)
- func NewAuthenticateProxyKeyRequest(server string, body AuthenticateProxyKeyJSONRequestBody) (*http.Request, error)
- func NewAuthenticateProxyKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewAuthenticateRequest(server string, body AuthenticateJSONRequestBody) (*http.Request, error)
- func NewAuthenticateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewGetAllSegmentsRequest(server string, environmentUUID string, params *GetAllSegmentsParams) (*http.Request, error)
- func NewGetEvaluationByIdentifierRequest(server string, environmentUUID string, target string, feature string, ...) (*http.Request, error)
- func NewGetEvaluationsRequest(server string, environmentUUID string, target string, ...) (*http.Request, error)
- func NewGetFeatureConfigByIdentifierRequest(server string, environmentUUID string, identifier string, ...) (*http.Request, error)
- func NewGetFeatureConfigRequest(server string, environmentUUID string, params *GetFeatureConfigParams) (*http.Request, error)
- func NewGetProxyConfigRequest(server string, params *GetProxyConfigParams) (*http.Request, error)
- func NewGetSegmentByIdentifierRequest(server string, environmentUUID string, identifier string, ...) (*http.Request, error)
- func NewPostMetricsRequest(server string, environmentUUID EnvironmentPathParam, params *PostMetricsParams, ...) (*http.Request, error)
- func NewPostMetricsRequestWithBody(server string, environmentUUID EnvironmentPathParam, params *PostMetricsParams, ...) (*http.Request, error)
- func NewStreamRequest(server string, params *StreamParams) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type AuthenticateJSONRequestBody
- type AuthenticateProxyKeyJSONBody
- type AuthenticateProxyKeyJSONRequestBody
- type AuthenticateProxyKeyResponse
- type AuthenticateResponse
- type AuthenticationRequest
- type AuthenticationResponse
- type BadRequest
- type Clause
- type Client
- func (c *Client) Authenticate(ctx context.Context, body AuthenticateJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AuthenticateProxyKey(ctx context.Context, body AuthenticateProxyKeyJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) AuthenticateProxyKeyWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) AuthenticateWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) GetAllSegments(ctx context.Context, environmentUUID string, params *GetAllSegmentsParams, ...) (*http.Response, error)
- func (c *Client) GetEvaluationByIdentifier(ctx context.Context, environmentUUID string, target string, feature string, ...) (*http.Response, error)
- func (c *Client) GetEvaluations(ctx context.Context, environmentUUID string, target string, ...) (*http.Response, error)
- func (c *Client) GetFeatureConfig(ctx context.Context, environmentUUID string, params *GetFeatureConfigParams, ...) (*http.Response, error)
- func (c *Client) GetFeatureConfigByIdentifier(ctx context.Context, environmentUUID string, identifier string, ...) (*http.Response, error)
- func (c *Client) GetProxyConfig(ctx context.Context, params *GetProxyConfigParams, ...) (*http.Response, error)
- func (c *Client) GetSegmentByIdentifier(ctx context.Context, environmentUUID string, identifier string, ...) (*http.Response, error)
- func (c *Client) PostMetrics(ctx context.Context, environmentUUID EnvironmentPathParam, ...) (*http.Response, error)
- func (c *Client) PostMetricsWithBody(ctx context.Context, environmentUUID EnvironmentPathParam, ...) (*http.Response, error)
- func (c *Client) Stream(ctx context.Context, params *StreamParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) AuthenticateProxyKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AuthenticateProxyKeyResponse, error)
- func (c *ClientWithResponses) AuthenticateProxyKeyWithResponse(ctx context.Context, body AuthenticateProxyKeyJSONRequestBody, ...) (*AuthenticateProxyKeyResponse, error)
- func (c *ClientWithResponses) AuthenticateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*AuthenticateResponse, error)
- func (c *ClientWithResponses) AuthenticateWithResponse(ctx context.Context, body AuthenticateJSONRequestBody, ...) (*AuthenticateResponse, error)
- func (c *ClientWithResponses) GetAllSegmentsWithResponse(ctx context.Context, environmentUUID string, params *GetAllSegmentsParams, ...) (*GetAllSegmentsResponse, error)
- func (c *ClientWithResponses) GetEvaluationByIdentifierWithResponse(ctx context.Context, environmentUUID string, target string, feature string, ...) (*GetEvaluationByIdentifierResponse, error)
- func (c *ClientWithResponses) GetEvaluationsWithResponse(ctx context.Context, environmentUUID string, target string, ...) (*GetEvaluationsResponse, error)
- func (c *ClientWithResponses) GetFeatureConfigByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, ...) (*GetFeatureConfigByIdentifierResponse, error)
- func (c *ClientWithResponses) GetFeatureConfigWithResponse(ctx context.Context, environmentUUID string, params *GetFeatureConfigParams, ...) (*GetFeatureConfigResponse, error)
- func (c *ClientWithResponses) GetProxyConfigWithResponse(ctx context.Context, params *GetProxyConfigParams, ...) (*GetProxyConfigResponse, error)
- func (c *ClientWithResponses) GetSegmentByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, ...) (*GetSegmentByIdentifierResponse, error)
- func (c *ClientWithResponses) PostMetricsWithBodyWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, ...) (*PostMetricsResponse, error)
- func (c *ClientWithResponses) PostMetricsWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, ...) (*PostMetricsResponse, error)
- func (c *ClientWithResponses) StreamWithResponse(ctx context.Context, params *StreamParams, reqEditors ...RequestEditorFn) (*StreamResponse, error)
- type ClientWithResponsesInterface
- type ClusterQueryOptionalParam
- type Distribution
- type EnvironmentPathParam
- type Error
- type Evaluation
- type Evaluations
- type FeatureConfig
- type FeatureConfigKind
- type FeatureState
- type GetAllSegmentsParams
- type GetAllSegmentsResponse
- type GetEvaluationByIdentifierParams
- type GetEvaluationByIdentifierResponse
- type GetEvaluationsParams
- type GetEvaluationsResponse
- type GetFeatureConfigByIdentifierParams
- type GetFeatureConfigByIdentifierResponse
- type GetFeatureConfigParams
- type GetFeatureConfigResponse
- type GetProxyConfigParams
- type GetProxyConfigResponse
- type GetSegmentByIdentifierParams
- type GetSegmentByIdentifierResponse
- type GroupServingRule
- type HttpRequestDoer
- type InternalServerError
- type KeyValue
- type Metrics
- type MetricsData
- type MetricsDataMetricsType
- type NotFound
- type PageNumber
- type PageSize
- type Pagination
- type PostMetricsJSONRequestBody
- type PostMetricsParams
- type PostMetricsResponse
- type Prerequisite
- type ProxyConfig
- type ProxyConfigResponse
- type RequestEditorFn
- type Segment
- type SegmentRulesV2QueryParam
- type Serve
- type ServingRule
- type StreamParams
- type StreamResponse
- type Tag
- type Target
- type TargetData
- type TargetMap
- type Unauthenticated
- type Unauthorized
- type Variation
- type VariationMap
- type WeightedVariation
Constants ¶
const ( ApiKeyAuthScopes = "ApiKeyAuth.Scopes" BearerAuthScopes = "BearerAuth.Scopes" )
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func NewAuthenticateProxyKeyRequest ¶ added in v0.1.21
func NewAuthenticateProxyKeyRequest(server string, body AuthenticateProxyKeyJSONRequestBody) (*http.Request, error)
NewAuthenticateProxyKeyRequest calls the generic AuthenticateProxyKey builder with application/json body
func NewAuthenticateProxyKeyRequestWithBody ¶ added in v0.1.21
func NewAuthenticateProxyKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewAuthenticateProxyKeyRequestWithBody generates requests for AuthenticateProxyKey with any type of body
func NewAuthenticateRequest ¶
func NewAuthenticateRequest(server string, body AuthenticateJSONRequestBody) (*http.Request, error)
NewAuthenticateRequest calls the generic Authenticate builder with application/json body
func NewAuthenticateRequestWithBody ¶
func NewAuthenticateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
NewAuthenticateRequestWithBody generates requests for Authenticate with any type of body
func NewGetAllSegmentsRequest ¶
func NewGetAllSegmentsRequest(server string, environmentUUID string, params *GetAllSegmentsParams) (*http.Request, error)
NewGetAllSegmentsRequest generates requests for GetAllSegments
func NewGetEvaluationByIdentifierRequest ¶
func NewGetEvaluationByIdentifierRequest(server string, environmentUUID string, target string, feature string, params *GetEvaluationByIdentifierParams) (*http.Request, error)
NewGetEvaluationByIdentifierRequest generates requests for GetEvaluationByIdentifier
func NewGetEvaluationsRequest ¶
func NewGetEvaluationsRequest(server string, environmentUUID string, target string, params *GetEvaluationsParams) (*http.Request, error)
NewGetEvaluationsRequest generates requests for GetEvaluations
func NewGetFeatureConfigByIdentifierRequest ¶
func NewGetFeatureConfigByIdentifierRequest(server string, environmentUUID string, identifier string, params *GetFeatureConfigByIdentifierParams) (*http.Request, error)
NewGetFeatureConfigByIdentifierRequest generates requests for GetFeatureConfigByIdentifier
func NewGetFeatureConfigRequest ¶
func NewGetFeatureConfigRequest(server string, environmentUUID string, params *GetFeatureConfigParams) (*http.Request, error)
NewGetFeatureConfigRequest generates requests for GetFeatureConfig
func NewGetProxyConfigRequest ¶ added in v0.1.21
func NewGetProxyConfigRequest(server string, params *GetProxyConfigParams) (*http.Request, error)
NewGetProxyConfigRequest generates requests for GetProxyConfig
func NewGetSegmentByIdentifierRequest ¶
func NewGetSegmentByIdentifierRequest(server string, environmentUUID string, identifier string, params *GetSegmentByIdentifierParams) (*http.Request, error)
NewGetSegmentByIdentifierRequest generates requests for GetSegmentByIdentifier
func NewPostMetricsRequest ¶ added in v0.1.21
func NewPostMetricsRequest(server string, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody) (*http.Request, error)
NewPostMetricsRequest calls the generic PostMetrics builder with application/json body
func NewPostMetricsRequestWithBody ¶ added in v0.1.21
func NewPostMetricsRequestWithBody(server string, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader) (*http.Request, error)
NewPostMetricsRequestWithBody generates requests for PostMetrics with any type of body
func NewStreamRequest ¶
func NewStreamRequest(server string, params *StreamParams) (*http.Request, error)
NewStreamRequest generates requests for Stream
Types ¶
type AuthenticateJSONRequestBody ¶
type AuthenticateJSONRequestBody AuthenticationRequest
AuthenticateJSONRequestBody defines body for Authenticate for application/json ContentType.
type AuthenticateProxyKeyJSONBody ¶ added in v0.1.21
type AuthenticateProxyKeyJSONBody struct {
ProxyKey string `json:"proxyKey"`
}
AuthenticateProxyKeyJSONBody defines parameters for AuthenticateProxyKey.
type AuthenticateProxyKeyJSONRequestBody ¶ added in v0.1.21
type AuthenticateProxyKeyJSONRequestBody AuthenticateProxyKeyJSONBody
AuthenticateProxyKeyJSONRequestBody defines body for AuthenticateProxyKey for application/json ContentType.
type AuthenticateProxyKeyResponse ¶ added in v0.1.21
type AuthenticateProxyKeyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AuthenticationResponse
JSON401 *Unauthenticated
JSON403 *Unauthorized
JSON404 *NotFound
JSON500 *InternalServerError
}
func ParseAuthenticateProxyKeyResponse ¶ added in v0.1.21
func ParseAuthenticateProxyKeyResponse(rsp *http.Response) (*AuthenticateProxyKeyResponse, error)
ParseAuthenticateProxyKeyResponse parses an HTTP response from a AuthenticateProxyKeyWithResponse call
func (AuthenticateProxyKeyResponse) Status ¶ added in v0.1.21
func (r AuthenticateProxyKeyResponse) Status() string
Status returns HTTPResponse.Status
func (AuthenticateProxyKeyResponse) StatusCode ¶ added in v0.1.21
func (r AuthenticateProxyKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AuthenticateResponse ¶
type AuthenticateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AuthenticationResponse
JSON401 *Unauthenticated
JSON403 *Unauthorized
JSON404 *NotFound
JSON500 *InternalServerError
}
func ParseAuthenticateResponse ¶
func ParseAuthenticateResponse(rsp *http.Response) (*AuthenticateResponse, error)
ParseAuthenticateResponse parses an HTTP response from a AuthenticateWithResponse call
func (AuthenticateResponse) Status ¶
func (r AuthenticateResponse) Status() string
Status returns HTTPResponse.Status
func (AuthenticateResponse) StatusCode ¶
func (r AuthenticateResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AuthenticationRequest ¶
type AuthenticationRequest struct {
ApiKey string `json:"apiKey"`
Target *struct {
Anonymous *bool `json:"anonymous,omitempty"`
Attributes *map[string]interface{} `json:"attributes,omitempty"`
Identifier string `json:"identifier"`
Name *string `json:"name,omitempty"`
} `json:"target,omitempty"`
}
AuthenticationRequest defines model for AuthenticationRequest.
type AuthenticationResponse ¶
type AuthenticationResponse struct {
AuthToken string `json:"authToken"`
}
AuthenticationResponse defines model for AuthenticationResponse.
type Clause ¶
type Clause struct {
// Attribute The attribute to use in the clause. This can be any target attribute
Attribute string `json:"attribute"`
// Id The unique ID for the clause
Id *string `json:"id,omitempty"`
// Negate Is the operation negated?
Negate bool `json:"negate"`
// Op The type of operation such as equals, starts_with, contains
Op string `json:"op"`
// Values The values that are compared against the operator
Values []string `json:"values"`
}
Clause A clause describes what conditions are used to evaluate a flag
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) Authenticate ¶
func (c *Client) Authenticate(ctx context.Context, body AuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) AuthenticateProxyKey ¶ added in v0.1.21
func (c *Client) AuthenticateProxyKey(ctx context.Context, body AuthenticateProxyKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) AuthenticateProxyKeyWithBody ¶ added in v0.1.21
func (*Client) AuthenticateWithBody ¶
func (*Client) GetAllSegments ¶
func (c *Client) GetAllSegments(ctx context.Context, environmentUUID string, params *GetAllSegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetEvaluationByIdentifier ¶
func (*Client) GetEvaluations ¶
func (c *Client) GetEvaluations(ctx context.Context, environmentUUID string, target string, params *GetEvaluationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetFeatureConfig ¶
func (c *Client) GetFeatureConfig(ctx context.Context, environmentUUID string, params *GetFeatureConfigParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetFeatureConfigByIdentifier ¶
func (c *Client) GetFeatureConfigByIdentifier(ctx context.Context, environmentUUID string, identifier string, params *GetFeatureConfigByIdentifierParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetProxyConfig ¶ added in v0.1.21
func (c *Client) GetProxyConfig(ctx context.Context, params *GetProxyConfigParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) GetSegmentByIdentifier ¶
func (c *Client) GetSegmentByIdentifier(ctx context.Context, environmentUUID string, identifier string, params *GetSegmentByIdentifierParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostMetrics ¶ added in v0.1.21
func (c *Client) PostMetrics(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostMetricsWithBody ¶ added in v0.1.21
func (c *Client) PostMetricsWithBody(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) Stream ¶
func (c *Client) Stream(ctx context.Context, params *StreamParams, reqEditors ...RequestEditorFn) (*http.Response, error)
type ClientInterface ¶
type ClientInterface interface {
// AuthenticateWithBody request with any body
AuthenticateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
Authenticate(ctx context.Context, body AuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetFeatureConfig request
GetFeatureConfig(ctx context.Context, environmentUUID string, params *GetFeatureConfigParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetFeatureConfigByIdentifier request
GetFeatureConfigByIdentifier(ctx context.Context, environmentUUID string, identifier string, params *GetFeatureConfigByIdentifierParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetAllSegments request
GetAllSegments(ctx context.Context, environmentUUID string, params *GetAllSegmentsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSegmentByIdentifier request
GetSegmentByIdentifier(ctx context.Context, environmentUUID string, identifier string, params *GetSegmentByIdentifierParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetEvaluations request
GetEvaluations(ctx context.Context, environmentUUID string, target string, params *GetEvaluationsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetEvaluationByIdentifier request
GetEvaluationByIdentifier(ctx context.Context, environmentUUID string, target string, feature string, params *GetEvaluationByIdentifierParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// PostMetricsWithBody request with any body
PostMetricsWithBody(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
PostMetrics(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// AuthenticateProxyKeyWithBody request with any body
AuthenticateProxyKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
AuthenticateProxyKey(ctx context.Context, body AuthenticateProxyKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetProxyConfig request
GetProxyConfig(ctx context.Context, params *GetProxyConfigParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// Stream request
Stream(ctx context.Context, params *StreamParams, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) AuthenticateProxyKeyWithBodyWithResponse ¶ added in v0.1.21
func (c *ClientWithResponses) AuthenticateProxyKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateProxyKeyResponse, error)
AuthenticateProxyKeyWithBodyWithResponse request with arbitrary body returning *AuthenticateProxyKeyResponse
func (*ClientWithResponses) AuthenticateProxyKeyWithResponse ¶ added in v0.1.21
func (c *ClientWithResponses) AuthenticateProxyKeyWithResponse(ctx context.Context, body AuthenticateProxyKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateProxyKeyResponse, error)
func (*ClientWithResponses) AuthenticateWithBodyWithResponse ¶
func (c *ClientWithResponses) AuthenticateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateResponse, error)
AuthenticateWithBodyWithResponse request with arbitrary body returning *AuthenticateResponse
func (*ClientWithResponses) AuthenticateWithResponse ¶
func (c *ClientWithResponses) AuthenticateWithResponse(ctx context.Context, body AuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateResponse, error)
func (*ClientWithResponses) GetAllSegmentsWithResponse ¶
func (c *ClientWithResponses) GetAllSegmentsWithResponse(ctx context.Context, environmentUUID string, params *GetAllSegmentsParams, reqEditors ...RequestEditorFn) (*GetAllSegmentsResponse, error)
GetAllSegmentsWithResponse request returning *GetAllSegmentsResponse
func (*ClientWithResponses) GetEvaluationByIdentifierWithResponse ¶
func (c *ClientWithResponses) GetEvaluationByIdentifierWithResponse(ctx context.Context, environmentUUID string, target string, feature string, params *GetEvaluationByIdentifierParams, reqEditors ...RequestEditorFn) (*GetEvaluationByIdentifierResponse, error)
GetEvaluationByIdentifierWithResponse request returning *GetEvaluationByIdentifierResponse
func (*ClientWithResponses) GetEvaluationsWithResponse ¶
func (c *ClientWithResponses) GetEvaluationsWithResponse(ctx context.Context, environmentUUID string, target string, params *GetEvaluationsParams, reqEditors ...RequestEditorFn) (*GetEvaluationsResponse, error)
GetEvaluationsWithResponse request returning *GetEvaluationsResponse
func (*ClientWithResponses) GetFeatureConfigByIdentifierWithResponse ¶
func (c *ClientWithResponses) GetFeatureConfigByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, params *GetFeatureConfigByIdentifierParams, reqEditors ...RequestEditorFn) (*GetFeatureConfigByIdentifierResponse, error)
GetFeatureConfigByIdentifierWithResponse request returning *GetFeatureConfigByIdentifierResponse
func (*ClientWithResponses) GetFeatureConfigWithResponse ¶
func (c *ClientWithResponses) GetFeatureConfigWithResponse(ctx context.Context, environmentUUID string, params *GetFeatureConfigParams, reqEditors ...RequestEditorFn) (*GetFeatureConfigResponse, error)
GetFeatureConfigWithResponse request returning *GetFeatureConfigResponse
func (*ClientWithResponses) GetProxyConfigWithResponse ¶ added in v0.1.21
func (c *ClientWithResponses) GetProxyConfigWithResponse(ctx context.Context, params *GetProxyConfigParams, reqEditors ...RequestEditorFn) (*GetProxyConfigResponse, error)
GetProxyConfigWithResponse request returning *GetProxyConfigResponse
func (*ClientWithResponses) GetSegmentByIdentifierWithResponse ¶
func (c *ClientWithResponses) GetSegmentByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, params *GetSegmentByIdentifierParams, reqEditors ...RequestEditorFn) (*GetSegmentByIdentifierResponse, error)
GetSegmentByIdentifierWithResponse request returning *GetSegmentByIdentifierResponse
func (*ClientWithResponses) PostMetricsWithBodyWithResponse ¶ added in v0.1.21
func (c *ClientWithResponses) PostMetricsWithBodyWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error)
PostMetricsWithBodyWithResponse request with arbitrary body returning *PostMetricsResponse
func (*ClientWithResponses) PostMetricsWithResponse ¶ added in v0.1.21
func (c *ClientWithResponses) PostMetricsWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error)
func (*ClientWithResponses) StreamWithResponse ¶
func (c *ClientWithResponses) StreamWithResponse(ctx context.Context, params *StreamParams, reqEditors ...RequestEditorFn) (*StreamResponse, error)
StreamWithResponse request returning *StreamResponse
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// AuthenticateWithBodyWithResponse request with any body
AuthenticateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateResponse, error)
AuthenticateWithResponse(ctx context.Context, body AuthenticateJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateResponse, error)
// GetFeatureConfigWithResponse request
GetFeatureConfigWithResponse(ctx context.Context, environmentUUID string, params *GetFeatureConfigParams, reqEditors ...RequestEditorFn) (*GetFeatureConfigResponse, error)
// GetFeatureConfigByIdentifierWithResponse request
GetFeatureConfigByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, params *GetFeatureConfigByIdentifierParams, reqEditors ...RequestEditorFn) (*GetFeatureConfigByIdentifierResponse, error)
// GetAllSegmentsWithResponse request
GetAllSegmentsWithResponse(ctx context.Context, environmentUUID string, params *GetAllSegmentsParams, reqEditors ...RequestEditorFn) (*GetAllSegmentsResponse, error)
// GetSegmentByIdentifierWithResponse request
GetSegmentByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, params *GetSegmentByIdentifierParams, reqEditors ...RequestEditorFn) (*GetSegmentByIdentifierResponse, error)
// GetEvaluationsWithResponse request
GetEvaluationsWithResponse(ctx context.Context, environmentUUID string, target string, params *GetEvaluationsParams, reqEditors ...RequestEditorFn) (*GetEvaluationsResponse, error)
// GetEvaluationByIdentifierWithResponse request
GetEvaluationByIdentifierWithResponse(ctx context.Context, environmentUUID string, target string, feature string, params *GetEvaluationByIdentifierParams, reqEditors ...RequestEditorFn) (*GetEvaluationByIdentifierResponse, error)
// PostMetricsWithBodyWithResponse request with any body
PostMetricsWithBodyWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error)
PostMetricsWithResponse(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostMetricsResponse, error)
// AuthenticateProxyKeyWithBodyWithResponse request with any body
AuthenticateProxyKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AuthenticateProxyKeyResponse, error)
AuthenticateProxyKeyWithResponse(ctx context.Context, body AuthenticateProxyKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*AuthenticateProxyKeyResponse, error)
// GetProxyConfigWithResponse request
GetProxyConfigWithResponse(ctx context.Context, params *GetProxyConfigParams, reqEditors ...RequestEditorFn) (*GetProxyConfigResponse, error)
// StreamWithResponse request
StreamWithResponse(ctx context.Context, params *StreamParams, reqEditors ...RequestEditorFn) (*StreamResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ClusterQueryOptionalParam ¶ added in v0.1.21
type ClusterQueryOptionalParam string
ClusterQueryOptionalParam defines model for clusterQueryOptionalParam.
type Distribution ¶
type Distribution struct {
// BucketBy The attribute to use when distributing targets across buckets
BucketBy string `json:"bucketBy"`
// Variations A list of variations and the weight that should be given to each
Variations []WeightedVariation `json:"variations"`
}
Distribution Describes a distribution rule
type EnvironmentPathParam ¶ added in v0.1.21
type EnvironmentPathParam string
EnvironmentPathParam defines model for environmentPathParam.
type Error ¶
type Error struct {
// Code The http error code
Code string `json:"code"`
// Details Additional details about the error
Details *map[string]interface{} `json:"details,omitempty"`
// Message The reason the request failed
Message string `json:"message"`
}
Error defines model for Error.
type Evaluation ¶
type Evaluation struct {
Flag string `json:"flag"`
Identifier *string `json:"identifier,omitempty"`
Kind string `json:"kind"`
Value string `json:"value"`
}
Evaluation defines model for Evaluation.
type FeatureConfig ¶
type FeatureConfig struct {
// DefaultServe Describe the distribution rule and the variation that should be served to the target
DefaultServe Serve `json:"defaultServe"`
Environment string `json:"environment"`
Feature string `json:"feature"`
Kind FeatureConfigKind `json:"kind"`
OffVariation string `json:"offVariation"`
Prerequisites *[]Prerequisite `json:"prerequisites,omitempty"`
Project string `json:"project"`
Rules *[]ServingRule `json:"rules,omitempty"`
// State The state of a flag either off or on
State FeatureState `json:"state"`
VariationToTargetMap *[]VariationMap `json:"variationToTargetMap,omitempty"`
Variations []Variation `json:"variations"`
Version *int64 `json:"version,omitempty"`
}
FeatureConfig defines model for FeatureConfig.
type FeatureConfigKind ¶ added in v0.1.0
type FeatureConfigKind string
FeatureConfigKind defines model for FeatureConfig.Kind.
const ( FeatureConfigKindBoolean FeatureConfigKind = "boolean" FeatureConfigKindInt FeatureConfigKind = "int" FeatureConfigKindJson FeatureConfigKind = "json" FeatureConfigKindString FeatureConfigKind = "string" )
Defines values for FeatureConfigKind.
type FeatureState ¶
type FeatureState string
FeatureState The state of a flag either off or on
const ( FeatureStateOff FeatureState = "off" FeatureStateOn FeatureState = "on" )
Defines values for FeatureState.
type GetAllSegmentsParams ¶ added in v0.1.21
type GetAllSegmentsParams struct {
// Cluster Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
// Rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules.
Rules *SegmentRulesV2QueryParam `form:"rules,omitempty" json:"rules,omitempty"`
}
GetAllSegmentsParams defines parameters for GetAllSegments.
type GetAllSegmentsResponse ¶
type GetAllSegmentsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]Segment
JSON401 *Unauthenticated
JSON403 *Unauthorized
JSON404 *NotFound
JSON500 *InternalServerError
}
func ParseGetAllSegmentsResponse ¶
func ParseGetAllSegmentsResponse(rsp *http.Response) (*GetAllSegmentsResponse, error)
ParseGetAllSegmentsResponse parses an HTTP response from a GetAllSegmentsWithResponse call
func (GetAllSegmentsResponse) Status ¶
func (r GetAllSegmentsResponse) Status() string
Status returns HTTPResponse.Status
func (GetAllSegmentsResponse) StatusCode ¶
func (r GetAllSegmentsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetEvaluationByIdentifierParams ¶ added in v0.1.21
type GetEvaluationByIdentifierParams struct {
// Cluster Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
}
GetEvaluationByIdentifierParams defines parameters for GetEvaluationByIdentifier.
type GetEvaluationByIdentifierResponse ¶
type GetEvaluationByIdentifierResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Evaluation
}
func ParseGetEvaluationByIdentifierResponse ¶
func ParseGetEvaluationByIdentifierResponse(rsp *http.Response) (*GetEvaluationByIdentifierResponse, error)
ParseGetEvaluationByIdentifierResponse parses an HTTP response from a GetEvaluationByIdentifierWithResponse call
func (GetEvaluationByIdentifierResponse) Status ¶
func (r GetEvaluationByIdentifierResponse) Status() string
Status returns HTTPResponse.Status
func (GetEvaluationByIdentifierResponse) StatusCode ¶
func (r GetEvaluationByIdentifierResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetEvaluationsParams ¶ added in v0.1.21
type GetEvaluationsParams struct {
// Cluster Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
}
GetEvaluationsParams defines parameters for GetEvaluations.
type GetEvaluationsResponse ¶
type GetEvaluationsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *struct {
// Embedded struct due to allOf(#/components/schemas/Pagination)
Pagination `yaml:",inline"`
// Embedded struct due to allOf(#/components/schemas/Evaluations)
Evaluations `yaml:",inline"`
}
}
func ParseGetEvaluationsResponse ¶
func ParseGetEvaluationsResponse(rsp *http.Response) (*GetEvaluationsResponse, error)
ParseGetEvaluationsResponse parses an HTTP response from a GetEvaluationsWithResponse call
func (GetEvaluationsResponse) Status ¶
func (r GetEvaluationsResponse) Status() string
Status returns HTTPResponse.Status
func (GetEvaluationsResponse) StatusCode ¶
func (r GetEvaluationsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetFeatureConfigByIdentifierParams ¶ added in v0.1.21
type GetFeatureConfigByIdentifierParams struct {
// Cluster Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
}
GetFeatureConfigByIdentifierParams defines parameters for GetFeatureConfigByIdentifier.
type GetFeatureConfigByIdentifierResponse ¶
type GetFeatureConfigByIdentifierResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *FeatureConfig
}
func ParseGetFeatureConfigByIdentifierResponse ¶
func ParseGetFeatureConfigByIdentifierResponse(rsp *http.Response) (*GetFeatureConfigByIdentifierResponse, error)
ParseGetFeatureConfigByIdentifierResponse parses an HTTP response from a GetFeatureConfigByIdentifierWithResponse call
func (GetFeatureConfigByIdentifierResponse) Status ¶
func (r GetFeatureConfigByIdentifierResponse) Status() string
Status returns HTTPResponse.Status
func (GetFeatureConfigByIdentifierResponse) StatusCode ¶
func (r GetFeatureConfigByIdentifierResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetFeatureConfigParams ¶ added in v0.1.21
type GetFeatureConfigParams struct {
// Cluster Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
}
GetFeatureConfigParams defines parameters for GetFeatureConfig.
type GetFeatureConfigResponse ¶
type GetFeatureConfigResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *[]FeatureConfig
}
func ParseGetFeatureConfigResponse ¶
func ParseGetFeatureConfigResponse(rsp *http.Response) (*GetFeatureConfigResponse, error)
ParseGetFeatureConfigResponse parses an HTTP response from a GetFeatureConfigWithResponse call
func (GetFeatureConfigResponse) Status ¶
func (r GetFeatureConfigResponse) Status() string
Status returns HTTPResponse.Status
func (GetFeatureConfigResponse) StatusCode ¶
func (r GetFeatureConfigResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetProxyConfigParams ¶ added in v0.1.21
type GetProxyConfigParams struct {
// PageNumber PageNumber
PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"`
// PageSize PageSize
PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`
// Cluster Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
// Environment Accepts an EnvironmentID. If this is provided then the endpoint will only return config for this environment. If this is left empty then the Proxy will return config for all environments associated with the Proxy Key.
Environment *string `form:"environment,omitempty" json:"environment,omitempty"`
// Key Accpets a Proxy Key.
Key string `form:"key" json:"key"`
}
GetProxyConfigParams defines parameters for GetProxyConfig.
type GetProxyConfigResponse ¶ added in v0.1.21
type GetProxyConfigResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ProxyConfigResponse
JSON400 *BadRequest
JSON401 *Unauthenticated
JSON403 *Unauthorized
JSON404 *NotFound
JSON500 *InternalServerError
}
func ParseGetProxyConfigResponse ¶ added in v0.1.21
func ParseGetProxyConfigResponse(rsp *http.Response) (*GetProxyConfigResponse, error)
ParseGetProxyConfigResponse parses an HTTP response from a GetProxyConfigWithResponse call
func (GetProxyConfigResponse) Status ¶ added in v0.1.21
func (r GetProxyConfigResponse) Status() string
Status returns HTTPResponse.Status
func (GetProxyConfigResponse) StatusCode ¶ added in v0.1.21
func (r GetProxyConfigResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSegmentByIdentifierParams ¶ added in v0.1.21
type GetSegmentByIdentifierParams struct {
// Cluster Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
// Rules When set to rules=v2 will return AND rule compatible serving_rules field. When not set or set to any other value will return old rules field only compatible with OR rules.
Rules *SegmentRulesV2QueryParam `form:"rules,omitempty" json:"rules,omitempty"`
}
GetSegmentByIdentifierParams defines parameters for GetSegmentByIdentifier.
type GetSegmentByIdentifierResponse ¶
type GetSegmentByIdentifierResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *Segment
JSON401 *Unauthenticated
JSON403 *Unauthorized
JSON404 *NotFound
JSON500 *InternalServerError
}
func ParseGetSegmentByIdentifierResponse ¶
func ParseGetSegmentByIdentifierResponse(rsp *http.Response) (*GetSegmentByIdentifierResponse, error)
ParseGetSegmentByIdentifierResponse parses an HTTP response from a GetSegmentByIdentifierWithResponse call
func (GetSegmentByIdentifierResponse) Status ¶
func (r GetSegmentByIdentifierResponse) Status() string
Status returns HTTPResponse.Status
func (GetSegmentByIdentifierResponse) StatusCode ¶
func (r GetSegmentByIdentifierResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GroupServingRule ¶ added in v0.1.21
type GroupServingRule struct {
// Clauses A list of clauses to use in the rule
Clauses []Clause `json:"clauses"`
// Priority The rules priority relative to other rules. The rules are evaluated in order with 1 being the highest
Priority int `json:"priority"`
// RuleId The unique identifier for this rule
RuleId string `json:"ruleId"`
}
GroupServingRule The rule used to determine what variation to serve to a target
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InternalServerError ¶
type InternalServerError Error
InternalServerError defines model for InternalServerError.
type Metrics ¶ added in v0.1.21
type Metrics struct {
MetricsData *[]MetricsData `json:"metricsData,omitempty"`
TargetData *[]TargetData `json:"targetData,omitempty"`
}
Metrics defines model for Metrics.
type MetricsData ¶ added in v0.1.21
type MetricsData struct {
Attributes []KeyValue `json:"attributes"`
Count int `json:"count"`
// MetricsType This can be of type FeatureMetrics
MetricsType MetricsDataMetricsType `json:"metricsType"`
// Timestamp time at when this data was recorded
Timestamp int64 `json:"timestamp"`
}
MetricsData defines model for MetricsData.
type MetricsDataMetricsType ¶ added in v0.1.21
type MetricsDataMetricsType string
MetricsDataMetricsType This can be of type FeatureMetrics
const (
MetricsDataMetricsTypeFFMETRICS MetricsDataMetricsType = "FFMETRICS"
)
Defines values for MetricsDataMetricsType.
type Pagination ¶
type Pagination struct {
// ItemCount The total number of items
ItemCount int `json:"itemCount"`
// PageCount The total number of pages
PageCount int `json:"pageCount"`
// PageIndex The current page
PageIndex int `json:"pageIndex"`
// PageSize The number of items per page
PageSize int `json:"pageSize"`
// Version The version of this object. The version will be incremented each time the object is modified
Version *int `json:"version,omitempty"`
}
Pagination defines model for Pagination.
type PostMetricsJSONRequestBody ¶ added in v0.1.21
type PostMetricsJSONRequestBody Metrics
PostMetricsJSONRequestBody defines body for PostMetrics for application/json ContentType.
type PostMetricsParams ¶ added in v0.1.21
type PostMetricsParams struct {
// Cluster Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
}
PostMetricsParams defines parameters for PostMetrics.
type PostMetricsResponse ¶ added in v0.1.21
type PostMetricsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Unauthenticated
JSON403 *Unauthorized
JSON500 *InternalServerError
}
func ParsePostMetricsResponse ¶ added in v0.1.21
func ParsePostMetricsResponse(rsp *http.Response) (*PostMetricsResponse, error)
ParsePostMetricsResponse parses an HTTP response from a PostMetricsWithResponse call
func (PostMetricsResponse) Status ¶ added in v0.1.21
func (r PostMetricsResponse) Status() string
Status returns HTTPResponse.Status
func (PostMetricsResponse) StatusCode ¶ added in v0.1.21
func (r PostMetricsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Prerequisite ¶
type Prerequisite struct {
// Feature The feature identifier that is the prerequisite
Feature string `json:"feature"`
// Variations A list of variations that must be met
Variations []string `json:"variations"`
}
Prerequisite Feature Flag pre-requisites
type ProxyConfig ¶ added in v0.1.21
type ProxyConfig struct {
// Embedded struct due to allOf(#/components/schemas/Pagination)
Pagination `yaml:",inline"`
// Embedded fields due to inline allOf schema
Environments *[]struct {
ApiKeys *[]string `json:"apiKeys,omitempty"`
FeatureConfigs *[]FeatureConfig `json:"featureConfigs,omitempty"`
Id *string `json:"id,omitempty"`
Segments *[]Segment `json:"segments,omitempty"`
} `json:"environments,omitempty"`
}
ProxyConfig defines model for ProxyConfig.
type ProxyConfigResponse ¶ added in v0.1.21
type ProxyConfigResponse ProxyConfig
ProxyConfigResponse TBD
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Segment ¶
type Segment struct {
// CreatedAt The data and time in milliseconds when the group was created
CreatedAt *int64 `json:"createdAt,omitempty"`
// Environment The environment this target group belongs to
Environment *string `json:"environment,omitempty"`
// Excluded A list of Targets who are excluded from this target group
Excluded *[]Target `json:"excluded,omitempty"`
// Identifier Unique identifier for the target group.
Identifier string `json:"identifier"`
// Included A list of Targets who belong to this target group
Included *[]Target `json:"included,omitempty"`
// ModifiedAt The data and time in milliseconds when the group was last modified
ModifiedAt *int64 `json:"modifiedAt,omitempty"`
// Name Name of the target group.
Name string `json:"name"`
Rules *[]Clause `json:"rules,omitempty"`
// ServingRules An array of rules that can cause a user to be included in this segment.
ServingRules *[]GroupServingRule `json:"servingRules,omitempty"`
// Tags Tags for this target group
Tags *[]Tag `json:"tags,omitempty"`
// Version The version of this group. Each time it is modified the version is incremented
Version *int64 `json:"version,omitempty"`
}
Segment A Target Group (Segment) response
type SegmentRulesV2QueryParam ¶ added in v0.1.23
type SegmentRulesV2QueryParam string
SegmentRulesV2QueryParam defines model for segmentRulesV2QueryParam.
type Serve ¶
type Serve struct {
// Distribution Describes a distribution rule
Distribution *Distribution `json:"distribution,omitempty"`
Variation *string `json:"variation,omitempty"`
}
Serve Describe the distribution rule and the variation that should be served to the target
type ServingRule ¶
type ServingRule struct {
// Clauses A list of clauses to use in the rule
Clauses []Clause `json:"clauses"`
// Priority The rules priority relative to other rules. The rules are evaluated in order with 1 being the highest
Priority int `json:"priority"`
// RuleId The unique identifier for this rule
RuleId *string `json:"ruleId,omitempty"`
// Serve Describe the distribution rule and the variation that should be served to the target
Serve Serve `json:"serve"`
}
ServingRule The rule used to determine what variation to serve to a target
type StreamParams ¶
type StreamParams struct {
// Cluster Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
APIKey string `json:"API-Key"`
}
StreamParams defines parameters for Stream.
type StreamResponse ¶
func ParseStreamResponse ¶
func ParseStreamResponse(rsp *http.Response) (*StreamResponse, error)
ParseStreamResponse parses an HTTP response from a StreamWithResponse call
func (StreamResponse) Status ¶
func (r StreamResponse) Status() string
Status returns HTTPResponse.Status
func (StreamResponse) StatusCode ¶
func (r StreamResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Tag ¶
type Tag struct {
// Identifier The identifier of the tag
Identifier string `json:"identifier"`
// Name The name of the tag
Name string `json:"name"`
}
Tag A Tag object used to tag feature flags - consists of name and identifier
type Target ¶
type Target struct {
// Account The account ID that the target belongs to
Account string `json:"account"`
// Anonymous Indicates if this target is anonymous
Anonymous *bool `json:"anonymous,omitempty"`
// Attributes a JSON representation of the attributes for this target
Attributes *map[string]interface{} `json:"attributes,omitempty"`
// CreatedAt The date and time in milliseconds when this Target was created
CreatedAt *int64 `json:"createdAt,omitempty"`
// Environment The identifier for the environment that the target belongs to
Environment string `json:"environment"`
// Identifier The unique identifier for this target
Identifier string `json:"identifier"`
// Name The name of this Target
Name string `json:"name"`
// Org The identifier for the organization that the target belongs to
Org string `json:"org"`
// Project The identifier for the project that this target belongs to
Project string `json:"project"`
// Segments A list of Target Groups (Segments) that this Target belongs to
Segments *[]Segment `json:"segments,omitempty"`
}
Target A Target object
type TargetData ¶ added in v0.1.21
type TargetData struct {
Attributes []KeyValue `json:"attributes"`
Identifier string `json:"identifier"`
Name string `json:"name"`
}
TargetData defines model for TargetData.
type TargetMap ¶
type TargetMap struct {
// Identifier The identifier for the target
Identifier string `json:"identifier"`
// Name The name of the target
Name string `json:"name"`
}
TargetMap Target map provides the details of a target that belongs to a flag
type Unauthenticated ¶
type Unauthenticated Error
Unauthenticated defines model for Unauthenticated.
type Variation ¶
type Variation struct {
// Description A description of the variation
Description *string `json:"description,omitempty"`
// Identifier The unique identifier for the variation
Identifier string `json:"identifier"`
// Name The user friendly name of the variation
Name *string `json:"name,omitempty"`
// Value The variation value to serve such as true or false for a boolean flag
Value string `json:"value"`
}
Variation A variation of a flag that can be returned to a target
type VariationMap ¶
type VariationMap struct {
// TargetSegments A list of target groups (segments)
TargetSegments *[]string `json:"targetSegments,omitempty"`
// Targets A list of target mappings
Targets *[]TargetMap `json:"targets,omitempty"`
// Variation The variation identifier
Variation string `json:"variation"`
}
VariationMap A mapping of variations to targets and target groups (segments). The targets listed here should receive this variation.
type WeightedVariation ¶
type WeightedVariation struct {
// Variation The variation identifier
Variation string `json:"variation"`
// Weight The weight to be given to the variation in percent
Weight int `json:"weight"`
}
WeightedVariation A variation and the weighting it should receive as part of a percentage rollout