Documentation
¶
Index ¶
- Variables
- func GetMessage(context *gin.Context, key LocalizableMessageKey) string
- func GetMessageIncorrectPassword(context *gin.Context) string
- func GetMessageInternalServerError(context *gin.Context) string
- func GetMessageInvalidData(context *gin.Context) string
- func GetMessageProfileNotFound(context *gin.Context) string
- func GetMessageUserNotFound(context *gin.Context) string
- func Localize(rootPath string) gin.HandlerFunc
- type LocalizableMessageKey
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Translator *ut.UniversalTranslator
)
Functions ¶
func GetMessage ¶
func GetMessage(context *gin.Context, key LocalizableMessageKey) string
func GetMessageInvalidData ¶
func GetMessageUserNotFound ¶
func Localize ¶
func Localize(rootPath string) gin.HandlerFunc
Types ¶
type LocalizableMessageKey ¶
type LocalizableMessageKey string
const ( MsgInvalidData LocalizableMessageKey = "invalid_data" MsgUserNotFound LocalizableMessageKey = "user_not_found" MsgProfileNotFound LocalizableMessageKey = "profile_not_found" MsgIncorrectPassword LocalizableMessageKey = "incorrect_password" MsgInternalServerError LocalizableMessageKey = "internal_server_error" )
Click to show internal directories.
Click to hide internal directories.