sdk

package module
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

README

FastEdge Client SDK

This SDK allows to communicate with Gcore's FastEdge API.

SDK code is generated from OpenAPI spec. The maintainers of the repo keep generated SDK code up-to-date with FastEdge API spec so typically you would just need to update the code from repo.

However, if you need to re-generate SDK, run make generate. Please note that it requires oapi-codegen as a generator.

Documentation

Overview

Package sdk is FastEdge API client SDK. It provides a Go client to be used in CLI tool and Terraform provider. The SDK is generated from the FastEdge API OpenAPI specification (see Makefile for generation command).

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

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

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

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

Index

Constants

View Source
const (
	SDKpackage = "github.com/G-Core/FastEdge-client-sdk-go"
)

Variables

This section is empty.

Functions

func AddVersionHeader added in v0.3.1

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

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func GetVersion added in v0.3.1

func GetVersion() string

func NewAddAppRequest

func NewAddAppRequest(server string, body AddAppJSONRequestBody) (*http.Request, error)

NewAddAppRequest calls the generic AddApp builder with application/json body

func NewAddAppRequestWithBody

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

NewAddAppRequestWithBody generates requests for AddApp with any type of body

func NewAddSecretRequest added in v0.3.0

func NewAddSecretRequest(server string, body AddSecretJSONRequestBody) (*http.Request, error)

NewAddSecretRequest calls the generic AddSecret builder with application/json body

func NewAddSecretRequestWithBody added in v0.3.0

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

NewAddSecretRequestWithBody generates requests for AddSecret with any type of body

func NewAddTemplateRequest added in v0.3.0

func NewAddTemplateRequest(server string, body AddTemplateJSONRequestBody) (*http.Request, error)

NewAddTemplateRequest calls the generic AddTemplate builder with application/json body

func NewAddTemplateRequestWithBody added in v0.3.0

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

NewAddTemplateRequestWithBody generates requests for AddTemplate with any type of body

func NewDelAppRequest

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

NewDelAppRequest generates requests for DelApp

func NewDelBinaryRequest

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

NewDelBinaryRequest generates requests for DelBinary

func NewDelTemplateRequest added in v0.3.0

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

NewDelTemplateRequest generates requests for DelTemplate

func NewDeleteSecretRequest added in v0.3.0

func NewDeleteSecretRequest(server string, id int64, params *DeleteSecretParams) (*http.Request, error)

NewDeleteSecretRequest generates requests for DeleteSecret

func NewGetAppIdByNameRequest

func NewGetAppIdByNameRequest(server string, name string) (*http.Request, error)

NewGetAppIdByNameRequest generates requests for GetAppIdByName

func NewGetAppRequest

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

NewGetAppRequest generates requests for GetApp

func NewGetBinaryRequest

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

NewGetBinaryRequest generates requests for GetBinary

func NewGetClientMeRequest

func NewGetClientMeRequest(server string) (*http.Request, error)

NewGetClientMeRequest generates requests for GetClientMe

func NewGetSecretRequest added in v0.3.2

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

NewGetSecretRequest generates requests for GetSecret

func NewGetTemplateRequest added in v0.3.0

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

NewGetTemplateRequest generates requests for GetTemplate

func NewJsonHttpResponse added in v0.3.3

func NewJsonHttpResponse(status int, content string) *http.Response

NewJsonHttpResponse creates a new http.Response with the given status code and content. The content is expected to be a JSON string.

func NewListAppsRequest

func NewListAppsRequest(server string, params *ListAppsParams) (*http.Request, error)

NewListAppsRequest generates requests for ListApps

func NewListBinariesRequest

func NewListBinariesRequest(server string) (*http.Request, error)

NewListBinariesRequest generates requests for ListBinaries

func NewListLogsRequest added in v0.2.0

func NewListLogsRequest(server string, id int64, params *ListLogsParams) (*http.Request, error)

NewListLogsRequest generates requests for ListLogs

func NewListSecretsRequest added in v0.3.0

func NewListSecretsRequest(server string, params *ListSecretsParams) (*http.Request, error)

NewListSecretsRequest generates requests for ListSecrets

func NewListTemplatesRequest added in v0.3.0

func NewListTemplatesRequest(server string, params *ListTemplatesParams) (*http.Request, error)

NewListTemplatesRequest generates requests for ListTemplates

func NewPatchAppRequest

func NewPatchAppRequest(server string, id int64, body PatchAppJSONRequestBody) (*http.Request, error)

NewPatchAppRequest calls the generic PatchApp builder with application/json body

func NewPatchAppRequestWithBody

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

NewPatchAppRequestWithBody generates requests for PatchApp with any type of body

func NewPatchSecretRequest added in v0.3.6

func NewPatchSecretRequest(server string, id int64, body PatchSecretJSONRequestBody) (*http.Request, error)

NewPatchSecretRequest calls the generic PatchSecret builder with application/json body

func NewPatchSecretRequestWithBody added in v0.3.6

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

NewPatchSecretRequestWithBody generates requests for PatchSecret with any type of body

func NewStatsCallsRequest added in v0.2.0

func NewStatsCallsRequest(server string, params *StatsCallsParams) (*http.Request, error)

NewStatsCallsRequest generates requests for StatsCalls

func NewStatsDurationRequest added in v0.2.0

func NewStatsDurationRequest(server string, params *StatsDurationParams) (*http.Request, error)

NewStatsDurationRequest generates requests for StatsDuration

func NewStoreBinaryRequestWithBody

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

NewStoreBinaryRequestWithBody generates requests for StoreBinary with any type of body

func NewUpdateAppRequest

func NewUpdateAppRequest(server string, id int64, body UpdateAppJSONRequestBody) (*http.Request, error)

NewUpdateAppRequest calls the generic UpdateApp builder with application/json body

func NewUpdateAppRequestWithBody

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

NewUpdateAppRequestWithBody generates requests for UpdateApp with any type of body

func NewUpdateSecretRequest added in v0.3.0

func NewUpdateSecretRequest(server string, id int64, body UpdateSecretJSONRequestBody) (*http.Request, error)

NewUpdateSecretRequest calls the generic UpdateSecret builder with application/json body

func NewUpdateSecretRequestWithBody added in v0.3.0

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

NewUpdateSecretRequestWithBody generates requests for UpdateSecret with any type of body

func NewUpdateTemplateRequest added in v0.3.0

func NewUpdateTemplateRequest(server string, id int64, body UpdateTemplateJSONRequestBody) (*http.Request, error)

NewUpdateTemplateRequest calls the generic UpdateTemplate builder with application/json body

func NewUpdateTemplateRequestWithBody added in v0.3.0

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

NewUpdateTemplateRequestWithBody generates requests for UpdateTemplate with any type of body

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type AddAppJSONRequestBody

type AddAppJSONRequestBody = App

AddAppJSONRequestBody defines body for AddApp for application/json ContentType.

type AddAppResponse

type AddAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AppShort
	JSON400      *Error
	JSON429      *Error
	JSON503      *Error
}

func ParseAddAppResponse

func ParseAddAppResponse(rsp *http.Response) (*AddAppResponse, error)

ParseAddAppResponse parses an HTTP response from a AddAppWithResponse call

func (AddAppResponse) Status

func (r AddAppResponse) Status() string

Status returns HTTPResponse.Status

func (AddAppResponse) StatusCode

func (r AddAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddSecretJSONBody added in v0.3.6

type AddSecretJSONBody struct {
	// Embedded struct due to allOf(./schemas.yml#/components/schemas/secret)
	Secret `yaml:",inline"`
}

AddSecretJSONBody defines parameters for AddSecret.

type AddSecretJSONRequestBody added in v0.3.0

type AddSecretJSONRequestBody AddSecretJSONBody

AddSecretJSONRequestBody defines body for AddSecret for application/json ContentType.

type AddSecretResponse added in v0.3.0

type AddSecretResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Embedded struct due to allOf(./schemas.yml#/components/schemas/secret)
		Secret `yaml:",inline"`
		// Embedded fields due to inline allOf schema
		// Id The unique identifier of the secret.
		Id *int64 `json:"id,omitempty"`
	}
	JSON400 *Error
	JSON503 *Error
}

func ParseAddSecretResponse added in v0.3.0

func ParseAddSecretResponse(rsp *http.Response) (*AddSecretResponse, error)

ParseAddSecretResponse parses an HTTP response from a AddSecretWithResponse call

func (AddSecretResponse) Status added in v0.3.0

func (r AddSecretResponse) Status() string

Status returns HTTPResponse.Status

func (AddSecretResponse) StatusCode added in v0.3.0

func (r AddSecretResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddTemplateJSONRequestBody added in v0.3.0

type AddTemplateJSONRequestBody = Template

AddTemplateJSONRequestBody defines body for AddTemplate for application/json ContentType.

type AddTemplateResponse added in v0.3.0

type AddTemplateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TemplateShort
	JSON400      *Error
	JSON503      *Error
}

func ParseAddTemplateResponse added in v0.3.0

func ParseAddTemplateResponse(rsp *http.Response) (*AddTemplateResponse, error)

ParseAddTemplateResponse parses an HTTP response from a AddTemplateWithResponse call

func (AddTemplateResponse) Status added in v0.3.0

func (r AddTemplateResponse) Status() string

Status returns HTTPResponse.Status

func (AddTemplateResponse) StatusCode added in v0.3.0

func (r AddTemplateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type App

type App struct {
	// ApiType Wasm API type
	ApiType *string `json:"api_type,omitempty"`

	// Binary Binary ID
	Binary *int64 `json:"binary,omitempty"`

	// Comment App description
	Comment *string `json:"comment,omitempty"`

	// Debug Switch on logging for 30 minutes (switched off by default)
	Debug *bool `json:"debug,omitempty"`

	// DebugUntil When debugging finishes
	DebugUntil *time.Time `json:"debug_until,omitempty"`

	// Env Environment variables
	Env *map[string]string `json:"env,omitempty"`

	// Log Logging channel (by default - kafka, which allows exploring logs with API)
	Log *AppLog `json:"log"`

	// Name App name
	Name *string `json:"name,omitempty"`

	// Networks Networks
	Networks *[]string `json:"networks,omitempty"`

	// Plan Plan name
	Plan *string `json:"plan,omitempty"`

	// RspHeaders Extra headers to add to the response
	RspHeaders *map[string]string `json:"rsp_headers,omitempty"`

	// Secrets Application secrets
	Secrets *map[string]AppSecretShort `json:"secrets,omitempty"`

	// Status Status code:<br>0 - draft (inactive)<br>1 - enabled<br>2 - disabled<br>3 - hourly call limit exceeded<br>4 - daily call limit exceeded<br>5 - suspended
	Status *int `json:"status,omitempty"`

	// Template Template ID
	Template *int64 `json:"template,omitempty"`

	// TemplateName Template name
	TemplateName *string `json:"template_name,omitempty"`

	// Url App URL
	Url *string `json:"url,omitempty"`
}

App defines model for app.

type AppLog

type AppLog string

AppLog Logging channel (by default - kafka, which allows exploring logs with API)

const (
	Kafka AppLog = "kafka"
	None  AppLog = "none"
)

Defines values for AppLog.

type AppSecretShort added in v0.3.2

type AppSecretShort struct {
	// Comment A description or comment about the secret.
	Comment *string `json:"comment,omitempty"`

	// Id The unique identifier of the secret.
	Id int64 `json:"id"`

	// Name The unique name of the secret.
	Name *string `json:"name,omitempty"`
}

AppSecretShort Application secret short description

type AppShort

type AppShort struct {
	// ApiType Wasm API type
	ApiType string `json:"api_type"`

	// Binary Binary ID
	Binary int64 `json:"binary"`

	// Comment Description of the binary
	Comment *string `json:"comment,omitempty"`

	// Debug Switch on logging for 30 minutes (switched off by default)
	Debug *bool `json:"debug,omitempty"`

	// DebugUntil When debugging finishes
	DebugUntil *time.Time `json:"debug_until,omitempty"`

	// Id App ID
	Id int64 `json:"id"`

	// Name App name
	Name string `json:"name"`

	// Networks Networks
	Networks *[]string `json:"networks,omitempty"`

	// Plan Application plan
	Plan string `json:"plan"`

	// Status Status code:<br>0 - draft (inactive)<br>1 - enabled<br>2 - disabled<br>3 - hourly call limit exceeded<br>4 - daily call limit exceeded<br>5 - suspended
	Status int `json:"status"`

	// Template Template ID
	Template *int64 `json:"template,omitempty"`

	// TemplateName Template name
	TemplateName *string `json:"template_name,omitempty"`

	// UpgradeableTo ID of the binary the app can be upgraded to
	UpgradeableTo *int64 `json:"upgradeable_to,omitempty"`

	// Url App URL
	Url *string `json:"url,omitempty"`
}

AppShort defines model for app_short.

type AppShortAdmin added in v0.3.0

type AppShortAdmin struct {
	// Embedded struct due to allOf(#/components/schemas/app_short)
	AppShort `yaml:",inline"`
	// Embedded fields due to inline allOf schema
	// ClientId Client ID
	ClientId int64 `json:"client_id"`

	// ResellerId Reseller ID
	ResellerId *int64 `json:"reseller_id"`
}

AppShortAdmin defines model for app_short_admin.

type Binary

type Binary struct {
	// ApiType Wasm API type
	ApiType string `json:"api_type"`

	// Checksum MD5 hash of the binary
	Checksum *string `json:"checksum,omitempty"`

	// Id Binary ID
	Id int64 `json:"id"`

	// Source Source language:<br>0 - unknown<br>1 - Rust<br>2 - JavaScript
	Source int `json:"source"`

	// Status Status code:<br>0 - pending<br>1 - compiled<br>2 - compilation failed (errors available)<br>3 - compilation failed (errors not available)<br>4 - resulting binary exceeded the limit<br>5 - unsupported source language
	Status int `json:"status"`

	// UnrefSince Not used since (UTC)
	UnrefSince *string `json:"unref_since,omitempty"`
}

Binary defines model for binary.

type BinaryShort

type BinaryShort struct {
	// ApiType Wasm API type
	ApiType string `json:"api_type"`

	// Checksum MD5 hash of the binary
	Checksum *string `json:"checksum,omitempty"`

	// Id Binary ID
	Id int64 `json:"id"`

	// Status Status code:<br>0 - pending<br>1 - compiled<br>2 - compilation failed (errors available)<br>3 - compilation failed (errors not available)<br>4 - resulting binary exceeded the limit<br>5 - unsupported source language
	Status int `json:"status"`

	// UnrefSince Not used since (UTC)
	UnrefSince *string `json:"unref_since,omitempty"`
}

BinaryShort defines model for binary_short.

type BufCloser added in v0.3.3

type BufCloser struct {
	bytes.Buffer
}

BufCloser implements io.ReadCloser

func NewBufCloser added in v0.3.3

func NewBufCloser(content string) *BufCloser

func (BufCloser) Close added in v0.3.3

func (b BufCloser) Close() error

type CallStats

type CallStats struct {
	// CountByStatus Count by status
	CountByStatus []CountByStatus `json:"count_by_status"`

	// Time Beginning ot reporting slot
	Time time.Time `json:"time"`
}

CallStats Edge app call statistics

type Client

type Client struct {
	// AppCount Actual allowed number of apps
	AppCount int `json:"app_count"`

	// AppLimit Max allowed number of apps
	AppLimit int `json:"app_limit"`

	// DailyConsumption Actual number of calls for all apps during the current day (UTC)
	DailyConsumption int `json:"daily_consumption"`

	// DailyLimit Max allowed calls for all apps during a day (UTC)
	DailyLimit int `json:"daily_limit"`

	// HourlyConsumption Actual number of calls for all apps during the current hour
	HourlyConsumption int `json:"hourly_consumption"`

	// HourlyLimit Max allowed calls for all apps during an hour
	HourlyLimit int `json:"hourly_limit"`

	// MonthlyConsumption Actual number of calls for all apps during the current calendar month (UTC)
	MonthlyConsumption int `json:"monthly_consumption"`

	// Networks List of enabled networks
	Networks []Network `json:"networks"`

	// Plan Plan name
	Plan string `json:"plan"`

	// Status Status code:<br>1 - enabled<br>2 - disabled<br>3 - hourly call limit exceeded<br>4 - daily call limit exceeded<br>5 - suspended
	Status int `json:"status"`
}

Client defines model for client.

type ClientInterface

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

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

	AddApp(ctx context.Context, body AddAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

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

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

	PatchApp(ctx context.Context, id int64, body PatchAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	UpdateApp(ctx context.Context, id int64, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListLogs request
	ListLogs(ctx context.Context, id int64, params *ListLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListBinaries request
	ListBinaries(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

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

	// GetClientMe request
	GetClientMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

	AddSecret(ctx context.Context, body AddSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteSecret request
	DeleteSecret(ctx context.Context, id int64, params *DeleteSecretParams, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

	PatchSecret(ctx context.Context, id int64, body PatchSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

	UpdateSecret(ctx context.Context, id int64, body UpdateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

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

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

	AddTemplate(ctx context.Context, body AddTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

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

	UpdateTemplate(ctx context.Context, id int64, body UpdateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*ClientSDK) 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 ClientSDK

type ClientSDK 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
}

ClientSDK which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*ClientSDK, error)

Creates a new ClientSDK, with reasonable defaults

func (*ClientSDK) AddApp

func (c *ClientSDK) AddApp(ctx context.Context, body AddAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) AddAppWithBody

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

func (*ClientSDK) AddSecret added in v0.3.0

func (c *ClientSDK) AddSecret(ctx context.Context, body AddSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) AddSecretWithBody added in v0.3.0

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

func (*ClientSDK) AddTemplate added in v0.3.0

func (c *ClientSDK) AddTemplate(ctx context.Context, body AddTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) AddTemplateWithBody added in v0.3.0

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

func (*ClientSDK) DelApp

func (c *ClientSDK) DelApp(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) DelBinary

func (c *ClientSDK) DelBinary(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) DelTemplate added in v0.3.0

func (c *ClientSDK) DelTemplate(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) DeleteSecret added in v0.3.0

func (c *ClientSDK) DeleteSecret(ctx context.Context, id int64, params *DeleteSecretParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) GetApp

func (c *ClientSDK) GetApp(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) GetAppIdByName

func (c *ClientSDK) GetAppIdByName(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) GetBinary

func (c *ClientSDK) GetBinary(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) GetClientMe

func (c *ClientSDK) GetClientMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) GetSecret added in v0.3.2

func (c *ClientSDK) GetSecret(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) GetTemplate added in v0.3.0

func (c *ClientSDK) GetTemplate(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) ListApps

func (c *ClientSDK) ListApps(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) ListBinaries

func (c *ClientSDK) ListBinaries(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) ListLogs added in v0.2.0

func (c *ClientSDK) ListLogs(ctx context.Context, id int64, params *ListLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) ListSecrets added in v0.3.0

func (c *ClientSDK) ListSecrets(ctx context.Context, params *ListSecretsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) ListTemplates added in v0.3.0

func (c *ClientSDK) ListTemplates(ctx context.Context, params *ListTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) PatchApp

func (c *ClientSDK) PatchApp(ctx context.Context, id int64, body PatchAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) PatchAppWithBody

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

func (*ClientSDK) PatchSecret added in v0.3.6

func (c *ClientSDK) PatchSecret(ctx context.Context, id int64, body PatchSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) PatchSecretWithBody added in v0.3.6

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

func (*ClientSDK) StatsCalls added in v0.2.0

func (c *ClientSDK) StatsCalls(ctx context.Context, params *StatsCallsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) StatsDuration added in v0.2.0

func (c *ClientSDK) StatsDuration(ctx context.Context, params *StatsDurationParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) StoreBinaryWithBody

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

func (*ClientSDK) UpdateApp

func (c *ClientSDK) UpdateApp(ctx context.Context, id int64, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) UpdateAppWithBody

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

func (*ClientSDK) UpdateSecret added in v0.3.0

func (c *ClientSDK) UpdateSecret(ctx context.Context, id int64, body UpdateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) UpdateSecretWithBody added in v0.3.0

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

func (*ClientSDK) UpdateTemplate added in v0.3.0

func (c *ClientSDK) UpdateTemplate(ctx context.Context, id int64, body UpdateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) UpdateTemplateWithBody added in v0.3.0

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

type ClientSDKmock added in v0.3.3

type ClientSDKmock struct{}

ClientSDKmock is a mock implementation of the ClientInterface. Keep it in sync with ClientInterface! To use this mock, you can create a new instance of it and override only the methods you need:

type mock struct {
    ClientSDKmock
}

func (mock) GetBinary(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error) {
    return NewJsonHttpResponse(http.StatusOK, `{"id": 1, "checksum":"1234567890"}`), nil
}

func (ClientSDKmock) AddApp added in v0.3.3

func (ClientSDKmock) AddAppWithBody added in v0.3.3

func (ClientSDKmock) AddAppWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) AddSecret added in v0.3.3

func (ClientSDKmock) AddSecret(ctx context.Context, body AddSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) AddSecretWithBody added in v0.3.3

func (ClientSDKmock) AddSecretWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) AddTemplate added in v0.3.3

func (ClientSDKmock) AddTemplate(ctx context.Context, body AddTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) AddTemplateWithBody added in v0.3.3

func (ClientSDKmock) AddTemplateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) DelApp added in v0.3.3

func (ClientSDKmock) DelApp(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) DelBinary added in v0.3.3

func (ClientSDKmock) DelBinary(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) DelTemplate added in v0.3.3

func (ClientSDKmock) DelTemplate(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) DeleteSecret added in v0.3.3

func (ClientSDKmock) DeleteSecret(ctx context.Context, id int64, params *DeleteSecretParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) GetApp added in v0.3.3

func (ClientSDKmock) GetApp(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) GetAppIdByName added in v0.3.3

func (ClientSDKmock) GetAppIdByName(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) GetBinary added in v0.3.3

func (ClientSDKmock) GetBinary(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) GetClientMe added in v0.3.3

func (ClientSDKmock) GetClientMe(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) GetSecret added in v0.3.3

func (ClientSDKmock) GetSecret(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) GetTemplate added in v0.3.3

func (ClientSDKmock) GetTemplate(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) ListApps added in v0.3.3

func (ClientSDKmock) ListApps(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) ListBinaries added in v0.3.3

func (ClientSDKmock) ListBinaries(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) ListLogs added in v0.3.3

func (ClientSDKmock) ListLogs(ctx context.Context, id int64, params *ListLogsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) ListSecrets added in v0.3.3

func (ClientSDKmock) ListSecrets(ctx context.Context, params *ListSecretsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) ListTemplates added in v0.3.3

func (ClientSDKmock) ListTemplates(ctx context.Context, params *ListTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) PatchApp added in v0.3.3

func (ClientSDKmock) PatchApp(ctx context.Context, id int64, body PatchAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) PatchAppWithBody added in v0.3.3

func (ClientSDKmock) PatchAppWithBody(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) PatchSecret added in v0.3.6

func (ClientSDKmock) PatchSecret(ctx context.Context, id int64, body PatchSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) PatchSecretWithBody added in v0.3.6

func (ClientSDKmock) PatchSecretWithBody(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) StatsCalls added in v0.3.3

func (ClientSDKmock) StatsCalls(ctx context.Context, params *StatsCallsParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) StatsDuration added in v0.3.3

func (ClientSDKmock) StatsDuration(ctx context.Context, params *StatsDurationParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) StoreBinaryWithBody added in v0.3.3

func (ClientSDKmock) StoreBinaryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) UpdateApp added in v0.3.3

func (ClientSDKmock) UpdateApp(ctx context.Context, id int64, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) UpdateAppWithBody added in v0.3.3

func (ClientSDKmock) UpdateAppWithBody(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) UpdateSecret added in v0.3.3

func (ClientSDKmock) UpdateSecret(ctx context.Context, id int64, body UpdateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) UpdateSecretWithBody added in v0.3.3

func (ClientSDKmock) UpdateSecretWithBody(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) UpdateTemplate added in v0.3.3

func (ClientSDKmock) UpdateTemplate(ctx context.Context, id int64, body UpdateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (ClientSDKmock) UpdateTemplateWithBody added in v0.3.3

func (ClientSDKmock) UpdateTemplateWithBody(ctx context.Context, id int64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientUpdate added in v0.3.0

type ClientUpdate struct {
	// Networks List of available networks
	Networks []string `json:"networks"`

	// Plan Plan name
	Plan string `json:"plan"`
}

ClientUpdate defines model for clientUpdate.

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 NewClientWithVersionCheck added in v0.3.6

func NewClientWithVersionCheck(apiUrl, userAgent, toolName string, opts ...ClientOption) (*ClientWithResponses, error)

func (*ClientWithResponses) AddAppWithBodyWithResponse

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

AddAppWithBodyWithResponse request with arbitrary body returning *AddAppResponse

func (*ClientWithResponses) AddAppWithResponse

func (c *ClientWithResponses) AddAppWithResponse(ctx context.Context, body AddAppJSONRequestBody, reqEditors ...RequestEditorFn) (*AddAppResponse, error)

func (*ClientWithResponses) AddSecretWithBodyWithResponse added in v0.3.0

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

AddSecretWithBodyWithResponse request with arbitrary body returning *AddSecretResponse

func (*ClientWithResponses) AddSecretWithResponse added in v0.3.0

func (c *ClientWithResponses) AddSecretWithResponse(ctx context.Context, body AddSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*AddSecretResponse, error)

func (*ClientWithResponses) AddTemplateWithBodyWithResponse added in v0.3.0

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

AddTemplateWithBodyWithResponse request with arbitrary body returning *AddTemplateResponse

func (*ClientWithResponses) AddTemplateWithResponse added in v0.3.0

func (c *ClientWithResponses) AddTemplateWithResponse(ctx context.Context, body AddTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*AddTemplateResponse, error)

func (*ClientWithResponses) DelAppWithResponse

func (c *ClientWithResponses) DelAppWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*DelAppResponse, error)

DelAppWithResponse request returning *DelAppResponse

func (*ClientWithResponses) DelBinaryWithResponse

func (c *ClientWithResponses) DelBinaryWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*DelBinaryResponse, error)

DelBinaryWithResponse request returning *DelBinaryResponse

func (*ClientWithResponses) DelTemplateWithResponse added in v0.3.0

func (c *ClientWithResponses) DelTemplateWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*DelTemplateResponse, error)

DelTemplateWithResponse request returning *DelTemplateResponse

func (*ClientWithResponses) DeleteSecretWithResponse added in v0.3.0

func (c *ClientWithResponses) DeleteSecretWithResponse(ctx context.Context, id int64, params *DeleteSecretParams, reqEditors ...RequestEditorFn) (*DeleteSecretResponse, error)

DeleteSecretWithResponse request returning *DeleteSecretResponse

func (*ClientWithResponses) GetAppIdByNameWithResponse

func (c *ClientWithResponses) GetAppIdByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetAppIdByNameResponse, error)

GetAppIdByNameWithResponse request returning *GetAppIdByNameResponse

func (*ClientWithResponses) GetAppWithResponse

func (c *ClientWithResponses) GetAppWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetAppResponse, error)

GetAppWithResponse request returning *GetAppResponse

func (*ClientWithResponses) GetBinaryWithResponse

func (c *ClientWithResponses) GetBinaryWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetBinaryResponse, error)

GetBinaryWithResponse request returning *GetBinaryResponse

func (*ClientWithResponses) GetClientMeWithResponse

func (c *ClientWithResponses) GetClientMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClientMeResponse, error)

GetClientMeWithResponse request returning *GetClientMeResponse

func (*ClientWithResponses) GetSecretWithResponse added in v0.3.2

func (c *ClientWithResponses) GetSecretWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetSecretResponse, error)

GetSecretWithResponse request returning *GetSecretResponse

func (*ClientWithResponses) GetTemplateWithResponse added in v0.3.0

func (c *ClientWithResponses) GetTemplateWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetTemplateResponse, error)

GetTemplateWithResponse request returning *GetTemplateResponse

func (*ClientWithResponses) ListAppsWithResponse

func (c *ClientWithResponses) ListAppsWithResponse(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*ListAppsResponse, error)

ListAppsWithResponse request returning *ListAppsResponse

func (*ClientWithResponses) ListBinariesWithResponse

func (c *ClientWithResponses) ListBinariesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListBinariesResponse, error)

ListBinariesWithResponse request returning *ListBinariesResponse

func (*ClientWithResponses) ListLogsWithResponse added in v0.2.0

func (c *ClientWithResponses) ListLogsWithResponse(ctx context.Context, id int64, params *ListLogsParams, reqEditors ...RequestEditorFn) (*ListLogsResponse, error)

