github

package
v1.2.14 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 14 Imported by: 2

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")
)
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) *githubProvider

New creates a new GitHub provider.

Types

type Opt added in v1.2.13

type Opt func(*githubProvider)

Opt is a function that configures the GitHub provider.

func WithAllowedOrgs added in v1.2.13

func WithAllowedOrgs(orgs ...string) Opt

WithAllowedOrgs sets the allowed organizations for the GitHub provider.

func WithEnterpriseURL added in v1.2.13

func WithEnterpriseURL(url string) Opt

WithEnterpriseURL sets the enterprise URL for the GitHub provider.

func WithScopes added in v1.2.13

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