Documentation
¶
Index ¶
- Variables
- func AssertYamlEquality(t *testing.T, a, b []byte)
- func CompleteDockerComposeYaml(maintainer, appName, filePath string) error
- func IsValidURLPath(path string) bool
- func ReadBody[T any](w http.ResponseWriter, r *http.Request) (*T, error)
- func ValidateSecret(input string) error
- func ValidateStruct(s interface{}) error
- func ValidateVersion(zipBytes []byte, maintainerName, appName string) error
- func ZipDirectory(dirPath string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ValidationTypeMap = map[string]*regexp.Regexp{ "USER_NAME": regexp.MustCompile("^[a-z0-9]{3,20}$"), "APP_NAME": regexp.MustCompile("^[a-z0-9-]{3,20}$"), "VERSION_NAME": regexp.MustCompile("^[a-z0-9.]{3,20}$"), "SEARCH_TERM": regexp.MustCompile("^[a-z0-9]{0,20}$"), "PASSWORD": regexp.MustCompile("^[a-zA-Z0-9!@#$%&_,.?]{8,30}$"), "EMAIL": regexp.MustCompile(`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`), "NUMBER": regexp.MustCompile("^[0-9]{1,20}$"), }
Functions ¶
func AssertYamlEquality ¶
func IsValidURLPath ¶
func ValidateSecret ¶ added in v0.0.77
As we do not receive sensitive data in request bodies such as secrets or cookie values, this is a separate concern in a separate function.
func ValidateStruct ¶ added in v0.0.78
func ValidateStruct(s interface{}) error
func ValidateVersion ¶
func ZipDirectory ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.