Documentation ¶
Index ¶
Constants ¶
const ( TrueStr = "true" FalseStr = "false" )
const FastMetaMaxSize = 128 * 1024
The maximum size of the FastMeta is 128kb
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChunkCollection ¶ added in v0.0.15
type ChunkCollection []Chunk
type ChunkMetaCollection ¶ added in v0.0.15
type ChunkMetaCollection []ChunkMeta
func (ChunkMetaCollection) Hash ¶ added in v0.0.15
func (c ChunkMetaCollection) Hash() Hash
type Event ¶
type Event struct { EventIdentifier // This will be used to identify the event it includes EventHash, EventType, FastMeta Level Level // unix timestamp of creation time UTC Metadata ChunkMetaCollection // If no metadata is present the metadata of the the next previous event with metadata is used Content ChunkMetaCollection // all hashes in a certain order that allow to reconstruct the content from the values in badgerDB ParentEvent Hash // the event this item is the child of RootEvent Hash // the first event that marks a now EventChain Temporary Binary // no non-Temporary event can have a Temporary event as Parent, Temporary events will be removed after some conditions are met, if one deletes a Temporary event all its children will be deleted too FullTextSearch Binary // if true the ContentHashes and MetadataHashes of the event will be used for full-text search, Important: this only applies to the event itself, not to its children }
Event represents an event in the EventChain, the absolute top of a EventChain is a RootEvent, look at rootEvents.go
func (*Event) CreateDetailsMetaHash ¶
func (*Event) Key ¶
func (item *Event) Key() EventKeyBytes
func (Event) MarshalJSON ¶
func (*Event) PrettyPrint ¶
func (item *Event) PrettyPrint()
type EventIdentifier ¶ added in v0.0.15
type EventIdentifier struct { EventHash Hash // SHA-512 hash of all other fields in this struct EventType EventType // Defines what behavior the event event should have. FastMeta FastMeta // FastMeta allows for metadata to be stored in the description of the event itself, what leads to faster access without indexing. The maximum size of the FastMeta is 128kb }
type EventKeyBytes ¶ added in v0.0.15
type EventKeyBytes []byte
func (EventKeyBytes) Deserialize ¶ added in v0.0.15
func (ekb EventKeyBytes) Deserialize() (*EventIdentifier, error)
type EventType ¶ added in v0.0.15
type EventType int
EventType defines how the event should behave, for example if i get the File of a Patch event i will get the finishes file with all previous patches applied TODO explain in more detail
type FastMeta ¶ added in v0.0.15
type FastMeta []FastMetaParameter
FastMeta allows for metadata to be stored in the description of the event itself, what leads to faster access without indexing. FastMeta will be stored in the key and not the value of the underlying key-value store.
func (FastMeta) Bytes ¶ added in v0.0.15
func (f FastMeta) Bytes() FastMetaBytesSerialized
func (*FastMeta) FromBytes ¶ added in v0.0.15
func (f *FastMeta) FromBytes(data FastMetaBytesSerialized) error
type FastMetaBytesSerialized ¶ added in v0.0.15
type FastMetaBytesSerialized []byte
type FastMetaParameter ¶ added in v0.0.15
type FastMetaParameter []byte
FastMetaParameter is a single parameter of FastMeta
func (FastMetaParameter) String ¶ added in v0.0.17
func (f FastMetaParameter) String() string
type Level ¶ added in v0.0.15
type Level int64
This is a unix timestamp in nanoseconds It is used to have some idea of the time of creation of an event. We recognize that the time of computer systems is not reliable, that is why we call it Level, instead of creation time.
type RootEventsIndex ¶
func (RootEventsIndex) MarshalJSON ¶
func (indexItem RootEventsIndex) MarshalJSON() ([]byte, error)
type Title ¶ added in v0.0.15
type Title string
Title can be used as a category, pseudo type, or name of an event. Its primary purpose is to speed up the search for events. Its most important use is to have root events with a somewhat unique title, so one can find a fast entry point to a desired EventChain.