Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTTPErrorHandler ¶
HTTPErrorHandler handle errors
func ManifestHandler ¶
ManifestHandler handles the manifest
Types ¶
type AuthController ¶
type AuthController struct { UserService *services.UserService ProfileService *services.ProfileService }
AuthController auth controller
func NewAuthController ¶
func NewAuthController(db *gorm.DB) *AuthController
NewAuthController creates a new AuthController
func (*AuthController) InitRoutes ¶
func (c *AuthController) InitRoutes(g *echo.Group)
InitRoutes initialize routes for AuthController
type BoatContext ¶
type BoatContext struct { echo.Context Server *config.Server Session *services.Session ProfileService *services.ProfileService MenuService *services.MenuService }
BoatContext custom echo Context for boat
func (*BoatContext) EnsureLoggedIn ¶
func (bc *BoatContext) EnsureLoggedIn() error
EnsureLoggedIn ensures a user is logged in, throws error if not
func (*BoatContext) LoggedIn ¶
func (bc *BoatContext) LoggedIn() bool
LoggedIn checks if a contexts session is logged in
func (*BoatContext) RedirectIfLoggedIn ¶
func (bc *BoatContext) RedirectIfLoggedIn(path string) error
RedirectIfLoggedIn redirects to given path if logged in
func (*BoatContext) ReturnView ¶
ReturnView renders a view, adding some data to the return
type CustomContextHandler ¶
type CustomContextHandler struct { Server *config.Server ProfileService *services.ProfileService MenuService *services.MenuService }
CustomContextHandler struct with a func for handling the custom context intjection
func NewCustomContextHandler ¶
func NewCustomContextHandler(db *gorm.DB, s *config.Server) *CustomContextHandler
NewCustomContextHandler returns a new CustomContextHandler
func (*CustomContextHandler) Handler ¶
func (h *CustomContextHandler) Handler(next echo.HandlerFunc) echo.HandlerFunc
Handler injects our custom context
type FilesController ¶
type FilesController struct {
FileService *services.FileService
}
FilesController routes for uploading and managing files
func NewFilesController ¶
func NewFilesController(db *gorm.DB) *FilesController
NewFilesController returns a new FilesController
func (*FilesController) InitRoutes ¶
func (c *FilesController) InitRoutes(g *echo.Group)
InitRoutes initialize routes for this controller
type MenuController ¶
type MenuController struct {
MenuService *services.MenuService
}
MenuController handlers for menu routes
func NewMenuController ¶
func NewMenuController(db *gorm.DB) *MenuController
NewMenuController returns a new menu controller
func (*MenuController) InitRoutes ¶
func (c *MenuController) InitRoutes(g *echo.Group)
InitRoutes initialize routes for this controller
type PostsController ¶
type PostsController struct {
PostService *services.PostService
}
PostsController controller for posts
func NewPostsController ¶
func NewPostsController(db *gorm.DB) *PostsController
NewPostsController creates a new PostsController
func (*PostsController) InitRoutes ¶
func (c *PostsController) InitRoutes(g *echo.Group)
InitRoutes initialize routes for this controller
type ProfileController ¶
type ProfileController struct {
Service *services.ProfileService
}
ProfileController handles HTTP requests for the profile
func NewProfileController ¶
func NewProfileController(db *gorm.DB) *ProfileController
NewProfileController returns a new ProfileController
func (*ProfileController) InitRoutes ¶
func (c *ProfileController) InitRoutes(g *echo.Group)
InitRoutes initialize the routes for this controller