MCPcopy Create free account
hub / github.com/gotify/server / GetPluginConfByID

Method GetPluginConfByID

database/plugin.go:63–73  ·  view source on GitHub ↗

GetPluginConfByID gets plugin configuration by plugin ID.

(id uint)

Source from the content-addressed store, hash-verified

61
62// GetPluginConfByID gets plugin configuration by plugin ID.
63func (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.
76func (d *GormDatabase) UpdatePluginConf(p *model.PluginConf) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected