flags

package
v3.0.3 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package flags provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.

Index

Constants

View Source
const (
	HTTPBearerScopes hTTPBearerContextKey = "HTTPBearer.Scopes"
)

Variables

This section is empty.

Functions

func NewBulkRegisterFlagsRequestWithApplicationVndAPIPlusJSONBody

func NewBulkRegisterFlagsRequestWithApplicationVndAPIPlusJSONBody(server string, body BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)

NewBulkRegisterFlagsRequestWithApplicationVndAPIPlusJSONBody calls the generic BulkRegisterFlags builder with application/vnd.api+json body

func NewBulkRegisterFlagsRequestWithBody

func NewBulkRegisterFlagsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewBulkRegisterFlagsRequestWithBody generates requests for BulkRegisterFlags with any type of body

func NewCreateFlagRequestWithApplicationVndAPIPlusJSONBody

func NewCreateFlagRequestWithApplicationVndAPIPlusJSONBody(server string, body CreateFlagApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)

NewCreateFlagRequestWithApplicationVndAPIPlusJSONBody calls the generic CreateFlag builder with application/vnd.api+json body

func NewCreateFlagRequestWithBody

func NewCreateFlagRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewCreateFlagRequestWithBody generates requests for CreateFlag with any type of body

func NewDeleteFlagRequest

func NewDeleteFlagRequest(server string, id string) (*http.Request, error)

NewDeleteFlagRequest generates requests for DeleteFlag

func NewGetFlagRequest

func NewGetFlagRequest(server string, id string) (*http.Request, error)

NewGetFlagRequest generates requests for GetFlag

func NewListAllFlagSourcesRequest

func NewListAllFlagSourcesRequest(server string, params *ListAllFlagSourcesParams) (*http.Request, error)

NewListAllFlagSourcesRequest generates requests for ListAllFlagSources

func NewListFlagSourcesRequest

func NewListFlagSourcesRequest(server string, id string) (*http.Request, error)

NewListFlagSourcesRequest generates requests for ListFlagSources

func NewListFlagsRequest

func NewListFlagsRequest(server string, params *ListFlagsParams) (*http.Request, error)

NewListFlagsRequest generates requests for ListFlags

func NewListFlagsUsageRequest

func NewListFlagsUsageRequest(server string, params *ListFlagsUsageParams) (*http.Request, error)

NewListFlagsUsageRequest generates requests for ListFlagsUsage

func NewRemoveReferencesRequestWithApplicationVndAPIPlusJSONBody

func NewRemoveReferencesRequestWithApplicationVndAPIPlusJSONBody(server string, body RemoveReferencesApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)

NewRemoveReferencesRequestWithApplicationVndAPIPlusJSONBody calls the generic RemoveReferences builder with application/vnd.api+json body

func NewRemoveReferencesRequestWithBody

func NewRemoveReferencesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewRemoveReferencesRequestWithBody generates requests for RemoveReferences with any type of body

func NewUpdateFlagRequestWithApplicationVndAPIPlusJSONBody

func NewUpdateFlagRequestWithApplicationVndAPIPlusJSONBody(server string, id string, body UpdateFlagApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)

NewUpdateFlagRequestWithApplicationVndAPIPlusJSONBody calls the generic UpdateFlag builder with application/vnd.api+json body

func NewUpdateFlagRequestWithBody

func NewUpdateFlagRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)

NewUpdateFlagRequestWithBody generates requests for UpdateFlag with any type of body

Types

type BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody

type BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody = FlagBulkRequest

BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody defines body for BulkRegisterFlags for application/vnd.api+json ContentType.

type BulkRegisterFlagsResponse

type BulkRegisterFlagsResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON200 *FlagBulkResponse
}

func ParseBulkRegisterFlagsResponse

func ParseBulkRegisterFlagsResponse(rsp *http.Response) (*BulkRegisterFlagsResponse, error)

ParseBulkRegisterFlagsResponse parses an HTTP response from a BulkRegisterFlagsWithResponse call

