api

package
v0.0.0-...-fc364c1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenReq

type AccessTokenReq struct {
	ClientId     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
	Code         string `json:"code"`
}

type AccessTokenResp

type AccessTokenResp struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	Scope       string `json:"scope"`
}

type BasicAuth

type BasicAuth struct {
	Username string
	Password string
}

type Handler

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

func New

func New(
	OAuth *github.OAuth,
	tokenStore storage.AccessTokenStorage,
	stateStore *storage.StateStore,
	bot *telegram.Bot,
	basicAuth *BasicAuth,
	staticPath string) Handler

func (*Handler) GitHubRedirect

func (h *Handler) GitHubRedirect(w http.ResponseWriter, r *http.Request, _ httprouter.Params)

func (*Handler) Index

func (*Handler) RedirectToHttps

func (h *Handler) RedirectToHttps(w http.ResponseWriter, r *http.Request)

func (*Handler) Version

func (h *Handler) Version(w http.ResponseWriter, r *http.Request, p httprouter.Params)

Jump to

Keyboard shortcuts

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