Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseConsumptionKey ¶ added in v1.3.2
ParseConsumptionKey parses a consumption key that starts with the provided prefix and returns the timestamp and teaID encoded in the key. It returns ok=false if the key does not match the prefix or has insufficient length.
Types ¶
type Builder ¶
type Builder interface {
Version() []byte
Records() []byte
Record(id uuid.UUID) []byte
RecordsByName(name string) []byte
QR(id uuid.UUID) []byte
TagCategories() []byte
TagCategory(id uuid.UUID) []byte
TagCategoryByName(name string) []byte
Tags() []byte
Tag(id uuid.UUID) []byte
TagsByName(name string) []byte
TagsByNameAndCategory(category uuid.UUID, name string) []byte
TagsByCategory(category uuid.UUID) []byte
TagsByTea(tea uuid.UUID) []byte
TeasByTag(tag uuid.UUID) []byte
TagTeaPair(tag, tea uuid.UUID) []byte
TeaTagPair(tea, tag uuid.UUID) []byte
Collection(id, userID uuid.UUID) []byte
UserCollections(id uuid.UUID) []byte
CollectionsTeas(id, teaID uuid.UUID) []byte
RecordsByCollection(id uuid.UUID) []byte
Users() []byte
User(id uuid.UUID) []byte
UserByAppleID(id string) []byte
Device(id uuid.UUID) []byte
DevicesByUserID(id uuid.UUID) []byte
Notification(id uuid.UUID) []byte
NotificationByUserID(id uuid.UUID) []byte
ConsumptionByUserID(id uuid.UUID) []byte
ConsumptionKey(userID uuid.UUID, ts time.Time, teaID uuid.UUID) []byte
}
Builder constructs byte-encoded keys for the FoundationDB keyspace. It centralizes key layouts to keep them consistent across the codebase. The returned slices are suitable for direct use with FDB APIs.
func NewBuilder ¶
func NewBuilder() Builder
Click to show internal directories.
Click to hide internal directories.