routes

package
v0.0.0-...-9c5e671 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpSession

func DumpSession(w http.ResponseWriter, r *http.Request)

DumpSession dumps SessionData

func GitHubAppInstall

func GitHubAppInstall(w http.ResponseWriter, r *http.Request)

GitHubAppInstall redirects to GitHub for app installation on repos

func GitHubAppPostInstall

func GitHubAppPostInstall(w http.ResponseWriter, r *http.Request)

GitHubAppPostInstall handles post GitHub App installation, should get install_id

func GitHubAppWebhook

func GitHubAppWebhook(w http.ResponseWriter, r *http.Request)

GitHubAppWebhook handles webhook events from GitHub

func GitHubAuth

func GitHubAuth(w http.ResponseWriter, r *http.Request)

GitHubAuth is start of OAuth webflow

func GitHubAuthCallback

func GitHubAuthCallback(w http.ResponseWriter, r *http.Request)

GitHubAuthCallback exchanges code for token

func GraphQL

func GraphQL(w http.ResponseWriter, r *http.Request)

GraphQL maps /graphql

func Index

func Index(w http.ResponseWriter, r *http.Request)

Index is for /

Types

type GitHubAppInstallationEvent

type GitHubAppInstallationEvent struct {
	Installation struct {
		ID *int64 `json:"id"`
	} `json:"installation"`
	Action       *string              `json:"action"`
	Repositories []*github.Repository `json:"repositories"`
	Sender       *github.User         `json:"sender"`
}

GitHubAppInstallationEvent is payload for installation webhook event

type SessionData

type SessionData struct {
	Title string `json:"-"`

	User     *github.User `json:"user"`
	UserJSON *string      `json:"-"`

	Repos        []*github.Repository `json:"repos"`
	ReposJSON    *string              `json:"-"`
	PublicRepos  int                  `json:"-"`
	PrivateRepos int                  `json:"-"`

	AccessToken string            `json:"access_token"`
	StateMap    map[string]string `json:"state_map"`
	Scope       string            `json:"scope"`

	InstallID          *int64               `json:"install_id"`
	InstalledRepos     []*github.Repository `json:"installed_repos"`
	InstalledReposJSON *string              `json:"-"`
}

SessionData to transform index template

Jump to

Keyboard shortcuts

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