Documentation
¶
Index ¶
Constants ¶
View Source
const (
StageCaptures = "captures"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssertInput ¶
type CaptureInput ¶
type HTTPHooks ¶
type HTTPHooks struct {
AttachSSEHandle func(*httpclient.StreamHandle, *restfile.Request)
AttachWebSocketHandle func(*httpclient.WebSocketHandle, *restfile.Request)
ApplyCaptures func(CaptureInput) error
CollectVariables func(*restfile.Document, *restfile.Request, string) map[string]string
CollectGlobalValues func(*restfile.Document, string) map[string]scripts.GlobalValue
RunAsserts func(AssertInput) ([]scripts.TestResult, error)
ApplyRuntimeGlobals func(map[string]scripts.GlobalValue)
}
type HTTPInput ¶
type HTTPInput struct {
Client *httpclient.Client
Scripts *scripts.Runner
Context context.Context
Doc *restfile.Document
Req *restfile.Request
Resolver *vars.Resolver
Options httpclient.Options
EnvName string
EffectiveTimeout time.Duration
ScriptVars map[string]string
ExtraVals map[string]rts.Value
}
type HTTPResult ¶
type HTTPResult struct {
Response *httpclient.Response
Stream *scripts.StreamInfo
Tests []scripts.TestResult
ScriptErr error
Err error
Decision string
ErrStage string
}
type RequestFlow ¶
type RequestFlow interface {
PendingCancel() *RequestResult
Finish()
EvaluateCondition() *RequestResult
RunPreRequest() *RequestResult
PrepareRequest() *RequestResult
PreviewResult() RequestResult
UseGRPC() bool
IsInteractiveWebSocket() bool
ExecuteInteractiveWebSocket() RequestResult
ExecuteGRPC() RequestResult
ExecuteHTTP() RequestResult
}
type RequestResult ¶
type RequestResult struct {
Response *httpclient.Response
GRPC *grpcclient.Response
Stream *scripts.StreamInfo
Transcript []byte
Err error
Tests []scripts.TestResult
ScriptErr error
Executed *restfile.Request
RequestText string
RuntimeSecrets []string
Environment string
Skipped bool
SkipReason string
Preview bool
Explain *explain.Report
Timing engine.Timing
}
func RunRequest ¶
func RunRequest(flow RequestFlow) RequestResult
Click to show internal directories.
Click to hide internal directories.