store

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PaymentSystemStore

type PaymentSystemStore struct {
	// contains filtered or unexported fields
}

func NewPaymentSystemStore

func NewPaymentSystemStore(db *gorm.DB) *PaymentSystemStore

func (*PaymentSystemStore) ActiveEntitlement added in v0.3.0

func (s *PaymentSystemStore) ActiveEntitlement(ctx context.Context, identityID, planCode string) (models.PaymentSubscription, error)

func (*PaymentSystemStore) ClaimWebhook added in v0.3.0

func (s *PaymentSystemStore) ClaimWebhook(ctx context.Context, event models.PaymentWebhookEvent, lease time.Duration) (string, bool, error)

func (*PaymentSystemStore) CleanupWebhookPayloads added in v0.3.0

func (s *PaymentSystemStore) CleanupWebhookPayloads(ctx context.Context, before time.Time) error

func (*PaymentSystemStore) CustomerID

func (s *PaymentSystemStore) CustomerID(ctx context.Context, provider, identityID string) (string, error)

func (*PaymentSystemStore) FinishWebhook

func (s *PaymentSystemStore) FinishWebhook(ctx context.Context, provider, eventID, leaseID string, processErr error) error

func (*PaymentSystemStore) GetPayment added in v0.3.0

func (s *PaymentSystemStore) GetPayment(ctx context.Context, provider, externalID string) (models.PaymentEvent, error)

func (*PaymentSystemStore) GetSubscription

func (s *PaymentSystemStore) GetSubscription(ctx context.Context, provider, externalID, identityID string) (models.PaymentSubscription, error)

func (*PaymentSystemStore) GetSubscriptionByExternal added in v0.3.0

func (s *PaymentSystemStore) GetSubscriptionByExternal(ctx context.Context, provider, externalID string) (models.PaymentSubscription, error)

func (*PaymentSystemStore) GetWebhook added in v0.3.0

func (s *PaymentSystemStore) GetWebhook(ctx context.Context, provider, eventID string) (models.PaymentWebhookEvent, error)

func (*PaymentSystemStore) HasActiveSubscription

func (s *PaymentSystemStore) HasActiveSubscription(ctx context.Context, identityID string) (bool, error)

func (*PaymentSystemStore) ListFailedWebhooks added in v0.3.0

func (s *PaymentSystemStore) ListFailedWebhooks(ctx context.Context, limit, offset int) ([]models.PaymentWebhookEvent, error)

func (*PaymentSystemStore) ListPayments added in v0.3.0

func (s *PaymentSystemStore) ListPayments(ctx context.Context, identityID string, limit, offset int) ([]models.PaymentEvent, error)

func (*PaymentSystemStore) ListSubscriptions

func (s *PaymentSystemStore) ListSubscriptions(ctx context.Context, identityID string, limit, offset int) ([]models.PaymentSubscription, error)

func (*PaymentSystemStore) ListSubscriptionsAfter added in v0.3.0

func (s *PaymentSystemStore) ListSubscriptionsAfter(ctx context.Context, afterID uint, limit int) ([]models.PaymentSubscription, error)

func (*PaymentSystemStore) MarkWebhookForRetry added in v0.3.0

func (s *PaymentSystemStore) MarkWebhookForRetry(ctx context.Context, provider, eventID string) error

func (*PaymentSystemStore) UpsertPayment

func (s *PaymentSystemStore) UpsertPayment(ctx context.Context, payment models.PaymentEvent) error

func (*PaymentSystemStore) UpsertSubscription

func (s *PaymentSystemStore) UpsertSubscription(ctx context.Context, subscription models.PaymentSubscription) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL