validators

package
v0.0.0-...-6965a8e Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AvailableGetHash

func AvailableGetHash(val string) bool

func AvailableGetHashValidator

func AvailableGetHashValidator() (string, func(validator.FieldLevel) bool)

func AvailablePostHash

func AvailablePostHash(val string) bool

func AvailablePostHashValidator

func AvailablePostHashValidator() (string, func(validator.FieldLevel) bool)

func GetValidator

func GetValidator() *validator.Validate

Types

type HashGetParamDto

type HashGetParamDto struct {
	Hash string `json:"hash" validate:"required,availableGetHash"`
}

type HashPostParamDto

type HashPostParamDto struct {
	Hash string `json:"hash" validate:"required,availablePostHash"`
}

type URLBodyDto

type URLBodyDto struct {
	URL string `json:"url" validate:"required,http_url"`
}

Jump to

Keyboard shortcuts

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