Documentation
¶
Index ¶
- Constants
- func NewBaseHandler(db *dbex.DB, logger *dbex.Logger, provider *sonyflake.Sonyflake) baseHandler
- func NewUserAccountHandler(base baseHandler) *userAccountHandler
- type BannerIDHandler
- type BannersHandler
- type BetIDHandler
- type BetsHandler
- type BroadcastIDHandler
- type BroadcastsHandler
- type DealerAccountHandler
- type DealerIDHandler
- type DealersHandler
- type HallIDHandler
- type HallsHandler
- type IDData
- type LimitationsHandler
- type NotFoundHandler
- type OfficialCMSManagerAccountHandler
- type OfficialCMSManagerIDHandler
- type OfficialCMSManagersHandler
- type OfficialCMSRoleIDHandler
- type OfficialCMSRolesHandler
- type PartnerAccountHandler
- type PartnerIDHandler
- type PartnerLogHandler
- type PartnersHandler
- type RoomIDHandler
- type RoomsHandler
- type RoundIDHandler
- type RoundsHandler
- type TransferIDHandler
- type TransferPartnerTransferIDHandler
- type TransfersHandler
- type UserAccessTokenHandler
- type UserIDHandler
- type UserLogHandler
- type UsersHandler
Constants ¶
const ( CodeSuccess = 0 CodeErrorUndefined = 1 CodeIPError = 2 CodeRouteError = 3 CodeHeaderError = 4 CodeMethodError = 5 CodePathError = 10 CodeBodyError0 = 20 CodeBodyNil = 21 CodeBodyReadError = 22 CodeBodyReadNil = 23 CodePanic = 40 CodeRequestDataUnmarshalError = 100 CodeRequestDataError = 101 CodeRequestPostDataIllegal = 102 CodeRequestPathError = 103 CodeResponseDataMarshalError = 200 CodeDBPrepareError = 300 CodeDBQueryError = 301 CodeDBScanError = 302 CodeDBRowsError = 303 CodeDBExecError = 310 //insert duplicate value into unique column, CodeDBExecResultError = 311 CodeDBExecLastIDError = 312 HeadAPIKey = "qwerASDFzxcv!@#$" RoomTypeBaccarat int = 0 RoomTypeDragonTiger int = 1 RoomTypeNiuniu int = 2 RoomTypeSicbo int = 6 RoomTypeRoulette int = 7 )
Variables ¶
This section is empty.
Functions ¶
func NewBaseHandler ¶
NewBaseHandler returns structure of base handler
func NewUserAccountHandler ¶
func NewUserAccountHandler(base baseHandler) *userAccountHandler
NewUserAccountHandler returns userAccountHandler structure
Types ¶
type BannerIDHandler ¶
type BannerIDHandler struct {
// contains filtered or unexported fields
}
BannerIDHandler presents structure of handling banner
func NewBannerIDHandler ¶
func NewBannerIDHandler(base baseHandler) *BannerIDHandler
NewBannerIDHandler returns handler for banner
func (*BannerIDHandler) ServeHTTP ¶
func (h *BannerIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BannersHandler ¶
type BannersHandler struct {
// contains filtered or unexported fields
}
BannersHandler presents handler of banner
func NewBannersHandler ¶
func NewBannersHandler(base baseHandler) *BannersHandler
NewBannersHandler returns structure of banner handler
func (*BannersHandler) ServeHTTP ¶
func (h *BannersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BetIDHandler ¶
type BetIDHandler struct {
// contains filtered or unexported fields
}
BetIDHandler does select, update by ID
func NewBetIDHandler ¶
func NewBetIDHandler(base baseHandler) *BetIDHandler
NewBetIDHandler returns BetIDHandler structure
func (*BetIDHandler) ServeHTTP ¶
func (h *BetIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BetsHandler ¶
type BetsHandler struct {
// contains filtered or unexported fields
}
BetsHandler handles bet events
func NewBetsHandler ¶
func NewBetsHandler(base baseHandler) *BetsHandler
NewBetsHandler returns BetsHandler structure
func (*BetsHandler) ServeHTTP ¶
func (h *BetsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BroadcastIDHandler ¶
type BroadcastIDHandler struct {
// contains filtered or unexported fields
}
BroadcastIDHandler presents structure of handling broadcast
func NewBroadcastIDHandler ¶
func NewBroadcastIDHandler(base baseHandler) *BroadcastIDHandler
NewBroadcastIDHandler returns handler for broadcast
func (*BroadcastIDHandler) ServeHTTP ¶
func (h *BroadcastIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type BroadcastsHandler ¶
type BroadcastsHandler struct {
// contains filtered or unexported fields
}
BroadcastsHandler handles broadcast events
func NewBroadcastsHandler ¶
func NewBroadcastsHandler(base baseHandler) *BroadcastsHandler
NewBroadcastsHandler returns Broadcast structure
func (*BroadcastsHandler) ServeHTTP ¶
func (h *BroadcastsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type DealerAccountHandler ¶
type DealerAccountHandler struct {
// contains filtered or unexported fields
}
DealerAccountHandler selects dealer value by account
func NewDealerAccountHandler ¶
func NewDealerAccountHandler(base baseHandler) *DealerAccountHandler
NewDealerAccountHandler returns DealerAccountHandler structure
func (*DealerAccountHandler) ServeHTTP ¶
func (h *DealerAccountHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type DealerIDHandler ¶
type DealerIDHandler struct {
// contains filtered or unexported fields
}
DealerIDHandler does select, delete and patch by ID
func NewDealerIDHandler ¶
func NewDealerIDHandler(base baseHandler) *DealerIDHandler
NewDealerIDHandler returns DealerIDHandler structure
func (*DealerIDHandler) ServeHTTP ¶
func (h *DealerIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type DealersHandler ¶
type DealersHandler struct {
// contains filtered or unexported fields
}
DealersHandler select dealers and insert new dealer
func NewDealersHandler ¶
func NewDealersHandler(base baseHandler) *DealersHandler
NewDealersHandler returns DealersHandler structure
func (*DealersHandler) ServeHTTP ¶
func (h *DealersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type HallIDHandler ¶
type HallIDHandler struct {
// contains filtered or unexported fields
}
HallIDHandler do select, delete, patch by ID
func NewHallIDHandler ¶
func NewHallIDHandler(base baseHandler) *HallIDHandler
NewHallIDHandler returns HallIDHandler structure
func (*HallIDHandler) ServeHTTP ¶
func (h *HallIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type HallsHandler ¶
type HallsHandler struct {
// contains filtered or unexported fields
}
HallsHandler does select and insert new hall
func NewHallsHandler ¶
func NewHallsHandler(base baseHandler) *HallsHandler
NewHallsHandler returns HallsHandler structure
func (*HallsHandler) ServeHTTP ¶
func (h *HallsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type LimitationsHandler ¶
type LimitationsHandler struct {
// contains filtered or unexported fields
}
LimitationsHandler selects limitation data from db
func NewLimitationsHandler ¶
func NewLimitationsHandler(base baseHandler) *LimitationsHandler
NewLimitationsHandler returns LimitationsHandler structure
func (*LimitationsHandler) ServeHTTP ¶
func (h *LimitationsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type NotFoundHandler ¶
type NotFoundHandler struct {
// contains filtered or unexported fields
}
NotFoundHandler returns http status NotFound
func NewNotFoundHandler ¶
func NewNotFoundHandler(base baseHandler) *NotFoundHandler
NewNotFoundHandler returns NotFoundHandler structure
func (*NotFoundHandler) ServeHTTP ¶
func (h *NotFoundHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type OfficialCMSManagerAccountHandler ¶
type OfficialCMSManagerAccountHandler struct {
// contains filtered or unexported fields
}
OfficialCMSManagerAccountHandler selects data from DB by account
func NewOfficialCMSManagerAccountHandler ¶
func NewOfficialCMSManagerAccountHandler(base baseHandler) *OfficialCMSManagerAccountHandler
NewOfficialCMSManagerAccountHandler returns OfficialCMSManagerAccountHandler structure
func (*OfficialCMSManagerAccountHandler) ServeHTTP ¶
func (h *OfficialCMSManagerAccountHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type OfficialCMSManagerIDHandler ¶
type OfficialCMSManagerIDHandler struct {
// contains filtered or unexported fields
}
OfficialCMSManagerIDHandler handles request for official cms manager
func NewOfficialCMSManagerIDHandler ¶
func NewOfficialCMSManagerIDHandler(base baseHandler) *OfficialCMSManagerIDHandler
NewOfficialCMSManagerIDHandler returns structure of official cms manager
func (*OfficialCMSManagerIDHandler) ServeHTTP ¶
func (h *OfficialCMSManagerIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type OfficialCMSManagersHandler ¶
type OfficialCMSManagersHandler struct {
// contains filtered or unexported fields
}
OfficialCMSManagersHandler select and insert new data
func NewOfficialCMSManagersHandler ¶
func NewOfficialCMSManagersHandler(base baseHandler) *OfficialCMSManagersHandler
NewOfficialCMSManagersHandler returns OfficialCMSManagersHandler structure
func (*OfficialCMSManagersHandler) ServeHTTP ¶
func (h *OfficialCMSManagersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type OfficialCMSRoleIDHandler ¶
type OfficialCMSRoleIDHandler struct {
// contains filtered or unexported fields
}
OfficialCMSRoleIDHandler handles request of official cms role
func NewOfficialCMSRoleIDHandler ¶
func NewOfficialCMSRoleIDHandler(base baseHandler) *OfficialCMSRoleIDHandler
NewOfficialCMSRoleIDHandler returns official cms role structure
func (*OfficialCMSRoleIDHandler) ServeHTTP ¶
func (h *OfficialCMSRoleIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type OfficialCMSRolesHandler ¶
type OfficialCMSRolesHandler struct {
// contains filtered or unexported fields
}
OfficialCMSRolesHandler select and insert new data
func NewOfficialCMSRolesHandler ¶
func NewOfficialCMSRolesHandler(base baseHandler) *OfficialCMSRolesHandler
NewOfficialCMSRolesHandler returns OfficialCMSRolesHandler strurcture
func (*OfficialCMSRolesHandler) ServeHTTP ¶
func (h *OfficialCMSRolesHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PartnerAccountHandler ¶
type PartnerAccountHandler struct {
// contains filtered or unexported fields
}
PartnerAccountHandler selects data from DB by account
func NewPartnerAccountHandler ¶
func NewPartnerAccountHandler(base baseHandler) *PartnerAccountHandler
NewPartnerAccountHandler returns PartnerAccountHandler structure
func (*PartnerAccountHandler) ServeHTTP ¶
func (h *PartnerAccountHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PartnerIDHandler ¶
type PartnerIDHandler struct {
// contains filtered or unexported fields
}
PartnerIDHandler select and updates by ID
func NewPartnerIDHandler ¶
func NewPartnerIDHandler(base baseHandler) *PartnerIDHandler
NewPartnerIDHandler returns PartnerIDHandler structure
func (*PartnerIDHandler) ServeHTTP ¶
func (h *PartnerIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PartnerLogHandler ¶
type PartnerLogHandler struct {
// contains filtered or unexported fields
}
PartnerLogHandler does select and insert
func NewPartnerLogHandler ¶
func NewPartnerLogHandler(base baseHandler) *PartnerLogHandler
NewPartnerLogHandler returns PartnerLogHandler structure
func (*PartnerLogHandler) ServeHTTP ¶
func (h *PartnerLogHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PartnersHandler ¶
type PartnersHandler struct {
// contains filtered or unexported fields
}
PartnersHandler select and insert new data
func NewPartnersHandler ¶
func NewPartnersHandler(base baseHandler) *PartnersHandler
NewPartnersHandler returns PartnersHandler structure
func (*PartnersHandler) ServeHTTP ¶
func (h *PartnersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RoomIDHandler ¶
type RoomIDHandler struct {
// contains filtered or unexported fields
}
RoomIDHandler does select, update, delete data from DB by ID
func NewRoomIDHandler ¶
func NewRoomIDHandler(base baseHandler) *RoomIDHandler
NewRoomIDHandler returns RoomIDHandler structure
func (*RoomIDHandler) ServeHTTP ¶
func (h *RoomIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RoomsHandler ¶
type RoomsHandler struct {
// contains filtered or unexported fields
}
RoomsHandler does select and insert
func NewRoomsHandler ¶
func NewRoomsHandler(base baseHandler) *RoomsHandler
NewRoomsHandler returns RoomsHandler structure
func (*RoomsHandler) ServeHTTP ¶
func (h *RoomsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RoundIDHandler ¶
type RoundIDHandler struct {
// contains filtered or unexported fields
}
RoundIDHandler does select and update by ID
func NewRoundIDHandler ¶
func NewRoundIDHandler(base baseHandler) *RoundIDHandler
NewRoundIDHandler returns a handler
func (*RoundIDHandler) ServeHTTP ¶
func (h *RoundIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type RoundsHandler ¶
type RoundsHandler struct {
// contains filtered or unexported fields
}
RoundsHandler does select and insert
func NewRoundsHandler ¶
func NewRoundsHandler(base baseHandler) *RoundsHandler
NewRoundsHandler returns RoundsHandler structure
func (*RoundsHandler) ServeHTTP ¶
func (h *RoundsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TransferIDHandler ¶
type TransferIDHandler struct {
// contains filtered or unexported fields
}
TransferIDHandler does mysql select and update by ID
func NewTransferIDHandler ¶
func NewTransferIDHandler(base baseHandler) *TransferIDHandler
TransferIDHandler returns TransferIDHandler structure
func (*TransferIDHandler) ServeHTTP ¶
func (h *TransferIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TransferPartnerTransferIDHandler ¶
type TransferPartnerTransferIDHandler struct {
// contains filtered or unexported fields
}
TransferPartnerTransferIDHandler handles mysql select query
func NewTransferPartnerTransferIDHandler ¶
func NewTransferPartnerTransferIDHandler(base baseHandler) *TransferPartnerTransferIDHandler
NewTransferPartnerTransferIDHandler returns TransferPartnerTransferIDHandler structure
func (*TransferPartnerTransferIDHandler) ServeHTTP ¶
func (h *TransferPartnerTransferIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type TransfersHandler ¶
type TransfersHandler struct {
// contains filtered or unexported fields
}
TransfersHandler does mysql select and insert
func NewTransfersHandler ¶
func NewTransfersHandler(base baseHandler) *TransfersHandler
NewTransfersHandler returns TransfersHandler structure
func (*TransfersHandler) ServeHTTP ¶
func (h *TransfersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type UserAccessTokenHandler ¶
type UserAccessTokenHandler struct {
// contains filtered or unexported fields
}
UserAccessTokenHandler presents structure of user account handler user使用access token 登入,查詢db是否有此access token
func NewUserAccessTokenHandler ¶
func NewUserAccessTokenHandler(base baseHandler) *UserAccessTokenHandler
NewUserAccessTokenHandler returns NewUserAccessTokenHandler structure
func (*UserAccessTokenHandler) ServeHTTP ¶
func (h *UserAccessTokenHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type UserIDHandler ¶
type UserIDHandler struct {
// contains filtered or unexported fields
}
UserIDHandler presents structure of user id
func NewUserIDHandler ¶
func NewUserIDHandler(base baseHandler) *UserIDHandler
NewUserIDHandler returns *UserIDHandler
func (*UserIDHandler) ServeHTTP ¶
func (h *UserIDHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type UserLogHandler ¶
type UserLogHandler struct {
// contains filtered or unexported fields
}
UserLogHandler does mysql select about user log record
func NewUserLogHandler ¶
func NewUserLogHandler(base baseHandler) *UserLogHandler
NewUserLogHandler returns UserLogHandler structure
func (*UserLogHandler) ServeHTTP ¶
func (h *UserLogHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type UsersHandler ¶
type UsersHandler struct {
// contains filtered or unexported fields
}
UsersHandler does mysql select and insert
func NewUsersHandler ¶
func NewUsersHandler(base baseHandler) *UsersHandler
NewUsersHandler returns UsersHandler structure
func (*UsersHandler) ServeHTTP ¶
func (h *UsersHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files
¶
- bannerID.go
- banners.go
- base.go
- betID.go
- bets.go
- broadcastID.go
- broadcasts.go
- config.go
- dealerAccount.go
- dealerID.go
- dealers.go
- hallID.go
- halls.go
- limitations.go
- notFoundHandler.go
- officialCMSManagerAccount.go
- officialCMSManagerID.go
- officialCMSManagers.go
- officialCMSRoleID.go
- officialCMSRoles.go
- partnerAccount.go
- partnerID.go
- partnerLog.go
- partners.go
- roomID.go
- rooms.go
- roundID.go
- rounds.go
- testUtil.go
- transferID.go
- transferPartnerTransferID.go
- transfers.go
- userAccessToken.go
- userAccount.go
- userID.go
- userLog.go
- users.go