util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidURLId          = errors.New("invalid url id")
	ErrInvalidURL            = errors.New("invalid url")
	ErrEmptyURLs             = errors.New("urls can't be empty")
	ErrEmptyCategory         = errors.New("category can't be empty")
	ErrInvalidCount          = errors.New("invalid count")
	ErrGetCategory           = errors.New("category could not be fetched")
	ErrDecodeBase64URL       = errors.New("base64 url could not be decoded")
	ErrUpdateCategory        = errors.New("category could not be updated")
	ErrSaveURL               = errors.New("url could not be saved")
	ErrUpdateURL             = errors.New("url could not be updated")
	ErrDeleteURL             = errors.New("url could not be updated")
	ErrNotPerformedOperation = errors.New("operation could not be performed")
)

Contains error codes for categorization service.

Functions

func ValidateCategories

func ValidateCategories(categories []string) error

ValidateCategories validates the category count.

func ValidateCount

func ValidateCount(count string) (int, error)

ValidateCount validates if it's a integer count.

func ValidateId

func ValidateId(id string) error

ValidateId validates if it's a valid url id.

func ValidateURL

func ValidateURL(reqURL string) error

ValidateURLs validates if it's a real url.

func ValidateURLs

func ValidateURLs(urls []string) error

ValidateURLs validates the url count.

Types

This section is empty.

Jump to

Keyboard shortcuts

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