Documentation ¶
Index ¶
- Variables
- func BindErrorMessage(err error) string
- func ConvertArgsBytes(args [][]byte) []interface{}
- func ConvertArgsInt(args ...int) []interface{}
- func ConvertArgsInt64(args []int64) []interface{}
- func ConvertArgsString(args []string) []interface{}
- func DownloadUrl(url string, path string) error
- func EnvMiddleware(mdb *sql.DB, emitter events.EventEmitter, enforcer *casbin.Enforcer, ...) gin.HandlerFunc
- func ErrorHandlingMiddleware() gin.HandlerFunc
- func ErrorsToRollbarStack(st StackTracer) rollbar.Stack
- func GenerateName(n int) string
- func GenerateUID(n int) string
- func HttpPostJson(url string, payload interface{}) (*http.Response, error)
- func IsEmpty(s []string) bool
- func MdbLoggerMiddleware() gin.HandlerFunc
- func Min(x, y int) int
- func Must(err error)
- func NumToHebrew(num uint16) string
- func ParseCSVHeader(header []string) (map[string]int, error)
- func RandomSHA1() string
- func ReadCSV(path string) ([][]string, error)
- func RecoveryMiddleware() gin.HandlerFunc
- func Reverse(s string) string
- func Sha1(s string) string
- func ValidationErrorMessage(e *validator.FieldError) string
- type ContextProvider
- type FileName
- type StackTracer
- type TestDBManager
Constants ¶
This section is empty.
Variables ¶
View Source
var MAGNITUDE_MAPS = map[int]map[int]string{
0: {
1: "א",
2: "ב",
3: "ג",
4: "ד",
5: "ה",
6: "ו",
7: "ז",
8: "ח",
9: "ט",
},
1: {
1: "י",
2: "כ",
3: "ל",
4: "מ",
5: "נ",
6: "ס",
7: "ע",
8: "פ",
9: "צ",
},
2: {
1: "ק",
2: "ר",
3: "ש",
4: "ת",
5: "תק",
6: "תר",
7: "תש",
8: "תת",
9: "תתק",
},
3: {
1: "א'",
2: "ב'",
3: "ג'",
4: "ד'",
5: "ה'",
6: "ו'",
7: "ז'",
8: "ח'",
9: "ט'",
},
}
View Source
var SHA1_RE = regexp.MustCompile("^[0-9a-f]{40}$")
View Source
var UID_REGEX = regexp.MustCompile("[a-zA-z0-9]{8}")
Functions ¶
func BindErrorMessage ¶
func ConvertArgsBytes ¶
func ConvertArgsBytes(args [][]byte) []interface{}
func ConvertArgsInt ¶
func ConvertArgsInt(args ...int) []interface{}
func ConvertArgsInt64 ¶
func ConvertArgsInt64(args []int64) []interface{}
func ConvertArgsString ¶
func ConvertArgsString(args []string) []interface{}
func DownloadUrl ¶
func EnvMiddleware ¶
func ErrorHandlingMiddleware ¶
func ErrorHandlingMiddleware() gin.HandlerFunc
func ErrorsToRollbarStack ¶
func ErrorsToRollbarStack(st StackTracer) rollbar.Stack
Convert errors.StackTrace to rollbar.Stack
func GenerateName ¶
func GenerateUID ¶
func HttpPostJson ¶
Send http POST request. Note that json encoding errors are ignored. We expect a valid payload based on https://www.zupzup.org/io-pipe-go/
func MdbLoggerMiddleware ¶
func MdbLoggerMiddleware() gin.HandlerFunc
func Must ¶
func Must(err error)
panic if err != nil. dumps a stack trace to stderr if err satisfies StackTracer
func NumToHebrew ¶
func RandomSHA1 ¶
func RandomSHA1() string
func Reverse ¶
Taken AS IS from https://stackoverflow.com/a/34521190 Note that this implementation DOES NOT handle combining marks correctly
func ValidationErrorMessage ¶
func ValidationErrorMessage(e *validator.FieldError) string
Types ¶
type ContextProvider ¶ added in v0.9.5
type FileName ¶
type FileName struct { Name string Base string Type string // File extension, mp3 or mp4 or other. Language string Rav bool Part string Date time.Time DateStr string }
func ParseFileName ¶
type StackTracer ¶
type StackTracer interface {
StackTrace() errors.StackTrace
}
type TestDBManager ¶
func (*TestDBManager) DestroyTestDB ¶
func (m *TestDBManager) DestroyTestDB() error
func (*TestDBManager) InitTestDB ¶
func (m *TestDBManager) InitTestDB() error
Click to show internal directories.
Click to hide internal directories.