Documentation
¶
Index ¶
- Constants
- Variables
- func GetTaskList(baseJson string) []*boomer.Task
- func Gson(ctx *boomer.RunContext, p string) string
- func GsonStringArr(ctx *boomer.RunContext, p string) []string
- func Join(arr []string, s string) string
- func JoinS(arr []string) string
- func MapValue(m interface{}, k string) interface{}
- func Sleep(n int) string
- func StoreBoolString(ctx *boomer.RunContext, key string) string
- func StoreBoolValue(ctx *boomer.RunContext, key string) bool
- func StoreIntValue(ctx *boomer.RunContext, key string) int
- func StoreValue(ctx *boomer.RunContext, key string) string
- type Component
- type FuncSet
- type RunScript
- type SMapComponent
- type StoreKV
- type StrComponent
- type Variable
- type Variables
Constants ¶
View Source
const (
NoValue = "<no value>"
)
Variables ¶
View Source
var TemplateFunc = map[string]interface{}{ "getRandomId": getRandomId, "getSid": getSid, "toFloat64": cast.ToFloat64, "toString": cast.ToString, "mapValue": MapValue, "storeValue": StoreValue, "sv": StoreValue, "StoreIntValue": StoreIntValue, "sint": StoreIntValue, "StoreBoolValue": StoreBoolValue, "sbool": StoreBoolValue, "StoreBoolString": StoreBoolString, "sbools": StoreBoolString, "gson": Gson, "gsonArray": GsonStringArr, "joins": JoinS, "join": Join, "sleep": Sleep, }
Functions ¶
func GetTaskList ¶
func GsonStringArr ¶ added in v1.0.5
func GsonStringArr(ctx *boomer.RunContext, p string) []string
func GsonResult(ctx *boomer.RunContext, p string) gjson.Result {
return gjson.Get(ctx.RspJSON, p)
}
func StoreBoolString ¶ added in v1.0.9
func StoreBoolString(ctx *boomer.RunContext, key string) string
StoreBoolString
func StoreBoolValue ¶ added in v1.0.9
func StoreBoolValue(ctx *boomer.RunContext, key string) bool
StoreBoolValue
func StoreIntValue ¶ added in v1.0.9
func StoreIntValue(ctx *boomer.RunContext, key string) int
StoreIntValue
func StoreValue ¶ added in v1.0.2
func StoreValue(ctx *boomer.RunContext, key string) string
StoreValue
Types ¶
type FuncSet ¶
type FuncSet struct {
Name string `json:"name"` //名称
Key string `json:"key"`
Debug bool `json:"debug"`
Method string `json:"method"`
Body string `json:"body"`
Url string `json:"url"`
Loop int `json:"loop"` //循环次数
Header map[string]string `json:"header"`
Probability int `json:"probability"`
Validator string `json:"validator"`
Condition string `json:"condition"` //运行条件
Store map[string]string `json:"store"` //保存的内容
Parsed struct {
Body StrComponent
Url StrComponent
Header SMapComponent
}
RScript *RunScript
}
type SMapComponent ¶
type StrComponent ¶
Click to show internal directories.
Click to hide internal directories.