metadata

package
v0.0.0-...-7efc56f Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidMetadata    = errors.New("metadata: this metadata is invalid")
	ErrNotFoundMetadata   = errors.New("metadata: this metadata is not found")
	ErrInvalidContext     = errors.New("metadata: this context has wrong type")
	ErrNotRetrieveContext = errors.New("metadata: this context could not retrieve")
)
View Source
var GinContext key

GinContext - Context変換用のキー

Functions

func Get

func Get(ctx context.Context, key string) (string, error)

Get - メタデータの取得

func GinContextFromContext

func GinContextFromContext(ctx context.Context) (*gin.Context, error)

GinContextFromContext - context.Context -> gin.Context

func GinContextToContext

func GinContextToContext(ctx *gin.Context) context.Context

GinContextToContext - gin.Context -> context.Context

Types

type GrpcMetadata

type GrpcMetadata struct {
	Ctx context.Context
}

func (*GrpcMetadata) Get

func (m *GrpcMetadata) Get(key string) (string, error)

Get - メタデータの取得

func (*GrpcMetadata) Set

func (m *GrpcMetadata) Set(key string, value string)

Set - メタデータの代入

Jump to

Keyboard shortcuts

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