Documentation
¶
Index ¶
- Constants
- func Email(email string) bool
- func IsNumber(value int, min int, max int) bool
- func IsPositiveNumber(value int) bool
- func IsTime(time string) bool
- func MaxLength(text string, length int) bool
- func Name(name string) bool
- func NewUsername(name string) bool
- func OneOf(value string, values []string) bool
- func Password(password string) bool
- func Required(text string) bool
- func SSHPrivateKey(key string) bool
- func SSHPublicKeys(keys string) bool
- func Subdomain(subdomain string) bool
- func TokenName(name string) bool
- func UUID(uuid string) bool
- func Uri(uri string) bool
- func Username(name string) bool
- func ValidateStackDefinition(req *apiclient.StackDefinitionRequest) []apiclient.ValidationError
- func VarName(name string) bool
Constants ¶
View Source
const MaxNewUsernameLen = 24
MaxNewUsernameLen is the longest username a new user may have. Usernames begin hostnames and names of 63 characters at most: a space's web host label <username>--<space>--<port>, a tunnel's <username>--<tunnel>, and a bucket's <username>--<name>. 24 leaves room for the rest.
Variables ¶
This section is empty.
Functions ¶
func IsPositiveNumber ¶
func NewUsername ¶ added in v0.37.0
NewUsername is the stricter rule for creating a user: a valid username of at most MaxNewUsernameLen characters ending in a letter or digit. Existing usernames are only held to Username.
func SSHPrivateKey ¶ added in v0.25.0
func SSHPublicKeys ¶ added in v0.25.0
func ValidateStackDefinition ¶ added in v0.24.0
func ValidateStackDefinition(req *apiclient.StackDefinitionRequest) []apiclient.ValidationError
ValidateStackDefinition checks structural validity of a stack definition request. Returns a slice of validation errors (empty if valid).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.