commandline

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 13 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
	StdIn          *bytes.Buffer
	DefinitionName string
	DefinitionData string
	ResponseStatus int
	ResponseHeader map[string]string
	ResponseBody   string
	Identity       IdentityContext
}

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) WithConfig

func (b *ContextBuilder) WithConfig(config 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) WithResponseHeader

func (b *ContextBuilder) WithResponseHeader(header map[string]string) *ContextBuilder

func (*ContextBuilder) WithStdIn added in v1.0.2

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

type IdentityContext added in v1.0.2

type IdentityContext struct {
	ResponseStatus int
	ResponseBody   string
}

type Result

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

Jump to

Keyboard shortcuts

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