mock_dev_storage

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2021 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 MockScribble

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

func NewMockScribble

func NewMockScribble() *MockScribble

func (*MockScribble) ClearStore

func (m *MockScribble) ClearStore()

func (*MockScribble) Delete

func (m *MockScribble) Delete(collection string, key string) error

Delete

func (*MockScribble) GetCollection

func (m *MockScribble) GetCollection(collection string) map[string]interface{}

func (*MockScribble) Read

func (m *MockScribble) Read(collection string, key string, v interface{}) error

func (*MockScribble) ReadAll

func (m *MockScribble) ReadAll(collection string) ([]string, error)

ReadAll

func (*MockScribble) SetCollection

func (m *MockScribble) SetCollection(collection string, items map[string]interface{})

func (*MockScribble) Write

func (m *MockScribble) Write(collection string, key string, v interface{}) error

type MockStorageDriver

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

func NewMockStorageDriver

func NewMockStorageDriver(opts *MockStorageDriverOptions) *MockStorageDriver

func (*MockStorageDriver) DeleteFile

func (m *MockStorageDriver) DeleteFile(file string) error

func (*MockStorageDriver) EnsureDirExists

func (m *MockStorageDriver) EnsureDirExists(dir string) error

func (*MockStorageDriver) ExistsOrFail

func (m *MockStorageDriver) ExistsOrFail(path string) error

func (*MockStorageDriver) GetStoredItems

func (m *MockStorageDriver) GetStoredItems() map[string][]byte

func (*MockStorageDriver) ReadFile

func (m *MockStorageDriver) ReadFile(file string) ([]byte, error)

func (*MockStorageDriver) WriteFile

func (m *MockStorageDriver) WriteFile(file string, contents []byte, fileMode os.FileMode) error

type MockStorageDriverOptions

type MockStorageDriverOptions struct {
	EnsureDirExistsError error
	WriteFileError       error
	ReadFileError        error
	Directories          []string
	StoredItems          map[string][]byte
}

Jump to

Keyboard shortcuts

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