testing

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Define authorization middleware names
	SUPER       = "SuperAuthorization"
	PARTICIPANT = "ParticipantAuthorization"
	// `ROUTELEVEL` indicates the depth of routePath where a specific keyword is located.
	ROUTELEVEL = 2
)

Variables

This section is empty.

Functions

func AuthWalker

func AuthWalker(route *mux.Route, router *mux.Router, ancestors []*mux.Route) error

This function is used by mux.Router to walk through routes that are registered with mux.Router. AuthWalker retrieves routes and validates that auth middleware is properly implemented with the routes for different accessibility levels.

func InitAuthTesting

func InitAuthTesting()

This function does all the things and sets `isInit` to true before the testing is run.

func SaveFuncName

func SaveFuncName()

This function returns the calling function name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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