rest

package
v0.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 14 Imported by: 6

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

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

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

func NewGetAllSegmentsRequest(server string, environmentUUID string) (*http.Request, error)

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

func NewGetFeatureConfigRequest(server string, environmentUUID string) (*http.Request, error)

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

func PathToRawSpec added in v0.1.0

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

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 (c *Client) AuthenticateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetAllSegments

func (c *Client) GetAllSegments(ctx context.Context, environmentUUID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetEvaluationByIdentifier

func (c *Client) GetEvaluationByIdentifier(ctx context.Context, environmentUUID string, target string, feature string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetEvaluations

func (c *Client) GetEvaluations(ctx context.Context, environmentUUID string, target string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetFeatureConfig

func (c *Client) GetFeatureConfig(ctx context.Context, environmentUUID string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetFeatureConfigByIdentifier

func (c *Client) GetFeatureConfigByIdentifier(ctx context.Context, environmentUUID string, identifier string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) GetSegmentByIdentifier

func (c *Client) GetSegmentByIdentifier(ctx context.Context, environmentUUID string, identifier string, 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, 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

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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 Error

type Error struct {
	Code    string `json:"code"`
	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 Evaluations

type Evaluations []Evaluation

Evaluations defines model for Evaluations.

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

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

Status returns HTTPResponse.Status

func (GetFeatureConfigByIdentifierResponse) StatusCode

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

Status returns HTTPResponse.Status

func (GetSegmentByIdentifierResponse) StatusCode

func (r GetSegmentByIdentifierResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type InternalServerError

type InternalServerError Error

InternalServerError defines model for InternalServerError.

type NotFound

type NotFound Error

NotFound defines model for NotFound.

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

type RequestEditorFn func(ctx context.Context, req *http.Request) error

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

type StreamResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

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 {
	Name  string  `json:"name"`
	Value *string `json:"value,omitempty"`
}

A name and value pair.

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 Unauthorized

type Unauthorized Error

Unauthorized defines model for Unauthorized.

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

type WeightedVariation struct {
	Variation string `json:"variation"`
	Weight    int    `json:"weight"`
}

WeightedVariation defines model for WeightedVariation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL