Documentation ¶
Overview ¶
Package segment defines all segments and exposes an unique way to provide them.
Index ¶
Constants ¶
View Source
const ( // SegmentNameUnknown defines the segment name to use for failure. SegmentNameUnknown = "" // SegmentNameStub defines the segment name to use for stub. SegmentNameStub = "-stub-" )
Variables ¶
This section is empty.
Functions ¶
func ProvideSegments ¶
func ProvideSegments(segments []string, cfg Config) ([]domain.SegmentsProvider, error)
ProvideSegments provides segments based on configuration.
Types ¶
type Config ¶
type Config struct { Stub StubConfig `yaml:"-"` Custom map[string]customConfig `yaml:"custom"` CWD cwdConfig `yaml:"cwd"` GIT gitConfig `yaml:"git"` Msg msgConfig `yaml:"msg"` K8S k8sConfig `yaml:"k8s"` LastCMDExecStatus lastCMDExecStatusConfig `yaml:"last-cmd-exec-status"` LastCMDExecTime lastCMDExecTimeConfig `yaml:"last-cmd-exec-time"` ReadOnly readOnlyConfig `yaml:"read-only"` User userConfig `yaml:"user"` }
Config stores the configuration for all segments provider.
type StubConfig ¶
StubConfig stores the results to return when calling the ProvideSegments method.
Click to show internal directories.
Click to hide internal directories.