client

package
v0.34.4 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MIT Imports: 2 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 (
	Authorization string = "authorization"
	Basic         string = "basic"
	Bearer        string = "bearer"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIKeyAuth

type APIKeyAuth struct {
	// contains filtered or unexported fields
}

APIKeyAuth API key based authentication.

It implements the interface credentials.PerRPCCredentials.

func NewAPIKeyAuth

func NewAPIKeyAuth(key string) *APIKeyAuth

func (*APIKeyAuth) GetRequestMetadata

func (k *APIKeyAuth) GetRequestMetadata(_ context.Context, _ ...string) (map[string]string, error)

func (*APIKeyAuth) RequireTransportSecurity

func (k *APIKeyAuth) RequireTransportSecurity() bool

type TokenAuth

type TokenAuth struct {
	// contains filtered or unexported fields
}

TokenAuth bearer token based authentication.

It implements the interface credentials.PerRPCCredentials.

func NewTokenAuth

func NewTokenAuth(token string) *TokenAuth

func (TokenAuth) GetRequestMetadata

func (t TokenAuth) GetRequestMetadata(_ context.Context, _ ...string) (map[string]string, error)

func (TokenAuth) RequireTransportSecurity

func (TokenAuth) RequireTransportSecurity() bool

Jump to

Keyboard shortcuts

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