The Database interface for encapsulating database access.
| 23 | |
| 24 | // The Database interface for encapsulating database access. |
| 25 | type Database interface { |
| 26 | GetUsers() ([]*model.User, error) |
| 27 | GetPluginConfByUserAndPath(userid uint, path string) (*model.PluginConf, error) |
| 28 | CreatePluginConf(p *model.PluginConf) error |
| 29 | GetPluginConfByApplicationID(appid uint) (*model.PluginConf, error) |
| 30 | UpdatePluginConf(p *model.PluginConf) error |
| 31 | CreateMessage(message *model.Message) error |
| 32 | GetPluginConfByID(id uint) (*model.PluginConf, error) |
| 33 | GetPluginConfByToken(token string) (*model.PluginConf, error) |
| 34 | GetUserByID(id uint) (*model.User, error) |
| 35 | CreateApplication(application *model.Application) error |
| 36 | UpdateApplication(app *model.Application) error |
| 37 | GetApplicationsByUser(userID uint) ([]*model.Application, error) |
| 38 | GetApplicationByToken(token string) (*model.Application, error) |
| 39 | } |
| 40 | |
| 41 | // Notifier notifies when a new message was created. |
| 42 | type Notifier interface { |
no outgoing calls
no test coverage detected
searching dependent graphs…