Documentation
¶
Index ¶
- Variables
- func Create(auth *httpexpect.Expect, url string, create map[string]interface{}, ...) *httpexpect.Object
- func Delete(auth *httpexpect.Expect, url string, keys ResponseKeys)
- func DeleteMutil(auth *httpexpect.Expect, url string, data map[string]interface{}, ...)
- func Get(auth *httpexpect.Expect, url string, keys ResponseKeys)
- func GetList(auth *httpexpect.Expect, url string, keys ResponseKeys)
- func Post(auth *httpexpect.Expect, url string, data map[string]interface{}, ...)
- func PostList(auth *httpexpect.Expect, url string, res map[string]interface{}, ...)
- func Update(auth *httpexpect.Expect, url string, update map[string]interface{}, ...)
- type Param
- type ResponseKey
- type ResponseKeys
- func (rks ResponseKeys) GetId() uint
- func (rks ResponseKeys) GetStringValue(key string) string
- func (rks ResponseKeys) GetUintValue(key string) uint
- func (rks ResponseKeys) Keys() []string
- func (rks ResponseKeys) Scan(object *httpexpect.Object)
- func (rks ResponseKeys) Test(object *httpexpect.Object)
Constants ¶
This section is empty.
Variables ¶
View Source
var IdKeys = ResponseKeys{ {Type: "uint", Key: "id", Value: uint(0)}, }
View Source
var PageKeys = ResponseKeys{
{Type: "int", Key: "pageSize", Value: 10},
{Type: "int", Key: "page", Value: 1},
{Type: "int", Key: "total", Value: 0},
}
PageKeys 基础分页请求返回参数
View Source
var PageRes = map[string]interface{}{"page": 1, "pageSize": 10}
PageRes 基础分页请求参数
Functions ¶
func Create ¶
func Create(auth *httpexpect.Expect, url string, create map[string]interface{}, keys ResponseKeys) *httpexpect.Object
Create 创建数据 auth 授权后的 *httpexpect.Expect url 请求地址 create 请求数据 keys 响应数据
func Delete ¶
func Delete(auth *httpexpect.Expect, url string, keys ResponseKeys)
Delete 删除数据 auth 授权后的 *httpexpect.Expect url 请求地址 keys 响应数据
func DeleteMutil ¶
func DeleteMutil(auth *httpexpect.Expect, url string, data map[string]interface{}, keys ResponseKeys)
DeleteMutil 批量删除数据 auth 授权后的 *httpexpect.Expect url 请求地址 data 请求数据 keys 响应数据
func Get ¶
func Get(auth *httpexpect.Expect, url string, keys ResponseKeys)
Get 获取数据 auth 授权后的 *httpexpect.Expect url 请求地址 keys 响应数据
func GetList ¶
func GetList(auth *httpexpect.Expect, url string, keys ResponseKeys)
GetList 分页请求-get auth 授权后的 *httpexpect.Expect url 请求地址 keys 响应数据
func Post ¶
func Post(auth *httpexpect.Expect, url string, data map[string]interface{}, keys ResponseKeys)
Post 提交数据 auth 授权后的 *httpexpect.Expect url 请求地址 data 请求数据 keys 响应数据
func PostList ¶
func PostList(auth *httpexpect.Expect, url string, res map[string]interface{}, pageKeys ResponseKeys)
PostList 分页请求-post auth 授权后的 *httpexpect.Expect url 请求地址 res 请求参数 pageKeys 相应数据
func Update ¶
func Update(auth *httpexpect.Expect, url string, update map[string]interface{}, keys ResponseKeys)
Update 更新数据 auth 授权后的 *httpexpect.Expect url 请求地址 update 请求数据 keys 响应数据
Types ¶
type Param ¶
type Param struct { Name string Args map[string]interface{} ResponseKeys ResponseKeys }
type ResponseKey ¶
type ResponseKeys ¶
type ResponseKeys []ResponseKey
func (ResponseKeys) GetId ¶
func (rks ResponseKeys) GetId() uint
func (ResponseKeys) GetStringValue ¶
func (rks ResponseKeys) GetStringValue(key string) string
func (ResponseKeys) GetUintValue ¶
func (rks ResponseKeys) GetUintValue(key string) uint
func (ResponseKeys) Keys ¶
func (rks ResponseKeys) Keys() []string
func (ResponseKeys) Scan ¶
func (rks ResponseKeys) Scan(object *httpexpect.Object)
func (ResponseKeys) Test ¶
func (rks ResponseKeys) Test(object *httpexpect.Object)
Click to show internal directories.
Click to hide internal directories.