Documentation
¶
Overview ¶
Package repository defines the api for the pub key stores
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound indicates that the requested key is not known. ErrNotFound = errors.New("key not found") )
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct {
// PublicKey contains the public key data
PublicKey string
// SAName is the optional GCP IAM service-account that has been associated.
SAName string
// SADelegateName is the optional GCP IAM service-account to act as an intermediate delegate
SADelegateName string
}
Key holds data + metadata of a public key entry
type KeyOptions ¶
type KeyOptions struct {
ServiceAccount string `json:"service-account"`
ServiceAccountDelegate string `json:"service-account-delegate"`
}
KeyOptions contain optional settings for a key
type PubKeyRepository ¶
type PubKeyRepository interface {
// LookupKey retrieves the public key of a device from the repository.
// An empty string return indicates that no key exists for the given identifier or
// that the device is blocked.
LookupKey(ctx context.Context, deviceID string) (*Key, error)
PublishKey(ctx context.Context, deviceID, publicKey string) error
// ConfigureKey applies the given opts to the key store.
ConfigureKey(ctx context.Context, deviceID string, opts KeyOptions) error
}
PubKeyRepository defines the api for the pub key stores
Click to show internal directories.
Click to hide internal directories.