flags

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 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.6.0 DO NOT EDIT.

Index

Constants

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

Variables

This section is empty.

Functions

func NewBulkRegisterFlagsRequestWithApplicationVndAPIPlusJSONBody added in v1.5.7

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

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

func NewBulkRegisterFlagsRequestWithBody added in v1.5.7

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

NewBulkRegisterFlagsRequestWithBody generates requests for BulkRegisterFlags with any type of body

func NewCreateFlagRequestWithApplicationVndAPIPlusJSONBody added in v1.3.42

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 added in v1.5.7

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

NewListAllFlagSourcesRequest generates requests for ListAllFlagSources

func NewListFlagSourcesRequest added in v1.5.7

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 added in v1.3.36

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

NewListFlagsUsageRequest generates requests for ListFlagsUsage

func NewUpdateFlagRequestWithApplicationVndAPIPlusJSONBody added in v1.3.42

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 added in v1.5.7

type BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody = FlagBulkRequest

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

type BulkRegisterFlagsResponse added in v1.5.7

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

func ParseBulkRegisterFlagsResponse added in v1.5.7

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

ParseBulkRegisterFlagsResponse parses an HTTP response from a BulkRegisterFlagsWithResponse call

func (BulkRegisterFlagsResponse) Status added in v1.5.7

func (r BulkRegisterFlagsResponse) Status() string

Status returns HTTPResponse.Status

func (BulkRegisterFlagsResponse) StatusCode added in v1.5.7

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 added in v1.5.7

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

func (*Client) BulkRegisterFlagsWithBody added in v1.5.7

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

func (*Client) CreateFlagWithApplicationVndAPIPlusJSONBody added in v1.3.42

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 added in v1.5.7

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

func (*Client) ListFlagSources added in v1.5.7

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 added in v1.3.36

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

func (*Client) UpdateFlagWithApplicationVndAPIPlusJSONBody added in v1.3.42

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)

	// 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 added in v1.5.7

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

func (*ClientWithResponses) BulkRegisterFlagsWithBodyWithResponse added in v1.5.7

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 added in v1.3.42

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 added in v1.5.7

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

ListAllFlagSourcesWithResponse request returning *ListAllFlagSourcesResponse

func (*ClientWithResponses) ListFlagSourcesWithResponse added in v1.5.7

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

ListFlagSourcesWithResponse request returning *ListFlagSourcesResponse

func (*ClientWithResponses) ListFlagsUsageWithResponse added in v1.3.36

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) UpdateFlagWithApplicationVndAPIPlusJSONBodyWithResponse added in v1.3.42

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)

	// 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 added in v1.3.42

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) 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) 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 added in v1.5.7

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 added in v1.5.7

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

FlagBulkRequest defines model for FlagBulkRequest.

type FlagBulkResponse added in v1.5.7

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 added in v1.3.1

type FlagResourceType string

FlagResourceType defines model for FlagResource.Type.

const (
	FlagResourceTypeFlag FlagResourceType = "flag"
)

Defines values for FlagResourceType.

func (FlagResourceType) Valid added in v1.3.1

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 added in v1.5.7

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 added in v1.5.7

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

FlagSourceListResponse defines model for FlagSourceListResponse.

type FlagSourceResource added in v1.5.7

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

FlagSourceResource defines model for FlagSourceResource.

type FlagSourceResourceType added in v1.5.7

type FlagSourceResourceType string

FlagSourceResourceType defines model for FlagSourceResource.Type.

const (
	FlagSourceResourceTypeFlagSource FlagSourceResourceType = "flag_source"
)

Defines values for FlagSourceResourceType.

func (FlagSourceResourceType) Valid added in v1.5.7

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) 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 added in v1.5.7

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 added in v1.5.7

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

func ParseListAllFlagSourcesResponse added in v1.5.7

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

ParseListAllFlagSourcesResponse parses an HTTP response from a ListAllFlagSourcesWithResponse call

func (ListAllFlagSourcesResponse) Status added in v1.5.7

Status returns HTTPResponse.Status

func (ListAllFlagSourcesResponse) StatusCode added in v1.5.7

func (r ListAllFlagSourcesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListFlagSourcesResponse added in v1.5.7

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

func ParseListFlagSourcesResponse added in v1.5.7

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

ParseListFlagSourcesResponse parses an HTTP response from a ListFlagSourcesWithResponse call

func (ListFlagSourcesResponse) Status added in v1.5.7

func (r ListFlagSourcesResponse) Status() string

Status returns HTTPResponse.Status

func (ListFlagSourcesResponse) StatusCode added in v1.5.7

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"`
}

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

func (r ListFlagsResponse) Status() string

Status returns HTTPResponse.Status

func (ListFlagsResponse) StatusCode

func (r ListFlagsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListFlagsUsageParams added in v1.3.36

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

ListFlagsUsageParams defines parameters for ListFlagsUsage.

type ListFlagsUsageResponse added in v1.3.36

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

func ParseListFlagsUsageResponse added in v1.3.36

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

ParseListFlagsUsageResponse parses an HTTP response from a ListFlagsUsageWithResponse call

func (ListFlagsUsageResponse) Status added in v1.3.36

func (r ListFlagsUsageResponse) Status() string

Status returns HTTPResponse.Status

func (ListFlagsUsageResponse) StatusCode added in v1.3.36

func (r ListFlagsUsageResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type UpdateFlagApplicationVndAPIPlusJSONRequestBody added in v1.3.42

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

func (r UpdateFlagResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateFlagResponse) StatusCode

func (r UpdateFlagResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UsageAttributes added in v1.3.42

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

UsageAttributes defines model for UsageAttributes.

type UsageListResponse added in v1.3.42

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

UsageListResponse defines model for UsageListResponse.

type UsageResource added in v1.3.42

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

UsageResource defines model for UsageResource.

type UsageResourceType added in v1.3.42

type UsageResourceType string

UsageResourceType defines model for UsageResource.Type.

const (
	Usage UsageResourceType = "usage"
)

Defines values for UsageResourceType.

func (UsageResourceType) Valid added in v1.3.42

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