Discover Packages
mleku.dev/git/nostr
eventstore
badger
keys
serial
package
Version:
v1.1.22
Opens a new window with list of versions in this module.
Published: Apr 11, 2024
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type T struct {
Val []byte
}
T is a badger DB serial number used for conflict free event record keys.
func FromKey(k []byte ) (p *T )
FromKey expects the last Len bytes of the given slice to be the serial.
func New(ser []byte ) (p *T )
New returns a new serial record key.Element - if nil or short slice is given,
initialize a fresh one with Len (for reading), otherwise if equal or longer,
trim if long and store into struct (for writing).
Source Files
¶
Click to show internal directories.
Click to hide internal directories.