api

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package api implements functions for github aggregator rest api.

Index

Constants

View Source
const (
	// OAUTH2_HEADER key for Oauth token in request header.
	OAUTH2_HEADER = "Authorization"

	// OAUTH2_PREFIX prefix for Oauth token.
	OAUTH2_PREFIX = "Bearer "

	// AUTH_URL url to get token auth status.
	AUTH_URL = "https://api.github.com/user"

	// ACCESS_TOKEN key for access token value.
	ACCESS_TOKEN = "access_token"
)
View Source
const (
	// FILTER_PARAM pulls filter param.
	FILTER_PARAM = "filter"

	// ORGS_CHOICE_PARAM param for chosen orgs.
	ORGS_CHOICE_PARAM = "orgs_choice"

	// ALL filter type for pulls assigned or review requested to user.
	ALL = "all"

	// ASSIGNEE filter type for pulls assigned to user.
	ASSIGNEE = "assignee"

	// REVIEWER type for pulls review requested to user.
	REVIEWER = "reviewer"

	// OPEN type for open pulls.
	OPEN = "open"
)

Variables

This section is empty.

Functions

func Auth

func Auth(rw http.ResponseWriter, req *http.Request)

Auth authenticates user with provided Github API access token.

func Logout

func Logout(rw http.ResponseWriter, req *http.Request)

Logout logs out user from app.

func Orgs

func Orgs(rw http.ResponseWriter, req *http.Request)

Orgs returns response with current organizations info in json format.

func Profile

func Profile(rw http.ResponseWriter, req *http.Request)

Profile returns response with current profile info in json format.

func PullRequests added in v0.2.2

func PullRequests(rw http.ResponseWriter, req *http.Request)

PullRequests returns response with pull requests for chosen filter.

func Scopes

func Scopes(rw http.ResponseWriter, req *http.Request)

Scopes returns response with current scopes for provided token in json format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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