Documentation ¶
Index ¶
- func DeletePhraseForCharacter(c *gin.Context)
- func GetAllPhrasesForCharacter(c *gin.Context)
- func GetPhrase(c *gin.Context)
- func Initialize(phRepo repository.PhraseRepository)
- func SaveNewPhrase(c *gin.Context)
- type DBPhraseRepository
- func (repo DBPhraseRepository) Delete(c *gin.Context, characterId int64, id int64) error
- func (repo DBPhraseRepository) Get(c *gin.Context, characterId int64, id int64) (model.Phrase, bool, error)
- func (repo DBPhraseRepository) GetAllForCharacter(c *gin.Context, characterId int64) ([]model.Phrase, bool, error)
- func (repo DBPhraseRepository) Save(c *gin.Context, phCmd model.PhraseCommand) (model.Phrase, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllPhrasesForCharacter ¶
GetAllPhrasesForCharacter returns all phrases for a character wrapped in a json object
func Initialize ¶
func Initialize(phRepo repository.PhraseRepository)
func SaveNewPhrase ¶
SaveNewPhrase saves a new phrase for the specified character
Types ¶
type DBPhraseRepository ¶
type DBPhraseRepository struct {
// contains filtered or unexported fields
}
func NewDBPhraseRepository ¶
func NewDBPhraseRepository(db *gorm.DB) DBPhraseRepository
func (DBPhraseRepository) GetAllForCharacter ¶
func (DBPhraseRepository) Save ¶
func (repo DBPhraseRepository) Save(c *gin.Context, phCmd model.PhraseCommand) (model.Phrase, error)
Click to show internal directories.
Click to hide internal directories.