Documentation ¶
Index ¶
- Variables
- func AddToUserNotes(message string, user int) error
- func AddY(c *gin.Context, y string)
- func LogIP(c *gin.Context, user int) error
- func SafeUsername(u string) string
- func SetCountry(c *gin.Context, userID int) error
- func SetYCookie(userID int, c *gin.Context)
- func ValidateEmail(email string) bool
- func ValidateUsername(s string) string
- type Geolocation
Constants ¶
This section is empty.
Variables ¶
View Source
var EmailValidator = ev.NewDepBuilder( ev.ValidatorMap{ ev.RoleValidatorName: ev.NewRoleValidator(role.NewRBEASetRole()), ev.DisposableValidatorName: ev.NewDisposableValidator(contains.NewFunc(disposable.MailChecker)), ev.SyntaxValidatorName: ev.NewSyntaxValidator(), ev.MXValidatorName: ev.DefaultNewMXValidator(), }, ).Build()
build validator without smtp check as it caused issues.
Functions ¶
func AddToUserNotes ¶
func SafeUsername ¶
func SetYCookie ¶
func ValidateEmail ¶
func ValidateUsername ¶
Types ¶
type Geolocation ¶
type Geolocation struct { Country string `json:"country"` CountryCode string `json:"countryCode"` Region string `json:"region"` RegionName string `json:"regionName"` City string `json:"city"` Zip string `json:"zip"` Lat string `json:"lat"` Lon string `json:"lon"` Timezone string `json:"timezone"` Isp string `json:"isp"` Org string `json:"org"` As string `json:"as"` Query string `json:"query"` }
Expects structure from http://ip-api.com/json/{ip}
Click to show internal directories.
Click to hide internal directories.