config

package
v0.0.0-...-f4dfc87 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	Execute() error
}

type CommandConfig

type CommandConfig interface {
	Command(options CommonOptions) (Command, error)
}

Shell commands

type CommonOptions

type CommonOptions interface {
	Url() string
	User() User
}

Options, common for all commands

type CompositionalCommandConfig

type CompositionalCommandConfig interface {
	Register(subcmd string, config CommandConfig)
	SubCommands() map[string]CommandConfig
}

type CompositionalCommonOptions

type CompositionalCommonOptions interface {
	CommonOptions
	SubCmd() string
}

type Config

type Config struct {
	URL  string `short:"u" long:"url" description:"controller URL"`
	User User
}

func NewConfig

func NewConfig(filePath string) (*Config, error)

type User

type User struct {
	Id       string `short:"l" long:"login" description:"login username" default:"admin"`
	Password string `short:"p" long:"password" description:"login password"`
}

Jump to

Keyboard shortcuts

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