template

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NotFoundText = "404 not found {{.Scheme}}://{{.Host}}{{.RequestURI}}"

	NotFoundHandler = http.HandlerFunc(NotFound)
)

Functions

func NotFound added in v0.6.4

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

Types

type Format

type Format interface {
	Format(w io.Writer, r *http.Request) error
	FormatString(r *http.Request) string
}

func NewFormat

func NewFormat(text string) (Format, error)

type RequestVal

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

func (*RequestVal) ContentLength

func (t *RequestVal) ContentLength() int64

func (*RequestVal) Cookie

func (t *RequestVal) Cookie(key string) string

func (*RequestVal) Form

func (t *RequestVal) Form(key string) string

func (*RequestVal) Header

func (t *RequestVal) Header(key string) string

func (*RequestVal) Host

func (t *RequestVal) Host() string

func (*RequestVal) Hostname

func (t *RequestVal) Hostname() string

func (*RequestVal) IsQuery

func (t *RequestVal) IsQuery() string

func (*RequestVal) Method

func (t *RequestVal) Method() string

func (*RequestVal) Password

func (t *RequestVal) Password() string

func (*RequestVal) Path

func (t *RequestVal) Path() string

func (*RequestVal) Port

func (t *RequestVal) Port() string

func (*RequestVal) PostForm

func (t *RequestVal) PostForm(key string) string

func (*RequestVal) Proto

func (t *RequestVal) Proto() string

func (*RequestVal) ProtoMajor

func (t *RequestVal) ProtoMajor() int

func (*RequestVal) ProtoMinor

func (t *RequestVal) ProtoMinor() int

func (*RequestVal) Query

func (t *RequestVal) Query(key string) string

func (*RequestVal) RawPath

func (t *RequestVal) RawPath() string

func (*RequestVal) RawQuery

func (t *RequestVal) RawQuery() string

func (*RequestVal) RemoteAddr

func (t *RequestVal) RemoteAddr() string

func (*RequestVal) RequestURI

func (t *RequestVal) RequestURI() string

func (*RequestVal) Scheme

func (t *RequestVal) Scheme() string

func (*RequestVal) UserAgent

func (t *RequestVal) UserAgent() string

func (*RequestVal) Username

func (t *RequestVal) Username() string

type Template

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

func (*Template) Format

func (t *Template) Format(w io.Writer, r *http.Request) error

func (*Template) FormatString

func (t *Template) FormatString(r *http.Request) string

type Text

type Text string

func (Text) Format

func (t Text) Format(w io.Writer, r *http.Request) error

func (Text) FormatString

func (t Text) FormatString(r *http.Request) string

Jump to

Keyboard shortcuts

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