parser

package
v1.1.2-0...-c797b3a Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrStructNotFound      = errors.New("struct not found")
	ErrUnSupportInlineType = errors.New("unsupport inline type")
)

Functions

func GetType

func GetType(api *spec.ApiSpec, t string) spec.Type

Types

type ApiStruct

type ApiStruct struct {
	Info    string
	Type    string
	Service string
	Imports string
	// contains filtered or unexported fields
}

func ParseApi

func ParseApi(src string) (*ApiStruct, error)

type Parser

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

func NewParser

func NewParser(filename string) (*Parser, error)

func (*Parser) Parse

func (p *Parser) Parse() (api *spec.ApiSpec, err error)

type StructParser

type StructParser struct {
	Src string
}

func (*StructParser) Parse

func (sp *StructParser) Parse() ([]spec.Type, error)

Jump to

Keyboard shortcuts

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