pathinsfmt

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllDiffPaths

type AllDiffPaths struct {
	Paths            []string `json:"Locations"`
	IsNormalizeApply bool     `json:"IsNormalizeApply"`
	// contains filtered or unexported fields
}

func (*AllDiffPaths) FlatPaths added in v0.1.2

func (allDiffPaths *AllDiffPaths) FlatPaths() []string

func (*AllDiffPaths) HasAnyItem added in v0.1.2

func (allDiffPaths *AllDiffPaths) HasAnyItem() bool

func (*AllDiffPaths) IsEmpty added in v0.1.2

func (allDiffPaths *AllDiffPaths) IsEmpty() bool

func (*AllDiffPaths) LazyFlatPaths added in v0.1.2

func (allDiffPaths *AllDiffPaths) LazyFlatPaths() []string

func (*AllDiffPaths) Length added in v0.1.2

func (allDiffPaths *AllDiffPaths) Length() int

type Attributes

type Attributes struct {
	IsRecursive    bool           `json:"IsRecursive"`
	IsCache        bool           `json:"IsCache"`
	IsRedis        bool           `json:"IsRedis"`
	IsWriteToFiles bool           `json:"IsWriteToFiles"`
	CacheFilePath  string         `json:"CacheFilePath"`
	CachesRefresh  *CachesRefresh `json:"CachesRefresh,omitempty"`
}

type BaseCopyPath added in v0.3.1

type BaseCopyPath struct {
	CopyPath *CopyPath `json:"CopyPath,omitempty"`
}

type BaseCopyPaths added in v0.2.7

type BaseCopyPaths struct {
	CopyPaths *CopyPaths `json:"CopyPaths,omitempty"`
}

type BaseDownload added in v0.3.2

type BaseDownload struct {
	Download *Download `json:"Download,omitempty"`
}

type BaseDownloads added in v0.3.2

type BaseDownloads struct {
	Downloads *Downloads `json:"Downloads,omitempty"`
}

type BaseEnvPaths

type BaseEnvPaths struct {
	EnvPaths []string `json:"EnvPaths,omitempty"`
}

func (*BaseEnvPaths) EnvPathsLength added in v0.1.3

func (receiver *BaseEnvPaths) EnvPathsLength() int

func (*BaseEnvPaths) HasAnyItemEnvPaths added in v0.1.3

func (receiver *BaseEnvPaths) HasAnyItemEnvPaths() bool

func (*BaseEnvPaths) IsEmptyEnvPaths added in v0.1.3

func (receiver *BaseEnvPaths) IsEmptyEnvPaths() bool

type BaseEnvironmentVariables

type BaseEnvironmentVariables struct {
	EnvVars []EnvironmentVariable `json:"EnvVars,omitempty"`
}

func (*BaseEnvironmentVariables) EnvVarsLength added in v0.1.3

func (receiver *BaseEnvironmentVariables) EnvVarsLength() int

func (*BaseEnvironmentVariables) HasAnyItemEnvVars added in v0.1.3

func (receiver *BaseEnvironmentVariables) HasAnyItemEnvVars() bool

func (*BaseEnvironmentVariables) IsEmptyEnvVars added in v0.1.3

func (receiver *BaseEnvironmentVariables) IsEmptyEnvVars() bool

type BaseExecutableProcessors added in v0.1.2

type BaseExecutableProcessors struct {
	ExecutableProcessors []ExecutableProcessor `json:"ExecutableProcessors,omitempty"`
	// contains filtered or unexported fields
}

func (*BaseExecutableProcessors) CreateCmdOnceCollection added in v0.1.2

func (b *BaseExecutableProcessors) CreateCmdOnceCollection() *errcmd.CmdOnceCollection

func (*BaseExecutableProcessors) ExecuteAllOutputs added in v0.1.2

func (b *BaseExecutableProcessors) ExecuteAllOutputs() *ProcessorExecOutputs

func (*BaseExecutableProcessors) HasProcessors added in v0.1.2

func (b *BaseExecutableProcessors) HasProcessors() bool

func (*BaseExecutableProcessors) IsEmptyProcessor added in v0.1.2

func (b *BaseExecutableProcessors) IsEmptyProcessor() bool

func (*BaseExecutableProcessors) LazyCmdOnceCollection added in v0.1.2

func (b *BaseExecutableProcessors) LazyCmdOnceCollection() *errcmd.CmdOnceCollection

func (*BaseExecutableProcessors) ProcessorsLength added in v0.1.2

func (b *BaseExecutableProcessors) ProcessorsLength() int

type BaseGenericPathsCollection

type BaseGenericPathsCollection struct {
	GenericPathsCollection *GenericPathsCollection `json:"GenericPathsCollection,omitempty"`
}

func (*BaseGenericPathsCollection) GenericPathsCollectionLength added in v0.1.2

func (b *BaseGenericPathsCollection) GenericPathsCollectionLength() int

func (*BaseGenericPathsCollection) HasAnyGenericPathsCollection added in v0.1.2

func (b *BaseGenericPathsCollection) HasAnyGenericPathsCollection() bool

func (*BaseGenericPathsCollection) IsEmptyGenericPathsCollection added in v0.1.2

func (b *BaseGenericPathsCollection) IsEmptyGenericPathsCollection() bool

type BaseGroupName

type BaseGroupName struct {
	GroupName string `json:"GroupName,omitempty"` // Not define or empty string or * means keeping the existing one
}

func (*BaseGroupName) Clone added in v0.1.4

func (it *BaseGroupName) Clone() *BaseGroupName

func (*BaseGroupName) HasGroupName added in v0.1.4

func (it *BaseGroupName) HasGroupName() bool

func (*BaseGroupName) IsGroupName added in v0.1.4

func (it *BaseGroupName) IsGroupName(checkingGroupName string) bool

func (*BaseGroupName) IsGroupNameEmpty added in v0.1.4

func (it *BaseGroupName) IsGroupNameEmpty() bool

type BaseIsRecursive

type BaseIsRecursive struct {
	IsRecursive bool `json:"IsRecursive"`
}

type BaseIsRename

type BaseIsRename struct {
	IsRename bool `json:"IsRename"`
}

type BaseLocationCollection added in v0.1.2

type BaseLocationCollection struct {
	LocationCollection *LocationCollection `json:"LocationCollection,omitempty"`
}

func (BaseLocationCollection) HasLocations added in v0.1.2

func (b BaseLocationCollection) HasLocations() bool

func (BaseLocationCollection) IsEmptyLocations added in v0.1.2

func (b BaseLocationCollection) IsEmptyLocations() bool

func (BaseLocationCollection) LocationsLength added in v0.1.2

func (b BaseLocationCollection) LocationsLength() int

type BasePathModifiersApply added in v0.1.2

type BasePathModifiersApply struct {
	PathModifiersApply *PathModifiersApply `json:"PathModifiersApply,omitempty"`
}

type BasePathPermission added in v0.2.9

type BasePathPermission struct {
	RwxInstruction *chmodins.RwxInstruction `json:"RwxInstruction,omitempty"`
	Chown          *Chown                   `json:"Chown,omitempty"`
}

func (*BasePathPermission) HasChown added in v0.2.9

func (it *BasePathPermission) HasChown() bool

func (*BasePathPermission) HasRwx added in v0.2.9

func (it *BasePathPermission) HasRwx() bool

func (*BasePathPermission) IsEmptyChown added in v0.2.9

func (it *BasePathPermission) IsEmptyChown() bool

func (*BasePathPermission) IsEmptyRwx added in v0.2.9

func (it *BasePathPermission) IsEmptyRwx() bool

type BasePathVerifiers

type BasePathVerifiers struct {
	PathVerifiers *PathVerifiers
}

type BasePathsCreator added in v0.1.5

type BasePathsCreator struct {
	RootDir     string `json:"RootDir,omitempty"`
	Files       []string
	IsNormalize bool
	// contains filtered or unexported fields
}

func (*BasePathsCreator) ApplyLinuxRecursiveFileModeOnRoot added in v0.1.5

func (it *BasePathsCreator) ApplyLinuxRecursiveFileModeOnRoot(
	fileMode os.FileMode,
) *errorwrapper.Wrapper

func (*BasePathsCreator) CreateLazyFlatFiles added in v0.1.5

func (it *BasePathsCreator) CreateLazyFlatFiles(isLock bool, mode os.FileMode) (
	[]*os.File,
	*errorwrapper.Wrapper,
)

func (*BasePathsCreator) CreateLazyPathsWithoutMode added in v0.1.5

func (it *BasePathsCreator) CreateLazyPathsWithoutMode(isLock bool) (
	[]*os.File,
	*errorwrapper.Wrapper,
)

func (*BasePathsCreator) CreatePaths added in v0.1.5

func (it *BasePathsCreator) CreatePaths(isLock bool, mode os.FileMode) (
	[]*os.File,
	*errorwrapper.Wrapper,
)

func (*BasePathsCreator) CreatePathsWithoutMode added in v0.1.5

func (it *BasePathsCreator) CreatePathsWithoutMode(isLock bool) (
	[]*os.File,
	*errorwrapper.Wrapper,
)

func (*BasePathsCreator) DeleteAllPaths added in v0.1.5

func (it *BasePathsCreator) DeleteAllPaths() *errorwrapper.Wrapper

DeleteAllPaths delete all files in root path

func (*BasePathsCreator) DeleteAllThenCreateFlatFiles added in v0.1.5

func (it *BasePathsCreator) DeleteAllThenCreateFlatFiles(
	isLock bool,
	mode os.FileMode,
) (
	[]*os.File,
	*errorwrapper.Wrapper,
)

func (*BasePathsCreator) DeleteAllThenCreateLazyFlatFiles added in v0.1.5

func (it *BasePathsCreator) DeleteAllThenCreateLazyFlatFiles(
	isLock bool,
	mode os.FileMode,
) (
	[]*os.File,
	*errorwrapper.Wrapper,
)

func (*BasePathsCreator) FlatPaths added in v0.1.5

func (it *BasePathsCreator) FlatPaths() []string

func (*BasePathsCreator) FlatPathsPtr added in v0.1.5

func (it *BasePathsCreator) FlatPathsPtr() *[]string

func (*BasePathsCreator) GetFilesInfoMap added in v0.1.5

func (it *BasePathsCreator) GetFilesInfoMap(
	isSkipOnInvalid bool,
) *chmodhelper.FilteredPathFileInfoMap

func (*BasePathsCreator) HasAnyItem added in v0.1.5

func (it *BasePathsCreator) HasAnyItem() bool

func (*BasePathsCreator) IsEmpty added in v0.1.5

func (it *BasePathsCreator) IsEmpty() bool

func (*BasePathsCreator) LazyFlatPaths added in v0.1.5

func (it *BasePathsCreator) LazyFlatPaths() []string

func (*BasePathsCreator) LazyFlatPathsIf added in v0.1.5

func (it *BasePathsCreator) LazyFlatPathsIf(isLazy bool) []string

func (*BasePathsCreator) LazyPathsChmod added in v0.1.5

func (it *BasePathsCreator) LazyPathsChmod() *errstr.Hashmap

func (*BasePathsCreator) Length added in v0.1.5

func (it *BasePathsCreator) Length() int

func (*BasePathsCreator) LengthPlusRoot added in v0.1.5

func (it *BasePathsCreator) LengthPlusRoot() int

func (*BasePathsCreator) PathsChmodMap added in v0.1.5

func (it *BasePathsCreator) PathsChmodMap() *errstr.Hashmap

func (*BasePathsCreator) Setup added in v0.2.8

func (it *BasePathsCreator) Setup(
	isLock bool,
	isRemoveBefore bool,
	mode os.FileMode,
) *errorwrapper.Wrapper

func (*BasePathsCreator) SetupDefault added in v0.2.8

func (it *BasePathsCreator) SetupDefault() *errorwrapper.Wrapper

func (*BasePathsCreator) SimilarPaths added in v0.1.5

func (it *BasePathsCreator) SimilarPaths() *SimilarPaths

type BaseSourceDestination

type BaseSourceDestination struct {
	Source      string `json:"Source"`
	Destination string `json:"Destination"`
}

func (*BaseSourceDestination) Clone added in v0.2.7

type BaseSymbolicLinks struct {
	SymbolicLinksApply *SymbolicLinks `json:"SymbolicLinksApply,omitempty"`
}

type BaseUserNameGroupName added in v0.1.5

type BaseUserNameGroupName struct {
	UserGroupName
}

type CachesRefresh

type CachesRefresh struct {
	Duration Duration `json:"Duration"`
}

type ChangeGroup

type ChangeGroup struct {
	BaseIsRecursive
	BaseGroupName
}

type ChmodCommands added in v0.1.2

type ChmodCommands struct {
	Condition *chmodins.Condition `json:"Condition,omitempty"`
	Commands  []string            `json:"Commands,omitempty"`
}

func (*ChmodCommands) CreateCmdOnceCollection added in v0.1.2

func (c *ChmodCommands) CreateCmdOnceCollection() *errcmd.CmdOnceCollection

func (*ChmodCommands) HasAnyItem added in v0.1.2

func (c *ChmodCommands) HasAnyItem() bool

func (*ChmodCommands) HasConditions added in v0.1.2

func (c *ChmodCommands) HasConditions() bool

func (*ChmodCommands) IsEmpty added in v0.1.2

func (c *ChmodCommands) IsEmpty() bool

func (*ChmodCommands) Length added in v0.1.2

func (c *ChmodCommands) Length() int

type Chown

type Chown struct {
	BaseIsRecursive
	UserGroupName
}

type CliConfig

type CliConfig struct {
	CliRunner *CliRunner `json:"CliRunner,omitempty"`
}

type CliRunner

type CliRunner struct {
	FilesSelector []FilesSelector       `json:"FilesSelector,omitempty"`
	Processors    []ExecutableProcessor `json:"ExecutableProcessor,omitempty"`
}

type CopyPath added in v0.2.6

type CopyPath struct {
	SourceDestinationPlusCompiled
	Options *CopyPathOptions `json:"Options,omitempty"`
	// contains filtered or unexported fields
}

func (*CopyPath) Copier added in v0.3.1

