meta

package
v1.424.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 4 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAttribute

func WithAttribute(ctx context.Context, key string, value Value) context.Context

WithAttribute to meta.

Types

type Converter added in v1.160.0

type Converter func(string) string

Converter takes a string and creates a new string.

type Map added in v1.218.0

type Map map[string]string

Map for meta.

func CamelStrings added in v1.160.0

func CamelStrings(ctx context.Context, prefix string) Map

CamelStrings for meta.

func SnakeStrings added in v1.160.0

func SnakeStrings(ctx context.Context, prefix string) Map

SnakeStrings for meta.

func Strings added in v1.145.0

func Strings(ctx context.Context, prefix string) Map

Strings for meta.

type Storage added in v1.416.0

type Storage map[string]Value

Storage stores all the values for meta.

func (Storage) Add added in v1.417.0

func (s Storage) Add(key string, value Value) Storage

Add a value with key.

func (Storage) Get added in v1.417.0

func (s Storage) Get(key string) Value

Get a value by key.

func (Storage) Strings added in v1.417.0

func (s Storage) Strings(prefix string, converter Converter) Map

Strings will create a map that is converts the key.

type Value added in v1.145.0

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

Value for meta.

func Attribute

func Attribute(ctx context.Context, key string) Value

Attribute of meta.

func Blank added in v1.166.0

func Blank() Value

NewBlank for meta.

func Error added in v1.145.2

func Error(err error) Value

Error for meta.

func Ignored added in v1.206.0

func Ignored(value string) Value

NewIgnored for meta.

func Redacted added in v1.145.2

func Redacted(value string) Value

NewRedacted for meta.

func String added in v1.145.2

func String(value string) Value

NewString for meta.

func ToIgnored added in v1.206.0

func ToIgnored(st fmt.Stringer) Value

ToIgnored for meta.

func ToRedacted added in v1.168.0

func ToRedacted(st fmt.Stringer) Value

ToRedacted for meta.

func ToString added in v1.168.0

func ToString(st fmt.Stringer) Value

ToString for meta.

func (Value) String added in v1.145.0

func (v Value) String() string

String depending on kind.

func (Value) Value added in v1.416.0

func (v Value) Value() string

Value of meta.

Jump to

Keyboard shortcuts

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