auth

package
v0.0.0-...-d61de5b Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

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