Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Content ¶
type Content struct {
Path string `db:"path" yaml:"-"`
Title string `db:"title"`
Body string `db:"body" yaml:"-"`
Date time.Time `db:"date" yaml:"date"`
PublishDate time.Time `db:"publishdate" yaml:"publishdate,omitempty"`
ExpiryDate *time.Time `db:"expirydate" yaml:"expirydate,omitempty"`
LastMod time.Time `db:"lastmod" yaml:"lastmod,omitempty"`
Author string `db:"author" yaml:"author,omitempty"`
Tags []string `db:"tags" yaml:",omitempty"`
Resources []*Resource `yaml:"resources,omitempty"`
Draft bool `db:"draft" yaml:"draft,omitempty"`
}
Content represents a content from database
func ReadAllContents ¶
ReadAllContents loads all contents from database
type Resource ¶
type Resource struct {
Src string `db:"src" yaml:"src"`
Parent string `db:"parent" yaml:"-"`
Title *string `db:"title" yaml:"title,omitempty"`
Params map[string]string `db:"params" yaml:"params,omitempty"`
Bs []byte `db:"bs" yaml:"-"`
Length uint64 `db:"length" yaml:"-"`
LastMod time.Time `db:"lastmod" yaml:"-"`
}
Resource represents a file attached to a Content
func ReadAllResources ¶
ReadAllResources loads all resources from database
Click to show internal directories.
Click to hide internal directories.