testutil

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RobotsEvaluatorMock

type RobotsEvaluatorMock struct {
	// optional function to call at connect time
	ConnectFunc func() error
	// optional function to call when RobotsEvaluator is closing
	CloseFunc func() error
	// optional function to call when IsAllowed is called on RobotsEvaluator. IsAllowed will always return true if this
	// is not set
	IsAllowedFunc func(*robotsevaluatorV1.IsAllowedRequest) bool
}

RobotsEvaluatorMock is a helper structure for mocking robotsevaluator.RobotsEvaluator

func (*RobotsEvaluatorMock) Close

func (r *RobotsEvaluatorMock) Close() error

func (*RobotsEvaluatorMock) Connect

func (r *RobotsEvaluatorMock) Connect() error

func (*RobotsEvaluatorMock) IsAllowed

type ScreenshotWriterMock

type ScreenshotWriterMock struct {
	// optional function to call at connect time
	ConnectFunc func() error
	// optional function to call when RobotsEvaluator is closing
	CloseFunc func() error
	// optional function to call when Write is called on ScreenshotWriter. Write will always return nil if this
	// is not set
	WriteFunc func(data []byte, metadata screenshotwriter.Metadata) error
}

ScreenshotWriterMock is a helper structure for mocking screenshotwriter.ScreenshotWriter

func (*ScreenshotWriterMock) Close

func (s *ScreenshotWriterMock) Close() error

func (*ScreenshotWriterMock) Connect

func (s *ScreenshotWriterMock) Connect() error

func (*ScreenshotWriterMock) Write

func (s *ScreenshotWriterMock) Write(_ context.Context, data []byte, metadata screenshotwriter.Metadata) error

Jump to

Keyboard shortcuts

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