adapters

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Start(ctx context.Context) error
	RegisterCallbacks(ctx context.Context, callbacks domain.Callbacks)
	Callbacks(ctx context.Context) (domain.Callbacks, error) // returns the callbacks for the given context
	DeleteObject(ctx context.Context, id domain.KindName) error
	GetObject(ctx context.Context, id domain.KindName, baseObject []byte) error
	PatchObject(ctx context.Context, id domain.KindName, checksum string, patch []byte) error
	PutObject(ctx context.Context, id domain.KindName, object []byte) error
	VerifyObject(ctx context.Context, id domain.KindName, checksum string) error
}

type Client

type Client Adapter

type MockAdapter

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

func NewMockAdapter

func NewMockAdapter() *MockAdapter

func (*MockAdapter) Callbacks added in v0.0.5

func (m *MockAdapter) Callbacks(_ context.Context) (domain.Callbacks, error)

func (*MockAdapter) DeleteObject

func (m *MockAdapter) DeleteObject(_ context.Context, id domain.KindName) error

func (*MockAdapter) GetObject

func (m *MockAdapter) GetObject(ctx context.Context, id domain.KindName, baseObject []byte) error

func (*MockAdapter) PatchObject

func (m *MockAdapter) PatchObject(ctx context.Context, id domain.KindName, checksum string, patch []byte) error

func (*MockAdapter) PutObject

func (m *MockAdapter) PutObject(_ context.Context, id domain.KindName, object []byte) error

func (*MockAdapter) RegisterCallbacks

func (m *MockAdapter) RegisterCallbacks(mainCtx context.Context, callbacks domain.Callbacks)

func (*MockAdapter) Start

func (m *MockAdapter) Start(_ context.Context) error

func (*MockAdapter) VerifyObject

func (m *MockAdapter) VerifyObject(ctx context.Context, id domain.KindName, newChecksum string) error

Directories

Path Synopsis
backend
v1
incluster
v1

Jump to

Keyboard shortcuts

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