mirror of
https://github.com/DeBrosOfficial/orama.git
synced 2026-03-17 22:06:57 +00:00
- Added documentation for wallet-based SSH authentication in WALLET_SSH_AUTH.md. - Introduced SSH key derivation and management in rootwallet core and CLI. - Created commands for generating, loading, and unloading SSH keys in the CLI. - Updated Orama network to support SSH key authentication. - Added migration steps for nodes to transition from password-based to key-based authentication. feat: add serverless function management commands - Implemented function command structure in CLI for managing serverless functions. - Added commands for initializing, building, deploying, invoking, deleting, and listing functions. - Created helper functions for handling function configuration and API requests. - Integrated TinyGo for building functions to WASM. - Added logging and version management for deployed functions.
37 lines
998 B
Go
37 lines
998 B
Go
package functioncmd
|
|
|
|
import (
|
|
"github.com/DeBrosOfficial/network/pkg/cli/functions"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// Cmd is the top-level function command.
|
|
var Cmd = &cobra.Command{
|
|
Use: "function",
|
|
Short: "Manage serverless functions",
|
|
Long: `Deploy, invoke, and manage serverless functions on the Orama Network.
|
|
|
|
A function is a folder containing:
|
|
function.go — your handler code (uses the fn SDK)
|
|
function.yaml — configuration (name, memory, timeout, etc.)
|
|
|
|
Quick start:
|
|
orama function init my-function
|
|
cd my-function
|
|
orama function build
|
|
orama function deploy
|
|
orama function invoke my-function --data '{"name": "World"}'`,
|
|
}
|
|
|
|
func init() {
|
|
Cmd.AddCommand(functions.InitCmd)
|
|
Cmd.AddCommand(functions.BuildCmd)
|
|
Cmd.AddCommand(functions.DeployCmd)
|
|
Cmd.AddCommand(functions.InvokeCmd)
|
|
Cmd.AddCommand(functions.ListCmd)
|
|
Cmd.AddCommand(functions.GetCmd)
|
|
Cmd.AddCommand(functions.DeleteCmd)
|
|
Cmd.AddCommand(functions.LogsCmd)
|
|
Cmd.AddCommand(functions.VersionsCmd)
|
|
}
|