func (it *CopyPath) Copier() *copyrecursive.Copier

func (*CopyPath) HasApplyPathModifier added in v0.3.1

func (it *CopyPath) HasApplyPathModifier() bool

func (*CopyPath) HasOptions added in v0.2.7

func (it *CopyPath) HasOptions() bool

func (*CopyPath) LazyCopier added in v0.3.1

func (it *CopyPath) LazyCopier() *copyrecursive.Copier

type CopyPathOptions added in v0.2.7

type CopyPathOptions struct {
	IsSkipOnExist      bool          `json:"IsSkipOnExist,omitempty"` // removes all before the action
	IsRecursive        bool          `json:"IsRecursive,omitempty"`
	IsCopyRwx          bool          `json:"IsCopyRwx,omitempty"`
	IsMove             bool          `json:"IsMove,omitempty"`
	IsClearDestination bool          `json:"IsClearDestination,omitempty"`
	IsUseShellOrCmd    bool          `json:"IsUseShellOrCmd,omitempty"`
	ApplyPathModifier  *PathModifier `json:"ApplyPathModifier,omitempty"`
}

func (*CopyPathOptions) CopyRecursiveOptions added in v0.3.1

func (it *CopyPathOptions) CopyRecursiveOptions() *copyrecursive.Options

type CopyPaths added in v0.2.7

type CopyPaths struct {
	IsContinueOnError bool
	CopyPaths         []CopyPath `json:"CopyPaths,omitempty"`
}

func (*CopyPaths) IsEmpty added in v0.3.1

func (it *CopyPaths) IsEmpty() bool

func (*CopyPaths) Length added in v0.3.1

func (it *CopyPaths) Length() int

type Download added in v0.3.2

type Download struct {
	URL              string      `json:"URL,omitempty"`
	Destination      string      `json:"Destination,omitempty"`
	FileName         string      `json:"FileName,omitempty"`
	ParallelRequests byte        `json:"ParallelRequests,omitempty"`
	MaxRetries       byte        `json:"MaxRetries,omitempty"`
	IsCreateDir      bool        `json:"IsCreateDir,omitempty"`
	IsClearDir       bool        `json:"IsClearDir,omitempty"`
	IsNormalizePath  bool        `json:"IsNormalizePath,omitempty"`
	IsSkipOnExist    bool        `json:"IsSkipOnExist,omitempty"`
	FileModeDir      os.FileMode `json:"FileModeDir,omitempty"`
	// contains filtered or unexported fields
}

Download Use aria2c Reference : https://aria2.github.io/manual/en/html/aria2c.html#options

func NewDownload added in v0.3.3

func NewDownload(url, destination string) *Download

NewDownload Example :

NewDownload("http://url.com/file.ext","path/to/file/file.ext")

func (*Download) CreateDirInstruction added in v0.3.3

func (it *Download) CreateDirInstruction() *createdir.Instruction

func (*Download) FullPath added in v0.3.3

func (it *Download) FullPath() string

func (*Download) PathStat added in v0.3.3

func (it *Download) PathStat() *chmodhelper.PathExistStat

type Downloads added in v0.3.2

type Downloads struct {
	IsAsyncAll        bool       // Allows parallel downloads
	IsContinueOnError bool       // Cannot exit on IsAsyncAll true
	Downloads         []Download `json:"Downloads,omitempty"`
}

Downloads Use aria2c Reference : https://aria2.github.io/manual/en/html/aria2c.html#options

func (*Downloads) IsEmpty added in v0.3.2

func (it *Downloads) IsEmpty() bool

func (*Downloads) Length added in v0.3.2

func (it *Downloads) Length() int

type Duration

type Duration struct {
	Value      int    `json:"Value"`
	Quantifier string `json:"Quantifier"`
}

type DynamicPaths

type DynamicPaths struct {
	Vars         []PathVar      `json:"Vars,omitempty"`
	AllDiffPaths []AllDiffPaths `json:"AllDiffPaths,omitempty"`
	// contains filtered or unexported fields
}

func (*DynamicPaths) EachItemsLength added in v0.1.2

func (dynamicPaths *DynamicPaths) EachItemsLength() int

func (*DynamicPaths) FlatPaths added in v0.1.2

func (dynamicPaths *DynamicPaths) FlatPaths() []string

FlatPaths don't apply PathVar at this moment, feature is complicated and not implemented yet.

Current flat paths only returns all the paths combined.

func (*DynamicPaths) IsEmpty added in v0.1.2

func (dynamicPaths *DynamicPaths) IsEmpty() bool

func (*DynamicPaths) LazyFlatPaths added in v0.1.2

func (dynamicPaths *DynamicPaths) LazyFlatPaths() []string

func (*DynamicPaths) Length added in v0.1.2

func (dynamicPaths *DynamicPaths) Length() int

