test

package
v1.0.50 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Config           string
	ConfigFile       string
	StdIn            *bytes.Buffer
	Definitions      []commandline.DefinitionData
	Responses        map[string]ResponseData
	IdentityResponse ResponseData
	CommandPlugin    plugin.CommandPlugin
}

type ContextBuilder

type ContextBuilder struct {
	// contains filtered or unexported fields
}

func NewContextBuilder

func NewContextBuilder() *ContextBuilder

func (*ContextBuilder) Build

func (b *ContextBuilder) Build() Context

func (*ContextBuilder) WithCommandPlugin added in v1.0.3

func (b *ContextBuilder) WithCommandPlugin(commandPlugin plugin.CommandPlugin) *ContextBuilder

func (*ContextBuilder) WithConfig

func (b *ContextBuilder) WithConfig(config string) *ContextBuilder

func (*ContextBuilder) WithConfigFile added in v1.0.3

func (b *ContextBuilder) WithConfigFile(configFile string) *ContextBuilder

func (*ContextBuilder) WithDefinition

func (b *ContextBuilder) WithDefinition(name string, data string) *ContextBuilder

func (*ContextBuilder) WithIdentityResponse added in v1.0.2

func (b *ContextBuilder) WithIdentityResponse(statusCode int, body string) *ContextBuilder

func (*ContextBuilder) WithResponse

func (b *ContextBuilder) WithResponse(statusCode int, body string) *ContextBuilder

func (*ContextBuilder) WithStdIn added in v1.0.2

func (b *ContextBuilder) WithStdIn(input bytes.Buffer) *ContextBuilder

func (*ContextBuilder) WithUrlResponse added in v1.0.8

func (b *ContextBuilder) WithUrlResponse(url string, statusCode int, body string) *ContextBuilder

type ResponseData added in v1.0.8

type ResponseData struct {
	Status int
	Body   string
}

type Result

type Result struct {
	Error         error
	StdOut        string
	StdErr        string
	RequestUrl    string
	RequestHeader map[string]string
	RequestBody   string
}

Jump to

Keyboard shortcuts

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