storage

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Overview

Package storage is a generated GoMock package.

Package storage is a generated GoMock package.

Package storage is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSecretStorage

func NewSecretStorage(config primitive.KvStorageConfig, encryption string) (secret.Storage, error)

Types

type MockOffsetStorage

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

MockOffsetStorage is a mock of OffsetStorage interface.

func NewMockOffsetStorage

func NewMockOffsetStorage(ctrl *gomock.Controller) *MockOffsetStorage

NewMockOffsetStorage creates a new mock instance.

func (*MockOffsetStorage) CreateOffset

func (m *MockOffsetStorage) CreateOffset(ctx context.Context, subscriptionID vanus.ID, info info.OffsetInfo) error

CreateOffset mocks base method.

func (*MockOffsetStorage) DeleteOffset

func (m *MockOffsetStorage) DeleteOffset(ctx context.Context, subscriptionID vanus.ID) error

DeleteOffset mocks base method.

func (*MockOffsetStorage) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockOffsetStorage) GetOffsets

func (m *MockOffsetStorage) GetOffsets(ctx context.Context, subscriptionID vanus.ID) (info.ListOffsetInfo, error)

GetOffsets mocks base method.

func (*MockOffsetStorage) UpdateOffset

func (m *MockOffsetStorage) UpdateOffset(ctx context.Context, subscriptionID vanus.ID, info info.OffsetInfo) error

UpdateOffset mocks base method.

type MockOffsetStorageMockRecorder

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

MockOffsetStorageMockRecorder is the mock recorder for MockOffsetStorage.

func (*MockOffsetStorageMockRecorder) CreateOffset

func (mr *MockOffsetStorageMockRecorder) CreateOffset(ctx, subscriptionID, info interface{}) *gomock.Call

CreateOffset indicates an expected call of CreateOffset.

func (*MockOffsetStorageMockRecorder) DeleteOffset

func (mr *MockOffsetStorageMockRecorder) DeleteOffset(ctx, subscriptionID interface{}) *gomock.Call

DeleteOffset indicates an expected call of DeleteOffset.

func (*MockOffsetStorageMockRecorder) GetOffsets

func (mr *MockOffsetStorageMockRecorder) GetOffsets(ctx, subscriptionID interface{}) *gomock.Call

GetOffsets indicates an expected call of GetOffsets.

func (*MockOffsetStorageMockRecorder) UpdateOffset

func (mr *MockOffsetStorageMockRecorder) UpdateOffset(ctx, subscriptionID, info interface{}) *gomock.Call

UpdateOffset indicates an expected call of UpdateOffset.

type MockStorage

func NewMockStorage

func NewMockStorage(ctrl *gomock.Controller) *MockStorage

NewMockStorage creates a new mock instance.

func (*MockStorage) Close

func (m *MockStorage) Close()

type MockSubscriptionStorage

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

MockSubscriptionStorage is a mock of SubscriptionStorage interface.

func NewMockSubscriptionStorage

func NewMockSubscriptionStorage(ctrl *gomock.Controller) *MockSubscriptionStorage

NewMockSubscriptionStorage creates a new mock instance.

func (*MockSubscriptionStorage) CreateSubscription

func (m *MockSubscriptionStorage) CreateSubscription(ctx context.Context, sub *metadata.Subscription) error

CreateSubscription mocks base method.

func (*MockSubscriptionStorage) DeleteSubscription

func (m *MockSubscriptionStorage) DeleteSubscription(ctx context.Context, id vanus.ID) error

DeleteSubscription mocks base method.

func (*MockSubscriptionStorage) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockSubscriptionStorage) GetSubscription

func (m *MockSubscriptionStorage) GetSubscription(ctx context.Context, id vanus.ID) (*metadata.Subscription, error)

GetSubscription mocks base method.

func (*MockSubscriptionStorage) ListSubscription

func (m *MockSubscriptionStorage) ListSubscription(ctx context.Context) ([]*metadata.Subscription, error)

ListSubscription mocks base method.

func (*MockSubscriptionStorage) UpdateSubscription

func (m *MockSubscriptionStorage) UpdateSubscription(ctx context.Context, sub *metadata.Subscription) error

UpdateSubscription mocks base method.

type MockSubscriptionStorageMockRecorder

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

MockSubscriptionStorageMockRecorder is the mock recorder for MockSubscriptionStorage.

func (*MockSubscriptionStorageMockRecorder) CreateSubscription

func (mr *MockSubscriptionStorageMockRecorder) CreateSubscription(ctx, sub interface{}) *gomock.Call

CreateSubscription indicates an expected call of CreateSubscription.

func (*MockSubscriptionStorageMockRecorder) DeleteSubscription

func (mr *MockSubscriptionStorageMockRecorder) DeleteSubscription(ctx, id interface{}) *gomock.Call

DeleteSubscription indicates an expected call of DeleteSubscription.

func (*MockSubscriptionStorageMockRecorder) GetSubscription

func (mr *MockSubscriptionStorageMockRecorder) GetSubscription(ctx, id interface{}) *gomock.Call

GetSubscription indicates an expected call of GetSubscription.

func (*MockSubscriptionStorageMockRecorder) ListSubscription

func (mr *MockSubscriptionStorageMockRecorder) ListSubscription(ctx interface{}) *gomock.Call

ListSubscription indicates an expected call of ListSubscription.

