parser

package
v0.0.0-...-7cca9db Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DocClient     = docPrefix + "Client"
	DocCall       = docPrefix + "Call"
	DocContext    = docPrefix + "Context"
	DocRequest    = docPrefix + "Request"
	DocResponse   = docPrefix + "Response"
	DocPathParam  = docPrefix + "PathParam"
	DocQueryParam = docPrefix + "QueryParam"
	DocFormParam  = docPrefix + "FormParam"
	DocHeader     = docPrefix + "Header"
	DocCookie     = docPrefix + "Cookie"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Call

type Call struct {
	GoName    string
	Method    string
	PathFmt   string
	GoCtxType string
	Request   Request
	Response  Response
}

type Client

type Client struct {
	GoName           string
	GoIntName        string
	GoImplName       string
	GoImplConstrName string
	Config           ClientConfig
	Calls            []Call
	ConfigVars       []ConfigVar
}

type ClientConfig

type ClientConfig struct {
	GoName string
}

type ConfigVar

type ConfigVar struct {
	GoName string
	GoType string
}

type Import

type Import struct {
	Name string
	Path string
}

type Info

type Info struct {
	Dir     string
	Name    string
	PkgName string
	Imports []Import
	Clients []Client
}

type Param

type Param struct {
	Name          string
	GoName        string
	GoType        string
	GoFieldName   string
	GoSetFlagName string
	GoSetterName  string
	Optional      bool
	DefaultValue  interface{}
	ConstValue    interface{}
	ConfigVarName string
}

type Parser

type Parser struct{}

func NewParser

func NewParser() *Parser

func (*Parser) ParseFile

func (p *Parser) ParseFile(path string) *Info

type Request

type Request struct {
	GoName       string
	GoConstrName string
	PathParams   []Param
	QueryParams  []Param
	FormParams   []Param
	HeaderParams []Param
}

type Response

type Response struct {
	GoName       string
	GoConstrName string
}

Jump to

Keyboard shortcuts

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