core

package
v0.0.0-...-96d23e7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Timeout = 2 * time.Second

Timeout is the time to wait before canceling a database transaction.

Functions

func BasicAuthMw

func BasicAuthMw(username, password string) gin.HandlerFunc

BasicAuthMw returns a Gin middleware that implements the basic authorization scheme. username and password define the expected credentials.

func Create

func Create(db data.Data) gin.HandlerFunc

Create returns a gin middleware that creates a new mailbox entry.

func CreateWithCaptcha

func CreateWithCaptcha(db data.Data, secret string) gin.HandlerFunc

CreateWithCaptcha returns a gin middleware that creates a new mailbox entry, but only if the associated captcha token is valid.

func Delete

func Delete(db data.Data) gin.HandlerFunc

Delete returns a Gin middleware that deletes a mailbox entry by its ID.

func Read

func Read(db data.Data) gin.HandlerFunc

Read returns a Gin middleware that fetches a mailbox entry by its ID.

func ReadAll

func ReadAll(db data.Data) gin.HandlerFunc

ReadAll returns a Gin middleware that fetches paginated batches of mailbox entries.

Types

This section is empty.

Jump to

Keyboard shortcuts

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