Documentation
¶
Overview ¶
Package rest 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 rest 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 GetSwagger() (swagger *openapi3.T, err 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) (*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) (*http.Request, error)
- func NewGetSegmentByIdentifierRequest(server string, environmentUUID string, identifier string) (*http.Request, error)
- func NewStreamRequest(server string, params *StreamParams) (*http.Request, error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type AuthenticateJSONBody
- type AuthenticateJSONRequestBody
- type AuthenticateResponse
- type AuthenticationRequest
- type AuthenticationResponse
- type Clause
- type Client
- func (c *Client) Authenticate(ctx context.Context, body AuthenticateJSONRequestBody, ...) (*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, reqEditors ...RequestEditorFn) (*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, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetFeatureConfigByIdentifier(ctx context.Context, environmentUUID string, identifier string, ...) (*http.Response, error)
- func (c *Client) GetSegmentByIdentifier(ctx context.Context, environmentUUID string, identifier string, ...) (*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) 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, reqEditors ...RequestEditorFn) (*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, reqEditors ...RequestEditorFn) (*GetFeatureConfigResponse, error)
- func (c *ClientWithResponses) GetSegmentByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, ...) (*GetSegmentByIdentifierResponse, error)
- func (c *ClientWithResponses) StreamWithResponse(ctx context.Context, params *StreamParams, reqEditors ...RequestEditorFn) (*StreamResponse, error)
- type ClientWithResponsesInterface
- type Distribution
- type Error
- type Evaluation
- type Evaluations
- type FeatureConfig
- type FeatureConfigKind
- type FeatureState
- type GetAllSegmentsResponse
- type GetEvaluationByIdentifierResponse
- type GetEvaluationsResponse
- type GetFeatureConfigByIdentifierResponse
- type GetFeatureConfigResponse
- type GetSegmentByIdentifierResponse
- type HttpRequestDoer
- type InternalServerError
- type NotFound
- type Pagination
- type Prerequisite
- type RequestEditorFn
- type Segment
- type Serve
- type ServingRule
- type StreamParams
- type StreamResponse
- type Tag
- type Target
- type TargetMap
- type Unauthenticated
- type Unauthorized
- type Variation
- type VariationMap
- type WeightedVariation
Constants ¶
const (
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 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 ¶
NewGetAllSegmentsRequest generates requests for GetAllSegments
func NewGetEvaluationByIdentifierRequest ¶
func NewGetEvaluationByIdentifierRequest(server string, environmentUUID string, target string, feature string) (*http.Request, error)
NewGetEvaluationByIdentifierRequest generates requests for GetEvaluationByIdentifier
func NewGetEvaluationsRequest ¶
func NewGetEvaluationsRequest(server string, environmentUUID string, target string) (*http.Request, error)
NewGetEvaluationsRequest generates requests for GetEvaluations
func NewGetFeatureConfigByIdentifierRequest ¶
func NewGetFeatureConfigByIdentifierRequest(server string, environmentUUID string, identifier string) (*http.Request, error)
NewGetFeatureConfigByIdentifierRequest generates requests for GetFeatureConfigByIdentifier
func NewGetFeatureConfigRequest ¶
NewGetFeatureConfigRequest generates requests for GetFeatureConfig
func NewGetSegmentByIdentifierRequest ¶
func NewGetSegmentByIdentifierRequest(server string, environmentUUID string, identifier string) (*http.Request, error)
NewGetSegmentByIdentifierRequest generates requests for GetSegmentByIdentifier
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 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 { Attribute string `json:"attribute"` Id string `json:"id"` Negate bool `json:"negate"` Op string `json:"op"` Values []string `json:"values"` }
Clause defines model for Clause.
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) AuthenticateWithBody ¶
func (*Client) GetAllSegments ¶
func (*Client) GetEvaluationByIdentifier ¶
func (*Client) GetEvaluations ¶
func (*Client) GetFeatureConfig ¶
func (*Client) GetFeatureConfigByIdentifier ¶
func (*Client) GetSegmentByIdentifier ¶
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, reqEditors ...RequestEditorFn) (*http.Response, error) // GetFeatureConfigByIdentifier request GetFeatureConfigByIdentifier(ctx context.Context, environmentUUID string, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetAllSegments request GetAllSegments(ctx context.Context, environmentUUID string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetSegmentByIdentifier request GetSegmentByIdentifier(ctx context.Context, environmentUUID string, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetEvaluations request GetEvaluations(ctx context.Context, environmentUUID string, target string, reqEditors ...RequestEditorFn) (*http.Response, error) // GetEvaluationByIdentifier request GetEvaluationByIdentifier(ctx context.Context, environmentUUID string, target string, feature string, 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) 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, reqEditors ...RequestEditorFn) (*GetAllSegmentsResponse, error)
GetAllSegmentsWithResponse request returning *GetAllSegmentsResponse
func (*ClientWithResponses) GetEvaluationByIdentifierWithResponse ¶
func (c *ClientWithResponses) GetEvaluationByIdentifierWithResponse(ctx context.Context, environmentUUID string, target string, feature string, reqEditors ...RequestEditorFn) (*GetEvaluationByIdentifierResponse, error)
GetEvaluationByIdentifierWithResponse request returning *GetEvaluationByIdentifierResponse
func (*ClientWithResponses) GetEvaluationsWithResponse ¶
func (c *ClientWithResponses) GetEvaluationsWithResponse(ctx context.Context, environmentUUID string, target string, reqEditors ...RequestEditorFn) (*GetEvaluationsResponse, error)
GetEvaluationsWithResponse request returning *GetEvaluationsResponse
func (*ClientWithResponses) GetFeatureConfigByIdentifierWithResponse ¶
func (c *ClientWithResponses) GetFeatureConfigByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, reqEditors ...RequestEditorFn) (*GetFeatureConfigByIdentifierResponse, error)
GetFeatureConfigByIdentifierWithResponse request returning *GetFeatureConfigByIdentifierResponse
func (*ClientWithResponses) GetFeatureConfigWithResponse ¶
func (c *ClientWithResponses) GetFeatureConfigWithResponse(ctx context.Context, environmentUUID string, reqEditors ...RequestEditorFn) (*GetFeatureConfigResponse, error)
GetFeatureConfigWithResponse request returning *GetFeatureConfigResponse
func (*ClientWithResponses) GetSegmentByIdentifierWithResponse ¶
func (c *ClientWithResponses) GetSegmentByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, reqEditors ...RequestEditorFn) (*GetSegmentByIdentifierResponse, error)
GetSegmentByIdentifierWithResponse request returning *GetSegmentByIdentifierResponse
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, reqEditors ...RequestEditorFn) (*GetFeatureConfigResponse, error) // GetFeatureConfigByIdentifier request GetFeatureConfigByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, reqEditors ...RequestEditorFn) (*GetFeatureConfigByIdentifierResponse, error) // GetAllSegments request GetAllSegmentsWithResponse(ctx context.Context, environmentUUID string, reqEditors ...RequestEditorFn) (*GetAllSegmentsResponse, error) // GetSegmentByIdentifier request GetSegmentByIdentifierWithResponse(ctx context.Context, environmentUUID string, identifier string, reqEditors ...RequestEditorFn) (*GetSegmentByIdentifierResponse, error) // GetEvaluations request GetEvaluationsWithResponse(ctx context.Context, environmentUUID string, target string, reqEditors ...RequestEditorFn) (*GetEvaluationsResponse, error) // GetEvaluationByIdentifier request GetEvaluationByIdentifierWithResponse(ctx context.Context, environmentUUID string, target string, feature string, reqEditors ...RequestEditorFn) (*GetEvaluationByIdentifierResponse, 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 Distribution ¶
type Distribution struct { BucketBy string `json:"bucketBy"` Variations []WeightedVariation `json:"variations"` }
Distribution defines model for Distribution.
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 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 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 defines model for FeatureState.
const ( FeatureStateOff FeatureState = "off" FeatureStateOn FeatureState = "on" )
Defines values for FeatureState.
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 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 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 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 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 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 HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type InternalServerError ¶
type InternalServerError Error
InternalServerError defines model for InternalServerError.
type Pagination ¶
type Pagination struct { ItemCount int `json:"itemCount"` PageCount int `json:"pageCount"` PageIndex int `json:"pageIndex"` PageSize int `json:"pageSize"` Version *int `json:"version,omitempty"` }
Pagination defines model for Pagination.
type Prerequisite ¶
type Prerequisite struct { Feature string `json:"feature"` Variations []string `json:"variations"` }
Prerequisite defines model for Prerequisite.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type Segment ¶
type Segment struct { CreatedAt *int64 `json:"createdAt,omitempty"` Environment *string `json:"environment,omitempty"` Excluded *[]Target `json:"excluded,omitempty"` // Unique identifier for the segment. Identifier string `json:"identifier"` Included *[]Target `json:"included,omitempty"` ModifiedAt *int64 `json:"modifiedAt,omitempty"` // Name of the segment. Name string `json:"name"` // An array of rules that can cause a user to be included in this segment. Rules *[]Clause `json:"rules,omitempty"` Tags *[]Tag `json:"tags,omitempty"` Version *int64 `json:"version,omitempty"` }
Segment defines model for Segment.
type Serve ¶
type Serve struct { Distribution *Distribution `json:"distribution,omitempty"` Variation *string `json:"variation,omitempty"` }
Serve defines model for Serve.
type ServingRule ¶
type ServingRule struct { Clauses []Clause `json:"clauses"` Priority int `json:"priority"` RuleId string `json:"ruleId"` Serve Serve `json:"serve"` }
ServingRule defines model for ServingRule.
type StreamParams ¶
type StreamParams struct {
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 Target ¶
type Target struct { Account string `json:"account"` Anonymous *bool `json:"anonymous,omitempty"` Attributes *map[string]interface{} `json:"attributes,omitempty"` CreatedAt *int64 `json:"createdAt,omitempty"` Environment string `json:"environment"` Identifier string `json:"identifier"` Name string `json:"name"` Org string `json:"org"` Project string `json:"project"` Segments *[]Segment `json:"segments,omitempty"` }
Target defines model for Target.
type TargetMap ¶
type TargetMap struct { Identifier *string `json:"identifier,omitempty"` Name string `json:"name"` }
TargetMap defines model for TargetMap.
type Unauthenticated ¶
type Unauthenticated Error
Unauthenticated defines model for Unauthenticated.
type Variation ¶
type Variation struct { Description *string `json:"description,omitempty"` Identifier string `json:"identifier"` Name *string `json:"name,omitempty"` Value string `json:"value"` }
Variation defines model for Variation.
type VariationMap ¶
type VariationMap struct { TargetSegments *[]string `json:"targetSegments,omitempty"` Targets *[]TargetMap `json:"targets,omitempty"` Variation string `json:"variation"` }
VariationMap defines model for VariationMap.
type WeightedVariation ¶
WeightedVariation defines model for WeightedVariation.