mirror of
https://github.com/skidoodle/pastebin
synced 2026-04-28 03:07:40 +02:00
resolve dangliing hashes
This commit is contained in:
+5
-3
@@ -3,13 +3,15 @@ package store
|
||||
import "time"
|
||||
|
||||
type Paste struct {
|
||||
Content string `json:"content"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
Content string `json:"content"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
Hash string `json:"hash,omitempty"`
|
||||
Metadata map[string]interface{} `json:"metadata,omitempty"`
|
||||
}
|
||||
|
||||
type Store interface {
|
||||
Get(id string) (*Paste, bool, error)
|
||||
GetIDByHash(hash string) (string, bool, error)
|
||||
Set(id, hash, content string) error
|
||||
Set(id, hash, content string, metadata map[string]interface{}) error
|
||||
Del(id string) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user