parser

package
v0.0.0-...-3fcbef7 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuiltInMethodGenerateFlags

func BuiltInMethodGenerateFlags(parser *Parser)

func BuiltInMethodTagsParsers

func BuiltInMethodTagsParsers(parser *Parser)

func BuiltInParamTagsParsers

func BuiltInParamTagsParsers(parser *Parser)

func BuiltInServiceGenerateFlags

func BuiltInServiceGenerateFlags(parser *Parser)

func BuiltInServiceTagsParsers

func BuiltInServiceTagsParsers(parser *Parser)

func ParseVersion

func ParseVersion(ver string) (*types.Version, error)

Types

type MethodTagParser

type MethodTagParser func(method types.Method, options types.TagOptions, tag string) error

type ParamTagParser

type ParamTagParser func(arg types.Argument, options types.TagOptions, tag string) error

type Parser

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

func Default

func Default(opts ...ParserOption) *Parser

func New

func New(opts ...ParserOption) *Parser

func (*Parser) MustRegisterMethodTagParser

func (p *Parser) MustRegisterMethodTagParser(name string, parser MethodTagParser)

func (*Parser) MustRegisterParamTagParser

func (p *Parser) MustRegisterParamTagParser(name string, parser ParamTagParser)

func (*Parser) MustRegisterServiceTagParser

func (p *Parser) MustRegisterServiceTagParser(name string, parser ServiceTagParser)

func (*Parser) Parse

func (p *Parser) Parse(f *ast.File) (services []types.Service, err error)

func (*Parser) RegisterMethodGenerateFlags

func (p *Parser) RegisterMethodGenerateFlags(flags ...string)

func (*Parser) RegisterMethodGenerateFlagsGroup

func (p *Parser) RegisterMethodGenerateFlagsGroup(group string, flags ...string)

func (*Parser) RegisterMethodTagParser

func (p *Parser) RegisterMethodTagParser(name string, parser MethodTagParser) error

func (*Parser) RegisterParamTagParser

func (p *Parser) RegisterParamTagParser(name string, parser ParamTagParser) error

func (*Parser) RegisterServiceGenerateFlags

func (p *Parser) RegisterServiceGenerateFlags(flags ...string)

func (*Parser) RegisterServiceGenerateFlagsGroup

func (p *Parser) RegisterServiceGenerateFlagsGroup(group string, flags ...string)

func (*Parser) RegisterServiceTagParser

func (p *Parser) RegisterServiceTagParser(name string, parser ServiceTagParser) error

type ParserOption

type ParserOption func(parser *Parser)

type ServiceTagParser

type ServiceTagParser func(service types.Service, options types.TagOptions, tag string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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