Documentation ¶
Index ¶
- Variables
- func AddGananciaClient(seudonimo string, montoganado int64, formapago string, serial uint) map[string]interface{}
- func CloseRacing(idRacing uint) map[string]interface{}
- func CreateAmount(clientIdentificationcard string) map[string]interface{}
- func CreateHorses(Arrayhorse []Horse) map[string]interface{}
- func CreateRaces(racesList []Racing, idEvent uint) map[string]interface{}
- func CreateRemates(idracing uint, idhorse int, numberhorse int, seudonimo string, amount int64, ...) map[string]interface{}
- func CreateTablas(idracing uint, montoTotal int64) map[string]interface{}
- func DeleteAllHorses(idRacing uint) bool
- func DeleteAllRacesByEventID(eventID uint) bool
- func DeleteClient(idClient *string) bool
- func DeleteCoinsClient(Clientidentificationcard string) bool
- func DeleteDepositsClient(Clientidentificationcard string) bool
- func DeleteEvent(idEvent uint) bool
- func DeleteHorse(idRacing uint, idHorse uint) bool
- func DeleteRacing(idEvent, idRacing uint) bool
- func FindRaceByEventID(idEvent, idRacing uint) map[string]interface{}
- func GetAllDepositsClient(idClient *string) map[string]interface{}
- func GetAllWithdrawal(clientIDCard *string) map[string]interface{}
- func GetCoinsClient(Clientidentificationcard string) map[string]interface{}
- func GetDB() *gorm.DB
- func GetEvents() map[string]interface{}
- func GetHorses(idRacing string) map[string]interface{}
- func GetOneEvent(idEvent uint) map[string]interface{}
- func GetRace(idRacing uint) map[string]interface{}
- func GetRacings(idEvent uint) map[string]interface{}
- func GetRemates(idracing uint) map[string]interface{}
- func GetTablas(idracing uint) map[string]interface{}
- func Login(email, password string) map[string]interface{}
- func LoginClient(password string, seudonimo string) map[string]interface{}
- func RepartirGanancias(idRace uint, idHorse int) map[string]interface{}
- func TimeisEqualStartTime(idRacing uint) bool
- func UpdateIdentificationClientDeposit(Clientidentificationcard, newIdentification string) map[string]interface{}
- func UpdateIdentificationClientRetiro(clientIDCard, newIdentification string) map[string]interface{}
- func UpdateIdentificationCoinClient(Clientidentificationcard, newIdentification string) map[string]interface{}
- func UpdateMontos(idRacing uint, amount int64) map[string]interface{}
- func UpdateRaces(Arrayracing []Racing, idEvent uint) map[string]interface{}
- func UpdateStateClient(idClient *string) map[string]interface{}
- func WithdrawHorse(idHorse uint, idRacing uint) map[string]interface{}
- type Admin
- type Client
- type ClientManager
- type Clientmodel
- type Coins
- type Deposit
- type Event
- type Horse
- type MatrixRemates
- type Message
- type Racing
- type Remates
- type Retiro
- type Tablas
- type Token
Constants ¶
This section is empty.
Variables ¶
var Manager = ClientManager{ Register: make(chan *Clientmodel), // contains filtered or unexported fields }
Manager export to controller
Functions ¶
func AddGananciaClient ¶
func AddGananciaClient(seudonimo string, montoganado int64, formapago string, serial uint) map[string]interface{}
AddGananciaClient Client db
func CreateAmount ¶
CreateAmount Client db
func CreateHorses ¶
CreateHorses add new race horses
func CreateRaces ¶
CreateRaces .
func CreateRemates ¶
func CreateRemates(idracing uint, idhorse int, numberhorse int, seudonimo string, amount int64, horsename string) map[string]interface{}
CreateRemates .
func CreateTablas ¶
CreateTablas .
func DeleteAllHorses ¶
DeleteAllHorses delete all horses of race.
func DeleteAllRacesByEventID ¶
DeleteAllRacesByEventID .
func DeleteClient ¶
DeleteClient from DB Delete client then delete All client deposits and client coin.
func DeleteCoinsClient ¶
DeleteCoinsClient client deposit in database
func DeleteDepositsClient ¶
DeleteDepositsClient delete all client deposits in database
func FindRaceByEventID ¶
FindRaceByEventID find
func GetAllDepositsClient ¶
GetAllDepositsClient Client db
func GetAllWithdrawal ¶
GetAllWithdrawal Client
func GetCoinsClient ¶
GetCoinsClient client
func GetRacings ¶
GetRacings all Racings by eventID
func LoginClient ¶
LoginClient function user
func RepartirGanancias ¶
RepartirGanancias find
func TimeisEqualStartTime ¶
TimeisEqualStartTime in DB
func UpdateIdentificationClientDeposit ¶
func UpdateIdentificationClientDeposit(Clientidentificationcard, newIdentification string) map[string]interface{}
UpdateIdentificationClientDeposit update client ID in all deposits
func UpdateIdentificationClientRetiro ¶
func UpdateIdentificationClientRetiro(clientIDCard, newIdentification string) map[string]interface{}
UpdateIdentificationClientRetiro all record in table retiros
func UpdateIdentificationCoinClient ¶
func UpdateIdentificationCoinClient(Clientidentificationcard, newIdentification string) map[string]interface{}
UpdateIdentificationCoinClient client identification in coins table of DB
func UpdateMontos ¶
UpdateMontos .
func UpdateRaces ¶
UpdateRaces .
func UpdateStateClient ¶
UpdateStateClient client in DB
func WithdrawHorse ¶
WithdrawHorse .
Types ¶
type Admin ¶
type Admin struct { gorm.Model Email string `json:"email"` Password string `json:"password"` Token string `json:"token";sql:"-"` }
Admin struct
type Client ¶
type Client struct { gorm.Model Name string `json:"name"` Identificationcard string `json:"identificationcard"` Seudonimo string `json:"seudonimo"` Password string `json:"password"` Email string `json:"email"` Phone string `json:"phone"` Banknumber string `json:"banknumber"` Bankname string `json:"bankname"` State string `json:"state"` Token string `json:"token";sql:"-"` }
Client struct
func ExistClientIdentificationDB ¶
ExistClientIdentificationDB .
func ExistClientSeudonimonDB ¶
ExistClientSeudonimonDB .
func (*Client) CreateClient ¶
CreateClient .
func (*Client) UpdateClient ¶
UpdateClient client in DB
func (*Client) ValidateClient ¶
ValidateClient struct that Front-End to Back-End
type ClientManager ¶
type ClientManager struct { Register chan *Clientmodel // contains filtered or unexported fields }
ClientManager model ClientManager
func (*ClientManager) Send ¶
func (manager *ClientManager) Send(message []byte, ignore *Clientmodel)
Send send message to websocket
type Clientmodel ¶
Clientmodel model Clientmodel
func (*Clientmodel) Read ¶
func (c *Clientmodel) Read()
func (*Clientmodel) Write ¶
func (c *Clientmodel) Write()
type Coins ¶
type Coins struct { gorm.Model Clientidentificationcard string `json:"clientidentificationcard"` Amount float64 `json:"amount"` }
Coins struct
func ExistClientinCoinsDB ¶
ExistClientinCoinsDB .
func (*Coins) DecreaseCoins ¶
DecreaseCoins of client in DB
func (*Coins) UpdateCoins ¶
UpdateCoins of client
func (*Coins) ValidateCoins ¶
ValidateCoins struct
type Deposit ¶
type Deposit struct { gorm.Model Amount float64 `json:"amount"` Clientidentificationcard string `json:"clientidentificationcard"` FormaPago string `json:"formapago"` Serial uint `json:"serial"` }
Deposit struct
func (*Deposit) AddDepositClient ¶
AddDepositClient Client db
func (*Deposit) ValidateDeposit ¶
ValidateDeposit struct that Front-End to Back-End
type Event ¶
type Event struct { gorm.Model Dateevent time.Time `json:"dateevent"` Hipodromo string `json:"hipodromo"` Racingnumbers uint `json:"racingnumbers"` Minimumamount uint `json:"minimumamount"` Profitpercentage uint `json:"profitpercentage"` Auctionnumber uint `json:"auctionnumber"` TimebetweenAuctions uint `json:"timebetweenAuctions"` Horsenotauction string `json:"horsenotauction"` }
Event struct
func (*Event) CreateEvent ¶
CreateEvent Event db
func (*Event) UpdateEvent ¶
UpdateEvent .
func (*Event) ValidateEvent ¶
ValidateEvent struct that Front-End to Back-End
type Horse ¶
type Horse struct { gorm.Model Racingid uint `json:"racingid"` Horsename string `json:"horsename"` Numero uint `json:"numero"` State string `json:"state"` }
Horse struct
func (*Horse) UpdateHorse ¶
UpdateHorse in DB
type MatrixRemates ¶
type MatrixRemates struct { Monto int64 MatrixRow int NumeroCaballo int Seudonimo string Horsename string // contains filtered or unexported fields }
MatrixRemates model MatrixRemates
type Message ¶
type Message struct { Sender string `json:"sender,omitempty"` Recipient string `json:"recipient,omitempty"` Content string `json:"content,omitempty"` Timerestante int64 Matrix []MatrixRemates Actualposition MatrixRemates }
Message model message
type Racing ¶
type Racing struct { gorm.Model Eventid uint `json:"eventid"` Starttime time.Time `json:"starttime"` Horsenumbers uint `json:"horsenumbers"` Auctiontime time.Time `json:"auctiontime"` Alerttime time.Time `json:"alerttime"` Stateracing string `json:"stateracing"` Idcaballoganador int `json:"idcaballoganador"` Nombrecaballoganador string `json:"nombrecaballoganador"` }
Racing struct
type Remates ¶
type Remates struct { gorm.Model Idracing uint `json:"idracing"` Idhorse int `json:"idhorse"` Numberhorse int `json:"numberhorse"` Seudonimo string `json:"seudonimo"` Amount int64 `json:"amount"` Horsename string `json:"horsename"` }
Remates struct
type Retiro ¶
type Retiro struct { gorm.Model Amount float64 `json:"amount"` Clientidentificationcard string `json:"clientidentificationcard"` }
Retiro struct
func (*Retiro) Dowithdrawal ¶
Dowithdrawal Client db
type Tablas ¶
type Tablas struct { gorm.Model Idracing uint `json:"idracing"` Montototal int64 `json:"montototal"` Montocasa int64 `json:"montocasa"` Montoganador int64 `json:"montoganador"` Posiciontabla uint `json:"posiciontabla"` Porcentajeevento uint `json:"posicionevento"` Estado string `json:"estado"` }
Tablas struct
func SearchTablaByRaceID ¶
SearchTablaByRaceID .
func (*Tablas) UpdateStateTabla ¶
UpdateStateTabla tablas