parse

package
v0.0.0-...-98ba599 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultParser = NewMetaParser(map[string]Parser{
		"yaml": yaml.DefaultParser,
		"pb":   protobuf.DefaultParser,
	})
)

Functions

func Parse

func Parse(r io.Reader) (*types.WorkflowSpec, error)

func ParseWith

func ParseWith(r io.Reader, parsers ...string) (*types.WorkflowSpec, error)

func Parsers

func Parsers() []string

func Supports

func Supports(parser string) bool

Types

type MetaParser

type MetaParser struct {
	// contains filtered or unexported fields
}

func NewMetaParser

func NewMetaParser(parsers map[string]Parser) *MetaParser

func (*MetaParser) Parse

func (mp *MetaParser) Parse(r io.Reader) (*types.WorkflowSpec, error)

func (*MetaParser) ParseWith

func (mp *MetaParser) ParseWith(r io.Reader, parsers ...string) (*types.WorkflowSpec, error)

func (*MetaParser) Parsers

func (mp *MetaParser) Parsers() []string

func (*MetaParser) Supports

func (mp *MetaParser) Supports(s string) bool

type Parser

type Parser interface {
	Parse(r io.Reader) (*types.WorkflowSpec, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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