validation

package module
v0.0.0-...-26d85b9 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

validation

Documentation

Index

Constants

View Source
const (
	K8S_NAME_PATTERN   = `^[a-z]([-a-z0-9]*[a-z0-9])?$`
	K8S_DOMAIN_PATTERN = `^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,20}$`
)

Variables

View Source
var (
	ErrBadWorkspace = errors.New("Err Bad Workspace")
	ErrBadUser      = errors.New("Err Bad User")
	ErrBadEmail     = errors.New("Err Bad Email")
	ErrBadPassword  = errors.New("Err Bad Password")
	ErrBadUUID      = errors.New("Err Bad UUID")
)

Functions

func CheckNewPassRequest

func CheckNewPassRequest(user, newPass, uuidCode string) error

func CheckResetPassRequest

func CheckResetPassRequest(newPass, oldPass string) error

func CheckSignupRequest

func CheckSignupRequest(user, email, pass string) error

func CheckTokenRequest

func CheckTokenRequest(user, pass string) error

func CheckWorkspaceName

func CheckWorkspaceName(ws string) error

func K8sCheckDomain

func K8sCheckDomain(domain string) bool

func K8sCheckName

func K8sCheckName(name string) bool

Kubernetes namespace name must match this regular expression: ^[a-z]([-a-z0-9]*[a-z0-9])?$ - Must start with a lowercase letter or digit. - Can contain lowercase letters, digits, and dashes. - Must end with a lowercase letter or digit. - Can be up to 63 characters long.

func MongoIndexValidate

func MongoIndexValidate(id string) error

func ValidationAppName

func ValidationAppName(app string) bool

func ValidationCodeNumber

func ValidationCodeNumber(code string) bool

func ValidationCompanyName

func ValidationCompanyName(co string) bool

func ValidationDomain

func ValidationDomain(domain string) bool

func ValidationEmail

func ValidationEmail(email string) bool

func ValidationPass

func ValidationPass(pass string) bool

func ValidationPhonNumber

func ValidationPhonNumber(num string) bool

func ValidationUUID

func ValidationUUID(uuid string) bool

func ValidationWord

func ValidationWord(w string) bool

func ValidationWorkspaceName

func ValidationWorkspaceName(ws string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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