storage

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLogFileNotOpened = errors.New("file not opened")

Functions

This section is empty.

Types

type File

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

func (*File) Close

func (f *File) Close() error

func (*File) Open

func (f *File) Open() error

func (*File) Write

func (f *File) Write(p []byte) (int, error)

type MockStorage

type MockStorage struct {
	mock.Mock
}

MockStorage is an autogenerated mock type for the Storage type

func NewMockStorage added in v0.3.0

func NewMockStorage(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStorage

NewMockStorage creates a new instance of MockStorage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockStorage) Close

func (_m *MockStorage) Close() error

Close provides a mock function with no fields

func (*MockStorage) Open

func (_m *MockStorage) Open() error

Open provides a mock function with no fields

func (*MockStorage) Write

func (_m *MockStorage) Write(p []byte) (int, error)

Write provides a mock function with given fields: p

type Storage

type Storage interface {
	io.WriteCloser

	Open() error
}

func NewFile

func NewFile(path string) Storage

Jump to

Keyboard shortcuts

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