media

package
v0.0.0-...-93660c8 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format uint

Format is a media format.

const (
	// FormatUnknown is an unknown media format.
	FormatUnknown Format = iota
	// FormatImage is a standard image media format, i.e. JPEG, PNG.
	FormatImage
	// FormatAnimatedImage is an animated image media format, i.e. GIF, APNG, WEBP.
	FormatAnimatedImage
)

type Media

type Media struct {
	// ID is the media ID.
	ID uuid.UUID `json:"id"`
	// Format is the media format.
	Format Format `json:"format"`
	// Path is the media path.
	Path string `json:"path"`
	// Meta is the media metadata, may be nil.
	Meta meta.Metadata `json:"meta"`
}

Media is a piece of media.

func (*Media) UnmarshalJSON

func (m *Media) UnmarshalJSON(bytes []byte) error

UnmarshalJSON reads data from a JSON representation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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