appctx

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Valuer

type Valuer[T any] struct {
	// contains filtered or unexported fields
}

func NewValuer

func NewValuer[T any](key string, defaultValue ...T) *Valuer[T]

func (*Valuer[T]) Get

func (gt *Valuer[T]) Get(ctx context.Context, defaultVal ...T) T

func (*Valuer[T]) OnDefault

func (v *Valuer[T]) OnDefault(fn func() T) *Valuer[T]

func (*Valuer[T]) Set

func (gt *Valuer[T]) Set(ctx context.Context, v T) context.Context

Jump to

Keyboard shortcuts

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