2024-10-01 20:28:58 +02:00
|
|
|
/*
|
|
|
|
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
|
|
|
|
*/
|
|
|
|
package cmd
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.espin.casa/albert/cml04-falcon-system/sap/app"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
// sapCmd represents the sap command
|
|
|
|
var sapCmd = &cobra.Command{
|
|
|
|
Use: "sap",
|
|
|
|
Short: "A brief description of your command",
|
|
|
|
Long: `A longer description that spans multiple lines and likely contains examples
|
|
|
|
and usage of using your command. For example:
|
|
|
|
|
|
|
|
Cobra is a CLI library for Go that empowers applications.
|
|
|
|
This application is a tool to generate the needed files
|
|
|
|
to quickly create a Cobra application.`,
|
|
|
|
Run: app.Run,
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
rootCmd.AddCommand(sapCmd)
|
|
|
|
|
|
|
|
sapCmd.Flags().String("db-username", "postgres", "database username")
|
|
|
|
sapCmd.Flags().String("db-password", "Me8140@01", "database user password")
|
2024-10-02 18:33:55 +02:00
|
|
|
sapCmd.Flags().String("db-host", "db", "database host address")
|
2024-10-01 20:28:58 +02:00
|
|
|
sapCmd.Flags().Int("db-port", 5432, "database tcp port")
|
|
|
|
sapCmd.Flags().String("db-name", "falcon", "database user password")
|
2024-10-02 18:33:55 +02:00
|
|
|
sapCmd.Flags().String("nats-host", "nats", "nats.io broker host address")
|
2024-10-01 20:28:58 +02:00
|
|
|
sapCmd.Flags().Int("nats-port", 4222, "nats.io broker tcp port")
|
2024-10-02 18:33:55 +02:00
|
|
|
sapCmd.Flags().String("nsq-host", "nats", "NSQ queue system host address")
|
|
|
|
sapCmd.Flags().Int("nsq-port", 4222, "NSQ queue system tcp port")
|
2024-10-01 20:28:58 +02:00
|
|
|
sapCmd.Flags().String("log-level", "debug", "log level trace")
|
|
|
|
}
|