Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouterBuilder ¶
type RouterBuilder func(app *core.Application, config *entities.Config, logger ports.LoggerPort, fiberapp *fiber.App) error
RouterBuilder is a function that builds the router. The function is called with the application, the config and the fiber app. The function should return an error if something went wrong.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the server.
func NewServer ¶
func NewServer(config *entities.Config, app *core.Application, logger ports.LoggerPort) *Server
NewServer creates a new server. The server is not started. The server is created with the given config and application.
func (*Server) CreateDefaultRouter ¶
CreateDefaultRouter creates the default router. The default router serves the static files from the theme. Registers routes for all pages.
func (*Server) CreateRouter ¶
func (s *Server) CreateRouter(builder RouterBuilder) error
CreateRouter creates the router with the given builder. The builder is called with the application, the config and the fiber app. The builder should return an error if something went wrong.