commands

package
v0.0.0-...-5793855 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 7 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 {
	Debug          bool
	EnvVars        map[string]string
	EnvFile        string
	Path           string
	NameEquals     *string
	RegexPattern   *regexp.Regexp
	Args           []string
	RequestContext *rq.RequestContext
}

func (*Context) DoRequest

func (c *Context) DoRequest(writer Writer, req rq.Request) error

func (*Context) FilterRequests

func (ctx *Context) FilterRequests(requests []rq.Request) []rq.Request

type DirCmd

type DirCmd struct {
	Path        string `arg:"" name:"path" help:"Path to the directory." type:"string"`
	FilePattern string `name:"file-pattern" short:"P" help:"Only run requests with names that match the regex pattern" type:"string" default:".*"`
}

func (*DirCmd) Run

func (cmd *DirCmd) Run(ctx *Context) error

type FileCmd

type FileCmd struct {
	Path string `arg:"" name:"path" help:"Path to file." type:"string"`
}

func (*FileCmd) Run

func (cmd *FileCmd) Run(ctx *Context) error

type Writer

type Writer interface {
	io.StringWriter
	io.Writer
}

Jump to

Keyboard shortcuts

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