restapi

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 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

func NewClientFromToken

func NewClientFromToken(address string, token string) (*cloudapi.ClientWithResponses, error)

Types

type APIVersion

type APIVersion struct {
	Version  string
	Revision string
}

func GetCloudApiVersion

func GetCloudApiVersion(apiUrl string) (APIVersion, error)

func GetLocalApiVersion

func GetLocalApiVersion() (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 {
	Message string `json:"message,omitempty"`
}

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