mirror of
https://github.com/DeBrosOfficial/orama.git
synced 2026-03-17 13:36: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.
36 lines
710 B
Go
36 lines
710 B
Go
package functions
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// GetCmd shows details of a deployed function.
|
|
var GetCmd = &cobra.Command{
|
|
Use: "get <name>",
|
|
Short: "Get details of a deployed function",
|
|
Long: "Retrieves and displays detailed information about a specific function.",
|
|
Args: cobra.ExactArgs(1),
|
|
RunE: runGet,
|
|
}
|
|
|
|
func runGet(cmd *cobra.Command, args []string) error {
|
|
name := args[0]
|
|
|
|
result, err := apiGet("/v1/functions/" + name)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
// Pretty-print the result
|
|
data, err := json.MarshalIndent(result, "", " ")
|
|
if err != nil {
|
|
return fmt.Errorf("failed to format response: %w", err)
|
|
}
|
|
|
|
fmt.Println(string(data))
|
|
return nil
|
|
}
|