web

package
v0.0.0-...-813a201 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2015 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Routes = []routes.Route{
	routes.Route{
		Name:        "register_form",
		Methods:     []string{"GET"},
		Pattern:     "/register",
		HandlerFunc: registerForm,
		Middlewares: []negroni.Handler{
			new(parseFormMiddleware),
			new(guestMiddleware),
		},
	},
	routes.Route{
		Name:        "register",
		Methods:     []string{"POST"},
		Pattern:     "/register",
		HandlerFunc: register,
		Middlewares: []negroni.Handler{
			new(parseFormMiddleware),
			new(guestMiddleware),
		},
	},
	routes.Route{
		Name:        "login_form",
		Methods:     []string{"GET"},
		Pattern:     "/login",
		HandlerFunc: loginForm,
		Middlewares: []negroni.Handler{
			new(parseFormMiddleware),
			new(guestMiddleware),
		},
	},
	routes.Route{
		Name:        "login",
		Methods:     []string{"POST"},
		Pattern:     "/login",
		HandlerFunc: login,
		Middlewares: []negroni.Handler{
			new(parseFormMiddleware),
			new(guestMiddleware),
		},
	},
	routes.Route{
		Name:        "logout",
		Methods:     []string{"GET"},
		Pattern:     "/logout",
		HandlerFunc: logout,
		Middlewares: []negroni.Handler{
			new(parseFormMiddleware),
			new(loggedInMiddleware),
		},
	},
	routes.Route{
		Name:        "authorize_form",
		Methods:     []string{"GET"},
		Pattern:     "/authorize",
		HandlerFunc: authorizeForm,
		Middlewares: []negroni.Handler{
			new(parseFormMiddleware),
			new(loggedInMiddleware),
			new(clientMiddleware),
		},
	},
	routes.Route{
		Name:        "authorize",
		Methods:     []string{"POST"},
		Pattern:     "/authorize",
		HandlerFunc: authorize,
		Middlewares: []negroni.Handler{
			new(parseFormMiddleware),
			new(loggedInMiddleware),
			new(clientMiddleware),
		},
	},
}

Routes for web pages

Functions

This section is empty.

Types

type Service

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

Service struct keeps variables for reuse

func GetService

func GetService() *Service

GetService returns internal Service instance

func NewService

func NewService(cnf *config.Config, oauthService *oauth.Service) *Service

NewService starts a new Service instance

Jump to

Keyboard shortcuts

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