parameteroptions

package
v0.212.0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChmodOptions added in v0.210.0

type ChmodOptions struct {
	// Set permissions using string like "u=rwx,g=r,o="
	PermissionsString string

	// Use sudo to perform changemod with root priviledges.
	UseSudo bool

	// Enable verbose output
	Verbose bool
}

func NewChmodOptions added in v0.210.0

func NewChmodOptions() (c *ChmodOptions)

func (*ChmodOptions) GetPermissionsString added in v0.210.0

func (c *ChmodOptions) GetPermissionsString() (permissionsString string, err error)

func (*ChmodOptions) GetUseSudo added in v0.210.0

func (c *ChmodOptions) GetUseSudo() (useSudo bool)

func (*ChmodOptions) GetVerbose added in v0.210.0

func (c *ChmodOptions) GetVerbose() (verbose bool)

func (*ChmodOptions) MustGetPermissionsString added in v0.210.0

func (c *ChmodOptions) MustGetPermissionsString() (permissionsString string)

func (*ChmodOptions) MustSetPermissionsString added in v0.210.0

func (c *ChmodOptions) MustSetPermissionsString(permissionsString string)

func (*ChmodOptions) SetPermissionsString added in v0.210.0

func (c *ChmodOptions) SetPermissionsString(permissionsString string) (err error)

func (*ChmodOptions) SetUseSudo added in v0.210.0

func (c *ChmodOptions) SetUseSudo(useSudo bool)

func (*ChmodOptions) SetVerbose added in v0.210.0

func (c *ChmodOptions) SetVerbose(verbose bool)

type ChownOptions added in v0.210.0

type ChownOptions struct {
	UserName  string
	GroupName string
	UseSudo   bool
	Verbose   bool
}

func NewChownOptions added in v0.210.0

func NewChownOptions() (c *ChownOptions)

func (*ChownOptions) GetGroupName added in v0.210.0

func (c *ChownOptions) GetGroupName() (GroupName string, err error)

func (*ChownOptions) GetUseSudo added in v0.210.0

func (c *ChownOptions) GetUseSudo() (useSudo bool)

func (*ChownOptions) GetUserAndOptionallyGroupForChownCommand added in v0.210.0

func (c *ChownOptions) GetUserAndOptionallyGroupForChownCommand() (userAndGroup string, err error)

func (*ChownOptions) GetUserName added in v0.210.0

func (c *ChownOptions) GetUserName() (userName string, err error)

func (*ChownOptions) GetVerbose added in v0.210.0

func (c *ChownOptions) GetVerbose() (verbose bool)

func (*ChownOptions) IsGroupNameSet added in v0.210.0

func (c *ChownOptions) IsGroupNameSet() (isSet bool)

func (*ChownOptions) MustGetGroupName added in v0.210.0

func (c *ChownOptions) MustGetGroupName() (GroupName string)

func (*ChownOptions) MustGetUserAndOptionallyGroupForChownCommand added in v0.210.0

func (c *ChownOptions) MustGetUserAndOptionallyGroupForChownCommand() (userAndGroup string)

func (*ChownOptions) MustGetUserName added in v0.210.0

func (c *ChownOptions) MustGetUserName() (userName string)

func (*ChownOptions) MustSetGroupName added in v0.210.0

func (c *ChownOptions) MustSetGroupName(GroupName string)

func (*ChownOptions) MustSetUserName added in v0.210.0

func (c *ChownOptions) MustSetUserName(userName string)

func (*ChownOptions) SetGroupName added in v0.210.0

func (c *ChownOptions) SetGroupName(GroupName string) (err error)

func (*ChownOptions) SetUseSudo added in v0.210.0

func (c *ChownOptions) SetUseSudo(useSudo bool)

func (*ChownOptions) SetUserName added in v0.210.0

func (c *ChownOptions) SetUserName(userName string) (err error)

func (*ChownOptions) SetVerbose added in v0.210.0

