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

Interface Database

auth/authentication.go:18–26  ·  view source on GitHub ↗

The Database interface for encapsulating database access.

Source from the content-addressed store, hash-verified

16
17// The Database interface for encapsulating database access.
18type 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.
29type Auth struct {

Callers 15

RequireAdminMethod · 0.65
RequireClientMethod · 0.65
OptionalMethod · 0.65
pluginConfExistsMethod · 0.65
TestPluginConfMethod · 0.65
TestUserPluginsMethod · 0.65
userFromBasicAuthMethod · 0.65
RequireAdminMethod · 0.65
TestClientMethod · 0.65
RequireClientMethod · 0.65

Implementers 1

GormDatabasedatabase/database.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…