Versions in this module Expand all Collapse all v0 v0.7.8 Nov 19, 2021 Changes in this version type SSHInfo + func (v SSHInfo) Validate() error v0.7.7 Dec 15, 2020 Changes in this version + func ReplaceMacros(s string, macros map[string]string) string type SSHInfo + PushURL string + ReviewRefPattern string + func (v SSHInfo) GetReviewRef(id, patch string) (string, error) v0.7.6 Oct 13, 2020 Changes in this version + func GetProxyFromGitConfig() (*url.URL, error) v0.7.5 Sep 8, 2020 Changes in this version + const ProtoTypeAGit + const ProtoTypeGerrit + const SSHVariantAuto + const SSHVariantPlink + const SSHVariantPutty + const SSHVariantSSH + const SSHVariantSimple + const SSHVariantTortoisePlink + var EmailPattern = regexp.MustCompile(`^<?([^@\s]+)@(\S+)>?$`) + var NormalArgsPattern = regexp.MustCompile(`^[0-9a-zA-Z:/%,.@+=_-]+$`) + var UserEmailPattern = regexp.MustCompile(`^(.*?)\s*<([^@\s]+)@(\S*)>$`) + func GetGitPushCommandPipe(proto ProtoHelper) ([]byte, error) + func GetLoginFromEmail(email string) string + type AGitProtoHelper struct + func NewAGitProtoHelper(sshInfo *SSHInfo) *AGitProtoHelper + func (v AGitProtoHelper) GetDownloadRef(cr, patch string) (string, error) + func (v AGitProtoHelper) GetGitPushCommand(o *common.UploadOptions) (*GitPushCommand, error) + func (v AGitProtoHelper) GetSSHInfo() *SSHInfo + func (v AGitProtoHelper) GetType() string + type DefaultProtoHelper struct + func NewDefaultProtoHelper(sshInfo *SSHInfo) *DefaultProtoHelper + func (v DefaultProtoHelper) GetDownloadRef(cr, patch string) (string, error) + func (v DefaultProtoHelper) GetGitPushCommand(o *common.UploadOptions) (*GitPushCommand, error) + func (v DefaultProtoHelper) GetSSHInfo() *SSHInfo + func (v DefaultProtoHelper) GetType() string + type ExternalProtoHelper struct + func NewExternalProtoHelper(sshInfo *SSHInfo) *ExternalProtoHelper + func (v *ExternalProtoHelper) Program() string + func (v ExternalProtoHelper) GetDownloadRef(cr, patch string) (string, error) + func (v ExternalProtoHelper) GetGitPushCommand(o *common.UploadOptions) (*GitPushCommand, error) + func (v ExternalProtoHelper) GetSSHInfo() *SSHInfo + func (v ExternalProtoHelper) GetType() string + type GerritProtoHelper struct + func NewGerritProtoHelper(sshInfo *SSHInfo) *GerritProtoHelper + func (v GerritProtoHelper) GetDownloadRef(cr, patch string) (string, error) + func (v GerritProtoHelper) GetGitPushCommand(o *common.UploadOptions) (*GitPushCommand, error) + func (v GerritProtoHelper) GetSSHInfo() *SSHInfo + func (v GerritProtoHelper) GetType() string + type GitPushCommand struct + Args []string + Cmd string + Env []string + GitConfig []string + type ProtoHelper interface + GetDownloadRef func(string, string) (string, error) + GetGitPushCommand func(*common.UploadOptions) (*GitPushCommand, error) + GetSSHInfo func() *SSHInfo + GetType func() string + func NewProtoHelper(sshInfo *SSHInfo) ProtoHelper + type SSHCmd struct + func NewSSHCmd() *SSHCmd + func (v *SSHCmd) Args() []string + func (v *SSHCmd) Command(host string, port int, envs []string) ([]string, []string) + func (v *SSHCmd) SSH() string + func (v *SSHCmd) Variant() int + type SSHInfo struct + Expire int64 + Host string + Port int + ProtoType string + ProtoVersion int + User string + func (v SSHInfo) ToJSON() string + type SSHInfoQuery struct + CacheFile string + Changed bool + func NewSSHInfoQuery(cacheFile string) *SSHInfoQuery + func (v SSHInfoQuery) GetSSHInfo(address string, useCache bool) (*SSHInfo, error) + type ShellCmd struct + Args []string + Cmd string + func NewShellCmd(cmd string, withArgs bool) *ShellCmd + func NewShellCmdFromArgs(args ...string) *ShellCmd + func (v ShellCmd) QuoteCommand() string