cli

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResponseComponents = []string{"status", "headers", "body"}

Functions

func Build

func Build(version string) (*cobra.Command, error)

Build the root command for http and set version.

Types

type ConfigHandler added in v0.13.0

type ConfigHandler struct {
	// contains filtered or unexported fields
}

type FailFunc

type FailFunc func(status int)

type Format added in v0.13.0

type Format string
const (
	TextFormat Format = "text"
	JSONFormat Format = "json"
)

type Formatter added in v0.13.0

type Formatter interface {
	FormatResponse(*http.Response) ([]byte, error)
	FormatHistory([]history.Entry) ([]byte, error)
}

func FormatterFromString added in v0.13.0

func FormatterFromString(format Format, comps string) (Formatter, error)

type NullFormatter added in v0.13.0

type NullFormatter struct{}

func (NullFormatter) FormatHistory added in v0.13.0

func (f NullFormatter) FormatHistory([]history.Entry) ([]byte, error)

func (NullFormatter) FormatResponse added in v0.13.0

func (f NullFormatter) FormatResponse(*http.Response) ([]byte, error)

type RequestHandler

type RequestHandler struct {
	// contains filtered or unexported fields
}

RequestHandler handles all commands.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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