func (BulkRegisterFlagsResponse) ContentType

func (r BulkRegisterFlagsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (BulkRegisterFlagsResponse) Status

func (r BulkRegisterFlagsResponse) Status() string

Status returns HTTPResponse.Status

func (BulkRegisterFlagsResponse) StatusCode

func (r BulkRegisterFlagsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

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) BulkRegisterFlagsWithApplicationVndAPIPlusJSONBody

func (c *Client) BulkRegisterFlagsWithApplicationVndAPIPlusJSONBody(ctx context.Context, body BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) BulkRegisterFlagsWithBody

func (c *Client) BulkRegisterFlagsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateFlagWithApplicationVndAPIPlusJSONBody

func (c *Client) CreateFlagWithApplicationVndAPIPlusJSONBody(ctx context.Context, body CreateFlagApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) CreateFlagWithBody

func (c *Client) CreateFlagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeleteFlag

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

func (*Client) GetFlag

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

func (*Client) ListAllFlagSources

func (c *Client) ListAllFlagSources(ctx context.Context, params *ListAllFlagSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListFlagSources

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

func (*Client) ListFlags

func (c *Client) ListFlags(ctx context.Context, params *ListFlagsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) ListFlagsUsage

func (c *Client) ListFlagsUsage(ctx context.Context, params *ListFlagsUsageParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RemoveReferencesWithApplicationVndAPIPlusJSONBody

func (c *Client) RemoveReferencesWithApplicationVndAPIPlusJSONBody(ctx context.Context, body RemoveReferencesApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) RemoveReferencesWithBody

func (c *Client) RemoveReferencesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateFlagWithApplicationVndAPIPlusJSONBody

func (c *Client) UpdateFlagWithApplicationVndAPIPlusJSONBody(ctx context.Context, id string, body UpdateFlagApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UpdateFlagWithBody

func (c *Client) UpdateFlagWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// ListAllFlagSources request
	ListAllFlagSources(ctx context.Context, params *ListAllFlagSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListFlags request
	ListFlags(ctx context.Context, params *ListFlagsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CreateFlagWithBody request with any body
	CreateFlagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	CreateFlagWithApplicationVndAPIPlusJSONBody(ctx context.Context, body CreateFlagApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// BulkRegisterFlagsWithBody request with any body
	BulkRegisterFlagsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	BulkRegisterFlagsWithApplicationVndAPIPlusJSONBody(ctx context.Context, body BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteFlag request
	DeleteFlag(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetFlag request
	GetFlag(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UpdateFlagWithBody request with any body
	UpdateFlagWithBody(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UpdateFlagWithApplicationVndAPIPlusJSONBody(ctx context.Context, id string, body UpdateFlagApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListFlagSources request
	ListFlagSources(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// RemoveReferencesWithBody request with any body
	RemoveReferencesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	RemoveReferencesWithApplicationVndAPIPlusJSONBody(ctx context.Context, body RemoveReferencesApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListFlagsUsage request
	ListFlagsUsage(ctx context.Context, params *ListFlagsUsageParams, 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) BulkRegisterFlagsWithApplicationVndAPIPlusJSONBodyWithResponse

func (c *ClientWithResponses) BulkRegisterFlagsWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*BulkRegisterFlagsResponse, error)

func (*ClientWithResponses) BulkRegisterFlagsWithBodyWithResponse

func (c *ClientWithResponses) BulkRegisterFlagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BulkRegisterFlagsResponse, error)

BulkRegisterFlagsWithBodyWithResponse request with arbitrary body returning *BulkRegisterFlagsResponse

func (*ClientWithResponses) CreateFlagWithApplicationVndAPIPlusJSONBodyWithResponse

func (c *ClientWithResponses) CreateFlagWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body CreateFlagApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFlagResponse, error)

func (*ClientWithResponses) CreateFlagWithBodyWithResponse

func (c *ClientWithResponses) CreateFlagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFlagResponse, error)

CreateFlagWithBodyWithResponse request with arbitrary body returning *CreateFlagResponse

func (*ClientWithResponses) DeleteFlagWithResponse

func (c *ClientWithResponses) DeleteFlagWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteFlagResponse, error)

DeleteFlagWithResponse request returning *DeleteFlagResponse

func (*ClientWithResponses) GetFlagWithResponse

func (c *ClientWithResponses) GetFlagWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetFlagResponse, error)

GetFlagWithResponse request returning *GetFlagResponse

func (*ClientWithResponses) ListAllFlagSourcesWithResponse

func (c *ClientWithResponses) ListAllFlagSourcesWithResponse(ctx context.Context, params *ListAllFlagSourcesParams, reqEditors ...RequestEditorFn) (*ListAllFlagSourcesResponse, error)

ListAllFlagSourcesWithResponse request returning *ListAllFlagSourcesResponse

func (*ClientWithResponses) ListFlagSourcesWithResponse

func (c *ClientWithResponses) ListFlagSourcesWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ListFlagSourcesResponse, error)

ListFlagSourcesWithResponse request returning *ListFlagSourcesResponse

func (*ClientWithResponses) ListFlagsUsageWithResponse

func (c *ClientWithResponses) ListFlagsUsageWithResponse(ctx context.Context, params *ListFlagsUsageParams, reqEditors ...RequestEditorFn) (*ListFlagsUsageResponse, error)

ListFlagsUsageWithResponse request returning *ListFlagsUsageResponse

func (*ClientWithResponses) ListFlagsWithResponse

func (c *ClientWithResponses) ListFlagsWithResponse(ctx context.Context, params *ListFlagsParams, reqEditors ...RequestEditorFn) (*ListFlagsResponse, error)

ListFlagsWithResponse request returning *ListFlagsResponse

func (*ClientWithResponses) RemoveReferencesWithApplicationVndAPIPlusJSONBodyWithResponse

func (c *ClientWithResponses) RemoveReferencesWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body RemoveReferencesApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveReferencesResponse, error)

func (*ClientWithResponses) RemoveReferencesWithBodyWithResponse

func (c *ClientWithResponses) RemoveReferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveReferencesResponse, error)

RemoveReferencesWithBodyWithResponse request with arbitrary body returning *RemoveReferencesResponse

func (*ClientWithResponses) UpdateFlagWithApplicationVndAPIPlusJSONBodyWithResponse

func (c *ClientWithResponses) UpdateFlagWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, id string, body UpdateFlagApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFlagResponse, error)

func (*ClientWithResponses) UpdateFlagWithBodyWithResponse

func (c *ClientWithResponses) UpdateFlagWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFlagResponse, error)

UpdateFlagWithBodyWithResponse request with arbitrary body returning *UpdateFlagResponse

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListAllFlagSourcesWithResponse request
	ListAllFlagSourcesWithResponse(ctx context.Context, params *ListAllFlagSourcesParams, reqEditors ...RequestEditorFn) (*ListAllFlagSourcesResponse, error)

	// ListFlagsWithResponse request
	ListFlagsWithResponse(ctx context.Context, params *ListFlagsParams, reqEditors ...RequestEditorFn) (*ListFlagsResponse, error)

	// CreateFlagWithBodyWithResponse request with any body
	CreateFlagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateFlagResponse, error)

	CreateFlagWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body CreateFlagApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateFlagResponse, error)

	// BulkRegisterFlagsWithBodyWithResponse request with any body
	BulkRegisterFlagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*BulkRegisterFlagsResponse, error)

	BulkRegisterFlagsWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*BulkRegisterFlagsResponse, error)

	// DeleteFlagWithResponse request
	DeleteFlagWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteFlagResponse, error)

	// GetFlagWithResponse request
	GetFlagWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetFlagResponse, error)

	// UpdateFlagWithBodyWithResponse request with any body
	UpdateFlagWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateFlagResponse, error)

	UpdateFlagWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, id string, body UpdateFlagApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateFlagResponse, error)

	// ListFlagSourcesWithResponse request
	ListFlagSourcesWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ListFlagSourcesResponse, error)

	// RemoveReferencesWithBodyWithResponse request with any body
	RemoveReferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*RemoveReferencesResponse, error)

	RemoveReferencesWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body RemoveReferencesApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*RemoveReferencesResponse, error)

	// ListFlagsUsageWithResponse request
	ListFlagsUsageWithResponse(ctx context.Context, params *ListFlagsUsageParams, reqEditors ...RequestEditorFn) (*ListFlagsUsageResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CreateFlagApplicationVndAPIPlusJSONRequestBody

type CreateFlagApplicationVndAPIPlusJSONRequestBody = FlagResponse

CreateFlagApplicationVndAPIPlusJSONRequestBody defines body for CreateFlag for application/vnd.api+json ContentType.

type CreateFlagResponse

type CreateFlagResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON201 *FlagResponse
}

func ParseCreateFlagResponse

func ParseCreateFlagResponse(rsp *http.Response) (*CreateFlagResponse, error)

ParseCreateFlagResponse parses an HTTP response from a CreateFlagWithResponse call

func (CreateFlagResponse) ContentType

func (r CreateFlagResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CreateFlagResponse) Status

func (r CreateFlagResponse) Status() string

Status returns HTTPResponse.Status

func (CreateFlagResponse) StatusCode

func (r CreateFlagResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteFlagResponse

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

func ParseDeleteFlagResponse

func ParseDeleteFlagResponse(rsp *http.Response) (*DeleteFlagResponse, error)

ParseDeleteFlagResponse parses an HTTP response from a DeleteFlagWithResponse call

func (DeleteFlagResponse) ContentType

func (r DeleteFlagResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteFlagResponse) Status

func (r DeleteFlagResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteFlagResponse) StatusCode

func (r DeleteFlagResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Flag

type Flag struct {
	CreatedAt *time.Time `json:"created_at,omitempty"`

	// Default Default value; must reference a value in the values array (constrained) or match the flag type (unconstrained)
	Default      interface{}                 `json:"default"`
	Description  *string                     `json:"description,omitempty"`
	Environments *map[string]FlagEnvironment `json:"environments,omitempty"`

	// Managed True if admin-managed, false if auto-discovered
	Managed *bool `json:"managed,omitempty"`

	// Name Human-readable display name
	Name    string                    `json:"name"`
	Sources *[]map[string]interface{} `json:"sources,omitempty"`

	// Type Value type: STRING, BOOLEAN, NUMERIC, or JSON
	Type      string     `json:"type"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`

	// Values Ordered set of allowed values (constrained), or null (unconstrained)
	Values *[]FlagValue `json:"values,omitempty"`
}

Flag defines model for Flag.

type FlagBulkItem

type FlagBulkItem struct {
	// Default Default value declared in code
	Default interface{} `json:"default"`

	// Environment Environment where observed
	Environment *string `json:"environment,omitempty"`

	// Id Flag key as declared in code
	Id string `json:"id"`

	// Service Service that declared this flag
	Service *string `json:"service,omitempty"`

	// Type Flag type: BOOLEAN, STRING, NUMERIC, or JSON
	Type string `json:"type"`
}

FlagBulkItem defines model for FlagBulkItem.

type FlagBulkRequest

type FlagBulkRequest struct {
	Flags []FlagBulkItem `json:"flags"`
}

FlagBulkRequest defines model for FlagBulkRequest.

type FlagBulkResponse

type FlagBulkResponse struct {
	Registered int `json:"registered"`
}

FlagBulkResponse defines model for FlagBulkResponse.

type FlagEnvironment

type FlagEnvironment struct {
	Default interface{} `json:"default,omitempty"`
	Enabled *bool       `json:"enabled,omitempty"`
	Rules   *[]FlagRule `json:"rules,omitempty"`
}

FlagEnvironment defines model for FlagEnvironment.

type FlagListResponse

type FlagListResponse struct {
	Data []FlagResource `json:"data"`
}

FlagListResponse defines model for FlagListResponse.

type FlagResource

type FlagResource struct {
	Attributes Flag             `json:"attributes"`
	Id         *string          `json:"id,omitempty"`
	Type       FlagResourceType `json:"type"`
}

FlagResource defines model for FlagResource.

type FlagResourceType

type FlagResourceType string

FlagResourceType defines model for FlagResource.Type.

const (
	FlagResourceTypeFlag FlagResourceType = "flag"
)

Defines values for FlagResourceType.

func (FlagResourceType) Valid

func (e FlagResourceType) Valid() bool

Valid indicates whether the value is a known member of the FlagResourceType enum.

type FlagResponse

type FlagResponse struct {
	Data FlagResource `json:"data"`
}

FlagResponse defines model for FlagResponse.

type FlagRule

type FlagRule struct {
	Description *string                `json:"description,omitempty"`
	Logic       map[string]interface{} `json:"logic"`
	Value       interface{}            `json:"value"`
}

FlagRule defines model for FlagRule.

type FlagSource

type FlagSource struct {
	CreatedAt     *time.Time              `json:"created_at,omitempty"`
	Data          *map[string]interface{} `json:"data,omitempty"`
	Environment   *string                 `json:"environment,omitempty"`
	FirstObserved *time.Time              `json:"first_observed,omitempty"`
	LastSeen      *time.Time              `json:"last_seen,omitempty"`
	Service       *string                 `json:"service,omitempty"`
	UpdatedAt     *time.Time              `json:"updated_at,omitempty"`
}

FlagSource defines model for FlagSource.

type FlagSourceListResponse

type FlagSourceListResponse struct {
	Data []FlagSourceResource `json:"data"`
}

FlagSourceListResponse defines model for FlagSourceListResponse.

type FlagSourceResource

type FlagSourceResource struct {
	Attributes FlagSource             `json:"attributes"`
	Id         *string                `json:"id,omitempty"`
	Type       FlagSourceResourceType `json:"type"`
}

FlagSourceResource defines model for FlagSourceResource.

type FlagSourceResourceType

type FlagSourceResourceType string

FlagSourceResourceType defines model for FlagSourceResource.Type.

const (
	FlagSourceResourceTypeFlagSource FlagSourceResourceType = "flag_source"
)

Defines values for FlagSourceResourceType.

func (FlagSourceResourceType) Valid

func (e FlagSourceResourceType) Valid() bool

Valid indicates whether the value is a known member of the FlagSourceResourceType enum.

type FlagValue

type FlagValue struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

FlagValue defines model for FlagValue.

type GetFlagResponse

type GetFlagResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON200 *FlagResponse
}

func ParseGetFlagResponse

func ParseGetFlagResponse(rsp *http.Response) (*GetFlagResponse, error)

ParseGetFlagResponse parses an HTTP response from a GetFlagWithResponse call

func (GetFlagResponse) ContentType

func (r GetFlagResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetFlagResponse) Status

func (r GetFlagResponse) Status() string

Status returns HTTPResponse.Status

func (GetFlagResponse) StatusCode

func (r GetFlagResponse) 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 ListAllFlagSourcesParams

type ListAllFlagSourcesParams struct {
	FilterEnvironment *string `form:"filter[environment],omitempty" json:"filter[environment],omitempty"`
	FilterService     *string `form:"filter[service],omitempty" json:"filter[service],omitempty"`
}

ListAllFlagSourcesParams defines parameters for ListAllFlagSources.

type ListAllFlagSourcesResponse

type ListAllFlagSourcesResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON200 *FlagSourceListResponse
}

func ParseListAllFlagSourcesResponse

func ParseListAllFlagSourcesResponse(rsp *http.Response) (*ListAllFlagSourcesResponse, error)

ParseListAllFlagSourcesResponse parses an HTTP response from a ListAllFlagSourcesWithResponse call

func (ListAllFlagSourcesResponse) ContentType

func (r ListAllFlagSourcesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListAllFlagSourcesResponse) Status

Status returns HTTPResponse.Status

func (ListAllFlagSourcesResponse) StatusCode

func (r ListAllFlagSourcesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListFlagSourcesResponse

type ListFlagSourcesResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON200 *FlagSourceListResponse
}

func ParseListFlagSourcesResponse

func ParseListFlagSourcesResponse(rsp *http.Response) (*ListFlagSourcesResponse, error)

ParseListFlagSourcesResponse parses an HTTP response from a ListFlagSourcesWithResponse call

func (ListFlagSourcesResponse) ContentType

func (r ListFlagSourcesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListFlagSourcesResponse) Status

func (r ListFlagSourcesResponse) Status() string

Status returns HTTPResponse.Status

func (ListFlagSourcesResponse) StatusCode

func (r ListFlagSourcesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListFlagsParams

type ListFlagsParams struct {
	FilterType    *string `form:"filter[type],omitempty" json:"filter[type],omitempty"`
	FilterManaged *bool   `form:"filter[managed],omitempty" json:"filter[managed],omitempty"`

	// FilterReferencesContext Return flags whose rules reference this context instance. Format: {type}:{key}
	FilterReferencesContext *string `form:"filter[references_context],omitempty" json:"filter[references_context],omitempty"`

	// FilterReferencesContextType Return flags whose rules reference any attribute of the given context type.
	FilterReferencesContextType *string `form:"filter[references_context_type],omitempty" json:"filter[references_context_type],omitempty"`
}

ListFlagsParams defines parameters for ListFlags.

type ListFlagsResponse

type ListFlagsResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON200 *FlagListResponse
}

