The Database interface for encapsulating database access.
| 16 | |
| 17 | // The Database interface for encapsulating database access. |
| 18 | type Database interface { |
| 19 | GetApplicationByToken(token string) (*model.Application, error) |
| 20 | GetClientByToken(token string) (*model.Client, error) |
| 21 | GetPluginConfByToken(token string) (*model.PluginConf, error) |
| 22 | GetUserByName(name string) (*model.User, error) |
| 23 | GetUserByID(id uint) (*model.User, error) |
| 24 | UpdateClientTokensLastUsed(tokens []string, t *time.Time) error |
| 25 | UpdateApplicationTokenLastUsed(token string, t *time.Time) error |
| 26 | } |
| 27 | |
| 28 | // Auth is the provider for authentication middleware. |
| 29 | type Auth struct { |
no outgoing calls
no test coverage detected
searching dependent graphs…