utils

package
v0.0.0-...-3d786a4 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MemberRole = "member"
	AdminRole  = "admin"
	RootRoll   = "root"
)
View Source
const (
	AnimeMovieV1  = "AnimeMovieV1"
	AnimeSeasonV1 = "AnimeSeasonV1"
)

Variables

Functions

func CheckPassword

func CheckPassword(password string, hashedPassword string) error

CheckPassword checks if the provided password is correct or not

func CreatedIndex

func CreatedIndex(client *meilisearch.Client, ID string) (*meilisearch.Index, error)

func HashPassword

func HashPassword(password string) (string, error)

HashPassword returns the bcrypt hash of the password

func MeiliSearch

func MeiliSearch(host, key string) *meilisearch.Client

func RandomEmail

func RandomEmail() string

func RandomInt

func RandomInt(min, max int32) int32

func RandomString

func RandomString(n int) string

func RemoveDuplicatesInt64

func RemoveDuplicatesInt64(Nums []int64) []int64

func RemoveDuplicatesTitles

func RemoveDuplicatesTitles(Titles []string) []string

func ValidateDate

func ValidateDate(input string) error

func ValidateDuration

func ValidateDuration(value string) error

func ValidateEmail

func ValidateEmail(value string) error

func ValidateFullName

func ValidateFullName(value string) error

func ValidateGenreAndStudio

func ValidateGenreAndStudio(values []string) error

func ValidateIMDbID

func ValidateIMDbID(value string) error

func ValidateImage

func ValidateImage(value string) error

func ValidateInt

func ValidateInt(value int64) error

func ValidateMAC

func ValidateMAC(value string) error

func ValidatePassword

func ValidatePassword(value string) error

func ValidateQuality

func ValidateQuality(value string) error

func ValidateSecretCode

func ValidateSecretCode(value string) error

func ValidateShow

func ValidateShow(value string) error

func ValidateString

func ValidateString(value string, minLength int, maxLength int) error

func ValidateToken

func ValidateToken(value string) error

func ValidateURL

func ValidateURL(value, domain string) error

func ValidateUsername

func ValidateUsername(value string) error

func ValidateYear

func ValidateYear(value int32) error

Types

type Document

type Document struct {
	ID     int64    `json:"ID"`
	Titles []string `json:"titles"`
}

Jump to

Keyboard shortcuts

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