Documentation ¶
Index ¶
- Constants
- type AFS
- func (afs *AFS) CloseAll()
- func (afs *AFS) LoadAssets(dir string) error
- func (afs *AFS) Open(path string) (types.AFSFile, error)
- func (afs *AFS) ReadFile(path string) ([]byte, error)
- func (afs *AFS) Use(key string) types.AFSFile
- func (afs *AFS) WithCachedFs() *AFS
- func (afs *AFS) WithMemFs() *AFS
- func (afs *AFS) WithStatic(static string) (*AFS, error)
- func (afs *AFS) Write(path string, data []byte, perm os.FileMode) error
Constants ¶
View Source
const ( // ReadAllWriteUser gives specified permissions ReadAllWriteUser os.FileMode = 0644 // ReadExecAllWriteUser gives specified permissions ReadExecAllWriteUser os.FileMode = 0755 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AFS ¶
type AFS struct {
// contains filtered or unexported fields
}
AFS abstracts over the filesystem providing read/write access to an in memory filesystem, or a cached os file system
func (*AFS) LoadAssets ¶
LoadAssets walks the given directory, opening and caching assets
func (*AFS) WithCachedFs ¶
WithCachedFs creates a cached os file system
func (*AFS) WithStatic ¶
WithStatic loads the given static assets into the server
Click to show internal directories.
Click to hide internal directories.