Documentation
¶
Index ¶
- type ConfRoot
- type ConfigLoader
- type ConfigLoaderOption
- type ConfigValidator
- type ViewManager
- func (c *ViewManager) GetActiveWidgetsOf(name string) (result []*widget.WrapperWidget)
- func (c *ViewManager) GetGithubHost() string
- func (c *ViewManager) HasWidget(widgetType string) bool
- func (c *ViewManager) MapWidgets(fn func(*widget.WrapperWidget) error) (err error)
- func (c *ViewManager) NextWidget(direction string)
- func (c *ViewManager) SwitchTab(tabIdx int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfRoot ¶
type ConfRoot struct { SchemaVersion string `yaml:"schema_version"` Timezone string GitHubHost string `yaml:"github_url"` Envs []map[string]string Widgets []*widgetNode Layout []*tabNode }
ConfRoot is the root schema of config file
type ConfigLoader ¶
type ConfigLoader struct {
// contains filtered or unexported fields
}
ConfigLoader load and unmarshal config file
func NewLoader ¶
func NewLoader(opt *ConfigLoaderOption) (c *ConfigLoader, err error)
NewLoader constructs a ConfigLoader
type ConfigLoaderOption ¶
type ConfigLoaderOption struct { ExecPath string ConfigPath string AppVersion string ConfigSchemaVersion string }
ConfigLoaderOption is some options for ConfigLoader constructor
type ConfigValidator ¶
type ConfigValidator struct { }
ConfigValidator is
func NewConfigValidator ¶
func NewConfigValidator() (c *ConfigValidator, err error)
NewConfigValidator constructs a ConfigLoader
type ViewManager ¶
type ViewManager struct {
// contains filtered or unexported fields
}
ViewManager load and unmarshal config file
func NewViewManager ¶
func NewViewManager(opt *ConfigLoaderOption) (c *ViewManager, err error)
NewViewManager constructs a ViewManager
func (*ViewManager) GetActiveWidgetsOf ¶
func (c *ViewManager) GetActiveWidgetsOf(name string) (result []*widget.WrapperWidget)
GetActiveWidgetsOf is
func (*ViewManager) HasWidget ¶
func (c *ViewManager) HasWidget(widgetType string) bool
HasWidget returns whether config contains 'widgetType' stack or not
func (*ViewManager) MapWidgets ¶
func (c *ViewManager) MapWidgets(fn func(*widget.WrapperWidget) error) (err error)
MapWidgets is
Click to show internal directories.
Click to hide internal directories.