Skip to content

threefold.models_ledger #

fn account_handle #

fn account_handle(mut f ModelsFactory, rpcid int, servercontext map[string]string, userref UserRef, method string, params string) !Response

fn asset_handle #

fn asset_handle(mut f ModelsFactory, rpcid int, servercontext map[string]string, userref UserRef, method string, params string) !Response

fn new_error #

fn new_error(rpcid int, code int, message string) Response

fn new_models_factory #

fn new_models_factory(mut database db.DB) !&ModelsFactory

fn new_response #

fn new_response(rpcid int, result string) Response

fn new_response_false #

fn new_response_false(rpcid int) Response

fn new_response_int #

fn new_response_int(rpcid int, result int) Response

fn new_response_true #

fn new_response_true(rpcid int) Response

enum AccountLimitPeriodLimit #

enum AccountLimitPeriodLimit {
	daily
	weekly
	monthly
}

enum AccountStatus #

enum AccountStatus {
	active
	inactive
	suspended
	archived
}

AccountStatus represents the status of an account

enum DNSZoneStatus #

enum DNSZoneStatus {
	active
	suspended
	archived
}

DNSZoneStatus defines the status of a DNS zone

enum GroupStatus #

enum GroupStatus {
	active
	inactive
	suspended
	archived
}

GroupStatus defines the lifecycle of a group

enum KYCStatus #

enum KYCStatus {
	pending
	approved
	rejected
}

KYCStatus represents the KYC status of a user

enum LockType #

enum LockType {
	locked_till
	locked
	free
}

enum MemberRole #

enum MemberRole {
	member
	moderator
	admin
	owner
}

MemberRole defines the role of a user within a group

enum MemberStatus #

enum MemberStatus {
	pending
	active
	suspended
	archived
}

MemberStatus defines the status of a membership

enum NameCat #

enum NameCat {
	ipv4
	ipv6
	mycelium
}

NameCat defines the category of the DNS record

enum NameType #

enum NameType {
	a
	aaaa
	cname
	mx
	txt
	srv
	ptr
	ns
}

NameType defines the supported DNS record types

enum TransactionType #

enum TransactionType {
	transfer
	clawback
	freeze
	unfreeze
	issue
	burn
}

TransactionType represents the type of transaction

enum UserStatus #

enum UserStatus {
	active
	inactive
	suspended
	archived
}

UserStatus represents the status of a user in the system

enum Visibility #

enum Visibility {
	public
	private
	unlisted
}

Visibility controls who can discover or view the group

struct Account #

@[heap]
struct Account {
	db.Base
pub mut:
	owner_id        u32 // link to user
	location_id     u32 // link to location, 0 is none
	accountpolicies []AccountPolicy
	assets          []AccountAsset
	assetid         u32
	last_activity   u64
	administrators  []u32
}

Account represents an account in the financial system

fn (Account) type_name #

fn (self Account) type_name() string

fn (Account) description #

fn (self Account) description(methodname string) string

fn (Account) example #

fn (self Account) example(methodname string) (string, string)

fn (Account) dump #

fn (self Account) dump(mut e encoder.Encoder) !

struct AccountArg #

struct AccountArg {
pub mut:
	name            string
	description     string
	owner_id        u32
	location_id     u32
	accountpolicies []AccountPolicyArg
	assets          []AccountAsset
	assetid         u32
	last_activity   u64
	administrators  []u32
}

struct AccountAsset #

struct AccountAsset {
	db.Base
pub mut:
	assetid  u32
	balance  f64
	metadata map[string]string
}

fn (AccountAsset) dump #

fn (self AccountAsset) dump(mut e encoder.Encoder) !

struct AccountLimit #

struct AccountLimit {
pub mut:
	amount   f64
	asset_id u32
	period   AccountLimitPeriodLimit
}

fn (AccountLimit) dump #

fn (self AccountLimit) dump(mut e encoder.Encoder) !

struct AccountListArg #

@[params]
struct AccountListArg {
pub mut:
	filter string
	status int = -1
	limit  int = 20
	offset int = 0
}

struct AccountPolicy #

