testhelpers

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenPrivateKey

func GenPrivateKey(t *testing.T) *rsa.PrivateKey

func GenToken

func GenToken() string

func ToPEM

func ToPEM(pk *rsa.PrivateKey) []byte

Types

type MockAuthEndpoint

type MockAuthEndpoint struct {
	PK    *rsa.PrivateKey
	Token string
}

func (*MockAuthEndpoint) ServeHTTP

func (m *MockAuthEndpoint) ServeHTTP(w http.ResponseWriter, req *http.Request)

type MockTarget

type MockTarget struct {
	ExpectedAuthZ string
}

func (*MockTarget) ServeHTTP

func (m *MockTarget) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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