1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-07-20 03:57:29 +02:00
ntfy/server/cache.go
2021-11-08 09:46:31 -05:00

15 lines
313 B
Go

package server
import (
_ "github.com/mattn/go-sqlite3" // SQLite driver
"time"
)
type cache interface {
AddMessage(m *message) error
Messages(topic string, since sinceTime) ([]*message, error)
MessageCount(topic string) (int, error)
Topics() (map[string]*topic, error)
Prune(keep time.Duration) error
}