testing

package
v0.4.27-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: ISC Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfiguration

func NewConfiguration(opts ...ConfigurationOptions) *storage.Configuration

Types

type ConfigurationOptions

type ConfigurationOptions func(o *storage.Configuration)

func WithConfigurationCompression

func WithConfigurationCompression(compression *compression.Configuration) ConfigurationOptions

type MockBackend

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

MockBackend implements the Backend interface for testing purposes

func NewMockBackend

func NewMockBackend(location string) *MockBackend

func (*MockBackend) Close

func (mb *MockBackend) Close() error

func (*MockBackend) Create

func (mb *MockBackend) Create(repository string, configuration []byte) error

func (*MockBackend) DeletePackfile

func (mb *MockBackend) DeletePackfile(MAC objects.MAC) error

func (*MockBackend) DeleteState

func (mb *MockBackend) DeleteState(MAC objects.MAC) error

func (*MockBackend) GetPackfile

func (mb *MockBackend) GetPackfile(MAC objects.MAC) (io.Reader, error)

func (*MockBackend) GetPackfileBlob

func (mb *MockBackend) GetPackfileBlob(MAC objects.MAC, offset uint64, length uint32) (io.Reader, error)

func (*MockBackend) GetPackfiles

func (mb *MockBackend) GetPackfiles() ([]objects.MAC, error)

func (*MockBackend) GetState

func (mb *MockBackend) GetState(MAC objects.MAC) (io.Reader, error)

func (*MockBackend) GetStates

func (mb *MockBackend) GetStates() ([]objects.MAC, error)

func (*MockBackend) Location

func (mb *MockBackend) Location() string

func (*MockBackend) Open

func (mb *MockBackend) Open(repository string) ([]byte, error)

func (*MockBackend) PutPackfile

func (mb *MockBackend) PutPackfile(MAC objects.MAC, rd io.Reader) error

func (*MockBackend) PutState

func (mb *MockBackend) PutState(MAC objects.MAC, rd io.Reader) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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