struct AccountPolicy {
pub mut:
	policy_id                  u32 @[index]
	admins                     []u32 // people who can transfer money out
	min_signatures             u8    // nr of people who need to sign
	limits                     []AccountLimit
	whitelist_out              []u32 // where money can go to
	whitelist_in               []u32 // where money can come from
	lock_till                  u64   // date in epoch till no money can be transfered, only after
	admin_lock_type            LockType
	admin_lock_till            u64   // date in epoch when admin can unlock (0 means its free), this is unlock for changing this policy
	admin_unlock               []u32 // users who can unlock the admin policy
	admin_unlock_min_signature u8    // nr of signatures from the adminunlock
	clawback_accounts          []u32 // account(s) which can clawback
	clawback_min_signatures    u8
	clawback_from              u64 // from epoch money can be clawed back, 0 is always
	clawback_till              u64 // till which date
}

AccountPolicy represents a set of rules for an account

fn (AccountPolicy) dump #

fn (self AccountPolicy) dump(mut e encoder.Encoder) !

struct AccountPolicyArg #

@[params]
struct AccountPolicyArg {
pub mut:
	policy_id                  u32
	admins                     []u32
	min_signatures             u8
	limits                     []AccountLimit
	whitelist_out              []u32
	whitelist_in               []u32
	lock_till                  u64
	admin_lock_type            LockType
	admin_lock_till            u64
	admin_unlock               []u32
	admin_unlock_min_signature u8
	clawback_accounts          []u32
	clawback_min_signatures    u8
	clawback_from              u64
	clawback_to                u64
}

struct Asset #

@[heap]
struct Asset {
	db.Base
pub mut:
	address        string @[index; required] // The unique address or identifier for the asset.
	asset_type     string @[required]        // The type of the asset (e.g., 'token', 'nft').
	issuer         u32    @[required]        // The user ID of the issuer of the asset.
	supply         f64               // The total supply of the asset.
	decimals       u8                // The number of decimal places for the asset's value.
	is_frozen      bool              // Indicates if the asset is currently frozen and cannot be transferred.
	metadata       map[string]string // A map for storing arbitrary metadata as key-value pairs.
	administrators []u32             // A list of user IDs that are administrators for this asset.
	min_signatures u32               // The minimum number of signatures required for administrative actions.
}

Asset represents a digital or physical item of value within the system.

fn (Asset) type_name #

fn (self Asset) type_name() string

fn (Asset) description #

fn (self Asset) description(methodname string) string

fn (Asset) example #

fn (self Asset) example(methodname string) (string, string)

fn (Asset) dump #

fn (self Asset) dump(mut e encoder.Encoder) !

struct AssetArg #

@[params]
struct AssetArg {
pub mut:
	name           string
	description    string
	address        string
	asset_type     string
	issuer         u32
	supply         f64
	decimals       u8
	is_frozen      bool
	metadata       map[string]string
	administrators []u32
	min_signatures u32
}

struct AssetListArg #

@[params]
struct AssetListArg {
pub mut:
	filter        string
	asset_type    string
	is_frozen     bool = false
	filter_frozen bool = false
	issuer        u32
	filter_issuer bool = false
	limit         int  = 20
	offset        int  = 0
}

struct DBAccount #

struct DBAccount {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBAccount) new #

fn (mut self DBAccount) new(args AccountArg) !Account

fn (DBAccount) set #

fn (mut self DBAccount) set(o Account) !Account

fn (DBAccount) delete #

fn (mut self DBAccount) delete(id u32) !bool

fn (DBAccount) exist #

fn (mut self DBAccount) exist(id u32) !bool

fn (DBAccount) get #

fn (mut self DBAccount) get(id u32) !Account

fn (DBAccount) list #

fn (mut self DBAccount) list(args AccountListArg) ![]Account

fn (DBAccount) list_all #

fn (mut self DBAccount) list_all() ![]Account

struct DBAsset #

struct DBAsset {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBAsset) new #

fn (mut self DBAsset) new(args AssetArg) !Asset

fn (DBAsset) set #

fn (mut self DBAsset) set(o Asset) !Asset

fn (DBAsset) delete #

fn (mut self DBAsset) delete(id u32) !bool

fn (DBAsset) exist #

fn (mut self DBAsset) exist(id u32) !bool

fn (DBAsset) get #

fn (mut self DBAsset) get(id u32) !Asset

fn (DBAsset) list #

fn (mut self DBAsset) list(args AssetListArg) ![]Asset

