Documentation
¶
Index ¶
- Constants
- func ConfigApiKey() string
- func ConfigDomain() string
- func ConfigWebhookListenAddress() string
- func ConfigWebhookSecret() string
- func EventMapping(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service)
- func NewCancelHandler(graphqlSvc gqlreq.Service, sdkSvc gqlsdk.Service) http.Handler
- func NewChangeHandler(graphqlSvc gqlreq.Service, sdkSvc gqlsdk.Service) http.Handler
- func NewCreateHandler(graphqlSvc gqlreq.Service, sdkSvc gqlsdk.Service) http.Handler
- func NewInitHandler(graphqlSvc gqlreq.Service, sdkSvc gqlsdk.Service) http.Handler
- func NewRetryHandler(graphqlSvc gqlreq.Service, sdkSvc gqlsdk.Service) http.Handler
- func NewWebhookHandler(sdkSvc gqlsdk.Service) http.Handler
- func ProcessChargeSucceeded(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessCustomerCreated(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessCustomerSubscriptionCreated(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessCustomerSubscriptionDeleted(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessCustomerUpdated(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessInvoiceCreated(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessInvoiceFinalized(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessInvoicePaid(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessInvoicePaymentActionRequired(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessInvoicePaymentFailed(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessInvoicePaymentSucceeded(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessPaymentIntentCreated(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessPaymentIntentRequiresAction(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessPaymentIntentSucceeded(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- func ProcessPaymentMethodAttached(c context.Context, event stripe.Event, id string, sdkSvc gqlsdk.Service) error
- type ActionChangePayload
- type ActionCreatePayload
- type ActionPayloadCancel
- type ActionPayloadInit
- type ActionPayloadRetry
- type CancelHandler
- type ChangeHandler
- type CreateHandler
- type Plan
- type RequestCancel
- type RequestCreate
- type RequestRetry
- type RetryHandler
- type WebhookHandler
Constants ¶
View Source
const ( STATUS_INIT = "init" LOG_PARAM_INVOICE_ID = "INVOICE_ID" LOG_PARAM_SUBSCRIPTION_ID = "SUBSCRIPTION_ID" LOG_PARAM_CUSTOMER_ID = "CUSTOMER_ID" LOG_PARAM_PLAN_ID = "PLAN_ID" LOG_PARAM_STRIPE_RESPONSE = "STRIPE_RESPONSE" LOG_PARAM_STRIPE_PLAN_ID = "STRIPE_PLAN_ID" LOG_PARAM_HASURA_RESPONSE = "HASURA_RESPONSE" LOG_PARAM_ACCOUNT_NAME = "ACCOUNT_NAME" LOG_PARAM_ACCOUNT_ID = "ACCOUNT_ID" LOG_PARAM_USER_ID = "USER_ID" LOG_PARAM_RESULT_LENGTH = "RESULT_LENGTH" )
Variables ¶
This section is empty.
Functions ¶
func ConfigApiKey ¶
func ConfigApiKey() string
func ConfigDomain ¶
func ConfigDomain() string
func ConfigWebhookListenAddress ¶
func ConfigWebhookListenAddress() string
func ConfigWebhookSecret ¶
func ConfigWebhookSecret() string
func EventMapping ¶
func NewCancelHandler ¶
func NewChangeHandler ¶
func NewCreateHandler ¶
func NewInitHandler ¶
func NewRetryHandler ¶
func ProcessChargeSucceeded ¶
func ProcessCustomerCreated ¶
func ProcessCustomerUpdated ¶
func ProcessInvoiceCreated ¶
func ProcessInvoiceFinalized ¶
func ProcessInvoicePaid ¶
Types ¶
type ActionChangePayload ¶
type ActionChangePayload struct { hasura.BasePayload Input struct { Data *gqlsdk.ChangeSubscriptionInput `json:"data"` } `json:"input"` }
type ActionCreatePayload ¶
type ActionCreatePayload struct { hasura.BasePayload Input struct { Data *gqlsdk.CreateSubscriptionInput `json:"data"` } `json:"input"` }
type ActionPayloadCancel ¶
type ActionPayloadCancel struct {
hasura.BasePayload
}
type ActionPayloadInit ¶
type ActionPayloadInit struct { hasura.BasePayload Input struct { Data *gqlsdk.InitSubscriptionInput `json:"data"` } `json:"input"` }
type ActionPayloadRetry ¶
type ActionPayloadRetry struct { hasura.BasePayload Input struct { Data *gqlsdk.RetrySubscriptionInput `json:"data"` } `json:"input"` }
type CancelHandler ¶
func (*CancelHandler) ServeHTTP ¶
func (h *CancelHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ChangeHandler ¶
func (*ChangeHandler) ServeHTTP ¶
func (h *ChangeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Handle subscription change
type CreateHandler ¶
func (*CreateHandler) ServeHTTP ¶
func (h *CreateHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Handle subscription creation
type RequestCancel ¶
type RequestCancel struct {
SubscriptionID string `json:"subscriptionId"`
}
type RequestCreate ¶
type RequestRetry ¶
type RetryHandler ¶
func (*RetryHandler) ServeHTTP ¶
func (h *RetryHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type WebhookHandler ¶
func (*WebhookHandler) ServeHTTP ¶
func (h *WebhookHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Source Files
¶
- config.go
- const.go
- event_charge_succeeded.go
- event_customer_created.go
- event_customer_subscription_created.go
- event_customer_subscription_deleted.go
- event_customer_updated.go
- event_invoice_created.go
- event_invoice_finalized.go
- event_invoice_paid.go
- event_invoice_payment_action_required.go
- event_invoice_payment_failed.go
- event_invoice_payment_succeeded.go
- event_mapping.go
- event_payment_intent_created.go
- event_payment_intent_requires_action.go
- event_payment_intent_succeeded.go
- event_payment_method_attached.go
- event_util.go
- handle_cancel.go
- handle_change.go
- handle_create.go
- handle_init.go
- handle_retry.go
- handle_utils.go
- handle_webhook.go
- models.go
Click to show internal directories.
Click to hide internal directories.