Versions in this module Expand all Collapse all v0 v0.2.0 Dec 1, 2025 v0.1.0 Nov 28, 2025 Changes in this version + var ErrAddressAlreadyReserved = errors.New("virtual account address already in storage") + var ErrAlreadyInitialized = errors.New("storage account already initalized") + var ErrInvalidInitialCapacity = errors.New("available capacity must be maximum when initializing storage") + var ErrNoFreeStorage = errors.New("no available free storage") + var ErrNotFound = errors.New("no storage accounts found") + func GetMaxCapacity(levels uint8) uint64 + type Purpose uint8 + const PurposeDeletion + const PurposeUnknown + type Record struct + Address string + AvailableCapacity uint64 + CreatedAt time.Time + Id uint64 + Levels uint8 + Name string + Purpose Purpose + Vm string + func (r *Record) Clone() Record + func (r *Record) CopyTo(dst *Record) + func (r *Record) Validate() error + type Store interface + FindAnyWithAvailableCapacity func(ctx context.Context, vm string, purpose Purpose, minCapacity uint64) (*Record, error) + InitializeStorage func(ctx context.Context, record *Record) error + ReserveStorage func(ctx context.Context, vm string, purpose Purpose, address string) (string, error)