Documentation ¶
Index ¶
- func AuthMiddleware(auth *auth.Client, log *logan.Entry) func(http.Handler) http.Handler
- func BalancesQ(r *http.Request) data.BalancesQ
- func Broadcaster(r *http.Request) broadcaster.Broadcaster
- func ClaimEvent(w http.ResponseWriter, r *http.Request)
- func CountriesConfig(r *http.Request) countrier.Config
- func CountriesQ(r *http.Request) data.CountriesQ
- func CreateBalance(w http.ResponseWriter, r *http.Request)
- func CtxBalancesQ(q data.BalancesQ) func(context.Context) context.Context
- func CtxBroadcaster(broadcaster broadcaster.Broadcaster) func(context.Context) context.Context
- func CtxCountriesConfig(config countrier.Config) func(context.Context) context.Context
- func CtxCountriesQ(q data.CountriesQ) func(context.Context) context.Context
- func CtxEventTypes(types evtypes.Types) func(context.Context) context.Context
- func CtxEventsQ(q data.EventsQ) func(context.Context) context.Context
- func CtxLevels(levels config.Levels) func(context.Context) context.Context
- func CtxLog(entry *logan.Entry) func(context.Context) context.Context
- func CtxPointPrice(price config.PointsPrice) func(context.Context) context.Context
- func CtxReferralsQ(q data.ReferralsQ) func(context.Context) context.Context
- func CtxUserClaims(claim []resources.Claim) func(context.Context) context.Context
- func CtxVerifier(verifier *zk.Verifier) func(context.Context) context.Context
- func CtxWithdrawalsQ(q data.WithdrawalsQ) func(context.Context) context.Context
- func DBCloneMiddleware(db *pgdb.DB) func(http.Handler) http.Handler
- func DoClaimEventUpdates(levels config.Levels, referralsQ data.ReferralsQ, balancesQ data.BalancesQ, ...) (err error)
- func EditReferrals(w http.ResponseWriter, r *http.Request)
- func EventTypes(r *http.Request) evtypes.Types
- func EventsQ(r *http.Request) data.EventsQ
- func FulfillEvent(w http.ResponseWriter, r *http.Request)
- func GetBalance(w http.ResponseWriter, r *http.Request)
- func GetCountriesConfig(w http.ResponseWriter, r *http.Request)
- func GetEvent(w http.ResponseWriter, r *http.Request)
- func GetPointPrice(w http.ResponseWriter, r *http.Request)
- func JoinProgram(w http.ResponseWriter, r *http.Request)
- func Leaderboard(w http.ResponseWriter, r *http.Request)
- func Levels(r *http.Request) config.Levels
- func ListEventTypes(w http.ResponseWriter, r *http.Request)
- func ListEvents(w http.ResponseWriter, r *http.Request)
- func ListWithdrawals(w http.ResponseWriter, r *http.Request)
- func Log(r *http.Request) *logan.Entry
- func PointPrice(r *http.Request) config.PointsPrice
- func ReferralsQ(r *http.Request) data.ReferralsQ
- func UserClaims(r *http.Request) []resources.Claim
- func Verifier(r *http.Request) *zk.Verifier
- func VerifyPassport(w http.ResponseWriter, r *http.Request)
- func Withdraw(w http.ResponseWriter, r *http.Request)
- func WithdrawalsQ(r *http.Request) data.WithdrawalsQ
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func Broadcaster ¶
func Broadcaster(r *http.Request) broadcaster.Broadcaster
func ClaimEvent ¶
func ClaimEvent(w http.ResponseWriter, r *http.Request)
func CountriesQ ¶ added in v0.2.1
func CountriesQ(r *http.Request) data.CountriesQ
func CreateBalance ¶
func CreateBalance(w http.ResponseWriter, r *http.Request)
func CtxBroadcaster ¶
func CtxBroadcaster(broadcaster broadcaster.Broadcaster) func(context.Context) context.Context
func CtxCountriesConfig ¶ added in v1.1.0
func CtxCountriesQ ¶ added in v0.2.1
func CtxPointPrice ¶
func CtxReferralsQ ¶
func CtxUserClaims ¶
func CtxWithdrawalsQ ¶
func DBCloneMiddleware ¶
DBCloneMiddleware is designed to clone DB session on each request. You must put all new DB handlers here instead of ape.CtxMiddleware, unless you have a reason to do otherwise.
func DoClaimEventUpdates ¶ added in v0.2.1
func DoClaimEventUpdates( levels config.Levels, referralsQ data.ReferralsQ, balancesQ data.BalancesQ, countriesQ data.CountriesQ, balance data.Balance, reward int64) (err error)
DoClaimEventUpdates do updates which link to claim event: update reserved amount in country; lvlup and update referrals count; accruing points;
Balance must be active and with verified passport
func EditReferrals ¶
func EditReferrals(w http.ResponseWriter, r *http.Request)
func FulfillEvent ¶
func FulfillEvent(w http.ResponseWriter, r *http.Request)
func GetBalance ¶
func GetBalance(w http.ResponseWriter, r *http.Request)
func GetCountriesConfig ¶ added in v0.2.1
func GetCountriesConfig(w http.ResponseWriter, r *http.Request)
func GetPointPrice ¶
func GetPointPrice(w http.ResponseWriter, r *http.Request)
func JoinProgram ¶ added in v1.1.0
func JoinProgram(w http.ResponseWriter, r *http.Request)
func Leaderboard ¶
func Leaderboard(w http.ResponseWriter, r *http.Request)
func ListEventTypes ¶ added in v0.2.1
func ListEventTypes(w http.ResponseWriter, r *http.Request)
func ListEvents ¶
func ListEvents(w http.ResponseWriter, r *http.Request)
func ListWithdrawals ¶
func ListWithdrawals(w http.ResponseWriter, r *http.Request)
func PointPrice ¶
func PointPrice(r *http.Request) config.PointsPrice
func ReferralsQ ¶
func ReferralsQ(r *http.Request) data.ReferralsQ
func VerifyPassport ¶
func VerifyPassport(w http.ResponseWriter, r *http.Request)
func WithdrawalsQ ¶
func WithdrawalsQ(r *http.Request) data.WithdrawalsQ
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.