test

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 17 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
	NextResponses    []ResponseData
	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) WithDefinitionVersion added in v1.0.76

func (b *ContextBuilder) WithDefinitionVersion(name string, version string, data string) *ContextBuilder

func (*ContextBuilder) WithIdentityResponse added in v1.0.2

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

func (*ContextBuilder) WithNextResponse added in v1.0.71

func (b *ContextBuilder) WithNextResponse(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
}

func RunCli added in v1.0.56

func RunCli(args []string, context Context) Result

Jump to

Keyboard shortcuts

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