Documentation
¶
Index ¶
- type ItemManager
- func (m ItemManager) Create(ctx context.Context, create assets.ItemCreate) (*assets.Item, error)
- func (m ItemManager) Get(ctx context.Context, id assets.ItemID) (*assets.Item, error)
- func (m ItemManager) List(ctx context.Context, filter assets.ItemFilter) ([]*assets.Item, error)
- func (m ItemManager) Remove(ctx context.Context, id assets.ItemID) error
- func (m ItemManager) Update(ctx context.Context, id assets.ItemID, update assets.ItemUpdate) (*assets.Item, error)
- type ItemStorage
- type LinkManager
- func (m LinkManager) Create(ctx context.Context, create assets.LinkCreate) (*assets.Link, error)
- func (m LinkManager) Get(ctx context.Context, id assets.LinkID) (*assets.Link, error)
- func (m LinkManager) List(ctx context.Context, filter assets.LinkFilter) ([]*assets.Link, error)
- func (m LinkManager) Remove(ctx context.Context, id assets.LinkID) error
- func (m LinkManager) Update(ctx context.Context, id assets.LinkID, update assets.LinkUpdate) (*assets.Link, error)
- type LinkStorage
- type PlayerManager
- func (m PlayerManager) Create(ctx context.Context, create assets.PlayerCreate) (*assets.Player, error)
- func (m PlayerManager) Get(ctx context.Context, id assets.PlayerID) (*assets.Player, error)
- func (m PlayerManager) List(ctx context.Context, filter assets.PlayerFilter) ([]*assets.Player, error)
- func (m PlayerManager) Remove(ctx context.Context, id assets.PlayerID) error
- func (m PlayerManager) Update(ctx context.Context, id assets.PlayerID, update assets.PlayerUpdate) (*assets.Player, error)
- type PlayerStorage
- type RoomManager
- func (m RoomManager) Create(ctx context.Context, create assets.RoomCreate) (*assets.Room, error)
- func (m RoomManager) Get(ctx context.Context, id assets.RoomID) (*assets.Room, error)
- func (m RoomManager) List(ctx context.Context, filter assets.RoomFilter) ([]*assets.Room, error)
- func (m RoomManager) Remove(ctx context.Context, id assets.RoomID) error
- func (m RoomManager) Update(ctx context.Context, id assets.RoomID, update assets.RoomUpdate) (*assets.Room, error)
- type RoomStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemManager ¶
type ItemManager struct {
Storage ItemStorage
}
ItemManager coordinates the persistent storage of items persented by the networking layer.
func (ItemManager) Create ¶
func (m ItemManager) Create(ctx context.Context, create assets.ItemCreate) (*assets.Item, error)
Create creates a new item in persistent storage.
func (ItemManager) List ¶
func (m ItemManager) List(ctx context.Context, filter assets.ItemFilter) ([]*assets.Item, error)
List returns a slice of items based on the value of the filter.
type ItemStorage ¶
type ItemStorage interface {
List(context.Context, assets.ItemFilter) ([]*assets.Item, error)
Get(context.Context, assets.ItemID) (*assets.Item, error)
Create(context.Context, assets.ItemCreate) (*assets.Item, error)
Update(context.Context, assets.ItemID, assets.ItemUpdate) (*assets.Item, error)
Remove(context.Context, assets.ItemID) error
}
ItemStorage defines the interface to manage the persistent storage of items.
type LinkManager ¶
type LinkManager struct {
Storage LinkStorage
}
LinkManager coordinates the persistent storage of links persented by the networking layer.
func (LinkManager) Create ¶
func (m LinkManager) Create(ctx context.Context, create assets.LinkCreate) (*assets.Link, error)
Create creates a new link in persistent storage.
func (LinkManager) List ¶
func (m LinkManager) List(ctx context.Context, filter assets.LinkFilter) ([]*assets.Link, error)
List returns a slice of links based on the value of the filter.
type LinkStorage ¶
type LinkStorage interface {
List(context.Context, assets.LinkFilter) ([]*assets.Link, error)
Get(context.Context, assets.LinkID) (*assets.Link, error)
Create(context.Context, assets.LinkCreate) (*assets.Link, error)
Update(context.Context, assets.LinkID, assets.LinkUpdate) (*assets.Link, error)
Remove(context.Context, assets.LinkID) error
}
LinkStorage defines the interface to manage the persistent storage of links.
type PlayerManager ¶
type PlayerManager struct {
Storage PlayerStorage
}
PlayerManager coordinates the persistent storage of plaeyers persented by the networking layer.
func (PlayerManager) Create ¶
func (m PlayerManager) Create(ctx context.Context, create assets.PlayerCreate) (*assets.Player, error)
Create creates a new player in persistent storage.
func (PlayerManager) List ¶
func (m PlayerManager) List(ctx context.Context, filter assets.PlayerFilter) ([]*assets.Player, error)
List returns a slice of players based on the value of the filter.
type PlayerStorage ¶
type PlayerStorage interface {
List(context.Context, assets.PlayerFilter) ([]*assets.Player, error)
Get(context.Context, assets.PlayerID) (*assets.Player, error)
Create(context.Context, assets.PlayerCreate) (*assets.Player, error)
Update(context.Context, assets.PlayerID, assets.PlayerUpdate) (*assets.Player, error)
Remove(context.Context, assets.PlayerID) error
}
PlayerStorage defines the interface to manage the persistent storage of items.
type RoomManager ¶
type RoomManager struct {
Storage RoomStorage
}
RoomManager coordinates the persistent storage of rooms persented by the networking layer.
func (RoomManager) Create ¶
func (m RoomManager) Create(ctx context.Context, create assets.RoomCreate) (*assets.Room, error)
Create creates a new room in persistent storage.
func (RoomManager) List ¶
func (m RoomManager) List(ctx context.Context, filter assets.RoomFilter) ([]*assets.Room, error)
List returns a slice of rooms based on the value of the filter.
type RoomStorage ¶
type RoomStorage interface {
List(context.Context, assets.RoomFilter) ([]*assets.Room, error)
Get(context.Context, assets.RoomID) (*assets.Room, error)
Create(context.Context, assets.RoomCreate) (*assets.Room, error)
Update(context.Context, assets.RoomID, assets.RoomUpdate) (*assets.Room, error)
Remove(context.Context, assets.RoomID) error
}
RoomStorage defines the interface to manage the persistent storage of items.