httpRender

package
v0.0.0-...-c6ea6ab Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HeaderLastModified    = "Last-Modified"
	HeaderIfModifiedSince = "If-Modified-Since"
)

http headers

View Source
const (
	HeaderCacheControl = "Cache-Control"
)

http headers

View Source
const (
	HeaderContentType = "Content-Type"
)

http headers

Variables

View Source
var (
	ErrorUnexpectedWrittenStatus2 = errutil.NewFactory("expect written status is %v but got %v")
	ErrorUnexpectedStatusCode2    = errutil.NewFactory("expect status code is %v but got %v")
)

errors

View Source
var (
	ErrorUnsupportedCacheControlType1 = errutil.NewFactory("unsupported cache-control type: %v")
)

errors

Functions

This section is empty.

Types

type Option

type Option interface{}

Option for Render

type OptionErrorPathTrimPrefix

type OptionErrorPathTrimPrefix string

OptionErrorPathTrimPrefix prefix will be trim in error path

type OptionMaxBufferSize

type OptionMaxBufferSize int64

OptionMaxBufferSize max buffer size for render, default: 1 MB

type Render

Render contains all interfaces can be used for render http response

func New

func New(w http.ResponseWriter, req *http.Request, options ...Option) Render

New return render instance

Jump to

Keyboard shortcuts

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