You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
415 B
24 lines
415 B
package gen
|
|
|
|
// DOOption gorm option interface
|
|
type DOOption interface {
|
|
Apply(*DOConfig) error
|
|
AfterInitialize(*DO) error
|
|
}
|
|
|
|
type DOConfig struct {
|
|
}
|
|
|
|
// Apply update config to new config
|
|
func (c *DOConfig) Apply(config *DOConfig) error {
|
|
if config != c {
|
|
*config = *c
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// AfterInitialize initialize plugins after db connected
|
|
func (c *DOConfig) AfterInitialize(db *DO) error {
|
|
return nil
|
|
}
|