archive

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive interface {
	Close(ctx context.Context) error
	History(ctx context.Context, latest []byte) ([][]byte, error)
	Put(ctx context.Context, versions ...[]byte) error
}

func New

func New(ctx context.Context, cfg Config) (Archive, error)

type Config

type Config struct {
	settings.Settings `json:",inline" validate:"dive"`
	BoltDB            *boltdb.Config `json:"boltdb" validate:"omitempty"`
	Inmem             *inmem.Config  `json:"inmem" validate:"omitempty"`
}

type MockArchive added in v1.0.0

type MockArchive struct {
	mock.Mock
}

MockArchive is an autogenerated mock type for the Archive type

func NewMockArchive added in v1.0.0

func NewMockArchive(t mockConstructorTestingTNewMockArchive) *MockArchive

NewMockArchive creates a new instance of MockArchive. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockArchive) Close added in v1.0.0

func (_m *MockArchive) Close(ctx context.Context) error

Close provides a mock function with given fields: ctx

func (*MockArchive) History added in v1.0.0

func (_m *MockArchive) History(ctx context.Context, latest []byte) ([][]byte, error)

History provides a mock function with given fields: ctx, latest

func (*MockArchive) Put added in v1.0.0

func (_m *MockArchive) Put(ctx context.Context, versions ...[]byte) error

Put provides a mock function with given fields: ctx, versions

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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