- Added a new contacts database (`ContactsDB`) to store contact information. This improves data organization and allows for more efficient querying and manipulation of contact data. - Implemented a virtual file system (VFS) for contacts (`vfs_contacts`). This provides a file-like interface to access and manage contact data, improving integration with existing file-system-based tools and workflows. The VFS supports listing by group, by name, and by email. - Added model structs for contacts, improving data organization and serialization. This lays the foundation for more robust data handling and future expansion.
19 lines
522 B
V
19 lines
522 B
V
module vfs_contacts
|
|
|
|
import freeflowuniverse.herolib.vfs
|
|
import freeflowuniverse.herolib.circles.mcc.db as core
|
|
// import freeflowuniverse.herolib.circles.mcc.models as mcc
|
|
|
|
// ContactsVFS represents the virtual file system for contacts
|
|
pub struct ContactsVFS {
|
|
pub mut:
|
|
contacts_db &core.ContactsDB // Reference to the contacts database
|
|
}
|
|
|
|
// new_contacts_vfs creates a new contacts VFS
|
|
pub fn new_contacts_vfs(contacts_db &core.ContactsDB) !vfs.VFSImplementation {
|
|
return &ContactsVFS{
|
|
contacts_db: contacts_db
|
|
}
|
|
}
|