Documentation
¶
Index ¶
- Constants
- Variables
- type GetIdentityFunc
- type IdentityInfo
- type KeyManager
- type KeyManagerProvider
- type LocalIdentity
- type LocalIdentityWithPriority
- 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) (idriver.IdentityInfo, error)
- func (l *LocalMembership) IDs() ([]string, error)
- func (l *LocalMembership) IsMe(ctx context.Context, id driver.Identity) bool
- func (l *LocalMembership) Load(identities []*idriver.ConfiguredIdentity, targets []view.Identity) error
- func (l *LocalMembership) RegisterIdentity(ctx context.Context, idConfig driver.IdentityConfiguration) error
- type TypedIdentityInfo
Constants ¶
View Source
const (
MaxPriority = -1 // smaller numbers, higher priority
)
Variables ¶
View Source
var PriorityComparison = func(a, b LocalIdentityWithPriority) int {
if a.Priority < b.Priority {
return -1
} else if a.Priority > b.Priority {
return 1
}
return 0
}
PriorityComparison gives higher priority to smaller numbers
Functions ¶
This section is empty.
Types ¶
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(ctx context.Context) (driver.Identity, []byte, error)) *IdentityInfo
func (*IdentityInfo) Anonymous ¶
func (i *IdentityInfo) Anonymous() bool
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 Anonymous bool GetIdentity GetIdentityFunc Remote bool }
LocalIdentity contains information about an identity
func (*LocalIdentity) String ¶
func (i *LocalIdentity) String() string
type LocalIdentityWithPriority ¶
type LocalIdentityWithPriority struct { Identity *LocalIdentity Priority int }
type LocalMembership ¶
type LocalMembership struct { KeyManagerProviders []KeyManagerProvider IdentityType string IdentityProvider idriver.IdentityProvider DefaultAnonymous bool // contains filtered or unexported fields }
func NewLocalMembership ¶
func NewLocalMembership( logger logging.Logger, config idriver.Config, defaultNetworkIdentity driver.Identity, signerService idriver.SigService, deserializerManager idriver.DeserializerManager, identityDB idriver.IdentityStoreService, binderService idriver.BinderService, identityType string, defaultAnonymous bool, identityProvider idriver.IdentityProvider, keyManagerProviders ...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) (idriver.IdentityInfo, error)
func (*LocalMembership) IDs ¶
func (l *LocalMembership) IDs() ([]string, error)
func (*LocalMembership) Load ¶
func (l *LocalMembership) Load(identities []*idriver.ConfiguredIdentity, targets []view.Identity) error
func (*LocalMembership) RegisterIdentity ¶
func (l *LocalMembership) RegisterIdentity(ctx context.Context, idConfig driver.IdentityConfiguration) error
Click to show internal directories.
Click to hide internal directories.