Documentation ¶
Index ¶
- Variables
- func BasicAuthMw(username, password string) gin.HandlerFunc
- func Create(db data.Data) gin.HandlerFunc
- func CreateWithCaptcha(db data.Data, secret string) gin.HandlerFunc
- func Delete(db data.Data) gin.HandlerFunc
- func Read(db data.Data) gin.HandlerFunc
- func ReadAll(db data.Data) gin.HandlerFunc
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.