Documentation
¶
Index ¶
- func GetAssetStore(ctx context.Context) assetstores.Store
- func GetClaims(ctx context.Context) *claims.JWTClaims
- func GetClaimsAsMap(ctx context.Context) map[string]interface{}
- func GetConfig(ctx context.Context) *conf.Configuration
- func GetCoupons(ctx context.Context) coupons.Cache
- func GetInstance(ctx context.Context) *models.Instance
- func GetInstanceID(ctx context.Context) string
- func GetMailer(ctx context.Context) mailer.Mailer
- func GetOrderID(ctx context.Context) string
- func GetPaymentProviders(ctx context.Context) map[string]payments.Provider
- func GetRequestID(ctx context.Context) string
- func GetToken(ctx context.Context) *jwt.Token
- func GetUser(ctx context.Context) *models.User
- func GetUserID(ctx context.Context) string
- func IsAdmin(ctx context.Context) bool
- func WithAdminFlag(ctx context.Context, isAdmin bool) context.Context
- func WithAssetStore(ctx context.Context, store assetstores.Store) context.Context
- func WithConfig(ctx context.Context, config *conf.Configuration) context.Context
- func WithCoupons(ctx context.Context, config *conf.Configuration) (context.Context, error)
- func WithInstance(ctx context.Context, i *models.Instance) context.Context
- func WithInstanceID(ctx context.Context, id string) context.Context
- func WithMailer(ctx context.Context, mailer mailer.Mailer) context.Context
- func WithOrderID(ctx context.Context, orderID string) context.Context
- func WithPaymentProviders(ctx context.Context, provs map[string]payments.Provider) context.Context
- func WithRequestID(ctx context.Context, id string) context.Context
- func WithToken(ctx context.Context, token *jwt.Token) context.Context
- func WithUser(ctx context.Context, user *models.User) context.Context
- func WithUserID(ctx context.Context, userID string) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAssetStore ¶
func GetAssetStore(ctx context.Context) assetstores.Store
GetAssetStore reads the asset store from the context.
func GetClaimsAsMap ¶
GetClaimsAsMap reads the claims contained with the JWT token stored in the context, as a map.
func GetConfig ¶
func GetConfig(ctx context.Context) *conf.Configuration
GetConfig reads the tenant configuration from the context.
func GetCoupons ¶
GetCoupons reads the coupon cache from the context.
func GetInstance ¶
GetInstance reads the instance id from the context.
func GetInstanceID ¶
GetInstanceID reads the instance id from the context.
func GetOrderID ¶
GetOrderID reads the order ID from the context.
func GetPaymentProviders ¶
GetPaymentProviders reads the payment providers from the context
func GetRequestID ¶
GetRequestID reads the request ID from the context.
func WithAdminFlag ¶
WithAdminFlag adds a flag indicating admin status to the context.
func WithAssetStore ¶
WithAssetStore adds the asset store to the context.
func WithConfig ¶
WithConfig adds the tenant configuration to the context.
func WithCoupons ¶
WithCoupons adds the coupon cache to the context based on the site URL.
func WithInstance ¶
WithInstance adds the instance id to the context.
func WithInstanceID ¶
WithInstanceID adds the instance id to the context.
func WithMailer ¶
WithMailer adds the mailer to the context.
func WithOrderID ¶
WithOrderID adds the order ID to the context.
func WithPaymentProviders ¶
WithPaymentProviders adds the payment providers to the context.
func WithRequestID ¶
WithRequestID adds the provided request ID to the context.
Types ¶
This section is empty.