env

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseArgs

func ParseArgs(args *Args)

ParseArgs parses command line arguments into the args struct.

Types

type Args

type Args struct {
	Script   string
	Spec     string
	Host     string
	Ops      []string
	Use      ArgsUse
	Expect   ArgsExpect
	LogLevel int64
	LogStyle string
}

Args is a program arguments.

type ArgsExpect

type ArgsExpect struct {
	CT     string
	Status int64
}

ArgsExpect is what goes after the "expect" command line argument.

type ArgsUse

type ArgsUse struct {
	CT             string
	Security       string
	PathParameters ParameterMapPath
	Query          ParameterMultiMapQuery
	Headers        ParameterMultiMapHeaders
	Body           ParameterMapBody
}

ArgsUse is what goes after the "use" command line argument.

type ParameterMap

type ParameterMap map[string]string

ParameterMap is a generic map of operation test parameters. & query parameters. It is must be subclassed/aliased/whatever-this-is-called-in-go in order to override the Iterate() and provide a source name.

func (ParameterMap) DoIterate

func (m ParameterMap) DoIterate(name string) contract.ParameterIterator

DoIterate creates an iterable channel to read parameters. The name argument is used for the Parameter.Source value.

type ParameterMapBody

type ParameterMapBody ParameterMap

ParameterMapBody is a map of parameters used in request bodies.

func (ParameterMapBody) Iterate

Iterate creates an iterable channel to read parameters.

type ParameterMapPath

type ParameterMapPath ParameterMap

ParameterMapPath is a map of parameters used in paths.

func (ParameterMapPath) Iterate

Iterate creates an iterable channel to read parameters.

type ParameterMultiMap

type ParameterMultiMap map[string][]string

ParameterMultiMap is a map of operation test parameters where each key can have multiple values. Used for HTTP headers & query parameters. It is must be subclassed/aliased/whatever-this-is-called-in-go in order to override the Iterate() and provide a source name.

func (ParameterMultiMap) DoIterate

DoIterate creates an iterable channel to read parameters. The name argument is used for the Parameter.Source value.

type ParameterMultiMapHeaders

type ParameterMultiMapHeaders ParameterMultiMap

ParameterMultiMapHeaders is a map of parameters used in headers.

func (ParameterMultiMapHeaders) Iterate

Iterate creates an iterable channel to read parameters.

type ParameterMultiMapQuery

type ParameterMultiMapQuery ParameterMultiMap

ParameterMultiMapQuery is a map of parameters used in query.

func (ParameterMultiMapQuery) Iterate

Iterate creates an iterable channel to read parameters.

Jump to

Keyboard shortcuts

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