Documentation
¶
Index ¶
- Variables
- func AssertBundleSlice[T interface{ ... }](t *testing.T, bundle *Bundle, expected []T)
- func AssertBundleValue[T interface{ ... }](t *testing.T, bundle *Bundle, expected T)
- func DetectImageMIME(data []byte) string
- func Enumerate[T multiple](b *Bundle) []T
- func Get[T single](b *Bundle) T
- func GetExt[T any](e *Extensions) T
- type Bundle
- func (b *Bundle) AddRaw(key string, value []byte)
- func (b *Bundle) AllRaw() map[string][][]byte
- func (b *Bundle) Clear()
- func (b *Bundle) Clone() *Bundle
- func (b *Bundle) GetRaw(key string) ([][]byte, bool)
- func (b *Bundle) Merge(other *Bundle)
- func (b *Bundle) PushBack(value multiple)
- func (b *Bundle) PushFront(value multiple)
- func (b *Bundle) Set(value single)
- func (b *Bundle) SetIfEmpty(value single)
- func (b *Bundle) SetNonZero(value single)
- func (b *Bundle) SetNonZeroIfEmpty(value single)
- type Extensions
- type KeyAlbum
- type KeyArtist
- type KeyComment
- type KeyComposer
- type KeyCopyright
- type KeyDate
- type KeyDescription
- type KeyDiscNumber
- type KeyEncoder
- type KeyFilename
- type KeyGenre
- type KeyId
- type KeyLicense
- type KeyLyrics
- type KeyMimeType
- type KeySize
- type KeyTag
- type KeyThumbnail
- type KeyTitle
- type KeyTotalDiscs
- type KeyTotalTracks
- type KeyTrackNumber
- type KeyWebsite
- type PictureType
- type Thumbnail
- type TypeError
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("metadata: key not found")
Functions ¶
func AssertBundleSlice ¶
func AssertBundleSlice[T interface {
comparable
multiple
}](t *testing.T, bundle *Bundle, expected []T)
func AssertBundleValue ¶
func AssertBundleValue[T interface {
comparable
single
}](t *testing.T, bundle *Bundle, expected T)
func DetectImageMIME ¶
DetectImageMIME reports the MIME type of image data by decoding it, or "application/octet-stream" if no registered image decoder recognizes it.
func GetExt ¶
func GetExt[T any](e *Extensions) T
Types ¶
type Bundle ¶
type Bundle baseBundle
func (*Bundle) SetIfEmpty ¶
func (b *Bundle) SetIfEmpty(value single)
func (*Bundle) SetNonZero ¶
func (b *Bundle) SetNonZero(value single)
func (*Bundle) SetNonZeroIfEmpty ¶
func (b *Bundle) SetNonZeroIfEmpty(value single)
type Extensions ¶
type Extensions baseBundle
func (*Extensions) Clear ¶
func (e *Extensions) Clear()
func (*Extensions) Set ¶
func (e *Extensions) Set(value any)
func (*Extensions) SetIfEmpty ¶
func (e *Extensions) SetIfEmpty(value any)
func (*Extensions) SetNonZero ¶
func (e *Extensions) SetNonZero(value any)
func (*Extensions) SetNonZeroIfEmpty ¶
func (e *Extensions) SetNonZeroIfEmpty(value any)
type KeyComment ¶
type KeyComment string
type KeyComposer ¶
type KeyComposer string
type KeyCopyright ¶
type KeyCopyright string
type KeyDescription ¶
type KeyDescription string
type KeyDiscNumber ¶
type KeyDiscNumber int64
type KeyEncoder ¶
type KeyEncoder string
type KeyFilename ¶
type KeyFilename string
type KeyLicense ¶
type KeyLicense string
type KeyMimeType ¶
type KeyMimeType string
type KeyThumbnail ¶
type KeyThumbnail []Thumbnail
type KeyTotalDiscs ¶
type KeyTotalDiscs int64
type KeyTotalTracks ¶
type KeyTotalTracks int64
type KeyTrackNumber ¶
type KeyTrackNumber int64
type KeyWebsite ¶
type KeyWebsite string
type PictureType ¶
type PictureType uint8
const ( PictureTypeOther PictureType = 0x00 PictureTypeFileIcon PictureType = 0x01 PictureTypeFrontCover PictureType = 0x03 PictureTypeBackCover PictureType = 0x04 )
type Thumbnail ¶
type Thumbnail struct {
Data []byte
MIMEType string
PictureType PictureType
Description string
Width uint32
Height uint32
ColorDepth uint32
IndexedColors uint32
Extensions Extensions
}
func (*Thumbnail) FillImageProperties ¶
Click to show internal directories.
Click to hide internal directories.