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
- func NewBulkRegisterFlagsRequestWithApplicationVndAPIPlusJSONBody(server string, body BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)
- func NewBulkRegisterFlagsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewCreateFlagRequestWithApplicationVndAPIPlusJSONBody(server string, body CreateFlagApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)
- func NewCreateFlagRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewDeleteFlagRequest(server string, id string) (*http.Request, error)
- func NewGetFlagRequest(server string, id string) (*http.Request, error)
- func NewListAllFlagSourcesRequest(server string, params *ListAllFlagSourcesParams) (*http.Request, error)
- func NewListFlagSourcesRequest(server string, id string) (*http.Request, error)
- func NewListFlagsRequest(server string, params *ListFlagsParams) (*http.Request, error)
- func NewListFlagsUsageRequest(server string, params *ListFlagsUsageParams) (*http.Request, error)
- func NewRemoveReferencesRequestWithApplicationVndAPIPlusJSONBody(server string, body RemoveReferencesApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)
- func NewRemoveReferencesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)
- func NewUpdateFlagRequestWithApplicationVndAPIPlusJSONBody(server string, id string, body UpdateFlagApplicationVndAPIPlusJSONRequestBody) (*http.Request, error)
- func NewUpdateFlagRequestWithBody(server string, id string, contentType string, body io.Reader) (*http.Request, error)
- type BulkRegisterFlagsApplicationVndAPIPlusJSONRequestBody
- type BulkRegisterFlagsResponse
- type Client
- func (c *Client) BulkRegisterFlagsWithApplicationVndAPIPlusJSONBody(ctx context.Context, ...) (*http.Response, error)
- func (c *Client) BulkRegisterFlagsWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) CreateFlagWithApplicationVndAPIPlusJSONBody(ctx context.Context, body CreateFlagApplicationVndAPIPlusJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) CreateFlagWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) DeleteFlag(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) GetFlag(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListAllFlagSources(ctx context.Context, params *ListAllFlagSourcesParams, ...) (*http.Response, error)
- func (c *Client) ListFlagSources(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListFlags(ctx context.Context, params *ListFlagsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
- func (c *Client) ListFlagsUsage(ctx context.Context, params *ListFlagsUsageParams, ...) (*http.Response, error)
- func (c *Client) RemoveReferencesWithApplicationVndAPIPlusJSONBody(ctx context.Context, body RemoveReferencesApplicationVndAPIPlusJSONRequestBody, ...) (*http.Response, error)
- func (c *Client) RemoveReferencesWithBody(ctx context.Context, contentType string, body io.Reader, ...) (*http.Response, error)
- func (c *Client) UpdateFlagWithApplicationVndAPIPlusJSONBody(ctx context.Context, id string, ...) (*http.Response, error)
- func (c *Client) UpdateFlagWithBody(ctx context.Context, id string, contentType string, body io.Reader, ...) (*http.Response, error)
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) BulkRegisterFlagsWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, ...) (*BulkRegisterFlagsResponse, error)
- func (c *ClientWithResponses) BulkRegisterFlagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*BulkRegisterFlagsResponse, error)
- func (c *ClientWithResponses) CreateFlagWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body CreateFlagApplicationVndAPIPlusJSONRequestBody, ...) (*CreateFlagResponse, error)
- func (c *ClientWithResponses) CreateFlagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*CreateFlagResponse, error)
- func (c *ClientWithResponses) DeleteFlagWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*DeleteFlagResponse, error)
- func (c *ClientWithResponses) GetFlagWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*GetFlagResponse, error)
- func (c *ClientWithResponses) ListAllFlagSourcesWithResponse(ctx context.Context, params *ListAllFlagSourcesParams, ...) (*ListAllFlagSourcesResponse, error)
- func (c *ClientWithResponses) ListFlagSourcesWithResponse(ctx context.Context, id string, reqEditors ...RequestEditorFn) (*ListFlagSourcesResponse, error)
- func (c *ClientWithResponses) ListFlagsUsageWithResponse(ctx context.Context, params *ListFlagsUsageParams, ...) (*ListFlagsUsageResponse, error)
- func (c *ClientWithResponses) ListFlagsWithResponse(ctx context.Context, params *ListFlagsParams, reqEditors ...RequestEditorFn) (*ListFlagsResponse, error)
- func (c *ClientWithResponses) RemoveReferencesWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, body RemoveReferencesApplicationVndAPIPlusJSONRequestBody, ...) (*RemoveReferencesResponse, error)
- func (c *ClientWithResponses) RemoveReferencesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, ...) (*RemoveReferencesResponse, error)
- func (c *ClientWithResponses) UpdateFlagWithApplicationVndAPIPlusJSONBodyWithResponse(ctx context.Context, id string, ...) (*UpdateFlagResponse, error)
- func (c *ClientWithResponses) UpdateFlagWithBodyWithResponse(ctx context.Context, id string, contentType string, body io.Reader, ...) (*UpdateFlagResponse, error)
- type ClientWithResponsesInterface
- type CreateFlagApplicationVndAPIPlusJSONRequestBody
- type CreateFlagResponse
- type DeleteFlagResponse
- type Flag
- type FlagBulkItem
- type FlagBulkItemType
- type FlagBulkRequest
- type FlagBulkResponse
- type FlagEnvironment
- type FlagListResponse
- type FlagRequest
- type FlagResource
- type FlagResourceType
- type FlagResponse
- type FlagRule
- type FlagSource
- type FlagSourceDeclaredType
- type FlagSourceListResponse
- type FlagSourceResource
- type FlagSourceResourceType
- type FlagType
- type FlagValue
- type GetFlagResponse
- type HttpRequestDoer
- type ListAllFlagSourcesParams
- type ListAllFlagSourcesResponse
- type ListFlagSourcesResponse
- type ListFlagsParams
- type ListFlagsResponse
- type ListFlagsUsageParams
- type ListFlagsUsageResponse
- type ManualReviewItem
- type RemoveReferencesApplicationVndAPIPlusJSONRequestBody
- type RemoveReferencesAttributes
- type RemoveReferencesRequest
- type RemoveReferencesResponse
- type RemoveReferencesResultEnvelope
- type RemoveReferencesResultResource
- type RemoveReferencesResultResourceType
- type RequestEditorFn
- type UpdateFlagApplicationVndAPIPlusJSONRequestBody
- type UpdateFlagResponse
- type UsageAttributes
- type UsageListResponse
- type UsageResource
- type UsageResourceType
Constants ¶
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 ¶
NewDeleteFlagRequest generates requests for DeleteFlag
func NewGetFlagRequest ¶
NewGetFlagRequest generates requests for GetFlag
func NewListAllFlagSourcesRequest ¶
func NewListAllFlagSourcesRequest(server string, params *ListAllFlagSourcesParams) (*http.Request, error)
NewListAllFlagSourcesRequest generates requests for ListAllFlagSources
func NewListFlagSourcesRequest ¶
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
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 (*Client) CreateFlagWithApplicationVndAPIPlusJSONBody ¶
func (c *Client) CreateFlagWithApplicationVndAPIPlusJSONBody(ctx context.Context, body CreateFlagApplicationVndAPIPlusJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) CreateFlagWithBody ¶
func (*Client) DeleteFlag ¶
func (*Client) ListAllFlagSources ¶
func (c *Client) ListAllFlagSources(ctx context.Context, params *ListAllFlagSourcesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) ListFlagSources ¶
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 (*Client) UpdateFlagWithApplicationVndAPIPlusJSONBody ¶
func (c *Client) UpdateFlagWithApplicationVndAPIPlusJSONBody(ctx context.Context, id string, body UpdateFlagApplicationVndAPIPlusJSONRequestBody, 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 ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) 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 = FlagRequest
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 ¶
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 When the flag was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
// Default Default value returned when no environment rule fires and the environment has no `default`. For constrained flags (non-null `values`), must equal one of the entries in the `values` array. For unconstrained flags, must match `type`.
Default interface{} `json:"default"`
// Description Human-readable description of the flag's purpose.
Description *string `json:"description,omitempty"`
// Environments Per-environment configuration keyed by environment name (`production`, `staging`, etc.). Environments not listed fall back to the flag's global `default`.
Environments *map[string]FlagEnvironment `json:"environments,omitempty"`
// Managed `true` when the flag was created through the API, `false` when it was auto-discovered from a bulk-register call. Auto-discovered flags can be edited and converted to managed by setting this to `true`.
Managed *bool `json:"managed,omitempty"`
// Name Human-readable display name for the flag.
Name string `json:"name"`
// Sources SDK-reported observations of this flag, grouped by service and environment. Populated automatically by the bulk-register endpoint.
Sources *[]FlagSource `json:"sources,omitempty"`
// Type Value type of the flag. Accepted case-insensitively. Changing the type cascades to `values`, `default`, and every environment's rules and default.
Type FlagType `json:"type"`
// UpdatedAt When the flag was last modified.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
// Values Ordered set of allowed values for a constrained flag, or `null` for an unconstrained flag. `BOOLEAN` flags, if constrained, must declare exactly two values.
Values *[]FlagValue `json:"values,omitempty"`
}
Flag A feature flag whose value is resolved at runtime from environment rules and a default.
A flag has a value type (`BOOLEAN`, `STRING`, `NUMERIC`, or `JSON`) and either a fixed set of allowed values (constrained) or accepts any value matching the type (unconstrained). Each environment can enable or disable the flag, set its own default, and define targeting rules that override the default for specific evaluation contexts.
type FlagBulkItem ¶
type FlagBulkItem struct {
// Default Default value the SDK declared for the flag. Used to create the flag if it does not already exist.
Default interface{} `json:"default"`
// Environment Environment reporting the declaration. Defaults to `unknown`.
Environment *string `json:"environment,omitempty"`
// Id Flag key as declared in code. URL-safe and stable for the lifetime of the flag.
Id string `json:"id"`
// Service Service reporting the declaration. Defaults to `unknown`.
Service *string `json:"service,omitempty"`
// Type Value type the SDK declared for the flag. Accepted case-insensitively.
Type FlagBulkItemType `json:"type"`
}
FlagBulkItem One flag declaration reported by an SDK during bulk registration.
type FlagBulkItemType ¶ added in v3.0.33
type FlagBulkItemType string
FlagBulkItemType Value type the SDK declared for the flag. Accepted case-insensitively.
const ( FlagBulkItemTypeBOOLEAN FlagBulkItemType = "BOOLEAN" FlagBulkItemTypeJSON FlagBulkItemType = "JSON" FlagBulkItemTypeNUMERIC FlagBulkItemType = "NUMERIC" FlagBulkItemTypeSTRING FlagBulkItemType = "STRING" )
Defines values for FlagBulkItemType.
func (FlagBulkItemType) Valid ¶ added in v3.0.33
func (e FlagBulkItemType) Valid() bool
Valid indicates whether the value is a known member of the FlagBulkItemType enum.
type FlagBulkRequest ¶
type FlagBulkRequest struct {
// Flags Flags reported by the SDK in this batch.
Flags []FlagBulkItem `json:"flags"`
}
FlagBulkRequest Inputs to the bulk-register-flags action.
type FlagBulkResponse ¶
type FlagBulkResponse struct {
// Registered Number of items in the batch that were registered or refreshed.
Registered int `json:"registered"`
}
FlagBulkResponse Result of a bulk-register-flags action.
type FlagEnvironment ¶
type FlagEnvironment struct {
// Default Environment-level default returned when no rule fires. If `null`, evaluation falls back to the flag's global `default`.
Default interface{} `json:"default,omitempty"`
// Enabled Whether the flag is active in this environment. When `false`, evaluation skips rules and returns the flag's global `default`.
Enabled *bool `json:"enabled,omitempty"`
// Rules Targeting rules evaluated top-down. The first rule whose logic returns truthy provides the result.
Rules *[]FlagRule `json:"rules,omitempty"`
}
FlagEnvironment Per-environment evaluation configuration for a flag.
type FlagListResponse ¶
type FlagListResponse struct {
Data []FlagResource `json:"data"`
}
FlagListResponse JSON:API collection response envelope for flags.
type FlagRequest ¶ added in v3.0.33
type FlagRequest struct {
// Data JSON:API resource envelope for a flag.
//
// `id` is the flag key. For create requests, `id` is required and is
// chosen by the caller. For update requests, `id` may be omitted (the
// server reads the key from the URL) or supplied to rename the flag.
Data FlagResource `json:"data"`
}
FlagRequest JSON:API request envelope for creating or updating a flag.
type FlagResource ¶
type FlagResource struct {
// Attributes A feature flag whose value is resolved at runtime from environment
// rules and a default.
//
// A flag has a value type (`BOOLEAN`, `STRING`, `NUMERIC`, or `JSON`)
// and either a fixed set of allowed values (constrained) or accepts
// any value matching the type (unconstrained). Each environment can
// enable or disable the flag, set its own default, and define
// targeting rules that override the default for specific evaluation
// contexts.
Attributes Flag `json:"attributes"`
Id *string `json:"id,omitempty"`
Type FlagResourceType `json:"type"`
}
FlagResource JSON:API resource envelope for a flag.
`id` is the flag key. For create requests, `id` is required and is chosen by the caller. For update requests, `id` may be omitted (the server reads the key from the URL) or supplied to rename the flag.
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 JSON:API resource envelope for a flag.
//
// `id` is the flag key. For create requests, `id` is required and is
// chosen by the caller. For update requests, `id` may be omitted (the
// server reads the key from the URL) or supplied to rename the flag.
Data FlagResource `json:"data"`
}
FlagResponse JSON:API single-resource response envelope for a flag.
type FlagRule ¶
type FlagRule struct {
// Description Human-readable description of the rule.
Description *string `json:"description,omitempty"`
// Logic JSON Logic expression evaluated against the evaluation context. The rule fires when the expression is truthy.
Logic map[string]interface{} `json:"logic"`
// Value Value returned when the rule fires. Must reference a value from the flag's `values` array (constrained flags) or match the flag's `type` (unconstrained flags).
Value interface{} `json:"value"`
}
FlagRule A targeting rule that overrides the default within an environment.
type FlagSource ¶
type FlagSource struct {
// CreatedAt When the source record was created.
CreatedAt *time.Time `json:"created_at,omitempty"`
// DeclaredDefault Default value the SDK reported when registering the flag from this service/environment. May differ from the flag's authoritative `default` if the service is running stale code.
DeclaredDefault interface{} `json:"declared_default,omitempty"`
// DeclaredType Value type the SDK reported when registering the flag from this service/environment. May differ from the flag's authoritative `type` if the service is running stale code.
DeclaredType *FlagSourceDeclaredType `json:"declared_type,omitempty"`
// Environment Environment in which the service declared the flag.
Environment *string `json:"environment,omitempty"`
// FirstObserved When this source was first observed.
FirstObserved *time.Time `json:"first_observed,omitempty"`
// LastSeen Most recent time the SDK re-registered this source.
LastSeen *time.Time `json:"last_seen,omitempty"`
// Service Service that declared the flag.
Service *string `json:"service,omitempty"`
// UpdatedAt When the source record was last modified.
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}
FlagSource A record of an SDK observing a feature flag from a particular service and environment.
The flags service auto-registers a source the first time an SDK reports a flag from a given service/environment pair and refreshes `last_seen` on every subsequent report. Each source captures the value type and default value the SDK declared in source code at that location, which makes it possible to detect when service code has drifted from the flag's authoritative configuration.
type FlagSourceDeclaredType ¶ added in v3.0.33
type FlagSourceDeclaredType string
FlagSourceDeclaredType Value type the SDK reported when registering the flag from this service/environment. May differ from the flag's authoritative `type` if the service is running stale code.
const ( BOOLEAN FlagSourceDeclaredType = "BOOLEAN" JSON FlagSourceDeclaredType = "JSON" NUMERIC FlagSourceDeclaredType = "NUMERIC" STRING FlagSourceDeclaredType = "STRING" )
Defines values for FlagSourceDeclaredType.
func (FlagSourceDeclaredType) Valid ¶ added in v3.0.33
func (e FlagSourceDeclaredType) Valid() bool
Valid indicates whether the value is a known member of the FlagSourceDeclaredType enum.
type FlagSourceListResponse ¶
type FlagSourceListResponse struct {
Data []FlagSourceResource `json:"data"`
}
FlagSourceListResponse JSON:API collection response envelope for flag sources.
type FlagSourceResource ¶
type FlagSourceResource struct {
// Attributes A record of an SDK observing a feature flag from a particular
// service and environment.
//
// The flags service auto-registers a source the first time an SDK
// reports a flag from a given service/environment pair and refreshes
// `last_seen` on every subsequent report. Each source captures the
// value type and default value the SDK declared in source code at
// that location, which makes it possible to detect when service code
// has drifted from the flag's authoritative configuration.
Attributes FlagSource `json:"attributes"`
Id *string `json:"id,omitempty"`
Type FlagSourceResourceType `json:"type"`
}
FlagSourceResource JSON:API resource envelope for a flag source.
`id` is the source record's UUID. Sources are not created or modified directly — the flags service registers and refreshes them in response to SDK bulk-register requests.
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 FlagType ¶ added in v3.0.33
type FlagType string
FlagType Value type of the flag. Accepted case-insensitively. Changing the type cascades to `values`, `default`, and every environment's rules and default.
type FlagValue ¶
type FlagValue struct {
// Name Human-readable label for the value.
Name string `json:"name"`
// Value The value itself. Must match the flag's `type`.
Value interface{} `json:"value"`
}
FlagValue A named value in a constrained flag's value set.
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 ¶
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 ¶
func (r ListAllFlagSourcesResponse) Status() string
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 Environment containing the rule.
Environment string `json:"environment"`
// Flag Key of the flag containing the rule.
Flag string `json:"flag"`
// Reason Why the rule needs manual review.
Reason string `json:"reason"`
// RuleIndex Position of the rule within the environment's `rules` array.
RuleIndex int `json:"rule_index"`
}
ManualReviewItem A flag rule that could not be safely modified by the bulk remove-references action.
type RemoveReferencesApplicationVndAPIPlusJSONRequestBody ¶
type RemoveReferencesApplicationVndAPIPlusJSONRequestBody = RemoveReferencesRequest
RemoveReferencesApplicationVndAPIPlusJSONRequestBody defines body for RemoveReferences for application/vnd.api+json ContentType.
type RemoveReferencesAttributes ¶
type RemoveReferencesAttributes struct {
// FlagsModified Keys of flags whose rules were modified.
FlagsModified []string `json:"flags_modified"`
// RulesNeedingManualReview Rules that referenced the context but could not be removed automatically (typically because the reference is inside an `and` expression where removal would broaden the rule).
RulesNeedingManualReview []ManualReviewItem `json:"rules_needing_manual_review"`
// RulesRemoved Total number of rules removed across all flags.
RulesRemoved int `json:"rules_removed"`
}
RemoveReferencesAttributes Counts and follow-ups returned by the remove-references action.
type RemoveReferencesRequest ¶
type RemoveReferencesRequest struct {
// Context Identifier of the context instance to remove references to, formatted as `{type}:{key}` (e.g. `customer:c-123`).
Context *string `json:"context,omitempty"`
// ContextType Context type to remove all references to (any attribute of this type).
ContextType *string `json:"context_type,omitempty"`
}
RemoveReferencesRequest Inputs to the remove-references action.
Exactly one of `context` or `context_type` must be provided.
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 JSON:API resource envelope for the remove-references result.
Data RemoveReferencesResultResource `json:"data"`
}
RemoveReferencesResultEnvelope JSON:API single-resource response envelope for the remove-references action.
type RemoveReferencesResultResource ¶
type RemoveReferencesResultResource struct {
// Attributes Counts and follow-ups returned by the remove-references action.
Attributes RemoveReferencesAttributes `json:"attributes"`
Type *RemoveReferencesResultResourceType `json:"type,omitempty"`
}
RemoveReferencesResultResource JSON:API resource envelope for the remove-references result.
type RemoveReferencesResultResourceType ¶
type RemoveReferencesResultResourceType string
RemoveReferencesResultResourceType defines model for RemoveReferencesResultResource.Type.
const (
RemoveReferencesResult RemoveReferencesResultResourceType = "remove_references_result"
)
Defines values for RemoveReferencesResultResourceType.
func (RemoveReferencesResultResourceType) Valid ¶
func (e RemoveReferencesResultResourceType) Valid() bool
Valid indicates whether the value is a known member of the RemoveReferencesResultResourceType enum.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type UpdateFlagApplicationVndAPIPlusJSONRequestBody ¶
type UpdateFlagApplicationVndAPIPlusJSONRequestBody = FlagRequest
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 Identifier of the metered limit, e.g. `flags.items`.
LimitKey string `json:"limit_key"`
// Period Period the counter covers. `current` is the only supported value.
Period string `json:"period"`
// Value Count for the period.
Value int `json:"value"`
}
UsageAttributes Usage counter for a single metered limit.
type UsageListResponse ¶
type UsageListResponse struct {
Data []UsageResource `json:"data"`
}
UsageListResponse JSON:API collection response envelope for usage counters.
type UsageResource ¶
type UsageResource struct {
// Attributes Usage counter for a single metered limit.
Attributes UsageAttributes `json:"attributes"`
Id string `json:"id"`
Type UsageResourceType `json:"type"`
}
UsageResource JSON:API resource envelope for a usage counter.
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.