apiclient

package
v0.0.0-...-06767ef Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	StatusCode int32  `json:"statusCode"`
	Message    string `json:"message"`
	Error      string `json:"error"`
}

ErrorResponse defines the json format in which the error response is returned

type InfoSuccessResponse

type InfoSuccessResponse struct {
	Version string `json:"version"`
}

InfoSuccessResponse defines the json format in which the info success response is returned

func GetLatestAvailableVersion

func GetLatestAvailableVersion() (*InfoSuccessResponse, error)

type RegistrationSuccessResponse

type RegistrationSuccessResponse struct {
	SiteID string `json:"siteId"`
	Domain string `json:"domain"`
}

RegistrationSuccessResponse defines the json format in which the registration success response is returned

func RegisterSite

func RegisterSite(publicKey ssh.PublicKey, requestedSiteID string) (*RegistrationSuccessResponse, error)

RegisterSite is a funtion used to obtain site id and register keys in the gateway

type RequestError

type RequestError struct {
	Message    string
	Details    string
	StatusCode int
}

RequestError is an error returned when the request finished with failure

func (RequestError) Error

func (err RequestError) Error() string

Jump to

Keyboard shortcuts

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