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: 0

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