Documentation
¶
Index ¶
- type Config
- func (c *Config) JSON() (string, error)
- func (c *Config) Markdown() string
- func (c *Config) SendSoundNotification() bool
- func (c *Config) SendTextNotification() bool
- func (c *Config) SetDefaults()
- func (c *Config) ShowTUI() bool
- func (c *Config) Validate() error
- func (c *Config) YAML() (string, error)
- type ConfigTemplates
- type ConfigTheme
- type ConfigWorkspaceMode
- type ConfigWorkspaces
- type Interactive
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// The name of the current namespace.
//
// Namespaces are used to reference executables in the CLI using the format
// `workspace:namespace/name`.
// If the namespace is not set, only executables defined without a namespace will
// be discovered.
//
CurrentNamespace string `json:"currentNamespace,omitempty" yaml:"currentNamespace,omitempty" mapstructure:"currentNamespace,omitempty"`
// The name of the current workspace. This should match a key in the `workspaces`
// or `remoteWorkspaces` map.
CurrentWorkspace string `json:"currentWorkspace" yaml:"currentWorkspace" mapstructure:"currentWorkspace"`
// The default log mode to use when running executables.
// This can either be `hidden`, `json`, `logfmt` or `text`
//
// `hidden` will not display any logs.
// `json` will display logs in JSON format.
// `logfmt` will display logs with a log level, timestamp, and message.
// `text` will just display the log message.
//
DefaultLogMode io.LogMode `json:"defaultLogMode,omitempty" yaml:"defaultLogMode,omitempty" mapstructure:"defaultLogMode,omitempty"`
// The default timeout to use when running executables.
// This should be a valid duration string.
//
DefaultTimeout time.Duration `json:"defaultTimeout,omitempty" yaml:"defaultTimeout,omitempty" mapstructure:"defaultTimeout,omitempty"`
// Interactive corresponds to the JSON schema field "interactive".
Interactive *Interactive `json:"interactive,omitempty" yaml:"interactive,omitempty" mapstructure:"interactive,omitempty"`
// A map of flowfile template names to their paths.
Templates ConfigTemplates `json:"templates,omitempty" yaml:"templates,omitempty" mapstructure:"templates,omitempty"`
// The theme of the interactive UI.
Theme ConfigTheme `json:"theme,omitempty" yaml:"theme,omitempty" mapstructure:"theme,omitempty"`
// The mode of the workspace. This can be either `fixed` or `dynamic`.
// In `fixed` mode, the current workspace used at runtime is always the one set in
// the currentWorkspace config field.
// In `dynamic` mode, the current workspace used at runtime is determined by the
// current directory.
// If the current directory is within a workspace, that workspace is used.
//
WorkspaceMode ConfigWorkspaceMode `json:"workspaceMode,omitempty" yaml:"workspaceMode,omitempty" mapstructure:"workspaceMode,omitempty"`
// Map of workspace names to their paths. The path should be a valid absolute path
// to the workspace directory.
//
Workspaces ConfigWorkspaces `json:"workspaces" yaml:"workspaces" mapstructure:"workspaces"`
}
User Configuration for the Flow CLI. Includes configurations for workspaces, templates, I/O, and other settings for the CLI.
It is read from the user's flow config directory: - **MacOS**: `$HOME/Library/Application Support/flow` - **Linux**: `$HOME/.config/flow` - **Windows**: `%APPDATA%\flow`
Alternatively, a custom path can be set using the `FLOW_CONFIG_PATH` environment variable.
func (*Config) SendSoundNotification ¶
func (*Config) SendTextNotification ¶
func (*Config) SetDefaults ¶
func (c *Config) SetDefaults()
type ConfigTemplates ¶
A map of flowfile template names to their paths.
type ConfigTheme ¶ added in v0.6.1
type ConfigTheme string
const ConfigThemeDark ConfigTheme = "dark"
const ConfigThemeDefault ConfigTheme = "default"
const ConfigThemeDracula ConfigTheme = "dracula"
const ConfigThemeLight ConfigTheme = "light"
const ConfigThemeTokyoNight ConfigTheme = "tokyo-night"
func (ConfigTheme) String ¶ added in v0.6.1
func (ct ConfigTheme) String() string
type ConfigWorkspaceMode ¶
type ConfigWorkspaceMode string
const ConfigWorkspaceModeDynamic ConfigWorkspaceMode = "dynamic"
const ConfigWorkspaceModeFixed ConfigWorkspaceMode = "fixed"
type ConfigWorkspaces ¶
Map of workspace names to their paths. The path should be a valid absolute path to the workspace directory.
type Interactive ¶
type Interactive struct {
// Enabled corresponds to the JSON schema field "enabled".
Enabled bool `json:"enabled" yaml:"enabled" mapstructure:"enabled"`
// Whether to send a desktop notification when a command completes.
NotifyOnCompletion *bool `json:"notifyOnCompletion,omitempty" yaml:"notifyOnCompletion,omitempty" mapstructure:"notifyOnCompletion,omitempty"`
// Whether to play a sound when a command completes.
SoundOnCompletion *bool `json:"soundOnCompletion,omitempty" yaml:"soundOnCompletion,omitempty" mapstructure:"soundOnCompletion,omitempty"`
}
Configurations for the interactive UI.
Click to show internal directories.
Click to hide internal directories.