2019-02-07 19:22:49 +00:00
|
|
|
// Copyright (C) 2018 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
package certdb
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"crypto"
|
|
|
|
|
|
|
|
"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
|
2019-02-07 20:39:20 +00:00
|
|
|
GetPublicKey(context.Context, storj.NodeID) (crypto.PublicKey, error)
|
2019-02-07 19:22:49 +00:00
|
|
|
}
|