Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Delta = modelops.Delta
Delta is an indirection of the Merge func, making it simple to mock them in tests
View Source
var Merge = modelops.Merge
Merge is an indirection of the Merge func, making it simple to mock them in tests
Functions ¶
Types ¶
type BetEasyAgentService ¶
type BetEasyAgentService struct {
// contains filtered or unexported fields
}
BetEasyAgentService models the agent
func NewService ¶
func NewService(agentGatewayClient api.AgentGatewayClient, liveSportsEndpoint string, pollInterval time.Duration, deltasOnly bool) *BetEasyAgentService
NewService creates a new servicez
type EventType ¶
type EventType struct {
EventTypeDesc string `json:"EventTypeDesc"` // e.g. Basketball
EventTypeSlug string `json:"EventTypeSlug"` // e.g. basketball
Events []ProviderEvent `json:"Events"`
}
EventType models a sport
type FeaturedMarket ¶
type FeaturedMarket struct {
EventID int64 `json:"EventID"`
EventName string `json:"EventName"` // e.g. Head to Head
AdvertisedStartTime time.Time `json:"AdvertisedStartTime"` // e.g 2019-02-14T08:50:00Z
IsOpenForBetting bool `json:"IsOpenForBetting"`
Outcomes []Outcome `json:"Outcomes"`
}
FeaturedMarket models the main market
type LiveEndpointResponse ¶
type LiveEndpointResponse struct {
EventTypes []EventType `json:"EventTypes"`
}
LiveEndpointResponse models the provider response
type Outcome ¶
type Outcome struct {
FixedMarketID int64 `json:"FixedMarketID"` // this seems to be unique per selection
OutcomeID int64 `json:"OutcomeID"` // this is unique within the market. i.e. 1/2/3 for teamA, draw, teamB
OutcomeName string `json:"OutcomeName"` // selection name
Price float64 `json:"Price"` // decimal price
}
Outcome models a selection
type ProviderEvent ¶
type ProviderEvent struct {
MasterEventID int64 `json:"MasterEventID"`
MasterEventName string `json:"MasterEventName"` // e.g. Melbourne United v Cairns Taipans
DisplayMasterCategoryName string `json:"DisplayMasterCategoryName"` // e.g NBL
FeaturedMarket FeaturedMarket `json:"FeaturedMarket"`
Sport string // not json, populated when iterating
}
ProviderEvent models the provider event
Source Files
¶
Click to show internal directories.
Click to hide internal directories.