Documentation
¶
Index ¶
- type MockLocalCache
- type MockObjectStorage
- func (m *MockObjectStorage) AddObject(key string, content []byte)
- func (m *MockObjectStorage) GetObject(ctx context.Context, key string, dest string) (int64, error)
- func (m *MockObjectStorage) HasObject(ctx context.Context, key string) (bool, error)
- func (m *MockObjectStorage) ListObjects(ctx context.Context, prefix string) ([]string, error)
- func (m *MockObjectStorage) UploadObject(ctx context.Context, key string, src string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockLocalCache ¶
type MockLocalCache struct {
// contains filtered or unexported fields
}
MockLocalCache implements a in-memory LocalCache for testing
func NewMockLocalCache ¶
func NewMockLocalCache() *MockLocalCache
NewMockLocalCache creates a new mock local cache
func (*MockLocalCache) AddFile ¶
func (m *MockLocalCache) AddFile(path string, content []byte)
AddFile adds a file to the mock cache
type MockObjectStorage ¶
type MockObjectStorage struct {
// contains filtered or unexported fields
}
MockObjectStorage implements ObjectStorage interface for testing
func NewMockObjectStorage ¶
func NewMockObjectStorage() *MockObjectStorage
NewMockObjectStorage creates a new mock object storage
func (*MockObjectStorage) AddObject ¶
func (m *MockObjectStorage) AddObject(key string, content []byte)
AddObject adds an object to the mock storage
func (*MockObjectStorage) ListObjects ¶
ListObjects implements ObjectStorage
func (*MockObjectStorage) UploadObject ¶
UploadObject implements ObjectStorage
Click to show internal directories.
Click to hide internal directories.