Documentation ¶
Index ¶
- type FileStore
- func (f *FileStore) Add(theme *models.Theme) error
- func (f *FileStore) AddPackage(p *packages.Package) error
- func (f *FileStore) Get(themeName string) (store.Theme, error)
- func (f *FileStore) GetAsset(assetName string) (*models.ThemeAsset, error)
- func (f *FileStore) List() ([]*models.Theme, error)
- func (f *FileStore) UpdateThemeToRef(themeName, commitHash string) error
- type Theme
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore struct {
// contains filtered or unexported fields
}
FileStore stores and loads templates on the filesystem
func New ¶
func New(baseDir string, updateInterval time.Duration, logger func(args ...interface{})) (*FileStore, error)
New returns a new file store which updates periodically
func (*FileStore) AddPackage ¶ added in v0.2.0
AddPackage adds a theme from a theme file by cloning it from the VCS location to the themeDir.
func (*FileStore) Get ¶
Get a theme from the file store. Template and asset data (i.e. the file contents) are NOT loaded.
func (*FileStore) GetAsset ¶
func (f *FileStore) GetAsset(assetName string) (*models.ThemeAsset, error)
func (*FileStore) UpdateThemeToRef ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.