Documentation ¶
Index ¶
- Constants
- Variables
- func Comments(group *Group, comments ...string) *Group
- func ComposeTypeAssertion(file *File, group *Group, varName string, typ types.Type, isVariadic bool)
- func GetBodySetterFuncQualifierCodeElements(qual *x.FuncQualifier) (x.FuncInterface, Code)
- func NewTag(contentTypes string, respBodies string) Code
- func NewTestFile(includeBoilerplace bool) *File
- func TagContentType(vals ...string) string
- func TagResponseBody(vals ...string) string
- type Handler
Constants ¶
View Source
const ( // NOTE: hardcoded inside TestQueryContent const. InlineExpectationsTestTagResponseBody = "$responseBody" // Must start with a $ sign. InlineExpectationsTestTagContentType = "$contentType" // Must start with a $ sign. )
View Source
const ( MethodBodyWithCtFromFuncName = "{ct:Inferred, body:Param} <- $body" // Specify the body parameter; the content-type will be inferred from the function name. MethodBodyWithCtIsBody = "{ct:Param, body:Param} <- $body" // Body parameter; content-type will be from another parameter of the same function. MethodBodyWithCtIsCt = "{ct:Param, body:Param} <- $ct" // Content-type parameter; body will be from another parameter of the same function. MethodBody = "{body:Param} <- $body" // Body parameter; the function only allows to specify a body parameter and does not set content-type in any way. )
View Source
const (
Kind x.ModelKind = "HTTP::ResponseBody"
)
View Source
const (
TestQueryContent = `` /* 719-byte string literal not displayed */
)
Variables ¶
View Source
var (
GenerateBoilerplate bool
)
View Source
var (
IncludeCommentsInGeneratedGo bool
)
Functions ¶
func Comments ¶
func Comments(group *Group, comments ...string) *Group
Comments adds comments to a Group (if enabled), and returns the group.
func ComposeTypeAssertion ¶
func ComposeTypeAssertion(file *File, group *Group, varName string, typ types.Type, isVariadic bool)
declare `name := source(1).(Type)`
func GetBodySetterFuncQualifierCodeElements ¶
func GetBodySetterFuncQualifierCodeElements(qual *x.FuncQualifier) (x.FuncInterface, Code)
func NewTestFile ¶
func NewTestFile(includeBoilerplace bool) *File
func TagContentType ¶
func TagResponseBody ¶
Types ¶
type Handler ¶
type Handler struct{}
func (*Handler) GenerateCodeQL ¶
func (*Handler) ScavengeMethods ¶
Click to show internal directories.
Click to hide internal directories.