mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
27 lines
655 B
Go
27 lines
655 B
Go
package content
|
|
|
|
const (
|
|
STATUS_OK = 200
|
|
STATUS_FORBIDDEN = 403
|
|
STATUS_NOT_FOUND = 404
|
|
)
|
|
|
|
type SiteContent struct {
|
|
Status int `json:"status"`
|
|
URI string `json:"URI"`
|
|
Region string `json:"region"`
|
|
Language string `json:"language"`
|
|
Item *Item `json:"item"`
|
|
Data interface{} `json:"data"`
|
|
Path map[string]*Item `json:"path"`
|
|
URIs map[string]string `json:"URIs"`
|
|
Nodes map[string]*Node `json:"nodes"`
|
|
}
|
|
|
|
func NewSiteContent() *SiteContent {
|
|
c := new(SiteContent)
|
|
c.Nodes = make(map[string]*Node)
|
|
c.URIs = make(map[string]string)
|
|
return c
|
|
}
|