Documentation ¶
Index ¶
- Variables
- func AuthorityFromName(user string, proof []byte) (*authority, bool)
- func DefaultAdminAuthority(proof []byte) *authority
- func DefaultAuthority(proof []byte) *authority
- type AdminSPAuthenticator
- type InitializeOpt
- type LockRange
- type LockingSP
- type LockingSPAuthenticator
- type LockingSPMeta
- type Range
- func (r *Range) Erase() error
- func (r *Range) LockRead() error
- func (r *Range) LockWrite() error
- func (r *Range) SetRange(from LockRange, to LockRange) error
- func (r *Range) SetReadLockEnabled(v bool) error
- func (r *Range) SetWriteLockEnabled(v bool) error
- func (r *Range) UnlockRead() error
- func (r *Range) UnlockWrite() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( LifeCycleStateManufacturedInactive table.LifeCycleState = 8 LifeCycleStateManufactured table.LifeCycleState = 9 )
View Source
var (
DefaultAuthorityWithMSID = &authority{}
)
Functions ¶
func AuthorityFromName ¶
func DefaultAdminAuthority ¶
func DefaultAdminAuthority(proof []byte) *authority
func DefaultAuthority ¶
func DefaultAuthority(proof []byte) *authority
Types ¶
type AdminSPAuthenticator ¶
type InitializeOpt ¶
type InitializeOpt func(ic *initializeConfig)
func WithAuth ¶
func WithAuth(auth AdminSPAuthenticator) InitializeOpt
func WithMaxComPacketSize ¶
func WithMaxComPacketSize(size uint) InitializeOpt
func WithReceiveTimeout ¶
func WithReceiveTimeout(retries int, interval time.Duration) InitializeOpt
type LockingSP ¶
type LockingSP struct { Session *core.Session // All authorities that have been discovered on the SP. // This will likely be only the authenticated UID unless authorized as an Admin Authorities map[string]uid.AuthorityObjectUID // The full range of Ranges (heh!) that the current session has access to see and possibly modify GlobalRange *Range Ranges []*Range // Ranges[0] == GlobalRange // These are always false on SSC Enterprise MBREnabled bool MBRDone bool MBRDoneOnReset []table.ResetType }
func NewSession ¶
func NewSession(cs *core.ControlSession, lmeta *LockingSPMeta, auth LockingSPAuthenticator, opts ...core.SessionOpt) (*LockingSP, error)
func (*LockingSP) SetMBRDone ¶
type LockingSPAuthenticator ¶
type LockingSPAuthenticator interface {
AuthenticateLockingSP(s *core.Session, lmeta *LockingSPMeta) error
}
type LockingSPMeta ¶
type LockingSPMeta struct { SPID uid.SPID MSID []byte D0 *core.Level0Discovery }
func Initialize ¶
func Initialize(coreObj *core.Core, opts ...InitializeOpt) (*core.ControlSession, *LockingSPMeta, error)
Initialize WHAT?
type Range ¶
type Range struct { UID uid.RowUID Name *string // All known authoritiers that have access to lock/unlock on this range // Only populated with other users if authenticated as an Admin // For enterprise this will always be just one user, the band-dedicated BandMasterN for RangeN Users map[string]uid.AuthorityObjectUID Start LockRange End LockRange ReadLockEnabled bool WriteLockEnabled bool ReadLocked bool WriteLocked bool // contains filtered or unexported fields }
func (*Range) SetReadLockEnabled ¶
func (*Range) SetWriteLockEnabled ¶
func (*Range) UnlockRead ¶
func (*Range) UnlockWrite ¶
Click to show internal directories.
Click to hide internal directories.