Documentation ¶
Overview ¶
Package assets provides functionality to load asset files that were packed into the binary during compilation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupported = fmt.Errorf("operation not supported for asset file")
Functions ¶
This section is empty.
Types ¶
type Environment ¶ added in v0.3.0
type Environment struct {
Assets http.FileSystem
}
Environment used to configure the behaviour of calls to the ssh library.
func (*Environment) Include ¶ added in v0.3.0
func (env *Environment) Include(options ...func(*Environment)) script.Option
Include the assets library in a script environment.
func (*Environment) Library ¶ added in v0.3.0
func (env *Environment) Library(options ...func(*Environment)) script.Library
Library prepares a new assets library for use within a script environment.
func (*Environment) OpenFile ¶ added in v0.3.0
func (env *Environment) OpenFile(path string) (file.Type, error)
OpenFile that was packed into the compiled binary. The resulting file does not support many operations such as Chown, Write, etc. but you may read it's contents or copy it to another file i.e. one opened by ssh or sys.
@callable: assets.openFile @param: path @String @retval: file @File @retval: err @Error
@usage: f, err = assets.openFile("/path/to/asset")