storage

package
v4.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: BSD-2-Clause, BSD-2-Clause Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFromRemote added in v4.7.1

func InitFromRemote(storage versioned.KV,
	def *ndf.NetworkDefinition,
	currentVersion version.Version,
	cmixGrp, e2eGrp *cyclic.Group) error

InitFromRemote sets local data for a session variable

func SaveNDF added in v4.7.1

func SaveNDF(kv versioned.KV, def *ndf.NetworkDefinition) error

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
	RegStatus() 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(storage versioned.KV,
	currentVersion version.Version) (Session, error)

Load existing user data into the session

func New

func New(storage versioned.KV, 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