appctx

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get added in v0.10.0

func Get[T any](ctx context.Context, key any) (T, error)

func MetadataAppend

func MetadataAppend(ctx context.Context, key string, values ...interface{}) error

func MetadataSet

func MetadataSet(ctx context.Context, key string, value interface{}) error

func Provide

func Provide[T any](ctx context.Context, key any, factory func() (T, error)) (T, error)

func WithContainer

func WithContainer(ctx context.Context) context.Context

Types

type ErrNoApplicationContainerFound

type ErrNoApplicationContainerFound struct{}

func (ErrNoApplicationContainerFound) Error

type ErrNoItemFound

type ErrNoItemFound struct {
	Key interface{}
}

func (ErrNoItemFound) Error

func (e ErrNoItemFound) Error() string

type Metadata

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

func NewMetadata

func NewMetadata() *Metadata

func ProvideMetadata

func ProvideMetadata(ctx context.Context) (*Metadata, error)

func (*Metadata) Append

func (m *Metadata) Append(key string, values ...interface{}) error

func (*Metadata) Get

func (m *Metadata) Get(key string) *mapx.MapXNode

func (*Metadata) Msi

func (m *Metadata) Msi() map[string]interface{}

func (*Metadata) Set

func (m *Metadata) Set(key string, value interface{})

Jump to

Keyboard shortcuts

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