func ParseListFlagsResponse

func ParseListFlagsResponse(rsp *http.Response) (*ListFlagsResponse, error)

ParseListFlagsResponse parses an HTTP response from a ListFlagsWithResponse call

func (ListFlagsResponse) ContentType

func (r ListFlagsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListFlagsResponse) Status

func (r ListFlagsResponse) Status() string

Status returns HTTPResponse.Status

func (ListFlagsResponse) StatusCode

func (r ListFlagsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListFlagsUsageParams

type ListFlagsUsageParams struct {
	FilterPeriod *string `form:"filter[period],omitempty" json:"filter[period],omitempty"`
}

ListFlagsUsageParams defines parameters for ListFlagsUsage.

type ListFlagsUsageResponse

type ListFlagsUsageResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON200 *UsageListResponse
}

func ParseListFlagsUsageResponse

func ParseListFlagsUsageResponse(rsp *http.Response) (*ListFlagsUsageResponse, error)

ParseListFlagsUsageResponse parses an HTTP response from a ListFlagsUsageWithResponse call

func (ListFlagsUsageResponse) ContentType

func (r ListFlagsUsageResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListFlagsUsageResponse) Status

func (r ListFlagsUsageResponse) Status() string

Status returns HTTPResponse.Status

func (ListFlagsUsageResponse) StatusCode

