cmdflagsfromhost

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// RemotePattern takes only --remote
	RemotePattern Pattern
	// ServicePattern takes only --service
	ServicePattern
	// ProjectPattern takes only --project
	ProjectPattern
	// ProjectAndServicePattern takes only --project and --service
	ProjectAndServicePattern = ProjectPattern | ServicePattern
	// ProjectAndRemotePattern takes only --project, and --remote
	ProjectAndRemotePattern = ProjectPattern | RemotePattern
	// FullHostPattern takes --project, --service, and --remote
	FullHostPattern = RemotePattern | ProjectAndServicePattern
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Pattern

type Pattern int

Pattern for the host and flags

type Requires

type Requires struct {
	NoHost  bool
	Auth    bool
	Project bool
	Service bool
}

Requires configuration for the host and flags

type SetupHost

type SetupHost struct {
	Pattern             Pattern
	Requires            Requires
	UseServiceDirectory bool
	AllowMissingProject bool
	// contains filtered or unexported fields
}

SetupHost is the structure for host and flags parsing

func (*SetupHost) InfrastructureDomain

func (s *SetupHost) InfrastructureDomain() string

InfrastructureDomain 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(wectx config.Context) (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) Service

func (s *SetupHost) Service() string

Service of the parsed flags or host

func (*SetupHost) ServiceDomain

func (s *SetupHost) ServiceDomain() string

ServiceDomain of the parsed flags or host

Jump to

Keyboard shortcuts

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