Documentation
¶
Index ¶
- Constants
- Variables
- func AuthenticationMiddleware(next http.Handler) http.Handler
- func DeleteSession(w http.ResponseWriter)
- func Execute()
- func GenerateToken(userID int64, w http.ResponseWriter) (string, error)
- func GetItem[T Task | Folder | User](t *testing.T, client *http.Client, path string) (T, error)
- func GetItems[T any](t *testing.T, client *http.Client, path string) ([]T, error)
- func PostItem[T Task | Folder | User](t *testing.T, client *http.Client, path string, item T) (T, error)
- func RunSeed()
- func UpdateToken(w http.ResponseWriter, r *http.Request) error
- type Folder
- type Payload
- type Task
- type Token
- type User
Constants ¶
View Source
const BASE_URL = "http://localhost:8000"
Variables ¶
View Source
var WaitValue time.Duration = 3
Functions ¶
func DeleteSession ¶
func DeleteSession(w http.ResponseWriter)
func GenerateToken ¶
func GenerateToken(userID int64, w http.ResponseWriter) (string, error)
https://pkg.go.dev/github.com/golang-jwt/jwt/v5#example-New-Hmac
func UpdateToken ¶
func UpdateToken(w http.ResponseWriter, r *http.Request) error
Types ¶
type Payload ¶
Click to show internal directories.
Click to hide internal directories.