MCPcopy Create free account
hub / github.com/cloudbase/garm / Validate

Method Validate

config/config.go:625–631  ·  view source on GitHub ↗

Validate validates a Database config entry

()

Source from the content-addressed store, hash-verified

623
624// Validate validates a Database config entry
625func (m *MySQL) Validate() error {
626 if m.Username == "" || m.Password == "" || m.Hostname == "" || m.DatabaseName == "" {
627 return fmt.Errorf(
628 "database, username, password, hostname are mandatory parameters for the database section")
629 }
630 return nil
631}
632
633// ConnectionString returns a gorm compatible connection string
634func (m *MySQL) ConnectionString() (string, error) {

Callers 15

ConnectionStringMethod · 0.95
CreateRepositoryMethod · 0.45
CreateTemplateMethod · 0.45
UpdateTemplateMethod · 0.45
CreateEnterpriseMethod · 0.45
UpdateControllerMethod · 0.45
CreateGithubEndpointMethod · 0.45
UpdateGithubEndpointMethod · 0.45
CreateOrganizationMethod · 0.45

Calls

no outgoing calls

Tested by 10

TestConfigFunction · 0.36
TestDefaultSectionConfigFunction · 0.36
TestAPIBindAddressFunction · 0.36
TestDatabaseConfigFunction · 0.36
TestSQLiteConfigFunction · 0.36
TestJWTAuthConfigFunction · 0.36
TestGithubConfigFunction · 0.36
TestExternalFunction · 0.36