mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
15 lines
352 B
Go
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)
|
|
}
|