Versions in this module Expand all Collapse all v0 v0.28.1 Jan 12, 2026 v0.28.0 Jan 12, 2026 Changes in this version + const DefaultFetchTimeout + const OAuthScopesHeader + var ScopeHierarchy = map[Scope][]Scope + func ExpandScopes(required ...Scope) []string + func FetchTokenScopes(ctx context.Context, token string) ([]string, error) + func FetchTokenScopesWithHost(ctx context.Context, token, apiHost string) ([]string, error) + func HasRequiredScopes(tokenScopes []string, acceptedScopes []string) bool + func ParseScopeHeader(header string) []string + func ToStringSlice(scopes ...Scope) []string + type Fetcher struct + func NewFetcher(opts FetcherOptions) *Fetcher + func (f *Fetcher) FetchTokenScopes(ctx context.Context, token string) ([]string, error) + type FetcherOptions struct + APIHost string + HTTPClient *http.Client + type Scope string + const AdminOrg + const Gist + const NoScope + const Notifications + const Project + const PublicRepo + const ReadOrg + const ReadPackages + const ReadProject + const ReadUser + const Repo + const SecurityEvents + const User + const UserEmail + const WriteOrg + const WritePackages + type ScopeSet map[Scope]bool + func NewScopeSet(scopes ...Scope) ScopeSet + func (s ScopeSet) ToSlice() []Scope + func (s ScopeSet) ToStringSlice() []string