storage

package
v4.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2023 License: BSD-2-Clause, BSD-2-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegistrationStatus

type RegistrationStatus uint32
const (
	NotStarted            RegistrationStatus = 0     // Set on session creation
	KeyGenComplete        RegistrationStatus = 10000 // Set upon generation of session information
	PermissioningComplete RegistrationStatus = 20000 // Set upon completion of RegisterWithPermissioning
	UDBComplete           RegistrationStatus = 30000 // Set upon completion of RegisterWithUdb
)

func (RegistrationStatus) String

func (rs RegistrationStatus) String() string

stringer for Identity Status

type Session

type Session interface {
	GetClientVersion() version.Version
	Get(key string) (*versioned.Object, error)
	Set(key string, object *versioned.Object) error
	Delete(key string) error
	GetKV() *versioned.KV
	GetCmixGroup() *cyclic.Group
	GetE2EGroup() *cyclic.Group
	ForwardRegistrationStatus(regStatus RegistrationStatus) error
	GetRegistrationStatus() RegistrationStatus
	SetRegCode(regCode string)
	GetRegCode() (string, error)
	SetNDF(def *ndf.NetworkDefinition)
	GetNDF() *ndf.NetworkDefinition
	GetTransmissionID() *id.ID
	GetTransmissionSalt() []byte
	GetReceptionID() *id.ID
	GetReceptionSalt() []byte
	GetReceptionRSA() rsa.PrivateKey
	GetTransmissionRSA() rsa.PrivateKey
	IsPrecanned() bool
	SetUsername(username string) error
	GetUsername() (string, error)
	PortableUserInfo() user.Info
	GetTransmissionRegistrationValidationSignature() []byte
	GetReceptionRegistrationValidationSignature() []byte
	GetRegistrationTimestamp() time.Time
	SetTransmissionRegistrationValidationSignature(b []byte)
	SetReceptionRegistrationValidationSignature(b []byte)
	SetRegistrationTimestamp(tsNano int64)
}

Session object, backed by encrypted versioned.KVc

func InitTestingSession

func InitTestingSession(i interface{}) Session

InitTestingSession object wrapped around a MemStore object. FOR TESTING ONLY

func Load

func Load(baseDir, password string, currentVersion version.Version) (Session, error)

Load existing user data into the session

func New

func New(baseDir, password string, u user.Info,
	currentVersion version.Version,
	cmixGrp, e2eGrp *cyclic.Group) (Session, error)

New UserData in the session

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL