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)
|
||
|
}
|