plans

package
v1.10.7 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

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

Code generated by github.com/do87/oapi-codegen version v0.5.1 DO NOT EDIT.

Index

Constants

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

Variables

This section is empty.

Functions

func NewListOfferingsRequest

func NewListOfferingsRequest(ctx context.Context, server string, projectID string) (*http.Request, error)

NewListOfferingsRequest generates requests for ListOfferings

func NewListPlansRequest

func NewListPlansRequest(ctx context.Context, server string, projectID string) (*http.Request, error)

NewListPlansRequest generates requests for ListPlans

Types

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 common.Client
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, httpClient common.Client) *Client

Creates a new Client, with reasonable defaults

func (*Client) ListOfferings

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

func (*Client) ListPlans

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

type ClientInterface

type ClientInterface interface {
	// ListOfferings request
	ListOfferings(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListPlans request
	ListPlans(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, httpClient common.Client) *ClientWithResponses

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) ListOfferingsWithResponse

func (c *ClientWithResponses) ListOfferingsWithResponse(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*ListOfferingsResponse, error)

ListOfferingsWithResponse request returning *ListOfferingsResponse

func (*ClientWithResponses) ListPlansWithResponse

func (c *ClientWithResponses) ListPlansWithResponse(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*ListPlansResponse, error)

ListPlansWithResponse request returning *ListPlansResponse

func (*ClientWithResponses) ParseListOfferingsResponse

func (c *ClientWithResponses) ParseListOfferingsResponse(rsp *http.Response) (*ListOfferingsResponse, error)

ParseListOfferingsResponse parses an HTTP response from a ListOfferingsWithResponse call

func (*ClientWithResponses) ParseListPlansResponse

func (c *ClientWithResponses) ParseListPlansResponse(rsp *http.Response) (*ListPlansResponse, error)

ParseListPlansResponse parses an HTTP response from a ListPlansWithResponse call

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListOfferings request
	ListOfferingsWithResponse(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*ListOfferingsResponse, error)

	// ListPlans request
	ListPlansWithResponse(ctx context.Context, projectID string, reqEditors ...RequestEditorFn) (*ListPlansResponse, error)
}

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

type ListOfferingsResponse

type ListOfferingsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Offerings
	JSON403      *PermissionDenied
	HasError     error // Aggregated error
}

func (ListOfferingsResponse) Status

func (r ListOfferingsResponse) Status() string

Status returns HTTPResponse.Status

func (ListOfferingsResponse) StatusCode

func (r ListOfferingsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListPlansResponse

type ListPlansResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Plan
	JSON403      *PermissionDenied
	HasError     error // Aggregated error
}

func (ListPlansResponse) Status

func (r ListPlansResponse) Status() string

Status returns HTTPResponse.Status

func (ListPlansResponse) StatusCode

func (r ListPlansResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Offerings

type Offerings struct {
	Description      string        `json:"description"`
	DocumentationURL string        `json:"documentationUrl"`
	ImageURL         string        `json:"imageUrl"`
	Name             string        `json:"name"`
	Plans            []PlanModelUI `json:"plans"`
	Tags             []string      `json:"tags"`
}

Offerings defines model for Offerings.

type PermissionDenied

type PermissionDenied struct {
	Detail string `json:"detail"`
}

PermissionDenied defines model for PermissionDenied.

type Plan

type Plan struct {
	Message string        `json:"message"`
	Plans   []PlanModelUI `json:"plans"`
}

Plan defines model for Plan.

type PlanModelUI

type PlanModelUI struct {
	AlertMatchers           int                `json:"alertMatchers"`
	AlertReceivers          int                `json:"alertReceivers"`
	AlertRules              int                `json:"alertRules"`
	Amount                  *float32           `json:"amount,omitempty"`
	BucketSize              int                `json:"bucketSize"`
	Description             *string            `json:"description,omitempty"`
	GrafanaGlobalDashboards int                `json:"grafanaGlobalDashboards"`
	GrafanaGlobalOrgs       int                `json:"grafanaGlobalOrgs"`
	GrafanaGlobalSessions   int                `json:"grafanaGlobalSessions"`
	GrafanaGlobalUsers      int                `json:"grafanaGlobalUsers"`
	ID                      openapi_types.UUID `json:"id"`
	IsFree                  *bool              `json:"isFree,omitempty"`
	IsPublic                *bool              `json:"isPublic,omitempty"`
	LogsAlert               int                `json:"logsAlert"`
	LogsStorage             int                `json:"logsStorage"`
	Name                    *string            `json:"name,omitempty"`
	PlanID                  openapi_types.UUID `json:"planId"`
	SamplesPerScrape        int                `json:"samplesPerScrape"`
	Schema                  *string            `json:"schema,omitempty"`
	TargetNumber            int                `json:"targetNumber"`
	TracesStorage           int                `json:"tracesStorage"`
}

PlanModelUI defines model for PlanModelUI.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

Jump to

Keyboard shortcuts

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