global

package
v0.0.0-...-909b08d Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2013 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Overview

*

  • User: jackong
  • Date: 11/13/13
  • Time: 11:08 AM

*

  • User: jackong
  • Date: 11/15/13
  • Time: 4:41 PM

*

  • User: jackong
  • Date: 11/15/13
  • Time: 2:23 PM

*

  • User: jackong
  • Date: 11/5/13
  • Time: 4:50 PM

*

  • User: jackong
  • Date: 11/6/13
  • Time: 4:28 PM

*

  • User: jackong
  • Date: 11/14/13
  • Time: 2:03 PM

*

  • User: jackong
  • Date: 11/11/13
  • Time: 7:29 PM

Index

Constants

View Source
const (
	CODE_FAIL = -1
	CODE_OK   = (iota - 1)
	CODE_EXIST
	CODE_SIGN_IN_REQUIRED
)
View Source
const (
	FORMAT_DATE      = "2006-01-02"
	FORMAT_DATE_TIME = "2006-01-02 15:04:05"
)

Variables

View Source
var (
	GoPath  string
	Now     func() string
	Time    func() time.Time
	Today   func() string
	Project config.Config
	Access  *accessLog
	Log     log.Logger
	Conn    db.Database
	Router  *router
)

Functions

func Collection

func Collection(name string) db.Collection

func OnAfter

func OnAfter(after ...http.HandlerFunc)

func OnBefore

func OnBefore(before ...BeforeFunc)

func OnBeforeRoute

func OnBeforeRoute(handler http.Handler, before ...BeforeFunc) http.Handler

func OnBeforeRouteFunc

func OnBeforeRouteFunc(handlerFunc http.HandlerFunc, before ...BeforeFunc) http.HandlerFunc

func OnShutDown

func OnShutDown(shutdown func())

func ShutDown

func ShutDown()

Types

type BeforeFunc

type BeforeFunc func(http.ResponseWriter, *http.Request) error

Jump to

Keyboard shortcuts

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