Documentation ¶
Overview ¶
Copyright © 2021 Bold City Software
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
routine.go - this data structure represents a runnable set of instructions (a routine)
Copyright © 2021 Bold City Software ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
routineresult.go - this data structure represents a routine run result
Index ¶
- type ResultStats
- type Routine
- type RoutineResult
- type RoutineStep
- type RoutineStepResult
- func StepError(step *RoutineStep, err error) *RoutineStepResult
- func StepRequestResult(step *RoutineStep, requestResult *naprequest.RequestResult) *RoutineStepResult
- func StepScriptResult(step *RoutineStep, scriptResult *ScriptResult) *RoutineStepResult
- func StepSubroutineResult(step *RoutineStep, subroutineResult *RoutineResult) *RoutineStepResult
- type RunStats
- type ScriptResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResultStats ¶ added in v0.4.8
type Routine ¶
type Routine struct { Name string Env map[string]string Steps []*RoutineStep }
func LoadFromPath ¶
func LoadFromPath(path string, ctx *napcontext.Context) (*Routine, error)
func NewRoutine ¶
func NewRoutine(ctx *napcontext.Context, name string, runs ...string) *Routine
type RoutineResult ¶
type RoutineResult struct { Routine *Routine StepResults []*RoutineStepResult StartTime time.Time EndTime time.Time Errors []error }
func (*RoutineResult) GetElapsedMs ¶
func (r *RoutineResult) GetElapsedMs() int64
func (*RoutineResult) GetRunStats ¶ added in v0.4.8
func (result *RoutineResult) GetRunStats(parents ...*RoutineResult) *RunStats
func (*RoutineResult) IsPassing ¶
func (result *RoutineResult) IsPassing() bool
func (*RoutineResult) Print ¶
func (result *RoutineResult) Print(prefix string, context *napcontext.Context)
type RoutineStep ¶
func NewStep ¶
func NewStep(run string, iterations interface{}) *RoutineStep
func (*RoutineStep) GetIterations ¶ added in v0.3.3
func (step *RoutineStep) GetIterations(ctx *napcontext.Context) ([]*napcontext.Context, error)
func (*RoutineStep) SetupContext ¶ added in v0.4.3
func (step *RoutineStep) SetupContext(ctx *napcontext.Context)
type RoutineStepResult ¶
type RoutineStepResult struct { Step *RoutineStep RequestResult *naprequest.RequestResult SubroutineResult *RoutineResult ScriptResult *ScriptResult Errors []error }
func StepError ¶
func StepError(step *RoutineStep, err error) *RoutineStepResult
func StepRequestResult ¶
func StepRequestResult(step *RoutineStep, requestResult *naprequest.RequestResult) *RoutineStepResult
func StepScriptResult ¶
func StepScriptResult(step *RoutineStep, scriptResult *ScriptResult) *RoutineStepResult
func StepSubroutineResult ¶
func StepSubroutineResult(step *RoutineStep, subroutineResult *RoutineResult) *RoutineStepResult
type RunStats ¶ added in v0.4.8
type RunStats struct { StatsByType map[string]*ResultStats Totals ResultStats }
type ScriptResult ¶
type ScriptResult struct { ScriptOutput []string StartTime time.Time EndTime time.Time Error error }
func ScriptResultError ¶
func ScriptResultError(err error) *ScriptResult
func (*ScriptResult) GetElapsedMs ¶
func (r *ScriptResult) GetElapsedMs() int64