api/internal/cmd/server.go
Peter Kurfer 460940e4d8
Fixed TLS issue with mismatching certificates
- fixed fallback to P256 curve
- added option to configure minimal TLS version
- added option to include insecure cipher suites
2020-06-24 12:25:34 +02:00

35 lines
782 B
Go

package cmd
import (
"github.com/baez90/inetmock/pkg/logging"
"github.com/spf13/cobra"
)
var (
logger logging.Logger
serverCmd *cobra.Command
configFilePath string
logLevel string
developmentLogs bool
)
func init() {
serverCmd = &cobra.Command{
Use: "",
Short: "INetMock is lightweight internet mock",
}
serverCmd.PersistentFlags().StringVar(&configFilePath, "config", "", "Path to config file that should be used")
serverCmd.PersistentFlags().StringVar(&logLevel, "log-level", "info", "logging level to use")
serverCmd.PersistentFlags().BoolVar(&developmentLogs, "development-logs", false, "Enable development mode logs")
serverCmd.AddCommand(
serveCmd,
generateCaCmd,
)
}
func ExecuteServerCommand() error {
return serverCmd.Execute()
}