constant

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package constant contains shared app constants

Index

Constants

View Source
const (
	AppExitCodeSuccess = 0
	AppExitCodeError   = 1
)

Variables

View Source
var AppModeType = struct {
	StartUI     AppMode
	DisplayInfo AppMode
	HandleParam AppMode
}{
	StartUI:     "START_UI",
	DisplayInfo: "DISPLAY_INFO",
	HandleParam: "HANDLE_PARAM",
}
View Source
var ErrNotFound = errors.New("not found")

ErrNotFound is used by data layer.

View Source
var HostStorageType = struct {
	Combined  HostStorageEnum
	SSHConfig HostStorageEnum
	YAMLFile  HostStorageEnum
}{
	Combined:  "COMBINED",
	SSHConfig: "SSH_CONFIG",
	YAMLFile:  "YAML_FILE",
}

HostStorageType defines the type of the underlying storage of a host.

View Source
var LogLevelType = struct {
	INFO  LogLevel
	DEBUG LogLevel
}{
	INFO:  "info",
	DEBUG: "debug",
}

Functions

This section is empty.

Types

type AppMode added in v1.5.0

type AppMode = string

type HostStorageEnum added in v1.4.0

type HostStorageEnum string

HostStorageEnum defines the enum options for HostStorageType.

type LogLevel added in v1.5.0

type LogLevel = string

type ProcessType added in v1.2.0

type ProcessType string

ProcessType is used to determine what kind of external process is running.

const (
	// ProcessTypeSSHLoadConfig is used when we need to run ssh -G <hostname> to get config.
	ProcessTypeSSHLoadConfig ProcessType = "ssh-load-config"
	// ProcessTypeSSHCopyID is used when we need to run ssh-copy-id to copy a public key to a remote host.
	ProcessTypeSSHCopyID ProcessType = "ssh-copy-id"
	// ProcessTypeSSHConnect is used when we want to connect to a remote host.
	ProcessTypeSSHConnect ProcessType = "ssh-connect"
)

type ScreenLayout added in v1.2.0

type ScreenLayout string

ScreenLayout is used to determine how the hostlist should be displayed.

const (
	// ScreenLayoutCompact is set when all items in the hostlist are shown without description.
	ScreenLayoutCompact ScreenLayout = "compact"
	// ScreenLayoutDescription is set when all hosts are shown with description field and a margin.
	ScreenLayoutDescription ScreenLayout = "description"
	// ScreenLayoutGroup is set when all hosts are shown with description field and a margin.
	ScreenLayoutGroup ScreenLayout = "group"
)

Jump to

Keyboard shortcuts

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