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 GetFuncQualifierCodeElements(qual *x.FuncQualifier) (x.FuncInterface, Code)
- func GetHeaderValueSetterFuncQualifierCodeElements(qual *x.FuncQualifier) (x.FuncInterface, Code)
- func NewTestFile(includeBoilerplace bool) *File
- func TagDynamicContentType(headerKey, valVarNodeName string) Code
- func TagDynamicHeader(keyVarName, valVarName string) Code
- func TagStaticContentType(headerKey, headerValue string) Code
- type Handler
Constants ¶
View Source
const ( // NOTE: hardcoded inside TestQueryContent const. InlineExpectationsTestTagHeaderKeyNode = "$headerKeyNode" // Must start with a $ sign. InlineExpectationsTestTagHeaderValNode = "$headerValNode" // Must start with a $ sign. InlineExpectationsTestTagHeaderKey = "$headerKey" // Must start with a $ sign. InlineExpectationsTestTagHeaderVal = "$headerVal" // Must start with a $ sign. )
View Source
const ( MethodWriteHeaderKey = "{key:Param, val:Param} <- $key" MethodWriteHeaderVal = "{key:Param, val:Param} <- $val" MethodCt = "{ct:Param} <- $ct" // Content-type parameter; the function only allows to specify content-type. MethodCtFromFuncName = "{ct:Inferred} <- *" // Content-type inferred from the function name. )
View Source
const (
Kind x.ModelKind = "HTTP::HeaderWrite"
)
View Source
const (
TestQueryContent = `` /* 1597-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().(Type)`
func GetFuncQualifierCodeElements ¶
func GetFuncQualifierCodeElements(qual *x.FuncQualifier) (x.FuncInterface, Code)
func GetHeaderValueSetterFuncQualifierCodeElements ¶
func GetHeaderValueSetterFuncQualifierCodeElements(qual *x.FuncQualifier) (x.FuncInterface, Code)
func NewTestFile ¶
func NewTestFile(includeBoilerplace bool) *File
func TagDynamicContentType ¶
func TagDynamicContentType(headerKey, valVarNodeName string) Code
TagDynamicContentType creates a comment for content-type headers that have a dynamic value node.
func TagDynamicHeader ¶
func TagDynamicHeader(keyVarName, valVarName string) Code
TagDynamicHeader creates a comment for headers that have dynamic key and value nodes.
func TagStaticContentType ¶
func TagStaticContentType(headerKey, headerValue string) Code
TagStaticContentType creates a comment for content-type headers that have a static value.
Types ¶
type Handler ¶
type Handler struct{}
func (*Handler) GenerateCodeQL ¶
func (*Handler) ScavengeMethods ¶
Click to show internal directories.
Click to hide internal directories.