2024-01-05 13:58:13 +00:00
|
|
|
package metadata
|
|
|
|
|
2024-01-09 13:16:14 +00:00
|
|
|
var (
|
|
|
|
_ Metadata = (*MediaMetadata)(nil)
|
|
|
|
)
|
|
|
|
|
2024-01-05 13:58:13 +00:00
|
|
|
type MediaMetadata struct {
|
|
|
|
Name string
|
|
|
|
MediaTypes map[string][]MediaFormat
|
|
|
|
Parents []MetadataParentLink
|
|
|
|
Details MediaMetadataDetails
|
|
|
|
Links *MediaMetadataLinks
|
|
|
|
ExtraMetadata ExtraMetadata
|
2024-01-09 13:16:14 +00:00
|
|
|
BaseMetadata
|
2024-01-05 13:58:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func NewMediaMetadata(name string, details MediaMetadataDetails, parents []MetadataParentLink, mediaTypes map[string][]MediaFormat, links *MediaMetadataLinks, extraMetadata ExtraMetadata) *MediaMetadata {
|
|
|
|
return &MediaMetadata{
|
|
|
|
Name: name,
|
|
|
|
Details: details,
|
|
|
|
Parents: parents,
|
|
|
|
MediaTypes: mediaTypes,
|
|
|
|
Links: links,
|
|
|
|
ExtraMetadata: extraMetadata,
|
|
|
|
}
|
|
|
|
}
|
2024-01-09 13:16:42 +00:00
|
|
|
func NewEmptyMediaMetadata() *MediaMetadata {
|
|
|
|
return &MediaMetadata{}
|
|
|
|
}
|