validator

package
v0.0.6-beta Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseDirectory = "/tmp/baseca/ssl"
)

Variables

View Source
var CertificateAuthorityEnvironments map[types.EnvironmentKey][]string
View Source
var CertificateAuthorityEnvironmentsString map[string][]string

Functions

func Contains

func Contains(s []string, str string) bool

func ConvertNullRawMessageToMap

func ConvertNullRawMessageToMap(nrm pqtype.NullRawMessage) (map[string]string, error)

func IsSupportedCertificateAuthority

func IsSupportedCertificateAuthority(certificate_authority string) bool

func IsSupportedPermission

func IsSupportedPermission(permission string) bool

func IsValidDomain

func IsValidDomain(fully_qualified_domain_name string) bool

func MapToNullRawMessage

func MapToNullRawMessage(m map[string]string) (pqtype.NullRawMessage, error)

func NullStringToString

func NullStringToString(x *sql.NullString) string

func SanitizeInput

func SanitizeInput(input []string) []string

func SetBaseDirectory

func SetBaseDirectory(cfg *config.Config)

func SupportedConfig

func SupportedConfig(cfg *config.Config)

func SupportedEnvironments

func SupportedEnvironments(cfg *config.Config)

func TestValidateInput

func TestValidateInput(t *testing.T)

func ValidateCertificateAuthorityEnvironment

func ValidateCertificateAuthorityEnvironment(config config.Stage, environment string, certificate_authorities []string) bool

func ValidateEmail

func ValidateEmail(email string) bool

func ValidateInput

func ValidateInput(s string) bool

Validate if input only contain alphanumeric

func ValidateSubjectAlternateNames

func ValidateSubjectAlternateNames(request_san []string, valid_san []string, regular_expression string) error

Types

type NullString

type NullString sql.NullString

Jump to

Keyboard shortcuts

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