2025-08-06 22:31:43 +05:00
|
|
|
package storage
|
|
|
|
|
|
|
|
|
|
import (
|
2026-03-11 16:00:34 +05:00
|
|
|
"context"
|
|
|
|
|
"hkp-clavis/internal/model"
|
2025-08-06 22:31:43 +05:00
|
|
|
|
|
|
|
|
"github.com/ProtonMail/go-crypto/openpgp"
|
2026-03-11 16:00:34 +05:00
|
|
|
hkp "github.com/emersion/go-openpgp-hkp"
|
2025-08-06 22:31:43 +05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type StorageInterface interface {
|
2026-03-11 16:00:34 +05:00
|
|
|
Add(ctx context.Context, el openpgp.EntityList) ([]*model.PGPKey, error)
|
|
|
|
|
Get(ctx context.Context, r *hkp.LookupRequest) (openpgp.EntityList, error)
|
|
|
|
|
Index(ctx context.Context, r *hkp.LookupRequest) ([]hkp.IndexKey, error)
|
2025-08-06 22:31:43 +05:00
|
|
|
}
|