feat: domain/storage/billing/config cmds + rainyun domain/storage/billing services

This commit is contained in:
2026-07-28 16:11:03 +08:00
parent b0fbc3e710
commit 096492dd82
8 changed files with 465 additions and 5 deletions
+33
View File
@@ -0,0 +1,33 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
var billingCmd = &cobra.Command{
Use: "billing",
Short: "Billing and orders",
}
var ordersCmd = &cobra.Command{
Use: "orders",
Short: "List orders",
RunE: func(cmd *cobra.Command, args []string) error {
svc := prov.Billing()
if svc == nil {
return fmt.Errorf("billing not supported by current provider")
}
orders, err := svc.Orders(cmd.Context())
if err != nil {
return err
}
return out.Print(orders)
},
}
func init() {
billingCmd.AddCommand(ordersCmd)
rootCmd.AddCommand(billingCmd)
}