model

package
v0.1.2-b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Active status = "ACTIVE"
	Closed status = "CLOSED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClimbingType

type ClimbingType string
const (
	Boulder ClimbingType = "BOULDER"
	Lead    ClimbingType = "LEAD"
)

type Color

type Color string
const (
	Black  Color = "black"
	Blue   Color = "blue"
	Gray   Color = "gray"
	Green  Color = "green"
	Orange Color = "orange"
	Pink   Color = "pink"
	Purple Color = "purple"
	Red    Color = "red"
	Yellow Color = "yellow"
)

type Competition

type Competition struct {
	ID            int64          `json:"id"`
	Status        status         `json:"status"`
	ClimbingTypes []ClimbingType `json:"climbingTypes"`
	Year          int64          `json:"year"`
	Name          string         `json:"name"`
	Mnemonic      string         `json:"mnemonic"`
	Event         int64          `json:"event"`
	Notes         string         `json:"notes"`
}

type CompetitionDetail

type CompetitionDetail struct {
	ID         int64              `json:"id"`
	Name       string             `json:"name"`
	Status     string             `json:"status"`
	Sections   map[string]Section `json:"sections"`
	Partitions []Partition        `json:"partitions"`
}

func (CompetitionDetail) IsEmpty

func (cd CompetitionDetail) IsEmpty() bool

func (CompetitionDetail) IsFinished

func (cd CompetitionDetail) IsFinished() bool

type Partition

type Partition struct {
	Tags         string          `json:"tags"`
	Gender       PartitionGender `json:"gender"`
	AgeGroup     string          `json:"ageGroup"`
	ClimbingType ClimbingType    `json:"climbingType"`
	Sections     []int64         `json:"sections"`
	Results      []Result        `json:"results"`
}

type PartitionGender

type PartitionGender string
const (
	Female PartitionGender = "FEMALE"
	Male   PartitionGender = "MALE"
)

type Result

type Result struct {
	Participation  int64           `json:"participation"`
	StartNumber    int64           `json:"startNumber"`
	Name           string          `json:"name"`
	Position       int64           `json:"position"`
	Tags           string          `json:"tags"`
	SectionResults []SectionResult `json:"sectionResults"`
}

type Route

type Route struct {
	ID              int64       `json:"id"`
	DisplayPosition int64       `json:"displayPosition"`
	Label           string      `json:"label"`
	Color           Color       `json:"color"`
	Gender          RouteGender `json:"gender"`
	Options         string      `json:"options"`
}

type RouteGender

type RouteGender string
const (
	Both RouteGender = "BOTH"
)

type RouteResult

type RouteResult struct {
	Route          int64   `json:"route"`
	BestHoldNumber int64   `json:"bestHoldNumber"`
	Tries          []int64 `json:"tries"`
}

type Section

type Section struct {
	ID       int64   `json:"id"`
	Rank     int64   `json:"rank"`
	Name     string  `json:"name"`
	TryLimit int64   `json:"tryLimit"`
	Routes   []Route `json:"routes"`
}

type SectionResult

type SectionResult struct {
	Section      int64         `json:"section"`
	Points       int64         `json:"points"`
	Tops         int64         `json:"tops"`
	Zones        int64         `json:"zones"`
	TopTries     int64         `json:"topTries"`
	ZoneTries    int64         `json:"zoneTries"`
	RouteResults []RouteResult `json:"routeResults"`
}

func (SectionResult) HasValidBoulderResult

func (sr SectionResult) HasValidBoulderResult() bool

func (SectionResult) HasValidLeadResult

func (sr SectionResult) HasValidLeadResult() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL