handlers

package
v0.0.0-...-8707c32 Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildHistory

func BuildHistory(client *ghint.Client, lang string) router.Handle

func GetToken

func GetToken(db *reform.DB, logger logrus.FieldLogger, username string) (token string, cert string)

func Home

func Home(db *reform.DB, log logrus.FieldLogger, k8sToken string) router.Handle

Home handles homepage request

func NotFound

func NotFound(log logrus.FieldLogger) router.Handle

Handle undefined routes

func Signout

func Signout() router.Handle

Types

type GitHubOAuth

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

GitHubOAuth is a handler set to use GitHubOAuth features

func NewGitHubOAuth

func NewGitHubOAuth(log logrus.FieldLogger, umClient *umClient.Client, state, ghClientID, ghClientSecret string) *GitHubOAuth

NewGitHubOAuth create new GitHubOAuth handler set: - state is a token to protect the user from CSRF attacks - clientID and clientSecret are the parameters from github.com/settings/developers

func (*GitHubOAuth) Callback

func (h *GitHubOAuth) Callback(c *router.Control)

Callback is a handler to process authorization callback from GitHub

func (*GitHubOAuth) Login

func (h *GitHubOAuth) Login(c *router.Control)

Login is a handler to redirect to GitHub authorization page

Jump to

Keyboard shortcuts

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