Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileSystem ¶ added in v0.12.0
type FileSystem struct {
// contains filtered or unexported fields
}
FileSystem loads the website data from the file system.
func NewFileSystem ¶ added in v0.12.0
func NewFileSystem(dir string, updateSeconds int) *FileSystem
NewFileSystem creates a new Provider for the file system.
func (*FileSystem) LastUpdate ¶ added in v0.12.0
func (provider *FileSystem) LastUpdate() time.Time
LastUpdate implements the Provider interface.
func (*FileSystem) Update ¶ added in v0.12.0
func (provider *FileSystem) Update(update func())
Update implements the Provider interface.
func (*FileSystem) Watch ¶ added in v0.12.0
func (provider *FileSystem) Watch(ctx context.Context, update func())
Watch implements the Provider interface.
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
Git loads the website data from a Git repository.
func (*Git) LastUpdate ¶
LastUpdate implements the Provider interface.
type Provider ¶
type Provider interface {
// Watch regularly updates the website data.
Watch(context.Context, func())
// Update updates the website data once.
Update(func())
// LastUpdate returns the time the website data has last been updated.
LastUpdate() time.Time
}
Provider is the interface for a website data provider.
Click to show internal directories.
Click to hide internal directories.