tests

package
v0.0.0-...-7674232 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const JWT_SECRET = "UNSAFE_SECRET_KEY_CHANGE_ME!"

JWT_SECRET is shared dummy jwt secret for testing

View Source
const PASSWORD = "DUMMY_PASSWORD"

PASSWORD is shared dummy password for testing

Variables

This section is empty.

Functions

func GetDatabaseConnection

func GetDatabaseConnection() (db *mongo.Client, shutdown func(), isParallel bool)

GetDatabaseConnection creates connection to database

func SetAdminUserHeader

func SetAdminUserHeader(req *http.Request) *http.Request

SetAdminUserHeader set requested user as ID:1 and permission:9

func SetModUserHeader

func SetModUserHeader(req *http.Request) *http.Request

SetModUserHeader set requested user as ID:2 and permission:5

func SetNormalUserHeader

func SetNormalUserHeader(req *http.Request) *http.Request

SetNormalUserHeader set requested user as ID:3 and permission:0

Types

This section is empty.

Jump to

Keyboard shortcuts

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