package main

import (
	"fmt"
	"os"

	"github.com/spf13/cobra"
	"github.com/tidbcloud/aws-shared-provider/cmd/audit-log/app"
)

func main() {
	rootCmd := RootCmd()
	if err := rootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
}

func RootCmd() *cobra.Command {
	rootCmd := &cobra.Command{
		Use:  "audit-log",
		Long: "audit-log collect audit log and transfer them to cloud storage provider",
	}
	rootCmd.AddCommand(app.WorkerCmd())
	rootCmd.AddCommand(app.SchedulerCmd())
	return rootCmd
}
