metax

package module
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 4 Imported by: 16

README

Metax

GoDoc Widget Build Status codecov Go Report Card

Storing meta in context

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWith added in v1.1.1

func ContextWith(ctx context.Context, key string, values ...string) context.Context

func ContextWithMeta

func ContextWithMeta(ctx context.Context, meta Meta) context.Context

Types

type Ctx added in v1.1.1

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

func CtxFromContext added in v1.2.1

func CtxFromContext(ctx context.Context) Ctx

func (Ctx) Context added in v1.1.1

func (c Ctx) Context() context.Context

func (Ctx) WithContext added in v1.1.2

func (c Ctx) WithContext(ctx context.Context) Ctx

type Meta

type Meta map[string][]string

func MetaFromContext

func MetaFromContext(ctx context.Context) Meta

func ParseMeta

func ParseMeta(query string) Meta

func (Meta) Add

func (m Meta) Add(key string, values ...string)

func (Meta) Clone

func (m Meta) Clone() Meta

func (Meta) Get

func (m Meta) Get(key string) string

func (Meta) Merge

func (m Meta) Merge(metas ...Meta) Meta

func (Meta) String

func (m Meta) String() string

func (Meta) With

func (m Meta) With(key string, values ...string) Meta

Jump to

Keyboard shortcuts

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