fn (DBAsset) list_all #

fn (mut self DBAsset) list_all() ![]Asset

struct DBDNSZone #

struct DBDNSZone {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBDNSZone) new #

fn (mut self DBDNSZone) new(args DNSZoneArg) !DNSZone

fn (DBDNSZone) set #

fn (mut self DBDNSZone) set(o DNSZone) !DNSZone

fn (DBDNSZone) delete #

fn (mut self DBDNSZone) delete(id u32) !

fn (DBDNSZone) exist #

fn (mut self DBDNSZone) exist(id u32) !bool

fn (DBDNSZone) get #

fn (mut self DBDNSZone) get(id u32) !DNSZone

fn (DBDNSZone) list #

fn (mut self DBDNSZone) list() ![]DNSZone

struct DBGroup #

struct DBGroup {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBGroup) new #

fn (mut self DBGroup) new(args GroupArg) !Group

fn (DBGroup) set #

fn (mut self DBGroup) set(o Group) !Group

fn (DBGroup) delete #

fn (mut self DBGroup) delete(id u32) !

fn (DBGroup) exist #

fn (mut self DBGroup) exist(id u32) !bool

fn (DBGroup) get #

fn (mut self DBGroup) get(id u32) !Group

fn (DBGroup) list #

fn (mut self DBGroup) list() ![]Group

struct DBMember #

struct DBMember {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBMember) new #

fn (mut self DBMember) new(args MemberArg) !Member

fn (DBMember) set #

fn (mut self DBMember) set(o Member) !Member

fn (DBMember) delete #

fn (mut self DBMember) delete(id u32) !

fn (DBMember) exist #

fn (mut self DBMember) exist(id u32) !bool

fn (DBMember) get #

fn (mut self DBMember) get(id u32) !Member

fn (DBMember) list #

fn (mut self DBMember) list() ![]Member

struct DBNotary #

struct DBNotary {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBNotary) new #

fn (mut self DBNotary) new(args NotaryArg) !Notary

fn (DBNotary) set #

fn (mut self DBNotary) set(o Notary) !Notary

fn (DBNotary) delete #

fn (mut self DBNotary) delete(id u32) !

fn (DBNotary) exist #

fn (mut self DBNotary) exist(id u32) !bool

fn (DBNotary) get #

fn (mut self DBNotary) get(id u32) !Notary

fn (DBNotary) list #

fn (mut self DBNotary) list() ![]Notary

struct DBSignature #

struct DBSignature {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBSignature) new #

fn (mut self DBSignature) new(args SignatureArg) !Signature

fn (DBSignature) set #

fn (mut self DBSignature) set(o Signature) !Signature

fn (DBSignature) delete #

fn (mut self DBSignature) delete(id u32) !

fn (DBSignature) exist #

fn (mut self DBSignature) exist(id u32) !bool

fn (DBSignature) get #

fn (mut self DBSignature) get(id u32) !Signature

fn (DBSignature) list #

fn (mut self DBSignature) list() ![]Signature

struct DBTransaction #

struct DBTransaction {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBTransaction) new #

fn (mut self DBTransaction) new(args TransactionArg) !Transaction

fn (DBTransaction) set #

fn (mut self DBTransaction) set(o Transaction) !Transaction

fn (DBTransaction) delete #

fn (mut self DBTransaction) delete(id u32) !

fn (DBTransaction) exist #

fn (mut self DBTransaction) exist(id u32) !bool

fn (DBTransaction) get #

fn (mut self DBTransaction) get(id u32) !Transaction

fn (DBTransaction) list #

fn (mut self DBTransaction) list() ![]Transaction

struct DBUser #

struct DBUser {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBUser) new #

fn (mut self DBUser) new(args UserArg) !User

fn (DBUser) set #

fn (mut self DBUser) set(o User) !User

fn (DBUser) delete #

fn (mut self DBUser) delete(id u32) !

fn (DBUser) exist #

fn (mut self DBUser) exist(id u32) !bool

fn (DBUser) get #

fn (mut self DBUser) get(id u32) !User

fn (DBUser) list #

fn (mut self DBUser) list() ![]User

struct DBUserKVS #

struct DBUserKVS {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBUserKVS) new #

fn (mut self DBUserKVS) new(args UserKVSArg) !UserKVS

fn (DBUserKVS) set #

