orama/pkg/cli/cmd/functioncmd/function.go
anonpenguin23 72fb5f1a5a feat: add secrets and triggers management to function commands
- Introduced `secrets` command for managing function secrets, including set, list, and delete operations.
- Added `triggers` command for managing PubSub triggers associated with functions, allowing addition, listing, and deletion of triggers.
- Implemented API handlers for secrets management, including setting, listing, and deleting secrets.
- Updated serverless handlers to support new secrets and triggers functionalities.
- Enhanced tests for the new features, ensuring proper functionality and error handling.
2026-02-23 19:18:39 +02:00

39 lines
1.0 KiB
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)
Cmd.AddCommand(functions.SecretsCmd)
Cmd.AddCommand(functions.TriggersCmd)
}