parser

package
v0.0.0-...-17e6b21 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactParser

type ArtifactParser interface {
	Parse(ctx context.Context, reader io.Reader) (*proto.UnifiedAST, error)
	Validate(ctx context.Context, ast *proto.UnifiedAST) error
	GetSupportedFormats() []string
}

ArtifactParser defines the interface for parsing different file formats

type MDXParser

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

func (*MDXParser) Parse

func (mp *MDXParser) Parse(ctx context.Context, reader io.Reader) (*proto.UnifiedAST, error)

type MarkdownParser

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

func (*MarkdownParser) Parse

func (mp *MarkdownParser) Parse(ctx context.Context, reader io.Reader) (*proto.UnifiedAST, error)

type ParserFactory

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

func NewParserFactory

func NewParserFactory(metrics *metrics.QuantumStorageMetrics, tracer tracing.Tracer) *ParserFactory

func (*ParserFactory) GetParser

func (pf *ParserFactory) GetParser(format string) (ArtifactParser, error)

func (*ParserFactory) RegisterParser

func (pf *ParserFactory) RegisterParser(
	format string,
	parser Parser,
) error

type ProtoParser

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

func (*ProtoParser) Parse

func (pp *ProtoParser) Parse(ctx context.Context, reader io.Reader) (*proto.UnifiedAST, error)

type XMLParser

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

func (*XMLParser) Parse

func (xp *XMLParser) Parse(ctx context.Context, reader io.Reader) (*proto.UnifiedAST, error)

type YAMLParser

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

func (*YAMLParser) Parse

func (yp *YAMLParser) Parse(ctx context.Context, reader io.Reader) (*proto.UnifiedAST, error)

Jump to

Keyboard shortcuts

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