b736ae4823
* integrated with bwagreement & psserver * integrated with pointerdb * code review updates * refactor after code review * uplinkdb rename to certdb * Code review changes
21 lines
494 B
Go
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)
|
|
}
|