engine

package
v0.30.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NormReq added in v0.27.2

func NormReq(req *restfile.Request) *restfile.Request

func ReqID added in v0.27.2

func ReqID(req *restfile.Request) string

func ReqMethod added in v0.27.2

func ReqMethod(req *restfile.Request) string

func ReqTarget added in v0.27.2

func ReqTarget(req *restfile.Request) string

func ReqTitle added in v0.27.2

func ReqTitle(req *restfile.Request) string

func Tags added in v0.27.2

func Tags(xs []string) []string

Types

type AuthState

type AuthState struct {
	OAuth   []oauth.SnapshotEntry   `json:"oauth,omitempty"`
	Command []authcmd.SnapshotEntry `json:"command,omitempty"`
}

type CompareResult

type CompareResult struct {
	Baseline    string
	Environment string
	Summary     string
	Report      string
	Success     bool
	Skipped     bool
	Canceled    bool
	Rows        []CompareRow
}

type CompareRow

type CompareRow struct {
	Environment string
	Summary     string
	Response    *httpclient.Response
	GRPC        *grpcclient.Response
	Stream      *scripts.StreamInfo
	Transcript  []byte
	Err         error
	Tests       []scripts.TestResult
	ScriptErr   error
	Skipped     bool
	SkipReason  string
	Canceled    bool
	Success     bool
	Duration    time.Duration
}

type Config

type Config struct {
	FilePath              string
	Client                *httpclient.Client
	EnvironmentSet        vars.EnvironmentSet
	EnvironmentName       string
	EnvironmentFile       string
	AllowInteractiveOAuth bool
	HTTPOptions           httpclient.Options
	GRPCOptions           grpcclient.Options
	SSHManager            *ssh.Manager
	K8sManager            *k8s.Manager
	History               history.Store
	WorkspaceRoot         string
	Recursive             bool
	CompareTargets        []string
	CompareBase           string
	Registry              *registry.Index
	Bindings              *bindings.Map
}

type Executor

type Executor interface {
	ExecuteRequest(
		doc *restfile.Document,
		req *restfile.Request,
		envOverride string,
	) (RequestResult, error)
	ExecuteWorkflow(
		doc *restfile.Document,
		wf *restfile.Workflow,
		envOverride string,
	) (*WorkflowResult, error)
	ExecuteCompare(
		doc *restfile.Document,
		req *restfile.Request,
		spec *restfile.CompareSpec,
		envOverride string,
	) (*CompareResult, error)
	ExecuteProfile(
		doc *restfile.Document,
		req *restfile.Request,
		envOverride string,
	) (*ProfileResult, error)
	RuntimeState() RuntimeState
	LoadRuntimeState(RuntimeState)
	AuthState() AuthState
	LoadAuthState(AuthState)
	Close() error
}

type ProfileFailure

type ProfileFailure struct {
	Iteration  int
	Warmup     bool
	Reason     string
	Status     string
	StatusCode int
	Duration   time.Duration
}

type ProfileResult

type ProfileResult struct {
	Environment string
	Summary     string
	Report      string
	StartedAt   time.Time
	EndedAt     time.Time
	Duration    time.Duration
	Count       int
	Warmup      int
	Delay       time.Duration
	Success     bool
	Skipped     bool
	SkipReason  string
	Canceled    bool
	Results     *history.ProfileResults
	Failures    []ProfileFailure
}

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        *xplain.Report
	Timing         Timing
	Compare        *CompareResult
	Profile        *ProfileResult
	Workflow       *WorkflowResult
}

type RuntimeFile

type RuntimeFile struct {
	Env       string    `json:"env,omitempty"`
	Path      string    `json:"path,omitempty"`
	Name      string    `json:"name"`
	Value     string    `json:"value"`
	Secret    bool      `json:"secret,omitempty"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type RuntimeGlobal

type RuntimeGlobal struct {
	Env       string    `json:"env,omitempty"`
	Name      string    `json:"name"`
	Value     string    `json:"value"`
	Secret    bool      `json:"secret,omitempty"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type RuntimeState

type RuntimeState struct {
	Globals []RuntimeGlobal `json:"globals,omitempty"`
	Files   []RuntimeFile   `json:"files,omitempty"`
}

type Timing

type Timing struct {
	Start     time.Time
	End       time.Time
	Total     time.Duration
	Transport time.Duration
}

type WorkflowResult

type WorkflowResult struct {
	Kind        string
	Name        string
	Environment string
	Summary     string
	Report      string
	StartedAt   time.Time
	EndedAt     time.Time
	Duration    time.Duration
	Success     bool
	Skipped     bool
	Canceled    bool
	Steps       []WorkflowStep
}

type WorkflowStep

type WorkflowStep struct {
	Name       string
	Method     string
	Target     string
	Branch     string
	Iteration  int
	Total      int
	Summary    string
	Response   *httpclient.Response
	GRPC       *grpcclient.Response
	Stream     *scripts.StreamInfo
	Transcript []byte
	Err        error
	Tests      []scripts.TestResult
	ScriptErr  error
	Skipped    bool
	Canceled   bool
	Success    bool
	Duration   time.Duration
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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