sdk

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 14 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 provides primitives to interact with the openapi HTTP API.

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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 NewAddGroupRequest

func NewAddGroupRequest(server string, body AddGroupJSONRequestBody) (*http.Request, error)

NewAddGroupRequest calls the generic AddGroup builder with application/json body

func NewAddGroupRequestWithBody

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

NewAddGroupRequestWithBody generates requests for AddGroup with any type of body

func NewAddToGroupRequest

func NewAddToGroupRequest(server string, id int64, body AddToGroupJSONRequestBody) (*http.Request, error)

NewAddToGroupRequest calls the generic AddToGroup builder with application/json body

func NewAddToGroupRequestWithBody

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

NewAddToGroupRequestWithBody generates requests for AddToGroup 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 NewDelFromGroupRequest

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

NewDelFromGroupRequest generates requests for DelFromGroup

func NewDelGroupRequest

func NewDelGroupRequest(server string, id int64, params *DelGroupParams) (*http.Request, error)

NewDelGroupRequest generates requests for DelGroup

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 NewGetBinaryMetadataRequest

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

NewGetBinaryMetadataRequest generates requests for GetBinaryMetadata

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 NewGetGroupRequest

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

NewGetGroupRequest generates requests for GetGroup

func NewLeaveGroupRequest

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

NewLeaveGroupRequest generates requests for LeaveGroup

func NewListAppsRequest

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

NewListAppsRequest generates requests for ListApps

func NewListBinariesRequest

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

NewListBinariesRequest generates requests for ListBinaries

func NewListGroupsRequest

func NewListGroupsRequest(server string, params *ListGroupsParams) (*http.Request, error)

NewListGroupsRequest generates requests for ListGroups

func NewListLogsRequest added in v0.2.0

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

NewListLogsRequest generates requests for ListLogs

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 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 NewUpdateBinaryMetadataRequest

func NewUpdateBinaryMetadataRequest(server string, id int64, body UpdateBinaryMetadataJSONRequestBody) (*http.Request, error)

NewUpdateBinaryMetadataRequest calls the generic UpdateBinaryMetadata builder with application/json body

func NewUpdateBinaryMetadataRequestWithBody

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

NewUpdateBinaryMetadataRequestWithBody generates requests for UpdateBinaryMetadata with any type of body

func NewUpdateGroupRequest

func NewUpdateGroupRequest(server string, id int64, body UpdateGroupJSONRequestBody) (*http.Request, error)

NewUpdateGroupRequest calls the generic UpdateGroup builder with application/json body

func NewUpdateGroupRequestWithBody

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

NewUpdateGroupRequestWithBody generates requests for UpdateGroup 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 AddGroupJSONBody

type AddGroupJSONBody struct {
	// Name Group name
	Name string `json:"name"`
}

AddGroupJSONBody defines parameters for AddGroup.

type AddGroupJSONRequestBody

type AddGroupJSONRequestBody AddGroupJSONBody

AddGroupJSONRequestBody defines body for AddGroup for application/json ContentType.

type AddGroupResponse

type AddGroupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GroupShort
}

func ParseAddGroupResponse

func ParseAddGroupResponse(rsp *http.Response) (*AddGroupResponse, error)

ParseAddGroupResponse parses an HTTP response from a AddGroupWithResponse call

func (AddGroupResponse) Status

func (r AddGroupResponse) Status() string

Status returns HTTPResponse.Status

func (AddGroupResponse) StatusCode

func (r AddGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type AddToGroupJSONRequestBody

type AddToGroupJSONRequestBody = GroupMember

AddToGroupJSONRequestBody defines body for AddToGroup for application/json ContentType.

type AddToGroupResponse

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

func ParseAddToGroupResponse

func ParseAddToGroupResponse(rsp *http.Response) (*AddToGroupResponse, error)

ParseAddToGroupResponse parses an HTTP response from a AddToGroupWithResponse call

func (AddToGroupResponse) Status

func (r AddToGroupResponse) Status() string

Status returns HTTPResponse.Status

func (AddToGroupResponse) StatusCode

func (r AddToGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type App

type App struct {
	// Binary Binary ID
	Binary *int64 `json:"binary,omitempty"`

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

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

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

	// RspHeaders Extra headers to add to the response
	RspHeaders *map[string]string `json:"rsp_headers,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"`

	// 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 (
	AppLogKafka AppLog = "kafka"
	AppLogNone  AppLog = "none"
)

Defines values for AppLog.

type AppShort

type AppShort struct {
	// Binary Binary ID
	Binary int64 `json:"binary"`

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

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

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

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

	// Url App URL
	Url string `json:"url"`
}

AppShort defines model for app_short.

type Binary

type Binary struct {
	// Descr Short description of the template
	Descr *string `json:"descr,omitempty"`

	// Errors Compilation errors
	Errors *string `json:"errors,omitempty"`

	// GroupId ID of the group binary is shared to
	GroupId int64 `json:"group_id"`

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

	// Name Name of the template
	Name *string `json:"name,omitempty"`

	// 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 BinaryMetadata

type BinaryMetadata struct {
	// Descr Short description of the template
	Descr *string `json:"descr,omitempty"`

	// GroupId The group binary shared to (0 - not shared)
	GroupId int64 `json:"group_id"`

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

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

	// Params Parameters
	Params []BinaryParam `json:"params"`
}

BinaryMetadata defines model for binary_metadata.

type BinaryParam

type BinaryParam struct {
	// DataType Parameter type
	DataType BinaryParamDataType `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"`
}

BinaryParam defines model for binary_param.

type BinaryParamDataType

type BinaryParamDataType string

BinaryParamDataType Parameter type

const (
	Date   BinaryParamDataType = "date"
	Number BinaryParamDataType = "number"
	String BinaryParamDataType = "string"
	Time   BinaryParamDataType = "time"
)

Defines values for BinaryParamDataType.

type BinaryShort

type BinaryShort struct {
	// Descr Short description of the template
	Descr *string `json:"descr,omitempty"`

	// GroupId ID of the group binary is shared to
	GroupId int64 `json:"group_id"`

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

	// Name Name of the template
	Name *string `json:"name,omitempty"`

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

	// 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, params *ListBinariesParams, 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)

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

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

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

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

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

	AddGroup(ctx context.Context, body AddGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

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

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

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

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

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

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

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

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

	// GetClientMe request
	GetClientMe(ctx context.Context, 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)
}

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

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

func (*ClientSDK) AddGroupWithBody

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

func (*ClientSDK) AddToGroup

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

func (*ClientSDK) AddToGroupWithBody

func (c *ClientSDK) AddToGroupWithBody(ctx context.Context, id int64, 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) DelFromGroup

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

func (*ClientSDK) DelGroup

func (c *ClientSDK) DelGroup(ctx context.Context, id int64, params *DelGroupParams, 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) GetBinaryMetadata

func (c *ClientSDK) GetBinaryMetadata(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) GetGroup

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

func (*ClientSDK) LeaveGroup

func (c *ClientSDK) LeaveGroup(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, params *ListBinariesParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*ClientSDK) ListGroups

func (c *ClientSDK) ListGroups(ctx context.Context, params *ListGroupsParams, 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) 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) 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) UpdateBinaryMetadata

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

func (*ClientSDK) UpdateBinaryMetadataWithBody

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

func (*ClientSDK) UpdateGroup

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

func (*ClientSDK) UpdateGroupWithBody

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

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

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

func (*ClientWithResponses) 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) AddGroupWithBodyWithResponse

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

AddGroupWithBodyWithResponse request with arbitrary body returning *AddGroupResponse

func (*ClientWithResponses) AddGroupWithResponse

func (c *ClientWithResponses) AddGroupWithResponse(ctx context.Context, body AddGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*AddGroupResponse, error)

func (*ClientWithResponses) AddToGroupWithBodyWithResponse

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

AddToGroupWithBodyWithResponse request with arbitrary body returning *AddToGroupResponse

func (*ClientWithResponses) AddToGroupWithResponse

func (c *ClientWithResponses) AddToGroupWithResponse(ctx context.Context, id int64, body AddToGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*AddToGroupResponse, 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) DelFromGroupWithResponse

func (c *ClientWithResponses) DelFromGroupWithResponse(ctx context.Context, id int64, clientId int64, reqEditors ...RequestEditorFn) (*DelFromGroupResponse, error)

DelFromGroupWithResponse request returning *DelFromGroupResponse

func (*ClientWithResponses) DelGroupWithResponse

func (c *ClientWithResponses) DelGroupWithResponse(ctx context.Context, id int64, params *DelGroupParams, reqEditors ...RequestEditorFn) (*DelGroupResponse, error)

DelGroupWithResponse request returning *DelGroupResponse

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

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

GetBinaryMetadataWithResponse request returning *GetBinaryMetadataResponse

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

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

GetGroupWithResponse request returning *GetGroupResponse

func (*ClientWithResponses) LeaveGroupWithResponse

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

LeaveGroupWithResponse request returning *LeaveGroupResponse

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, params *ListBinariesParams, reqEditors ...RequestEditorFn) (*ListBinariesResponse, error)

ListBinariesWithResponse request returning *ListBinariesResponse

func (*ClientWithResponses) ListGroupsWithResponse

func (c *ClientWithResponses) ListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)

ListGroupsWithResponse request returning *ListGroupsResponse

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

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

UpdateBinaryMetadataWithBodyWithResponse request with arbitrary body returning *UpdateBinaryMetadataResponse

func (*ClientWithResponses) UpdateBinaryMetadataWithResponse

func (c *ClientWithResponses) UpdateBinaryMetadataWithResponse(ctx context.Context, id int64, body UpdateBinaryMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateBinaryMetadataResponse, error)

func (*ClientWithResponses) UpdateGroupWithBodyWithResponse

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

UpdateGroupWithBodyWithResponse request with arbitrary body returning *UpdateGroupResponse

func (*ClientWithResponses) UpdateGroupWithResponse

func (c *ClientWithResponses) UpdateGroupWithResponse(ctx context.Context, id int64, body UpdateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateGroupResponse, 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, params *ListBinariesParams, 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)

	// GetBinaryMetadataWithResponse request
	GetBinaryMetadataWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetBinaryMetadataResponse, error)

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

	UpdateBinaryMetadataWithResponse(ctx context.Context, id int64, body UpdateBinaryMetadataJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateBinaryMetadataResponse, error)

	// ListGroupsWithResponse request
	ListGroupsWithResponse(ctx context.Context, params *ListGroupsParams, reqEditors ...RequestEditorFn) (*ListGroupsResponse, error)

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

	AddGroupWithResponse(ctx context.Context, body AddGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*AddGroupResponse, error)

	// DelGroupWithResponse request
	DelGroupWithResponse(ctx context.Context, id int64, params *DelGroupParams, reqEditors ...RequestEditorFn) (*DelGroupResponse, error)

	// GetGroupWithResponse request
	GetGroupWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*GetGroupResponse, error)

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

	UpdateGroupWithResponse(ctx context.Context, id int64, body UpdateGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateGroupResponse, error)

	// LeaveGroupWithResponse request
	LeaveGroupWithResponse(ctx context.Context, id int64, reqEditors ...RequestEditorFn) (*LeaveGroupResponse, error)

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

	AddToGroupWithResponse(ctx context.Context, id int64, body AddToGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*AddToGroupResponse, error)

	// DelFromGroupWithResponse request
	DelFromGroupWithResponse(ctx context.Context, id int64, clientId int64, reqEditors ...RequestEditorFn) (*DelFromGroupResponse, error)

	// GetClientMeWithResponse request
	GetClientMeWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetClientMeResponse, 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)
}

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

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
}

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 DelFromGroupResponse

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

func ParseDelFromGroupResponse

func ParseDelFromGroupResponse(rsp *http.Response) (*DelFromGroupResponse, error)

ParseDelFromGroupResponse parses an HTTP response from a DelFromGroupWithResponse call

func (DelFromGroupResponse) Status

func (r DelFromGroupResponse) Status() string

Status returns HTTPResponse.Status

func (DelFromGroupResponse) StatusCode

func (r DelFromGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DelGroupParams

type DelGroupParams struct {
	// Force Delete even if group is non-empty
	Force *bool `form:"force,omitempty" json:"force,omitempty"`
}

DelGroupParams defines parameters for DelGroup.

type DelGroupResponse

type DelGroupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
}

func ParseDelGroupResponse

func ParseDelGroupResponse(rsp *http.Response) (*DelGroupResponse, error)

ParseDelGroupResponse parses an HTTP response from a DelGroupWithResponse call

func (DelGroupResponse) Status

func (r DelGroupResponse) Status() string

Status returns HTTPResponse.Status

func (DelGroupResponse) StatusCode

func (r DelGroupResponse) 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 GetBinaryMetadataResponse

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

func ParseGetBinaryMetadataResponse

func ParseGetBinaryMetadataResponse(rsp *http.Response) (*GetBinaryMetadataResponse, error)

ParseGetBinaryMetadataResponse parses an HTTP response from a GetBinaryMetadataWithResponse call

func (GetBinaryMetadataResponse) Status

func (r GetBinaryMetadataResponse) Status() string

Status returns HTTPResponse.Status

func (GetBinaryMetadataResponse) StatusCode

func (r GetBinaryMetadataResponse) 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 GetGroupResponse

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

func ParseGetGroupResponse

func ParseGetGroupResponse(rsp *http.Response) (*GetGroupResponse, error)

ParseGetGroupResponse parses an HTTP response from a GetGroupWithResponse call

func (GetGroupResponse) Status

func (r GetGroupResponse) Status() string

Status returns HTTPResponse.Status

func (GetGroupResponse) StatusCode

