aboutsummaryrefslogtreecommitdiff
path: root/internal/hash/hash.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-01-15 23:55:32 +0100
committerDimitri Sokolyuk <demon@dim13.org>2019-01-15 23:55:32 +0100
commit3599c51014d68d0a95937f6a28c15a833c483c6b (patch)
treed7096d316954e6e822b225b21bd29d34eebcdca5 /internal/hash/hash.go
parent99600ae9d5b570125534099cb7396c5dd5ed73de (diff)
add interface
Diffstat (limited to 'internal/hash/hash.go')
-rw-r--r--internal/hash/hash.go44
1 files changed, 44 insertions, 0 deletions
diff --git a/internal/hash/hash.go b/internal/hash/hash.go
new file mode 100644
index 0000000..4a718be
--- /dev/null
+++ b/internal/hash/hash.go
@@ -0,0 +1,44 @@
+package hash
+
+import "os"
+
+const (
+ Magic = 0x061561
+ Version = 2
+)
+
+type Hash struct {
+ file *os.File
+}
+
+func New(file *os.File) *Hash {
+ return &Hash{file: file}
+}
+
+func (h *Hash) Close() error {
+ return h.file.Close()
+}
+
+func (h *Hash) Del(key []byte, flags uint) error {
+ panic("not implemented")
+}
+
+func (h *Hash) Fd() uintptr {
+ return h.file.Fd()
+}
+
+func (h *Hash) Get(key []byte, flags uint) ([]byte, error) {
+ panic("not implemented")
+}
+
+func (h *Hash) Put(key []byte, data []byte, flags uint) error {
+ panic("not implemented")
+}
+
+func (h *Hash) Sync(flags uint) error {
+ panic("not implemented")
+}
+
+func (h *Hash) Seq(key []byte, flags uint) ([]byte, error) {
+ panic("not implemented")
+}