context

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectKeyNotPresent      = errors.New("project key not present in the context")
	ErrSubscriptionKeyNotPresent = errors.New("subscription key not present in the context")
	ErrTopicKeyNotPresent        = errors.New("topic key not present in the context")
)

Functions

func GetProjectKey

func GetProjectKey(ctx context.Context) (string, error)

GetProjectKey gets the project key from the context.

func GetSubscriptionKey

func GetSubscriptionKey(ctx context.Context) (string, error)

GetSubscriptionKey gets the subscription key from the context.

func GetTopicKey

func GetTopicKey(ctx context.Context) (string, error)

GetTopicKey gets the topic key from the context.

func WithProjectKey

func WithProjectKey(ctx context.Context, key string) context.Context

WithProjectKey sets a project key in the context.

func WithSubscriptionKey

func WithSubscriptionKey(ctx context.Context, key string) context.Context

WithSubscriptionKey sets a subscription key in the context.

func WithTopicKey

func WithTopicKey(ctx context.Context, key string) context.Context

WithTopicKey sets a topic key in the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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