Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
func NewCollection ¶
func NewCollection() *Collection
NewCollection creates and initialize an instance of Collection.
func (*Collection) All ¶
func (collection *Collection) All() ([]Message, error)
All retreives all the items in MyCollecttion and returns them in a slice.
func (*Collection) Create ¶
func (collection *Collection) Create(msg Message) (Message, error)
Create adds the given item to the collection and returns it AFTER having set its id.
func (*Collection) Delete ¶
func (_ *Collection) Delete(_ MessageID) error
Delete deletes the given item from the collection.
func (*Collection) Item ¶
func (collection *Collection) Item(ID MessageID) (Message, error)
Item retreives the item with the given ID from Collection and returns it.
func (*Collection) Update ¶
func (collection *Collection) Update(msg Message) error
Update updates the given item in the collection.
type Message ¶
type Message struct { Id MessageID `json:"id,omitempty"` Info tekken.PlayerInfo `json:"info,omitempty"` }
Click to show internal directories.
Click to hide internal directories.