feat: initial web_app structs
This commit is contained in:
parent
a499dcf544
commit
1cf7fe283a
|
@ -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,
|
||||
}
|
||||
}
|
|
@ -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,
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue