Documentation ¶
Index ¶
Constants ¶
View Source
const ( MinResNameLength = 1 MaxResNameLength = 200 MinWorkspaceDescLength = 0 MaxWorkspaceDescLength = 1000 MinDataModelNameLength = 1 MaxDataModelNameLength = 30 MaxEntitySetDataModelNameLength = 50 MaxDataModelHeaderLength = 100 MaxDataModelRowIDLength = 100 MinSubmissionNameSuffixLength = 1 MaxSubmissionNameSuffixLength = 200 // SubmissionName = WorkflowName + "-history-" + Suffix MinSubmissionNameLength = MinResNameLength + 9 + MinSubmissionNameSuffixLength MaxSubmissionNameLength = MaxResNameLength + 9 + MaxSubmissionNameSuffixLength MaxSubmissionDescLength = 1000 )
length validator.
Variables ¶
View Source
var ( ResNameRegex = regexp.MustCompile(`^[\p{Han}A-Za-z0-9][-_\p{Han}A-Za-z0-9]*$`) // DataModelNameReg _${data_model}(data model name) is the data model stored for submission DataModelNameReg = regexp.MustCompile("^[0-9a-zA-Z_][0-9a-zA-Z-_]*$") // DataModelHeaderReg _${data_model}_id(data model id header) is the data model stored for submission DataModelHeaderReg = regexp.MustCompile("^[0-9a-zA-Z_][0-9a-zA-Z-_]*$") )
Functions ¶
func RegisterValidators ¶
func RegisterValidators() error
RegisterValidators registers k8s validators.
func Validate ¶
func Validate(s interface{}) error
Validate can validate struct field with validate tag.
func ValidateDataModelNameInString ¶
ValidateDataModelNameInString ...
func ValidateNFSMountPathInString ¶
ValidateNFSMountPathInString ...
func ValidateResNameInString ¶
ValidateResNameInString ...
func ValidateWorkspaceDescInString ¶
ValidateWorkspaceDescInString ...
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.