metadata

package
v3.84.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneKey added in v3.66.0

func CloneKey(key string, from, to *Data)

func Get

func Get[T any](d *Data, key string) (T, bool, error)

func Set

func Set(d *Data, key string, value any) error

Set a piece of metadata to a value.

Set errors only if value fails to serialize.

Types

type Data

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

The underlying value of a metadata blob.

func Clone

func Clone(data *Data) *Data

func New

func New(data []byte) (*Data, error)

func (*Data) Marshal

func (d *Data) Marshal() []byte

func (*Data) MarshalIndent added in v3.66.0

func (d *Data) MarshalIndent() []byte

Jump to

Keyboard shortcuts

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