| 567 | } |
| 568 | |
| 569 | func (app *App) InitDecoder() { |
| 570 | // TODO: do this at the package level, instead of the App level |
| 571 | // Initialize modules |
| 572 | app.formDecoder = schema.NewDecoder() |
| 573 | app.formDecoder.RegisterConverter(converter.NullJSONString{}, converter.ConvertJSONNullString) |
| 574 | app.formDecoder.RegisterConverter(converter.NullJSONBool{}, converter.ConvertJSONNullBool) |
| 575 | app.formDecoder.RegisterConverter(sql.NullString{}, converter.ConvertSQLNullString) |
| 576 | app.formDecoder.RegisterConverter(sql.NullBool{}, converter.ConvertSQLNullBool) |
| 577 | app.formDecoder.RegisterConverter(sql.NullInt64{}, converter.ConvertSQLNullInt64) |
| 578 | app.formDecoder.RegisterConverter(sql.NullFloat64{}, converter.ConvertSQLNullFloat64) |
| 579 | } |
| 580 | |
| 581 | // ConnectToDatabase validates and connects to the configured database, then |
| 582 | // tests the connection. |