Documentation
¶
Overview ¶
Package parser parses API definitions in Go
Package parser parses API definitions in Go ¶
Package parser parses API definitions in Go
Index ¶
Constants ¶
View Source
const ( // QueryParamTag is the tag name for parameters in query QueryParamTag = "param" // JSONParamTag is the tag name for JSON JSONParamTag = "json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
Method MethodType
RawPath, Path string
Placeholder string
RequestPayloadName string
ResponsePayloadName string
RequestPayload *ast.StructType
ResponsePayload *ast.StructType
RequestGo2tsPayload *go2tstypes.Object
ResponseGo2tsPayload *go2tstypes.Object
SwagComments []string
File string
RequestPos, ResponsePos token.Pos
RequestLine, ResponseLine int
// contains filtered or unexported fields
}
Endpoint represents one HTTP endpoint
type Group ¶
type Group struct {
ImportPath string
RawPath, Path string
Dir string
Placeholder string
ParsedTypes map[string]go2tstypes.Type
Children []*Group
Endpoints []*Endpoint
// contains filtered or unexported fields
}
Group is a layer for endpoints
type MethodType ¶
type MethodType string
MethodType represents methods for HTTP
const ( // GET is GET method for HTTP GET MethodType = "GET" // POST is POST method for HTTP POST MethodType = "POST" // PUT is PUT method for HTTP PUT MethodType = "PUT" // DELETE is method for HTTP DELETE MethodType = "DELETE" // PATCH is method for HTTP PATCH MethodType = "PATCH" )
Click to show internal directories.
Click to hide internal directories.