Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CharacterRepository ¶
type CharacterRepository interface { // Get a Character by id. Returns the character, whether it's found and an error Get(c *gin.Context, id int64) (model.Character, bool, error) // GetAll retrieves all character in the repository GetAll(c *gin.Context) ([]model.Character, error) // Save stores a new character Save(c *gin.Context, chCmd model.CharacterCommand) (model.Character, error) // Update a character. Returns the updated character, whether it's found and an error Update(c *gin.Context, id int64, chCmd model.CharacterCommand) (model.Character, bool, error) // Delete a character. If the character has phrases this will fail. Remove all phrases before Delete(c *gin.Context, id int64) error }
type PhraseRepository ¶
type PhraseRepository interface { // Get a phrase for a character Get(c *gin.Context, characterId int64, id int64) (model.Phrase, bool, error) // GetAllForCharacter retrieves all phrases from a character GetAllForCharacter(c *gin.Context, characterId int64) ([]model.Phrase, bool, error) // Save stores a new phrase for a character Save(c *gin.Context, phCmd model.PhraseCommand) (model.Phrase, error) // Delete a phrase for a character Delete(c *gin.Context, characterId int64, id int64) error }
Click to show internal directories.
Click to hide internal directories.