Documentation ¶
Index ¶
- Variables
- func BindErrorMessage(err error) string
- func Contains(list []interface{}, elem interface{}) bool
- func ConvertArgsInt64(args []int64) []interface{}
- func ConvertArgsString(args []string) []interface{}
- func DataStoresMiddleware(mbdDB *sql.DB, esManager, logger, cm interface{}, tc interface{}, ...) gin.HandlerFunc
- func DetectLanguage(text string, interfaceLanguage string, acceptLanguage string, uiOrder []string) []string
- func ErrorHandlingMiddleware() gin.HandlerFunc
- func Filter(list []interface{}, test func(interface{}) bool) ([]interface{}, []interface{})
- func First(list []interface{}, test func(interface{}) bool) interface{}
- func GenerateName(n int) string
- func GenerateUID(n int) string
- func GroupBy(list []interface{}, value func(interface{}) interface{}) map[interface{}][]interface{}
- func HasNumeric(term string) (bool, bool)
- func InitConfig(cfgFile string, cfgPath string) error
- func Int64InSlice(i int64, s []int64) bool
- func IntersectSortedStringSlices(first []string, second []string) []string
- func Is(slice interface{}) []interface{}
- func IsEmpty(s []string) bool
- func Join(l []interface{}, separator string) string
- func JoinErrors(one error, two error) error
- func JoinErrorsWrap(one error, two error, twoErrorMessage string) error
- func LogError(err error)
- func LogRequestError(r *http.Request, err error)
- func LoggerMiddleware() gin.HandlerFunc
- func MaxByValue(list []interface{}, value func(interface{}) float64) interface{}
- func MaxInt(x, y int) int
- func Min(x, y int) int
- func MinInt(x, y int) int
- func MinMax(x, y int) (int, int)
- func Must(err error)
- func NumberInHebrew(n int) string
- func Pprint(l interface{}) string
- func PrintMap(m interface{}) (string, error)
- func RecoveryMiddleware() gin.HandlerFunc
- func ResolveHost(c *gin.Context) (host string)
- func ResolveScheme(c *gin.Context) string
- func Select(list []interface{}, newValue func(interface{}) interface{}) []interface{}
- func StringMapOrderedKeys(m interface{}) []string
- func SumAndMax(values []int) (int, int)
- func ValidationErrorMessage(e *validator.FieldError) string
- type Date
- type TestDBManager
Constants ¶
This section is empty.
Variables ¶
View Source
var GO_TO_MDB = map[language.Tag]string{ language.English: consts.LANG_ENGLISH, language.Hebrew: consts.LANG_HEBREW, language.Russian: consts.LANG_RUSSIAN, language.Spanish: consts.LANG_SPANISH, language.Italian: consts.LANG_ITALIAN, language.German: consts.LANG_GERMAN, language.Dutch: consts.LANG_DUTCH, language.French: consts.LANG_FRENCH, language.Portuguese: consts.LANG_PORTUGUESE, language.Turkish: consts.LANG_TURKISH, language.Polish: consts.LANG_POLISH, language.Arabic: consts.LANG_ARABIC, language.Hungarian: consts.LANG_HUNGARIAN, language.Finnish: consts.LANG_FINNISH, language.Lithuanian: consts.LANG_LITHUANIAN, language.Japanese: consts.LANG_JAPANESE, language.Bulgarian: consts.LANG_BULGARIAN, language.Georgian: consts.LANG_GEORGIAN, language.Norwegian: consts.LANG_NORWEGIAN, language.Swedish: consts.LANG_SWEDISH, language.Croatian: consts.LANG_CROATIAN, language.Chinese: consts.LANG_CHINESE, language.Persian: consts.LANG_PERSIAN, language.Romanian: consts.LANG_ROMANIAN, language.Hindi: consts.LANG_HINDI, language.Ukrainian: consts.LANG_UKRAINIAN, language.Macedonian: consts.LANG_MACEDONIAN, language.Slovenian: consts.LANG_SLOVENIAN, language.Latvian: consts.LANG_LATVIAN, language.Slovak: consts.LANG_SLOVAK, language.Czech: consts.LANG_CZECH, }
View Source
var MDB_TO_GO = reverseLanguages()
Functions ¶
func BindErrorMessage ¶
func ConvertArgsInt64 ¶
func ConvertArgsInt64(args []int64) []interface{}
func ConvertArgsString ¶
func ConvertArgsString(args []string) []interface{}
func DataStoresMiddleware ¶
func DataStoresMiddleware(mbdDB *sql.DB, esManager, logger, cm interface{}, tc interface{}, cms interface{}, variables interface{}) gin.HandlerFunc
Set MDB, ES & LOGGER etc. clients in context
func DetectLanguage ¶
func Filter ¶ added in v1.12.0
func Filter(list []interface{}, test func(interface{}) bool) ([]interface{}, []interface{})
func First ¶ added in v1.12.0
func First(list []interface{}, test func(interface{}) bool) interface{}
func GenerateName ¶ added in v1.1.7
func GenerateUID ¶ added in v1.1.7
func GroupBy ¶ added in v1.12.0
func GroupBy(list []interface{}, value func(interface{}) interface{}) map[interface{}][]interface{}
func HasNumeric ¶ added in v1.12.0
Return values: 1. Whole term is numeric. 2. At least part of the term is numeric.
func InitConfig ¶
func Int64InSlice ¶ added in v0.6.9
func IntersectSortedStringSlices ¶ added in v1.4.4
func JoinErrors ¶ added in v1.3.3
Joins two errors to one.
func JoinErrorsWrap ¶ added in v1.3.4
func LogRequestError ¶ added in v0.9.0
func LoggerMiddleware ¶ added in v0.7.8
func LoggerMiddleware() gin.HandlerFunc
func MaxByValue ¶ added in v1.12.0
func MaxByValue(list []interface{}, value func(interface{}) float64) interface{}
func NumberInHebrew ¶ added in v1.6.8
func ResolveHost ¶ added in v0.9.7
func ResolveHost(c *gin.Context) (host string)
func ResolveScheme ¶ added in v0.9.7
func ResolveScheme(c *gin.Context) string
func Select ¶ added in v1.12.0
func Select(list []interface{}, newValue func(interface{}) interface{}) []interface{}
func StringMapOrderedKeys ¶ added in v1.5.0
func StringMapOrderedKeys(m interface{}) []string
func ValidationErrorMessage ¶
func ValidationErrorMessage(e *validator.FieldError) string
Types ¶
type Date ¶
A time.Time like structure with date part only JSON marshalling
func (*Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
type TestDBManager ¶ added in v1.1.7
func (*TestDBManager) DestroyTestDB ¶ added in v1.1.7
func (m *TestDBManager) DestroyTestDB() error
func (*TestDBManager) InitTestDB ¶ added in v1.1.7
func (m *TestDBManager) InitTestDB() error
Click to show internal directories.
Click to hide internal directories.