parse

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter interface {
	Convert(ctx context.Context, file *fileresource.FileResource) (*apispecdoc.ApiSpecDoc, error)
}

Converter converts file data to API specification document using specific file type

func NewConverter

func NewConverter(log logger.Logger, parsers []Parser) Converter

type ConverterImpl

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

func (*ConverterImpl) Convert

Convert gets bytes slice with json/yaml content and a filetype matching the type of the content and returns parsed ApiSpecDoc.

type Parser

type Parser interface {
	//Parse the bytes slice to a ApiSecDoc
	Parse(ctx context.Context, content []byte) (*apispecdoc.ApiSpecDoc, error)

	//GetType returns the type (json or yaml) of the parser
	GetType() fileresource.AsdFileType
}

Parser is common interface with functionality to parse content of the specific API specification document and to construct ApiSpecDoc object from it

Directories

Path Synopsis
Package parse is a generated GoMock package.
Package parse is a generated GoMock package.

Jump to

Keyboard shortcuts

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