Documentation ¶
Overview ¶
Package out is a generated GoMock package.
Index ¶
- type MockRepository
- func (m *MockRepository) CreateLog(arg0 context.Context, arg1 int64, arg2 []byte) (string, error)
- func (m *MockRepository) CreateTree(arg0 context.Context, arg1, arg2 string) (int64, error)
- func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
- func (m *MockRepository) GetLogByHash(arg0 context.Context, arg1 int64, arg2 string) (*trillian.LogLeaf, error)
- type MockRepositoryMockRecorder
- type Repository
- type TrillianRepository
- func (t TrillianRepository) CreateLog(ctx context.Context, treeID int64, logValue []byte) (string, error)
- func (t TrillianRepository) CreateTree(ctx context.Context, name, description string) (int64, error)
- func (t TrillianRepository) GetLogByHash(ctx context.Context, treeID int64, hash string) (*trillian.LogLeaf, error)
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) CreateTree ¶
CreateTree mocks base method.
func (*MockRepository) EXPECT ¶
func (m *MockRepository) EXPECT() *MockRepositoryMockRecorder
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