util

package
v0.0.0-...-74d770d Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2015 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatchAllFileServer

func CatchAllFileServer(
	root http.FileSystem,
	serveInstead string,
	logger log.Logger,
) http.Handler

func ShowNewLines

func ShowNewLines(i string) string

func TrimRightSpace

func TrimRightSpace(i string) string

func WriteJSONResponse

func WriteJSONResponse(w http.ResponseWriter, v interface{})

Types

type Context

type Context struct {
	Bus    *EventBus.EventBus
	DB     *sqlx.DB
	Logger log.Logger
	Router *mux.Router

	Lists  *model.TodoListRepository
	Groups *model.TodoGroupRepository
	Items  *model.TodoItemRepository
}

func NewContext

func NewContext(r *mux.Router, db *sqlx.DB, l log.Logger) *Context

func (*Context) Log

func (ctx *Context) Log(pairs ...interface{})

Jump to

Keyboard shortcuts

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