Documentation
¶
Index ¶
Constants ¶
View Source
const ( ID_START = 7 ID_END = 7 + 64 PUBKEY_START = 83 PUBKEY_END = 83 + 64 SIG_START = 156 SIG_END = 156 + 128 CREATED_AT_START = 299 CREATED_AT_END = 299 + 10 NSON_STRING_START = 318 // the actual json string for the "nson" field NSON_VALUES_START = 318 + 2 // skipping the first byte which delimits the nson size NSON_MARKER_START = 309 // this is used just to determine if an event is nson or not NSON_MARKER_END = 317 // it's just the `,"nson":` (including ,": garbage to reduce false positives) part )
Variables ¶
View Source
var ErrNotNSON = fmt.Errorf("not nson")
Functions ¶
func MarshalBytes ¶ added in v0.20.0
func UnmarshalBytes ¶ added in v0.20.0
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
A nson.Event is basically a wrapper over the string that makes it easy to get each event property (except tags).
func (*Event) GetContent ¶
func (Event) GetCreatedAt ¶
func (ne Event) GetCreatedAt() nostr.Timestamp
Click to show internal directories.
Click to hide internal directories.