ListLogsWithResponse request returning *ListLogsResponse

func (*ClientWithResponses) ListSecretsWithResponse added in v0.3.0

func (c *ClientWithResponses) ListSecretsWithResponse(ctx context.Context, params *ListSecretsParams, reqEditors ...RequestEditorFn) (*ListSecretsResponse, error)

ListSecretsWithResponse request returning *ListSecretsResponse

func (*ClientWithResponses) ListTemplatesWithResponse added in v0.3.0

func (c *ClientWithResponses) ListTemplatesWithResponse(ctx context.Context, params *ListTemplatesParams, reqEditors ...RequestEditorFn) (*ListTemplatesResponse, error)

ListTemplatesWithResponse request returning *ListTemplatesResponse

func (*ClientWithResponses) PatchAppWithBodyWithResponse

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

PatchAppWithBodyWithResponse request with arbitrary body returning *PatchAppResponse

func (*ClientWithResponses) PatchAppWithResponse

func (c *ClientWithResponses) PatchAppWithResponse(ctx context.Context, id int64, body PatchAppJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchAppResponse, error)

func (*ClientWithResponses) PatchSecretWithBodyWithResponse added in v0.3.6

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

PatchSecretWithBodyWithResponse request with arbitrary body returning *PatchSecretResponse

func (*ClientWithResponses) PatchSecretWithResponse added in v0.3.6

func (c *ClientWithResponses) PatchSecretWithResponse(ctx context.Context, id int64, body PatchSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecretResponse, error)

func (*ClientWithResponses) StatsCallsWithResponse added in v0.2.0

func (c *ClientWithResponses) StatsCallsWithResponse(ctx context.Context, params *StatsCallsParams, reqEditors ...RequestEditorFn) (*StatsCallsResponse, error)

StatsCallsWithResponse request returning *StatsCallsResponse

func (*ClientWithResponses) StatsDurationWithResponse added in v0.2.0

func (c *ClientWithResponses) StatsDurationWithResponse(ctx context.Context, params *StatsDurationParams, reqEditors ...RequestEditorFn) (*StatsDurationResponse, error)

StatsDurationWithResponse request returning *StatsDurationResponse

func (*ClientWithResponses) StoreBinaryWithBodyWithResponse

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

StoreBinaryWithBodyWithResponse request with arbitrary body returning *StoreBinaryResponse

func (*ClientWithResponses) UpdateAppWithBodyWithResponse

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

UpdateAppWithBodyWithResponse request with arbitrary body returning *UpdateAppResponse

func (*ClientWithResponses) UpdateAppWithResponse

func (c *ClientWithResponses) UpdateAppWithResponse(ctx context.Context, id int64, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAppResponse, error)

func (*ClientWithResponses) UpdateSecretWithBodyWithResponse added in v0.3.0

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

UpdateSecretWithBodyWithResponse request with arbitrary body returning *UpdateSecretResponse

func (*ClientWithResponses) UpdateSecretWithResponse added in v0.3.0

func (c *ClientWithResponses) UpdateSecretWithResponse(ctx context.Context, id int64, body UpdateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretResponse, error)

func (*ClientWithResponses) UpdateTemplateWithBodyWithResponse added in v0.3.0

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

UpdateTemplateWithBodyWithResponse request with arbitrary body returning *UpdateTemplateResponse

func (*ClientWithResponses) UpdateTemplateWithResponse added in v0.3.0

