pathinsfmt

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: MIT Imports: 19 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 BaseEnvPaths

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

type BaseEnvironmentVariables

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

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
}

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
}

type BasePathVerifiers

type BasePathVerifiers struct {
	PathVerifiers
}

type BaseSourceDestination

type BaseSourceDestination struct {
	Source      string `json:"Source"`
	Destination string `json:"Destination"`
}
type BaseSymbolicLinks struct {
	coreinstruction.BaseSpecPlusRequestIds
	SymbolicLinks []SymbolicLink `json:"SymbolicLinks,omitempty"`
}

type BaseUserNamePlusGroupName

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

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 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 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:"Path"`
	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 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 (receiver *GenericPathsCollection) AllDiffPathsFlatPaths() []string

func (*GenericPathsCollection) AllDiffPathsIndividualItemsLength added in v0.1.2

func (receiver *GenericPathsCollection) AllDiffPathsIndividualItemsLength() int

func (*GenericPathsCollection) DynamicPathsFlatPaths added in v0.1.2

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

func (*GenericPathsCollection) DynamicPathsIndividualItemsLength added in v0.1.2

func (receiver *GenericPathsCollection) DynamicPathsIndividualItemsLength() int

func (*GenericPathsCollection) FlatPaths added in v0.1.2

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

func (*GenericPathsCollection) FlatPathsSorted added in v0.1.2

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

func (*GenericPathsCollection) HasAnyItem added in v0.1.2

func (receiver *GenericPathsCollection) HasAnyItem() bool

func (*GenericPathsCollection) IsEmpty added in v0.1.2

func (receiver *GenericPathsCollection) IsEmpty() bool

func (*GenericPathsCollection) IsEmptyAllDiffPaths added in v0.1.2

func (receiver *GenericPathsCollection) IsEmptyAllDiffPaths() bool

func (*GenericPathsCollection) IsEmptyDynamicPaths added in v0.1.2

func (receiver *GenericPathsCollection) IsEmptyDynamicPaths() bool

func (*GenericPathsCollection) IsEmptySimilarPaths added in v0.1.2

func (receiver *GenericPathsCollection) IsEmptySimilarPaths() bool

func (*GenericPathsCollection) LazyFlatPaths added in v0.1.2

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

func (*GenericPathsCollection) LazyFlatPathsSorted added in v0.1.2

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

func (*GenericPathsCollection) Length added in v0.1.2

func (receiver *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 (receiver *GenericPathsCollection) SimilarPathsFlatPaths() []string

func (*GenericPathsCollection) SimilarPathsIndividualItemsLength added in v0.1.2

func (receiver *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 {
	BaseUserNamePlusGroupName
	chmodins.BaseRwxInstructions
	Path string `json:"Path"`
}

type PathVerifiers added in v0.1.2

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

type PathVerifiersWithGenericPathsCollection added in v0.1.2

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

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 SimilarPaths

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

func (*SimilarPaths) FlatPaths added in v0.1.2

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

func (*SimilarPaths) HasAnyItem added in v0.1.2

func (s *SimilarPaths) HasAnyItem() bool

func (*SimilarPaths) IsEmpty added in v0.1.2

func (s *SimilarPaths) IsEmpty() bool

func (*SimilarPaths) Length added in v0.1.2

func (s *SimilarPaths) Length() int
type SymbolicLink struct {
	Src           string `json:"Src"`
	Dst           string `json:"Dst"`
	IsForce       bool   `json:"IsForce"`
	IsSkipOnError bool   `json:"IsSkipOnError"`
}

Jump to

Keyboard shortcuts

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