package
0.0.0-20230306131847-26f457599b8d
Repository: https://github.com/xiaoyawei/buf.git
Documentation: pkg.go.dev

# Functions

AsAuthError uses errors.As to unwrap any error and look for an *AuthError.
NewAuthorizationInterceptorProvider returns a new provider function which, when invoked, returns an interceptor which will set the auth token into the request header by the provided option.
NewNetrcTokenProvider returns a TokenProvider for a .netrc in a container.
NewSetCLIVersionInterceptor returns a new Connect Interceptor that sets the Buf CLI version into all request headers.
NewTokenProviderFromContainer creates a singleTokenProvider from the BUF_TOKEN environment variable.
NewTokenProviderFromString creates a singleTokenProvider by the token provided.

# Constants

AuthenticationHeader is the standard OAuth header used for authenticating a user.
AuthenticationTokenPrefix is the standard OAuth token prefix.
CliVersionHeaderName is the name of the header carrying the buf CLI version.
DefaultRemote is the default remote if none can be inferred from a module name.

# Structs

AuthError wraps the error returned in the auth provider to add additional context.

# Interfaces

TokenProvider finds the token for NewAuthorizationInterceptorProvider.