small refactor

This commit is contained in:
2026-04-21 06:00:03 +02:00
parent 4b62a9a64b
commit 26924a5c01
27 changed files with 2149 additions and 789 deletions
+12 -5
View File
@@ -1,8 +1,15 @@
package store
// Store is the interface for a key-value store.
type Store interface {
Get(key string) (string, bool, error)
Set(key, value string) error
Del(key string) error
import "time"
type Paste struct {
Content string `json:"content"`
CreatedAt time.Time `json:"createdAt"`
}
type Store interface {
Get(id string) (*Paste, bool, error)
GetIDByHash(hash string) (string, bool, error)
Set(id, hash, content string) error
Del(id string) error
}