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: 0

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