Versions in this module Expand all Collapse all v6 v6.0.0 Dec 23, 2020 Changes in this version + const ALPHANUMERIC + const GIBBERISH_TEXT + const LOG_FILENAME + const LOG_NOTIFICATION_FILENAME + const LOG_ROTATE_SIZE + const LOWERCASE + var FUZZY_STRINGS_EMAILS = []string + var FUZZY_STRINGS_NAMES = []string + var FUZZY_STRINGS_POSTS = []string + var T i18n.TranslateFunc + var TDefault i18n.TranslateFunc + func CheckOrigin(r *http.Request, allowedOrigins string) bool + func CompileGo(t *testing.T, sourceCode, outputPath string) + func CopyDir(src string, dst string) (err error) + func CopyFile(src, dst string) (err error) + func CreateTestAnimatedGif(t *testing.T, width int, height int, frames int) []byte + func CreateTestGif(t *testing.T, width int, height int) []byte + func CreateTestJpeg(t *testing.T, width int, height int) []byte + func CreateTestPng(t *testing.T, width int, height int) []byte + func DisableDebugLogForTest() + func EnableDebugLogForTest() + func EndOfDay(t time.Time) time.Time + func FuzzName() string + func FuzzPost() string + func GetAndValidateLicenseFileFromDisk(location string) (*model.License, []byte) + func GetClientLicense(l *model.License) map[string]string + func GetHostnameFromSiteURL(siteURL string) string + func GetIpAddress(r *http.Request, trustedProxyIPHeader []string) string + func GetLicenseFileFromDisk(fileName string) []byte + func GetLicenseFileLocation(fileLocation string) string + func GetLogFileLocation(fileLocation string) string + func GetLogSettingsFromNotificationsLogSettings(notificationLogSettings *model.NotificationLogSettings) *model.LogSettings + func GetNotificationsLogFileLocation(fileLocation string) string + func GetSubpathFromConfig(config *model.Config) (string, error) + func GetSubpathScriptHash(subpath string) string + func GetSupportedLocales() map[string]string + func GetTranslationsAndLocale(w http.ResponseWriter, r *http.Request) (i18n.TranslateFunc, string) + func GetTranslationsBySystemLocale() (i18n.TranslateFunc, error) + func GetUrlWithCache(url string, cache *RequestCache, skip bool) ([]byte, error) + func GetUserTranslations(locale string) i18n.TranslateFunc + func HashSha256(text string) string + func InitTranslations(localizationSettings model.LocalizationSettings) error + func InitTranslationsWithDir(dir string) error + func IsPasswordValidWithSettings(password string, settings *model.PasswordSettings) *model.AppError + func Merge(base interface{}, patch interface{}, mergeConfig *MergeConfig) (interface{}, error) + func MillisFromTime(t time.Time) int64 + func MloggerConfigFromLoggerConfig(s *model.LogSettings, getFileFunc fileLocationFunc) *mlog.LoggerConfiguration + func OriginChecker(allowedOrigins string) func(*http.Request) bool + func ProgressiveRetry(operation func() error) error + func RandIntFromRange(r Range) int + func RandString(l int, charset string) string + func RandomName(length Range, charset string) string + func RandomText(length Range, hashtags Range, mentions Range, users []string) string + func RemoveDuplicatesFromStringArray(arr []string) []string + func RemoveStringFromSlice(a string, slice []string) []string + func RemoveStringsFromSlice(slice []string, strings ...string) []string + func RenderWebAppError(config *model.Config, w http.ResponseWriter, r *http.Request, ...) + func RenderWebError(config *model.Config, w http.ResponseWriter, r *http.Request, status int, ...) + func SetRolePermissionsFromConfig(roles map[string]*model.Role, cfg *model.Config, isLicensed bool) map[string]*model.Role + func StartOfDay(t time.Time) time.Time + func StringArrayIntersection(arr1, arr2 []string) []string + func StringInSlice(a string, slice []string) bool + func StringSliceDiff(a, b []string) []string + func TfuncWithFallback(pref string) i18n.TranslateFunc + func TimeFromMillis(millis int64) time.Time + func TranslateAsHtml(t i18n.TranslateFunc, translationID string, args map[string]interface{}) template.HTML + func TranslationsPreInit() error + func UnzipToPath(zipFile io.ReaderAt, size int64, outPath string) ([]string, error) + func UpdateAssetsSubpath(subpath string) error + func UpdateAssetsSubpathFromConfig(config *model.Config) error + func UpdateAssetsSubpathInDir(subpath, directory string) error + func UrlEncode(str string) string + func ValidateLicense(signed []byte) (bool, string) + func Yesterday() time.Time + type HTMLTemplate struct + Html map[string]template.HTML + Props map[string]interface{} + TemplateName string + Templates *template.Template + func NewHTMLTemplate(templates *template.Template, templateName string) *HTMLTemplate + func (t *HTMLTemplate) Render() string + func (t *HTMLTemplate) RenderToWriter(w io.Writer) error + type HTMLTemplateWatcher struct + func NewHTMLTemplateWatcher(directory string) (*HTMLTemplateWatcher, error) + func (w *HTMLTemplateWatcher) Close() + func (w *HTMLTemplateWatcher) Templates() *template.Template + type MergeConfig struct + StructFieldFilter StructFieldFilter + type Range struct + Begin int + End int + type RequestCache struct + Data []byte + Date string + Key string + type StructFieldFilter func(structField reflect.StructField, base reflect.Value, patch reflect.Value) bool Other modules containing this package github.com/adacta-ru/mattermost-server github.com/adacta-ru/mattermost-server/v5