Documentation ¶
Index ¶
- Constants
- Variables
- func GetMessage(messageID string) string
- func InitLocaleByFiles(aliveLocales []WebHookLocales) (bundleMaps map[string]WebHookLocalizer)
- func Println(messageID string, a ...any)
- func SetGlobalLocale(lang string)
- func Sprintf(messageID string, a ...any) string
- type WebHookLocales
- type WebHookLocalizer
Constants ¶
View Source
const ( MSG_WEBHOOK_VERSION = "WEBHOOK_VERSION" MSG_SETUID_OR_SETGID_ERROR = "ERROR_SETUID_OR_SETGID" MSG_SERVER_IS_STARTING = "SERVER_IS_STARTING" ERR_SERVER_LISTENING_PORT = "ERRPR_SERVER_LISTENING_PORT" ERR_SERVER_LISTENING_PRIVILEGES = "ERRPR_SERVER_LISTENING_PRIVILEGES" ERR_SERVER_OPENING_LOG_FILE = "ERROR_SERVER_OPENING_LOG_FILE" ERR_CREATING_PID_FILE = "ERROR_CREATING_PID_FILE" ERR_COULD_NOT_LOAD_ANY_HOOKS = "ERROR_COULD_NOT_LOAD_ANY_HOOKS" )
Variables ¶
View Source
var ( GLOBAL_LOCALES map[string]WebHookLocalizer GLOBAL_LANG string )
Functions ¶
func GetMessage ¶
func InitLocaleByFiles ¶
func InitLocaleByFiles(aliveLocales []WebHookLocales) (bundleMaps map[string]WebHookLocalizer)
func SetGlobalLocale ¶
func SetGlobalLocale(lang string)
Types ¶
type WebHookLocales ¶
func GetWebHookLocaleObject ¶
func GetWebHookLocaleObject(fileName string, content []byte) (result WebHookLocales, err error)
func LoadLocaleFiles ¶
func LoadLocaleFiles(localesDir string, webhookLocalesEmbed embed.FS) (aliveLocales []WebHookLocales)
get alive locales
Click to show internal directories.
Click to hide internal directories.