Documentation
¶
Overview ¶
Package impl is the implementation of the Firmware Transparency map server.
Index ¶
- func Main(ctx context.Context, opts MapServerOpts) error
- type MapReader
- type MapServerOpts
- type MockMapReader
- func (m *MockMapReader) Aggregation(arg0 int, arg1 uint64) (api.AggregatedFirmware, error)
- func (m *MockMapReader) EXPECT() *MockMapReaderMockRecorder
- func (m *MockMapReader) LatestRevision() (int, types.LogRootV1, int64, error)
- func (m *MockMapReader) Tile(arg0 int, arg1 []byte) (*batchmap.Tile, error)
- type MockMapReaderMockRecorder
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MapReader ¶
type MapReader interface { // LatestRevision gets the metadata for the last completed write. LatestRevision() (rev int, logroot types.LogRootV1, count int64, err error) // Tile gets the tile at the given path in the given revision of the map. Tile(revision int, path []byte) (*batchmap.Tile, error) // Aggregation gets the aggregation for the firmware at the given log index. Aggregation(revision int, fwLogIndex uint64) (api.AggregatedFirmware, error) }
MapReader is an interface that allows a map to be read from storage.
type MapServerOpts ¶
MapServerOpts encapsulates options for running an FT map server.
type MockMapReader ¶
type MockMapReader struct {
// contains filtered or unexported fields
}
MockMapReader is a mock of MapReader interface.
func NewMockMapReader ¶
func NewMockMapReader(ctrl *gomock.Controller) *MockMapReader
NewMockMapReader creates a new mock instance.
func (*MockMapReader) Aggregation ¶
func (m *MockMapReader) Aggregation(arg0 int, arg1 uint64) (api.AggregatedFirmware, error)
Aggregation mocks base method.
func (*MockMapReader) EXPECT ¶
func (m *MockMapReader) EXPECT() *MockMapReaderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMapReader) LatestRevision ¶
LatestRevision mocks base method.
type MockMapReaderMockRecorder ¶
type MockMapReaderMockRecorder struct {
// contains filtered or unexported fields
}
MockMapReaderMockRecorder is the mock recorder for MockMapReader.
func (*MockMapReaderMockRecorder) Aggregation ¶
func (mr *MockMapReaderMockRecorder) Aggregation(arg0, arg1 interface{}) *gomock.Call
Aggregation indicates an expected call of Aggregation.
func (*MockMapReaderMockRecorder) LatestRevision ¶
func (mr *MockMapReaderMockRecorder) LatestRevision() *gomock.Call
LatestRevision indicates an expected call of LatestRevision.
func (*MockMapReaderMockRecorder) Tile ¶
func (mr *MockMapReaderMockRecorder) Tile(arg0, arg1 interface{}) *gomock.Call
Tile indicates an expected call of Tile.