requestmeta

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2022 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRequestHeaders

func AddRequestHeaders(ctx context.Context, keys ...BoolRequestMetadataHeaderKey) context.Context

AddRequestHeaders returns a new context with the given values as request headers.

func SetRequestHeaders

func SetRequestHeaders(ctx context.Context, values map[RequestMetadataHeaderKey]string) context.Context

SetRequestHeaders returns a new context with the given values as request headers.

Types

type BoolRequestMetadataHeaderKey

type BoolRequestMetadataHeaderKey RequestMetadataHeaderKey

BoolRequestMetadataHeaderKey defines a key for a boolean vlaue in the request metadata header.

const (
	// RequestServerVersion, if specified in a request header, asks SpiceDB to return its
	// server version in the response header (if supported).
	// Value: `1`
	RequestServerVersion BoolRequestMetadataHeaderKey = "io.spicedb.requestversion"
)

type RequestMetadataHeaderKey

type RequestMetadataHeaderKey string

RequestMetadataHeaderKey defines a key in the request metadata header.

Jump to

Keyboard shortcuts

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