validation

package
v0.0.0-...-949612f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ErrGitRefName is git reference name error
	ErrGitRefName = "GitRefNameError"
	// ErrGlobPattern is returned when glob pattern is invalid
	ErrGlobPattern = "GlobPattern"
	// ErrRegexPattern is returned when a regex pattern is invalid
	ErrRegexPattern = "RegexPattern"
	// ErrUsername is username error
	ErrUsername = "UsernameError"
	// ErrInvalidGroupTeamMap is returned when a group team mapping is invalid
	ErrInvalidGroupTeamMap = "InvalidGroupTeamMap"
)

Variables

This section is empty.

Functions

func AddBindingRules

func AddBindingRules()

AddBindingRules adds additional binding rules

func IsAPIURL

func IsAPIURL(uri string) bool

IsAPIURL checks if URL is current Gitea instance API URL

func IsEmailDomainListed

func IsEmailDomainListed(globs []glob.Glob, email string) bool

IsEmailDomainListed checks whether the domain of an email address matches a list of domains

func IsValidExternalTrackerURLFormat

func IsValidExternalTrackerURLFormat(uri string) bool

IsValidExternalTrackerURLFormat checks if URL matches required syntax for external trackers

func IsValidExternalURL

func IsValidExternalURL(uri string) bool

IsValidExternalURL checks if URL is valid external URL

func IsValidSiteURL

func IsValidSiteURL(uri string) bool

IsValidSiteURL checks if URL is valid

func IsValidURL

func IsValidURL(uri string) bool

IsValidURL checks if URL is valid

func IsValidUsername

func IsValidUsername(name string) bool

IsValidUsername checks if username is valid

Types

This section is empty.

Jump to

Keyboard shortcuts

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