auth

package
v0.0.0-...-3d34236 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 5 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

Overview

Package auth provides helper methods for generating clients for the GitHub API.

This includes building authentication into the generated client (when applicable).

Note that we don't provide username/password authentication; It's both insecure and more complex to implement.

Index

Constants

View Source
const (
	// TokenHelp is a human-friendly string that can be used to describe token requirements in usage messages.
	TokenHelp = `` /* 190-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func TokenClient

func TokenClient(token string) *github.Client

TokenClient takes an oauth token and returns an authenticated github client. The client is guaranteed to work.

func UnauthenticatedClient

func UnauthenticatedClient() *github.Client

UnauthenticatedClient builds a github client that uses http.Client's default HTTP transport. The client will be insecure and extremely rate-limited; non-authenticated users are limited to 60 requests / hour.

Types

This section is empty.

Jump to

Keyboard shortcuts

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