models

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package models defines the Base collections backing the bootnode plugin.

These are the Go-native equivalents of the Python SQLAlchemy models in bootnode/db/models.py. One deliberate difference: there is NO `users` collection. Identity is owned by Hanzo IAM — bootnode records reference IAM user ids as plain text fields (ownerId, invitedBy, userId). Duplicating users in Base would create two sources of truth; IAM is the only one.

All collections are prefixed `_bootnode_` and owned by the plugin (no public CRUD). The plugin's HTTP handlers are the only write path; superusers retain dashboard access.

Tenancy: when the platform plugin runs with PrincipalIsolation="sqlite", these collections are resolved per-org automatically by the platform's org-DB middleware. The OrgCluster collection is the canonical org→k8s-cluster mapping that scopes fleet operations.

Index

Constants

View Source
const (
	Projects          = "_bootnode_projects"
	APIKeys           = "_bootnode_api_keys"
	Webhooks          = "_bootnode_webhooks"
	WebhookDeliveries = "_bootnode_webhook_deliveries"
	Usage             = "_bootnode_usage"
	SmartWallets      = "_bootnode_smart_wallets"
	TeamMembers       = "_bootnode_team_members"
	GasPolicies       = "_bootnode_gas_policies"
	Subscriptions     = "_bootnode_subscriptions"
	OrgClusters       = "_bootnode_org_clusters"
)

Collection names. One prefix, one convention.

Variables

This section is empty.

Functions

func EnsureAll

func EnsureAll(app core.App) error

EnsureAll idempotently creates every bootnode collection in dependency order (Projects first, since most others relate to it). Safe to call on every boot.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL