Documentation ¶
Index ¶
- func DeleteByUUID(uuid uuid.UUID) bool
- type Catering
- type CateringStorage
- type Info
- type RedisCateringStorage
- func (rcs *RedisCateringStorage) Delete(uuid uuid.UUID) error
- func (rcs *RedisCateringStorage) Load(uuid uuid.UUID) (*Catering, error)
- func (rcs *RedisCateringStorage) LoadAll() ([]*Catering, error)
- func (rcs *RedisCateringStorage) LoadByTournament(tournament uuid.UUID) (*Catering, error)
- func (rcs *RedisCateringStorage) Store(c *Catering) error
- type Vote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteByUUID ¶
Types ¶
type Catering ¶
type Catering struct { UUID uuid.UUID `json:"uuid"` Info Info `json:"info"` Tournament uuid.UUID `json:"tournament"` Votes []Vote `json:"votes"` }
func AllCaterings ¶
func NewCatering ¶
Create a Catering
func (*Catering) UpdateInfo ¶
type CateringStorage ¶
type CateringStorage interface { Store(*Catering) error Delete(uuid.UUID) error Load(uuid.UUID) (*Catering, error) LoadAll() ([]*Catering, error) LoadByTournament(uuid.UUID) (*Catering, error) }
A storage interface for Caterings
type RedisCateringStorage ¶
type RedisCateringStorage struct {
// contains filtered or unexported fields
}
func NewRedisCateringStorage ¶
func NewRedisCateringStorage() *RedisCateringStorage
func (*RedisCateringStorage) Load ¶
func (rcs *RedisCateringStorage) Load(uuid uuid.UUID) (*Catering, error)
func (*RedisCateringStorage) LoadAll ¶
func (rcs *RedisCateringStorage) LoadAll() ([]*Catering, error)
func (*RedisCateringStorage) LoadByTournament ¶
func (rcs *RedisCateringStorage) LoadByTournament(tournament uuid.UUID) (*Catering, error)
func (*RedisCateringStorage) Store ¶
func (rcs *RedisCateringStorage) Store(c *Catering) error
Click to show internal directories.
Click to hide internal directories.