Documentation ¶
Index ¶
- func ActivateBalance(w http.ResponseWriter, r *http.Request)
- func AuthMiddleware(auth *auth.Client, log *logan.Entry) func(http.Handler) http.Handler
- func BalancesQ(r *http.Request) data.BalancesQ
- func ClaimEvent(w http.ResponseWriter, r *http.Request)
- func CreateBalance(w http.ResponseWriter, r *http.Request)
- func CreateEventType(w http.ResponseWriter, r *http.Request)
- func CtxBalancesQ(q data.BalancesQ) func(context.Context) context.Context
- func CtxEventTypes(types *evtypes.Types) func(context.Context) context.Context
- func CtxEventTypesQ(q data.EventTypesQ) 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 CtxReferralsQ(q data.ReferralsQ) func(context.Context) context.Context
- func CtxSigCalculator(calc hmacsig.Calculator) func(context.Context) context.Context
- func CtxUserClaims(claim []resources.Claim) func(context.Context) context.Context
- func CtxVerifiers(v config.Verifiers) 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 EventTypesQ(r *http.Request) data.EventTypesQ
- func EventsQ(r *http.Request) data.EventsQ
- func FulfillPollEvent(w http.ResponseWriter, r *http.Request)
- func FulfillQREvent(w http.ResponseWriter, r *http.Request)
- func GetBalance(w http.ResponseWriter, r *http.Request)
- func GetEvent(w http.ResponseWriter, r *http.Request)
- func GetEventType(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 ListQREventTypes(w http.ResponseWriter, r *http.Request)
- func Log(r *http.Request) *logan.Entry
- func ReferralsQ(r *http.Request) data.ReferralsQ
- func SigCalculator(r *http.Request) hmacsig.Calculator
- func UpdateEventType(w http.ResponseWriter, r *http.Request)
- func UserClaims(r *http.Request) []resources.Claim
- func Verifiers(r *http.Request) config.Verifiers
- func VerifyExternalPassport(w http.ResponseWriter, r *http.Request)
- func VerifyInternalPassport(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateBalance ¶ added in v1.1.0
func ActivateBalance(w http.ResponseWriter, r *http.Request)
func AuthMiddleware ¶
func ClaimEvent ¶
func ClaimEvent(w http.ResponseWriter, r *http.Request)
func CreateBalance ¶
func CreateBalance(w http.ResponseWriter, r *http.Request)
func CreateEventType ¶
func CreateEventType(w http.ResponseWriter, r *http.Request)
func CtxEventTypesQ ¶
func CtxReferralsQ ¶
func CtxSigCalculator ¶
func CtxUserClaims ¶
func CtxVerifiers ¶ added in v1.3.0
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 ¶
func DoClaimEventUpdates( levels *config.Levels, referralsQ data.ReferralsQ, balancesQ data.BalancesQ, 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 EventTypesQ ¶
func EventTypesQ(r *http.Request) data.EventTypesQ
func FulfillPollEvent ¶ added in v1.3.0
func FulfillPollEvent(w http.ResponseWriter, r *http.Request)
func FulfillQREvent ¶
func FulfillQREvent(w http.ResponseWriter, r *http.Request)
func GetBalance ¶
func GetBalance(w http.ResponseWriter, r *http.Request)
func GetEventType ¶
func GetEventType(w http.ResponseWriter, r *http.Request)
func Leaderboard ¶
func Leaderboard(w http.ResponseWriter, r *http.Request)
func ListEventTypes ¶
func ListEventTypes(w http.ResponseWriter, r *http.Request)
func ListEvents ¶
func ListEvents(w http.ResponseWriter, r *http.Request)
func ListQREventTypes ¶ added in v0.2.0
func ListQREventTypes(w http.ResponseWriter, r *http.Request)
func ReferralsQ ¶
func ReferralsQ(r *http.Request) data.ReferralsQ
func SigCalculator ¶
func SigCalculator(r *http.Request) hmacsig.Calculator
func UpdateEventType ¶
func UpdateEventType(w http.ResponseWriter, r *http.Request)
func VerifyExternalPassport ¶ added in v1.3.0
func VerifyExternalPassport(w http.ResponseWriter, r *http.Request)
func VerifyInternalPassport ¶ added in v1.3.0
func VerifyInternalPassport(w http.ResponseWriter, r *http.Request)
VerifyInternalPassport handler processes 3 different flows:
- Old passport verification with proof for the current release
- New passport verification with JWT for the future
- Legacy joining program logic when the client fails to generate query proof
Types ¶
This section is empty.
Source Files ¶
- activate_balance.go
- claim_event.go
- create_balance.go
- create_event_type.go
- ctx.go
- edit_referrals.go
- fulfill_poll_event.go
- fulfill_qr_event.go
- get_balance.go
- get_event.go
- get_event_type.go
- leaderboard.go
- list_event_types.go
- list_events.go
- list_qr_event_types.go
- middleware.go
- update_event_type.go
- verify_external_passport.go
- verify_internal_passport.go
Click to show internal directories.
Click to hide internal directories.