.. | ||
circle.rs | ||
lib.rs | ||
member.rs | ||
mod.rs | ||
name.rs | ||
README.md | ||
wallet.rs |
Circles Core Models
This directory contains the core data structures used in the herolib circles module. These models serve as the foundation for the circles functionality, providing essential data structures for circles and name management.
Overview
The core models implement the Serde traits (Serialize/Deserialize) and crate database traits (Storable, SledModel), which allows them to be stored and retrieved using the generic SledDB implementation. Each model provides:
- A struct definition with appropriate fields
- Serde serialization through derive macros
- Methods for database integration through the SledModel trait
- Utility methods for common operations
Core Models
Circle (circle.rs
)
The Circle model represents a collection of members (users or other circles):
- Circle: Main struct with fields for identification and member management
- Member: Represents a member of a circle with personal information and role
- Role: Enum for possible member roles (Admin, Stakeholder, Member, Contributor, Guest)
Name (name.rs
)
The Name model provides DNS record management:
- Name: Main struct for domain management with records and administrators
- Record: Represents a DNS record with name, text, category, and addresses
- RecordType: Enum for DNS record types (A, AAAA, CNAME, MX, etc.)
Usage
These models are used by the circles module to manage circles and DNS records. They are typically accessed through the database handlers that implement the generic SledDB interface.