36 lines
630 B
Go
36 lines
630 B
Go
package aoc
|
|
|
|
import "fmt"
|
|
|
|
type SessionRequiredError struct{}
|
|
|
|
func (e SessionRequiredError) Error() string {
|
|
return "session key is required"
|
|
}
|
|
|
|
type SessionError struct{}
|
|
|
|
func (e SessionError) Error() string {
|
|
return "invalid session"
|
|
}
|
|
|
|
type BoardIdRequiredError struct{}
|
|
|
|
func (e BoardIdRequiredError) Error() string {
|
|
return "board id is required"
|
|
}
|
|
|
|
type InvalidYearError struct{}
|
|
|
|
func (e InvalidYearError) Error() string {
|
|
return "invalid year"
|
|
}
|
|
|
|
type LeaderboardNotCachedError struct {
|
|
year int
|
|
}
|
|
|
|
func (e LeaderboardNotCachedError) Error() string {
|
|
return fmt.Sprintf("leaderboard (%d) is not cached", e.year)
|
|
}
|