responser

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON

type JSON struct {
	Data interface{}
}

JSON is a json-responser instance.

func (JSON) Respond

func (r JSON) Respond(w http.ResponseWriter) error

Respond json-data.

type Responser

type Responser interface {
	// Respond writes data with custom ContentType.
	Respond(http.ResponseWriter) error
}

Responser is a handler for http-response.

type String

type String struct {
	Data string
}

String is a string-responser instance.

func (String) Respond

func (r String) Respond(w http.ResponseWriter) error

Respond string-data.(text/html)

type XML

type XML struct {
	Data interface{}
}

XML is a xml-responser instance.

func (XML) Respond

func (r XML) Respond(w http.ResponseWriter) error

Respond xml-data.

Jump to

Keyboard shortcuts

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