Documentation ¶
Overview ¶
Code generated by MockGen. DO NOT EDIT. Source: storage.go
Generated by this command:
mockgen -source=storage.go -destination=mock.go -package=blob -typed
Package blob is a generated GoMock package.
Index ¶
- func Base64ToUrl(s string) (string, error)
- type Blob
- type MockStorage
- func (m *MockStorage) EXPECT() *MockStorageMockRecorder
- func (m *MockStorage) Head(ctx context.Context) (uint64, error)
- func (m *MockStorage) Save(ctx context.Context, blob Blob) error
- func (m *MockStorage) SaveBulk(ctx context.Context, blobs []Blob) error
- func (m *MockStorage) UpdateHead(ctx context.Context, head uint64) error
- type MockStorageMockRecorder
- func (mr *MockStorageMockRecorder) Head(ctx any) *StorageHeadCall
- func (mr *MockStorageMockRecorder) Save(ctx, blob any) *StorageSaveCall
- func (mr *MockStorageMockRecorder) SaveBulk(ctx, blobs any) *StorageSaveBulkCall
- func (mr *MockStorageMockRecorder) UpdateHead(ctx, head any) *StorageUpdateHeadCall
- type R2
- func (r2 R2) Blob(ctx context.Context, height pkgTypes.Level, namespace, commitment string) (blob nodeTypes.Blob, err error)
- func (r2 R2) Blobs(ctx context.Context, height pkgTypes.Level, hash ...string) ([]nodeTypes.Blob, error)
- func (r2 R2) Head(ctx context.Context) (uint64, error)
- func (r2 *R2) Init(ctx context.Context) error
- func (r2 R2) Save(ctx context.Context, blob Blob) error
- func (r2 R2) SaveBulk(ctx context.Context, blobs []Blob) error
- func (r2 R2) UpdateHead(ctx context.Context, head uint64) error
- type R2Config
- type Storage
- type StorageHeadCall
- type StorageSaveBulkCall
- type StorageSaveCall
- type StorageUpdateHeadCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Base64ToUrl ¶
Types ¶
type Blob ¶
func (Blob) ContentType ¶
type MockStorage ¶
type MockStorage struct {
// contains filtered or unexported fields
}
MockStorage is a mock of Storage interface.
func NewMockStorage ¶
func NewMockStorage(ctrl *gomock.Controller) *MockStorage
NewMockStorage creates a new mock instance.
func (*MockStorage) EXPECT ¶
func (m *MockStorage) EXPECT() *MockStorageMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStorage) Head ¶
func (m *MockStorage) Head(ctx context.Context) (uint64, error)
Head mocks base method.
func (*MockStorage) Save ¶
func (m *MockStorage) Save(ctx context.Context, blob Blob) error
Save mocks base method.
func (*MockStorage) SaveBulk ¶
func (m *MockStorage) SaveBulk(ctx context.Context, blobs []Blob) error
SaveBulk mocks base method.
func (*MockStorage) UpdateHead ¶
func (m *MockStorage) UpdateHead(ctx context.Context, head uint64) error
UpdateHead mocks base method.
type MockStorageMockRecorder ¶
type MockStorageMockRecorder struct {
// contains filtered or unexported fields
}
MockStorageMockRecorder is the mock recorder for MockStorage.
func (*MockStorageMockRecorder) Head ¶
func (mr *MockStorageMockRecorder) Head(ctx any) *StorageHeadCall
Head indicates an expected call of Head.
func (*MockStorageMockRecorder) Save ¶
func (mr *MockStorageMockRecorder) Save(ctx, blob any) *StorageSaveCall
Save indicates an expected call of Save.
func (*MockStorageMockRecorder) SaveBulk ¶
func (mr *MockStorageMockRecorder) SaveBulk(ctx, blobs any) *StorageSaveBulkCall
SaveBulk indicates an expected call of SaveBulk.
func (*MockStorageMockRecorder) UpdateHead ¶
func (mr *MockStorageMockRecorder) UpdateHead(ctx, head any) *StorageUpdateHeadCall
UpdateHead indicates an expected call of UpdateHead.
type R2 ¶
type R2 struct {
// contains filtered or unexported fields
}
type R2Config ¶
type StorageHeadCall ¶
StorageHeadCall wrap *gomock.Call
func (*StorageHeadCall) Do ¶
func (c *StorageHeadCall) Do(f func(context.Context) (uint64, error)) *StorageHeadCall
Do rewrite *gomock.Call.Do
func (*StorageHeadCall) DoAndReturn ¶
func (c *StorageHeadCall) DoAndReturn(f func(context.Context) (uint64, error)) *StorageHeadCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*StorageHeadCall) Return ¶
func (c *StorageHeadCall) Return(arg0 uint64, arg1 error) *StorageHeadCall
Return rewrite *gomock.Call.Return
type StorageSaveBulkCall ¶
StorageSaveBulkCall wrap *gomock.Call
func (*StorageSaveBulkCall) Do ¶
func (c *StorageSaveBulkCall) Do(f func(context.Context, []Blob) error) *StorageSaveBulkCall
Do rewrite *gomock.Call.Do
func (*StorageSaveBulkCall) DoAndReturn ¶
func (c *StorageSaveBulkCall) DoAndReturn(f func(context.Context, []Blob) error) *StorageSaveBulkCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*StorageSaveBulkCall) Return ¶
func (c *StorageSaveBulkCall) Return(arg0 error) *StorageSaveBulkCall
Return rewrite *gomock.Call.Return
type StorageSaveCall ¶
StorageSaveCall wrap *gomock.Call
func (*StorageSaveCall) Do ¶
func (c *StorageSaveCall) Do(f func(context.Context, Blob) error) *StorageSaveCall
Do rewrite *gomock.Call.Do
func (*StorageSaveCall) DoAndReturn ¶
func (c *StorageSaveCall) DoAndReturn(f func(context.Context, Blob) error) *StorageSaveCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*StorageSaveCall) Return ¶
func (c *StorageSaveCall) Return(arg0 error) *StorageSaveCall
Return rewrite *gomock.Call.Return
type StorageUpdateHeadCall ¶
StorageUpdateHeadCall wrap *gomock.Call
func (*StorageUpdateHeadCall) Do ¶
func (c *StorageUpdateHeadCall) Do(f func(context.Context, uint64) error) *StorageUpdateHeadCall
Do rewrite *gomock.Call.Do
func (*StorageUpdateHeadCall) DoAndReturn ¶
func (c *StorageUpdateHeadCall) DoAndReturn(f func(context.Context, uint64) error) *StorageUpdateHeadCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*StorageUpdateHeadCall) Return ¶
func (c *StorageUpdateHeadCall) Return(arg0 error) *StorageUpdateHeadCall
Return rewrite *gomock.Call.Return