func (r GetGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type Group

type Group struct {
	// Capacity Max number of members (0 means unlimited)
	Capacity int `json:"capacity"`

	// Id Group ID
	Id      int64         `json:"id"`
	Members []GroupMember `json:"members"`

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

Group defines model for group.

type GroupMember

type GroupMember struct {
	// CanShare Can the member share binaries to the group?
	CanShare *bool `json:"can_share,omitempty"`

	// ClientId Client ID
	ClientId int64 `json:"client_id"`

	// Name Member name
	Name *string `json:"name,omitempty"`
}

GroupMember defines model for group_member.

type GroupShort

type GroupShort struct {
	// Id Group ID
	Id int64 `json:"id"`

	// MemberOf Am I a member of the group?
	MemberOf bool `json:"member_of"`

	// 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 LeaveGroupResponse

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

func ParseLeaveGroupResponse

func ParseLeaveGroupResponse(rsp *http.Response) (*LeaveGroupResponse, error)

ParseLeaveGroupResponse parses an HTTP response from a LeaveGroupWithResponse call

func (LeaveGroupResponse) Status

func (r LeaveGroupResponse) Status() string

Status returns HTTPResponse.Status

func (LeaveGroupResponse) StatusCode

func (r LeaveGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListAppsParams added in v0.2.0

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

ListAppsParams defines parameters for ListApps.

type ListAppsResponse

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

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 ListBinariesParams

type ListBinariesParams struct {
	// Shared Templates shared with me
	Shared *bool `form:"shared,omitempty" json:"shared,omitempty"`

	// Named Binaries with non-empty name
	Named *bool `form:"named,omitempty" json:"named,omitempty"`
}

ListBinariesParams defines parameters for ListBinaries.

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 ListGroupsParams

type ListGroupsParams struct {
	// MemberOf Am I a member of the group?
	MemberOf *bool `form:"member_of,omitempty" json:"member_of,omitempty"`
}

ListGroupsParams defines parameters for ListGroups.

type ListGroupsResponse

type ListGroupsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *struct {
		Groups []GroupShort `json:"groups"`
	}
}

func ParseListGroupsResponse

func ParseListGroupsResponse(rsp *http.Response) (*ListGroupsResponse, error)

ParseListGroupsResponse parses an HTTP response from a ListGroupsWithResponse call

func (ListGroupsResponse) Status

func (r ListGroupsResponse) Status() string

Status returns HTTPResponse.Status

func (ListGroupsResponse) StatusCode

func (r ListGroupsResponse) 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 (
	Asc  ListLogsParamsSort = "asc"
	Desc 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 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 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
}

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 RequestEditorFn

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

RequestEditorFn is the function signature for the RequestEditor callback function

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

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

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

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

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 UpdateAppJSONBody

type UpdateAppJSONBody struct {
	// 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"`

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

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

	// Name App name
	Name *string `json:"name,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"`

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

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

UpdateAppJSONBody defines parameters for UpdateApp.

type UpdateAppJSONBodyLog

type UpdateAppJSONBodyLog string

UpdateAppJSONBodyLog defines parameters for UpdateApp.

const (
	UpdateAppJSONBodyLogKafka UpdateAppJSONBodyLog = "kafka"
	UpdateAppJSONBodyLogNone  UpdateAppJSONBodyLog = "none"
)

Defines values for UpdateAppJSONBodyLog.

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 UpdateBinaryMetadataJSONRequestBody

type UpdateBinaryMetadataJSONRequestBody = BinaryMetadata

UpdateBinaryMetadataJSONRequestBody defines body for UpdateBinaryMetadata for application/json ContentType.

type UpdateBinaryMetadataResponse

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

func ParseUpdateBinaryMetadataResponse

func ParseUpdateBinaryMetadataResponse(rsp *http.Response) (*UpdateBinaryMetadataResponse, error)

ParseUpdateBinaryMetadataResponse parses an HTTP response from a UpdateBinaryMetadataWithResponse call

func (UpdateBinaryMetadataResponse) Status

Status returns HTTPResponse.Status

func (UpdateBinaryMetadataResponse) StatusCode

func (r UpdateBinaryMetadataResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UpdateGroupJSONBody

type UpdateGroupJSONBody struct {
	// Name Group name
	Name string `json:"name"`
}

UpdateGroupJSONBody defines parameters for UpdateGroup.

type UpdateGroupJSONRequestBody

type UpdateGroupJSONRequestBody UpdateGroupJSONBody

UpdateGroupJSONRequestBody defines body for UpdateGroup for application/json ContentType.

type UpdateGroupResponse

type UpdateGroupResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *GroupShort
}

func ParseUpdateGroupResponse

func ParseUpdateGroupResponse(rsp *http.Response) (*UpdateGroupResponse, error)

ParseUpdateGroupResponse parses an HTTP response from a UpdateGroupWithResponse call

func (UpdateGroupResponse) Status

func (r UpdateGroupResponse) Status() string

Status returns HTTPResponse.Status

func (UpdateGroupResponse) StatusCode

func (r UpdateGroupResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

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