ht

package
v0.0.0-...-d4aef9d Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter() *myRouter

Types

type Answer

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

func Failure

func Failure(x interface{}) *Answer

func JSONDocument

func JSONDocument(x interface{}) *Answer

func NoContent

func NoContent() *Answer

func NotFound

func NotFound() *Answer

func Read

func Read(contentType string, reader io.Reader) *Answer

func RedirectTo

func RedirectTo(url string) *Answer

type DetailedResponseWriter

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

statusResponseWriter implements the http.ResponseWriter by wrapping another implementation, but in addition provides access to the status code and size of the response.

func NewDetailedResponseWriter

func NewDetailedResponseWriter(w http.ResponseWriter) *DetailedResponseWriter

func (*DetailedResponseWriter) Header

func (w *DetailedResponseWriter) Header() http.Header

func (*DetailedResponseWriter) Size

func (w *DetailedResponseWriter) Size() int

func (*DetailedResponseWriter) Status

func (w *DetailedResponseWriter) Status() int

func (*DetailedResponseWriter) Write

func (w *DetailedResponseWriter) Write(bytes []byte) (size int, err error)

func (*DetailedResponseWriter) WriteHeader

func (w *DetailedResponseWriter) WriteHeader(statusCode int)

type Handler

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

func NewHandler

func NewHandler(store *liftca.Store, f func(*liftca.Store, *Request) *Answer) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

type LoggingFileServer

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

func NewLoggingFileServer

func NewLoggingFileServer(root http.FileSystem) *LoggingFileServer

func (*LoggingFileServer) ServeHTTP

func (s *LoggingFileServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Request

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

func (*Request) BodyAsJSON

func (r *Request) BodyAsJSON(to interface{}) error

func (*Request) VarInt64

func (r *Request) VarInt64(key string) (int64, error)

type SimpleLogger

type SimpleLogger struct{}

func (*SimpleLogger) Log

Jump to

Keyboard shortcuts

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