integration

package
v1.0.30 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Factory

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

Factory manages different payment integration providers

func NewFactory

func NewFactory(
	config *config.Configuration,
	logger *logger.Logger,
	connectionRepo connection.Repository,
	customerRepo customer.Repository,
	invoiceRepo invoice.Repository,
	paymentRepo payment.Repository,
	entityIntegrationMappingRepo entityintegrationmapping.Repository,
	encryptionService security.EncryptionService,
) *Factory

NewFactory creates a new integration factory

func (*Factory) GetAvailableProviders

func (f *Factory) GetAvailableProviders(ctx context.Context) ([]IntegrationProvider, error)

GetAvailableProviders returns all available providers for the current environment

func (*Factory) GetIntegrationByProvider

func (f *Factory) GetIntegrationByProvider(ctx context.Context, providerType types.SecretProvider) (interface{}, error)

GetIntegrationByProvider returns the appropriate integration for the given provider type

func (*Factory) GetStripeIntegration

func (f *Factory) GetStripeIntegration(ctx context.Context) (*StripeIntegration, error)

GetStripeIntegration returns a complete Stripe integration setup

func (*Factory) GetSupportedProviders

func (f *Factory) GetSupportedProviders() []types.SecretProvider

GetSupportedProviders returns all supported integration provider types

func (*Factory) HasProvider

func (f *Factory) HasProvider(providerType types.SecretProvider) bool

HasProvider checks if a provider is supported

type IntegrationProvider

type IntegrationProvider interface {
	GetProviderType() types.SecretProvider
	IsAvailable(ctx context.Context) bool
}

IntegrationProvider defines the interface for all integration providers

type StripeIntegration

type StripeIntegration struct {
	Client         *stripe.Client
	CustomerSvc    *stripe.CustomerService
	PaymentSvc     *stripe.PaymentService
	InvoiceSyncSvc *stripe.InvoiceSyncService
	WebhookHandler *webhook.Handler
}

StripeIntegration contains all Stripe integration services

type StripeProvider

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

StripeProvider implements IntegrationProvider for Stripe

func (*StripeProvider) GetProviderType

func (p *StripeProvider) GetProviderType() types.SecretProvider

GetProviderType returns the provider type

func (*StripeProvider) IsAvailable

func (p *StripeProvider) IsAvailable(ctx context.Context) bool

IsAvailable checks if Stripe integration is available

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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