Documentation
¶
Index ¶
- Constants
- Variables
- func CreateProcCompHome() string
- func GetApiToken() string
- func GetApiTokenPath() string
- func GetConfigDefault() []string
- func GetLogFilePath() string
- func GetLogLevel() zerolog.Level
- func GetRecipesDir() string
- func GetSettingsPath() string
- func GetShortCutsPaths(extraFiles []string) []string
- func GetThemesPath() string
- func GetUnixSocketPath() string
- func IsLogSelectionOn() bool
- type Body
- type Color
- type Colors
- type Dialog
- type Flags
- type Help
- type ProcTable
- type Settings
- type Sort
- type StatTable
- type Style
- type StyleListener
- type Styles
- func (s *Styles) AttentionBgColor() tcell.Color
- func (s *Styles) BgColor() tcell.Color
- func (s *Styles) Body() Body
- func (s *Styles) BorderColor() tcell.Color
- func (s *Styles) ContrastBgColor() tcell.Color
- func (s *Styles) Dialog() Dialog
- func (s *Styles) Dump(w io.Writer)
- func (s *Styles) FgColor() tcell.Color
- func (s *Styles) GetStyleName() string
- func (s *Styles) Help() Help
- func (s *Styles) Load(path string) error
- func (s *Styles) ProcTable() ProcTable
- func (s *Styles) StatTable() StatTable
- func (s *Styles) Update()
- type Themes
Constants ¶
View Source
const ( // DefaultRefreshRate represents the refresh interval. DefaultRefreshRate = 1 * time.Second // DefaultLogLevel represents the default log level. DefaultLogLevel = "info" // DefaultPortNum represents the default port number. DefaultPortNum = 8080 // DefaultAddress represents the default address. DefaultAddress = "localhost" // DefaultLogLength represents the default log length. DefaultLogLength = 1000 // DefaultSortColumn represents the default sort column. DefaultSortColumn = "NAME" // DefaultThemeName represents the default theme DefaultThemeName = "Default" // NoNamespace represents no namespace selection NoNamespace = "" )
View Source
const ( EnvVarNamePort = "PC_PORT_NUM" EnvVarNameTui = "PC_DISABLE_TUI" EnvVarNameConfig = "PC_CONFIG_FILES" EnvVarNameShortcuts = "PC_SHORTCUTS_FILES" EnvVarNameRecipes = "PC_RECIPE_FILES" EnvVarNameNoServer = "PC_NO_SERVER" EnvVarUnixSocketPath = "PC_SOCKET_PATH" EnvVarReadOnlyMode = "PC_READ_ONLY" EnvVarDisableDotEnv = "PC_DISABLE_DOTENV" EnvVarTuiFullScreen = "PC_TUI_FULL_SCREEN" EnvVarHideDisabled = "PC_HIDE_DISABLED_PROC" EnvVarNameOrderedShutdown = "PC_ORDERED_SHUTDOWN" EnvVarWithRecursiveMetrics = "PC_RECURSIVE_METRICS" EnvVarDisabledProcs = "PC_DISABLED_PROCESSES" EnvVarNameAddress = "PC_ADDRESS" EnvVarLogNoColor = "PC_LOG_NO_COLOR" )
View Source
const ( EnvVarApiToken = "PC_API_TOKEN" EnvVarApiTokenPath = "PC_API_TOKEN_PATH" TokenHeader = "X-PC-Token-Key" LogPathEnvVarName = "PC_LOG_FILE" LogLevelEnvVarName = "PC_LOG_LEVEL" LogFileFlags = os.O_CREATE | os.O_APPEND | os.O_WRONLY | os.O_TRUNC LogFileMode = os.FileMode(0600) RecipeFileMode = os.FileMode(0644) DonateURL = "https://github.com/sponsors/f1bonacc1" DiscussionsURL = "https://github.com/f1bonacc1/process-compose/discussions" )
View Source
const (
CustomStyleName = "Custom Style"
)
Variables ¶
View Source
var ( Version = "undefined" Commit = "undefined" Date = "undefined" CheckForUpdates = "false" License = "Apache-2.0" Discord = "https://discord.gg/S4xgmRSHdC" Author = "Eugene Berger" ProjectName = "Process Compose 🔥" RemoteProjectName = "Process Compose ⚡" )
View Source
var (
CliApiTokenPath string
)
Functions ¶
func CreateProcCompHome ¶ added in v1.5.0
func CreateProcCompHome() string
func GetApiToken ¶ added in v1.94.0
func GetApiToken() string
func GetApiTokenPath ¶ added in v1.94.0
func GetApiTokenPath() string
func GetConfigDefault ¶ added in v0.65.0
func GetConfigDefault() []string
func GetLogFilePath ¶ added in v0.43.1
func GetLogFilePath() string
func GetLogLevel ¶ added in v1.78.0
func GetRecipesDir ¶ added in v1.75.0
func GetRecipesDir() string
func GetSettingsPath ¶ added in v1.0.0
func GetSettingsPath() string
func GetShortCutsPaths ¶ added in v1.63.0
func GetThemesPath ¶ added in v1.0.0
func GetThemesPath() string
func GetUnixSocketPath ¶ added in v1.2.0
func GetUnixSocketPath() string
func IsLogSelectionOn ¶ added in v0.80.0
func IsLogSelectionOn() bool
Types ¶
type Body ¶ added in v1.0.0
type Body struct {
FgColor Color `yaml:"fgColor"`
BgColor Color `yaml:"bgColor"`
SecondaryTextColor Color `yaml:"secondaryTextColor"`
TertiaryTextColor Color `yaml:"tertiaryTextColor"`
BorderColor Color `yaml:"borderColor"`
}
Body tracks body styles.
type Dialog ¶ added in v1.0.0
type Dialog struct {
FgColor Color `yaml:"fgColor"`
BgColor Color `yaml:"bgColor"`
ContrastBgColor Color `yaml:"contrastBgColor"`
AttentionBgColor Color `yaml:"attentionBgColor"`
ButtonFgColor Color `yaml:"buttonFgColor"`
ButtonBgColor Color `yaml:"buttonBgColor"`
ButtonFocusFgColor Color `yaml:"buttonFocusFgColor"`
ButtonFocusBgColor Color `yaml:"buttonFocusBgColor"`
LabelFgColor Color `yaml:"labelFgColor"`
FieldFgColor Color `yaml:"fieldFgColor"`
FieldBgColor Color `yaml:"fieldBgColor"`
}
Dialog tracks dialog styles.
type Flags ¶ added in v0.65.0
type Flags struct {
RefreshRate *time.Duration
SlowRefreshRate *time.Duration
PortNum *int
Address *string
LogLevel *string
LogFile *string
LogLength *int
LogFollow *bool
LogTailLength *int
IsRawLogOutput *bool
IsTuiEnabled *bool
Command *string
Write *bool
NoDependencies *bool
HideDisabled *bool
SortColumn *string
SortColumnChanged bool
IsReverseSort *bool
NoServer *bool
KeepTuiOn *bool
KeepProjectOn *bool
IsOrderedShutdown *bool
PcTheme *string
PcThemeChanged bool
ShortcutPaths *[]string
UnixSocketPath *string
IsUnixSocket *bool
IsReadOnlyMode *bool
OutputFormat *string
DisableDotEnv *bool
IsTuiFullScreen *bool
IsDetached *bool
IsDetachedWithTui *bool
Namespace *string
DetachOnSuccess *bool
WaitReady *bool
ShortVersion *bool
LogsTruncate *bool
WithRecursiveMetrics *bool
ApiTokenPath *string
LogNoColor *bool
}
Flags represents PC configuration flags.
type Help ¶ added in v1.0.0
type Help struct {
KeyColor Color `yaml:"keyColor"`
FgColor Color `yaml:"fgColor"`
HlColor Color `yaml:"hlColor"`
ButtonBgColor Color `yaml:"buttonBgColor"`
FgCategoryColor Color `yaml:"categoryFgColor"`
LinkDonateColor Color `yaml:"linkDonateColor"`
LinkAskColor Color `yaml:"linkAskColor"`
}
Help tracks help styles.
type ProcTable ¶ added in v1.0.0
type ProcTable struct {
FgColor Color `yaml:"fgColor"`
FgWarning Color `yaml:"fgWarning"`
FgPending Color `yaml:"fgPending"`
FgCompleted Color `yaml:"fgCompleted"`
FgError Color `yaml:"fgError"`
BgColor Color `yaml:"bgColor"`
HeaderFgColor Color `yaml:"headerFgColor"`
}
ProcTable tracks processes table styles.
type Settings ¶ added in v1.0.0
type Settings struct {
Theme string `yaml:"theme"`
Sort Sort `yaml:"sort"`
DisableExitConfirmation bool `yaml:"disable_exit_confirmation"`
}
func NewSettings ¶ added in v1.0.0
func NewSettings() *Settings
type StatTable ¶ added in v1.0.0
type StatTable struct {
KeyFgColor Color `yaml:"keyFgColor"`
ValueFgColor Color `yaml:"valueFgColor"`
BgColor Color `yaml:"bgColor"`
LogoColor Color `yaml:"logoColor"`
}
StatTable tracks stats table styles.
type Style ¶ added in v1.0.0
type Style struct {
Name string `yaml:"name"`
Body Body `yaml:"body"`
StatTable StatTable `yaml:"stat_table"`
ProcTable ProcTable `yaml:"proc_table"`
Help Help `yaml:"help"`
Dialog Dialog `yaml:"dialog"`
}
Style tracks PC styles.
type StyleListener ¶ added in v1.0.0
type StyleListener interface {
// StylesChanged notifies listener the skin changed.
StylesChanged(*Styles)
}
StyleListener represents a skin's listener.
type Styles ¶ added in v1.0.0
type Styles struct {
Style Style `yaml:"style"`
}
Styles tracks process compose styling options.
func (*Styles) AttentionBgColor ¶ added in v1.5.0
AttentionBgColor returns the Contrast background color.
func (*Styles) BorderColor ¶ added in v1.0.0
BorderColor returns the border color.
func (*Styles) ContrastBgColor ¶ added in v1.5.0
ContrastBgColor returns the Contrast background color.
func (*Styles) GetStyleName ¶ added in v1.0.0
GetStyleName returns the style name
type Themes ¶ added in v1.0.0
type Themes struct {
// contains filtered or unexported fields
}
Themes represents a list of styles.
func (*Themes) AddListener ¶ added in v1.0.0
func (t *Themes) AddListener(l StyleListener)
AddListener registers a new listener.
func (*Themes) GetActiveStyles ¶ added in v1.0.0
GetActiveStyles returns the active styles.
func (*Themes) GetThemeNames ¶ added in v1.0.0
func (*Themes) RemoveListener ¶ added in v1.0.0
func (t *Themes) RemoveListener(l StyleListener)
RemoveListener removes a listener.
func (*Themes) SelectStyles ¶ added in v1.0.0
func (*Themes) SelectStylesFromFile ¶ added in v1.0.0
func (t *Themes) SelectStylesFromFile()
Click to show internal directories.
Click to hide internal directories.