data

package
v0.0.0-...-e6e1fff Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BetAgreementView

type BetAgreementView struct {
	Success      bool
	Agreed       bool
	ErrorMessage string
}

type Bookmaker

type Bookmaker struct {
	Key         string    `json:"key"`
	Title       string    `json:"title"`
	Last_update time.Time `json:"last_update"`
	Markets     []Market  `json:"markets"`
}

type CheckUserView

type CheckUserView struct {
	Username string
	Exists   bool
}

type CompetitionHeadline

type CompetitionHeadline struct {
	Id    string
	Title string
	Date  time.Time
}

func GetAllCompetitionHeadlines

func GetAllCompetitionHeadlines(db *sqlx.DB) []CompetitionHeadline

type CompetitionHeadlineView

type CompetitionHeadlineView struct {
	ActiveHeadlines []CompetitionHeadline
	PastHeadlines   []CompetitionHeadline
	Username        string
}

type CompetitionView

type CompetitionView struct {
	Competition persistence.Competition
	OfferedBets []persistence.OfferedBet
	Username    string
}

type CounterofferView

type CounterofferView struct {
	Username    string
	OfferedBet  persistence.OfferedBet
	PreviousBet PreviousBet
}

type Event

type Event struct {
	Id            string      `json:"id"`
	Sport_key     string      `json:"sport_key"`
	Sport_title   string      `json:"sport_title"`
	Commence_time time.Time   `json:"commence_time"`
	Home_team     string      `json:"home_team"`
	Away_team     string      `json:"away_team"`
	Bookmakers    []Bookmaker `json:"bookmakers"`
}

type Market

type Market struct {
	Key         string    `json:"key"`
	Last_update time.Time `json:"last_update"`
	Outcomes    []Outcome `json:"outcomes"`
}

type OfferedBetView

type OfferedBetView struct {
	OfferedBet persistence.OfferedBet
	BetCount   int
	BetSum     int
	Username   string
}

type Outcome

type Outcome struct {
	Name        string  `json:"name"`
	Price       float64 `json:"price"`
	Point       float64 `json:"point"`
	Description string  `json:"description"`
}

type PlaceBetView

type PlaceBetView struct {
	OfferedBet persistence.OfferedBet
	Username   string
}

type PreviousBet

type PreviousBet struct {
	BetId            int
	UserAmount       int
	UserOutcome      string
	UserOutcomeOdds  int
	OtherAmount      int
	OtherUsername    string
	OtherOutcome     string
	OtherOutcomeOdds int
	TotalAmount      int
}

type ProfileView

type ProfileView struct {
	Username     string
	UserId       int
	Balance      float64
	BetsWon      int
	BetsLost     int
	ActiveBets   []UserBetView
	PastBets     []UserBetView
	IncomingBets []UserBetView
	OutgoingBets []UserBetView
}

type UserBetView

type UserBetView struct {
	BetId            int
	BetStatus        int
	BetName          string
	UserAmount       int
	UserOutcome      string
	UserOutcomeOdds  int
	UserAgreed       bool
	UserName         string
	UserWon          bool
	UserPointSpread  float32
	OtherAmount      int
	OtherOutcome     string
	OtherOutcomeOdds int
	OtherAgreed      bool
	OtherName        string
	OtherPointSpread float32
	TotalAmount      int
	EventDate        time.Time
}

type UserView

type UserView struct {
	Username   string
	UserId     int
	Balance    float64
	BetsWon    int
	BetsLost   int
	ActiveBets []UserBetView
	PastBets   []UserBetView
}

Jump to

Keyboard shortcuts

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