func (*MockSubscriptionStorageMockRecorder) UpdateSubscription

func (mr *MockSubscriptionStorageMockRecorder) UpdateSubscription(ctx, sub interface{}) *gomock.Call

UpdateSubscription indicates an expected call of UpdateSubscription.

type MockTriggerWorkerStorage

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

MockTriggerWorkerStorage is a mock of TriggerWorkerStorage interface.

func NewMockTriggerWorkerStorage

func NewMockTriggerWorkerStorage(ctrl *gomock.Controller) *MockTriggerWorkerStorage

NewMockTriggerWorkerStorage creates a new mock instance.

func (*MockTriggerWorkerStorage) DeleteTriggerWorker

func (m *MockTriggerWorkerStorage) DeleteTriggerWorker(ctx context.Context, id string) error

DeleteTriggerWorker mocks base method.

func (*MockTriggerWorkerStorage) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTriggerWorkerStorage) GetTriggerWorker

GetTriggerWorker mocks base method.

func (*MockTriggerWorkerStorage) ListTriggerWorker

func (m *MockTriggerWorkerStorage) ListTriggerWorker(ctx context.Context) ([]*metadata.TriggerWorkerInfo, error)

ListTriggerWorker mocks base method.

func (*MockTriggerWorkerStorage) SaveTriggerWorker

func (m *MockTriggerWorkerStorage) SaveTriggerWorker(arg0 context.Context, arg1 metadata.TriggerWorkerInfo) error

SaveTriggerWorker mocks base method.

type MockTriggerWorkerStorageMockRecorder

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

MockTriggerWorkerStorageMockRecorder is the mock recorder for MockTriggerWorkerStorage.

func (*MockTriggerWorkerStorageMockRecorder) DeleteTriggerWorker

func (mr *MockTriggerWorkerStorageMockRecorder) DeleteTriggerWorker(ctx, id interface{}) *gomock.Call

DeleteTriggerWorker indicates an expected call of DeleteTriggerWorker.

func (*MockTriggerWorkerStorageMockRecorder) GetTriggerWorker

func (mr *MockTriggerWorkerStorageMockRecorder) GetTriggerWorker(ctx, id interface{}) *gomock.Call

GetTriggerWorker indicates an expected call of GetTriggerWorker.

func (*MockTriggerWorkerStorageMockRecorder) ListTriggerWorker

func (mr *MockTriggerWorkerStorageMockRecorder) ListTriggerWorker(ctx interface{}) *gomock.Call

ListTriggerWorker indicates an expected call of ListTriggerWorker.

func (*MockTriggerWorkerStorageMockRecorder) SaveTriggerWorker

func (mr *MockTriggerWorkerStorageMockRecorder) SaveTriggerWorker(arg0, arg1 interface{}) *gomock.Call

SaveTriggerWorker indicates an expected call of SaveTriggerWorker.

type OffsetStorage

type OffsetStorage interface {
	CreateOffset(ctx context.Context, subscriptionID vanus.ID, info info.OffsetInfo) error
	UpdateOffset(ctx context.Context, subscriptionID vanus.ID, info info.OffsetInfo) error
	GetOffsets(ctx context.Context, subscriptionID vanus.ID) (info.ListOffsetInfo, error)
	DeleteOffset(ctx context.Context, subscriptionID vanus.ID) error
}

func NewOffsetStorage

func NewOffsetStorage(client kv.Client) OffsetStorage

type SecretStorage

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

func (*SecretStorage) Delete

func (p *SecretStorage) Delete(ctx context.Context, subID vanus.ID) error

func (*SecretStorage) Read

func (p *SecretStorage) Read(ctx context.Context,
	subID vanus.ID,
	credentialType primitive.CredentialType,
) (primitive.SinkCredential, error)

func (*SecretStorage) Write

func (p *SecretStorage) Write(ctx context.Context, subID vanus.ID, credential primitive.SinkCredential) error

type Storage

type Storage interface {
	SubscriptionStorage
	OffsetStorage
	TriggerWorkerStorage
	Close()
}

func NewFakeStorage

func NewFakeStorage() Storage

func NewStorage

func NewStorage(config primitive.KvStorageConfig) (Storage, error)

type SubscriptionStorage

type SubscriptionStorage interface {
	CreateSubscription(ctx context.Context, sub *metadata.Subscription) error
	UpdateSubscription(ctx context.Context, sub *metadata.Subscription) error
	DeleteSubscription(ctx context.Context, id vanus.ID) error
	GetSubscription(ctx context.Context, id vanus.ID) (*metadata.Subscription, error)
	ListSubscription(ctx context.Context) ([]*metadata.Subscription, error)
}

func NewSubscriptionStorage

func NewSubscriptionStorage(client kv.Client) SubscriptionStorage

type TriggerWorkerStorage

type TriggerWorkerStorage interface {
	SaveTriggerWorker(context.Context, metadata.TriggerWorkerInfo) error
	GetTriggerWorker(ctx context.Context, id string) (*metadata.TriggerWorkerInfo, error)
	DeleteTriggerWorker(ctx context.Context, id string) error
	ListTriggerWorker(ctx context.Context) ([]*metadata.TriggerWorkerInfo, error)
}

func NewTriggerWorkerStorage

func NewTriggerWorkerStorage(client kv.Client) TriggerWorkerStorage

Jump to

Keyboard shortcuts

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