meta

package
v1.248.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 4 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// NoneConverter for meta.
	NoneConverter = func(s string) string { return s }
)

Functions

func IsBlank added in v1.145.0

func IsBlank(actual Valuer) bool

IsBlank checks for an empty string.

func IsEqual added in v1.145.0

func IsEqual(actual Valuer, expected string) bool

IsEqual checks if actual is expected.

func ValueOrBlank added in v1.146.0

func ValueOrBlank(s Valuer) string

ValueOrBlank for meta.

func WithAttribute

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

WithAttribute to meta.

Types

type Converter added in v1.160.0

type Converter func(string) string

Converter for meta.

type Ignored added in v1.206.0

type Ignored string

Ignored for meta.

func ToIgnored added in v1.206.0

func ToIgnored(st fmt.Stringer) Ignored

ToIgnored for meta.

func (Ignored) String added in v1.206.0

func (v Ignored) String() string

String to satisfy fmt.Stringer.

func (Ignored) Value added in v1.206.0

func (v Ignored) Value() string

Value of the 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, converter Converter) Map

Strings for meta.

type Redacted added in v1.145.2

type Redacted string

Redacted for meta.

func ToRedacted added in v1.168.0

func ToRedacted(st fmt.Stringer) Redacted

ToRedacted for meta.

func (Redacted) String added in v1.145.2

func (v Redacted) String() string

String to satisfy fmt.Stringer.

func (Redacted) Value added in v1.146.0

func (v Redacted) Value() string

Value of the string.

type String added in v1.145.2

type String string

String for meta.

func ToString added in v1.168.0

func ToString(st fmt.Stringer) String

ToString for meta.

func (String) String added in v1.145.2

func (v String) String() string

String to satisfy fmt.Stringer.

func (String) Value added in v1.146.0

func (v String) Value() string

Value of the string.

type Valuer added in v1.146.0

type Valuer interface {
	Value() string

	fmt.Stringer
}

Valuer for meta.

func Attribute

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

Attribute of meta.

func Blank added in v1.166.0

func Blank() Valuer

Blank for meta.

func Error added in v1.145.2

func Error(err error) Valuer

Error for meta.

Jump to

Keyboard shortcuts

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