routes

package
v0.0.0-...-d777169 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	R = gin.Default()
)

Exported routes variables

Functions

func GetRoutes

func GetRoutes()

getRoutes ... creates our routes for our entire application. This way every group of routes can be defined in their own files.

func URLValidation

func URLValidation(c *gin.Context, hostname string) error

URLValidation ... IsValidDomain returns true if the domain is valid. It uses a simple regular expression to check the domain validity.

Types

type DateTime

type DateTime struct {
	DateTime time.Time `json:"datetime"`
}

DateTime struct

type Default

type Default struct {
	IP      string `json:"ip"`
	Message string `json:"message"`
}

Default struct

type Hash

type Hash struct {
	Text           string `json:"text" binding:"required" validate:"nonzero"`
	HashTypeMD5    string `json:"hash (md5)"`
	HashTypeSHA1   string `json:"hash (sha1)"`
	HashTypeSHA256 string `json:"hash (sha256)"`
	HashTypeSHA512 string `json:"hash (sha512)"`
}

Hash struct

type Msg

type Msg struct {
	Message string `json:"message"`
}

Msg struct

Jump to

Keyboard shortcuts

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