web

package
v0.8.0-rc.5 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2017 License: Apache-2.0 Imports: 17 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(p string) Endpoint

FromPath returns the website endpoint that serves the webpage form disk at path p.

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