metadata

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetaArtwork = "artwork" // Metadata key for artwork, set the value as []byte
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

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

func New

func New(key string, value any) *Metadata

Create a new metadata object

func (*Metadata) Any

func (m *Metadata) Any() any

Returns the value as an interface

func (*Metadata) Bytes

func (m *Metadata) Bytes() []byte

Returns the value as a byte slice

func (*Metadata) Image

func (m *Metadata) Image() image.Image

Returns the value as an image

func (*Metadata) Key

func (m *Metadata) Key() string

func (*Metadata) MarshalJSON

func (m *Metadata) MarshalJSON() ([]byte, error)

func (*Metadata) String

func (m *Metadata) String() string

func (*Metadata) Value

func (m *Metadata) Value() string

Value returns the value as a string. If the value is a byte slice, it will return the mimetype of the byte slice.

Jump to

Keyboard shortcuts

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