external

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockLogger

type MockLogger struct {
	SugaredLogger *zap.SugaredLogger
	ObservedLogs  *observer.ObservedLogs
}

func NewMockLogger

func NewMockLogger() *MockLogger

func (*MockLogger) Messages

func (l *MockLogger) Messages() []string

type MockReadCloser

type MockReadCloser struct {
	mock.Mock
}

Mock for io.ReadCloser

func NewMockReadCloser

func NewMockReadCloser() *MockReadCloser

NewMockReadCloser initializes a MockReadCloser with some data

func (*MockReadCloser) Close

func (m *MockReadCloser) Close() error

Close simulates the Close method, integrates with testify expectations

func (*MockReadCloser) Read

func (m *MockReadCloser) Read(p []byte) (n int, err error)

Read simulates the Read method, integrates with testify expectations

type MockWriteCloser

type MockWriteCloser struct {
	mock.Mock
	Buffer *bytes.Buffer
}

MockWriteCloser simulates an io.WriteCloser and integrates with testify.Mock

func NewMockWriteCloser

func NewMockWriteCloser() *MockWriteCloser

NewMockWriteCloser initializes a MockWriteCloser

func (*MockWriteCloser) Close

func (m *MockWriteCloser) Close() error

Close simulates the Close method, integrates with testify expectations

func (*MockWriteCloser) Write

func (m *MockWriteCloser) Write(p []byte) (n int, err error)

Write simulates the Write method, integrates with testify expectations

Jump to

Keyboard shortcuts

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