parameteroptions

package
v0.414.0 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChmodOptions

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

func NewChmodOptions() (c *ChmodOptions)

func (*ChmodOptions) GetPermissionsString

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

func (*ChmodOptions) GetUseSudo

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

func (*ChmodOptions) GetVerbose

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

func (*ChmodOptions) SetPermissionsString

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

func (*ChmodOptions) SetUseSudo

func (c *ChmodOptions) SetUseSudo(useSudo bool)

func (*ChmodOptions) SetVerbose

func (c *ChmodOptions) SetVerbose(verbose bool)

type ChownOptions

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

func NewChownOptions

func NewChownOptions() (c *ChownOptions)

func (*ChownOptions) GetGroupName

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

func (*ChownOptions) GetUseSudo

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

func (*ChownOptions) GetUserAndOptionallyGroupForChownCommand

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

func (*ChownOptions) GetUserName

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

func (*ChownOptions) GetVerbose

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

func (*ChownOptions) IsGroupNameSet

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

func (*ChownOptions) SetGroupName

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

func (*ChownOptions) SetUseSudo

func (c *ChownOptions) SetUseSudo(useSudo bool)

func (*ChownOptions) SetUserName

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

func (*ChownOptions) SetVerbose

func (c *ChownOptions) SetVerbose(verbose bool)

type CreateBranchOptions

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

func NewCreateBranchOptions() (c *CreateBranchOptions)

func (*CreateBranchOptions) GetName

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

func (*CreateBranchOptions) GetVerbose

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

func (*CreateBranchOptions) SetName

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

func (*CreateBranchOptions) SetVerbose

func (c *CreateBranchOptions) SetVerbose(verbose bool)

type CreateRepositoryOptions

type CreateRepositoryOptions struct {
	BareRepository            bool
	Verbose                   bool
	InitializeWithEmptyCommit bool

	// Set the default author for the repository to a default one.
	// Mainly usefull for testing since the author stays everywhere the same.
	InitializeWithDefaultAuthor bool
}

func NewCreateRepositoryOptions

func NewCreateRepositoryOptions() (c *CreateRepositoryOptions)

func (*CreateRepositoryOptions) GetBareRepository

func (c *CreateRepositoryOptions) GetBareRepository() (bareRepository bool)

func (*CreateRepositoryOptions) GetInitializeWithDefaultAuthor

func (c *CreateRepositoryOptions) GetInitializeWithDefaultAuthor() (initializeWithDefaultAuthor bool)

func (*CreateRepositoryOptions) GetInitializeWithEmptyCommit

func (c *CreateRepositoryOptions) GetInitializeWithEmptyCommit() (initializeWithEmptyCommit bool)

func (*CreateRepositoryOptions) GetVerbose

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

func (*CreateRepositoryOptions) SetBareRepository

func (c *CreateRepositoryOptions) SetBareRepository(bareRepository bool)

func (*CreateRepositoryOptions) SetInitializeWithDefaultAuthor

func (c *CreateRepositoryOptions) SetInitializeWithDefaultAuthor(initializeWithDefaultAuthor bool)

func (*CreateRepositoryOptions) SetInitializeWithEmptyCommit

func (c *CreateRepositoryOptions) SetInitializeWithEmptyCommit(initializeWithEmptyCommit bool)

func (*CreateRepositoryOptions) SetVerbose

func (c *CreateRepositoryOptions) SetVerbose(verbose bool)

type GitCommitGetParentsOptions

type GitCommitGetParentsOptions struct {
	IncludeParentsOfParents bool
	Verbose                 bool
}

func NewGitCommitGetParentsOptions

func NewGitCommitGetParentsOptions() (g *GitCommitGetParentsOptions)

func (*GitCommitGetParentsOptions) GetIncludeParentsOfParents

func (g *GitCommitGetParentsOptions) GetIncludeParentsOfParents() (includeParentsOfParents bool)

func (*GitCommitGetParentsOptions) GetVerbose

func (g *GitCommitGetParentsOptions) GetVerbose() (verbose bool)

func (*GitCommitGetParentsOptions) SetIncludeParentsOfParents

func (g *GitCommitGetParentsOptions) SetIncludeParentsOfParents(includeParentsOfParents bool)

func (*GitCommitGetParentsOptions) SetVerbose

func (g *GitCommitGetParentsOptions) SetVerbose(verbose bool)

type GopassSecretOptions

type GopassSecretOptions struct {
	SecretPath string

	Overwrite bool
}

func NewGopassSecretOptions

func NewGopassSecretOptions() (g *GopassSecretOptions)

func (*GopassSecretOptions) GetBaseName

func (g *GopassSecretOptions) GetBaseName() (baseName string, err error)

func (*GopassSecretOptions) GetDeepCopy

func (g *GopassSecretOptions) GetDeepCopy() (copy *GopassSecretOptions)

func (*GopassSecretOptions) GetDirName

func (g *GopassSecretOptions) GetDirName() (dirName string, err error)

func (*GopassSecretOptions) GetOverwrite

func (g *GopassSecretOptions) GetOverwrite() (overwrite bool)

func (*GopassSecretOptions) GetSecretPath

func (g *GopassSecretOptions) GetSecretPath() (secretPath string, err error)

func (*GopassSecretOptions) SetBaseName

func (g *GopassSecretOptions) SetBaseName(newBaseName string) (err error)

func (*GopassSecretOptions) SetOverwrite

func (g *GopassSecretOptions) SetOverwrite(overwrite bool)

func (*GopassSecretOptions) SetSecretPath

func (g *GopassSecretOptions) SetSecretPath(secretPath string) (err error)

type InstallOptions

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

func NewInstallOptions

func NewInstallOptions() (i *InstallOptions)

func (*InstallOptions) GetBinaryName

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

func (*InstallOptions) GetInstallBashCompletion

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

func (*InstallOptions) GetInstallationPath

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

func (*InstallOptions) GetInstallationPathOrDefaultIfUnset

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

func (*InstallOptions) GetSourcePath

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

func (*InstallOptions) GetUseSudoToInstall

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

func (*InstallOptions) GetVerbose

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

func (*InstallOptions) SetBinaryName

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

func (*InstallOptions) SetInstallBashCompletion

func (i *InstallOptions) SetInstallBashCompletion(installBashCompletion bool)

func (*InstallOptions) SetInstallationPath

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

func (*InstallOptions) SetSourcePath

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

func (*InstallOptions) SetUseSudoToInstall

func (i *InstallOptions) SetUseSudoToInstall(useSudoToInstall bool)

func (*InstallOptions) SetVerbose

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
}

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) 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) 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)

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

type RunCommandOptions struct {
	Command           []string
	TimeoutString     string
	AllowAllExitCodes 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

func NewRunCommandOptions() (runCommandOptions *RunCommandOptions)

func (*RunCommandOptions) GetAllowAllExitCodes

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

func (*RunCommandOptions) GetCommand

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

func (*RunCommandOptions) GetDeepCopy

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

func (*RunCommandOptions) GetJoinedCommand

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

func (*RunCommandOptions) GetRemoveLastLineIfEmpty

func (r *RunCommandOptions) GetRemoveLastLineIfEmpty() (removeLastLineIfEmpty bool)

func (*RunCommandOptions) GetRunAsRoot

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

func (*RunCommandOptions) GetStdinString

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

func (*RunCommandOptions) GetTimeoutSecondsAsString

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

func (*RunCommandOptions) GetTimeoutString

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

func (*RunCommandOptions) IsStdinStringSet

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

func (*RunCommandOptions) IsTimeoutSet

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

func (*RunCommandOptions) SetAllowAllExitCodes

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

func (*RunCommandOptions) SetCommand

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

func (*RunCommandOptions) SetRemoveLastLineIfEmpty

func (r *RunCommandOptions) SetRemoveLastLineIfEmpty(removeLastLineIfEmpty bool)

func (*RunCommandOptions) SetRunAsRoot

func (r *RunCommandOptions) SetRunAsRoot(runAsRoot bool)

func (*RunCommandOptions) SetStdinString

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

func (*RunCommandOptions) SetTimeoutString

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

type UpdateDependenciesOptions

type UpdateDependenciesOptions struct {
	ArtifactHandlers      []artifacthandler.ArtifactHandler
	Commit                bool
	Verbose               bool
	AuthenticationOptions []authenticationoptions.AuthenticationOption
}

func NewUpdateDependenciesOptions

func NewUpdateDependenciesOptions() (u *UpdateDependenciesOptions)

func (*UpdateDependenciesOptions) GetArtifactHandlerForSoftwareName

func (u *UpdateDependenciesOptions) GetArtifactHandlerForSoftwareName(softwareName string) (artifactHandler artifacthandler.ArtifactHandler, err error)

func (*UpdateDependenciesOptions) GetArtifactHandlers

func (u *UpdateDependenciesOptions) GetArtifactHandlers() (artifactHandlers []artifacthandler.ArtifactHandler, err error)

func (*UpdateDependenciesOptions) GetAuthenticationOptions

func (u *UpdateDependenciesOptions) GetAuthenticationOptions() (authenticationOptions []authenticationoptions.AuthenticationOption, err error)

func (*UpdateDependenciesOptions) GetCommit

func (u *UpdateDependenciesOptions) GetCommit() (commit bool, err error)

func (*UpdateDependenciesOptions) GetLatestArtifactVersionAsString

func (u *UpdateDependenciesOptions) GetLatestArtifactVersionAsString(softwareName string, verbose bool) (latestVersion string, err error)

func (*UpdateDependenciesOptions) GetVerbose

func (u *UpdateDependenciesOptions) GetVerbose() (verbose bool, err error)

func (*UpdateDependenciesOptions) SetArtifactHandlers

func (u *UpdateDependenciesOptions) SetArtifactHandlers(artifactHandlers []artifacthandler.ArtifactHandler) (err error)

func (*UpdateDependenciesOptions) SetAuthenticationOptions

func (u *UpdateDependenciesOptions) SetAuthenticationOptions(authenticationOptions []authenticationoptions.AuthenticationOption) (err error)

func (*UpdateDependenciesOptions) SetCommit

func (u *UpdateDependenciesOptions) SetCommit(commit bool) (err error)

func (*UpdateDependenciesOptions) SetVerbose

func (u *UpdateDependenciesOptions) SetVerbose(verbose bool) (err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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