Documentation
¶
Overview ¶
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Package client provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version v1.11.0 DO NOT EDIT.
Index ¶
- Constants
- 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)
- type AuthenticateJSONBody
- 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 PostMetricsJSONBody
- 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 NewAuthenticateProxyKeyRequest ¶
func NewAuthenticateProxyKeyRequest(server string, body AuthenticateProxyKeyJSONRequestBody) (*http.Request, error)
NewAuthenticateProxyKeyRequest calls the generic AuthenticateProxyKey builder with application/json body
func NewAuthenticateProxyKeyRequestWithBody ¶
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 ¶
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 ¶
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 ¶
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 AuthenticateJSONBody ¶
type AuthenticateJSONBody = AuthenticationRequest
AuthenticateJSONBody defines parameters for Authenticate.
type AuthenticateJSONRequestBody ¶
type AuthenticateJSONRequestBody = AuthenticateJSONBody
AuthenticateJSONRequestBody defines body for Authenticate for application/json ContentType.
type AuthenticateProxyKeyJSONBody ¶
type AuthenticateProxyKeyJSONBody struct {
ProxyKey string `json:"proxyKey"`
}
AuthenticateProxyKeyJSONBody defines parameters for AuthenticateProxyKey.
type AuthenticateProxyKeyJSONRequestBody ¶
type AuthenticateProxyKeyJSONRequestBody AuthenticateProxyKeyJSONBody
AuthenticateProxyKeyJSONRequestBody defines body for AuthenticateProxyKey for application/json ContentType.
type AuthenticateProxyKeyResponse ¶
type AuthenticateProxyKeyResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AuthenticationResponse
JSON401 *Error
JSON403 *Error
JSON404 *Error
JSON500 *Error
}
func ParseAuthenticateProxyKeyResponse ¶
func ParseAuthenticateProxyKeyResponse(rsp *http.Response) (*AuthenticateProxyKeyResponse, error)
ParseAuthenticateProxyKeyResponse parses an HTTP response from a AuthenticateProxyKeyWithResponse call
func (AuthenticateProxyKeyResponse) Status ¶
func (r AuthenticateProxyKeyResponse) Status() string
Status returns HTTPResponse.Status
func (AuthenticateProxyKeyResponse) StatusCode ¶
func (r AuthenticateProxyKeyResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type AuthenticateResponse ¶
type AuthenticateResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *AuthenticationResponse
JSON401 *Error
JSON403 *Error
JSON404 *Error
JSON500 *Error
}
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 {
// The attribute to use in the clause. This can be any target attribute
Attribute string `json:"attribute"`
// The unique ID for the clause
Id *string `json:"id,omitempty"`
// Is the operation negated?
Negate bool `json:"negate"`
// The type of operation such as equals, starts_with, contains
Op string `json:"op"`
// The values that are compared against the operator
Values []string `json:"values"`
}
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 ¶
func (c *Client) AuthenticateProxyKey(ctx context.Context, body AuthenticateProxyKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) AuthenticateProxyKeyWithBody ¶
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 ¶
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 ¶
func (c *Client) PostMetrics(ctx context.Context, environmentUUID EnvironmentPathParam, params *PostMetricsParams, body PostMetricsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) PostMetricsWithBody ¶
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 {
// Authenticate 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)
// PostMetrics 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)
// AuthenticateProxyKey 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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 {
// Authenticate 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)
// GetFeatureConfig request
GetFeatureConfigWithResponse(ctx context.Context, environmentUUID string, params *GetFeatureConfigParams, reqEditors ...RequestEditorFn) (*GetFeatureConfigResponse, error)
// GetFeatureConfigByIdentifier request
GetFeatureConfigByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, params *GetFeatureConfigByIdentifierParams, reqEditors ...RequestEditorFn) (*GetFeatureConfigByIdentifierResponse, error)
// GetAllSegments request
GetAllSegmentsWithResponse(ctx context.Context, environmentUUID string, params *GetAllSegmentsParams, reqEditors ...RequestEditorFn) (*GetAllSegmentsResponse, error)
// GetSegmentByIdentifier request
GetSegmentByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, params *GetSegmentByIdentifierParams, reqEditors ...RequestEditorFn) (*GetSegmentByIdentifierResponse, error)
// GetEvaluations request
GetEvaluationsWithResponse(ctx context.Context, environmentUUID string, target string, params *GetEvaluationsParams, reqEditors ...RequestEditorFn) (*GetEvaluationsResponse, error)
// GetEvaluationByIdentifier request
GetEvaluationByIdentifierWithResponse(ctx context.Context, environmentUUID string, target string, feature string, params *GetEvaluationByIdentifierParams, reqEditors ...RequestEditorFn) (*GetEvaluationByIdentifierResponse, error)
// PostMetrics 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)
// AuthenticateProxyKey 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)
// GetProxyConfig request
GetProxyConfigWithResponse(ctx context.Context, params *GetProxyConfigParams, reqEditors ...RequestEditorFn) (*GetProxyConfigResponse, error)
// Stream request
StreamWithResponse(ctx context.Context, params *StreamParams, reqEditors ...RequestEditorFn) (*StreamResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type ClusterQueryOptionalParam ¶
type ClusterQueryOptionalParam = string
ClusterQueryOptionalParam defines model for clusterQueryOptionalParam.
type Distribution ¶
type Distribution struct {
// The attribute to use when distributing targets across buckets
BucketBy string `json:"bucketBy"`
// A list of variations and the weight that should be given to each
Variations []WeightedVariation `json:"variations"`
}
Describes a distribution rule
type EnvironmentPathParam ¶
type EnvironmentPathParam = string
EnvironmentPathParam defines model for environmentPathParam.
type Error ¶
type Error struct {
// The http error code
Code string `json:"code"`
// Additional details about the error
Details *map[string]interface{} `json:"details,omitempty"`
// 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 {
// 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"`
// 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 ¶
type FeatureConfigKind string
FeatureConfigKind defines model for FeatureConfig.Kind.
const ( Boolean FeatureConfigKind = "boolean" Int FeatureConfigKind = "int" Json FeatureConfigKind = "json" String FeatureConfigKind = "string" )
Defines values for FeatureConfigKind.
type FeatureState ¶
type FeatureState string
The state of a flag either off or on
const ( Off FeatureState = "off" On FeatureState = "on" )
Defines values for FeatureState.
type GetAllSegmentsParams ¶
type GetAllSegmentsParams struct {
// Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
// 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 *Error
JSON403 *Error
JSON404 *Error
JSON500 *Error
}
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 ¶
type GetEvaluationByIdentifierParams struct {
// 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 ¶
type GetEvaluationsParams struct {
// 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 {
// The total number of items
ItemCount int `json:"itemCount"`
// The total number of pages
PageCount int `json:"pageCount"`
// The current page
PageIndex int `json:"pageIndex"`
// The number of items per page
PageSize int `json:"pageSize"`
// The version of this object. The version will be incremented each time the object is modified
Version *int `json:"version,omitempty"`
}
}
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 ¶
type GetFeatureConfigByIdentifierParams struct {
// 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 ¶
type GetFeatureConfigParams struct {
// 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 ¶
type GetProxyConfigParams struct {
// PageNumber
PageNumber *PageNumber `form:"pageNumber,omitempty" json:"pageNumber,omitempty"`
// PageSize
PageSize *PageSize `form:"pageSize,omitempty" json:"pageSize,omitempty"`
// Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
// 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"`
// Accpets a Proxy Key.
Key string `form:"key" json:"key"`
}
GetProxyConfigParams defines parameters for GetProxyConfig.
type GetProxyConfigResponse ¶
type GetProxyConfigResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ProxyConfig
JSON400 *Error
JSON401 *Error
JSON403 *Error
JSON404 *Error
JSON500 *Error
}
func ParseGetProxyConfigResponse ¶
func ParseGetProxyConfigResponse(rsp *http.Response) (*GetProxyConfigResponse, error)
ParseGetProxyConfigResponse parses an HTTP response from a GetProxyConfigWithResponse call
func (GetProxyConfigResponse) Status ¶
func (r GetProxyConfigResponse) Status() string
Status returns HTTPResponse.Status
func (GetProxyConfigResponse) StatusCode ¶
func (r GetProxyConfigResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type GetSegmentByIdentifierParams ¶
type GetSegmentByIdentifierParams struct {
// Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
// 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 *Error
JSON403 *Error
JSON404 *Error
JSON500 *Error
}
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 ¶
type GroupServingRule struct {
// A list of clauses to use in the rule
Clauses []Clause `json:"clauses"`
// The rules priority relative to other rules. The rules are evaluated in order with 1 being the highest
Priority int `json:"priority"`
// The unique identifier for this rule
RuleId string `json:"ruleId"`
}
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 ¶
type Metrics struct {
MetricsData *[]MetricsData `json:"metricsData,omitempty"`
TargetData *[]TargetData `json:"targetData,omitempty"`
}
Metrics defines model for Metrics.
type MetricsData ¶
type MetricsData struct {
Attributes []KeyValue `json:"attributes"`
Count int `json:"count"`
// This can be of type FeatureMetrics
MetricsType MetricsDataMetricsType `json:"metricsType"`
// time at when this data was recorded
Timestamp int64 `json:"timestamp"`
}
MetricsData defines model for MetricsData.
type MetricsDataMetricsType ¶
type MetricsDataMetricsType string
This can be of type FeatureMetrics
const (
FFMETRICS MetricsDataMetricsType = "FFMETRICS"
)
Defines values for MetricsDataMetricsType.
type Pagination ¶
type Pagination struct {
// The total number of items
ItemCount int `json:"itemCount"`
// The total number of pages
PageCount int `json:"pageCount"`
// The current page
PageIndex int `json:"pageIndex"`
// The number of items per page
PageSize int `json:"pageSize"`
// 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 PostMetricsJSONBody ¶
type PostMetricsJSONBody = Metrics
PostMetricsJSONBody defines parameters for PostMetrics.
type PostMetricsJSONRequestBody ¶
type PostMetricsJSONRequestBody = PostMetricsJSONBody
PostMetricsJSONRequestBody defines body for PostMetrics for application/json ContentType.
type PostMetricsParams ¶
type PostMetricsParams struct {
// Unique identifier for the cluster for the account
Cluster *ClusterQueryOptionalParam `form:"cluster,omitempty" json:"cluster,omitempty"`
}
PostMetricsParams defines parameters for PostMetrics.
type PostMetricsResponse ¶
type PostMetricsResponse struct {
Body []byte
HTTPResponse *http.Response
JSON401 *Error
JSON403 *Error
JSON500 *Error
}
func ParsePostMetricsResponse ¶
func ParsePostMetricsResponse(rsp *http.Response) (*PostMetricsResponse, error)
ParsePostMetricsResponse parses an HTTP response from a PostMetricsWithResponse call
func (PostMetricsResponse) Status ¶
func (r PostMetricsResponse) Status() string
Status returns HTTPResponse.Status
func (PostMetricsResponse) StatusCode ¶
func (r PostMetricsResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode
type Prerequisite ¶
type Prerequisite struct {
// The feature identifier that is the prerequisite
Feature string `json:"feature"`
// A list of variations that must be met
Variations []string `json:"variations"`
}
Feature Flag pre-requisites
type ProxyConfig ¶
type ProxyConfig struct {
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"`
// The total number of items
ItemCount int `json:"itemCount"`
// The total number of pages
PageCount int `json:"pageCount"`
// The current page
PageIndex int `json:"pageIndex"`
// The number of items per page
PageSize int `json:"pageSize"`
// The version of this object. The version will be incremented each time the object is modified
Version *int `json:"version,omitempty"`
}
ProxyConfig defines model for ProxyConfig.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Segment ¶
type Segment struct {
// The data and time in milliseconds when the group was created
CreatedAt *int64 `json:"createdAt,omitempty"`
// The environment this target group belongs to
Environment *string `json:"environment,omitempty"`
// A list of Targets who are excluded from this target group
Excluded *[]Target `json:"excluded,omitempty"`
// Unique identifier for the target group.
Identifier string `json:"identifier"`
// A list of Targets who belong to this target group
Included *[]Target `json:"included,omitempty"`
// The data and time in milliseconds when the group was last modified
ModifiedAt *int64 `json:"modifiedAt,omitempty"`
// Name of the target group.
Name string `json:"name"`
Rules *[]Clause `json:"rules,omitempty"`
// An array of rules that can cause a user to be included in this segment.
ServingRules *[]GroupServingRule `json:"servingRules,omitempty"`
// Tags for this target group
Tags *[]Tag `json:"tags,omitempty"`
// The version of this group. Each time it is modified the version is incremented
Version *int64 `json:"version,omitempty"`
}
A Target Group (Segment) response
type SegmentRulesV2QueryParam ¶
type SegmentRulesV2QueryParam = string
SegmentRulesV2QueryParam defines model for segmentRulesV2QueryParam.
type Serve ¶
type Serve struct {
// Describes a distribution rule
Distribution *Distribution `json:"distribution,omitempty"`
Variation *string `json:"variation,omitempty"`
}
Describe the distribution rule and the variation that should be served to the target
type ServingRule ¶
type ServingRule struct {
// A list of clauses to use in the rule
Clauses []Clause `json:"clauses"`
// The rules priority relative to other rules. The rules are evaluated in order with 1 being the highest
Priority int `json:"priority"`
// The unique identifier for this rule
RuleId *string `json:"ruleId,omitempty"`
// Describe the distribution rule and the variation that should be served to the target
Serve Serve `json:"serve"`
}
The rule used to determine what variation to serve to a target
type StreamParams ¶
type StreamParams struct {
// 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 {
// The identifier of the tag
Identifier string `json:"identifier"`
// The name of the tag
Name string `json:"name"`
}
A Tag object used to tag feature flags - consists of name and identifier
type Target ¶
type Target struct {
// The account ID that the target belongs to
Account string `json:"account"`
// Indicates if this target is anonymous
Anonymous *bool `json:"anonymous,omitempty"`
// a JSON representation of the attributes for this target
Attributes *map[string]interface{} `json:"attributes,omitempty"`
// The date and time in milliseconds when this Target was created
CreatedAt *int64 `json:"createdAt,omitempty"`
// The identifier for the environment that the target belongs to
Environment string `json:"environment"`
// The unique identifier for this target
Identifier string `json:"identifier"`
// The name of this Target
Name string `json:"name"`
// The identifier for the organization that the target belongs to
Org string `json:"org"`
// The identifier for the project that this target belongs to
Project string `json:"project"`
// A list of Target Groups (Segments) that this Target belongs to
Segments *[]Segment `json:"segments,omitempty"`
}
A Target object
type TargetData ¶
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 {
// The identifier for the target
Identifier string `json:"identifier"`
// The name of the target
Name string `json:"name"`
}
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 {
// A description of the variation
Description *string `json:"description,omitempty"`
// The unique identifier for the variation
Identifier string `json:"identifier"`
// The user friendly name of the variation
Name *string `json:"name,omitempty"`
// The variation value to serve such as true or false for a boolean flag
Value string `json:"value"`
}
A variation of a flag that can be returned to a target
type VariationMap ¶
type VariationMap struct {
// A list of target groups (segments)
TargetSegments *[]string `json:"targetSegments,omitempty"`
// A list of target mappings
Targets *[]TargetMap `json:"targets,omitempty"`
// The variation identifier
Variation string `json:"variation"`
}
A mapping of variations to targets and target groups (segments). The targets listed here should receive this variation.
type WeightedVariation ¶
type WeightedVariation struct {
// The variation identifier
Variation string `json:"variation"`
// The weight to be given to the variation in percent
Weight int `json:"weight"`
}
A variation and the weighting it should receive as part of a percentage rollout