Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeServerName ¶
SanitizeServerName removes any characters that are not alphanumeric, spaces, hyphens, underscores, or periods. Use this when you need to clean a name rather than reject it outright.
func ValidateServerName ¶
ValidateServerName checks if the server name contains only safe characters.
Types ¶
type CreateServerValidator ¶
type CreateServerValidator struct {
// contains filtered or unexported fields
}
func NewCreateServerValidator ¶
func NewCreateServerValidator(serverService *services.ServerService) *CreateServerValidator
func (*CreateServerValidator) Validate ¶
func (v *CreateServerValidator) Validate(form forms.CreateServer) map[string]string
type ServerUpdateValidator ¶
type ServerUpdateValidator struct {
// contains filtered or unexported fields
}
func NewServerUpdateValidator ¶
func NewServerUpdateValidator(serverService *services.ServerService) *ServerUpdateValidator
func (*ServerUpdateValidator) Validate ¶
func (v *ServerUpdateValidator) Validate(form forms.UpdateServer, currentServer *models.Server) map[string]string
Click to show internal directories.
Click to hide internal directories.