gitea: Index | Files

package validation

import ""


Package Files

binding.go helpers.go


const (
    // ErrGitRefName is git reference name error
    ErrGitRefName = "GitRefNameError"

    // ErrGlobPattern is returned when glob pattern is invalid
    ErrGlobPattern = "GlobPattern"


var (
    // GitRefNamePattern 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
    GitRefNamePattern = regexp.MustCompile(`[\000-\037\177 \\~^:?*[]+`)

func AddBindingRules Uses

func AddBindingRules()

AddBindingRules adds additional binding rules

func IsAPIURL Uses

func IsAPIURL(uri string) bool

IsAPIURL checks if URL is current Gitea instance API URL

func IsValidExternalTrackerURLFormat Uses

func IsValidExternalTrackerURLFormat(uri string) bool

IsValidExternalTrackerURLFormat checks if URL matches required syntax for external trackers

func IsValidExternalURL Uses

func IsValidExternalURL(uri string) bool

IsValidExternalURL checks if URL is valid external URL

func IsValidURL Uses

func IsValidURL(uri string) bool

IsValidURL checks if URL is valid

Package validation imports 8 packages (graph) and is imported by 40 packages. Updated 2019-10-01. Refresh now. Tools for package owners.