Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GenerateReportCmd = &cobra.Command{ Use: "generate-report", Aliases: []string{"gr"}, Short: "Generate reports on a month", Long: "Given a month, generate a report on the payouts for anyone who was oncall.", Args: cobra.NoArgs, RunE: func(cmd *cobra.Command, args []string) error { client, err := config.BuildPDClient() if err != nil { return err } govUK := govuk.New() app := app.New(client, govUK) timeIn, err := convMonthToMonth(TimeIn) if err != nil { if Verbose { cmd.Printf("%+v\n", timeIn) } return err } if err := app.GetBankHolidays(context.Background(), timeIn.Year()); err != nil { return err } rota, debug, err := app.GenerateRota(ScheduleIDs, timeIn.Year(), timeIn.Month()) if err != nil { if Verbose { cmd.Printf("%+v\n", debug) } return err } cmd.Printf("\n") cmd.Println(app.StringifyRota(rota)) return nil }, }
View Source
var ScheduleIDs []string
View Source
var TimeIn string
View Source
var Verbose bool
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.