Documentation
¶
Index ¶
- type Factory
- func (f *Factory) GetAvailableProviders(ctx context.Context) ([]IntegrationProvider, error)
- func (f *Factory) GetIntegrationByProvider(ctx context.Context, providerType types.SecretProvider) (interface{}, error)
- func (f *Factory) GetStripeIntegration(ctx context.Context) (*StripeIntegration, error)
- func (f *Factory) GetSupportedProviders() []types.SecretProvider
- func (f *Factory) HasProvider(providerType types.SecretProvider) bool
- type IntegrationProvider
- type StripeIntegration
- type StripeProvider
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