pkg

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddStaple

func AddStaple(stapler service.Staplerer, userHandler service.UserHandlerer) echo.HandlerFunc

AddStaple creates a staple using a stapler and a given user. The following properties are enough: name, content

func ArchiveStaple

func ArchiveStaple(stapler service.Staplerer) echo.HandlerFunc

ArchiveStaple archives a staple with a given ID.

func ChangePassword

func ChangePassword(userHandler service.UserHandlerer) echo.HandlerFunc

ChangePassword let's the user change the account's password.

func DeleteStaple

func DeleteStaple(stapler service.Staplerer) echo.HandlerFunc

DeleteStaple deteles a staple with a given ID.

func GetMaximumStaples

func GetMaximumStaples(userHandler service.UserHandlerer) echo.HandlerFunc

GetMaximumStaples returns the user's maximum staple count.

func GetNext

func GetNext(staple service.Staplerer) echo.HandlerFunc

GetNext retrieves the oldest entry from the list which is not archived.

func GetStaple

func GetStaple(stapler service.Staplerer) echo.HandlerFunc

GetStaple retrieves a single staple based on an ID.

func GetToken

func GetToken(c echo.Context) (*jwt.Token, error)

GetToken gets the JWT token from the echo context

func ListStaples

func ListStaples(stapler service.Staplerer) echo.HandlerFunc

ListStaples will list all staples which belong to a user.

func RegisterUser

func RegisterUser(userHandler service.UserHandlerer) echo.HandlerFunc

RegisterUser takes a storer and creates a user entry.

func ResetPassword

func ResetPassword(userHandler service.UserHandlerer) echo.HandlerFunc

ResetPassword takes a user handler and resets a user's password delievered from the token.

func Serve

func Serve() error

Serve starts the Stapler API server.

func SetMaximumStaples

func SetMaximumStaples(userHandler service.UserHandlerer) echo.HandlerFunc

SetMaximumStaples let's the user change the maximum number of staples.

func ShowArchive

func ShowArchive(stapler service.Staplerer) echo.HandlerFunc

ShowArchive returns the archived staples of a user.

func TokenHandler

func TokenHandler(userHandler service.UserHandlerer) echo.HandlerFunc

TokenHandler creates a JWT token for a given user.

func VerfiyConfirmCode

func VerfiyConfirmCode(userHandler service.UserHandlerer) echo.HandlerFunc

VerfiyConfirmCode verifies a confirm link generated by a reset password action.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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