GetPluginConfByID gets plugin configuration by plugin ID.
(id uint)
| 61 | |
| 62 | // GetPluginConfByID gets plugin configuration by plugin ID. |
| 63 | func (d *GormDatabase) GetPluginConfByID(id uint) (*model.PluginConf, error) { |
| 64 | plugin := new(model.PluginConf) |
| 65 | err := d.DB.Where("id = ?", id).First(plugin).Error |
| 66 | if err == gorm.ErrRecordNotFound { |
| 67 | err = nil |
| 68 | } |
| 69 | if plugin.ID == id { |
| 70 | return plugin, err |
| 71 | } |
| 72 | return nil, err |
| 73 | } |
| 74 | |
| 75 | // UpdatePluginConf updates plugin configuration. |
| 76 | func (d *GormDatabase) UpdatePluginConf(p *model.PluginConf) error { |
nothing calls this directly
no outgoing calls
no test coverage detected