utils

package
v0.0.0-...-50815b3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCredentials

func NewCredentials(token string) credentials.PerRPCCredentials

NewCredentials instantiates a new credentials container

func RequestID

func RequestID(r *http.Request) string

RequestID fetches request-id set by chi's RID middleware

func ToMap

func ToMap(args ...interface{}) (fields map[string]interface{})

ToMap parses given key-value pairs into a map

Types

type Credentials

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

Credentials holds per-rpc metadata for the gateway client

func (Credentials) GetRequestMetadata

func (c Credentials) GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)

GetRequestMetadata retrieves relevant metadata

func (Credentials) RequireTransportSecurity

func (c Credentials) RequireTransportSecurity() bool

RequireTransportSecurity indicates that transport security is required

Jump to

Keyboard shortcuts

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