Documentation
¶
Index ¶
- type AnonymousRole
- func (r *AnonymousRole) GetIdentityInfo(id string) (driver.IdentityInfo, error)
- func (r *AnonymousRole) ID() driver.IdentityRole
- func (r *AnonymousRole) IdentityIDs() ([]string, error)
- func (r *AnonymousRole) MapToID(v driver.WalletLookupID) (driver.Identity, string, error)
- func (r *AnonymousRole) RegisterIdentity(config driver.IdentityConfiguration) error
- type GetIdentityFunc
- type IdentityInfo
- type KeyManager
- type KeyManagerProvider
- type LocalIdentity
- type LocalMembership
- func (l *LocalMembership) DefaultNetworkIdentity() driver.Identity
- func (l *LocalMembership) GetDefaultIdentifier() string
- func (l *LocalMembership) GetIdentifier(id driver.Identity) (string, error)
- func (l *LocalMembership) GetIdentityInfo(label string, auditInfo []byte) (driver.IdentityInfo, error)
- func (l *LocalMembership) IDs() ([]string, error)
- func (l *LocalMembership) IsMe(id driver.Identity) bool
- func (l *LocalMembership) Load(identities []*config.Identity) error
- func (l *LocalMembership) RegisterIdentity(idConfig driver.IdentityConfiguration) error
- type LongTermRole
- func (r *LongTermRole) GetIdentityInfo(id string) (driver.IdentityInfo, error)
- func (r *LongTermRole) ID() driver.IdentityRole
- func (r *LongTermRole) IdentityIDs() ([]string, error)
- func (r *LongTermRole) MapToID(v driver.WalletLookupID) (driver.Identity, string, error)
- func (r *LongTermRole) RegisterIdentity(config driver.IdentityConfiguration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnonymousRole ¶
type AnonymousRole struct {
// contains filtered or unexported fields
}
AnonymousRole models a role whose identities are anonymous
func NewAnonymousRole ¶
func NewAnonymousRole(logger logging.Logger, roleID driver.IdentityRole, networkID string, nodeIdentity driver.Identity, localMembership localMembership) *AnonymousRole
func (*AnonymousRole) GetIdentityInfo ¶
func (r *AnonymousRole) GetIdentityInfo(id string) (driver.IdentityInfo, error)
GetIdentityInfo returns the identity information for the given identity identifier
func (*AnonymousRole) ID ¶
func (r *AnonymousRole) ID() driver.IdentityRole
func (*AnonymousRole) IdentityIDs ¶
func (r *AnonymousRole) IdentityIDs() ([]string, error)
func (*AnonymousRole) MapToID ¶
func (r *AnonymousRole) MapToID(v driver.WalletLookupID) (driver.Identity, string, error)
MapToID returns the identity for the given argument
func (*AnonymousRole) RegisterIdentity ¶
func (r *AnonymousRole) RegisterIdentity(config driver.IdentityConfiguration) error
RegisterIdentity registers the given identity
type GetIdentityFunc ¶
GetIdentityFunc is a function that returns an Identity and its associated audit info for the given options
type IdentityInfo ¶
type IdentityInfo struct {
// contains filtered or unexported fields
}
IdentityInfo implements the driver.IdentityInfo interface on top LocalIdentity
func NewIdentityInfo ¶
func NewIdentityInfo(localIdentity *LocalIdentity, getIdentity func() (driver.Identity, []byte, error)) *IdentityInfo
func (*IdentityInfo) EnrollmentID ¶
func (i *IdentityInfo) EnrollmentID() string
func (*IdentityInfo) ID ¶
func (i *IdentityInfo) ID() string
func (*IdentityInfo) Remote ¶
func (i *IdentityInfo) Remote() bool
type KeyManager ¶
type KeyManagerProvider ¶
type KeyManagerProvider interface {
Get(identityConfig *driver.IdentityConfiguration) (KeyManager, error)
}
type LocalIdentity ¶
type LocalIdentity struct { Name string EnrollmentID string Default bool GetIdentity GetIdentityFunc Remote bool }
LocalIdentity contains information about an identity
type LocalMembership ¶
type LocalMembership struct { KeyManagerProvider KeyManagerProvider IdentityType string // contains filtered or unexported fields }
func NewLocalMembership ¶
func NewLocalMembership( logger logging.Logger, config driver2.Config, defaultNetworkIdentity driver.Identity, signerService driver2.SigService, deserializerManager driver2.DeserializerManager, identityDB driver3.IdentityDB, binderService driver2.BinderService, identityType string, KeyManagerProvider KeyManagerProvider, ) *LocalMembership
func (*LocalMembership) DefaultNetworkIdentity ¶
func (l *LocalMembership) DefaultNetworkIdentity() driver.Identity
func (*LocalMembership) GetDefaultIdentifier ¶
func (l *LocalMembership) GetDefaultIdentifier() string
func (*LocalMembership) GetIdentifier ¶
func (l *LocalMembership) GetIdentifier(id driver.Identity) (string, error)
func (*LocalMembership) GetIdentityInfo ¶
func (l *LocalMembership) GetIdentityInfo(label string, auditInfo []byte) (driver.IdentityInfo, error)
func (*LocalMembership) IDs ¶
func (l *LocalMembership) IDs() ([]string, error)
func (*LocalMembership) RegisterIdentity ¶
func (l *LocalMembership) RegisterIdentity(idConfig driver.IdentityConfiguration) error
type LongTermRole ¶
type LongTermRole struct {
// contains filtered or unexported fields
}
LongTermRole models a role whose identities are not anonymous
func NewLongTermRole ¶
func NewLongTermRole(logger logging.Logger, roleID driver.IdentityRole, networkID string, nodeIdentity driver.Identity, localMembership localMembership) *LongTermRole
func (*LongTermRole) GetIdentityInfo ¶
func (r *LongTermRole) GetIdentityInfo(id string) (driver.IdentityInfo, error)
GetIdentityInfo returns the identity information for the given identity identifier
func (*LongTermRole) ID ¶
func (r *LongTermRole) ID() driver.IdentityRole
func (*LongTermRole) IdentityIDs ¶
func (r *LongTermRole) IdentityIDs() ([]string, error)
func (*LongTermRole) MapToID ¶
func (r *LongTermRole) MapToID(v driver.WalletLookupID) (driver.Identity, string, error)
MapToID returns the identity for the given argument
func (*LongTermRole) RegisterIdentity ¶
func (r *LongTermRole) RegisterIdentity(config driver.IdentityConfiguration) error
RegisterIdentity registers the given identity