Documentation
¶
Index ¶
- Constants
- func Keystore(kvs KVS) *kvsAdapter
- type Backend
- type IdentityConfigurationsIterator
- type IdentityStore
- func (s *IdentityStore) AddConfiguration(ctx context.Context, wp storage.IdentityConfiguration) error
- func (s *IdentityStore) Close() error
- func (s *IdentityStore) ConfigurationExists(ctx context.Context, id, configurationType, url string) (bool, error)
- func (s *IdentityStore) ConfigurationsByID(ctx context.Context, id, configurationType string) ([]storage.IdentityConfiguration, error)
- func (s *IdentityStore) GetAuditInfo(ctx context.Context, identity []byte) ([]byte, error)
- func (s *IdentityStore) GetConfiguration(ctx context.Context, id, typ, url string) (*storage.IdentityConfiguration, error)
- func (s *IdentityStore) GetExistingSignerInfo(ctx context.Context, identities ...tdriver.Identity) ([]string, error)
- func (s *IdentityStore) GetSignerInfo(ctx context.Context, identity []byte) ([]byte, error)
- func (s *IdentityStore) GetTokenInfo(ctx context.Context, identity []byte) ([]byte, []byte, error)
- func (s *IdentityStore) IterateSigners(_ context.Context, _, _ int) ([]idriver.SignerEntry, error)
- func (s *IdentityStore) IteratorConfigurations(ctx context.Context, configurationType string) (idriver.IdentityConfigurationIterator, error)
- func (s *IdentityStore) Notifier() (idriver.IdentityConfigurationNotifier, error)
- func (s *IdentityStore) RegisterIdentityDescriptor(ctx context.Context, descriptor *idriver.IdentityDescriptor, ...) error
- func (s *IdentityStore) SignerInfoExists(ctx context.Context, id []byte) (bool, error)
- func (s *IdentityStore) StoreIdentityData(ctx context.Context, id []byte, identityAudit []byte, tokenMetadata []byte, ...) error
- func (s *IdentityStore) StoreSignerInfo(ctx context.Context, id tdriver.Identity, info []byte) error
- type KVS
- type KeyValuePair
- type RecipientData
- type TrackedKVS
- type WalletStore
- func (s *WalletStore) Close() error
- func (s *WalletStore) GetWalletID(ctx context.Context, identity driver2.Identity, roleID int) (storage.WalletID, error)
- func (s *WalletStore) GetWalletIDs(ctx context.Context, roleID int) ([]storage.WalletID, error)
- func (s *WalletStore) IdentityExists(ctx context.Context, identity driver2.Identity, wID storage.WalletID, ...) bool
- func (s *WalletStore) LoadMeta(ctx context.Context, identity driver2.Identity, wID storage.WalletID, ...) ([]byte, error)
- func (s *WalletStore) StoreIdentity(ctx context.Context, identity driver2.Identity, eID string, ...) error
Constants ¶
View Source
const ( IdentityDBPrefix = "idb" IdentityDBConfigurationPrefix = "configuration" IdentityDBData = "data" IdentityDBSigner = "signer" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Backend ¶
type Backend interface {
Put(ctx context.Context, id string, value any) error
Get(ctx context.Context, id string, entry any) error
Delete(ctx context.Context, id string) error
Close() error
}
Backend interface for key-value storage
type IdentityConfigurationsIterator ¶
func (*IdentityConfigurationsIterator) Close ¶
func (w *IdentityConfigurationsIterator) Close()
func (*IdentityConfigurationsIterator) Next ¶
func (w *IdentityConfigurationsIterator) Next() (*storage.IdentityConfiguration, error)
type IdentityStore ¶
type IdentityStore struct {
// contains filtered or unexported fields
}
func NewIdentityStore ¶
func NewIdentityStore(kvs KVS, tmsID token.TMSID) *IdentityStore
func (*IdentityStore) AddConfiguration ¶
func (s *IdentityStore) AddConfiguration(ctx context.Context, wp storage.IdentityConfiguration) error
func (*IdentityStore) Close ¶
func (s *IdentityStore) Close() error
func (*IdentityStore) ConfigurationExists ¶
func (*IdentityStore) ConfigurationsByID ¶ added in v0.14.2
func (s *IdentityStore) ConfigurationsByID(ctx context.Context, id, configurationType string) ([]storage.IdentityConfiguration, error)
ConfigurationsByID returns all configurations with the given id and type, regardless of their url. The composite key encodes id and url together, so this implementation scans the type and filters by id.
func (*IdentityStore) GetAuditInfo ¶
func (*IdentityStore) GetConfiguration ¶
func (s *IdentityStore) GetConfiguration(ctx context.Context, id, typ, url string) (*storage.IdentityConfiguration, error)
func (*IdentityStore) GetExistingSignerInfo ¶
func (*IdentityStore) GetSignerInfo ¶
func (*IdentityStore) GetTokenInfo ¶
func (*IdentityStore) IterateSigners ¶
func (s *IdentityStore) IterateSigners(_ context.Context, _, _ int) ([]idriver.SignerEntry, error)
IterateSigners is not supported by the KVS-backed identity store. It returns ErrNotSupported, consistent with other unsupported operations on this store.
func (*IdentityStore) IteratorConfigurations ¶
func (s *IdentityStore) IteratorConfigurations(ctx context.Context, configurationType string) (idriver.IdentityConfigurationIterator, error)
func (*IdentityStore) Notifier ¶
func (s *IdentityStore) Notifier() (idriver.IdentityConfigurationNotifier, error)
func (*IdentityStore) RegisterIdentityDescriptor ¶
func (s *IdentityStore) RegisterIdentityDescriptor(ctx context.Context, descriptor *idriver.IdentityDescriptor, alias tdriver.Identity) error
func (*IdentityStore) SignerInfoExists ¶
func (*IdentityStore) StoreIdentityData ¶
func (*IdentityStore) StoreSignerInfo ¶
type KVS ¶
type KVS interface {
Exists(ctx context.Context, id string) bool
GetExisting(ctx context.Context, ids ...string) []string
Put(ctx context.Context, id string, state any) error
Get(ctx context.Context, id string, state any) error
GetByPartialCompositeID(ctx context.Context, prefix string, attrs []string) (kvs.Iterator, error)
Close() error
Delete(ctx context.Context, id string) error
}
func NewInMemory ¶
type KeyValuePair ¶
KeyValuePair stores tracking info
type RecipientData ¶
type RecipientData struct {
// AuditInfo contains private information Identity
AuditInfo []byte
// TokenMetadata contains public information related to the token to be assigned to this Recipient.
TokenMetadata []byte
// TokenMetadataAuditInfo contains private information TokenMetadata
TokenMetadataAuditInfo []byte
}
RecipientData contains information about the identity of a token owner
type TrackedKVS ¶
type TrackedKVS struct {
Backend Backend
PutCounter int
GetCounter int
PutHistory []KeyValuePair
GetHistory []KeyValuePair
// contains filtered or unexported fields
}
TrackedKVS wraps a Backend and tracks operations
func NewTrackedMemory ¶
func NewTrackedMemory() *TrackedKVS
func NewTrackedMemoryFrom ¶
func NewTrackedMemoryFrom(backend Backend) *TrackedKVS
func (*TrackedKVS) Close ¶
func (f *TrackedKVS) Close() error
func (*TrackedKVS) Delete ¶
func (f *TrackedKVS) Delete(id string) error
type WalletStore ¶
type WalletStore struct {
// contains filtered or unexported fields
}
func NewWalletStore ¶
func NewWalletStore(kvs KVS, tmsID token.TMSID) *WalletStore
func (*WalletStore) Close ¶
func (s *WalletStore) Close() error
func (*WalletStore) GetWalletID ¶
func (*WalletStore) GetWalletIDs ¶
func (*WalletStore) IdentityExists ¶
Click to show internal directories.
Click to hide internal directories.