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

Method GetPluginConfByToken

database/plugin.go:50–60  ·  view source on GitHub ↗

GetPluginConfByToken gets plugin configuration by plugin token.

(token string)

Source from the content-addressed store, hash-verified

48
49// GetPluginConfByToken gets plugin configuration by plugin token.
50func (d *GormDatabase) GetPluginConfByToken(token string) (*model.PluginConf, error) {
51 plugin := new(model.PluginConf)
52 err := d.DB.Where("token = ?", token).First(plugin).Error
53 if err == gorm.ErrRecordNotFound {
54 err = nil
55 }
56 if plugin.Token == token {
57 return plugin, err
58 }
59 return nil, err
60}
61
62// GetPluginConfByID gets plugin configuration by plugin ID.
63func (d *GormDatabase) GetPluginConfByID(id uint) (*model.PluginConf, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected