web

package
v0.8.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToUser

func ToUser(c context.Context) (*model.User, bool)

ToUser returns a user from the context.

func WithUser

func WithUser(c context.Context, user *model.User) context.Context

WithUser returns a context with the current authenticated user.

Types

type Endpoint

type Endpoint interface {
	// Register registers the provider endpoints.
	Register(*httptreemux.ContextMux)
}

Endpoint provides the website endpoints.

func FromPath

func FromPath(path string) Endpoint

FromPath returns the default website endpoint served from a local path.

func New

func New() Endpoint

New returns the default website endpoint.

Jump to

Keyboard shortcuts

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