cmdflagsfromhost

package
v1.0.0-alpha-105 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// RemotePattern takes only --remote
	RemotePattern Pattern
	// ContainerPattern takes only --container
	ContainerPattern
	// ProjectPattern takes only --project
	ProjectPattern
	// ProjectAndContainerPattern takes only --project and --container
	ProjectAndContainerPattern = ProjectPattern | ContainerPattern
	// ProjectAndRemotePattern takes only --project, and --remote
	ProjectAndRemotePattern = ProjectPattern | RemotePattern
	// FullHostPattern takes --project, --container, and --remote
	FullHostPattern = RemotePattern | ProjectAndContainerPattern
)

Variables

This section is empty.

Functions

func SetLocal

func SetLocal()

SetLocal the context

func SetRemote

func SetRemote(remote string) (err error)

SetRemote sets the remote for the current context

Types

type Pattern

type Pattern int

Pattern for the host and flags

type Requires

type Requires struct {
	NoHost    bool
	Auth      bool
	Remote    bool
	Local     bool
	Project   bool
	Container bool
}

Requires configuration for the host and flags

type SetupHost

type SetupHost struct {
	Pattern                         Pattern
	Requires                        Requires
	UseProjectDirectory             bool
	UseProjectDirectoryForContainer bool
	UseContainerDirectory           bool
	// contains filtered or unexported fields
}

SetupHost is the structure for host and flags parsing

func (*SetupHost) Container

func (s *SetupHost) Container() string

Container of the parsed flags or host

func (*SetupHost) Init

func (s *SetupHost) Init(cmd *cobra.Command)

Init flags on a given command

func (*SetupHost) Process

func (s *SetupHost) Process() (err error)

Process flags

func (*SetupHost) Project

func (s *SetupHost) Project() string

Project of the parsed flags or host

func (*SetupHost) Remote

func (s *SetupHost) Remote() string

Remote of the parsed flags or host

func (*SetupHost) RemoteAddress

func (s *SetupHost) RemoteAddress() string

RemoteAddress of the parsed flags or host

Jump to

Keyboard shortcuts

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