Documentation
¶
Index ¶
- Constants
- func BranchFlags() []cli.Flag
- func CredentialFlags() []cli.Flag
- func FilesFlags() []cli.Flag
- func FormFlags() []cli.Flag
- func FormReleaseDownload() []cli.Flag
- func FormReleaseUploadFiles() []cli.Flag
- func FormTargetReleaseSync() []cli.Flag
- func FormTargetRepo() []cli.Flag
- func FormTargetRepoPush() []cli.Flag
- func GetBranches(cmd *cli.Command) []string
- func GetFiles(cmd *cli.Command) []string
- func GetFirstTags(cmd *cli.Command) (string, error)
- func GetFormCredential(cmd *cli.Command, readEnv bool) (*url.URL, *credential.Credential, error)
- func GetTags(cmd *cli.Command) []string
- func GetTargetCredential(cmd *cli.Command) (*url.URL, *credential.Credential, error)
- func GetWorkspace(cmd *cli.Command) string
- func GlobalFlags() []cli.Flag
- func TagsFlags() []cli.Flag
- func TargetFlags() []cli.Flag
- func UseEnv(cmd *cli.Command) bool
- func UseEnvFlags() []cli.Flag
Constants ¶
const ( FlagsFormRepo = "repo" FlagsTargetRepo = "target-repo" FlagsUseEnv = "use-env" FlagsBranches = "branches" FlagsTags = "tags" FlagsFiles = "files" )
const ( FlagsWorkspace = "workspace" FlagsPlatforms = "platform" FlagsEnvFile = "env" FlagsFormUsername = "username" FlagsFormPassword = "password" FlagsFormToken = "token" FlagsTargetUsername = "target-username" FlagsTargetPassword = "target-password" FlagsTargetToken = "target-token" )
const ( EnvFormUserName = "USERNAME" EnvFormPassword = "PASSWORD" EnvFormToken = "TOKEN" EnvTargetUserName = "TARGET_USERNAME" EnvTargetPassword = "TARGET_PASSWORD" EnvTargetToken = "TARGET_TOKEN" )
Variables ¶
This section is empty.
Functions ¶
func CredentialFlags ¶
func FormReleaseDownload ¶
func FormReleaseUploadFiles ¶
func FormTargetReleaseSync ¶
func FormTargetRepo ¶
FormTargetRepo combines flags needed for repository operations.
func FormTargetRepoPush ¶
func GetBranches ¶
GetBranches returns a slice of branch names specified in the command flags. Branch names are split by comma.
func GetFiles ¶
GetFiles returns a slice of file paths specified in the command flags. Supports comma-separated input and file pattern matching.
func GetFirstTags ¶
GetFirstTags returns the first tag from the command flags. Returns an error if no tags are provided.
func GetFormCredential ¶
func GetFormCredential(cmd *cli.Command, readEnv bool) (*url.URL, *credential.Credential, error)
GetFormCredential retrieves the repository URL and credential from the command. If readEnv is true, it will also try to read credentials from environment variables. Returns:
- *url.URL: parsed repository URL
- *credential.Credential: credential object
- error: any parsing or credential error
func GetTags ¶
GetTags returns a slice of tag names specified in the command flags. Tag names are split by comma.
func GetTargetCredential ¶
func GetTargetCredential(cmd *cli.Command) (*url.URL, *credential.Credential, error)
GetTargetCredential retrieves the target repository URL and credential from the command. Always reads credentials from environment variables. Returns:
- *url.URL: parsed target repository URL
- *credential.Credential: credential object
- error: any parsing or credential error
func GetWorkspace ¶
GetWorkspace retrieves the workspace path from the command flags.
func GlobalFlags ¶
GlobalFlags returns global flags applicable to all commands.
func TargetFlags ¶
func UseEnvFlags ¶
Types ¶
This section is empty.