github

package
v0.0.0-...-a8e4d9d Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCommunication = errors.New(`{"errors":["github.communication"]}`)
	ErrBadStatus     = errors.New(`{"errors":["github.bad_status"]}`)
	ErrUnprocessable = errors.New(`{"errors":["github.unprocessable"]}`)
)
View Source
var (
	Accept = "application/vnd.github.v3+json"
)

Functions

func CreateDeployKey

func CreateDeployKey(username, repo, title, key, token string) ([]byte, error)

func Deauth

func Deauth(token, clientId, clientSecret string) error

func Emails

func Emails(token string) ([]byte, error)

func OrganizationsForAuthenticatedUser

func OrganizationsForAuthenticatedUser(token string) ([]byte, error)

func Ping

func Ping(token string) ([]byte, error)

func RepositoriesForOrg

func RepositoriesForOrg(org, token string) ([]byte, error)

func RepositoriesForUsername

func RepositoriesForUsername(username, token string) ([]byte, error)

func User

func User(token string) ([]byte, error)

Types

type GithubEmail

type GithubEmail struct {
	Email    string
	Primary  bool
	Verified bool
}

type GithubUser

type GithubUser struct {
	Name   string
	Login  string
	Emails []GithubEmail
}

func LoadGithubUser

func LoadGithubUser(token string) (*GithubUser, error)

Jump to

Keyboard shortcuts

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