Documentation
¶
Overview ¶
Package store defines and implements data store for sqlite and in-memory
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrLoadRejected = errors.New("message expired or deleted") ErrSaveRejected = errors.New("can't save message") )
Error messages
Functions ¶
func GenerateID ¶
func GenerateID() string
GenerateID creates a 12-character base62 random ID using crypto/rand. Uses rejection sampling to avoid modulo bias.
Types ¶
type Message ¶
type Message struct {
Key string
Exp time.Time
Data []byte
PinHash string
Errors int
ClientEnc bool // true if client-side encrypted (UI), false if server-side (API)
}
Message with key and exp. time
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
SQLite implements store.Engine with SQLite database
func NewInMemory ¶
NewInMemory creates an ephemeral in-memory SQLite store. Each call creates an isolated database using a unique URI.
Click to show internal directories.
Click to hide internal directories.