Documentation
¶
Index ¶
- type Adapter
- type Client
- type MockAdapter
- func (m *MockAdapter) Batch(ctx context.Context, kind domain.Kind, _ domain.BatchType, ...) error
- func (m *MockAdapter) Callbacks(_ context.Context) (domain.Callbacks, error)
- func (m *MockAdapter) DeleteObject(_ context.Context, id domain.KindName) error
- func (m *MockAdapter) GetObject(ctx context.Context, id domain.KindName, baseObject []byte) error
- func (m *MockAdapter) IsRelated(ctx context.Context, id domain.ClientIdentifier) bool
- func (m *MockAdapter) PatchObject(ctx context.Context, id domain.KindName, checksum string, patch []byte) error
- func (m *MockAdapter) PutObject(_ context.Context, id domain.KindName, object []byte) error
- func (m *MockAdapter) RegisterCallbacks(_ context.Context, callbacks domain.Callbacks)
- func (m *MockAdapter) Start(_ context.Context) error
- func (m *MockAdapter) Stop(_ context.Context) error
- func (m *MockAdapter) TestCallDeleteObject(ctx context.Context, id domain.KindName) error
- func (m *MockAdapter) TestCallPutOrPatch(ctx context.Context, id domain.KindName, baseObject []byte, newObject []byte) error
- func (m *MockAdapter) TestCallVerifyObject(ctx context.Context, id domain.KindName, object []byte) error
- func (m *MockAdapter) VerifyObject(ctx context.Context, id domain.KindName, newChecksum string) error
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 Stop(ctx context.Context) error IsRelated(ctx context.Context, id domain.ClientIdentifier) bool 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 Batch(ctx context.Context, id domain.Kind, batchType domain.BatchType, items domain.BatchItems) error }
type MockAdapter ¶
func NewMockAdapter ¶
func NewMockAdapter(isClient bool) *MockAdapter
func (*MockAdapter) Batch ¶ added in v0.0.47
func (m *MockAdapter) Batch(ctx context.Context, kind domain.Kind, _ domain.BatchType, items domain.BatchItems) error
func (*MockAdapter) DeleteObject ¶
func (*MockAdapter) IsRelated ¶ added in v0.0.38
func (m *MockAdapter) IsRelated(ctx context.Context, id domain.ClientIdentifier) bool
func (*MockAdapter) PatchObject ¶
func (*MockAdapter) RegisterCallbacks ¶
func (m *MockAdapter) RegisterCallbacks(_ context.Context, callbacks domain.Callbacks)
func (*MockAdapter) TestCallDeleteObject ¶ added in v0.0.17
TestCallDeleteObject is used for testing purposes only, it is similar to incluster.client response to watch.Deleted event
func (*MockAdapter) TestCallPutOrPatch ¶ added in v0.0.17
func (m *MockAdapter) TestCallPutOrPatch(ctx context.Context, id domain.KindName, baseObject []byte, newObject []byte) error
TestCallPutOrPatch is used for testing purposes only, it is similar to incluster.client.callPutOrPatch
func (*MockAdapter) TestCallVerifyObject ¶ added in v0.0.17
func (m *MockAdapter) TestCallVerifyObject(ctx context.Context, id domain.KindName, object []byte) error
TestCallVerifyObject is used for testing purposes only, it is similar to incluster.client.callVerifyObject
func (*MockAdapter) VerifyObject ¶
Click to show internal directories.
Click to hide internal directories.