Documentation ¶
Overview ¶
Contains standalone utility functions used by go-deje for the sake of convenience.
Nothing too interesting in here, but definitely useful.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneMarshal ¶
func CloneMarshal(m interface{}, s interface{}) error
Uses json.Marshal and json.Unmarshal to copy from one object to another. Excellent way to turn a JSON Object into a struct, or vice-versa.
This makes its changes in-place, so always pass in the pointer to the struct object you're trying to fill.
func HashObject ¶
Serialize an object to compact, deterministic JSON (no whitespace, fields in struct order or alphabetical), then take the SHA1 of that, and return the hex digest.
This is the algorithm we use for hashing events, topics, etc.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.