cli

package
v0.115.0-nightly Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultEnvironments = []Environment{
	{
		Name:        "sandbox",
		GatewayURL:  "https://dbrs.space",
		Description: "Sandbox cluster (dbrs.space)",
		IsActive:    true,
	},
	{
		Name:        "devnet",
		GatewayURL:  "https://orama-devnet.network",
		Description: "Development network",
		IsActive:    false,
	},
	{
		Name:        "testnet",
		GatewayURL:  "https://orama-testnet.network",
		Description: "Test network (staging)",
		IsActive:    false,
	},
}

Default environments

Functions

func GetEnvironmentConfigPath

func GetEnvironmentConfigPath() (string, error)

GetEnvironmentConfigPath returns the path to the environment config file

func HandleAuthCommand

func HandleAuthCommand(args []string)

HandleAuthCommand handles authentication commands

func HandleEnvCommand

func HandleEnvCommand(args []string)

HandleEnvCommand handles the 'env' command and its subcommands

func HandleInspectCommand

func HandleInspectCommand(args []string)

HandleInspectCommand handles the "orama inspect" command.

func HandleNamespaceCommand

func HandleNamespaceCommand(args []string)

HandleNamespaceCommand handles namespace management commands

func InitializeEnvironments

func InitializeEnvironments() error

InitializeEnvironments initializes the environment config with defaults

func SaveEnvironmentConfig

func SaveEnvironmentConfig(envConfig *EnvironmentConfig) error

SaveEnvironmentConfig saves the environment configuration

func SwitchEnvironment

func SwitchEnvironment(name string) error

SwitchEnvironment switches to a different environment

Types

type Environment

type Environment struct {
	Name        string `json:"name"`
	GatewayURL  string `json:"gateway_url"`
	Description string `json:"description"`
	IsActive    bool   `json:"is_active"`
}

Environment represents a Orama network environment

func GetActiveEnvironment

func GetActiveEnvironment() (*Environment, error)

GetActiveEnvironment returns the currently active environment

func GetEnvironmentByName

func GetEnvironmentByName(name string) (*Environment, error)

GetEnvironmentByName returns an environment by name

type EnvironmentConfig

type EnvironmentConfig struct {
	Environments      []Environment `json:"environments"`
	ActiveEnvironment string        `json:"active_environment"`
}

EnvironmentConfig stores all configured environments

func LoadEnvironmentConfig

func LoadEnvironmentConfig() (*EnvironmentConfig, error)

LoadEnvironmentConfig loads the environment configuration

Directories

Path Synopsis
cmd
app
tui
enroll
Package enroll implements the OramaOS node enrollment command.
Package enroll implements the OramaOS node enrollment command.
unlock
Package unlock implements the genesis node unlock command.
Package unlock implements the genesis node unlock command.

Jump to

Keyboard shortcuts

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