func (c *ClientWithResponses) UpdateTemplateWithResponse(ctx context.Context, id int64, body UpdateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTemplateResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// ListAppsWithResponse request
	ListAppsWithResponse(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*ListAppsResponse, error)

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

	AddAppWithResponse(ctx context.Context, body AddAppJSONRequestBody, reqEditors ...RequestEditorFn) (*AddAppResponse, error)

	// GetAppIdByNameWithResponse request
	GetAppIdByNameWithResponse(ctx context.Context, name string, reqEditors ...RequestEditorFn) (*GetAppIdByNameResponse, error)

	// DelAppWithResponse request
	DelAppWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*DelAppResponse, error)

	// GetAppWithResponse request
	GetAppWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetAppResponse, error)

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

	PatchAppWithResponse(ctx context.Context, id int64, body PatchAppJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchAppResponse, error)

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

	UpdateAppWithResponse(ctx context.Context, id int64, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAppResponse, error)

	// ListLogsWithResponse request
	ListLogsWithResponse(ctx context.Context, id int64, params *ListLogsParams, reqEditors ...RequestEditorFn) (*ListLogsResponse, error)

	// ListBinariesWithResponse request
	ListBinariesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListBinariesResponse, error)

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

	// DelBinaryWithResponse request
	DelBinaryWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*DelBinaryResponse, error)

	// GetBinaryWithResponse request
	GetBinaryWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetBinaryResponse, error)

	// GetClientMeWithResponse request
	GetClientMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClientMeResponse, error)

	// ListSecretsWithResponse request
	ListSecretsWithResponse(ctx context.Context, params *ListSecretsParams, reqEditors ...RequestEditorFn) (*ListSecretsResponse, error)

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

	AddSecretWithResponse(ctx context.Context, body AddSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*AddSecretResponse, error)

	// DeleteSecretWithResponse request
	DeleteSecretWithResponse(ctx context.Context, id int64, params *DeleteSecretParams, reqEditors ...RequestEditorFn) (*DeleteSecretResponse, error)

	// GetSecretWithResponse request
	GetSecretWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetSecretResponse, error)

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

	PatchSecretWithResponse(ctx context.Context, id int64, body PatchSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecretResponse, error)

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

	UpdateSecretWithResponse(ctx context.Context, id int64, body UpdateSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateSecretResponse, error)

	// StatsDurationWithResponse request
	StatsDurationWithResponse(ctx context.Context, params *StatsDurationParams, reqEditors ...RequestEditorFn) (*StatsDurationResponse, error)

	// StatsCallsWithResponse request
	StatsCallsWithResponse(ctx context.Context, params *StatsCallsParams, reqEditors ...RequestEditorFn) (*StatsCallsResponse, error)

	// ListTemplatesWithResponse request
	ListTemplatesWithResponse(ctx context.Context, params *ListTemplatesParams, reqEditors ...RequestEditorFn) (*ListTemplatesResponse, error)

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

	AddTemplateWithResponse(ctx context.Context, body AddTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*AddTemplateResponse, error)

	// DelTemplateWithResponse request
	DelTemplateWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*DelTemplateResponse, error)

	// GetTemplateWithResponse request
	GetTemplateWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetTemplateResponse, error)

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

	UpdateTemplateWithResponse(ctx context.Context, id int64, body UpdateTemplateJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateTemplateResponse, error)
}

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

type ConflictError added in v0.3.5

type ConflictError struct {
	// ConflictingIds List of conflicting entity IDs
	ConflictingIds []int64 `json:"conflicting_ids"`

	// Error Error message
	Error string `json:"error"`
}

ConflictError defines model for conflictError.

type CountByStatus

type CountByStatus struct {
	// Count Number of app calls
	Count int `json:"count"`

	// Status HTTP status
	Status int `json:"status"`
}

CountByStatus defines model for count_by_status.

type DelAppResponse

type DelAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *Error
}

func ParseDelAppResponse

func ParseDelAppResponse(rsp *http.Response) (*DelAppResponse, error)

ParseDelAppResponse parses an HTTP response from a DelAppWithResponse call

func (DelAppResponse) Status

func (r DelAppResponse) Status() string

Status returns HTTPResponse.Status

func (DelAppResponse) StatusCode

func (r DelAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DelBinaryResponse

type DelBinaryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *Error
	JSON503      *Error
}

func ParseDelBinaryResponse

func ParseDelBinaryResponse(rsp *http.Response) (*DelBinaryResponse, error)

ParseDelBinaryResponse parses an HTTP response from a DelBinaryWithResponse call

func (DelBinaryResponse) Status

func (r DelBinaryResponse) Status() string

Status returns HTTPResponse.Status

func (DelBinaryResponse) StatusCode

func (r DelBinaryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DelTemplateResponse added in v0.3.0

type DelTemplateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *Error
	JSON503      *Error
}

func ParseDelTemplateResponse added in v0.3.0

func ParseDelTemplateResponse(rsp *http.Response) (*DelTemplateResponse, error)

ParseDelTemplateResponse parses an HTTP response from a DelTemplateWithResponse call

func (DelTemplateResponse) Status added in v0.3.0

func (r DelTemplateResponse) Status() string

Status returns HTTPResponse.Status

func (DelTemplateResponse) StatusCode added in v0.3.0

