cmd

package
v0.0.0-...-091ba8a Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type Envs

type Envs = map[string]Vars

Envs is a mapping from environment name to its variables.

type Req

type Req struct {
	File    string
	Name    string
	Desc    string
	Method  string
	URL     string
	Headers []string
	Body    []string
}

Req is data ready from a request in an http requests file.

func (Req) Execute

func (r Req) Execute(env map[string]string) (*Res, error)

Execute executes the http request and returns a response.

func (Req) String

func (r Req) String() string

type Res

type Res struct {
	Req Req
	Res *http.Response
}

Res is data returned from executing a request.

type Vars

type Vars = map[string]string

Vars is a mapping from environment variable name to its value.

Jump to

Keyboard shortcuts

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