trafficcontroller_testhelpers

package
v0.0.0-...-d41793b Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2015 License: Apache-2.0, BSD-3-Clause, MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	VALID_AUTHENTICATION_TOKEN   = "bearer correctAuthorizationToken"
	INVALID_AUTHENTICATION_TOKEN = "incorrectAuthorizationToken"
)

Variables

This section is empty.

Functions

func AssertConnectionFails

func AssertConnectionFails(t *testing.T, port string, path string, authToken string, expectedErrorCode uint16)

func SuccessfulAuthorizer

func SuccessfulAuthorizer(authToken string, target string, l *gosteno.Logger) bool

Types

type AdminAuthorizer

type AdminAuthorizer struct {
	TokenParam string
	Result     AuthorizerResult
}

func (*AdminAuthorizer) Authorize

func (a *AdminAuthorizer) Authorize(authToken string, l *gosteno.Logger) (bool, error)

type AuthorizerResult

type AuthorizerResult struct {
	Authorized   bool
	ErrorMessage string
}

type FakeListener

type FakeListener struct {
	Uri     string
	Channel chan []byte
}

func NewFakeListener

func NewFakeListener() *FakeListener

func (*FakeListener) Start

func (f *FakeListener) Start(url string) (<-chan []byte, error)

func (*FakeListener) Stop

func (f *FakeListener) Stop()

type LogAuthorizer

type LogAuthorizer struct {
	TokenParam string
	Target     string
	Result     AuthorizerResult
}

func (*LogAuthorizer) Authorize

func (a *LogAuthorizer) Authorize(authToken string, target string, l *gosteno.Logger) (bool, error)

Jump to

Keyboard shortcuts

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