func (r DelTemplateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteSecretParams added in v0.3.0

type DeleteSecretParams struct {
	// Force Force delete secret even if it is used in slots
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

DeleteSecretParams defines parameters for DeleteSecret.

type DeleteSecretResponse added in v0.3.0

type DeleteSecretResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON400      *Error
	JSON409      *ConflictError
	JSON503      *Error
}

func ParseDeleteSecretResponse added in v0.3.0

func ParseDeleteSecretResponse(rsp *http.Response) (*DeleteSecretResponse, error)

ParseDeleteSecretResponse parses an HTTP response from a DeleteSecretWithResponse call

func (DeleteSecretResponse) Status added in v0.3.0

func (r DeleteSecretResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteSecretResponse) StatusCode added in v0.3.0

func (r DeleteSecretResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DurationStats

type DurationStats struct {
	// Avg Average duration in usec
	Avg int64 `json:"avg"`

	// Max Max duration in usec
	Max int64 `json:"max"`

	// Median Median (50% percentile) duration in usec
	Median int64 `json:"median"`

	// Min Min duration in usec
	Min int64 `json:"min"`

	// Perc75 75% percentile duration in usec
	Perc75 int64 `json:"perc75"`

	// Perc90 90% percentile duration in usec
	Perc90 int64 `json:"perc90"`

	// Time Beginning ot reporting slot
	Time time.Time `json:"time"`
}

DurationStats Edge app execution duration statistics

type Error added in v0.2.0

type Error struct {
	// Error Error message
	Error string `json:"error"`
}

Error defines model for error.

type GetAppIdByNameResponse

type GetAppIdByNameResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *int64
	JSON400      *Error
}

func ParseGetAppIdByNameResponse

func ParseGetAppIdByNameResponse(rsp *http.Response) (*GetAppIdByNameResponse, error)

ParseGetAppIdByNameResponse parses an HTTP response from a GetAppIdByNameWithResponse call

func (GetAppIdByNameResponse) Status

func (r GetAppIdByNameResponse) Status() string

Status returns HTTPResponse.Status

func (GetAppIdByNameResponse) StatusCode

func (r GetAppIdByNameResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetAppResponse

type GetAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *App
	JSON400      *Error
}

func ParseGetAppResponse

func ParseGetAppResponse(rsp *http.Response) (*GetAppResponse, error)

ParseGetAppResponse parses an HTTP response from a GetAppWithResponse call

func (GetAppResponse) Status

func (r GetAppResponse) Status() string

Status returns HTTPResponse.Status

func (GetAppResponse) StatusCode

func (r GetAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBinaryResponse

type GetBinaryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Binary
	JSON400      *Error
}

func ParseGetBinaryResponse

func ParseGetBinaryResponse(rsp *http.Response) (*GetBinaryResponse, error)

ParseGetBinaryResponse parses an HTTP response from a GetBinaryWithResponse call

func (GetBinaryResponse) Status

func (r GetBinaryResponse) Status() string

Status returns HTTPResponse.Status

func (GetBinaryResponse) StatusCode

func (r GetBinaryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetClientMeResponse

type GetClientMeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Client
	JSON400      *Error
}

func ParseGetClientMeResponse

func ParseGetClientMeResponse(rsp *http.Response) (*GetClientMeResponse, error)

ParseGetClientMeResponse parses an HTTP response from a GetClientMeWithResponse call

func (GetClientMeResponse) Status

func (r GetClientMeResponse) Status() string

Status returns HTTPResponse.Status

func (GetClientMeResponse) StatusCode

func (r GetClientMeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetSecretResponse added in v0.3.2

type GetSecretResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Secret
}

func ParseGetSecretResponse added in v0.3.2

func ParseGetSecretResponse(rsp *http.Response) (*GetSecretResponse, error)

ParseGetSecretResponse parses an HTTP response from a GetSecretWithResponse call

func (GetSecretResponse) Status added in v0.3.2

func (r GetSecretResponse) Status() string

Status returns HTTPResponse.Status

func (GetSecretResponse) StatusCode added in v0.3.2

func (r GetSecretResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetTemplateResponse added in v0.3.0

type GetTemplateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Template
}

func ParseGetTemplateResponse added in v0.3.0

func ParseGetTemplateResponse(rsp *http.Response) (*GetTemplateResponse, error)

ParseGetTemplateResponse parses an HTTP response from a GetTemplateWithResponse call

func (GetTemplateResponse) Status added in v0.3.0

func (r GetTemplateResponse) Status() string

Status returns HTTPResponse.Status

func (GetTemplateResponse) StatusCode added in v0.3.0

func (r GetTemplateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Group

type Group struct {
	Clients []GroupMember `json:"clients"`

	// DefaultFlag Add new members to the group by default
	DefaultFlag bool `json:"default_flag"`

	// Name Group name
	Name      string               `json:"name"`
	Templates []TemplateShortAdmin `json:"templates"`
}

Group defines model for group.

type GroupMember

type GroupMember struct {
	// Id Client ID
	Id int64 `json:"id"`
}

GroupMember defines model for group_member.

type GroupShort

type GroupShort struct {
	// DefaultFlag Add new members to the group by default
	DefaultFlag bool `json:"default_flag"`

	// Id Group ID
	Id int64 `json:"id"`

	// Name Group name
	Name string `json:"name"`
}

GroupShort defines model for group_short.

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type ListAppsParams added in v0.2.0

type ListAppsParams struct {
	// Name Name of the app
	Name *string `form:"name,omitempty" json:"name,omitempty"`

	// ApiType API type:<br>wasi-http - WASI with HTTP entry point<br>proxy-wasm - Proxy-Wasm app, callable from CDN
	ApiType *ListAppsParamsApiType `form:"api_type,omitempty" json:"api_type,omitempty"`

	// Status Status code:<br>0 - draft (inactive)<br>1 - enabled<br>2 - disabled<br>3 - hourly call limit exceeded<br>4 - daily call limit exceeded<br>5 - suspended
	Status *int `form:"status,omitempty" json:"status,omitempty"`

	// Template Template ID
	Template *int64 `form:"template,omitempty" json:"template,omitempty"`

	// Binary Binary ID
	Binary *int64 `form:"binary,omitempty" json:"binary,omitempty"`

	// Plan App plan name
	Plan *string `form:"plan,omitempty" json:"plan,omitempty"`

	// Limit Limit for pagination
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Offset for pagination
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`

	// Ordering Ordering
	Ordering *ListAppsParamsOrdering `form:"ordering,omitempty" json:"ordering,omitempty"`
}

ListAppsParams defines parameters for ListApps.

type ListAppsParamsApiType added in v0.3.0

type ListAppsParamsApiType string

ListAppsParamsApiType defines parameters for ListApps.

const (
	ListAppsParamsApiTypeProxyWasm ListAppsParamsApiType = "proxy-wasm"
	ListAppsParamsApiTypeWasiHttp  ListAppsParamsApiType = "wasi-http"
)

Defines values for ListAppsParamsApiType.

type ListAppsParamsOrdering added in v0.3.0

type ListAppsParamsOrdering string

ListAppsParamsOrdering defines parameters for ListApps.

const (
	ListAppsParamsOrderingBinary        ListAppsParamsOrdering = "binary"
	ListAppsParamsOrderingId            ListAppsParamsOrdering = "id"
	ListAppsParamsOrderingMinusBinary   ListAppsParamsOrdering = "-binary"
	ListAppsParamsOrderingMinusId       ListAppsParamsOrdering = "-id"
	ListAppsParamsOrderingMinusName     ListAppsParamsOrdering = "-name"
	ListAppsParamsOrderingMinusPlan     ListAppsParamsOrdering = "-plan"
	ListAppsParamsOrderingMinusStatus   ListAppsParamsOrdering = "-status"
	ListAppsParamsOrderingMinusTemplate ListAppsParamsOrdering = "-template"
	ListAppsParamsOrderingName          ListAppsParamsOrdering = "name"
	ListAppsParamsOrderingPlan          ListAppsParamsOrdering = "plan"
	ListAppsParamsOrderingStatus        ListAppsParamsOrdering = "status"
	ListAppsParamsOrderingTemplate      ListAppsParamsOrdering = "template"
)

Defines values for ListAppsParamsOrdering.

type ListAppsResponse

type ListAppsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Apps []AppShort `json:"apps"`

		// Count Total number of apps
		Count *int `json:"count,omitempty"`
	}
	JSON400 *Error
}

func ParseListAppsResponse

func ParseListAppsResponse(rsp *http.Response) (*ListAppsResponse, error)

ParseListAppsResponse parses an HTTP response from a ListAppsWithResponse call

func (ListAppsResponse) Status

func (r ListAppsResponse) Status() string

Status returns HTTPResponse.Status

func (ListAppsResponse) StatusCode

func (r ListAppsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListBinariesResponse

type ListBinariesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Binaries []BinaryShort `json:"binaries"`
	}
}

func ParseListBinariesResponse

func ParseListBinariesResponse(rsp *http.Response) (*ListBinariesResponse, error)

ParseListBinariesResponse parses an HTTP response from a ListBinariesWithResponse call

func (ListBinariesResponse) Status

func (r ListBinariesResponse) Status() string

Status returns HTTPResponse.Status

func (ListBinariesResponse) StatusCode

func (r ListBinariesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListLogsParams added in v0.2.0

type ListLogsParams struct {
	// From Reporting period start time, RFC3339 format. Default 1 hour ago.
	From *time.Time `form:"from,omitempty" json:"from,omitempty"`

	// To Reporting period end time, RFC3339 format. Default current time in UTC.
	To *time.Time `form:"to,omitempty" json:"to,omitempty"`

	// Edge Edge name
	Edge *string `form:"edge,omitempty" json:"edge,omitempty"`

	// Sort Sort order (default desc)
	Sort *ListLogsParamsSort `form:"sort,omitempty" json:"sort,omitempty"`

	// Limit Limit for pagination
	Limit *int32 `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Offset for pagination
	Offset *int32 `form:"offset,omitempty" json:"offset,omitempty"`

	// Search Search string
	Search *string `form:"search,omitempty" json:"search,omitempty"`

	// ClientIp Search by client IP
	ClientIp *string `form:"client_ip,omitempty" json:"client_ip,omitempty"`
}

ListLogsParams defines parameters for ListLogs.

type ListLogsParamsSort added in v0.2.0

type ListLogsParamsSort string

ListLogsParamsSort defines parameters for ListLogs.

const (
	ListLogsParamsSortAsc  ListLogsParamsSort = "asc"
	ListLogsParamsSortDesc ListLogsParamsSort = "desc"
)

Defines values for ListLogsParamsSort.

type ListLogsResponse added in v0.2.0

type ListLogsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Logs *[]Log `json:"logs,omitempty"`

		// Offset Current request offset
		Offset *int32 `json:"offset,omitempty"`

		// TotalCount Number of total logs available
		TotalCount *int32 `json:"total_count,omitempty"`
	}
	JSON400 *Error
	JSON503 *Error
}

func ParseListLogsResponse added in v0.2.0

func ParseListLogsResponse(rsp *http.Response) (*ListLogsResponse, error)

ParseListLogsResponse parses an HTTP response from a ListLogsWithResponse call

func (ListLogsResponse) Status added in v0.2.0

func (r ListLogsResponse) Status() string

Status returns HTTPResponse.Status

func (ListLogsResponse) StatusCode added in v0.2.0

func (r ListLogsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListSecretsParams added in v0.3.2

type ListSecretsParams struct {
	// AppId App ID
	AppId *int64 `form:"app_id,omitempty" json:"app_id,omitempty"`

	// SecretName Secret name
	SecretName *string `form:"secret_name,omitempty" json:"secret_name,omitempty"`
}

ListSecretsParams defines parameters for ListSecrets.

type ListSecretsResponse added in v0.3.0

type ListSecretsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Secrets []SecretShort `json:"secrets"`
	}
}

func ParseListSecretsResponse added in v0.3.0

func ParseListSecretsResponse(rsp *http.Response) (*ListSecretsResponse, error)

ParseListSecretsResponse parses an HTTP response from a ListSecretsWithResponse call

func (ListSecretsResponse) Status added in v0.3.0

func (r ListSecretsResponse) Status() string

Status returns HTTPResponse.Status

func (ListSecretsResponse) StatusCode added in v0.3.0

func (r ListSecretsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListTemplatesParams added in v0.3.0

type ListTemplatesParams struct {
	// ApiType API type:<br>wasi-http - WASI with HTTP entry point<br>proxy-wasm - Proxy-Wasm app, callable from CDN
	ApiType *ListTemplatesParamsApiType `form:"api_type,omitempty" json:"api_type,omitempty"`

	// OnlyMine Only mine templates
	OnlyMine *bool `form:"only_mine,omitempty" json:"only_mine,omitempty"`

	// Limit Limit for pagination
	Limit *int `form:"limit,omitempty" json:"limit,omitempty"`

	// Offset Offset for pagination
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`
}

ListTemplatesParams defines parameters for ListTemplates.

type ListTemplatesParamsApiType added in v0.3.0

type ListTemplatesParamsApiType string

ListTemplatesParamsApiType defines parameters for ListTemplates.

const (
	ListTemplatesParamsApiTypeProxyWasm ListTemplatesParamsApiType = "proxy-wasm"
	ListTemplatesParamsApiTypeWasiHttp  ListTemplatesParamsApiType = "wasi-http"
)

Defines values for ListTemplatesParamsApiType.

type ListTemplatesResponse added in v0.3.0

type ListTemplatesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		// Count Total number of templates
		Count     *int            `json:"count,omitempty"`
		Templates []TemplateShort `json:"templates"`
	}
	JSON400 *Error
}

func ParseListTemplatesResponse added in v0.3.0

func ParseListTemplatesResponse(rsp *http.Response) (*ListTemplatesResponse, error)

ParseListTemplatesResponse parses an HTTP response from a ListTemplatesWithResponse call

func (ListTemplatesResponse) Status added in v0.3.0

func (r ListTemplatesResponse) Status() string

Status returns HTTPResponse.Status

func (ListTemplatesResponse) StatusCode added in v0.3.0

func (r ListTemplatesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Log

type Log struct {
	// AppName Name of the application
	AppName *string `json:"app_name,omitempty"`

	// ClientIp Client IP
	ClientIp *string `json:"client_ip,omitempty"`

	// Edge Edge name
	Edge *string `json:"edge,omitempty"`

	// Id Id of the log
	Id *string `json:"id,omitempty"`

	// Log Log message
	Log *string `json:"log,omitempty"`

	// Timestamp Timestamp of a log in RFC3339 format
	Timestamp *time.Time `json:"timestamp,omitempty"`
}

Log defines model for log.

type Network added in v0.3.0

type Network struct {
	// IsDefault Is network is default
	IsDefault bool `json:"is_default"`

	// Name Network name
	Name string `json:"name"`
}

Network defines model for network.

type PatchAppJSONRequestBody

type PatchAppJSONRequestBody = App

PatchAppJSONRequestBody defines body for PatchApp for application/json ContentType.

type PatchAppResponse

type PatchAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AppShort
	JSON400      *Error
}

func ParsePatchAppResponse

func ParsePatchAppResponse(rsp *http.Response) (*PatchAppResponse, error)

ParsePatchAppResponse parses an HTTP response from a PatchAppWithResponse call

func (PatchAppResponse) Status

func (r PatchAppResponse) Status() string

Status returns HTTPResponse.Status

func (PatchAppResponse) StatusCode

func (r PatchAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PatchSecretJSONRequestBody added in v0.3.6

type PatchSecretJSONRequestBody = Secret

PatchSecretJSONRequestBody defines body for PatchSecret for application/json ContentType.

type PatchSecretResponse added in v0.3.6

type PatchSecretResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Secret
	JSON400      *Error
	JSON409      *ConflictError
	JSON503      *Error
}

func ParsePatchSecretResponse added in v0.3.6

func ParsePatchSecretResponse(rsp *http.Response) (*PatchSecretResponse, error)

ParsePatchSecretResponse parses an HTTP response from a PatchSecretWithResponse call

func (PatchSecretResponse) Status added in v0.3.6

func (r PatchSecretResponse) Status() string

Status returns HTTPResponse.Status

func (PatchSecretResponse) StatusCode added in v0.3.6

func (r PatchSecretResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Plan added in v0.3.0

type Plan struct {
	// BillingPlanId Billing plan ID
	BillingPlanId *int `json:"billing_plan_id,omitempty"`

	// MaxDuration Max duration in msec
	MaxDuration int `json:"max_duration"`

	// MaxSubrequests Max number of external network requests (0 means disabled)
	MaxSubrequests int `json:"max_subrequests"`

	// MemLimit Max memory in bytes
	MemLimit int `json:"mem_limit"`

	// ResellerId Reseller plan ID
	ResellerId int64 `json:"reseller_id"`
}

Plan defines model for plan.

type PrebillingConsumptionData added in v0.3.0

type PrebillingConsumptionData struct {
	ClientId    *int                `json:"client_id,omitempty"`
	Date        *openapi_types.Date `json:"date,omitempty"`
	MetricName  *string             `json:"metric_name,omitempty"`
	MetricUnit  *string             `json:"metric_unit,omitempty"`
	MetricValue *int                `json:"metric_value,omitempty"`
	Subproduct  *string             `json:"subproduct,omitempty"`
}

PrebillingConsumptionData defines model for prebillingConsumptionData.

type PrebillingConsumptionPagination added in v0.3.0

type PrebillingConsumptionPagination struct {
	CurrentPage *int32 `json:"current_page,omitempty"`
	Limit       *int32 `json:"limit,omitempty"`
	TotalPages  *int32 `json:"total_pages,omitempty"`
}

PrebillingConsumptionPagination defines model for prebillingConsumptionPagination.

type PrebillingConsumptionResponse added in v0.3.0

type PrebillingConsumptionResponse struct {
	Data       *[]PrebillingConsumptionData     `json:"data,omitempty"`
	Pagination *PrebillingConsumptionPagination `json:"pagination,omitempty"`
}

PrebillingConsumptionResponse defines model for prebillingConsumptionResponse.

type PrebillingMetric added in v0.3.0

type PrebillingMetric struct {
	NumberOfCalls   *int     `json:"number_of_calls,omitempty"`
	TotalRuntimeMms *float32 `json:"total_runtime_mms,omitempty"`
}

PrebillingMetric defines model for prebillingMetric.

type PrebillingObject added in v0.3.0

type PrebillingObject struct {
	BillingPlan *string           `json:"billing_plan,omitempty"`
	Client      *int              `json:"client,omitempty"`
	Metrics     *PrebillingMetric `json:"metrics,omitempty"`
	Region      *string           `json:"region,omitempty"`
}

PrebillingObject defines model for prebillingObject.

type PrebillingResponse added in v0.3.0

type PrebillingResponse = []PrebillingObject

PrebillingResponse defines model for prebillingResponse.

type RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

type Secret added in v0.3.0

type Secret struct {
	// AppCount The number of applications that use this secret.
	AppCount *int `json:"app_count,omitempty"`

	// Comment A description or comment about the secret.
	Comment *string `json:"comment,omitempty"`

	// Name The unique name of the secret.
	Name *string `json:"name,omitempty"`

	// SecretSlots A list of secret slots associated with this secret.
	SecretSlots *[]SecretSlot `json:"secret_slots,omitempty"`
}

Secret defines model for secret.

type SecretShort added in v0.3.0

type SecretShort struct {
	// AppCount The number of applications that use this secret.
	AppCount *int `json:"app_count,omitempty"`

	// Comment A description or comment about the secret.
	Comment *string `json:"comment,omitempty"`

	// Id The unique identifier of the secret.
	Id *int64 `json:"id,omitempty"`

	// Name The unique name of the secret.
	Name string `json:"name"`
}

SecretShort defines model for secret_short.

type SecretSlot added in v0.3.2

type SecretSlot struct {
	// Checksum A checksum of the secret value for integrity verification.
	Checksum *string `json:"checksum,omitempty"`

	// Slot Secret slot ID.
	Slot int64 `json:"slot"`

	// Value The value of the secret.
	Value *string `json:"value,omitempty"`
}

SecretSlot defines model for secret_slot.

type StatsCallsParams added in v0.2.0

type StatsCallsParams struct {
	// From Reporting period start time, RFC3339 format
	From time.Time `form:"from" json:"from"`

	// To Reporting period end time (not included into reporting period), RFC3339 format
	To time.Time `form:"to" json:"to"`

	// Step Reporting granularity, in seconds
	Step int `form:"step" json:"step"`

	// Id App ID
	Id *int64 `form:"id,omitempty" json:"id,omitempty"`

	// Network Network name
	Network *string `form:"network,omitempty" json:"network,omitempty"`
}

StatsCallsParams defines parameters for StatsCalls.

type StatsCallsResponse added in v0.2.0

type StatsCallsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Stats []CallStats `json:"stats"`
	}
	JSON400 *Error
}

func ParseStatsCallsResponse added in v0.2.0

func ParseStatsCallsResponse(rsp *http.Response) (*StatsCallsResponse, error)

ParseStatsCallsResponse parses an HTTP response from a StatsCallsWithResponse call

func (StatsCallsResponse) Status added in v0.2.0

func (r StatsCallsResponse) Status() string

Status returns HTTPResponse.Status

func (StatsCallsResponse) StatusCode added in v0.2.0

func (r StatsCallsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StatsDurationParams added in v0.2.0

type StatsDurationParams struct {
	// Id App ID
	Id *int64 `form:"id,omitempty" json:"id,omitempty"`

	// From Reporting period start time, RFC3339 format
	From time.Time `form:"from" json:"from"`

	// To Reporting period end time (not included into reporting period), RFC3339 format
	To time.Time `form:"to" json:"to"`

	// Step Reporting granularity, in seconds
	Step int `form:"step" json:"step"`

	// Network Network name
	Network *string `form:"network,omitempty" json:"network,omitempty"`
}

StatsDurationParams defines parameters for StatsDuration.

type StatsDurationResponse added in v0.2.0

type StatsDurationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Stats []DurationStats `json:"stats"`
	}
	JSON400 *Error
}

func ParseStatsDurationResponse added in v0.2.0

func ParseStatsDurationResponse(rsp *http.Response) (*StatsDurationResponse, error)

ParseStatsDurationResponse parses an HTTP response from a StatsDurationWithResponse call

func (StatsDurationResponse) Status added in v0.2.0

func (r StatsDurationResponse) Status() string

Status returns HTTPResponse.Status

func (StatsDurationResponse) StatusCode added in v0.2.0

func (r StatsDurationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StoreBinaryResponse

type StoreBinaryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *BinaryShort
	JSON400      *Error
	JSON429      *Error
	JSON503      *Error
}

func ParseStoreBinaryResponse

func ParseStoreBinaryResponse(rsp *http.Response) (*StoreBinaryResponse, error)

ParseStoreBinaryResponse parses an HTTP response from a StoreBinaryWithResponse call

func (StoreBinaryResponse) Status

func (r StoreBinaryResponse) Status() string

Status returns HTTPResponse.Status

func (StoreBinaryResponse) StatusCode

func (r StoreBinaryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Template added in v0.3.0

type Template struct {
	// ApiType Wasm API type
	ApiType *string `json:"api_type,omitempty"`

	// BinaryId Binary ID
	BinaryId int64 `json:"binary_id"`

	// LongDescr Long description of the template
	LongDescr *string `json:"long_descr,omitempty"`

	// Name Name of the template
	Name string `json:"name"`

	// Owned Is the template owned by user?
	Owned bool `json:"owned"`

	// Params Parameters
	Params []TemplateParam `json:"params"`

	// ShortDescr Short description of the template
	ShortDescr *string `json:"short_descr,omitempty"`
}

Template defines model for template.

type TemplateParam added in v0.3.0

type TemplateParam struct {
	// DataType Parameter type
	DataType TemplateParamDataType `json:"data_type"`

	// Descr Parameter description
	Descr *string `json:"descr,omitempty"`

	// Mandatory Is this field mandatory?
	Mandatory bool `json:"mandatory"`

	// Name Parameter name
	Name string `json:"name"`
}

TemplateParam defines model for template_param.

type TemplateParamDataType added in v0.3.0

type TemplateParamDataType string

TemplateParamDataType Parameter type

const (
	TemplateParamDataTypeDate   TemplateParamDataType = "date"
	TemplateParamDataTypeNumber TemplateParamDataType = "number"
	TemplateParamDataTypeSecret TemplateParamDataType = "secret"
	TemplateParamDataTypeString TemplateParamDataType = "string"
	TemplateParamDataTypeTime   TemplateParamDataType = "time"
)

Defines values for TemplateParamDataType.

type TemplateShort added in v0.3.0

type TemplateShort struct {
	// ApiType Wasm API type
	ApiType string `json:"api_type"`

	// Id Template ID
	Id int64 `json:"id"`

	// LongDescr Long description of the template
	LongDescr *string `json:"long_descr,omitempty"`

	// Name Name of the template
	Name string `json:"name"`

	// Owned Is the template owned by user?
	Owned bool `json:"owned"`

	// ShortDescr Short description of the template
	ShortDescr *string `json:"short_descr,omitempty"`
}

TemplateShort defines model for template_short.

type TemplateShortAdmin added in v0.3.0

type TemplateShortAdmin struct {
	// Embedded struct due to allOf(#/components/schemas/template_short)
	TemplateShort `yaml:",inline"`
	// Embedded fields due to inline allOf schema
	// ClientId Client ID
	ClientId int64 `json:"client_id"`

	// Groups Groups the template is shared to
	Groups []int64 `json:"groups"`

	// ResellerId Reseller ID
	ResellerId *int64 `json:"reseller_id"`
}

TemplateShortAdmin defines model for template_short_admin.

type UpdateAppJSONBody

type UpdateAppJSONBody struct {
	// Embedded struct due to allOf(./schemas.yml#/components/schemas/app)
	App `yaml:",inline"`
}

UpdateAppJSONBody defines parameters for UpdateApp.

type UpdateAppJSONRequestBody

type UpdateAppJSONRequestBody UpdateAppJSONBody

UpdateAppJSONRequestBody defines body for UpdateApp for application/json ContentType.

type UpdateAppResponse

type UpdateAppResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *AppShort
	JSON400      *Error
	JSON503      *Error
}

func ParseUpdateAppResponse

func ParseUpdateAppResponse(rsp *http.Response) (*UpdateAppResponse, error)

ParseUpdateAppResponse parses an HTTP response from a UpdateAppWithResponse call

func (UpdateAppResponse) Status

func (r UpdateAppResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateAppResponse) StatusCode

func (r UpdateAppResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateSecretJSONBody added in v0.3.6

type UpdateSecretJSONBody struct {
	// Embedded struct due to allOf(./schemas.yml#/components/schemas/secret)
	Secret `yaml:",inline"`
}

UpdateSecretJSONBody defines parameters for UpdateSecret.

type UpdateSecretJSONRequestBody added in v0.3.0

type UpdateSecretJSONRequestBody UpdateSecretJSONBody

UpdateSecretJSONRequestBody defines body for UpdateSecret for application/json ContentType.

type UpdateSecretResponse added in v0.3.0

type UpdateSecretResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *Secret
	JSON400      *Error
	JSON409      *ConflictError
	JSON503      *Error
}

func ParseUpdateSecretResponse added in v0.3.0

func ParseUpdateSecretResponse(rsp *http.Response) (*UpdateSecretResponse, error)

ParseUpdateSecretResponse parses an HTTP response from a UpdateSecretWithResponse call

func (UpdateSecretResponse) Status added in v0.3.0

func (r UpdateSecretResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateSecretResponse) StatusCode added in v0.3.0

func (r UpdateSecretResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateTemplateJSONRequestBody added in v0.3.0

type UpdateTemplateJSONRequestBody = Template

UpdateTemplateJSONRequestBody defines body for UpdateTemplate for application/json ContentType.

type UpdateTemplateResponse added in v0.3.0

type UpdateTemplateResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *TemplateShort
	JSON400      *Error
	JSON503      *Error
}

func ParseUpdateTemplateResponse added in v0.3.0

func ParseUpdateTemplateResponse(rsp *http.Response) (*UpdateTemplateResponse, error)

ParseUpdateTemplateResponse parses an HTTP response from a UpdateTemplateWithResponse call

func (UpdateTemplateResponse) Status added in v0.3.0

func (r UpdateTemplateResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateTemplateResponse) StatusCode added in v0.3.0

func (r UpdateTemplateResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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