resolve dangliing hashes

This commit is contained in:
2026-04-21 11:47:56 +02:00
parent 682b7a0228
commit 0a25bd559c
14 changed files with 390 additions and 59 deletions
+5 -3
View File
@@ -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
}