restapi

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 15 Imported by: 2 modules, 35 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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