web

package
v0.0.0-...-7f41272 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2017 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Console

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

func NewConsole

func NewConsole(logger *logrus.Entry, db db.DB, cache http.RoundTripper, ghoauthConf *oauth2.Config) (*Console, error)

NewConsole returns a new console instance.

func (*Console) ConditionCreate

func (c *Console) ConditionCreate(w http.ResponseWriter, r *http.Request)

ConsoleConditionCreate deletes a condition.

func (*Console) ConditionDelete

func (c *Console) ConditionDelete(w http.ResponseWriter, r *http.Request)

ConsoleConditionDelete deletes a condition.

func (*Console) Events

func (c *Console) Events(w http.ResponseWriter, r *http.Request)

ConsoleEvents is a handler to view events that have been filtered.

func (*Console) Filter

func (c *Console) Filter(w http.ResponseWriter, r *http.Request)

ConsoleFilter is a handler to view a single user's filter.

func (*Console) FilterUpdate

func (c *Console) FilterUpdate(w http.ResponseWriter, r *http.Request)

ConsoleFilterUpdate updates a filter.

func (*Console) Filters

func (c *Console) Filters(w http.ResponseWriter, r *http.Request)

ConsoleFilters is a handler to view user's filters.

func (*Console) FiltersUpdate

func (c *Console) FiltersUpdate(w http.ResponseWriter, r *http.Request)

ConsoleFiltersUpdate updates filter list.

func (*Console) Home

func (c *Console) Home(w http.ResponseWriter, r *http.Request)

ConsoleHome is the handler to view the console page.

func (*Console) Login

func (c *Console) Login(w http.ResponseWriter, r *http.Request)

Login is the handler to view the console page.

func (*Console) LoginCallback

func (c *Console) LoginCallback(w http.ResponseWriter, r *http.Request)

LoginCallback is the handler used by the login page during a callback after the user has logged into service.

func (*Console) Repos

func (c *Console) Repos(w http.ResponseWriter, r *http.Request)

Repos is a handler to view all user's repos

func (*Console) RequireLogin

func (c *Console) RequireLogin(next http.Handler) http.Handler

RequireLogin is middleware that loads a user's session and they are logged in, and with a valid account. If not, the user is redirected to /login. If an error occurs, a HTTP Internal Server Error is displayed.

Also adds db.User type to context.

type Public

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

func NewPublic

func NewPublic(logger *logrus.Entry) (*Public, error)

NewPublic returns a new web instance.

func (*Public) Home

func (p *Public) Home(w http.ResponseWriter, r *http.Request)

Home is the handler to view the console page.

Jump to

Keyboard shortcuts

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