Documentation ¶
Index ¶
- Constants
- Variables
- type APIResponse
- type App
- func (a *App) BackgroundWorker()
- func (a *App) Configure() error
- func (a *App) ConfigureDatabase() error
- func (a *App) ConfigureLocalizer() error
- func (a *App) ConfigureLogger()
- func (a *App) ConfigureWebserver() error
- func (a *App) ReadConfiguration() error
- func (a *App) ResetConfiguration() error
- func (a *App) Serve() error
- func (a *App) UpdateWorkout(i int) error
- func (a *App) ValidateAPIKeyMiddleware(key string, c echo.Context) (bool, error)
- func (a *App) ValidateAdminMiddleware(next echo.HandlerFunc) echo.HandlerFunc
- func (a *App) ValidateUserMiddleware(ctx echo.Context)
- type Template
- type Version
Constants ¶
View Source
const ( FileAddDelay = -1 * time.Minute WorkerDelay = 1 * time.Minute )
View Source
const ( BrowserLanguage = "browser" DefaultTotalsShow = database.WorkoutTypeRunning )
Variables ¶
View Source
var ( ErrWorker = errors.New("worker error") ErrNothingImported = errors.New("nothing imported") )
View Source
var ErrInvalidAPIKey = errors.New("invalid API key")
View Source
var ErrInvalidJWTToken = errors.New("invalid JWT token")
View Source
var ErrLoginFailed = errors.New("username or password incorrect")
View Source
var ErrUserNotFound = errors.New("user not found")
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶ added in v0.11.1
type APIResponse struct { Errors []string `json:"errors"` Results interface{} `json:"results"` }
type App ¶
type App struct { Version Version Config database.Config Assets fs.FS Views fs.FS Translations fs.FS // contains filtered or unexported fields }
func (*App) BackgroundWorker ¶
func (a *App) BackgroundWorker()
func (*App) ConfigureDatabase ¶
func (*App) ConfigureLocalizer ¶
func (*App) ConfigureLogger ¶
func (a *App) ConfigureLogger()
func (*App) ConfigureWebserver ¶
func (*App) ReadConfiguration ¶
func (*App) ResetConfiguration ¶ added in v0.13.4
func (*App) UpdateWorkout ¶
func (*App) ValidateAPIKeyMiddleware ¶ added in v0.11.1
func (*App) ValidateAdminMiddleware ¶
func (a *App) ValidateAdminMiddleware(next echo.HandlerFunc) echo.HandlerFunc
func (*App) ValidateUserMiddleware ¶
func (a *App) ValidateUserMiddleware(ctx echo.Context)
Click to show internal directories.
Click to hide internal directories.