restapi

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2023 License: Apache-2.0 Imports: 15 Imported by: 35

Documentation

Index

Constants

View Source
const (
	ApiRevisionExt = "x-revision"
)

Variables

This section is empty.

Functions

func LabelToLabelInput

func LabelToLabelInput(key string, value string) cloudapi.LabelInput

func LabelsToLabelInput

func LabelsToLabelInput(labels map[string]string) []cloudapi.LabelInput

Types

type APIVersion

type APIVersion struct {
	Version  string
	Revision string
}

func GetLocalAPIVersion added in v0.1.11

func GetLocalAPIVersion() (APIVersion, error)

type Client added in v0.1.11

type Client struct {
	*cloudapi.ClientWithResponses
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context) (*Client, error)

func NewClientFromToken

func NewClientFromToken(apiRoot string, token string) (*Client, error)

func (*Client) GetAPIVersion added in v0.1.11

func (c *Client) GetAPIVersion() (APIVersion, error)

type Doer

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

type HttpError

type HttpError struct {
	StatusCode int
	Message    string
}

func (*HttpError) Error

func (err *HttpError) Error() string

type ResponseBody

type ResponseBody struct {
	Errors []struct {
		Message string `json:"message"`
	} `json:"errors"`
}

Directories

Path Synopsis
Package cloudapi provides primitives to interact with the openapi HTTP API.
Package cloudapi provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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