func (c *ChownOptions) SetVerbose(verbose bool)

type CreateBranchOptions added in v0.212.0

type CreateBranchOptions struct {
	// Name of the branch to create:
	Name string

	// Enable verbose output:
	Verbose bool
}

TODO: This should become the generic "CreateBranchOptions" to use everywhere. It then should replace GitlabCreateBranchOptions.

func NewCreateBranchOptions added in v0.212.0

func NewCreateBranchOptions() (c *CreateBranchOptions)

func (*CreateBranchOptions) GetName added in v0.212.0

func (c *CreateBranchOptions) GetName() (name string, err error)

func (*CreateBranchOptions) GetVerbose added in v0.212.0

func (c *CreateBranchOptions) GetVerbose() (verbose bool)

func (*CreateBranchOptions) MustGetName added in v0.212.0

func (c *CreateBranchOptions) MustGetName() (name string)

func (*CreateBranchOptions) MustSetName added in v0.212.0

func (c *CreateBranchOptions) MustSetName(name string)

func (*CreateBranchOptions) SetName added in v0.212.0

func (c *CreateBranchOptions) SetName(name string) (err error)

func (*CreateBranchOptions) SetVerbose added in v0.212.0

func (c *CreateBranchOptions) SetVerbose(verbose bool)

type InstallOptions added in v0.211.0

type InstallOptions struct {
	SourcePath            string
	BinaryName            string
	InstallationPath      string
	InstallBashCompletion bool
	UseSudoToInstall      bool
	Verbose               bool
}

func NewInstallOptions added in v0.211.0

func NewInstallOptions() (i *InstallOptions)

func (*InstallOptions) GetBinaryName added in v0.211.0

func (i *InstallOptions) GetBinaryName() (binaryName string, err error)

func (*InstallOptions) GetInstallBashCompletion added in v0.211.0

func (i *InstallOptions) GetInstallBashCompletion() (installBashCompletion bool)

func (*InstallOptions) GetInstallationPath added in v0.211.0

func (i *InstallOptions) GetInstallationPath() (installationPath string, err error)

func (*InstallOptions) GetInstallationPathOrDefaultIfUnset added in v0.211.0

func (i *InstallOptions) GetInstallationPathOrDefaultIfUnset() (installationPath string, err error)

func (*InstallOptions) GetSourcePath added in v0.211.0

func (i *InstallOptions) GetSourcePath() (sourcePath string, err error)

func (*InstallOptions) GetUseSudoToInstall added in v0.211.0

func (i *InstallOptions) GetUseSudoToInstall() (useSudoToInstall bool)

func (*InstallOptions) GetVerbose added in v0.211.0

func (i *InstallOptions) GetVerbose() (verbose bool)

func (*InstallOptions) MustGetBinaryName added in v0.211.0

func (i *InstallOptions) MustGetBinaryName() (binaryName string)

func (*InstallOptions) MustGetInstallationPath added in v0.211.0

func (i *InstallOptions) MustGetInstallationPath() (installationPath string)

func (*InstallOptions) MustGetInstallationPathOrDefaultIfUnset added in v0.211.0

func (i *InstallOptions) MustGetInstallationPathOrDefaultIfUnset() (installationPath string)

func (*InstallOptions) MustGetSourcePath added in v0.211.0

func (i *InstallOptions) MustGetSourcePath() (sourcePath string)

func (*InstallOptions) MustSetBinaryName added in v0.211.0

func (i *InstallOptions) MustSetBinaryName(binaryName string)

func (*InstallOptions) MustSetInstallationPath added in v0.211.0

func (i *InstallOptions) MustSetInstallationPath(installationPath string)

func (*InstallOptions) MustSetSourcePath added in v0.211.0

func (i *InstallOptions) MustSetSourcePath(sourcePath string)

func (*InstallOptions) SetBinaryName added in v0.211.0

func (i *InstallOptions) SetBinaryName(binaryName string) (err error)

func (*InstallOptions) SetInstallBashCompletion added in v0.211.0

func (i *InstallOptions) SetInstallBashCompletion(installBashCompletion bool)

func (*InstallOptions) SetInstallationPath added in v0.211.0

func (i *InstallOptions) SetInstallationPath(installationPath string) (err error)

func (*InstallOptions) SetSourcePath added in v0.211.0

func (i *InstallOptions) SetSourcePath(sourcePath string) (err error)

func (*InstallOptions) SetUseSudoToInstall added in v0.211.0

func (i *InstallOptions) SetUseSudoToInstall(useSudoToInstall bool)

func (*InstallOptions) SetVerbose added in v0.211.0

func (i *InstallOptions) SetVerbose(verbose bool)

type ListDirectoryOptions

type ListDirectoryOptions struct {
	// Enable recursive file and/or directory listing:
	Recursive bool

	// Return paths relative to the directory to list:
	ReturnRelativePaths bool

	// Enable verbose output
	Verbose bool
}

func NewListDirectoryOptions

func NewListDirectoryOptions() (l *ListDirectoryOptions)

func (*ListDirectoryOptions) GetRecursive

func (l *ListDirectoryOptions) GetRecursive() (recursive bool)

func (*ListDirectoryOptions) GetReturnRelativePaths

func (l *ListDirectoryOptions) GetReturnRelativePaths() (returnRelativePaths bool)

func (*ListDirectoryOptions) GetVerbose

func (l *ListDirectoryOptions) GetVerbose() (verbose bool)

func (*ListDirectoryOptions) SetRecursive

func (l *ListDirectoryOptions) SetRecursive(recursive bool)

func (*ListDirectoryOptions) SetReturnRelativePaths

func (l *ListDirectoryOptions) SetReturnRelativePaths(returnRelativePaths bool)

func (*ListDirectoryOptions) SetVerbose

func (l *ListDirectoryOptions) SetVerbose(verbose bool)

type ListFileOptions

type ListFileOptions struct {
	MatchBasenamePattern          []string
	ExcludeBasenamePattern        []string
	ExcludePatternWholepath       []string
	ReturnRelativePaths           bool
	OnlyFiles                     bool
	NonRecursive                  bool
	AllowEmptyListIfNoFileIsFound bool
	Verbose                       bool
}

func NewListFileOptions

func NewListFileOptions() (l *ListFileOptions)

func (*ListFileOptions) GetAllowEmptyListIfNoFileIsFound

func (l *ListFileOptions) GetAllowEmptyListIfNoFileIsFound() (allowEmptyListIfNoFileIsFound bool, err error)

func (*ListFileOptions) GetDeepCopy

func (o *ListFileOptions) GetDeepCopy() (deepCopy *ListFileOptions)

func (*ListFileOptions) GetExcludeBasenamePattern

func (l *ListFileOptions) GetExcludeBasenamePattern() (excludePattern []string, err error)

func (*ListFileOptions) GetExcludeBasenamePatternOrEmptySliceIfUnset

func (l *ListFileOptions) GetExcludeBasenamePatternOrEmptySliceIfUnset() (excludePattern []string)

func (*ListFileOptions) GetExcludePatternWholepath

func (l *ListFileOptions) GetExcludePatternWholepath() (excludePatternWholepath []string, err error)

func (*ListFileOptions) GetMatchBasenamePattern

func (l *ListFileOptions) GetMatchBasenamePattern() (matchPattern []string, err error)

func (*ListFileOptions) GetMatchBasenamePatternOrEmptySliceIfUnset

func (l *ListFileOptions) GetMatchBasenamePatternOrEmptySliceIfUnset() (excludePattern []string)

func (*ListFileOptions) GetNonRecursive

func (l *ListFileOptions) GetNonRecursive() (nonRecursive bool, err error)

func (*ListFileOptions) GetOnlyFiles

func (l *ListFileOptions) GetOnlyFiles() (onlyFiles bool, err error)

func (*ListFileOptions) GetReturnRelativePaths

func (l *ListFileOptions) GetReturnRelativePaths() (returnRelativePaths bool, err error)

func (*ListFileOptions) GetVerbose

func (l *ListFileOptions) GetVerbose() (verbose bool, err error)

func (*ListFileOptions) IsExcludeBasenamePatternSet

func (l *ListFileOptions) IsExcludeBasenamePatternSet() (isSet bool)

func (*ListFileOptions) IsExcludePatternWholepathSet

func (l *ListFileOptions) IsExcludePatternWholepathSet() (isSet bool)

func (*ListFileOptions) IsMatchBasenamePatternSet

func (l *ListFileOptions) IsMatchBasenamePatternSet() (isSet bool)

func (*ListFileOptions) MustGetAllowEmptyListIfNoFileIsFound

func (l *ListFileOptions) MustGetAllowEmptyListIfNoFileIsFound() (allowEmptyListIfNoFileIsFound bool)

func (*ListFileOptions) MustGetExcludeBasenamePattern

func (l *ListFileOptions) MustGetExcludeBasenamePattern() (excludePattern []string)

func (*ListFileOptions) MustGetExcludePatternWholepath

func (l *ListFileOptions) MustGetExcludePatternWholepath() (excludePatternWholepath []string)

func (*ListFileOptions) MustGetMatchBasenamePattern

func (l *ListFileOptions) MustGetMatchBasenamePattern() (matchPattern []string)

func (*ListFileOptions) MustGetNonRecursive

func (l *ListFileOptions) MustGetNonRecursive() (nonRecursive bool)

func (*ListFileOptions) MustGetOnlyFiles

func (l *ListFileOptions) MustGetOnlyFiles() (onlyFiles bool)

func (*ListFileOptions) MustGetReturnRelativePaths

func (l *ListFileOptions) MustGetReturnRelativePaths() (returnRelativePaths bool)

func (*ListFileOptions) MustGetVerbose

func (l *ListFileOptions) MustGetVerbose() (verbose bool)

func (*ListFileOptions) MustSetAllowEmptyListIfNoFileIsFound

func (l *ListFileOptions) MustSetAllowEmptyListIfNoFileIsFound(allowEmptyListIfNoFileIsFound bool)

func (*ListFileOptions) MustSetExcludeBasenamePattern

func (l *ListFileOptions) MustSetExcludeBasenamePattern(excludeBasenamePattern []string)

func (*ListFileOptions) MustSetExcludePattern

func (l *ListFileOptions) MustSetExcludePattern(excludePattern []string)

func (*ListFileOptions) MustSetExcludePatternWholepath

func (l *ListFileOptions) MustSetExcludePatternWholepath(excludePatternWholepath []string)

func (*ListFileOptions) MustSetMatchBasenamePattern

func (l *ListFileOptions) MustSetMatchBasenamePattern(matchBasenamePattern []string)

func (*ListFileOptions) MustSetMatchPattern

func (l *ListFileOptions) MustSetMatchPattern(matchPattern []string)

func (*ListFileOptions) MustSetNonRecursive

func (l *ListFileOptions) MustSetNonRecursive(nonRecursive bool)

func (*ListFileOptions) MustSetOnlyFiles

func (l *ListFileOptions) MustSetOnlyFiles(onlyFiles bool)

func (*ListFileOptions) MustSetReturnRelativePaths

func (l *ListFileOptions) MustSetReturnRelativePaths(returnRelativePaths bool)

func (*ListFileOptions) MustSetVerbose

func (l *ListFileOptions) MustSetVerbose(verbose bool)

func (*ListFileOptions) SetAllowEmptyListIfNoFileIsFound

func (l *ListFileOptions) SetAllowEmptyListIfNoFileIsFound(allowEmptyListIfNoFileIsFound bool) (err error)

func (*ListFileOptions) SetExcludeBasenamePattern

func (l *ListFileOptions) SetExcludeBasenamePattern(excludeBasenamePattern []string) (err error)

func (*ListFileOptions) SetExcludePattern

func (l *ListFileOptions) SetExcludePattern(excludePattern []string) (err error)

func (*ListFileOptions) SetExcludePatternWholepath

func (l *ListFileOptions) SetExcludePatternWholepath(excludePatternWholepath []string) (err error)

func (*ListFileOptions) SetMatchBasenamePattern

func (l *ListFileOptions) SetMatchBasenamePattern(matchBasenamePattern []string) (err error)

func (*ListFileOptions) SetMatchPattern

func (l *ListFileOptions) SetMatchPattern(matchPattern []string) (err error)

func (*ListFileOptions) SetNonRecursive

func (l *ListFileOptions) SetNonRecursive(nonRecursive bool) (err error)

func (*ListFileOptions) SetOnlyFiles

func (l *ListFileOptions) SetOnlyFiles(onlyFiles bool) (err error)

func (*ListFileOptions) SetReturnRelativePaths

func (l *ListFileOptions) SetReturnRelativePaths(returnRelativePaths bool) (err error)

func (*ListFileOptions) SetVerbose

func (l *ListFileOptions) SetVerbose(verbose bool) (err error)

type PathFilterOptions

type PathFilterOptions interface {
	// Filters for matching base name:
	GetMatchBasenamePattern() (matchPattern []string, err error)
	IsMatchBasenamePatternSet() (isSet bool)

	// Filters for excluding base name:
	GetExcludeBasenamePattern() (excludePattern []string, err error)
	IsExcludeBasenamePatternSet() (isSet bool)

	// Filters for exluding wholepaths:
	GetExcludePatternWholepath() (excludePattern []string, err error)
	IsExcludePatternWholepathSet() (isSet bool)
}

Options to filter a list of paths.

type RunCommandOptions added in v0.210.0

type RunCommandOptions struct {
	Command            []string
	TimeoutString      string
	Verbose            bool
	AllowAllExitCodes  bool
	LiveOutputOnStdout bool

	// If set this will be send to stdin of the command:
	StdinString string

	// Run as "root" user (or Administrator on Windows):
	RunAsRoot bool

	RemoveLastLineIfEmpty bool
}

func NewRunCommandOptions added in v0.210.0

func NewRunCommandOptions() (runCommandOptions *RunCommandOptions)

func (*RunCommandOptions) GetAllowAllExitCodes added in v0.210.0

func (r *RunCommandOptions) GetAllowAllExitCodes() (allowAllExitCodes bool, err error)

func (*RunCommandOptions) GetCommand added in v0.210.0

func (o *RunCommandOptions) GetCommand() (command []string, err error)

func (*RunCommandOptions) GetDeepCopy added in v0.210.0

func (o *RunCommandOptions) GetDeepCopy() (deepCopy *RunCommandOptions)

func (*RunCommandOptions) GetJoinedCommand added in v0.210.0

func (o *RunCommandOptions) GetJoinedCommand() (joinedCommand string, err error)

func (*RunCommandOptions) GetLiveOutputOnStdout added in v0.210.0

func (r *RunCommandOptions) GetLiveOutputOnStdout() (liveOutputOnStdout bool, err error)

func (*RunCommandOptions) GetRunAsRoot added in v0.210.0

func (r *RunCommandOptions) GetRunAsRoot() (runAsRoot bool)

func (*RunCommandOptions) GetStdinString added in v0.210.0

func (r *RunCommandOptions) GetStdinString() (stdinString string, err error)

func (*RunCommandOptions) GetTimeoutSecondsAsString added in v0.210.0

func (o *RunCommandOptions) GetTimeoutSecondsAsString() (timeoutSeconds string, err error)

func (*RunCommandOptions) GetTimeoutString added in v0.210.0

func (r *RunCommandOptions) GetTimeoutString() (timeoutString string, err error)

func (*RunCommandOptions) GetVerbose added in v0.210.0

