mock

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2017 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockSigner

type MockSigner struct {
	VerifyFail bool
}

MockSigner is a valid signer that is mainly used for testing purposes.

func (*MockSigner) Sign

func (ms *MockSigner) Sign(message string) string

Sign simple returns the string passed to it.

func (*MockSigner) Verify

func (ms *MockSigner) Verify(payload string) (string, error)

Verify will return the payload as given unless MockSigner.VerifyFail is true, then it will return an empty string and dangerous.ErrInvalidSignature.

Jump to

Keyboard shortcuts

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