cliby

package module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LOG_FORMAT = "%{color}%{time:2006-01-02T15:04:05.000Z07:00} %{level:-5s} [%{shortfile}]%{color:reset} %{message}"

Functions

func InitLogging

func InitLogging()

Types

type Cli

type Cli struct {
	CookieFile     string
	UA             *http.Client
	Usage          func() string
	Commands       map[string]func() error
	CommandAliases map[string]string
	Opts           map[string]interface{}
	Args           []string
	Options        optigo.OptionParser
	Templates      map[string]string
	Name           string
}

func New

func New(name string) *Cli

func (*Cli) Browse

func (c *Cli) Browse(uri string) error

func (*Cli) ExportTemplates

func (c *Cli) ExportTemplates() error

func (*Cli) Get

func (c *Cli) Get(uri string) (*http.Response, error)

func (*Cli) GetTemplate

func (c *Cli) GetTemplate(name string) string

func (*Cli) LoadConfigs

func (c *Cli) LoadConfigs(configFile string)

func (*Cli) Login

func (c *Cli) Login() error

func (*Cli) Post

func (c *Cli) Post(uri string, content string) (*http.Response, error)

func (*Cli) PrintUsage

func (c *Cli) PrintUsage(ok bool)

func (*Cli) ProcessAllOptions

func (c *Cli) ProcessAllOptions() string

func (*Cli) ProcessOptions

func (c *Cli) ProcessOptions() string

func (*Cli) Put

func (c *Cli) Put(uri string, content string) (*http.Response, error)

func (*Cli) RunCommand

func (c *Cli) RunCommand(command string) error

func (*Cli) SetEditing

func (c *Cli) SetEditing(dflt bool)

type Exit

type Exit struct{ Code int }

type NoChangesFound

type NoChangesFound struct{}

func (NoChangesFound) Error

func (f NoChangesFound) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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