Go API Documentation

github.com/TykTechnologies/tyk/internal/middleware

No package summary is available.

Package

Files: 1. Third party imports: 0. Imports from organisation: 0. Tests: 0. Benchmarks: 0.

Constants

// StatusRespond should be returned by a middleware to stop processing
// further middleware from the middleware chain.
const StatusRespond = 666

Functions

func Enabled

Enabled returns whether middlewares are enabled or not.

func Enabled(defs ...apidef.MiddlewareDefinition) bool {
	for _, def := range defs {
		if !def.Disabled && def.Name != "" {
			return true
		}
	}

	return false
}

Cognitive complexity: 5, Cyclomatic complexity: 4


Tests

Files: 1. Third party imports: 0. Imports from organisation: 0. Tests: 1. Benchmarks: 0.

Test functions

TestEnabled

References: apidef.MiddlewareDefinition, testing.T.