generated from okp4/template-oss
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(logic): create custom file system handler
- Loading branch information
Showing
6 changed files
with
44 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package fs | ||
|
||
import ( | ||
"fmt" | ||
"io/fs" | ||
|
||
"github.com/okp4/okp4d/x/logic/types" | ||
) | ||
|
||
type FileSystem struct { | ||
wasmKeeper types.WasmKeeper | ||
} | ||
|
||
// New return a new FileSystem object that will handle all virtual file on the interpreter. | ||
// File can be provided from different sources like CosmWasm cw-storage smart contract. | ||
func New(keeper types.WasmKeeper) FileSystem { | ||
return FileSystem{ | ||
wasmKeeper: keeper, | ||
} | ||
} | ||
|
||
func (f FileSystem) Open(name string) (fs.File, error) { | ||
return nil, fmt.Errorf("not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters