Documentation ¶
Index ¶
- func FromDTO(dto *CurrencyDto) *money.Money
- type AccountHistoryEvent
- type ClassInfoResponse
- type CryptoInfoDto
- type CurrencyDto
- type LobbyInfoResponse
- type LoginDto
- type PokerInfoResponse
- type RegisterDto
- type SessionInfo
- type SessionResponse
- type SessionUser
- type SpinDTO
- type UpdateUserDto
- type User
- type VerifyAmount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromDTO ¶
func FromDTO(dto *CurrencyDto) *money.Money
FromMoney converts between the dto to the used currency and precision library used.
Types ¶
type AccountHistoryEvent ¶
type AccountHistoryEvent struct { Amount *CurrencyDto `json:"amount"` Type string `json:"type"` Time time.Time `json:"time"` Game string `json:"gameId"` LobbyID string `json:"roundId"` }
AccountHistoryEvent is a transaction event
type ClassInfoResponse ¶
ClassInfoResponse contains the registered poker lobby classes that are available
type CryptoInfoDto ¶
type CryptoInfoDto struct {
PublicKey string `json:"publicKey"`
}
type CurrencyDto ¶
type CurrencyDto struct { Value int64 `json:"value"` //Value of the monetary value Currency string `json:"currency"` //Currency Code of the monetary value }
CurrencyDto is the data transfer object for a monetary value
func FromMoney ¶
func FromMoney(money *money.Money) *CurrencyDto
FromMoney converts between the used currency and precision library used to the currency dto
type LobbyInfoResponse ¶
LobbyInfoResponse returns the current active lobbies sorted by lobby classes
type LoginDto ¶
type LoginDto struct { Username string `json:"username" schema:"username"` Password string `json:"password" schema:"password"` RememberMe bool `json:"rememberme" schema:"rememberme"` }
LoginDto defines the object for the api login request
type PokerInfoResponse ¶
type PokerInfoResponse struct { Classes []models.Class `json:"classes"` Lobbies [][]models.LobbyBase `json:"lobbies"` }
PokerInfoResponse is the combination of the ClassInfoResponse and the LobbyInfoResponse
type RegisterDto ¶
type RegisterDto struct { Username string `json:"username"` Email string `json:"email"` Password string `json:"password"` FullName string `json:"fullName"` Birthdate int64 `json:"birthdate"` RememberMe bool `json:"rememberme"` }
RegisterDto defines the dto for the user account registration
type SessionInfo ¶
type SessionInfo struct {
Authenticated bool `json:"authenticated"`
}
type SessionResponse ¶
type SessionResponse struct {
User *SessionUser `json:"user"`
}
SessionResponse is the response of a session request
type SessionUser ¶
type SessionUser struct { Username string `json:"username" schema:"username"` Name string `json:"name" schema:"name"` Id string `json:"id" schema:"id"` }
LoginDto
type SpinDTO ¶
type SpinDTO struct { Number uint32 `json:"number"` Prove []byte `json:"prove"` WinAmount int `json:"winAmount"` }
The DTO of a spin request
type UpdateUserDto ¶
type User ¶
type User struct { // The user id // required: true ID string `json:"id"` // The registration time of the user CreatedAt time.Time `json:"created_at"` // The time when the user was updated last UpdatedAt time.Time `json:"updated_at"` // The username of the user // required: true // min length: 4 // max length: 100 Username string `json:"username"` // The email of the user // required: true // min length: 4 // max length: 100 // swagger:strfmt email Email string `json:"email"` // The full name of the user // required: true // min length: 1 // max length: 100 FullName string `json:"fullName"` // The unix birthdate of the user // required: true Birthdate int64 `json:"birthdate"` }
User is the data transfer object of the internal user object swagger:model
type VerifyAmount ¶
type VerifyAmount struct {
VerificationResult bool `json:"result"`
}
VeriyAmount is a result of a verification
func NewVerifyAmount ¶
func NewVerifyAmount(res bool) *VerifyAmount