mock

package
v0.0.0-...-ba90866 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	client.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

NewClient returns a mock (fake) client for testing. The fixtures are not automatically loaded into the cache. Individual fixtures can be loaded using the WithFixtureOrDie method and all fixtures in a directory can be loaded using LoadAllOrDie.

func (*Client) LoadAllOrDie

func (m *Client) LoadAllOrDie(dir string) *Client

LoadAllOrDie loads all fixtures in the directory into the cache.

func (*Client) WithFixtureOrDie

func (m *Client) WithFixtureOrDie(filename ...string) *Client

WithFixtureOrDie loads a single fixture into the cache. The fixture must be in a recognizable format for the universal deserializer.

func (*Client) WithLogger

func (m *Client) WithLogger(log logr.Logger) *Client

WithLogger sets the logger for the client.

Jump to

Keyboard shortcuts

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