app

package
v0.14.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 38 Imported by: 0

Documentation

Index

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 NewApp

func NewApp(version Version) *App

func (*App) BackgroundWorker

func (a *App) BackgroundWorker()

func (*App) Configure

func (a *App) Configure() error

func (*App) ConfigureDatabase

func (a *App) ConfigureDatabase() error

func (*App) ConfigureLocalizer

func (a *App) ConfigureLocalizer() error

func (*App) ConfigureLogger

func (a *App) ConfigureLogger()

func (*App) ConfigureWebserver

func (a *App) ConfigureWebserver() error

func (*App) ReadConfiguration

func (a *App) ReadConfiguration() error

func (*App) ResetConfiguration added in v0.13.4

func (a *App) ResetConfiguration() error

func (*App) Serve

func (a *App) Serve() error

func (*App) UpdateWorkout

func (a *App) UpdateWorkout(i int) error

func (*App) ValidateAPIKeyMiddleware added in v0.11.1

func (a *App) ValidateAPIKeyMiddleware(key string, c echo.Context) (bool, error)

func (*App) ValidateAdminMiddleware

func (a *App) ValidateAdminMiddleware(next echo.HandlerFunc) echo.HandlerFunc

func (*App) ValidateUserMiddleware

func (a *App) ValidateUserMiddleware(ctx echo.Context)

type Template

type Template struct {
	// contains filtered or unexported fields
}

func (*Template) Render

func (t *Template) Render(w io.Writer, name string, data interface{}, ctx echo.Context) error

type Version

type Version struct {
	BuildTime string
	Ref       string
	RefName   string
	RefType   string
	Sha       string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL