api

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInternalError router.ErrCode = "internal_error"

	ErrFailedToParseBody router.ErrCode = "failed_to_parse_body"

	ErrFailedToInstallUpdates router.ErrCode = "failed_to_install_updates"

	ErrFailedToListContainers    router.ErrCode = "failed_to_list_containers"
	ErrFailedToDeleteContainer   router.ErrCode = "failed_to_delete_container"
	ErrFailedToCreateContainer   router.ErrCode = "failed_to_create_container"
	ErrFailedToStartContainer    router.ErrCode = "failed_to_start_container"
	ErrFailedToStopContainer     router.ErrCode = "failed_to_stop_container"
	ErrFailedToRecreateContainer router.ErrCode = "failed_to_recreate_container"
	ErrFailedToGetContainerLogs  router.ErrCode = "failed_to_get_container_logs"
	ErrFailedToWaitContainer     router.ErrCode = "failed_to_wait_container"
	ErrFailedToGetContainerInfo  router.ErrCode = "failed_to_get_container_info"
	ErrFailedToGetImageInfo      router.ErrCode = "failed_to_get_image_info"
	ErrFailedToPullImage         router.ErrCode = "failed_to_pull_image"
	ErrFailedToBuildImage        router.ErrCode = "failed_to_build_image"
	ErrContainerNotFound         router.ErrCode = "container_not_found"

	ErrFailedToGetSSHKeys   router.ErrCode = "failed_to_get_ssh_keys"
	ErrFailedToAddSSHKey    router.ErrCode = "failed_to_add_ssh_key"
	ErrFailedToDeleteSSHKey router.ErrCode = "failed_to_delete_ssh_key"
	ErrInvalidPublicKey     router.ErrCode = "invalid_public_key"
	ErrInvalidFingerprint   router.ErrCode = "invalid_fingerprint"

	ErrFailedToPatchSettings router.ErrCode = "failed_to_patch_settings"
)

Variables

This section is empty.

Functions

func AppRequest added in v0.12.0

func AppRequest(AppRoute string) *requests.Builder

Types

type Error added in v0.12.0

type Error struct {
	HttpCode int
	Code     router.ErrCode `json:"code"`
	Message  string         `json:"message"`
}

func HandleError added in v0.12.0

func HandleError(requestError error, apiError Error) *Error

func (*Error) RouterError added in v0.12.0

func (e *Error) RouterError() router.Error

Jump to

Keyboard shortcuts

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