func (r ListFlagsUsageResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ManualReviewItem

type ManualReviewItem struct {
	Environment string `json:"environment"`
	Flag        string `json:"flag"`
	Reason      string `json:"reason"`
	RuleIndex   int    `json:"rule_index"`
}

ManualReviewItem defines model for ManualReviewItem.

type RemoveReferencesApplicationVndAPIPlusJSONRequestBody

type RemoveReferencesApplicationVndAPIPlusJSONRequestBody = RemoveReferencesRequest

RemoveReferencesApplicationVndAPIPlusJSONRequestBody defines body for RemoveReferences for application/vnd.api+json ContentType.

type RemoveReferencesAttributes

type RemoveReferencesAttributes struct {
	FlagsModified            []string           `json:"flags_modified"`
	RulesNeedingManualReview []ManualReviewItem `json:"rules_needing_manual_review"`
	RulesRemoved             int                `json:"rules_removed"`
}

RemoveReferencesAttributes defines model for RemoveReferencesAttributes.

type RemoveReferencesRequest

type RemoveReferencesRequest struct {
	Context     *string `json:"context,omitempty"`
	ContextType *string `json:"context_type,omitempty"`
}

RemoveReferencesRequest defines model for RemoveReferencesRequest.

type RemoveReferencesResponse

type RemoveReferencesResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON200 *RemoveReferencesResultEnvelope
}

