add: api key middleware

This commit is contained in:
$(pass /github/name)
2024-09-02 17:05:15 +02:00
parent 6ac2b32a1f
commit 1ad2f2090f
7 changed files with 121 additions and 35 deletions

View File

@@ -3,13 +3,16 @@ package errors
import "errors"
var (
ErrNotFound = errors.New("not found")
ErrUserNotFound = errors.New("user not found")
ErrInvalidEmail = errors.New("invalid email")
ErrInvalidCredentials = errors.New("invalid credentials: unauthorized")
ErrAlreadyVerified = errors.New("user is already verified")
ErrTokenNotFound = errors.New("verification token not found")
ErrTokenNotSet = errors.New("verification token has not been set")
ErrNoData = errors.New("no data provided")
ErrNoRowsAffected = errors.New("no rows affected")
ErrNotFound = errors.New("not found")
ErrUserNotFound = errors.New("user not found")
ErrInvalidEmail = errors.New("invalid email")
ErrInvalidCredentials = errors.New("invalid credentials: unauthorized")
ErrAlreadyVerified = errors.New("user is already verified")
ErrTokenNotFound = errors.New("verification token not found")
ErrTokenNotSet = errors.New("verification token has not been set")
ErrNoData = errors.New("no data provided")
ErrNoRowsAffected = errors.New("no rows affected")
ErrValueTooLong = errors.New("cookie value too long")
ErrInvalidValue = errors.New("invalid cookie value")
ErrInvalidSigningAlgorithm = errors.New("invalid signing algorithm")
)