-
Notifications
You must be signed in to change notification settings - Fork 0
/
handler.go
27 lines (20 loc) · 1.68 KB
/
handler.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package gintonic
import (
"context"
"github.com/YianAndCode/gintonic/lmdata"
)
type DefaultHandler func(ctx context.Context, eventName string, meta lmdata.Meta, data interface{}) error
type OrderCreatedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.Order) error
type OrderRefundedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.Order) error
type SubscriptionCreatedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.Subscription) error
type SubscriptionUpdatedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.Subscription) error
type SubscriptionCancelledHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.Subscription) error
type SubscriptionResumedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.Subscription) error
type SubscriptionExpiredHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.Subscription) error
type SubscriptionPausedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.Subscription) error
type SubscriptionUnpausedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.Subscription) error
type SubscriptionPaymentSuccessHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.SubscriptionInvoice) error
type SubscriptionPaymentFailedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.SubscriptionInvoice) error
type SubscriptionPaymentRecoveredHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.SubscriptionInvoice) error
type LicenseKeyCreatedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.LicenseKey) error
type LicenseKeyUpdatedHandler func(ctx context.Context, meta lmdata.Meta, data lmdata.LicenseKey) error