out

package
v1.34.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package out is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRepository

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

MockRepository is a mock of Repository interface.

func NewMockRepository

func NewMockRepository(ctrl *gomock.Controller) *MockRepository

NewMockRepository creates a new mock instance.

func (*MockRepository) CreateLog

func (m *MockRepository) CreateLog(arg0 context.Context, arg1 int64, arg2 []byte) (string, error)

CreateLog mocks base method.

func (*MockRepository) CreateTree

func (m *MockRepository) CreateTree(arg0 context.Context, arg1, arg2 string) (int64, error)

CreateTree mocks base method.

func (*MockRepository) EXPECT

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

func (*MockRepository) GetLogByHash

func (m *MockRepository) GetLogByHash(arg0 context.Context, arg1 int64, arg2 string) (*trillian.LogLeaf, error)

GetLogByHash mocks base method.

type MockRepositoryMockRecorder

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

MockRepositoryMockRecorder is the mock recorder for MockRepository.

func (*MockRepositoryMockRecorder) CreateLog

func (mr *MockRepositoryMockRecorder) CreateLog(arg0, arg1, arg2 any) *gomock.Call

CreateLog indicates an expected call of CreateLog.

func (*MockRepositoryMockRecorder) CreateTree

func (mr *MockRepositoryMockRecorder) CreateTree(arg0, arg1, arg2 any) *gomock.Call

CreateTree indicates an expected call of CreateTree.

func (*MockRepositoryMockRecorder) GetLogByHash

func (mr *MockRepositoryMockRecorder) GetLogByHash(arg0, arg1, arg2 any) *gomock.Call

GetLogByHash indicates an expected call of GetLogByHash.

type Repository

type Repository interface {
	CreateTree(ctx context.Context, name, description string) (int64, error)
	CreateLog(ctx context.Context, treeID int64, logValue []byte) (string, error)
	GetLogByHash(ctx context.Context, treeID int64, hash string) (*trillian.LogLeaf, error)
}

Repository provides an interface for gRPC operations related to Trillian

type TrillianRepository

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

TrillianRepository interacts with Trillian log server

func NewTrillianRepository

func NewTrillianRepository(conn *mtrillian.TrillianConnection) *TrillianRepository

NewTrillianRepository returns a new instance of TrillianRepository using the given gRPC connection.

func (TrillianRepository) CreateLog

func (t TrillianRepository) CreateLog(ctx context.Context, treeID int64, logValue []byte) (string, error)

CreateLog creates a log leaf on a tree

func (TrillianRepository) CreateTree

func (t TrillianRepository) CreateTree(ctx context.Context, name, description string) (int64, error)

CreateTree creates a tree to store logs

func (TrillianRepository) GetLogByHash

func (t TrillianRepository) GetLogByHash(ctx context.Context, treeID int64, hash string) (*trillian.LogLeaf, error)

Jump to

Keyboard shortcuts

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