engine

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 19 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 CompareConfig added in v0.49.1

type CompareConfig struct {
	Targets []string
	Base    string
	Group   string
}

CompareConfig overrides a request's @compare directive for a whole run. Group is set only when Targets name profiles inside one environment group.

func (CompareConfig) Clone added in v0.49.1

func (c CompareConfig) Clone() CompareConfig

Clone copies the target list and trims the baseline and group names.

type CompareResult

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

type CompareRow

type CompareRow struct {
	Environment string
	Profile     string
	Selection   vars.Selection
	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
}

func (CompareRow) Name added in v0.49.1

func (r CompareRow) Name() string

Name is the label a compare row is matched by. Grouped compares use the profile, flat compares the environment.

type Config

type Config struct {
	FilePath              string
	Client                *httpclient.Client
	Catalog               vars.Catalog
	Selection             vars.Selection
	EnvironmentFile       string
	AllowInteractiveOAuth bool
	HTTPOptions           httpclient.Options
	GRPCOptions           grpcclient.Options
	SSHManager            *ssh.Manager
	K8sManager            *k8s.Manager
	History               history.Store
	WorkspaceRoot         string
	Recursive             bool
	Compare               CompareConfig
	Registry              *registry.Index
	Bindings              *bindings.Map
	SourceDiagnostics     bool
	MockInspector         mock.Inspector
}

type Executor

type Executor interface {
	ExecuteRequest(
		doc *restfile.Document,
		req *restfile.Request,
		sel vars.Selection,
	) (RequestResult, error)
	ExecuteWorkflow(
		doc *restfile.Document,
		wf *restfile.Workflow,
		sel vars.Selection,
	) (*WorkflowResult, error)
	ExecuteCompare(
		doc *restfile.Document,
		req *restfile.Request,
		spec *restfile.CompareSpec,
		sel vars.Selection,
	) (*CompareResult, error)
	ExecuteProfile(
		doc *restfile.Document,
		req *restfile.Request,
		sel vars.Selection,
	) (*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
	Err        error
	// Failure preserves classification while typed request errors are still available.
	Failure runfail.Failure
}

type ProfileResult

type ProfileResult struct {
	Environment string
	Selection   vars.Selection
	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
	Selection      vars.Selection
	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
	Selection   vars.Selection
	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
	Selection  vars.Selection
	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