flagsfromhost

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandFlagFromHost added in v1.1.5

type CommandFlagFromHost struct {
	RemotesList *remotes.List
}

CommandFlagFromHost extractor

func New added in v1.1.5

func New(remotesList *remotes.List) CommandFlagFromHost

New CommandFlagFromHost

func (CommandFlagFromHost) Parse added in v1.1.5

Parse host and flags

func (CommandFlagFromHost) ParseRemoteAddress added in v1.1.5

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

ParseRemoteAddress to get related remote

func (CommandFlagFromHost) ParseWithDefaultCustomRemote added in v1.1.5

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

ParseWithDefaultCustomRemote parses the flags using a custom default remote value

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 found

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 (*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