fix: metadata structs need to inherit BaseMetadata

This commit is contained in:
Derrick Hammer 2024-01-09 08:16:14 -05:00
parent 661e2bb517
commit 2b3a5c98c2
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 10 additions and 2 deletions

View File

@ -1,13 +1,17 @@
package metadata package metadata
var (
_ Metadata = (*MediaMetadata)(nil)
)
type MediaMetadata struct { type MediaMetadata struct {
Metadata
Name string Name string
MediaTypes map[string][]MediaFormat MediaTypes map[string][]MediaFormat
Parents []MetadataParentLink Parents []MetadataParentLink
Details MediaMetadataDetails Details MediaMetadataDetails
Links *MediaMetadataLinks Links *MediaMetadataLinks
ExtraMetadata ExtraMetadata ExtraMetadata ExtraMetadata
BaseMetadata
} }
func NewMediaMetadata(name string, details MediaMetadataDetails, parents []MetadataParentLink, mediaTypes map[string][]MediaFormat, links *MediaMetadataLinks, extraMetadata ExtraMetadata) *MediaMetadata { func NewMediaMetadata(name string, details MediaMetadataDetails, parents []MetadataParentLink, mediaTypes map[string][]MediaFormat, links *MediaMetadataLinks, extraMetadata ExtraMetadata) *MediaMetadata {

View File

@ -1,7 +1,11 @@
package metadata package metadata
var (
_ Metadata = (*WebAppMetadata)(nil)
)
type WebAppMetadata struct { type WebAppMetadata struct {
Metadata BaseMetadata
Name string Name string
TryFiles []string TryFiles []string
ErrorPages map[int]string ErrorPages map[int]string