framework

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAppContext

func NewAppContext(w http.ResponseWriter, r *http.Request, app *App) *appctx.AppContext

Types

type App

type App struct {
	Router        *mux.Router
	DB            *gorm.DB
	MediaService  *media.MediaServise
	LogService    logger.LoggerInterface
	NotivyService notifications.NotificationsInterface
	AppLogDiff    applog.AppLogDiffInterface
}

App has router and db instances

func NewApp

func NewApp(db *gorm.DB, notivyService notifications.NotificationsInterface) *App

Initialize initializes the app with predefined configuration

func (*App) AutoRegister added in v0.0.11

func (app *App) AutoRegister(view views.ViewInterface, path string, baseRout *mux.Router, mutatingCtx func(*appctx.AppContext))

func (*App) RegisterGenericMapView

func (app *App) RegisterGenericMapView(path string, baseRout *mux.Router, viewsAPI map[views.ViewSetMethod]func(*appctx.AppContext))

func (*App) RegisterGenericView

func (app *App) RegisterGenericView(path string, baseRout *mux.Router, view views.ViewInterface)

func (*App) RegisterHundler

func (app *App) RegisterHundler(methods []string, path string, baseRout *mux.Router, hundler func(*appctx.AppContext))

Jump to

Keyboard shortcuts

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