app

package
v0.0.0-...-8c61d13 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config    *m.Config
	DB        *db.DB
	Scheduler *scheduler.Scheduler
	// Authenticator *authentication.Authenticator
	Settings m.Settings
}

App represents dependencies which will be injected into the Server handlers.

func New

func New(c string) *App

New initiates a new App instance and returns it.

func (*App) ApiGetBookmark

func (app *App) ApiGetBookmark(c echo.Context) error

ApiGetBookmark gets a single bookmark matching the hash

func (*App) ApiGetBookmarkTags

func (app *App) ApiGetBookmarkTags(c echo.Context) error

ApiGetBookmarkTags gets tags attached to a single bookmark

func (*App) ApiGetBookmarks

func (app *App) ApiGetBookmarks(c echo.Context) error

ApiGetBookmarks gets all bookmarks

func (*App) ApiGetFolders

func (app *App) ApiGetFolders(c echo.Context) error

ApiGetFolders gets all folders

func (*App) ApiGetRecentBookmarks

func (app *App) ApiGetRecentBookmarks(c echo.Context) error

ApiGetRecentBookmarks gets recent bookmarks

func (*App) ApiGetSubEntities

func (app *App) ApiGetSubEntities(c echo.Context) error

ApiGetSubEntities gets all sub entities from a parent folder

func (*App) ApiGetSubFolders

func (app *App) ApiGetSubFolders(c echo.Context) error

ApiGetSubFolders gets all subfolders from a parent folder

func (*App) ApiPostBookmark

func (app *App) ApiPostBookmark(c echo.Context) error

ApiPostBookmark saves a bookmark

func (*App) ApiPostBookmarkTags

func (app *App) ApiPostBookmarkTags(c echo.Context) error

ApiPostBookmarkTags saves one or more tags to a bookmark

func (*App) ApiPostEntityToFolder

func (app *App) ApiPostEntityToFolder(c echo.Context) error

ApiPostEntityToFolder saves any type of entity to a folder

func (*App) ApiPostEvent

func (app *App) ApiPostEvent(c echo.Context) error

func (*App) ApiPostFolder

func (app *App) ApiPostFolder(c echo.Context) error

ApiPostFolder saves a folder

func (*App) ApiShareBookmark

func (app *App) ApiShareBookmark(c echo.Context) error

func (*App) ApiUpdateBookmark

func (app *App) ApiUpdateBookmark(c echo.Context) error

ApiUpdateBookmark updates a bookmark

func (*App) Auth2FACode

func (app *App) Auth2FACode(c echo.Context) error

Auth2FACode handles the 2FA code validation

func (*App) AuthCreate2FACode

func (app *App) AuthCreate2FACode(c echo.Context) error

AuthCreate2FACode handles the 2FA code validation

func (*App) AuthJWTError

func (app *App) AuthJWTError(e error, c echo.Context) error

AuthJWTError handles the redirect to the login page if no JWT token is present

func (*App) AuthLogin

func (app *App) AuthLogin(c echo.Context) error

AuthLogin handles the user authentication via the DB to login the user

func (*App) AuthRegister

func (app *App) AuthRegister(c echo.Context) error

AuthRegister handles the register process of a new user

func (*App) GetConfig

func (a *App) GetConfig() *m.Config

func (*App) Init

func (a *App) Init(c string)

Init sets up some basic parameters of the provided App instance, like the Config and the DB (Database) connection.

func (*App) RegisterEnabled

func (a *App) RegisterEnabled() bool

Jump to

Keyboard shortcuts

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