Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiHttp ¶
type ApiHttp struct { Name string `yaml:"name"` Method string `yaml:"method"` URL string `yaml:"url"` Request Request `yaml:"request"` Response Response `yaml:"-"` BeforeScript []LineField[string] `yaml:"before"` IgnoreParentBefore bool `yaml:"ignore_parent_before"` AfterScript []LineField[string] `yaml:"after"` IgnoreParentAfter bool `yaml:"ignore_parent_after"` // 变量 Variables Variables `yaml:"variables"` Test test.TestManager `yaml:"-"` // contains filtered or unexported fields }
type ApiResult ¶
type ApiResult struct { Name string `yaml:"name,omitempty"` URL string `yaml:"url"` Method string `yaml:"method"` ID string `yaml:"id,omitempty"` Time time.Duration `yaml:"time"` StatusCode int `yaml:"status_code,omitempty"` Status string `yaml:"status,omitempty"` Request RequestResult `yaml:"request"` Response ResponseResult `yaml:"response"` Error string `yaml:"error,omitempty"` Tests test.TestManager `yaml:"tests,omitempty"` }
type LineField ¶
func (*LineField[T]) UnmarshalYAML ¶
解析yaml
type RequestResult ¶
type RequestResult struct { Header map[string]string `yaml:"header,omitempty"` Body string `yaml:"body,omitempty"` }
func (*RequestResult) Copy ¶
func (r *RequestResult) Copy(request http.Request)
func (*RequestResult) SetBody ¶
func (r *RequestResult) SetBody(v any)
type ResponseResult ¶
type ResponseResult struct { Header map[string]string `yaml:"header,omitempty"` Body string `yaml:"body,omitempty"` }
func (*ResponseResult) Copy ¶
func (r *ResponseResult) Copy(response http.Response)
func (*ResponseResult) SetBody ¶
func (r *ResponseResult) SetBody(v any)
Click to show internal directories.
Click to hide internal directories.