templates

package
v0.72.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderGatewayConfig

func RenderGatewayConfig(data GatewayConfigData) (string, error)

RenderGatewayConfig renders the gateway config template with the given data

func RenderGatewayService

func RenderGatewayService(data SystemdGatewayData) (string, error)

RenderGatewayService renders the DeBros Gateway systemd service template

func RenderIPFSClusterService

func RenderIPFSClusterService(data SystemdIPFSClusterData) (string, error)

RenderIPFSClusterService renders the IPFS Cluster systemd service template

func RenderIPFSService

func RenderIPFSService(data SystemdIPFSData) (string, error)

RenderIPFSService renders the IPFS systemd service template

func RenderNodeConfig

func RenderNodeConfig(data NodeConfigData) (string, error)

RenderNodeConfig renders the node config template with the given data

func RenderNodeService

func RenderNodeService(data SystemdNodeData) (string, error)

RenderNodeService renders the DeBros Node systemd service template

func RenderOlricConfig

func RenderOlricConfig(data OlricConfigData) (string, error)

RenderOlricConfig renders the olric config template with the given data

func RenderOlricService

func RenderOlricService(data SystemdOlricData) (string, error)

RenderOlricService renders the Olric systemd service template

Types

type GatewayConfigData

type GatewayConfigData struct {
	ListenPort     int
	BootstrapPeers []string
	OlricServers   []string
	ClusterAPIPort int
	IPFSAPIPort    int // Default: 4501
	EnableHTTPS    bool
	DomainName     string
	TLSCacheDir    string
	RQLiteDSN      string
}

GatewayConfigData holds parameters for gateway.yaml rendering

type NodeConfigData

type NodeConfigData struct {
	NodeID                 string
	P2PPort                int
	DataDir                string
	RQLiteHTTPPort         int
	RQLiteRaftPort         int      // External Raft port for advertisement (7001 for SNI)
	RQLiteRaftInternalPort int      // Internal Raft port for local binding (7002 when SNI enabled)
	RQLiteJoinAddress      string   // Optional: join address for joining existing cluster
	BootstrapPeers         []string // List of peer multiaddrs to connect to
	ClusterAPIPort         int
	IPFSAPIPort            int    // Default: 4501
	HTTPAdvAddress         string // Advertised HTTP address (IP:port)
	RaftAdvAddress         string // Advertised Raft address (IP:port or domain:port for SNI)
	UnifiedGatewayPort     int    // Unified gateway port for all node services
	Domain                 string // Domain for this node (e.g., node-123.orama.network)
	EnableHTTPS            bool   // Enable HTTPS/TLS with ACME
	TLSCacheDir            string // Directory for ACME certificate cache
	HTTPPort               int    // HTTP port for ACME challenges (usually 80)
	HTTPSPort              int    // HTTPS port (usually 443)

	// Node-to-node TLS encryption for RQLite Raft communication
	// Required when using SNI gateway for Raft traffic routing
	NodeCert     string // Path to X.509 certificate for node-to-node communication
	NodeKey      string // Path to X.509 private key for node-to-node communication
	NodeCACert   string // Path to CA certificate (optional)
	NodeNoVerify bool   // Skip certificate verification (for self-signed certs)
}

NodeConfigData holds parameters for node.yaml rendering (unified - no bootstrap/node distinction)

type OlricConfigData

type OlricConfigData struct {
	ServerBindAddr        string // HTTP API bind address (127.0.0.1 for security)
	HTTPPort              int
	MemberlistBindAddr    string // Memberlist bind address (0.0.0.0 for clustering)
	MemberlistPort        int
	MemberlistEnvironment string // "local", "lan", or "wan"
}

OlricConfigData holds parameters for olric.yaml rendering

type SystemdGatewayData

type SystemdGatewayData struct {
	HomeDir  string
	OramaDir string
}

SystemdGatewayData holds parameters for systemd Gateway service rendering

type SystemdIPFSClusterData

type SystemdIPFSClusterData struct {
	HomeDir     string
	ClusterPath string
	OramaDir    string
}

SystemdIPFSClusterData holds parameters for systemd IPFS Cluster service rendering

type SystemdIPFSData

type SystemdIPFSData struct {
	HomeDir      string
	IPFSRepoPath string
	SecretsDir   string
	OramaDir     string
}

SystemdIPFSData holds parameters for systemd IPFS service rendering

type SystemdNodeData

type SystemdNodeData struct {
	HomeDir    string
	ConfigFile string
	OramaDir   string
}

SystemdNodeData holds parameters for systemd Node service rendering

type SystemdOlricData

type SystemdOlricData struct {
	HomeDir    string
	ConfigPath string
	OramaDir   string
}

SystemdOlricData holds parameters for systemd Olric service rendering

Jump to

Keyboard shortcuts

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