Files
nostrlib/eventstore/bluge/helpers.go
2025-04-18 11:29:31 -03:00

29 lines
389 B
Go

package bluge
import (
"encoding/hex"
"fiatjaf.com/nostr"
)
const (
contentField = "c"
kindField = "k"
createdAtField = "a"
pubkeyField = "p"
)
type eventIdentifier nostr.ID
const idField = "i"
func (id eventIdentifier) Field() string {
return idField
}
func (id eventIdentifier) Term() []byte {
idhex := make([]byte, 64)
hex.Encode(idhex, id[:])
return idhex
}