Documentation ¶
Index ¶
- Variables
- type Assets
- type AssetsImpl
- func (ga *AssetsImpl) Asset(name string) []byte
- func (ga *AssetsImpl) Foldl(value interface{}, process func(interface{}, string, []byte) interface{}) interface{}
- func (ga *AssetsImpl) FoldlNames(value interface{}, process func(interface{}, string) interface{}) interface{}
- func (ga *AssetsImpl) Init(pkg_import string)
- func (ga *AssetsImpl) ModTime(name string) time.Time
- func (ga *AssetsImpl) RegistAsset(name string, content []byte, modtime time.Time)
- type Barn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Asset return an asset from the Barn instance Asset = barn.Asset // ModTime return the modified time of an asset ModTime = barn.ModTime // Foldl loop all assets in Barn Foldl = barn.Foldl // FoldlNames loop all asset names in Barn FoldlNames = barn.FoldlNames // Grandet return the Grandet object of the asset package Grandet = barn.Grandet // Branches return the branch names of specific path Branches = barn.Branches )
View Source
var ModBeginningTime = time.Unix(0, 0)
ModBeginningTime is the very beginning of computer time
Functions ¶
This section is empty.
Types ¶
type Assets ¶
type Assets interface { // Asset get an asset by name, if doesn't exists, return nil Asset(name string) (content []byte) // ModTime return the last modified time of asset ModTime(name string) time.Time // Foldl fold all assets in this Assets with value Foldl( value interface{}, process func( value interface{}, name string, content []byte, ) (result interface{}), ) (result interface{}) // FoldlNames fold all asset names in this Assets FoldlNames( value interface{}, process func(value interface{}, name string) (result interface{}), ) (result interface{}) }
Assets is the interface for directly asset accessing, the return value may not be your original content.
type AssetsImpl ¶
type AssetsImpl struct {
// contains filtered or unexported fields
}
AssetsImpl provide the implementation of Assets
func (*AssetsImpl) Asset ¶
func (ga *AssetsImpl) Asset(name string) []byte
Asset implement Assets#Asset
func (*AssetsImpl) Foldl ¶
func (ga *AssetsImpl) Foldl( value interface{}, process func(interface{}, string, []byte) interface{}, ) interface{}
Foldl implement Assets#Foldl
func (*AssetsImpl) FoldlNames ¶
func (ga *AssetsImpl) FoldlNames( value interface{}, process func(interface{}, string) interface{}, ) interface{}
FoldlNames implement Assets#FoldlNames
func (*AssetsImpl) ModTime ¶
func (ga *AssetsImpl) ModTime(name string) time.Time
ModTime implement Assets#ModTime
func (*AssetsImpl) RegistAsset ¶
func (ga *AssetsImpl) RegistAsset( name string, content []byte, modtime time.Time, )
RegistAsset register an asset into grandet
Click to show internal directories.
Click to hide internal directories.