Documentation ¶
Index ¶
- Constants
- func GetAccessToken(r *http.Request) string
- func GetAccessTokenFromContext(ctx context.Context) (string, bool)
- func GetAuthIdFromContext(ctx context.Context) (string, bool)
- func GetIPAddress(r *http.Request) string
- func GetIPAddressFromContext(ctx context.Context) (string, bool)
- func GetRequestOriginFromContext(ctx context.Context) (string, bool)
- func GetUserAgentFromContext(ctx context.Context) (string, bool)
- type CtxKey
- type Middleware
- type VipStatus
- type VipTier
Constants ¶
View Source
const ( CtxKeyRateRegistry = CtxKey("Infura-Rate-Limit-Registry") CtxKeyAuthId = CtxKey("Infura-Auth-ID") CtxKeyRealIP = CtxKey("Infura-Real-IP") CtxKeyAccessToken = CtxKey("Infura-Access-Token") CtxKeyReqOrigin = CtxKey("Infura-Req-Origin") CtxKeyUserAgent = CtxKey("Infura-User-Agent") )
View Source
const VipSubPropTierKey = "tier"
Variables ¶
This section is empty.
Functions ¶
func GetAccessToken ¶
func GetIPAddress ¶
GetIPAddress returns the remote IP address.
Types ¶
type VipStatus ¶
func GetVipStatusByBillingStatus ¶
func GetVipStatusByBillingStatus(bs *web3pay.BillingStatus) (*VipStatus, bool)
func GetVipStatusBySubscriptionStatus ¶
func GetVipStatusBySubscriptionStatus(vss *web3pay.VipSubscriptionStatus) (*VipStatus, bool)
Click to show internal directories.
Click to hide internal directories.