Documentation
¶
Index ¶
Constants ¶
View Source
const RouterFuncName = "AtgenRouterFunc"
RouterFuncName is function name to be replaced
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Generator ¶
type Generator struct {
Yaml string
Template string
TemplateDir string
OutputDir string
TestFuncs TestFuncs
TestFuncsPerAPIVersion map[string]TestFuncs
Program []*packages.Package
}
Generator is the type for code generator
type Req ¶
Req is a request parameters and headers which a test should throw Body only uses when Type is RAW
type Res ¶
type Res struct {
Status int
Params map[string]interface{}
ParamsArray []map[string]interface{}
Headers map[string]string
}
Res is a response status, parameters and headers which a test should get
type RouterFunc ¶ added in v0.2.0
RouterFunc describe a function which should be called from test to get http.Handler
type Subtests ¶
type Subtests []Subtest
Subtests is a group of Subtest
func (Subtests) IsSubtests ¶
IsSubtests returns true when t is Subtests
type Test ¶
type Test struct {
APIVersions []string
Path string
Method string
Req Req
Res Res
Vars map[string]interface{}
Register string
}
Test represents a test in a test function
type TestFunc ¶
type TestFunc struct {
Name string
Tests []Tester
APIVersions []string
RouterFuncName string
RouterFunc *RouterFunc
Vars map[string]interface{}
}
TestFunc represents a test function
Click to show internal directories.
Click to hide internal directories.