Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilteredFS ¶
type FilteredFS struct {
// contains filtered or unexported fields
}
FilteredFS is a wrapper around a fs.FS that filters out files that are not allowed to be read. This is used to prevent the interpreter from reading files, using protocols that are not allowed to be used by the interpreter on the blockchain. The whitelist and blacklist are mutually exclusive. If both are set, the blacklist will be ignored.
func NewFilteredFS ¶
func NewFilteredFS(whitelist, blacklist []*url.URL, decorated fs.FS) *FilteredFS
NewFilteredFS returns a new FilteredFS object that will filter out files that are not allowed to be read according to the whitelist and blacklist parameters.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) RegisterHandler ¶
func (r *Router) RegisterHandler(handler URIHandler)
type URIHandler ¶
type VirtualFS ¶
type VirtualFS struct {
// contains filtered or unexported fields
}
VirtualFS is the custom virtual file system used into the blockchain. It will hold a list of handler that can resolve file URI and return the corresponding binary file.
func NewVirtualFS ¶
func NewVirtualFS(ctx goctx.Context, handlers []URIHandler) *VirtualFS
NewVirtualFS return a new VirtualFS object that will handle all virtual file on the interpreter. File can be provided from different sources like CosmWasm cw-storage smart contract.
func (*VirtualFS) Open ¶
Open opens the named file.
When Open returns an error, it should be of type *PathError with the Op field set to "open", the Path field set to name, and the Err field describing the problem.
Open should reject attempts to open names that do not satisfy ValidPath(name), returning a *PathError with Err set to ErrInvalid or ErrNotExist.
type VirtualFile ¶
type VirtualFile struct {
// contains filtered or unexported fields
}
func NewVirtualFile ¶
func (VirtualFile) Close ¶
func (o VirtualFile) Close() error
type VirtualFileInfo ¶
type VirtualFileInfo struct {
// contains filtered or unexported fields
}
func (VirtualFileInfo) IsDir ¶
func (i VirtualFileInfo) IsDir() bool
func (VirtualFileInfo) ModTime ¶
func (i VirtualFileInfo) ModTime() time.Time
func (VirtualFileInfo) Mode ¶
func (i VirtualFileInfo) Mode() fs.FileMode
func (VirtualFileInfo) Name ¶
func (i VirtualFileInfo) Name() string
func (VirtualFileInfo) Size ¶
func (i VirtualFileInfo) Size() int64
func (VirtualFileInfo) Sys ¶
func (i VirtualFileInfo) Sys() any
type WasmHandler ¶
type WasmHandler struct {
// contains filtered or unexported fields
}
func NewWasmHandler ¶
func NewWasmHandler(keeper types.WasmKeeper) WasmHandler
func (WasmHandler) Scheme ¶
func (w WasmHandler) Scheme() string