Documentation ¶
Overview ¶
Package parsing provides a parser for pipeline yaml files
Index ¶
- type Parser
- func (parser *Parser) BuiltInPipelineFilePaths(projectPath string) ([]string, error)
- func (parser *Parser) ParsePipelineFiles(allPipelineFilePaths []string, builtIn bool) (defaults pipeline.DefaultSettings, definitions pipeline.DefinitionsLookup, ...)
- func (parser *Parser) ProcessPipelineFile(pipelineFile pipeline.File, builtIn bool) pipeline.DefinitionsLookup
- func (parser *Parser) UserPipelineFilePaths(explicitFileName string) ([]string, error)
- type ParserOption
- func WithEvalSymlinksImplementation(evalSymlinks func(path string) (string, error)) ParserOption
- func WithFindByGlobImplementation(findByGlob func(pattern string) ([]string, error)) ParserOption
- func WithReadFileImplementation(readFile func(filename string) ([]byte, error)) ParserOption
- func WithRecursivelyAddImportsImplementation(recursivelyAddImports func(paths []string) ([]string, error)) ParserOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Parser ¶
type Parser struct { RecursivelyAddImports func(paths []string) ([]string, error) // contains filtered or unexported fields }
Parser reads and parses pipeline files
func (*Parser) BuiltInPipelineFilePaths ¶
BuiltInPipelineFilePaths lists the file paths of all built-in pipelines
func (*Parser) ParsePipelineFiles ¶
func (parser *Parser) ParsePipelineFiles(allPipelineFilePaths []string, builtIn bool) ( defaults pipeline.DefaultSettings, definitions pipeline.DefinitionsLookup, files []pipeline.File, returnErr error, )
ParsePipelineFiles processes
func (*Parser) ProcessPipelineFile ¶
func (parser *Parser) ProcessPipelineFile( pipelineFile pipeline.File, builtIn bool, ) pipeline.DefinitionsLookup
ProcessPipelineFile parses the specified yaml pipeline file
type ParserOption ¶
type ParserOption func(parser *Parser)
ParserOption represents an option that can be passed to the `NewParser` constructor
func WithEvalSymlinksImplementation ¶ added in v0.32.28
func WithEvalSymlinksImplementation(evalSymlinks func(path string) (string, error)) ParserOption
WithRecursivelyAddImportsImplementation sets the implementation of the function that evaluates symlinks
Useful for tests.
func WithFindByGlobImplementation ¶
func WithFindByGlobImplementation(findByGlob func(pattern string) ([]string, error)) ParserOption
WithFindByGlobImplementation sets the implementation of the function finding files by glob
Useful for tests.
func WithReadFileImplementation ¶
func WithReadFileImplementation(readFile func(filename string) ([]byte, error)) ParserOption
WithReadFileImplementation sets the implementation of the function reading a file's content
Useful for tests.
func WithRecursivelyAddImportsImplementation ¶
func WithRecursivelyAddImportsImplementation(recursivelyAddImports func(paths []string) ([]string, error)) ParserOption
WithRecursivelyAddImportsImplementation sets the implementation of the function that recursively adds imports
Useful for tests.