user

package
v0.0.0-...-a408947 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

build validator without smtp check as it caused issues.

Functions

func AddToUserNotes

func AddToUserNotes(message string, user int) error

func AddY

func AddY(c *gin.Context, y string)

func LogIP

func LogIP(c *gin.Context, user int) error

func SafeUsername

func SafeUsername(u string) string

func SetCountry

func SetCountry(c *gin.Context, userID int) error

func SetYCookie

func SetYCookie(userID int, c *gin.Context)

func ValidateEmail

func ValidateEmail(email string) bool

func ValidateUsername

func ValidateUsername(s string) string

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}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL