Documentation ¶
Index ¶
- func DeleteByUUID(uuid uuid.UUID) bool
- type Coord
- type Location
- type LocationStorage
- type Profile
- type RedisLocationStorage
- func (rls *RedisLocationStorage) Delete(uuid uuid.UUID) error
- func (rls *RedisLocationStorage) Load(uuid uuid.UUID) (*Location, error)
- func (rls *RedisLocationStorage) LoadAll() ([]*Location, error)
- func (rls *RedisLocationStorage) LoadByPlayer(player uuid.UUID) (*Location, error)
- func (rls *RedisLocationStorage) Store(l *Location) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByUUID ¶
Types ¶
type Location ¶
type Location struct { UUID uuid.UUID `json:"uuid"` Host uuid.UUID `json:"host"` Profile Profile `json:"profile"` Pictures [][]byte `json:"pictures"` Active bool `json:"active"` }
func AllLocations ¶
func NewLocation ¶
Create a Location
func (*Location) AddPicture ¶
func (*Location) RemovePicture ¶
func (*Location) UpdateProfile ¶
type LocationStorage ¶
type LocationStorage interface { Store(*Location) error Delete(uuid.UUID) error Load(uuid.UUID) (*Location, error) LoadAll() ([]*Location, error) LoadByPlayer(uuid.UUID) (*Location, error) }
A storage interface for Locations
type RedisLocationStorage ¶
type RedisLocationStorage struct {
// contains filtered or unexported fields
}
func NewRedisLocationStorage ¶
func NewRedisLocationStorage() *RedisLocationStorage
func (*RedisLocationStorage) Load ¶
func (rls *RedisLocationStorage) Load(uuid uuid.UUID) (*Location, error)
func (*RedisLocationStorage) LoadAll ¶
func (rls *RedisLocationStorage) LoadAll() ([]*Location, error)
func (*RedisLocationStorage) LoadByPlayer ¶
func (rls *RedisLocationStorage) LoadByPlayer(player uuid.UUID) (*Location, error)
func (*RedisLocationStorage) Store ¶
func (rls *RedisLocationStorage) Store(l *Location) error
Click to show internal directories.
Click to hide internal directories.