func ParseRemoveReferencesResponse

func ParseRemoveReferencesResponse(rsp *http.Response) (*RemoveReferencesResponse, error)

ParseRemoveReferencesResponse parses an HTTP response from a RemoveReferencesWithResponse call

func (RemoveReferencesResponse) ContentType

func (r RemoveReferencesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (RemoveReferencesResponse) Status

func (r RemoveReferencesResponse) Status() string

Status returns HTTPResponse.Status

func (RemoveReferencesResponse) StatusCode

func (r RemoveReferencesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RemoveReferencesResultEnvelope

type RemoveReferencesResultEnvelope struct {
	Data RemoveReferencesResultResource `json:"data"`
}

RemoveReferencesResultEnvelope defines model for RemoveReferencesResultEnvelope.

type RemoveReferencesResultResource

type RemoveReferencesResultResource struct {
	Attributes RemoveReferencesAttributes          `json:"attributes"`
	Type       *RemoveReferencesResultResourceType `json:"type,omitempty"`
}

RemoveReferencesResultResource defines model for RemoveReferencesResultResource.

type RemoveReferencesResultResourceType

type RemoveReferencesResultResourceType string

RemoveReferencesResultResourceType defines model for RemoveReferencesResultResource.Type.

const (
	RemoveReferencesResult RemoveReferencesResultResourceType = "remove_references_result"
)

Defines values for RemoveReferencesResultResourceType.

func (RemoveReferencesResultResourceType) Valid

Valid indicates whether the value is a known member of the RemoveReferencesResultResourceType enum.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type UpdateFlagApplicationVndAPIPlusJSONRequestBody

type UpdateFlagApplicationVndAPIPlusJSONRequestBody = FlagResponse

UpdateFlagApplicationVndAPIPlusJSONRequestBody defines body for UpdateFlag for application/vnd.api+json ContentType.

type UpdateFlagResponse

type UpdateFlagResponse struct {
	Body                     []byte
	HTTPResponse             *http.Response
	ApplicationvndApiJSON200 *FlagResponse
}

func ParseUpdateFlagResponse

func ParseUpdateFlagResponse(rsp *http.Response) (*UpdateFlagResponse, error)

ParseUpdateFlagResponse parses an HTTP response from a UpdateFlagWithResponse call

func (UpdateFlagResponse) ContentType

func (r UpdateFlagResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (UpdateFlagResponse) Status

func (r UpdateFlagResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateFlagResponse) StatusCode

func (r UpdateFlagResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UsageAttributes

type UsageAttributes struct {
	LimitKey string `json:"limit_key"`
	Period   string `json:"period"`
	Value    int    `json:"value"`
}

UsageAttributes defines model for UsageAttributes.

type UsageListResponse

type UsageListResponse struct {
	Data []UsageResource `json:"data"`
}

UsageListResponse defines model for UsageListResponse.

type UsageResource

type UsageResource struct {
	Attributes UsageAttributes   `json:"attributes"`
	Id         string            `json:"id"`
	Type       UsageResourceType `json:"type"`
}

UsageResource defines model for UsageResource.

type UsageResourceType

type UsageResourceType string

UsageResourceType defines model for UsageResource.Type.

const (
	Usage UsageResourceType = "usage"
)

Defines values for UsageResourceType.

func (UsageResourceType) Valid

func (e UsageResourceType) Valid() bool

Valid indicates whether the value is a known member of the UsageResourceType enum.

Jump to

Keyboard shortcuts

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