flagsfromhost

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectRemotes

func InjectRemotes(list *remotes.List)

InjectRemotes list into the flagsfromhost module

func ParseRemoteAddress

func ParseRemoteAddress(remoteAddress string) (remote string, err error)

ParseRemoteAddress to get related remote

Types

type ErrorFoundMultipleRemote

type ErrorFoundMultipleRemote struct {
	Host    string
	Remotes []string
}

ErrorFoundMultipleRemote happens when multiple resolutions are found for a given host address

func (ErrorFoundMultipleRemote) Error

func (e ErrorFoundMultipleRemote) Error() string

type ErrorFoundNoRemote

type ErrorFoundNoRemote struct {
	Host string
}

ErrorFoundNoRemote happens when a remote isn't found for a given host address

func (ErrorFoundNoRemote) Error

func (e ErrorFoundNoRemote) Error() string

type ErrorLoadingRemoteList

type ErrorLoadingRemoteList struct{}

ErrorLoadingRemoteList happens when the remote list is needed, but not injected into the module

func (ErrorLoadingRemoteList) Error

type ErrorMultiMode

type ErrorMultiMode struct{}

ErrorMultiMode happens when --project and --service are used with host URL flag

func (ErrorMultiMode) Error

func (ErrorMultiMode) Error() string

type ErrorNotFound

type ErrorNotFound struct {
	Remote string
}

ErrorNotFound happens when a remote isn't found

func (ErrorNotFound) Error

func (e ErrorNotFound) Error() string

type ErrorRemoteFlagAndHost

type ErrorRemoteFlagAndHost struct{}

ErrorRemoteFlagAndHost happens when both --remote and host remote are used together

func (ErrorRemoteFlagAndHost) Error

type ErrorServiceWithNoProject

type ErrorServiceWithNoProject struct{}

ErrorServiceWithNoProject hapens when --service is used without --project

func (ErrorServiceWithNoProject) Error

type FlagsFromHost

type FlagsFromHost struct {
	// contains filtered or unexported fields
}

FlagsFromHost holds the project, service, and remote parsed

func Parse

func Parse(pf ParseFlags) (*FlagsFromHost, error)

Parse host and flags

func ParseWithDefaultCustomRemote

func ParseWithDefaultCustomRemote(pf ParseFlagsWithDefaultCustomRemote, customRemote string) (*FlagsFromHost, error)

ParseWithDefaultCustomRemote parses the flags using a custom default remote value

func (*FlagsFromHost) IsRemoteFromHost

func (f *FlagsFromHost) IsRemoteFromHost() bool

IsRemoteFromHost tells if the Remote was parsed from a host or not

func (*FlagsFromHost) Project

func (f *FlagsFromHost) Project() string

Project of the parsed flags or host

func (*FlagsFromHost) Remote

func (f *FlagsFromHost) Remote() string

Remote of the parsed flags or host

func (*FlagsFromHost) Service

func (f *FlagsFromHost) Service() string

Service of the parsed flags or host

type ParseFlags

type ParseFlags struct {
	Project string
	Service string
	Remote  string
	Host    string
}

ParseFlags for the flags received by the CLI

type ParseFlagsWithDefaultCustomRemote

type ParseFlagsWithDefaultCustomRemote struct {
	Project       string
	Service       string
	Remote        string
	Host          string
	RemoteChanged bool
}

ParseFlagsWithDefaultCustomRemote is similar to ParseFlags, but with 'default custom remote' support

Jump to

Keyboard shortcuts

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