Validate validates a Database config entry
()
| 623 | |
| 624 | // Validate validates a Database config entry |
| 625 | func (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 |
| 634 | func (m *MySQL) ConnectionString() (string, error) { |
no outgoing calls