model

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var URLMatchRegex *regexp.Regexp

Functions

func CompileURLRegex added in v1.5.0

func CompileURLRegex(expr string) *regexp.Regexp

CompileURLRegex compiles the regex for validating url

func ValidateURL added in v1.5.0

func ValidateURL(url string) bool

ValidateURL validates the url, return true if valid

Types

type URL

type URL struct {
	ID        uint64 `gorm:"primary_key"`
	CreatedAt time.Time
	ShortURL  string `gorm:"index"`
	LongURL   string `gorm:"index"`
}

URL is the model for the Url table

Jump to

Keyboard shortcuts

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