api

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 5 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"
	ErrAlreadyUpdating            router.ErrCode = "already_updating"
	ErrFailedToFetchLatestVersion router.ErrCode = "failed_to_fetch_latest_version"
	ErrFailedToGetUpdates         router.ErrCode = "failed_to_get_updates"

	ErrFailedToGetSSHKeys   router.ErrCode = "failed_to_get_ssh_keys"
	ErrFailedToAddSSHKey    router.ErrCode = "failed_to_add_ssh_key"
	ErrFailedToDeleteSSHKey router.ErrCode = "failed_to_delete_ssh_key"
	ErrFailedToGetSshUsers  router.ErrCode = "failed_to_get_ssh_users"
	ErrInvalidPublicKey     router.ErrCode = "invalid_public_key"
	ErrUserNotFound         router.ErrCode = "user_not_found"

	ErrFailedToGetSettings   router.ErrCode = "failed_to_get_settings"
	ErrFailedToPatchSettings router.ErrCode = "failed_to_patch_settings"

	ErrFailedToGetHost router.ErrCode = "failed_to_get_host"
	ErrFailedToGetCPUs router.ErrCode = "failed_to_get_cpus"

	ErrFailedToMigrateToNewDbms router.ErrCode = "failed_to_migrate_to_new_dbms"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

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

func HandleError

func HandleError(requestError error, apiError Error) *Error

func (*Error) RouterError

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

Jump to

Keyboard shortcuts

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