func (r *RunCommandOptions) GetVerbose() (verbose bool, err error)

func (*RunCommandOptions) IsStdinStringSet added in v0.210.0

func (o *RunCommandOptions) IsStdinStringSet() (isSet bool)

func (*RunCommandOptions) IsTimeoutSet added in v0.210.0

func (o *RunCommandOptions) IsTimeoutSet() (isSet bool)

func (*RunCommandOptions) MustGetAllowAllExitCodes added in v0.210.0

func (r *RunCommandOptions) MustGetAllowAllExitCodes() (allowAllExitCodes bool)

func (*RunCommandOptions) MustGetCommand added in v0.210.0

func (r *RunCommandOptions) MustGetCommand() (command []string)

func (*RunCommandOptions) MustGetJoinedCommand added in v0.210.0

func (r *RunCommandOptions) MustGetJoinedCommand() (joinedCommand string)

func (*RunCommandOptions) MustGetLiveOutputOnStdout added in v0.210.0

func (r *RunCommandOptions) MustGetLiveOutputOnStdout() (liveOutputOnStdout bool)

func (*RunCommandOptions) MustGetStdinString added in v0.210.0

func (r *RunCommandOptions) MustGetStdinString() (stdinString string)

func (*RunCommandOptions) MustGetTimeoutSecondsAsString added in v0.210.0

func (r *RunCommandOptions) MustGetTimeoutSecondsAsString() (timeoutSeconds string)

func (*RunCommandOptions) MustGetTimeoutString added in v0.210.0

func (r *RunCommandOptions) MustGetTimeoutString() (timeoutString string)

func (*RunCommandOptions) MustGetVerbose added in v0.210.0

func (r *RunCommandOptions) MustGetVerbose() (verbose bool)

func (*RunCommandOptions) MustSetAllowAllExitCodes added in v0.210.0

func (r *RunCommandOptions) MustSetAllowAllExitCodes(allowAllExitCodes bool)

func (*RunCommandOptions) MustSetCommand added in v0.210.0

func (r *RunCommandOptions) MustSetCommand(command []string)

func (*RunCommandOptions) MustSetLiveOutputOnStdout added in v0.210.0

func (r *RunCommandOptions) MustSetLiveOutputOnStdout(liveOutputOnStdout bool)

func (*RunCommandOptions) MustSetStdinString added in v0.210.0

func (r *RunCommandOptions) MustSetStdinString(stdinString string)

func (*RunCommandOptions) MustSetTimeoutString added in v0.210.0

func (r *RunCommandOptions) MustSetTimeoutString(timeoutString string)

func (*RunCommandOptions) MustSetVerbose added in v0.210.0

func (r *RunCommandOptions) MustSetVerbose(verbose bool)

func (*RunCommandOptions) SetAllowAllExitCodes added in v0.210.0

func (r *RunCommandOptions) SetAllowAllExitCodes(allowAllExitCodes bool) (err error)

func (*RunCommandOptions) SetCommand added in v0.210.0

func (r *RunCommandOptions) SetCommand(command []string) (err error)

func (*RunCommandOptions) SetLiveOutputOnStdout added in v0.210.0

func (r *RunCommandOptions) SetLiveOutputOnStdout(liveOutputOnStdout bool) (err error)

func (*RunCommandOptions) SetRunAsRoot added in v0.210.0

func (r *RunCommandOptions) SetRunAsRoot(runAsRoot bool)

func (*RunCommandOptions) SetStdinString added in v0.210.0

func (r *RunCommandOptions) SetStdinString(stdinString string) (err error)

func (*RunCommandOptions) SetTimeoutString added in v0.210.0

func (r *RunCommandOptions) SetTimeoutString(timeoutString string) (err error)

func (*RunCommandOptions) SetVerbose added in v0.210.0

func (r *RunCommandOptions) SetVerbose(verbose bool) (err error)

Jump to

Keyboard shortcuts

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