fn (mut self DBUserKVS) set(o UserKVS) !UserKVS

fn (DBUserKVS) delete #

fn (mut self DBUserKVS) delete(id u32) !

fn (DBUserKVS) exist #

fn (mut self DBUserKVS) exist(id u32) !bool

fn (DBUserKVS) get #

fn (mut self DBUserKVS) get(id u32) !UserKVS

fn (DBUserKVS) list #

fn (mut self DBUserKVS) list() ![]UserKVS

struct DBUserKVSItem #

struct DBUserKVSItem {
pub mut:
	db &db.DB @[skip; str: skip]
}

fn (DBUserKVSItem) new #

fn (mut self DBUserKVSItem) new(args UserKVSItemArg) !UserKVSItem

fn (DBUserKVSItem) set #

fn (mut self DBUserKVSItem) set(o UserKVSItem) !UserKVSItem

fn (DBUserKVSItem) delete #

fn (mut self DBUserKVSItem) delete(id u32) !

fn (DBUserKVSItem) exist #

fn (mut self DBUserKVSItem) exist(id u32) !bool

fn (DBUserKVSItem) get #

fn (mut self DBUserKVSItem) get(id u32) !UserKVSItem

fn (DBUserKVSItem) list #

fn (mut self DBUserKVSItem) list() ![]UserKVSItem

struct DNSRecord #

struct DNSRecord {
pub mut:
	subdomain   string   @[required] // The subdomain for the record (e.g., 'www', '@' for the root).
	record_type NameType @[required] // The type of the DNS record (e.g., A, AAAA, CNAME).
	value       string   @[required] // The value of the DNS record (e.g., an IP address, a hostname).
	priority    u32     // The priority of the record, used for MX records.
	ttl         u32     // The Time To Live for the record in seconds.
	is_active   bool    // Indicates if the record is currently active.
	cat         NameCat // The category of the DNS record, for internal classification.
	is_wildcard bool    // Indicates if this is a wildcard record (e.g., '*.example.com').
}

DNSRecord represents a DNS record configuration.

struct DNSZone #

@[heap]
struct DNSZone {
	db.Base
pub mut:
	domain         string @[index; required] // The domain name of the zone (e.g., 'example.com').
	dnsrecords     []DNSRecord       // A list of DNS records associated with this zone.
	administrators []u32             // A list of user IDs that are administrators for this zone.
	min_signatures u32               // The minimum number of signatures required for administrative actions.
	status         DNSZoneStatus     // The current status of the DNS zone (e.g., active, suspended).
	metadata       map[string]string // A map for storing arbitrary metadata as key-value pairs.
	soarecord      []SOARecord       // The Start of Authority (SOA) record for this zone.
}

DNSZone represents a domain name and its associated DNS records.

fn (DNSZone) type_name #

fn (self DNSZone) type_name() string

fn (DNSZone) description #

fn (self DNSZone) description(methodname string) string

fn (DNSZone) example #

fn (self DNSZone) example(methodname string) (string, string)

fn (DNSZone) dump #

fn (self DNSZone) dump(mut e encoder.Encoder) !

struct DNSZoneArg #

@[params]
struct DNSZoneArg {
pub mut:
	name           string
	description    string
	domain         string
	dnsrecords     []DNSRecord
	administrators []u32
	status         DNSZoneStatus
	min_signatures u32
	metadata       map[string]string
	soarecord      []SOARecord
}

struct Group #

@[heap]
struct Group {
	db.Base
pub mut:
	group_name     string @[index; required] // The unique name of the group.
	dnsrecords     []u32       // A list of DNS record IDs associated with this group.
	administrators []u32       // A list of user IDs that are administrators for this group.
	min_signatures u32         // The minimum number of signatures required for administrative actions.
	config         GroupConfig // The configuration settings for the group.
	status         GroupStatus // The current status of the group (e.g., active, inactive).
	visibility     Visibility  // The visibility level of the group (e.g., public, private).
	created        u64         // The timestamp when the group was created.
	updated        u64         // The timestamp when the group was last updated.
}

Group represents a collection of users with shared permissions and access.

fn (Group) type_name #

fn (self Group) type_name() string

fn (Group) description #

fn (self Group) description(methodname string) string

fn (Group) example #

fn (self Group) example(methodname string) (string, string)

fn (Group) dump #

fn (self Group) dump(mut e encoder.Encoder) !

struct GroupArg #

@[params]
struct GroupArg {
pub mut:
	name           string
	description    string
	group_name     string
	dnsrecords     []u32
	administrators []u32
	min_signatures u32
	config         GroupConfig
	status         GroupStatus
	visibility     Visibility
	created        u64
	updated        u64
}

struct GroupConfig #

struct GroupConfig {
pub mut:
	max_members    u32  // The maximum number of members allowed in the group.
	allow_guests   bool // Whether non-members are allowed to view the group's content.
	auto_approve   bool // Whether new members are automatically approved or require manual approval.
	require_invite bool // Whether a user must be invited to join the group.
}

GroupConfig defines the settings and rules for a group.

struct KYCInfo #

struct KYCInfo {
pub mut:
	user_id             u32
	full_name           string
	date_of_birth       u64
	address             string
	phone_number        string
	id_number           string
	id_type             string
	id_expiry           u64
	kyc_status          KYCStatus
	kyc_verified        bool
	kyc_verified_by     u32
	kyc_verified_at     u64
	kyc_rejected_reason string
	kyc_signature       u32
	metadata            map[string]string
}

KYCInfo contains KYC information for a user

struct Member #

@[heap]
struct Member {
	db.Base
pub mut:
	group_id      u32 @[index]
	user_id       u32 @[index]
	role          MemberRole
	status        MemberStatus
	join_date     u64
	last_activity u64
}

Member represents the association of a user to a group

fn (Member) type_name #

fn (self Member) type_name() string

fn (Member) description #

fn (self Member) description(methodname string) string

fn (Member) example #

fn (self Member) example(methodname string) (string, string)

fn (Member) dump #

fn (self Member) dump(mut e encoder.Encoder) !

struct MemberArg #

@[params]
struct MemberArg {
pub mut:
	name        string
	description string
	group_id    u32
	user_id     u32
	role        MemberRole   = .member
	status      MemberStatus = .pending
}

struct ModelsFactory #

struct ModelsFactory {
pub mut:
	db          &db.DB
	account     &DBAccount
	asset       &DBAsset
	dnszone     &DBDNSZone
	group       &DBGroup
	member      &DBMember
	notary      &DBNotary
	signature   &DBSignature
	transaction &DBTransaction
	user        &DBUser
	userkvs     &DBUserKVS
	userkvsitem &DBUserKVSItem
}

struct Notary #

@[heap]
struct Notary {
	db.Base
pub mut:
	notary_id u32 @[index]
	pubkey    string
	address   string
	is_active bool
}

Notary represents a cryptographic notary in the system

fn (Notary) type_name #

fn (self Notary) type_name() string

fn (Notary) description #

fn (self Notary) description(methodname string) string

fn (Notary) example #

fn (self Notary) example(methodname string) (string, string)

fn (Notary) dump #

fn (self Notary) dump(mut e encoder.Encoder) !

struct NotaryArg #

@[params]
struct NotaryArg {
pub mut:
	name        string
	description string
	notary_id   u32
	pubkey      string
	address     string
	is_active   bool = true
}

struct Response #

struct Response {
pub mut:
	id      int
	jsonrpc string = '2.0'
	result  string
	error   ?ResponseError
}

Response struct for API

struct ResponseError #

struct ResponseError {
pub mut:
	code    int
	message string
}

struct SOARecord #

struct SOARecord {
pub mut:
	zone_id     u32 // The ID of the zone this SOA record belongs to.
	primary_ns  string @[required] // The primary name server for the zone.
	admin_email string @[required] // The email address of the zone administrator.
	serial      u64    @[required] // The serial number of the zone, incremented on changes.
	refresh     u32  // The time in seconds before the zone should be refreshed.
	retry       u32  // The time in seconds before a failed refresh should be retried.
	expire      u32  // The time in seconds before a secondary server should stop answering for the zone.
	minimum_ttl u32  // The minimum TTL for records in the zone.
	is_active   bool // Indicates if the SOA record is currently active.
}

SOARecord represents the Start of Authority (SOA) record for a DNS zone.

struct SecretBox #

struct SecretBox {
pub mut:
	data  []u8
	nonce []u8
}

SecretBox represents encrypted data storage

struct Signature #

