package app

import "git.dotya.ml/mirre-mt/pcmt/app"

Index

Variables

var (
	ErrAppSettingsUnset      = errors.New("somehow we got here with settings unset - contact the developer")
	ErrAppAlreadyInitialised = errors.New("app was already initialised")
)

Types

type App

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

func (*App) E

func (a *App) E() *echo.Echo

E returns app's *echo.Echo instance.

func (*App) Init

func (a *App) Init(s *settings.Settings, logger *slogging.Slogger, dbclient *ent.Client) error

Init allows setting App's important fields - once.

func (*App) Logger

func (a *App) Logger() *slogging.Slogger

Logger returns app's pointer to the global logger instance.

func (*App) PrintConfiguration

func (a *App) PrintConfiguration()

PrintConfiguration outputs relevant settings of the application to console.

func (*App) SetEmbeds

func (a *App) SetEmbeds(templates, assets embed.FS)

SetEmbeds saves the embedded files to application state.

func (*App) SetServerSettings

func (a *App) SetServerSettings()

SetServerSettings sets up the main Echo instance and panics on err.

func (*App) SetSettings

func (a *App) SetSettings(s *settings.Settings)

func (*App) SetupRoutes

func (a *App) SetupRoutes() error

type Embeds

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

Source Files

app.go assets.go error.go routes.go server.go

Directories

PathSynopsis
app/settings
Version
v0.0.0-20230910121657-4d10510f5ba4 (latest)
Published
Sep 10, 2023
Platform
linux/amd64
Imports
21 packages
Last checked
1 month ago

Tools for package owners.