Documentation ¶
Index ¶
- func AddMessage(db *gorm.DB, message *models.Message, userId uint) (interface{}, hermesErrors.HermesError)
- func AddUser(db *gorm.DB, config *models.Config, userLogin *models.UserLogin) (*models.JWT, hermesErrors.HermesError)
- func DeleteMessage(db *gorm.DB, messageId int, userId uint) (fiber.Map, hermesErrors.HermesError)
- func EditMessage(db *gorm.DB, updateMessage func(out interface{}) error, messageId int, ...) (*models.Message, hermesErrors.HermesError)
- func GetMessage(db *gorm.DB, messageId int, userId uint) (*models.Message, hermesErrors.HermesError)
- func GetMessages(db *gorm.DB, userId uint) (fiber.Map, hermesErrors.HermesError)
- func Login(db *gorm.DB, config *models.Config, userLogin *models.UserLogin) (*models.JWT, hermesErrors.HermesError)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddMessage ¶
func AddMessage(db *gorm.DB, message *models.Message, userId uint) (interface{}, hermesErrors.HermesError)
AddMessage add a new message and check all word play types
func AddUser ¶
func AddUser(db *gorm.DB, config *models.Config, userLogin *models.UserLogin) (*models.JWT, hermesErrors.HermesError)
AddUser add user new user and return a new jwt for the user
func DeleteMessage ¶
func DeleteMessage(db *gorm.DB, messageId int, userId uint) (fiber.Map, hermesErrors.HermesError)
DeleteMessage delete a message by id
func EditMessage ¶
func EditMessage(db *gorm.DB, updateMessage func(out interface{}) error, messageId int, userId uint) (*models.Message, hermesErrors.HermesError)
EditMessage update message with user input only if the message is owned by the user
func GetMessage ¶
func GetMessage(db *gorm.DB, messageId int, userId uint) (*models.Message, hermesErrors.HermesError)
GetMessage get a messages owned by user
func GetMessages ¶
func GetMessages(db *gorm.DB, userId uint) (fiber.Map, hermesErrors.HermesError)
GetMessages get all messages owned by or sent to the user
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.