storj/pkg/certdb/certdb.go
aligeti b736ae4823
Store the uplinks public key on the satellite so that it can verify bandwidth requests in the future (#1042)
* integrated with bwagreement & psserver

* integrated with pointerdb

* code review updates

* refactor after code review

* uplinkdb rename to certdb

* Code review changes
2019-02-07 14:22:49 -05:00

21 lines
494 B
Go

// Copyright (C) 2018 Storj Labs, Inc.
// See LICENSE for copying information.
package certdb
import (
"context"
"crypto"
"crypto/ecdsa"
"storj.io/storj/pkg/storj"
)
// DB stores uplink public keys.
type DB interface {
// SavePublicKey adds a new bandwidth agreement.
SavePublicKey(context.Context, storj.NodeID, crypto.PublicKey) error
// GetPublicKey gets the public key of uplink corresponding to uplink id
GetPublicKey(context.Context, storj.NodeID) (*ecdsa.PublicKey, error)
}