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: 0

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