endpoint

package
v0.0.0-...-3b4d91b Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentHeader    = "Content-Type"
	ContentTypeJson  = "application/json"
	ContentTypePlain = "text/plain; charset=utf-8"
)

Variables

This section is empty.

Functions

func InitDocsEndpoint

func InitDocsEndpoint(r *mux.Router)

func InitPing

func InitPing(redisClient *redis.Client, r *mux.Router)

Types

type Endpoint

type Endpoint interface {
	Handler(res http.ResponseWriter, req *http.Request)
}

type Message

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

func NewMessage

func NewMessage(res http.ResponseWriter) Message

func (*Message) InternalServerError

func (m *Message) InternalServerError(msg string)

func (*Message) Plain

func (m *Message) Plain(msg string, code int)

func (*Message) SendJson

func (m *Message) SendJson(value interface{}, code int)

type Ping

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

Ping handles the ping endpoint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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