Documentation ¶
Index ¶
- func AllowIfNotLoggedIn(jwtSecret []byte) func(*fiber.Ctx) error
- func AlwaysRequireAuthentication(jwtSecret []byte, sender Sender) func(*fiber.Ctx) error
- func ConfigurableAuthentication(jwtSecret []byte, sender Sender, requireAuth bool) func(*fiber.Ctx) error
- func New(cfg Config, controllers Controllers, sender Sender, progress ProgressInfo) *fiber.App
- func RequireAdmin(c *fiber.Ctx) error
- func SetFQDN(cfg Config) func(*fiber.Ctx) error
- func SetProgress(progress ProgressInfo) func(*fiber.Ctx) error
- type Config
- type Controllers
- type ProgressInfo
- type Sender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowIfNotLoggedIn ¶
AllowIfNotLoggedIn only allows processing the request if there is no session
func AlwaysRequireAuthentication ¶
AlwaysRequireAuthentication returns forbidden and renders the login page if the user trying to access has not logged in
func ConfigurableAuthentication ¶
func ConfigurableAuthentication(jwtSecret []byte, sender Sender, requireAuth bool) func(*fiber.Ctx) error
ConfigurableAuthentication allows to enable or disable authentication on routes which may or may not require it
func New ¶
func New(cfg Config, controllers Controllers, sender Sender, progress ProgressInfo) *fiber.App
New builds a new Fiber application and set up the required routes
func RequireAdmin ¶
func RequireAdmin(c *fiber.Ctx) error
RequireAdmin returns HTTP forbidden if the user requesting access is not an admin
func SetFQDN ¶
SetFQDN composes the Fully Qualified Domain Name of the host running the app and sets it as a local variable of the request
func SetProgress ¶
func SetProgress(progress ProgressInfo) func(*fiber.Ctx) error
SetProgress retrieves indexing progress information from the index and sets it as a local variable of the request
Types ¶
type Controllers ¶
type Controllers struct { Auth *auth.Controller Users *user.Controller Highlights *highlight.Controller Documents *document.Controller Home *home.Controller Authors *author.Controller }