feat: initial web_app structs

This commit is contained in:
Derrick Hammer 2024-01-05 09:02:26 -05:00
parent a499dcf544
commit 1cf7fe283a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 35 additions and 0 deletions

20
metadata/web_app.go Normal file
View File

@ -0,0 +1,20 @@
package metadata
type WebAppMetadata struct {
Metadata
Name string
TryFiles []string
ErrorPages map[int]string
ExtraMetadata ExtraMetadata
Paths map[string]WebAppMetadataFileReference
}
func NewWebAppMetadata(name string, tryFiles []string, extraMetadata ExtraMetadata, errorPages map[int]string, paths map[string]WebAppMetadataFileReference) *WebAppMetadata {
return &WebAppMetadata{
Name: name,
TryFiles: tryFiles,
ExtraMetadata: extraMetadata,
ErrorPages: errorPages,
Paths: paths,
}
}

View File

@ -0,0 +1,15 @@
package metadata
import "git.lumeweb.com/LumeWeb/libs5-go/encoding"
type WebAppMetadataFileReference struct {
ContentType *string
Cid *encoding.CID
}
func NewWebAppMetadataFileReference(cid *encoding.CID, contentType *string) *WebAppMetadataFileReference {
return &WebAppMetadataFileReference{
Cid: cid,
ContentType: contentType,
}
}