type EnvironmentPaths added in v0.1.2

type EnvironmentPaths struct {
	coreinstruction.BaseSpecPlusRequestIds
	ModifyAs reqtype.Request `json:"ModifyAs"`
	Paths    []string        `json:"Locations,omitempty"`
}

func (EnvironmentPaths) HasAnyItem added in v0.1.2

func (e EnvironmentPaths) HasAnyItem() bool

func (EnvironmentPaths) IsEmpty added in v0.1.2

func (e EnvironmentPaths) IsEmpty() bool

func (EnvironmentPaths) Length added in v0.1.2

func (e EnvironmentPaths) Length() int

type EnvironmentPathsUsingFilesCollection added in v0.1.2

type EnvironmentPathsUsingFilesCollection struct {
	BaseLocationCollection
	ModifyAs reqtype.Request `json:"ModifyAs"`
}

type EnvironmentPathsUsingGenericPaths added in v0.1.2

type EnvironmentPathsUsingGenericPaths struct {
	coreinstruction.BaseSpecPlusRequestIds
	BaseGenericPathsCollection
	ModifyAs reqtype.Request `json:"ModifyAs"`
}

type EnvironmentVariable

type EnvironmentVariable struct {
	Name  string `json:"Name,omitempty"`
	Value string `json:"Value,omitempty"`
}

type ExecutableProcessor added in v0.1.2

type ExecutableProcessor struct {
	Name                                        string   `json:"Name"`
	IsEnabled                                   bool     `json:"IsEnabled,omitempty"`
	IsNormalizePath                             bool     `json:"IsNormalizePath,omitempty"`
	FailedMessage                               string   `json:"FailedMessage,omitempty"`
	SuccessMessage                              string   `json:"SuccessMessage,omitempty"`
	OutputToFile                                string   `json:"OutputToFile,omitempty"`
	BinaryPath                                  string   `json:"BinaryPath,omitempty"`
	Args                                        []string `json:"Args,omitempty"`
	IsSecure, IsDisplayToConsole, IsWriteToFile bool
	ScriptType                                  scripttype.Variant `json:"ScriptType"`
	// contains filtered or unexported fields
}

func (*ExecutableProcessor) CreateCmdOnce added in v0.1.2

func (e *ExecutableProcessor) CreateCmdOnce() *errcmd.CmdOnce

func (*ExecutableProcessor) GetExecuteOutputByExecuting added in v0.1.2

func (e *ExecutableProcessor) GetExecuteOutputByExecuting(
	errWrapperCollection *errwrappers.Collection,
) *ProcessorExecOutput

func (*ExecutableProcessor) LazyCmdOnce added in v0.1.2

func (e *ExecutableProcessor) LazyCmdOnce() *errcmd.CmdOnce

type FilesSelector

type FilesSelector struct {
	Path        string      `json:"Location"`
	Filters     []string    `json:"Filters,omitempty"`
	SkipFilters []string    `json:"SkipFilters,omitempty"`
	Extensions  []string    `json:"Extensions,omitempty"`
	Processors  []string    `json:"ExecutableProcessor,omitempty"`
	Attributes  *Attributes `json:"Attributes,omitempty"`
}

type FromTo added in v0.3.1

type FromTo struct {
	From string `json:"From,omitempty"`
	To   string `json:"To,omitempty"`
}

type GenericPathsCollection

type GenericPathsCollection struct {
	Specification *coreinstruction.Specification `json:"Specification,omitempty"`
	SimilarPaths  []SimilarPaths                 `json:"SimilarPaths,omitempty"`
	AllDiffPaths  []AllDiffPaths                 `json:"AllDiffPaths,omitempty"`
	DynamicPaths  *DynamicPaths                  `json:"DynamicPaths,omitempty"`
	// contains filtered or unexported fields
}

func (*GenericPathsCollection) AllDiffPathsFlatPaths added in v0.1.2

func (it *GenericPathsCollection) AllDiffPathsFlatPaths() []string

func (*GenericPathsCollection) AllDiffPathsIndividualItemsLength added in v0.1.2

func (it *GenericPathsCollection) AllDiffPathsIndividualItemsLength() int

func (*GenericPathsCollection) DynamicPathsFlatPaths added in v0.1.2

func (it *GenericPathsCollection) DynamicPathsFlatPaths() []string

func (*GenericPathsCollection) DynamicPathsIndividualItemsLength added in v0.1.2

func (it *GenericPathsCollection) DynamicPathsIndividualItemsLength() int

func (*GenericPathsCollection) FlatPaths added in v0.1.2

func (it *GenericPathsCollection) FlatPaths() []string

func (*GenericPathsCollection) FlatPathsSorted added in v0.1.2

func (it *GenericPathsCollection) FlatPathsSorted() []string

func (*GenericPathsCollection) HasAnyItem added in v0.1.2

func (it *GenericPathsCollection) HasAnyItem() bool

func (*GenericPathsCollection) IsEmpty added in v0.1.2

func (it *GenericPathsCollection) IsEmpty() bool

func (*GenericPathsCollection) IsEmptyAllDiffPaths added in v0.1.2

func (it *GenericPathsCollection) IsEmptyAllDiffPaths() bool

func (*GenericPathsCollection) IsEmptyDynamicPaths added in v0.1.2

func (it *GenericPathsCollection) IsEmptyDynamicPaths() bool

func (*GenericPathsCollection) IsEmptySimilarPaths added in v0.1.2

func (it *GenericPathsCollection) IsEmptySimilarPaths() bool

func (*GenericPathsCollection) LazyFlatPaths added in v0.1.2

func (it *GenericPathsCollection) LazyFlatPaths() []string

func (*GenericPathsCollection) LazyFlatPathsSorted added in v0.1.2

func (it *GenericPathsCollection) LazyFlatPathsSorted() []string

func (*GenericPathsCollection) LazyPathsIf added in v0.1.8

func (it *GenericPathsCollection) LazyPathsIf(isLazyPaths bool) []string

func (*GenericPathsCollection) Length added in v0.1.2

func (it *GenericPathsCollection) Length() int

Length of len(receiver.SimilarPaths) + len(receiver.AllDiffPaths) + items in DynamicPaths (not all specific paths)

func (*GenericPathsCollection) SimilarPathsFlatPaths added in v0.1.2

func (it *GenericPathsCollection) SimilarPathsFlatPaths() []string

func (*GenericPathsCollection) SimilarPathsIndividualItemsLength added in v0.1.2

func (it *GenericPathsCollection) SimilarPathsIndividualItemsLength() int

type LocationCollection added in v0.1.2

type LocationCollection struct {
	Locations        []string `json:"Locations,omitempty"`
	IsNormalizeApply bool     `json:"IsNormalizeApply,omitempty"`
	// contains filtered or unexported fields
}

func (*LocationCollection) FlatPaths added in v0.1.2

func (receiver *LocationCollection) FlatPaths() []string

func (*LocationCollection) HasAnyItem added in v0.1.2

func (receiver *LocationCollection) HasAnyItem() bool

func (*LocationCollection) IsEmpty added in v0.1.2

func (receiver *LocationCollection) IsEmpty() bool

func (*LocationCollection) LazyFlatPaths added in v0.1.2

func (receiver *LocationCollection) LazyFlatPaths() []string

func (*LocationCollection) Length added in v0.1.2

func (receiver *LocationCollection) Length() int

type PathModifier

type PathModifier struct {
	chmodins.BaseRwxInstructions
	ChmodCommands *ChmodCommands `json:"ChmodCommands,omitempty"`
	Chown         *Chown         `json:"Chown,omitempty"`
	ChangeGroup   *ChangeGroup   `json:"ChangeGroup,omitempty"`
}

func (*PathModifier) HasChangeGroup added in v0.1.2

func (p *PathModifier) HasChangeGroup() bool

func (*PathModifier) HasChmodCommands added in v0.1.2

func (p *PathModifier) HasChmodCommands() bool

func (*PathModifier) HasChown added in v0.1.2

func (p *PathModifier) HasChown() bool

func (*PathModifier) HasRwxInstructions added in v0.1.2

func (p *PathModifier) HasRwxInstructions() bool

type PathModifiersApply added in v0.1.2

type PathModifiersApply struct {
	coreinstruction.BaseSpecPlusRequestIds
	BaseGenericPathsCollection
	PathModifiers []PathModifier `json:"PathModifiers,omitempty"`
}

func (*PathModifiersApply) IsEmptyPathModifiers added in v0.1.2

func (p *PathModifiersApply) IsEmptyPathModifiers() bool

func (*PathModifiersApply) PathModifiersLength added in v0.1.2

func (p *PathModifiersApply) PathModifiersLength() int

type PathVar

type PathVar struct {
	VarName string `json:"VarName"`
	Value   string `json:"Value"`
	IsRegex bool   `json:"IsRegex"`
}

type PathVerifier

type PathVerifier struct {
	UserGroupName
	chmodins.BaseRwxInstructions
}

func (*PathVerifier) HasRwxInstructions added in v0.1.3

func (p *PathVerifier) HasRwxInstructions() bool

type PathVerifiers added in v0.1.2

type PathVerifiers struct {
	coreinstruction.BaseSpecPlusRequestIds
	PathVerifiers           []PathVerifier `json:"PathVerifiers,omitempty"`
	IsSkipCheckingOnInvalid bool
	IsNormalize             bool
	IsRecursiveCheck        bool
}

func (*PathVerifiers) HasAnyItem added in v0.1.3

func (v *PathVerifiers) HasAnyItem() bool

func (*PathVerifiers) IsEmpty added in v0.1.3

func (v *PathVerifiers) IsEmpty() bool

func (*PathVerifiers) Length added in v0.1.3

func (v *PathVerifiers) Length() int

type PathVerifiersWithGenericPathsCollection added in v0.1.2

type PathVerifiersWithGenericPathsCollection struct {
	coreinstruction.BaseSpecPlusRequestIds
	BaseGenericPathsCollection
	PathVerifiers *PathVerifiers `json:"PathVerifiers,omitempty"`
}

func (*PathVerifiersWithGenericPathsCollection) IsEitherEmpty added in v0.1.3

func (p *PathVerifiersWithGenericPathsCollection) IsEitherEmpty() bool

type PathVerifiersWithLocationCollection added in v0.1.3

type PathVerifiersWithLocationCollection struct {
	PathVerifiers      *PathVerifiers
	LocationCollection *LocationCollection
}

func (*PathVerifiersWithLocationCollection) HasLocations added in v0.1.3

func (receiver *PathVerifiersWithLocationCollection) HasLocations() bool

func (*PathVerifiersWithLocationCollection) IsEitherEmpty added in v0.1.3

func (receiver *PathVerifiersWithLocationCollection) IsEitherEmpty() bool

type PathsCreator added in v0.1.5

type PathsCreator struct {
	BasePathsCreator
	ApplyRwx       *chmodins.RwxOwnerGroupOther
	ApplyUserGroup *UserGroupName
}

func (*PathsCreator) HasRwx added in v0.1.5

func (it *PathsCreator) HasRwx() bool

func (*PathsCreator) HasUserGroup added in v0.1.5

func (it *PathsCreator) HasUserGroup() bool

type PathsCreatorCollection added in v0.1.5

type PathsCreatorCollection struct {
	PathsCreatorItems       []PathsCreator `json:"PathsCreatorItems,omitempty"`
	IsIgnoreOnExist         bool
	IsDeleteAllBeforeCreate bool
	// contains filtered or unexported fields
}

func (*PathsCreatorCollection) FlatPaths added in v0.1.5

func (it *PathsCreatorCollection) FlatPaths() []string

func (*PathsCreatorCollection) HasAnyItem added in v0.1.5

func (it *PathsCreatorCollection) HasAnyItem() bool

func (*PathsCreatorCollection) IsEmpty added in v0.1.5

func (it *PathsCreatorCollection) IsEmpty() bool

func (*PathsCreatorCollection) LazyFlatPaths added in v0.1.5

func (it *PathsCreatorCollection) LazyFlatPaths() []string

func (*PathsCreatorCollection) LazyFlatPathsIf added in v0.1.5

func (it *PathsCreatorCollection) LazyFlatPathsIf(isLazy bool) []string

func (*PathsCreatorCollection) Length added in v0.1.5

func (it *PathsCreatorCollection) Length() int

Length yields count of PathsCreatorItems, not all paths count

type PrePostStatePathModifiers

type PrePostStatePathModifiers struct {
	PrePathModifiers  []PathVerifiersWithGenericPathsCollection `json:"PrePathModifiers,omitempty"`
	PostPathModifiers []PathVerifiersWithGenericPathsCollection `json:"PostPathModifiers,omitempty"`
}

type ProcessorExecOutput added in v0.1.2

type ProcessorExecOutput struct {
	CmdOnce             *errcmd.CmdOnce
	ConsoleResult       *errcmd.Result
	ExecutableProcessor *ExecutableProcessor
	CustomMessage       *errcmd.CustomMessage
}

type ProcessorExecOutputs added in v0.1.2

type ProcessorExecOutputs struct {
	CompiledError *errorwrapper.Wrapper
	Outputs       []ProcessorExecOutput
}

type RemoveInstruction added in v0.1.8

type RemoveInstruction struct {
	BaseIsRecursive
	GenericPathsCollection
	IsRemoveOnlyOnExist bool `json:"IsRemoveOnlyOnExist,omitempty"`
	IsContinueOnError   bool `json:"IsContinueOnError,omitempty"`
}

func (*RemoveInstruction) Apply added in v0.1.8

func (it *RemoveInstruction) Apply(isLazyPaths bool) *errwrappers.Collection

func (*RemoveInstruction) ApplyUsingErrorCollection added in v0.1.8

func (it *RemoveInstruction) ApplyUsingErrorCollection(
	isLazyPaths bool,
	errorCollection *errwrappers.Collection,
) (
	isSuccess bool,
)

type SimilarPaths

type SimilarPaths struct {
	RootPath         string   `json:"RootPath"`
	RelativePaths    []string `json:"RelativePaths"`
	IsNormalizeApply bool     `json:"IsNormalizeApply"`
}

func (*SimilarPaths) ApplyLinuxRecursiveFileModeOnRoot added in v0.1.5

func (it *SimilarPaths) ApplyLinuxRecursiveFileModeOnRoot(
	fileMode os.FileMode,
) *errorwrapper.Wrapper

func (*SimilarPaths) BasePathsCreator added in v0.1.5

func (it *SimilarPaths) BasePathsCreator() *BasePathsCreator

func (*SimilarPaths) FlatPaths added in v0.1.2

func (it *SimilarPaths) FlatPaths() []string

func (*SimilarPaths) HasAnyItem added in v0.1.2

func (it *SimilarPaths) HasAnyItem() bool

func (*SimilarPaths) IsEmpty added in v0.1.2

func (it *SimilarPaths) IsEmpty() bool

func (*SimilarPaths) Length added in v0.1.2

func (it *SimilarPaths) Length() int

type SourceDestinationPlusCompiled added in v0.2.7

type SourceDestinationPlusCompiled struct {
	BaseSourceDestination
	pathfixer.PathOptions
	// contains filtered or unexported fields
}

func NewSourceDestinationPlusCompiled added in v0.2.7

func NewSourceDestinationPlusCompiled(
	src, dest string,
	options *pathfixer.PathOptions,
) *SourceDestinationPlusCompiled

func NewSourceDestinationPlusCompiledNoOptions added in v0.2.7

func NewSourceDestinationPlusCompiledNoOptions(
	src, dest string,
) *SourceDestinationPlusCompiled

func (SourceDestinationPlusCompiled) CompiledSourceDestination added in v0.2.7

func (it SourceDestinationPlusCompiled) CompiledSourceDestination() *BaseSourceDestination

func (SourceDestinationPlusCompiled) DestinationFixedPath added in v0.2.7

func (it SourceDestinationPlusCompiled) DestinationFixedPath() string

func (SourceDestinationPlusCompiled) FixedSrcDest added in v0.2.7

func (it SourceDestinationPlusCompiled) FixedSrcDest() (src, dest string)

func (SourceDestinationPlusCompiled) IsSameSourceDestination added in v0.2.7

func (it SourceDestinationPlusCompiled) IsSameSourceDestination() bool

func (SourceDestinationPlusCompiled) SourceFixedPath added in v0.2.7

func (it SourceDestinationPlusCompiled) SourceFixedPath() string
type SymbolicLink struct {
	Src                string `json:"Src"`
	Dst                string `json:"Dst"`
	IsClearBefore      bool   `json:"IsClearBefore,omitempty"`
	IsMkDirAll         bool   `json:"IsMkDirAll,omitempty"`
	IsNormalizePath    bool   `json:"IsNormalizePath,omitempty"`
	IsSkipOnSrcMissing bool   `json:"IsSkipOnSrcMissing,omitempty"`
	IsSkipOnExist      bool   `json:"IsSkipOnExist,omitempty"`
}
type SymbolicLinks struct {
	coreinstruction.BaseSpecPlusRequestIds
	IsContinueOnError bool           `json:"IsContinueOnError,omitempty"`
	SymbolicLinks     []SymbolicLink `json:"SymbolicLinks,omitempty"`
}

func (*SymbolicLinks) HasAnyItem added in v0.1.3

func (receiver *SymbolicLinks) HasAnyItem() bool

func (*SymbolicLinks) IsEmpty added in v0.1.3

func (receiver *SymbolicLinks) IsEmpty() bool

func (*SymbolicLinks) Length added in v0.1.3

func (receiver *SymbolicLinks) Length() int

type UserGroupName added in v0.1.5

type UserGroupName struct {
	BaseGroupName
	UserName string `json:"UserName,omitempty"` // Not define or empty string or * means keeping the existing one
}

func NewUserGroupName added in v0.1.5

func NewUserGroupName(
	username, groupName string,
) *UserGroupName

func (*UserGroupName) Clone added in v0.1.5

func (it *UserGroupName) Clone() *UserGroupName

func (*UserGroupName) HasUserName added in v0.1.5

func (it *UserGroupName) HasUserName() bool

func (*UserGroupName) HasUserNameOrGroup added in v0.1.5

func (it *UserGroupName) HasUserNameOrGroup() bool

func (*UserGroupName) IsGroupNameUserNameBothEmpty added in v0.1.5

func (it *UserGroupName) IsGroupNameUserNameBothEmpty() bool

func (*UserGroupName) IsUserNameEmpty added in v0.1.5

func (it *UserGroupName) IsUserNameEmpty() bool

func (*UserGroupName) IsUsername added in v0.1.5

func (it *UserGroupName) IsUsername(checkingUserName string) bool

func (*UserGroupName) UserNameSimple added in v0.1.5

func (it *UserGroupName) UserNameSimple() string

Jump to

Keyboard shortcuts

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