Documentation ¶
Overview ¶
Package http contains private implementation details for the FirmwareTransparency personality server.
Index ¶
- type CAS
- type MockTrillian
- func (m *MockTrillian) AddSignedStatement(arg0 context.Context, arg1 []byte) error
- func (m *MockTrillian) ConsistencyProof(arg0 context.Context, arg1, arg2 uint64) ([][]byte, error)
- func (m *MockTrillian) EXPECT() *MockTrillianMockRecorder
- func (m *MockTrillian) FirmwareManifestAtIndex(arg0 context.Context, arg1, arg2 uint64) ([]byte, [][]byte, error)
- func (m *MockTrillian) InclusionProofByHash(arg0 context.Context, arg1 []byte, arg2 uint64) (uint64, [][]byte, error)
- func (m *MockTrillian) Root() *types.LogRootV1
- type MockTrillianMockRecorder
- func (mr *MockTrillianMockRecorder) AddSignedStatement(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockTrillianMockRecorder) ConsistencyProof(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockTrillianMockRecorder) FirmwareManifestAtIndex(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockTrillianMockRecorder) InclusionProofByHash(arg0, arg1, arg2 interface{}) *gomock.Call
- func (mr *MockTrillianMockRecorder) Root() *gomock.Call
- type Server
- type Trillian
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CAS ¶
type CAS interface { // Store puts the image under the key. Store([]byte, []byte) error // Retrieve gets a binary image that was previously stored. // Must return status code NotFound if no such image exists. Retrieve([]byte) ([]byte, error) }
CAS is the interface to the Content Addressable Store for firmware images.
type MockTrillian ¶
type MockTrillian struct {
// contains filtered or unexported fields
}
MockTrillian is a mock of Trillian interface.
func NewMockTrillian ¶
func NewMockTrillian(ctrl *gomock.Controller) *MockTrillian
NewMockTrillian creates a new mock instance.
func (*MockTrillian) AddSignedStatement ¶
func (m *MockTrillian) AddSignedStatement(arg0 context.Context, arg1 []byte) error
AddSignedStatement mocks base method.
func (*MockTrillian) ConsistencyProof ¶
ConsistencyProof mocks base method.
func (*MockTrillian) EXPECT ¶
func (m *MockTrillian) EXPECT() *MockTrillianMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTrillian) FirmwareManifestAtIndex ¶
func (m *MockTrillian) FirmwareManifestAtIndex(arg0 context.Context, arg1, arg2 uint64) ([]byte, [][]byte, error)
FirmwareManifestAtIndex mocks base method.
func (*MockTrillian) InclusionProofByHash ¶
func (m *MockTrillian) InclusionProofByHash(arg0 context.Context, arg1 []byte, arg2 uint64) (uint64, [][]byte, error)
InclusionProofByHash mocks base method.
type MockTrillianMockRecorder ¶
type MockTrillianMockRecorder struct {
// contains filtered or unexported fields
}
MockTrillianMockRecorder is the mock recorder for MockTrillian.
func (*MockTrillianMockRecorder) AddSignedStatement ¶
func (mr *MockTrillianMockRecorder) AddSignedStatement(arg0, arg1 interface{}) *gomock.Call
AddSignedStatement indicates an expected call of AddSignedStatement.
func (*MockTrillianMockRecorder) ConsistencyProof ¶
func (mr *MockTrillianMockRecorder) ConsistencyProof(arg0, arg1, arg2 interface{}) *gomock.Call
ConsistencyProof indicates an expected call of ConsistencyProof.
func (*MockTrillianMockRecorder) FirmwareManifestAtIndex ¶
func (mr *MockTrillianMockRecorder) FirmwareManifestAtIndex(arg0, arg1, arg2 interface{}) *gomock.Call
FirmwareManifestAtIndex indicates an expected call of FirmwareManifestAtIndex.
func (*MockTrillianMockRecorder) InclusionProofByHash ¶
func (mr *MockTrillianMockRecorder) InclusionProofByHash(arg0, arg1, arg2 interface{}) *gomock.Call
InclusionProofByHash indicates an expected call of InclusionProofByHash.
func (*MockTrillianMockRecorder) Root ¶
func (mr *MockTrillianMockRecorder) Root() *gomock.Call
Root indicates an expected call of Root.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the core state & handler implementation of the FT personality.
func (*Server) RegisterHandlers ¶
RegisterHandlers registers HTTP handlers for firmware transparency endpoints.
type Trillian ¶
type Trillian interface { // AddSignedStatement adds the statement to the log if it isn't already present. AddSignedStatement(ctx context.Context, data []byte) error // Root returns the most recent root seen by this client. Root() *types.LogRootV1 // ConsistencyProof gets the consistency proof between two given tree sizes. ConsistencyProof(ctx context.Context, from, to uint64) ([][]byte, error) // FirmwareManifestAtIndex gets the value at the given index and an inclusion proof // to the given tree size. FirmwareManifestAtIndex(ctx context.Context, index, treeSize uint64) ([]byte, [][]byte, error) // InclusionProofByHash fetches an inclusion proof and index for the first leaf found with the specified hash, if any. InclusionProofByHash(ctx context.Context, hash []byte, treeSize uint64) (uint64, [][]byte, error) }
Trillian is the interface to the Trillian Log required for the personality frontend.