Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortedKeys ¶
SortedKeys returns the keys of the given map, in a sorted order.
func StringifyCollection ¶ added in v0.1.3
StringifyCollection safely returns a string representation of a map[Key]interface{} that is similar in form to the standard stringification of a map, "map[k1:v1, k2:v2]". This differs from StringifyInterface's handling of a map which emits a string to be used as key in contexts such as JSON objects.
func StringifyInterface ¶
StringifyInterface transforms an arbitrary interface into its string representation. We need to do this because some entities use the string representation of their keys as their names. Note: this API is deprecated and will be removed.
Types ¶
type Comparable ¶
type Comparable interface { // Equal returns true if this object is equal to the other one. Equal(other interface{}) bool }
Comparable types have an equality-testing method.
type Key ¶
Key represents the Key in the updates and deletes of the Notification objects. The only reason this exists is that Go won't let us define our own hash function for non-hashable types, and unfortunately we need to be able to index maps by map[string]interface{} objects and slices by []interface{} objects.
type Path ¶
type Path []Key
Path represents a path decomposed into elements where each element is a Key. A Path can be interpreted as either absolute or relative depending on how it is used.
func (Path) MarshalJSON ¶
MarshalJSON marshals a Path to JSON.