Documentation ¶
Index ¶
Constants ¶
View Source
const CLIENTID_LENGTH = uuid.UUID_LENGTH
CLIENTID_LENGTH is the length of Client IDs
View Source
const ENTITYID_LENGTH = uuid.UUID_LENGTH
ENTITYID_LENGTH is the length of Entity IDs
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EntityID ¶
type EntityID string
EntityID type
func MustEntityID ¶
MustEntityID assures a string to be EntityID
type EntityIDSet ¶ added in v0.1.4
type EntityIDSet map[EntityID]struct{}
EntityIDSet is the data structure for a set of entity IDs
func (EntityIDSet) Add ¶ added in v0.1.4
func (es EntityIDSet) Add(id EntityID)
Add adds an entity ID to EntityIDSet
func (EntityIDSet) Contains ¶ added in v0.1.4
func (es EntityIDSet) Contains(id EntityID) bool
Contains checks if entity ID is in EntityIDSet
func (EntityIDSet) Del ¶ added in v0.1.4
func (es EntityIDSet) Del(id EntityID)
Del removes an entity ID from EntityIDSet
func (EntityIDSet) ForEach ¶ added in v0.1.4
func (es EntityIDSet) ForEach(cb func(eid EntityID) bool)
func (EntityIDSet) ToList ¶ added in v0.1.4
func (es EntityIDSet) ToList() []EntityID
ToList convert EntityIDSet to a slice of entity IDs
type StringList ¶
type StringList []string
StringList is a list of string (slice)
func (*StringList) Append ¶
func (sl *StringList) Append(elem string)
Append add the string to the end of StringList
func (*StringList) Find ¶
func (sl *StringList) Find(s string) int
Find get the index of string in StringList, returns -1 if not found
func (*StringList) Remove ¶
func (sl *StringList) Remove(elem string)
Remove removes the string from StringList
Click to show internal directories.
Click to hide internal directories.