Documentation
¶
Overview ¶
Package cred provides gRPC / API credentials to authenticate to network services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultCredentialHelper ¶
func DefaultCredentialHelper() string
DefaultCredentialHelper returns default credential helper's path.
Types ¶
type Cred ¶
type Cred struct { // Type is credential type. e.g. "luci-auth", "gcloud", etc. Type string // Email is authenticated email. Email string // contains filtered or unexported fields }
Cred holds credentials and derived values.
func New ¶
New creates a Cred using LUCI auth's default options. It ensures that the user is logged in and returns an error otherwise.
func (Cred) ClientOptions ¶
func (c Cred) ClientOptions() []option.ClientOption
ClientOptions returns googleapi's client options to use the credential.
func (Cred) GRPCDialOptions ¶
func (c Cred) GRPCDialOptions() []grpc.DialOption
GRPCDialOptions returns grpc's dial options to use the credential.
Click to show internal directories.
Click to hide internal directories.