-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
75 changed files
with
4,683 additions
and
672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,8 @@ config/config*.yaml | |
log/ | ||
logs/ | ||
|
||
# Import/export files | ||
*.csv | ||
|
||
api | ||
kcapp-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/kcapp/api/data" | ||
"github.com/kcapp/api/models" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// aroundtheclockCmd represents the aroundtheclock command | ||
var aroundtheclockCmd = &cobra.Command{ | ||
Use: "aroundtheclock", | ||
Short: "Recalculate Around the Clock statistics", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := data.RecalculateStatistics(models.AROUNDTHECLOCK, legID, since, dryRun) | ||
if err != nil { | ||
panic(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
recalculateStatisticsCmd.AddCommand(aroundtheclockCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/kcapp/api/data" | ||
"github.com/kcapp/api/models" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// aroundtheworldCmd represents the aroundtheworld command | ||
var aroundtheworldCmd = &cobra.Command{ | ||
Use: "aroundtheworld", | ||
Short: "Recalculate Around the World statistics", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := data.RecalculateStatistics(models.AROUNDTHEWORLD, legID, since, dryRun) | ||
if err != nil { | ||
panic(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
recalculateStatisticsCmd.AddCommand(aroundtheworldCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// badgeCmd represents the badge command | ||
var badgeCmd = &cobra.Command{ | ||
Use: "badge", | ||
Short: "Modify Badges", | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(badgeCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/kcapp/api/data" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// recalculateGlobalBadgeCmd represents the global command | ||
var recalculateGlobalBadgeCmd = &cobra.Command{ | ||
Use: "global", | ||
Short: "Recalculate Global Badges", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := data.RecalculateGlobalBadges() | ||
if err != nil { | ||
panic(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
recalculateBadgeCmd.AddCommand(recalculateGlobalBadgeCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/kcapp/api/data" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// recalculateLegBadgesCmd represents the leg command | ||
var recalculateLegBadgesCmd = &cobra.Command{ | ||
Use: "leg", | ||
Short: "Recalculate Leg Badges", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := data.RecalculateLegBadges() | ||
if err != nil { | ||
panic(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
recalculateBadgeCmd.AddCommand(recalculateLegBadgesCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/kcapp/api/data" | ||
"github.com/kcapp/api/models" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// bermudatriangleCmd represents the bermudatriangle command | ||
var bermudatriangleCmd = &cobra.Command{ | ||
Use: "bermudatriangle", | ||
Short: "Recalculate Bermuda Triangle statistics", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := data.RecalculateStatistics(models.BERMUDATRIANGLE, legID, since, dryRun) | ||
if err != nil { | ||
panic(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
recalculateStatisticsCmd.AddCommand(bermudatriangleCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/kcapp/api/data" | ||
"github.com/kcapp/api/models" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// cricketCmd represents the cricket command | ||
var cricketCmd = &cobra.Command{ | ||
Use: "cricket", | ||
Short: "Recalculate Cricket statistics", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := data.RecalculateStatistics(models.CRICKET, legID, since, dryRun) | ||
if err != nil { | ||
panic(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
recalculateStatisticsCmd.AddCommand(cricketCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/kcapp/api/data" | ||
"github.com/kcapp/api/models" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// dartsatxCmd represents the dartsatx command | ||
var dartsatxCmd = &cobra.Command{ | ||
Use: "dartsatx", | ||
Short: "Recalculate Darts at X statistics", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := data.RecalculateStatistics(models.DARTSATX, legID, since, dryRun) | ||
if err != nil { | ||
panic(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
recalculateStatisticsCmd.AddCommand(dartsatxCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// eloCmd represents the elo command | ||
var eloCmd = &cobra.Command{ | ||
Use: "elo", | ||
Short: "Modify Elo", | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(eloCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/kcapp/api/data" | ||
"github.com/kcapp/api/models" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// fourtwentyCmd represents the fourtwenty command | ||
var fourtwentyCmd = &cobra.Command{ | ||
Use: "fourtwenty", | ||
Short: "Recalculate 420 statistics", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := data.RecalculateStatistics(models.FOURTWENTY, legID, since, dryRun) | ||
if err != nil { | ||
panic(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
recalculateStatisticsCmd.AddCommand(fourtwentyCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/kcapp/api/data" | ||
"github.com/kcapp/api/models" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// gotchaCmd represents the gotcha command | ||
var gotchaCmd = &cobra.Command{ | ||
Use: "gotcha", | ||
Short: "Recalculate Gotcha statistics", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
err := data.RecalculateStatistics(models.GOTCHA, legID, since, dryRun) | ||
if err != nil { | ||
panic(err) | ||
} | ||
}, | ||
} | ||
|
||
func init() { | ||
recalculateStatisticsCmd.AddCommand(gotchaCmd) | ||
} |
Oops, something went wrong.