diplomat v0.3.0 Diplomat.Key
Summary
Types
A Key for uniquely identifying a Diplomat.Entity
Functions
Creates a new Diplomat.Key
from a path. The path should be either a list
with two elements or a list of lists of two elements. Each two element list
represents a segment of the key path
Creates a new Diplomat.Key
from a Diplomat.Proto.Key
struct
Determines whether or not a Key
is incomplete. This is most useful when
figuring out whether or not we must first call the API to allocate an ID for
the associated entity
Creates a new Diplomat.Key
from a kind
Creates a new Diplomat.Key
form a kind and a name
Creates a new Diplomat.Key
from a king, an id or name, and a parent Entity
Generates a path list ffor a given key. The path identifies the Enity’s
location nested within another Diplomat.Entity
Convert a Diplomat.Key
to its protobuf struct
Types
A Key for uniquely identifying a Diplomat.Entity
.
A Key must have a unique identifier, which is either a name
or an id
.
Most often, if setting a unique identifier manually, you will use the name
field. However, if neither a name nor an id is defined, the Diplomat
will
auto-assign an id by calling the API to allocate an id for the Key
.
Functions
Creates a new Diplomat.Key
from a path. The path should be either a list
with two elements or a list of lists of two elements. Each two element list
represents a segment of the key path.
Creates a new Diplomat.Key
from a Diplomat.Proto.Key
struct
Determines whether or not a Key
is incomplete. This is most useful when
figuring out whether or not we must first call the API to allocate an ID for
the associated entity.
Creates a new Diplomat.Key
from a kind
Creates a new Diplomat.Key
form a kind and a name
Creates a new Diplomat.Key
from a king, an id or name, and a parent Entity
Generates a path list ffor a given key. The path identifies the Enity’s
location nested within another Diplomat.Entity
.
Convert a Diplomat.Key
to its protobuf struct.
It should be noted that this function does not convert the struct to its
binary representation, but instaed returns a Diplomat.Proto.Key
struct
(which is later converted to the binary format).