Documentation ¶
Index ¶
- Variables
- func BindErrorMessage(err error) string
- func ConvertArgsInt64(args []int64) []interface{}
- func ConvertArgsString(args []string) []interface{}
- func DataStoresMiddleware(mbdDB *sql.DB, esc *elastic.Client, logger, cm interface{}) gin.HandlerFunc
- func DetectLanguage(text string, interfaceLanguage string, acceptLanguage string, uiOrder []string) []string
- func ErrorHandlingMiddleware() gin.HandlerFunc
- func GenerateName(n int) string
- func GenerateUID(n int) string
- func InitConfig(cfgFile string, cfgPath string) error
- func Int64InSlice(i int64, s []int64) bool
- func IsEmpty(s []string) bool
- func Join(l []interface{}, separator string) string
- func LogError(err error)
- func LogRequestError(r *http.Request, err error)
- func LoggerMiddleware() gin.HandlerFunc
- func MaxInt(x, y int) int
- func Min(x, y int) int
- func MinInt(x, y int) int
- func Must(err error)
- 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 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, esc *elastic.Client, logger, cm interface{}) gin.HandlerFunc
Set MDB, ES & LOGGER clients in context
func DetectLanguage ¶
func GenerateName ¶ added in v1.1.7
func GenerateUID ¶ added in v1.1.7
func InitConfig ¶
func Int64InSlice ¶ added in v0.6.9
func LogRequestError ¶ added in v0.9.0
func LoggerMiddleware ¶ added in v0.7.8
func LoggerMiddleware() gin.HandlerFunc
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 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.