Documentation ¶
Index ¶
- Variables
- func FilePath(pth ...string) string
- type Asset
- type Assets
- func (assets *Assets) Digests() (map[string][sha256.Size]byte, error)
- func (assets *Assets) Get(name string) (asset Asset, ok bool)
- func (assets *Assets) GetC(ctx context.Context, name string) (asset Asset, ok bool)
- func (assets *Assets) MustGet(name string) (asset Asset)
- func (assets *Assets) MustGetC(ctx context.Context, name string) (asset Asset)
- func (assets *Assets) Names() []string
- func (assets *Assets) RestoreAsset(dir, name string) (err error)
- func (assets *Assets) RestoreDir(dir, name string) (err error)
- func (assets *Assets) Root() NodeDir
- type Dir
- func (t *Dir) Asset(name string) (a Asset)
- func (t *Dir) Child(name string) (n Node)
- func (ic *Dir) Depth() int
- func (t *Dir) Dir(name string) (d NodeDir)
- func (t *Dir) Each(cb func(name string, n Node) error) (err error)
- func (t *Dir) Get(name string) (n Node, err error)
- func (t *Dir) GetChild(name string) (n Node, ok bool)
- func (t *Dir) GetDir(pth string) (d NodeDir, err error)
- func (ic *Dir) Index() int
- func (t *Dir) Info() os.FileInfo
- func (ic *Dir) IsFirst() bool
- func (ic *Dir) IsLast() bool
- func (t *Dir) List() []Node
- func (t *Dir) Restore(baseDir string) (err error)
- func (t *Dir) Save(dest string) (err error)
- func (t *Dir) Walk(cb func(dir, name string, n Node, data interface{}) (interface{}, error)) (err error)
- func (t *Dir) WalkPrefix(prefix string, ...) (err error)
- type DirInfo
- type File
- func (f File) Data() ([]byte, error)
- func (f *File) DataS() (string, error)
- func (ic *File) Depth() int
- func (f *File) Digest() (d [sha256.Size]byte)
- func (f *File) ImportLocal(localPath, name string, info os.FileInfo) (err error)
- func (ic *File) Index() int
- func (ic *File) IsFirst() bool
- func (ic *File) IsLast() bool
- func (f *File) MustData() []byte
- func (f *File) MustDataS() string
- func (f *File) Reader() (iocommon.ReadSeekCloser, error)
- func (f *File) Restore(baseDir string) (err error)
- func (f *File) Save(dest string) (err error)
- type FileInfo
- func (fi *FileInfo) ChangeTime() time.Time
- func (fi FileInfo) IsDir() bool
- func (fi *FileInfo) Marshal(w io.Writer) (err error)
- func (fi *FileInfo) ModTime() time.Time
- func (fi *FileInfo) Mode() os.FileMode
- func (fi *FileInfo) Name() string
- func (fi *FileInfo) Path() string
- func (fi *FileInfo) Size() int64
- func (fi FileInfo) Sys() interface{}
- func (fi *FileInfo) Unmarshal(r io.Reader) (err error)
- type LocalFile
- type Node
- type NodeDir
Constants ¶
This section is empty.
Variables ¶
View Source
var BinaryDir = binary.BigEndian
Functions ¶
Types ¶
type Assets ¶
type Assets struct { Assets *map[string]Asset Factory func() (assets map[string]Asset, err error) local.LocalSourcesAttribute // contains filtered or unexported fields }
func (*Assets) RestoreAsset ¶
RestoreAsset restores an asset under the given directory.
func (*Assets) RestoreDir ¶
RestoreAssets restores an asset under the given directory recursively.
type Dir ¶
type Dir struct { *DirInfo // contains filtered or unexported fields }
type File ¶
type File struct { *FileInfo // contains filtered or unexported fields }
func (*File) ImportLocal ¶ added in v0.0.5
type FileInfo ¶
type FileInfo struct {
// contains filtered or unexported fields
}
func NewFileInfo ¶
func (*FileInfo) ChangeTime ¶
type LocalFile ¶ added in v0.0.5
type LocalFile struct { *assetfs.RealFileInfo // contains filtered or unexported fields }
type NodeDir ¶
type NodeDir interface { Node List() []Node Each(cb func(name string, n Node) error) error Get(name string) (n Node, err error) GetChild(name string) (n Node, ok bool) Child(name string) (n Node) Dir(name string) (n NodeDir) Asset(name string) (n Asset) Walk(cb func(dir, name string, n Node, data interface{}) (ret interface{}, err error)) (err error) WalkPrefix(prefix string, cb func(dir, name string, n Node, data interface{}) (ret interface{}, err error), data interface{}) (err error) GetDir(pth string) (d NodeDir, err error) }
Click to show internal directories.
Click to hide internal directories.