Documentation ¶
Index ¶
- type Client
- func (c *Client) AddNewEvent(event LotteryEventInfo) error
- func (c *Client) AddNewUserInfo(userInfo UserInfo) error
- func (c *Client) AddNewWinner(winnerInfo WinnerInfo) error
- func (c *Client) AddUserBet(participantInfo EventParticipantInfo) error
- func (c *Client) CloseConnection() error
- func (c *Client) DeleteEvent(eventID primitive.ObjectID) error
- func (c *Client) DeleteUserBet(betUID primitive.ObjectID) error
- func (c *Client) DeleteUserInfo(userInfo UserInfo) error
- func (c *Client) GetAllEvents() ([]LotteryEventInfo, error)
- func (c *Client) GetEventByDateRange(startDate, endDate primitive.DateTime) ([]LotteryEventInfo, error)
- func (c *Client) GetEventWinners(eventID primitive.ObjectID) ([]WinnerInfo, error)
- func (c *Client) GetEventsByDate(date primitive.DateTime) ([]LotteryEventInfo, error)
- func (c *Client) GetEventsByType(eventType string) ([]LotteryEventInfo, error)
- func (c *Client) GetParticipantsInfoByEventID(eventID primitive.ObjectID) ([]EventParticipantInfo, error)
- func (c *Client) GetUserBets(userID primitive.ObjectID) ([]EventParticipantInfo, error)
- func (c *Client) GetUserInfoByGovID(govID string) (*UserInfo, error)
- func (c *Client) GetUserInfoByID(id primitive.ObjectID) (*UserInfo, error)
- func (c *Client) GetUserInfoByPhone(phoneNumber int64) (*UserInfo, error)
- func (c *Client) OpenConnection() error
- func (c *Client) UpdateEvent(event LotteryEventInfo) error
- func (c *Client) UpdateUserBet(updatedInfo EventParticipantInfo) error
- func (c *Client) UpdateUserInfo(uid primitive.ObjectID, key, value string) error
- type EventParticipantInfo
- type LotteryEventInfo
- type ParticipantInfo
- type UserInfo
- type WinnerInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) AddNewEvent ¶
func (c *Client) AddNewEvent(event LotteryEventInfo) error
func (*Client) AddNewUserInfo ¶
func (*Client) AddNewWinner ¶ added in v0.0.6
func (c *Client) AddNewWinner(winnerInfo WinnerInfo) error
func (*Client) AddUserBet ¶ added in v0.0.5
func (c *Client) AddUserBet(participantInfo EventParticipantInfo) error
func (*Client) CloseConnection ¶
func (*Client) DeleteUserBet ¶ added in v0.0.5
func (*Client) DeleteUserInfo ¶
func (*Client) GetAllEvents ¶
func (c *Client) GetAllEvents() ([]LotteryEventInfo, error)
func (*Client) GetEventByDateRange ¶
func (c *Client) GetEventByDateRange(startDate, endDate primitive.DateTime) ([]LotteryEventInfo, error)
func (*Client) GetEventWinners ¶ added in v0.0.6
func (c *Client) GetEventWinners(eventID primitive.ObjectID) ([]WinnerInfo, error)
func (*Client) GetEventsByDate ¶
func (c *Client) GetEventsByDate(date primitive.DateTime) ([]LotteryEventInfo, error)
func (*Client) GetEventsByType ¶
func (c *Client) GetEventsByType(eventType string) ([]LotteryEventInfo, error)
func (*Client) GetParticipantsInfoByEventID ¶ added in v0.0.5
func (c *Client) GetParticipantsInfoByEventID(eventID primitive.ObjectID) ([]EventParticipantInfo, error)
func (*Client) GetUserBets ¶ added in v0.0.5
func (c *Client) GetUserBets(userID primitive.ObjectID) ([]EventParticipantInfo, error)
func (*Client) GetUserInfoByGovID ¶
func (*Client) GetUserInfoByID ¶
func (*Client) GetUserInfoByPhone ¶
func (*Client) OpenConnection ¶
func (*Client) UpdateEvent ¶
func (c *Client) UpdateEvent(event LotteryEventInfo) error
func (*Client) UpdateUserBet ¶ added in v0.0.5
func (c *Client) UpdateUserBet(updatedInfo EventParticipantInfo) error
type EventParticipantInfo ¶
type EventParticipantInfo struct { BetUID primitive.ObjectID `bson:"_id,omitempty"` EventUID primitive.ObjectID `bson:"event_id,omitempty"` ParticipantInfo `bson:"participant_info,omitempty"` CreatedAt primitive.DateTime `bson:"created_at,omitempty"` UpdatedAt primitive.DateTime `bson:"updated_at,omitempty"` }
type LotteryEventInfo ¶
type LotteryEventInfo struct { EventUID primitive.ObjectID `bson:"_id,omitempty"` EventDate primitive.DateTime `bson:"event_date,omitempty"` Name string `bson:"name,omitempty"` EventType string `bson:"event_type,omitempty"` WinningNumber []int `bson:"winning_number,omitempty"` CreatedAt primitive.DateTime `bson:"created_at,omitempty"` UpdatedAt primitive.DateTime `bson:"updated_at,omitempty"` }
type ParticipantInfo ¶
type UserInfo ¶
type UserInfo struct { UID primitive.ObjectID `bson:"_id,omitempty"` Name string `bson:"name,omitempty"` Phone int64 `bson:"phone,omitempty"` GovID string `bson:"gov_id,omitempty"` EMail string `bson:"e_mail,omitempty"` CreatedAT string `bson:"created_at,omitempty"` UpdatedAT string `bson:"updated_at,omitempty"` }
func GetAllUserInfo ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.