fake

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockDoFn

func NewMockDoFn(err error) func(req *http.Request, obj interface{}) error

NewMockDoFn creates a new MockDo function.

func NewMockNewRequestFn

func NewMockNewRequestFn(req *http.Request, err error) func(ctx context.Context, method, prefix, urlPath string, body interface{}) (*http.Request, error)

NewMockNewRequestFn creates a new MockNewRequest function.

Types

type MockClient

type MockClient struct {
	MockNewRequest func(ctx context.Context, method, prefix, urlPath string, body interface{}) (*http.Request, error)
	MockDo         func(req *http.Request, obj interface{}) error
	MockWith       func(modifiers ...up.ClientModifierFn) up.Client
}

MockClient is a mock of an Upbound SDK Client.

func (*MockClient) Do

func (m *MockClient) Do(req *http.Request, obj interface{}) error

Do calls the underlying MockDo function.

func (*MockClient) NewRequest

func (m *MockClient) NewRequest(ctx context.Context, method, prefix, urlPath string, body interface{}) (*http.Request, error)

NewRequest calls the underlying MockNewRequest function.

func (*MockClient) With added in v0.3.0

func (m *MockClient) With(modifiers ...up.ClientModifierFn) up.Client

With implements up.Client.

Jump to

Keyboard shortcuts

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