plans

package
v1.21.2 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 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 dev.azure.com/schwarzit/schwarzit.odj.core/_git/stackit-client-generator.git version v1.0.23 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 contracts.BaseClientInterface
}

Client which conforms to the OpenAPI3 specification for this service.

func NewRawClient

func NewRawClient(server string, httpClient contracts.BaseClientInterface) *Client

NewRawClient Creates a new Client, with reasonable defaults

func (*Client) ListOfferingsRaw

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

func (*Client) ListPlansRaw

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

type ClientWithResponses

type ClientWithResponses struct {
	// contains filtered or unexported fields
}

ClientWithResponses builds on rawClientInterface to offer response payloads

func NewClient

func NewClient(server string, httpClient contracts.BaseClientInterface) *ClientWithResponses

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

func (*ClientWithResponses) ListOfferings

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

ListOfferings request returning *ListOfferingsResponse

func (*ClientWithResponses) ListPlans

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

ListPlans request returning *ListPlansResponse

func (*ClientWithResponses) ParseListOfferingsResponse

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

ParseListOfferingsResponse parses an HTTP response from a ListOfferings call

func (*ClientWithResponses) ParseListPlansResponse

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

ParseListPlansResponse parses an HTTP response from a ListPlans call

type ClientWithResponsesInterface

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

	// ListPlans request
	ListPlans(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
	Error        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
	Error        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                      openapiTypes.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                  openapiTypes.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