This section is empty.


This section is empty.


func Mailer

func Mailer(config *config.Configuration) mailer.Mailer

Mailer returns a new mailer instance


type API

type API struct {
	// contains filtered or unexported fields

func New

func New(db *gorm.DB, config *config.Configuration) *API

New starts a new Web-Service

func (*API) GetQRCode

func (a *API) GetQRCode(c echo.Context) error

GetQRCode returns an QR Code for given URL

func (*API) LinkCreate

func (a *API) LinkCreate(c echo.Context) error

LinkCreate creates a new Link

func (*API) LinkDelete

func (a *API) LinkDelete(c echo.Context) error

LinkDelete deletes a single entry

func (*API) LinkUpdate

func (a *API) LinkUpdate(c echo.Context) error

LinkUpdate updates link url

func (a *API) LinksList(c echo.Context) error

LinksList lists all links

func (*API) Login

func (a *API) Login(c echo.Context) error

Login a user

func (*API) RefreshToken

func (a *API) RefreshToken(c echo.Context) error

RefreshToken handels token refreshs!

func (*API) Start

func (a *API) Start()

Starts the API Server

type LoginResponse

type LoginResponse struct {
	Token        string `json:"access_token"`
	RefreshToken string `json:"refresh_token"`

type Template

type Template struct {
	// contains filtered or unexported fields

func (*Template) Render

func (t *Template) Render(w io.Writer, name string, data interface{}, c echo.Context) error

type ViewData

type ViewData struct {
	Webpack *webpack.Webpack
	Config  struct {
		APIURL string `json:"apiUrl"`

ViewData contains data for the view

func NewViewData

func NewViewData(buildPath string) (ViewData, error)

NewViewData creates new data for the view