blob

package
v1.10.15 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package blob is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64ToUrl

func Base64ToUrl(s string) (string, error)

Types

type Blob

type Blob struct {
	*blobTypes.Blob
	Commitment []byte
	Height     uint64
}

func (Blob) ContentType

func (blob Blob) ContentType() string

func (Blob) String

func (blob Blob) String() string

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 MockStorageHeadCall added in v1.9.9

type MockStorageHeadCall struct {
	*gomock.Call
}

MockStorageHeadCall wrap *gomock.Call

func (*MockStorageHeadCall) Do added in v1.9.9

Do rewrite *gomock.Call.Do

func (*MockStorageHeadCall) DoAndReturn added in v1.9.9

func (c *MockStorageHeadCall) DoAndReturn(f func(context.Context) (uint64, error)) *MockStorageHeadCall

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStorageHeadCall) Return added in v1.9.9

func (c *MockStorageHeadCall) Return(arg0 uint64, arg1 error) *MockStorageHeadCall

Return rewrite *gomock.Call.Return

type MockStorageMockRecorder

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

MockStorageMockRecorder is the mock recorder for MockStorage.

func (*MockStorageMockRecorder) Head

Head indicates an expected call of Head.

func (*MockStorageMockRecorder) Save

func (mr *MockStorageMockRecorder) Save(ctx, blob any) *MockStorageSaveCall

Save indicates an expected call of Save.

func (*MockStorageMockRecorder) SaveBulk

func (mr *MockStorageMockRecorder) SaveBulk(ctx, blobs any) *MockStorageSaveBulkCall

SaveBulk indicates an expected call of SaveBulk.

func (*MockStorageMockRecorder) UpdateHead

func (mr *MockStorageMockRecorder) UpdateHead(ctx, head any) *MockStorageUpdateHeadCall

UpdateHead indicates an expected call of UpdateHead.

type MockStorageSaveBulkCall added in v1.9.9

type MockStorageSaveBulkCall struct {
	*gomock.Call
}

MockStorageSaveBulkCall wrap *gomock.Call

func (*MockStorageSaveBulkCall) Do added in v1.9.9

Do rewrite *gomock.Call.Do

func (*MockStorageSaveBulkCall) DoAndReturn added in v1.9.9

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStorageSaveBulkCall) Return added in v1.9.9

Return rewrite *gomock.Call.Return

type MockStorageSaveCall added in v1.9.9

type MockStorageSaveCall struct {
	*gomock.Call
}

MockStorageSaveCall wrap *gomock.Call

func (*MockStorageSaveCall) Do added in v1.9.9

Do rewrite *gomock.Call.Do

func (*MockStorageSaveCall) DoAndReturn added in v1.9.9

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStorageSaveCall) Return added in v1.9.9

Return rewrite *gomock.Call.Return

type MockStorageUpdateHeadCall added in v1.9.9

type MockStorageUpdateHeadCall struct {
	*gomock.Call
}

MockStorageUpdateHeadCall wrap *gomock.Call

func (*MockStorageUpdateHeadCall) Do added in v1.9.9

Do rewrite *gomock.Call.Do

func (*MockStorageUpdateHeadCall) DoAndReturn added in v1.9.9

DoAndReturn rewrite *gomock.Call.DoAndReturn

func (*MockStorageUpdateHeadCall) Return added in v1.9.9

Return rewrite *gomock.Call.Return

type R2

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

func NewR2

func NewR2(cfg R2Config) R2

func (R2) Blob

func (r2 R2) Blob(ctx context.Context, height pkgTypes.Level, namespace, commitment string) (blob nodeTypes.Blob, err error)

func (R2) Blobs

func (r2 R2) Blobs(ctx context.Context, height pkgTypes.Level, hash ...string) ([]nodeTypes.Blob, error)

func (R2) Head

func (r2 R2) Head(ctx context.Context) (uint64, error)

func (*R2) Init

func (r2 *R2) Init(ctx context.Context) error

func (R2) Save

func (r2 R2) Save(ctx context.Context, blob Blob) error

func (R2) SaveBulk

func (r2 R2) SaveBulk(ctx context.Context, blobs []Blob) error

func (R2) UpdateHead

func (r2 R2) UpdateHead(ctx context.Context, head uint64) error

type R2Config

type R2Config struct {
	BucketName      string
	AccountId       string
	AccessKeyId     string
	AccessKeySecret string
}

func (R2Config) R2Url

func (cfg R2Config) R2Url() string

type Storage

type Storage interface {
	Save(ctx context.Context, blob Blob) error
	SaveBulk(ctx context.Context, blobs []Blob) error
	Head(ctx context.Context) (uint64, error)
	UpdateHead(ctx context.Context, head uint64) error
}

Jump to

Keyboard shortcuts

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