checkpoints

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2020 License: MIT, MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllCheckpoints = []*CheckpointDefinition{
	{
		Name:        "客户端地址(IP)",
		Prefix:      "remoteAddr",
		Description: "试图通过分析X-Forwarded-For等Header获取的客户端地址,比如192.168.1.100",
		HasParams:   false,
		Instance:    new(RequestRemoteAddrCheckpoint),
	},
	{
		Name:        "客户端源地址(IP)",
		Prefix:      "rawRemoteAddr",
		Description: "直接连接的客户端地址,比如192.168.1.100",
		HasParams:   false,
		Instance:    new(RequestRawRemoteAddrCheckpoint),
	},
	{
		Name:        "客户端端口",
		Prefix:      "remotePort",
		Description: "直接连接的客户端地址端口",
		HasParams:   false,
		Instance:    new(RequestRemotePortCheckpoint),
	},
	{
		Name:        "客户端用户名",
		Prefix:      "remoteUser",
		Description: "通过BasicAuth登录的客户端用户名",
		HasParams:   false,
		Instance:    new(RequestRemoteUserCheckpoint),
	},
	{
		Name:        "请求URI",
		Prefix:      "requestURI",
		Description: "包含URL参数的请求URI,比如/hello/world?lang=go",
		HasParams:   false,
		Instance:    new(RequestURICheckpoint),
	},
	{
		Name:        "请求路径",
		Prefix:      "requestPath",
		Description: "不包含URL参数的请求路径,比如/hello/world",
		HasParams:   false,
		Instance:    new(RequestPathCheckpoint),
	},
	{
		Name:        "请求内容长度",
		Prefix:      "requestLength",
		Description: "请求Header中的Content-Length",
		HasParams:   false,
		Instance:    new(RequestLengthCheckpoint),
	},
	{
		Name:        "请求体内容",
		Prefix:      "requestBody",
		Description: "通常在POST或者PUT等操作时会附带请求体,最大限制32M",
		HasParams:   false,
		Instance:    new(RequestBodyCheckpoint),
	},
	{
		Name:        "请求URI和请求体组合",
		Prefix:      "requestAll",
		Description: "${requestURI}和${requestBody}组合",
		HasParams:   false,
		Instance:    new(RequestAllCheckpoint),
	},
	{
		Name:        "请求表单参数",
		Prefix:      "requestForm",
		Description: "获取POST或者其他方法发送的表单参数,最大请求体限制32M",
		HasParams:   true,
		Instance:    new(RequestFormArgCheckpoint),
	},
	{
		Name:        "上传文件",
		Prefix:      "requestUpload",
		Description: "获取POST上传的文件信息,最大请求体限制32M",
		HasParams:   true,
		Instance:    new(RequestUploadCheckpoint),
	},
	{
		Name:        "请求JSON参数",
		Prefix:      "requestJSON",
		Description: "获取POST或者其他方法发送的JSON,最大请求体限制32M,使用点(.)符号表示多级数据",
		HasParams:   true,
		Instance:    new(RequestJSONArgCheckpoint),
	},
	{
		Name:        "请求方法",
		Prefix:      "requestMethod",
		Description: "比如GET、POST",
		HasParams:   false,
		Instance:    new(RequestMethodCheckpoint),
	},
	{
		Name:        "请求协议",
		Prefix:      "scheme",
		Description: "比如http或https",
		HasParams:   false,
		Instance:    new(RequestSchemeCheckpoint),
	},
	{
		Name:        "HTTP协议版本",
		Prefix:      "proto",
		Description: "比如HTTP/1.1",
		HasParams:   false,
		Instance:    new(RequestProtoCheckpoint),
	},
	{
		Name:        "主机名",
		Prefix:      "host",
		Description: "比如teaos.cn",
		HasParams:   false,
		Instance:    new(RequestHostCheckpoint),
	},
	{
		Name:        "请求来源URL",
		Prefix:      "referer",
		Description: "请求Header中的Referer值",
		HasParams:   false,
		Instance:    new(RequestRefererCheckpoint),
	},
	{
		Name:        "客户端信息",
		Prefix:      "userAgent",
		Description: "比如Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103",
		HasParams:   false,
		Instance:    new(RequestUserAgentCheckpoint),
	},
	{
		Name:        "内容类型",
		Prefix:      "contentType",
		Description: "请求Header的Content-Type",
		HasParams:   false,
		Instance:    new(RequestContentTypeCheckpoint),
	},
	{
		Name:        "所有cookie组合字符串",
		Prefix:      "cookies",
		Description: "比如sid=IxZVPFhE&city=beijing&uid=18237",
		HasParams:   false,
		Instance:    new(RequestCookiesCheckpoint),
	},
	{
		Name:        "单个cookie值",
		Prefix:      "cookie",
		Description: "单个cookie值",
		HasParams:   true,
		Instance:    new(RequestCookieCheckpoint),
	},
	{
		Name:        "所有URL参数组合",
		Prefix:      "args",
		Description: "比如name=lu&age=20",
		HasParams:   false,
		Instance:    new(RequestArgsCheckpoint),
	},
	{
		Name:        "单个URL参数值",
		Prefix:      "arg",
		Description: "单个URL参数值",
		HasParams:   true,
		Instance:    new(RequestArgCheckpoint),
	},
	{
		Name:        "所有Header信息",
		Prefix:      "headers",
		Description: "使用\n隔开的Header信息字符串",
		HasParams:   false,
		Instance:    new(RequestHeadersCheckpoint),
	},
	{
		Name:        "单个Header值",
		Prefix:      "header",
		Description: "单个Header值",
		HasParams:   true,
		Instance:    new(RequestHeaderCheckpoint),
	},
	{
		Name:        "CC统计",
		Prefix:      "cc",
		Description: "统计某段时间段内的请求信息",
		HasParams:   true,
		Instance:    new(CCCheckpoint),
	},
	{
		Name:        "响应状态码",
		Prefix:      "status",
		Description: "响应状态码,比如200、404、500",
		HasParams:   false,
		Instance:    new(ResponseStatusCheckpoint),
	},
	{
		Name:        "响应Header",
		Prefix:      "responseHeader",
		Description: "响应Header值",
		HasParams:   true,
		Instance:    new(ResponseHeaderCheckpoint),
	},
	{
		Name:        "响应内容",
		Prefix:      "responseBody",
		Description: "响应内容字符串",
		HasParams:   false,
		Instance:    new(ResponseBodyCheckpoint),
	},
	{
		Name:        "响应内容长度",
		Prefix:      "bytesSent",
		Description: "响应内容长度,通过响应的Header Content-Length获取",
		HasParams:   false,
		Instance:    new(ResponseBytesSentCheckpoint),
	},
	{
		Name:        "TeaWeb版本",
		Prefix:      "teaVersion",
		Description: "比如" + teaconst.TeaVersion,
		HasParams:   false,
		Instance:    new(TeaVersionCheckpoint),
	},
}

all check points list

Functions

This section is empty.

Types

type CCCheckpoint

type CCCheckpoint struct {
	Checkpoint
	// contains filtered or unexported fields
}

${cc.arg} TODO implement more traffic rules

func (*CCCheckpoint) Init

func (this *CCCheckpoint) Init()

func (*CCCheckpoint) Options

func (this *CCCheckpoint) Options() []OptionInterface

func (*CCCheckpoint) ParamOptions

func (this *CCCheckpoint) ParamOptions() *ParamOptions

func (*CCCheckpoint) RequestValue

func (this *CCCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*CCCheckpoint) ResponseValue

func (this *CCCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*CCCheckpoint) Start

func (this *CCCheckpoint) Start()

func (*CCCheckpoint) Stop

func (this *CCCheckpoint) Stop()

type Checkpoint

type Checkpoint struct {
}

func (*Checkpoint) Init

func (this *Checkpoint) Init()

func (*Checkpoint) IsRequest

func (this *Checkpoint) IsRequest() bool

func (*Checkpoint) Options

func (this *Checkpoint) Options() []OptionInterface

func (*Checkpoint) ParamOptions

func (this *Checkpoint) ParamOptions() *ParamOptions

func (*Checkpoint) Start

func (this *Checkpoint) Start()

func (*Checkpoint) Stop

func (this *Checkpoint) Stop()

type CheckpointDefinition

type CheckpointDefinition struct {
	Name        string
	Description string
	Prefix      string
	HasParams   bool // has sub params
	Instance    CheckpointInterface
}

check point definition

func FindCheckpointDefinition

func FindCheckpointDefinition(prefix string) *CheckpointDefinition

find a check point definition

type CheckpointInterface

type CheckpointInterface interface {
	// initialize
	Init()

	// is request?
	IsRequest() bool

	// get request value
	RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

	// get response value
	ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

	// param option list
	ParamOptions() *ParamOptions

	// options
	Options() []OptionInterface

	// start
	Start()

	// stop
	Stop()
}

Check Point

func FindCheckpoint

func FindCheckpoint(prefix string) CheckpointInterface

find a check point

type FieldOption

type FieldOption struct {
	Name        string
	Code        string
	Value       string // default value
	IsRequired  bool
	Size        int
	Comment     string
	Placeholder string
	RightLabel  string
	MaxLength   int
	Validate    func(value string) (ok bool, message string)
}

attach option

func NewFieldOption

func NewFieldOption(name string, code string) *FieldOption

func (*FieldOption) Type

func (this *FieldOption) Type() string

type KeyValue

type KeyValue struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type OptionInterface

type OptionInterface interface {
	Type() string
}

type OptionsOption

type OptionsOption struct {
	Name       string
	Code       string
	Value      string // default value
	IsRequired bool
	Size       int
	Comment    string
	RightLabel string
	Validate   func(value string) (ok bool, message string)
	Options    []maps.Map
}

func NewOptionsOption

func NewOptionsOption(name string, code string) *OptionsOption

func (*OptionsOption) SetOptions

func (this *OptionsOption) SetOptions(options []maps.Map)

func (*OptionsOption) Type

func (this *OptionsOption) Type() string

type ParamOptions

type ParamOptions struct {
	Options []*KeyValue `json:"options"`
}

func NewParamOptions

func NewParamOptions() *ParamOptions

func (*ParamOptions) AddParam

func (this *ParamOptions) AddParam(name string, value string)

type RequestAllCheckpoint

type RequestAllCheckpoint struct {
	Checkpoint
}

${requestAll}

func (*RequestAllCheckpoint) RequestValue

func (this *RequestAllCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestAllCheckpoint) ResponseValue

func (this *RequestAllCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestArgCheckpoint

type RequestArgCheckpoint struct {
	Checkpoint
}

func (*RequestArgCheckpoint) RequestValue

func (this *RequestArgCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestArgCheckpoint) ResponseValue

func (this *RequestArgCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestArgsCheckpoint

type RequestArgsCheckpoint struct {
	Checkpoint
}

func (*RequestArgsCheckpoint) RequestValue

func (this *RequestArgsCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestArgsCheckpoint) ResponseValue

func (this *RequestArgsCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestBodyCheckpoint

type RequestBodyCheckpoint struct {
	Checkpoint
}

${requestBody}

func (*RequestBodyCheckpoint) RequestValue

func (this *RequestBodyCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestBodyCheckpoint) ResponseValue

func (this *RequestBodyCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestContentTypeCheckpoint

type RequestContentTypeCheckpoint struct {
	Checkpoint
}

func (*RequestContentTypeCheckpoint) RequestValue

func (this *RequestContentTypeCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestContentTypeCheckpoint) ResponseValue

func (this *RequestContentTypeCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestCookieCheckpoint

type RequestCookieCheckpoint struct {
	Checkpoint
}

func (*RequestCookieCheckpoint) RequestValue

func (this *RequestCookieCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestCookieCheckpoint) ResponseValue

func (this *RequestCookieCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestCookiesCheckpoint

type RequestCookiesCheckpoint struct {
	Checkpoint
}

func (*RequestCookiesCheckpoint) RequestValue

func (this *RequestCookiesCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestCookiesCheckpoint) ResponseValue

func (this *RequestCookiesCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestFormArgCheckpoint

type RequestFormArgCheckpoint struct {
	Checkpoint
}

${requestForm.arg}

func (*RequestFormArgCheckpoint) RequestValue

func (this *RequestFormArgCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestFormArgCheckpoint) ResponseValue

func (this *RequestFormArgCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestHeaderCheckpoint

type RequestHeaderCheckpoint struct {
	Checkpoint
}

func (*RequestHeaderCheckpoint) RequestValue

func (this *RequestHeaderCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestHeaderCheckpoint) ResponseValue

func (this *RequestHeaderCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestHeadersCheckpoint

type RequestHeadersCheckpoint struct {
	Checkpoint
}

func (*RequestHeadersCheckpoint) RequestValue

func (this *RequestHeadersCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestHeadersCheckpoint) ResponseValue

func (this *RequestHeadersCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestHostCheckpoint

type RequestHostCheckpoint struct {
	Checkpoint
}

func (*RequestHostCheckpoint) RequestValue

func (this *RequestHostCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestHostCheckpoint) ResponseValue

func (this *RequestHostCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestJSONArgCheckpoint

type RequestJSONArgCheckpoint struct {
	Checkpoint
}

${requestJSON.arg}

func (*RequestJSONArgCheckpoint) RequestValue

func (this *RequestJSONArgCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestJSONArgCheckpoint) ResponseValue

func (this *RequestJSONArgCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestLengthCheckpoint

type RequestLengthCheckpoint struct {
	Checkpoint
}

func (*RequestLengthCheckpoint) RequestValue

func (this *RequestLengthCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestLengthCheckpoint) ResponseValue

func (this *RequestLengthCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestMethodCheckpoint

type RequestMethodCheckpoint struct {
	Checkpoint
}

func (*RequestMethodCheckpoint) RequestValue

func (this *RequestMethodCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestMethodCheckpoint) ResponseValue

func (this *RequestMethodCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestPathCheckpoint

type RequestPathCheckpoint struct {
	Checkpoint
}

func (*RequestPathCheckpoint) RequestValue

func (this *RequestPathCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestPathCheckpoint) ResponseValue

func (this *RequestPathCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestProtoCheckpoint

type RequestProtoCheckpoint struct {
	Checkpoint
}

func (*RequestProtoCheckpoint) RequestValue

func (this *RequestProtoCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestProtoCheckpoint) ResponseValue

func (this *RequestProtoCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestRawRemoteAddrCheckpoint

type RequestRawRemoteAddrCheckpoint struct {
	Checkpoint
}

func (*RequestRawRemoteAddrCheckpoint) RequestValue

func (this *RequestRawRemoteAddrCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestRawRemoteAddrCheckpoint) ResponseValue

func (this *RequestRawRemoteAddrCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestRefererCheckpoint

type RequestRefererCheckpoint struct {
	Checkpoint
}

func (*RequestRefererCheckpoint) RequestValue

func (this *RequestRefererCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestRefererCheckpoint) ResponseValue

func (this *RequestRefererCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestRemoteAddrCheckpoint

type RequestRemoteAddrCheckpoint struct {
	Checkpoint
}

func (*RequestRemoteAddrCheckpoint) RequestValue

func (this *RequestRemoteAddrCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestRemoteAddrCheckpoint) ResponseValue

func (this *RequestRemoteAddrCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestRemotePortCheckpoint

type RequestRemotePortCheckpoint struct {
	Checkpoint
}

func (*RequestRemotePortCheckpoint) RequestValue

func (this *RequestRemotePortCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestRemotePortCheckpoint) ResponseValue

func (this *RequestRemotePortCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestRemoteUserCheckpoint

type RequestRemoteUserCheckpoint struct {
	Checkpoint
}

func (*RequestRemoteUserCheckpoint) RequestValue

func (this *RequestRemoteUserCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestRemoteUserCheckpoint) ResponseValue

func (this *RequestRemoteUserCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestSchemeCheckpoint

type RequestSchemeCheckpoint struct {
	Checkpoint
}

func (*RequestSchemeCheckpoint) RequestValue

func (this *RequestSchemeCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestSchemeCheckpoint) ResponseValue

func (this *RequestSchemeCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestURICheckpoint

type RequestURICheckpoint struct {
	Checkpoint
}

func (*RequestURICheckpoint) RequestValue

func (this *RequestURICheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestURICheckpoint) ResponseValue

func (this *RequestURICheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestUploadCheckpoint

type RequestUploadCheckpoint struct {
	Checkpoint
}

${requestUpload.arg}

func (*RequestUploadCheckpoint) ParamOptions

func (this *RequestUploadCheckpoint) ParamOptions() *ParamOptions

func (*RequestUploadCheckpoint) RequestValue

func (this *RequestUploadCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestUploadCheckpoint) ResponseValue

func (this *RequestUploadCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type RequestUserAgentCheckpoint

type RequestUserAgentCheckpoint struct {
	Checkpoint
}

func (*RequestUserAgentCheckpoint) RequestValue

func (this *RequestUserAgentCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*RequestUserAgentCheckpoint) ResponseValue

func (this *RequestUserAgentCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type ResponseBodyCheckpoint

type ResponseBodyCheckpoint struct {
	Checkpoint
}

${responseBody}

func (*ResponseBodyCheckpoint) IsRequest

func (this *ResponseBodyCheckpoint) IsRequest() bool

func (*ResponseBodyCheckpoint) RequestValue

func (this *ResponseBodyCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*ResponseBodyCheckpoint) ResponseValue

func (this *ResponseBodyCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type ResponseBytesSentCheckpoint

type ResponseBytesSentCheckpoint struct {
	Checkpoint
}

${bytesSent}

func (*ResponseBytesSentCheckpoint) IsRequest

func (this *ResponseBytesSentCheckpoint) IsRequest() bool

func (*ResponseBytesSentCheckpoint) RequestValue

func (this *ResponseBytesSentCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*ResponseBytesSentCheckpoint) ResponseValue

func (this *ResponseBytesSentCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type ResponseHeaderCheckpoint

type ResponseHeaderCheckpoint struct {
	Checkpoint
}

${responseHeader.arg}

func (*ResponseHeaderCheckpoint) IsRequest

func (this *ResponseHeaderCheckpoint) IsRequest() bool

func (*ResponseHeaderCheckpoint) RequestValue

func (this *ResponseHeaderCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*ResponseHeaderCheckpoint) ResponseValue

func (this *ResponseHeaderCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type ResponseStatusCheckpoint

type ResponseStatusCheckpoint struct {
	Checkpoint
}

${bytesSent}

func (*ResponseStatusCheckpoint) IsRequest

func (this *ResponseStatusCheckpoint) IsRequest() bool

func (*ResponseStatusCheckpoint) RequestValue

func (this *ResponseStatusCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*ResponseStatusCheckpoint) ResponseValue

func (this *ResponseStatusCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type SampleRequestCheckpoint

type SampleRequestCheckpoint struct {
	Checkpoint
}

just a sample checkpoint, copy and change it for your new checkpoint

func (*SampleRequestCheckpoint) RequestValue

func (this *SampleRequestCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*SampleRequestCheckpoint) ResponseValue

func (this *SampleRequestCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type SampleResponseCheckpoint

type SampleResponseCheckpoint struct {
	Checkpoint
}

just a sample checkpoint, copy and change it for your new checkpoint

func (*SampleResponseCheckpoint) IsRequest

func (this *SampleResponseCheckpoint) IsRequest() bool

func (*SampleResponseCheckpoint) RequestValue

func (this *SampleResponseCheckpoint) RequestValue(req *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*SampleResponseCheckpoint) ResponseValue

func (this *SampleResponseCheckpoint) ResponseValue(req *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

type TeaVersionCheckpoint

type TeaVersionCheckpoint struct {
	Checkpoint
}

func (*TeaVersionCheckpoint) RequestValue

func (this *TeaVersionCheckpoint) RequestValue(requests *requests.Request, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

func (*TeaVersionCheckpoint) ResponseValue

func (this *TeaVersionCheckpoint) ResponseValue(requests *requests.Request, resp *requests.Response, param string, options map[string]string) (value interface{}, sysErr error, userErr error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL