1
0
mirror of https://github.com/lus/pasty.git synced 2023-08-10 21:13:09 +03:00
pasty/internal/pastes/repository.go
2023-06-07 18:25:28 +02:00

15 lines
352 B
Go

package pastes
import (
"context"
"time"
)
type Repository interface {
ListIDs(ctx context.Context) ([]string, error)
FindByID(ctx context.Context, id string) (*Paste, error)
Upsert(ctx context.Context, paste *Paste) error
DeleteByID(ctx context.Context, id string) error
DeleteOlderThan(ctx context.Context, age time.Duration) (int, error)
}