@[heap]
struct Signature {
	db.Base
pub mut:
	signer_id u32 @[index]
	tx_id     u32 @[index]
	signature string
	timestamp u64
}

Signature represents a digital signature in the system

fn (Signature) type_name #

fn (self Signature) type_name() string

fn (Signature) description #

fn (self Signature) description(methodname string) string

fn (Signature) example #

fn (self Signature) example(methodname string) (string, string)

fn (Signature) dump #

fn (self Signature) dump(mut e encoder.Encoder) !

struct SignatureArg #

@[params]
struct SignatureArg {
pub mut:
	name        string
	description string
	signer_id   u32
	tx_id       u32
	signature   string
}

struct Transaction #

@[heap]
struct Transaction {
	db.Base
pub mut:
	txid        u32
	source      u32
	destination u32
	assetid     u32
	amount      f64
	timestamp   u64
	status      string
	memo        string
	tx_type     TransactionType
	signatures  []TransactionSignature
}

Transaction represents a financial transaction

fn (Transaction) type_name #

fn (self Transaction) type_name() string

fn (Transaction) description #

fn (self Transaction) description(methodname string) string

fn (Transaction) example #

fn (self Transaction) example(methodname string) (string, string)

fn (Transaction) dump #

fn (self Transaction) dump(mut e encoder.Encoder) !

struct TransactionArg #

@[params]
struct TransactionArg {
pub mut:
	name        string
	description string
	txid        u32
	source      u32
	destination u32
	assetid     u32
	amount      f64
	timestamp   u64
	status      string
	memo        string
	tx_type     TransactionType
	signatures  []TransactionSignature
}

struct TransactionSignature #

struct TransactionSignature {
pub mut:
	signer_id u32
	signature string
	timestamp u64
}

TransactionSignature represents a signature for transactions

struct User #

@[heap]
struct User {
	db.Base
pub mut:
	username    string @[index]
	pubkey      string @[index]
	email       []string
	status      UserStatus
	userprofile []SecretBox
	kyc         []SecretBox
}

User represents a user in the heroledger system

fn (User) type_name #

fn (self User) type_name() string

fn (User) description #

fn (self User) description(methodname string) string

fn (User) example #

fn (self User) example(methodname string) (string, string)

fn (User) dump #

fn (self User) dump(mut e encoder.Encoder) !

struct UserArg #

@[params]
struct UserArg {
pub mut:
	name        string
	description string
	username    string
	pubkey      string
	email       []string
	status      UserStatus
	userprofile []SecretBox
	kyc         []SecretBox
}

struct UserKVS #

@[heap]
struct UserKVS {
	db.Base
pub mut:
	user_id u32 @[index]
}

UserKVS represents a key-value store for a user

fn (UserKVS) type_name #

fn (self UserKVS) type_name() string

fn (UserKVS) description #

fn (self UserKVS) description(methodname string) string

fn (UserKVS) example #

fn (self UserKVS) example(methodname string) (string, string)

fn (UserKVS) dump #

fn (self UserKVS) dump(mut e encoder.Encoder) !

struct UserKVSArg #

@[params]
struct UserKVSArg {
pub mut:
	name        string
	description string
	user_id     u32
}

struct UserKVSItem #

@[heap]
struct UserKVSItem {
	db.Base
pub mut:
	kvs_id    u32    @[index]
	key       string @[index]
	value     string
	timestamp u64
}

UserKVSItem represents a single item in a user's key-value store

fn (UserKVSItem) type_name #

fn (self UserKVSItem) type_name() string

fn (UserKVSItem) description #

fn (self UserKVSItem) description(methodname string) string

fn (UserKVSItem) example #

fn (self UserKVSItem) example(methodname string) (string, string)

fn (UserKVSItem) dump #

fn (self UserKVSItem) dump(mut e encoder.Encoder) !

struct UserKVSItemArg #

@[params]
struct UserKVSItemArg {
pub mut:
	name        string
	description string
	kvs_id      u32
	key         string
	value       string
}

struct UserProfile #

struct UserProfile {
pub mut:
	user_id     u32
	full_name   string
	bio         string
	profile_pic string
	links       map[string]string
	metadata    map[string]string
}

UserProfile contains user profile information

struct UserRef #

struct UserRef {
pub mut:
	id u32
}