Documentation ¶
Index ¶
- Constants
- func CloseDB(a *App) error
- func HandleNewTokenInitialization(a *App) (string, error)
- func InitializeDB(a *App) (*sql.DB, error)
- func PopulateStructWithTables(a *App) error
- func SessionCleaner(a *App, currentTime string) error
- type AccountWrapper
- type App
- type ClientsWrapper
- type DBTable
- type DBTables
- type ProviderWrapper
- type SessionsWrapper
- type UserWrapper
Constants ¶
View Source
const (
DBFilename = "sqlite.db"
)
Variables ¶
This section is empty.
Functions ¶
func CloseDB ¶
CloseAndSaveDB closes the in-memory database and backup the database file if there is any modification.
func HandleNewTokenInitialization ¶
HandleNewInitialization checks if there is ANY user in the database.
func InitializeDB ¶
InitializeDB initializes the database
func PopulateStructWithTables ¶
PopulateStructWithTables updates db struct with tables
func SessionCleaner ¶
SessionCleaner, time as a string
Types ¶
type AccountWrapper ¶
func (*AccountWrapper) ScanFromRows ¶
func (a *AccountWrapper) ScanFromRows(rows *sql.Rows) error
type App ¶
type App struct { TemplateFS fs.FS PublicFS fs.FS LocYML []byte // strings.yml contains the strings for the current language DBDir string DBFilename string DBPath string InitialChecksum string Config common.Config DB *sql.DB DBTables DBTables StartTime time.Time }
func NewServerApp ¶
func NewServerApp(buildConfig *common.BuildConfig) (*App, error)
func (*App) GenerateOauthCallbackURL ¶
GenerateOauthCallbackURL generates the OAuth callback URL
func (*App) GetVersionstring ¶
GetVersion returns the version of the app
func (*App) IsDevEnvironment ¶
func (*App) StartSessionCleaner ¶
func (a *App) StartSessionCleaner()
StartSessionCleaner initializes the session cleaner to run at regular intervals.
type ClientsWrapper ¶
func (*ClientsWrapper) ScanFromRows ¶
func (c *ClientsWrapper) ScanFromRows(rows *sql.Rows) error
type ProviderWrapper ¶
func (*ProviderWrapper) ScanFromRows ¶
func (p *ProviderWrapper) ScanFromRows(rows *sql.Rows) error
type SessionsWrapper ¶
func (*SessionsWrapper) ScanFromRows ¶
func (s *SessionsWrapper) ScanFromRows(rows *sql.Rows) error
type UserWrapper ¶
func (*UserWrapper) ScanFromRows ¶
func (u *UserWrapper) ScanFromRows(rows *sql.Rows) error
Implementation of DBTable for User, Account, Provider, Sessions
Click to show internal directories.
Click to hide internal directories.