model

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func (*ConfigLoader) GetConfig

func (c *ConfigLoader) GetConfig() *ConfRoot

GetConfig is

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) GetGithubHost

func (c *ViewManager) GetGithubHost() string

GetGithubHost 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

func (*ViewManager) NextWidget

func (c *ViewManager) NextWidget(direction string)

NextWidget is

func (*ViewManager) SwitchTab

func (c *ViewManager) SwitchTab(tabIdx int)

SwitchTab is

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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