mirror of
https://github.com/skidoodle/pastebin
synced 2026-04-28 19:27:40 +02:00
16 lines
301 B
Go
16 lines
301 B
Go
package store
|
|
|
|
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
|
|
}
|