31 lines
1.0 KiB
Go
31 lines
1.0 KiB
Go
/*
|
|
Copyright © 2024 Albert Espín aespin@gcelsa.com
|
|
*/
|
|
package cmd
|
|
|
|
import (
|
|
"git.espin.casa/albert/cml04-falcon-system/barcode/app"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// barcoderCmd represents the barcoder command
|
|
var barcoderCmd = &cobra.Command{
|
|
Use: "barcode",
|
|
Short: "Barcode service handler.",
|
|
Long: "Barcode service handles readings from handsets devices or printing robot vision.",
|
|
Run: app.Run,
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(barcoderCmd)
|
|
// flags
|
|
barcoderCmd.Flags().String("db-username", "postgres", "database username")
|
|
barcoderCmd.Flags().String("db-password", "Me8140@01", "database user password")
|
|
barcoderCmd.Flags().String("db-host", "db", "database host address")
|
|
barcoderCmd.Flags().Int("db-port", 5432, "database tcp port")
|
|
barcoderCmd.Flags().String("db-name", "falcon", "database user password")
|
|
barcoderCmd.Flags().String("nats-host", "nats", "nats.io broker host address")
|
|
barcoderCmd.Flags().Int("nats-port", 4222, "nats.io broker tcp port")
|
|
barcoderCmd.Flags().String("log-level", "debug", "log level trace")
|
|
}
|