mock

package
v0.0.0-...-fe632b3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeProtocol

type FakeProtocol struct {
	// contains filtered or unexported fields
}

FakeProtocol is a fake for testing, implements CAProtocol interface.

func NewFakeProtocol

func NewFakeProtocol(response *pb.CsrResponse, err string) *FakeProtocol

NewFakeProtocol returns a FakeProtocol with configured response and expected error.

func (*FakeProtocol) InvokeTimes

func (f *FakeProtocol) InvokeTimes() int

InvokeTimes returns the times that SendCSR has been invoked.

func (*FakeProtocol) SendCSR

func (f *FakeProtocol) SendCSR(req *pb.CsrRequest) (*pb.CsrResponse, error)

SendCSR returns the result based on the predetermined config.

Jump to

Keyboard shortcuts

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