github

package
v3.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 15 Imported by: 0 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

Index

Constants

View Source
const NoopEmail = ""

Variables

View Source
var (
	ErrNoVerifiedPrimaryEmail = errors.New("goth: no verified primary email found")
	ErrFailedFetchUser        = errors.New("goth: no failed to fetch user")
	ErrNotAllowedOrg          = errors.New("goth: user not in allowed org")
	ErrNoName                 = errors.New("goth: user has no display name set")
	ErrAuthFailedParse        = errors.New("goth: failed to parse auth params, missing code or state")
)
View Source
var DefaultScopes = []string{"user:email", "read:user"}

DefaultScopes holds the default scopes used for GitHub.

Functions

func New

func New(clientKey, secret, callbackURL string, opts ...Opt) providers.Provider

New creates a new GitHub provider.

Types

type Opt

type Opt func(*githubProvider)

Opt is a function that configures the GitHub provider.

func WithAllowedOrgs

func WithAllowedOrgs(orgs ...string) Opt

WithAllowedOrgs sets the allowed organizations for the GitHub provider.

func WithEnterpriseURL

func WithEnterpriseURL(url string) Opt

WithEnterpriseURL sets the enterprise URL for the GitHub provider.

func WithScopes

func WithScopes(scopes ...string) Opt

WithScopes sets the scopes for the GitHub provider.

Jump to

Keyboard shortcuts

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