frontend

package
v0.0.0-...-f56eaae Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: BSD-3-Clause Imports: 19 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerFunc

type HandlerFunc func(w http.ResponseWriter, r *http.Request, s staticapi.IServer)

HandlerFunc defines a function handled by the server

type HandlerPrivateFunc

type HandlerPrivateFunc func(w http.ResponseWriter, r *auth.AuthenticatedRequest, s staticapi.IServer)

type Server

type Server struct {
	http.Server
	// contains filtered or unexported fields
}

Server struct contains server info and db interfaces

func New

func New(
	bindAddr string,
	tplPath string,
	repositoryAPI webrepository.WebRepository,
	publicationAPI webpublication.WebPublication,
	userAPI webuser.WebUser,
	dashboardAPI webdashboard.WebDashboard,
	licenseAPI weblicense.WebLicense,
	purchaseAPI webpurchase.WebPurchase,
	basicAuth *auth.BasicAuth) *Server

New creates a new webserver (basic user interface)

func (*Server) DashboardAPI

func (server *Server) DashboardAPI() webdashboard.WebDashboard

DashboardAPI ( staticapi.IServer )returns DB interface for dashboard

func (*Server) LicenseAPI

func (server *Server) LicenseAPI() weblicense.WebLicense

LicenseAPI ( staticapi.IServer )returns DB interface for license

func (*Server) PublicationAPI

func (server *Server) PublicationAPI() webpublication.WebPublication

PublicationAPI ( staticapi.IServer )returns DB interface for users

func (*Server) PurchaseAPI

func (server *Server) PurchaseAPI() webpurchase.WebPurchase

PurchaseAPI ( staticapi.IServer )returns DB interface for purchases

func (*Server) RepositoryAPI

func (server *Server) RepositoryAPI() webrepository.WebRepository

RepositoryAPI ( staticapi.IServer ) returns interface for repositories

func (*Server) UserAPI

func (server *Server) UserAPI() webuser.WebUser

UserAPI ( staticapi.IServer )returns DB interface for users

Jump to

Keyboard shortcuts

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