tools

package
v0.0.0-...-5450b70 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: AGPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IP = tb.NewToolFunc("ip", "show ip address", func(w http.ResponseWriter, r *http.Request) {
		plainText(w)
		w.Write([]byte(tidyAddress(r.RemoteAddr) + "\n"))
	})

	Headers = tb.NewToolFunc("headers", "write request headers", func(w http.ResponseWriter, r *http.Request) {
		plainText(w)
		r.Header.Write(w)
	})
)

Functions

func All

func All() *tb.ToolBag

Types

type Figlet

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

func NewFiglet

func NewFiglet() *Figlet

func (*Figlet) AddArgs

func (f *Figlet) AddArgs(toolbag *tb.ToolBag)

func (*Figlet) Desc

func (f *Figlet) Desc() string

func (*Figlet) Init

func (f *Figlet) Init() error

func (*Figlet) Name

func (f *Figlet) Name() string

func (*Figlet) Path

func (f *Figlet) Path() string

func (*Figlet) ServeHTTP

func (f *Figlet) ServeHTTP(w http.ResponseWriter, r *http.Request)

serve

type NotFound

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

func NewNotFound

func NewNotFound() *NotFound

func (*NotFound) AddArgs

func (nf *NotFound) AddArgs(toolbag *tb.ToolBag)

func (*NotFound) Desc

func (nf *NotFound) Desc() string

func (*NotFound) Init

func (nf *NotFound) Init() error

func (*NotFound) Name

func (nf *NotFound) Name() string

func (*NotFound) Path

func (nf *NotFound) Path() string

be a catch-all

func (*NotFound) ServeHTTP

func (nf *NotFound) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Tools

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

func NewTools

func NewTools() *Tools

func (*Tools) AddArgs

func (t *Tools) AddArgs(toolbag *tb.ToolBag)

func (*Tools) Desc

func (t *Tools) Desc() string

func (*Tools) Init

func (t *Tools) Init() error

func (*Tools) Name

func (t *Tools) Name() string

func (*Tools) Path

func (t *Tools) Path() string

func (*Tools) ServeHTTP

func (t *Tools) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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