context

package
v3.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: MIT Imports: 7 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Log        coblog.Log
	Version    string
	ConfigPath string
	ConfigDir  string

	Changed       bool
	TokensChanged bool
	Client        chClient.Client
	// contains filtered or unexported fields
}

func (*Context) CobraPostRun

func (ctx *Context) CobraPostRun(cmd *cobra.Command, args []string)

func (*Context) Defer

func (ctx *Context) Defer(f func()) *Context

func (*Context) DeferCobra

func (ctx *Context) DeferCobra(f func(cmd *cobra.Command, args []string)) *Context

func (*Context) Exit

func (ctx *Context) Exit(code int)

func (*Context) ExitCommand

func (ctx *Context) ExitCommand()

func (*Context) GetAPI

func (ctx *Context) GetAPI() string

func (*Context) GetAuth

func (ctx *Context) GetAuth() model.UserInfo

func (*Context) GetClient

func (ctx *Context) GetClient() *chClient.Client

func (*Context) GetNamespace

func (ctx *Context) GetNamespace() Namespace

func (*Context) GetSelfSignedTLSRule

func (ctx *Context) GetSelfSignedTLSRule() bool

func (*Context) GetStorable

func (ctx *Context) GetStorable() Storable

func (*Context) RunDeferred

func (ctx *Context) RunDeferred() *Context

func (*Context) SetAPI

func (ctx *Context) SetAPI(api string) *Context

func (*Context) SetAuth

func (ctx *Context) SetAuth(login, password string) *Context

func (*Context) SetNamespace

func (ctx *Context) SetNamespace(ns Namespace) *Context

func (*Context) SetSelfSignedTLSRule

func (ctx *Context) SetSelfSignedTLSRule(allow bool) *Context

func (*Context) SetStorable

func (ctx *Context) SetStorable(config Storable) (configVersion string)

func (*Context) SetTemporaryNamespace

func (ctx *Context) SetTemporaryNamespace(ns namespace.Namespace) *Context

func (*Context) StartCommand

func (ctx *Context) StartCommand(command string)

type Namespace

type Namespace struct {
	ID         string
	Label      string
	OwnerLogin string
}

func NamespaceFromModel

func NamespaceFromModel(ns namespace.Namespace) Namespace

func (Namespace) IsEmpty

func (ns Namespace) IsEmpty() bool

func (Namespace) Match

func (ns Namespace) Match(owner, label string) bool

func (Namespace) String

func (ns Namespace) String() string

type Storable

type Storable struct {
	Namespace          Namespace
	Username           string
	Password           string
	API                string
	Version            string
	AllowSelfSignedTLS bool
}

func (Storable) Merge

func (config Storable) Merge(upd Storable) Storable

Jump to

Keyboard shortcuts

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