handlers

package
v0.0.0-...-c0d36a8 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLink(db *db.DB) fiber.Handler

CreateLink adds a new link.

func CreateUser

func CreateUser(db *db.DB) fiber.Handler

CreateUser creates a new user.

func DeleteLink(db *db.DB) fiber.Handler

DeleteLink delete the specified link.

func DeleteLinks(db *db.DB) fiber.Handler

DeleteLinks delete selected links.

func DeleteUser

func DeleteUser(db *db.DB) fiber.Handler

DeleteUser return a user.

func DocAPIv1

func DocAPIv1() fiber.Handler

DocAPIv1 show API v1 documentation.

func ExportCSVLinks(db *db.DB, logger *zap.Logger) fiber.Handler

ExportCSVLinks exports all filtered link into CSV

func ForgottenPassword

func ForgottenPassword(db *db.DB) fiber.Handler

ForgottenPassword save a forgotten password request.

func GetAllUsers

func GetAllUsers(db *db.DB) fiber.Handler

GetAllUsers lists all users.

func GetUser

func GetUser(db *db.DB) fiber.Handler

GetUser return a user.

func LinksList(db *db.DB) fiber.Handler

LinksList returns the list of all links

func Login

func Login(db *db.DB) fiber.Handler

Login authenticates a user.

func RedirectURL

func RedirectURL(db *db.DB, logger *zap.Logger) fiber.Handler

RedirectURL redirects to original URL if URL exists, else return 404 HTTP code.

func UpdateLink(db *db.DB) fiber.Handler

func UpdateUser

func UpdateUser(db *db.DB) fiber.Handler

UpdateUser updates user information.

func UpdateUserPassword

func UpdateUserPassword(db *db.DB) fiber.Handler

UpdateUserPassword update user password.

func UploadLink(db *db.DB, logger *zap.Logger) fiber.Handler

UploadLink creates links from CSV file.

Types

type LinkImportError

type LinkImportError struct {
	Line int    `json:"line"`
	Err  string `json:"err"`
	Data string `json:"data"`
}

type LinksIdForm

type LinksIdForm = []string

Jump to

Keyboard shortcuts

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