infra

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONRequest added in v1.3.9

type JSONRequest struct {
	freedom.Infra
}

JSONRequest .

func (*JSONRequest) BeginRequest added in v1.3.9

func (req *JSONRequest) BeginRequest(rt freedom.Runtime)

BeginRequest .

func (*JSONRequest) ReadBodyJSON added in v1.3.9

func (req *JSONRequest) ReadBodyJSON(obj interface{}) error

ReadBodyJSON .

func (*JSONRequest) ReadQueryJSON added in v1.3.9

func (req *JSONRequest) ReadQueryJSON(obj interface{}) error

ReadQueryJSON .

type JSONResponse added in v1.3.9

type JSONResponse struct {
	// Code automatically sets default 501 if the error is not empty
	Code int
	Err  error

	// If not nil then it will fire that as "application/json" or the
	// "ContentType" if not empty.
	Object interface{}

	// If Path is not empty then it will redirect
	// the client to this Path, if Code is >= 300 and < 400
	// then it will use that Code to do the redirection, otherwise
	// StatusFound(302) or StatusSeeOther(303) for post methods will be used.
	// Except when err != nil.
	Path string
	// contains filtered or unexported fields
}

func (JSONResponse) Dispatch added in v1.3.9

func (jrep JSONResponse) Dispatch(ctx context.Context)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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