internal

package
v0.31.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 2 Imported by: 0

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