validation

package
v1.14.0-rc6 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 8 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"
)

Variables

View Source
var (
	// GitRefNamePatternInvalid is regular expression with unallowed characters in git reference name
	// They cannot have ASCII control characters (i.e. bytes whose values are lower than \040, or \177 DEL), space, tilde ~, caret ^, or colon : anywhere.
	// They cannot have question-mark ?, asterisk *, or open bracket [ anywhere
	GitRefNamePatternInvalid = regexp.MustCompile(`[\000-\037\177 \\~^:?*[]+`)
)

Functions

func AddBindingRules

func AddBindingRules()

AddBindingRules adds additional binding rules

func CheckGitRefAdditionalRulesValid

func CheckGitRefAdditionalRulesValid(name string) bool

CheckGitRefAdditionalRulesValid check name is valid on additional rules

func IsAPIURL added in v1.5.1

func IsAPIURL(uri string) bool

IsAPIURL checks if URL is current Gitea instance API URL

func IsValidExternalTrackerURLFormat

func IsValidExternalTrackerURLFormat(uri string) bool

IsValidExternalTrackerURLFormat checks if URL matches required syntax for external trackers

func IsValidExternalURL added in v1.5.1

func IsValidExternalURL(uri string) bool

IsValidExternalURL checks if URL is valid external URL

func IsValidURL added in v1.5.1

func IsValidURL(uri string) bool

IsValidURL checks if URL 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