Documentation
¶
Index ¶
- func CheckEnvironmentFilter(ctx context.Context, itemEnvID string) bool
- func CheckTenantFilter(ctx context.Context, itemTenantID string) bool
- func NewInMemoryEntityIntegrationMappingStore() entityintegrationmapping.Repository
- func NewInMemoryEventPublisher(eventStore *InMemoryEventStore) publisher.EventPublisher
- func NewMockPDFGenerator(logger *logger.Logger) pdf.Generator
- func NewMockPostgresClient(logger *logger.Logger) postgres.IClient
- func SetupContext() context.Context
- type BaseServiceTestSuite
- func (s *BaseServiceTestSuite) ClearStores()
- func (s *BaseServiceTestSuite) GetCalculator() proration.Calculator
- func (s *BaseServiceTestSuite) GetConfig() *config.Configuration
- func (s *BaseServiceTestSuite) GetContext() context.Context
- func (s *BaseServiceTestSuite) GetDB() postgres.IClient
- func (s *BaseServiceTestSuite) GetIntegrationFactory() *integration.Factory
- func (s *BaseServiceTestSuite) GetLogger() *logger.Logger
- func (s *BaseServiceTestSuite) GetNow() time.Time
- func (s *BaseServiceTestSuite) GetPDFGenerator() pdf.Generator
- func (s *BaseServiceTestSuite) GetPublisher() publisher.EventPublisher
- func (s *BaseServiceTestSuite) GetStores() Stores
- func (s *BaseServiceTestSuite) GetUUID() string
- func (s *BaseServiceTestSuite) GetWebhookPublisher() webhookPublisher.WebhookPublisher
- func (s *BaseServiceTestSuite) SetupSuite()
- func (s *BaseServiceTestSuite) SetupTest()
- func (s *BaseServiceTestSuite) TearDownTest()
- type FilterFunc
- type InMemoryAddonAssociationStore
- func (s *InMemoryAddonAssociationStore) Count(ctx context.Context, filter *types.AddonAssociationFilter) (int, error)
- func (s *InMemoryAddonAssociationStore) Create(ctx context.Context, aa *addonassociation.AddonAssociation) error
- func (s *InMemoryAddonAssociationStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryAddonAssociationStore) GetByID(ctx context.Context, id string) (*addonassociation.AddonAssociation, error)
- func (s *InMemoryAddonAssociationStore) List(ctx context.Context, filter *types.AddonAssociationFilter) ([]*addonassociation.AddonAssociation, error)
- func (s *InMemoryAddonAssociationStore) Update(ctx context.Context, aa *addonassociation.AddonAssociation) error
- type InMemoryAddonStore
- func (s *InMemoryAddonStore) Count(ctx context.Context, filter *types.AddonFilter) (int, error)
- func (s *InMemoryAddonStore) Create(ctx context.Context, a *addon.Addon) error
- func (s *InMemoryAddonStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryAddonStore) GetByID(ctx context.Context, id string) (*addon.Addon, error)
- func (s *InMemoryAddonStore) GetByLookupKey(ctx context.Context, lookupKey string) (*addon.Addon, error)
- func (s *InMemoryAddonStore) List(ctx context.Context, filter *types.AddonFilter) ([]*addon.Addon, error)
- func (s *InMemoryAddonStore) Update(ctx context.Context, a *addon.Addon) error
- type InMemoryAlertLogsStore
- func (s *InMemoryAlertLogsStore) Count(ctx context.Context, filter *types.AlertLogFilter) (int, error)
- func (s *InMemoryAlertLogsStore) Create(ctx context.Context, alertLog *domainAlertLogs.AlertLog) error
- func (s *InMemoryAlertLogsStore) Get(ctx context.Context, id string) (*domainAlertLogs.AlertLog, error)
- func (s *InMemoryAlertLogsStore) GetLatestAlert(ctx context.Context, entityType types.AlertEntityType, entityID string, ...) (*domainAlertLogs.AlertLog, error)
- func (s *InMemoryAlertLogsStore) List(ctx context.Context, filter *types.AlertLogFilter) ([]*domainAlertLogs.AlertLog, error)
- func (s *InMemoryAlertLogsStore) ListByAlertType(ctx context.Context, alertType types.AlertType, limit int) ([]*domainAlertLogs.AlertLog, error)
- func (s *InMemoryAlertLogsStore) ListByEntity(ctx context.Context, entityType types.AlertEntityType, entityID string, ...) ([]*domainAlertLogs.AlertLog, error)
- type InMemoryAuthRepository
- func (r *InMemoryAuthRepository) Clear()
- func (r *InMemoryAuthRepository) CreateAuth(ctx context.Context, auth *auth.Auth) error
- func (r *InMemoryAuthRepository) DeleteAuth(ctx context.Context, userID string) error
- func (r *InMemoryAuthRepository) GetAuthByUserID(ctx context.Context, userID string) (*auth.Auth, error)
- func (r *InMemoryAuthRepository) UpdateAuth(ctx context.Context, auth *auth.Auth) error
- type InMemoryConnectionStore
- func (s *InMemoryConnectionStore) Clear()
- func (s *InMemoryConnectionStore) Count(ctx context.Context, filter *types.ConnectionFilter) (int, error)
- func (s *InMemoryConnectionStore) CountByFilter(ctx context.Context, filter *types.ConnectionFilter) (int, error)
- func (s *InMemoryConnectionStore) Create(ctx context.Context, c *connection.Connection) error
- func (s *InMemoryConnectionStore) Delete(ctx context.Context, connection *connection.Connection) error
- func (s *InMemoryConnectionStore) Get(ctx context.Context, id string) (*connection.Connection, error)
- func (s *InMemoryConnectionStore) GetByProvider(ctx context.Context, provider types.SecretProvider) (*connection.Connection, error)
- func (s *InMemoryConnectionStore) List(ctx context.Context, filter *types.ConnectionFilter) ([]*connection.Connection, error)
- func (s *InMemoryConnectionStore) ListAll(ctx context.Context, filter *types.ConnectionFilter) ([]*connection.Connection, error)
- func (s *InMemoryConnectionStore) ListByFilter(ctx context.Context, filter *types.ConnectionFilter) ([]*connection.Connection, error)
- func (s *InMemoryConnectionStore) Update(ctx context.Context, c *connection.Connection) error
- type InMemoryCouponApplicationStore
- func (s *InMemoryCouponApplicationStore) CountBySubscriptionAndCoupon(ctx context.Context, subscriptionID string, couponID string) (int, error)
- func (s *InMemoryCouponApplicationStore) Create(ctx context.Context, ca *coupon_application.CouponApplication) error
- func (s *InMemoryCouponApplicationStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryCouponApplicationStore) Get(ctx context.Context, id string) (*coupon_application.CouponApplication, error)
- func (s *InMemoryCouponApplicationStore) GetByInvoice(ctx context.Context, invoiceID string) ([]*coupon_application.CouponApplication, error)
- func (s *InMemoryCouponApplicationStore) GetBySubscription(ctx context.Context, subscriptionID string) ([]*coupon_application.CouponApplication, error)
- func (s *InMemoryCouponApplicationStore) GetBySubscriptionAndCoupon(ctx context.Context, subscriptionID string, couponID string) ([]*coupon_application.CouponApplication, error)
- func (s *InMemoryCouponApplicationStore) Update(ctx context.Context, ca *coupon_application.CouponApplication) error
- type InMemoryCouponAssociationStore
- func (s *InMemoryCouponAssociationStore) Create(ctx context.Context, ca *coupon_association.CouponAssociation) error
- func (s *InMemoryCouponAssociationStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryCouponAssociationStore) Get(ctx context.Context, id string) (*coupon_association.CouponAssociation, error)
- func (s *InMemoryCouponAssociationStore) GetBySubscription(ctx context.Context, subscriptionID string) ([]*coupon_association.CouponAssociation, error)
- func (s *InMemoryCouponAssociationStore) GetBySubscriptionForLineItems(ctx context.Context, subscriptionID string) ([]*coupon_association.CouponAssociation, error)
- func (s *InMemoryCouponAssociationStore) Update(ctx context.Context, ca *coupon_association.CouponAssociation) error
- type InMemoryCouponStore
- func (s *InMemoryCouponStore) Count(ctx context.Context, filter *types.CouponFilter) (int, error)
- func (s *InMemoryCouponStore) Create(ctx context.Context, c *coupon.Coupon) error
- func (s *InMemoryCouponStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryCouponStore) Get(ctx context.Context, id string) (*coupon.Coupon, error)
- func (s *InMemoryCouponStore) GetBatch(ctx context.Context, ids []string) ([]*coupon.Coupon, error)
- func (s *InMemoryCouponStore) IncrementRedemptions(ctx context.Context, id string) error
- func (s *InMemoryCouponStore) List(ctx context.Context, filter *types.CouponFilter) ([]*coupon.Coupon, error)
- func (s *InMemoryCouponStore) Update(ctx context.Context, c *coupon.Coupon) error
- type InMemoryCreditGrantApplicationStore
- func (s *InMemoryCreditGrantApplicationStore) Clear()
- func (s *InMemoryCreditGrantApplicationStore) Count(ctx context.Context, filter *types.CreditGrantApplicationFilter) (int, error)
- func (s *InMemoryCreditGrantApplicationStore) Create(ctx context.Context, cga *creditgrantapplication.CreditGrantApplication) error
- func (s *InMemoryCreditGrantApplicationStore) Delete(ctx context.Context, cga *creditgrantapplication.CreditGrantApplication) error
- func (s *InMemoryCreditGrantApplicationStore) FindAllScheduledApplications(ctx context.Context) ([]*creditgrantapplication.CreditGrantApplication, error)
- func (s *InMemoryCreditGrantApplicationStore) FindByIdempotencyKey(ctx context.Context, idempotencyKey string) (*creditgrantapplication.CreditGrantApplication, error)
- func (s *InMemoryCreditGrantApplicationStore) Get(ctx context.Context, id string) (*creditgrantapplication.CreditGrantApplication, error)
- func (s *InMemoryCreditGrantApplicationStore) List(ctx context.Context, filter *types.CreditGrantApplicationFilter) ([]*creditgrantapplication.CreditGrantApplication, error)
- func (s *InMemoryCreditGrantApplicationStore) ListAll(ctx context.Context, filter *types.CreditGrantApplicationFilter) ([]*creditgrantapplication.CreditGrantApplication, error)
- func (s *InMemoryCreditGrantApplicationStore) Update(ctx context.Context, cga *creditgrantapplication.CreditGrantApplication) error
- type InMemoryCreditGrantStore
- func (s *InMemoryCreditGrantStore) Clear()
- func (s *InMemoryCreditGrantStore) Count(ctx context.Context, filter *types.CreditGrantFilter) (int, error)
- func (s *InMemoryCreditGrantStore) Create(ctx context.Context, cg *creditgrant.CreditGrant) (*creditgrant.CreditGrant, error)
- func (s *InMemoryCreditGrantStore) CreateBulk(ctx context.Context, creditGrants []*creditgrant.CreditGrant) ([]*creditgrant.CreditGrant, error)
- func (s *InMemoryCreditGrantStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryCreditGrantStore) DeleteBulk(ctx context.Context, ids []string) error
- func (s *InMemoryCreditGrantStore) Get(ctx context.Context, id string) (*creditgrant.CreditGrant, error)
- func (s *InMemoryCreditGrantStore) GetByPlan(ctx context.Context, planID string) ([]*creditgrant.CreditGrant, error)
- func (s *InMemoryCreditGrantStore) GetBySubscription(ctx context.Context, subscriptionID string) ([]*creditgrant.CreditGrant, error)
- func (s *InMemoryCreditGrantStore) List(ctx context.Context, filter *types.CreditGrantFilter) ([]*creditgrant.CreditGrant, error)
- func (s *InMemoryCreditGrantStore) ListAll(ctx context.Context, filter *types.CreditGrantFilter) ([]*creditgrant.CreditGrant, error)
- func (s *InMemoryCreditGrantStore) Update(ctx context.Context, cg *creditgrant.CreditGrant) (*creditgrant.CreditGrant, error)
- type InMemoryCreditNoteLineItemStore
- func (s *InMemoryCreditNoteLineItemStore) Count(ctx context.Context, filter *types.CreditNoteLineItemFilter) (int, error)
- func (s *InMemoryCreditNoteLineItemStore) Create(ctx context.Context, item *creditnote.CreditNoteLineItem) error
- func (s *InMemoryCreditNoteLineItemStore) CreateBulk(ctx context.Context, lineItems []*creditnote.CreditNoteLineItem) error
- func (s *InMemoryCreditNoteLineItemStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryCreditNoteLineItemStore) Get(ctx context.Context, id string) (*creditnote.CreditNoteLineItem, error)
- func (s *InMemoryCreditNoteLineItemStore) List(ctx context.Context, filter *types.CreditNoteLineItemFilter) ([]*creditnote.CreditNoteLineItem, error)
- func (s *InMemoryCreditNoteLineItemStore) ListByCreditNote(ctx context.Context, creditNoteID string) ([]*creditnote.CreditNoteLineItem, error)
- func (s *InMemoryCreditNoteLineItemStore) ListByInvoiceLineItem(ctx context.Context, invoiceLineItemID string) ([]*creditnote.CreditNoteLineItem, error)
- func (s *InMemoryCreditNoteLineItemStore) Update(ctx context.Context, item *creditnote.CreditNoteLineItem) error
- type InMemoryCreditNoteStore
- func (s *InMemoryCreditNoteStore) AddLineItems(ctx context.Context, creditNoteID string, ...) error
- func (s *InMemoryCreditNoteStore) Clear()
- func (s *InMemoryCreditNoteStore) Count(ctx context.Context, filter *types.CreditNoteFilter) (int, error)
- func (s *InMemoryCreditNoteStore) Create(ctx context.Context, cn *creditnote.CreditNote) error
- func (s *InMemoryCreditNoteStore) CreateWithLineItems(ctx context.Context, cn *creditnote.CreditNote) error
- func (s *InMemoryCreditNoteStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryCreditNoteStore) Get(ctx context.Context, id string) (*creditnote.CreditNote, error)
- func (s *InMemoryCreditNoteStore) GetByIdempotencyKey(ctx context.Context, key string) (*creditnote.CreditNote, error)
- func (s *InMemoryCreditNoteStore) List(ctx context.Context, filter *types.CreditNoteFilter) ([]*creditnote.CreditNote, error)
- func (s *InMemoryCreditNoteStore) RemoveLineItems(ctx context.Context, creditNoteID string, itemIDs []string) error
- func (s *InMemoryCreditNoteStore) Update(ctx context.Context, cn *creditnote.CreditNote) error
- type InMemoryCustomerStore
- func (s *InMemoryCustomerStore) Count(ctx context.Context, filter *types.CustomerFilter) (int, error)
- func (s *InMemoryCustomerStore) CountByFilter(ctx context.Context, filter *types.CustomerFilter) (int, error)
- func (s *InMemoryCustomerStore) Create(ctx context.Context, c *customer.Customer) error
- func (s *InMemoryCustomerStore) Delete(ctx context.Context, customer *customer.Customer) error
- func (s *InMemoryCustomerStore) Get(ctx context.Context, id string) (*customer.Customer, error)
- func (s *InMemoryCustomerStore) GetByLookupKey(ctx context.Context, lookupKey string) (*customer.Customer, error)
- func (s *InMemoryCustomerStore) List(ctx context.Context, filter *types.CustomerFilter) ([]*customer.Customer, error)
- func (s *InMemoryCustomerStore) ListAll(ctx context.Context, filter *types.CustomerFilter) ([]*customer.Customer, error)
- func (s *InMemoryCustomerStore) ListByFilter(ctx context.Context, filter *types.CustomerFilter) ([]*customer.Customer, error)
- func (s *InMemoryCustomerStore) Update(ctx context.Context, c *customer.Customer) error
- type InMemoryEntitlementStore
- func (s *InMemoryEntitlementStore) Clear()
- func (s *InMemoryEntitlementStore) Count(ctx context.Context, filter *types.EntitlementFilter) (int, error)
- func (s *InMemoryEntitlementStore) Create(ctx context.Context, e *entitlement.Entitlement) (*entitlement.Entitlement, error)
- func (s *InMemoryEntitlementStore) CreateBulk(ctx context.Context, entitlements []*entitlement.Entitlement) ([]*entitlement.Entitlement, error)
- func (s *InMemoryEntitlementStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryEntitlementStore) DeleteBulk(ctx context.Context, ids []string) error
- func (s *InMemoryEntitlementStore) Get(ctx context.Context, id string) (*entitlement.Entitlement, error)
- func (s *InMemoryEntitlementStore) List(ctx context.Context, filter *types.EntitlementFilter) ([]*entitlement.Entitlement, error)
- func (s *InMemoryEntitlementStore) ListByAddonIDs(ctx context.Context, addonIDs []string) ([]*entitlement.Entitlement, error)
- func (s *InMemoryEntitlementStore) ListByFeatureIDs(ctx context.Context, featureIDs []string) ([]*entitlement.Entitlement, error)
- func (s *InMemoryEntitlementStore) ListByPlanIDs(ctx context.Context, planIDs []string) ([]*entitlement.Entitlement, error)
- func (s *InMemoryEntitlementStore) Update(ctx context.Context, e *entitlement.Entitlement) (*entitlement.Entitlement, error)
- type InMemoryEntityIntegrationMappingStore
- func (s *InMemoryEntityIntegrationMappingStore) Count(ctx context.Context, filter *types.EntityIntegrationMappingFilter) (int, error)
- func (s *InMemoryEntityIntegrationMappingStore) CountByFilter(ctx context.Context, filter *types.EntityIntegrationMappingFilter) (int, error)
- func (s *InMemoryEntityIntegrationMappingStore) Create(ctx context.Context, ...) error
- func (s *InMemoryEntityIntegrationMappingStore) Delete(ctx context.Context, ...) error
- func (s *InMemoryEntityIntegrationMappingStore) Get(ctx context.Context, id string) (*entityintegrationmapping.EntityIntegrationMapping, error)
- func (s *InMemoryEntityIntegrationMappingStore) GetByEntityAndProvider(ctx context.Context, entityID string, entityType types.IntegrationEntityType, ...) (*entityintegrationmapping.EntityIntegrationMapping, error)
- func (s *InMemoryEntityIntegrationMappingStore) GetByProviderEntity(ctx context.Context, providerType, providerEntityID string) (*entityintegrationmapping.EntityIntegrationMapping, error)
- func (s *InMemoryEntityIntegrationMappingStore) List(ctx context.Context, filter *types.EntityIntegrationMappingFilter) ([]*entityintegrationmapping.EntityIntegrationMapping, error)
- func (s *InMemoryEntityIntegrationMappingStore) ListByEntity(ctx context.Context, entityID string, entityType types.IntegrationEntityType) ([]*entityintegrationmapping.EntityIntegrationMapping, error)
- func (s *InMemoryEntityIntegrationMappingStore) ListByFilter(ctx context.Context, filter *types.EntityIntegrationMappingFilter) ([]*entityintegrationmapping.EntityIntegrationMapping, error)
- func (s *InMemoryEntityIntegrationMappingStore) ListByProvider(ctx context.Context, providerType string) ([]*entityintegrationmapping.EntityIntegrationMapping, error)
- func (s *InMemoryEntityIntegrationMappingStore) Update(ctx context.Context, ...) error
- type InMemoryEnvironmentStore
- func (s *InMemoryEnvironmentStore) Clear()
- func (s *InMemoryEnvironmentStore) Create(ctx context.Context, env *environment.Environment) error
- func (s *InMemoryEnvironmentStore) Get(ctx context.Context, id string) (*environment.Environment, error)
- func (s *InMemoryEnvironmentStore) List(ctx context.Context, filter types.Filter) ([]*environment.Environment, error)
- func (s *InMemoryEnvironmentStore) Update(ctx context.Context, env *environment.Environment) error
- type InMemoryEventStore
- func (s *InMemoryEventStore) BulkInsertEvents(ctx context.Context, events []*events.Event) error
- func (s *InMemoryEventStore) Clear()
- func (s *InMemoryEventStore) FindUnprocessedEvents(ctx context.Context, params *events.FindUnprocessedEventsParams) ([]*events.Event, error)
- func (s *InMemoryEventStore) GetDistinctEventNames(ctx context.Context, externalCustomerID string, startTime, endTime time.Time) ([]string, error)
- func (s *InMemoryEventStore) GetEvents(ctx context.Context, params *events.GetEventsParams) ([]*events.Event, uint64, error)
- func (s *InMemoryEventStore) GetUsage(ctx context.Context, params *events.UsageParams) (*events.AggregationResult, error)
- func (s *InMemoryEventStore) GetUsageWithFilters(ctx context.Context, params *events.UsageWithFiltersParams) ([]*events.AggregationResult, error)
- func (s *InMemoryEventStore) HasEvent(id string) bool
- func (s *InMemoryEventStore) InsertEvent(ctx context.Context, event *events.Event) error
- type InMemoryFeatureStore
- func (s *InMemoryFeatureStore) Clear()
- func (s *InMemoryFeatureStore) Count(ctx context.Context, filter *types.FeatureFilter) (int, error)
- func (s *InMemoryFeatureStore) Create(ctx context.Context, f *feature.Feature) error
- func (s *InMemoryFeatureStore) CreateBulk(ctx context.Context, features []*feature.Feature) ([]*feature.Feature, error)
- func (s *InMemoryFeatureStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryFeatureStore) DeleteBulk(ctx context.Context, ids []string) error
- func (s *InMemoryFeatureStore) Get(ctx context.Context, id string) (*feature.Feature, error)
- func (s *InMemoryFeatureStore) List(ctx context.Context, filter *types.FeatureFilter) ([]*feature.Feature, error)
- func (s *InMemoryFeatureStore) ListAll(ctx context.Context, filter *types.FeatureFilter) ([]*feature.Feature, error)
- func (s *InMemoryFeatureStore) ListByIDs(ctx context.Context, featureIDs []string) ([]*feature.Feature, error)
- func (s *InMemoryFeatureStore) Update(ctx context.Context, f *feature.Feature) error
- type InMemoryInvoiceStore
- func (s *InMemoryInvoiceStore) AddLineItems(ctx context.Context, invoiceID string, items []*invoice.InvoiceLineItem) error
- func (s *InMemoryInvoiceStore) Clear()
- func (s *InMemoryInvoiceStore) Count(ctx context.Context, filter *types.InvoiceFilter) (int, error)
- func (s *InMemoryInvoiceStore) Create(ctx context.Context, inv *invoice.Invoice) error
- func (s *InMemoryInvoiceStore) CreateWithLineItems(ctx context.Context, inv *invoice.Invoice) error
- func (s *InMemoryInvoiceStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryInvoiceStore) ExistsForPeriod(ctx context.Context, subscriptionID string, periodStart, periodEnd time.Time) (bool, error)
- func (s *InMemoryInvoiceStore) Get(ctx context.Context, id string) (*invoice.Invoice, error)
- func (s *InMemoryInvoiceStore) GetByIdempotencyKey(ctx context.Context, key string) (*invoice.Invoice, error)
- func (s *InMemoryInvoiceStore) GetInvoicesForExport(ctx context.Context, tenantID, envID string, startTime, endTime time.Time, ...) ([]*invoice.Invoice, error)
- func (s *InMemoryInvoiceStore) GetNextBillingSequence(ctx context.Context, subscriptionID string) (int, error)
- func (s *InMemoryInvoiceStore) GetNextInvoiceNumber(ctx context.Context, invoiceConfig *types.InvoiceConfig) (string, error)
- func (s *InMemoryInvoiceStore) List(ctx context.Context, filter *types.InvoiceFilter) ([]*invoice.Invoice, error)
- func (s *InMemoryInvoiceStore) RemoveLineItems(ctx context.Context, invoiceID string, itemIDs []string) error
- func (s *InMemoryInvoiceStore) Update(ctx context.Context, inv *invoice.Invoice) error
- type InMemoryKafka
- type InMemoryMeterStore
- func (s *InMemoryMeterStore) Count(ctx context.Context, filter *types.MeterFilter) (int, error)
- func (s *InMemoryMeterStore) CreateMeter(ctx context.Context, m *meter.Meter) error
- func (s *InMemoryMeterStore) DisableMeter(ctx context.Context, id string) error
- func (s *InMemoryMeterStore) GetMeter(ctx context.Context, id string) (*meter.Meter, error)
- func (s *InMemoryMeterStore) List(ctx context.Context, filter *types.MeterFilter) ([]*meter.Meter, error)
- func (s *InMemoryMeterStore) ListAll(ctx context.Context, filter *types.MeterFilter) ([]*meter.Meter, error)
- func (s *InMemoryMeterStore) UpdateMeter(ctx context.Context, id string, filters []meter.Filter) error
- type InMemoryPaymentStore
- func (m *InMemoryPaymentStore) Clear()
- func (m *InMemoryPaymentStore) Count(ctx context.Context, filter *types.PaymentFilter) (int, error)
- func (m *InMemoryPaymentStore) Create(ctx context.Context, p *payment.Payment) error
- func (m *InMemoryPaymentStore) CreateAttempt(ctx context.Context, attempt *payment.PaymentAttempt) error
- func (m *InMemoryPaymentStore) Delete(ctx context.Context, id string) error
- func (m *InMemoryPaymentStore) Get(ctx context.Context, id string) (*payment.Payment, error)
- func (m *InMemoryPaymentStore) GetAttempt(ctx context.Context, id string) (*payment.PaymentAttempt, error)
- func (m *InMemoryPaymentStore) GetByIdempotencyKey(ctx context.Context, key string) (*payment.Payment, error)
- func (m *InMemoryPaymentStore) GetCreatedPayments() []*payment.Payment
- func (m *InMemoryPaymentStore) GetLatestAttempt(ctx context.Context, paymentID string) (*payment.PaymentAttempt, error)
- func (m *InMemoryPaymentStore) GetPaymentsForDestination(ctx context.Context, destinationType types.PaymentDestinationType, ...) ([]*payment.Payment, error)
- func (m *InMemoryPaymentStore) List(ctx context.Context, filter *types.PaymentFilter) ([]*payment.Payment, error)
- func (m *InMemoryPaymentStore) ListAttempts(ctx context.Context, paymentID string) ([]*payment.PaymentAttempt, error)
- func (m *InMemoryPaymentStore) Update(ctx context.Context, p *payment.Payment) error
- func (m *InMemoryPaymentStore) UpdateAttempt(ctx context.Context, attempt *payment.PaymentAttempt) error
- type InMemoryPlanStore
- func (s *InMemoryPlanStore) Clear()
- func (s *InMemoryPlanStore) Count(ctx context.Context, filter *types.PlanFilter) (int, error)
- func (s *InMemoryPlanStore) Create(ctx context.Context, p *plan.Plan) error
- func (s *InMemoryPlanStore) Delete(ctx context.Context, p *plan.Plan) error
- func (s *InMemoryPlanStore) Get(ctx context.Context, id string) (*plan.Plan, error)
- func (s *InMemoryPlanStore) GetByLookupKey(ctx context.Context, lookupKey string) (*plan.Plan, error)
- func (s *InMemoryPlanStore) List(ctx context.Context, filter *types.PlanFilter) ([]*plan.Plan, error)
- func (s *InMemoryPlanStore) ListAll(ctx context.Context, filter *types.PlanFilter) ([]*plan.Plan, error)
- func (s *InMemoryPlanStore) Update(ctx context.Context, p *plan.Plan) error
- type InMemoryPriceStore
- func (s *InMemoryPriceStore) Clear()
- func (s *InMemoryPriceStore) ClearByGroupID(ctx context.Context, groupID string) error
- func (s *InMemoryPriceStore) ClearGroupIDsBulk(ctx context.Context, ids []string) error
- func (s *InMemoryPriceStore) Count(ctx context.Context, filter *types.PriceFilter) (int, error)
- func (s *InMemoryPriceStore) Create(ctx context.Context, p *price.Price) error
- func (s *InMemoryPriceStore) CreateBulk(ctx context.Context, prices []*price.Price) error
- func (s *InMemoryPriceStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryPriceStore) DeleteBulk(ctx context.Context, ids []string) error
- func (s *InMemoryPriceStore) Get(ctx context.Context, id string) (*price.Price, error)
- func (s *InMemoryPriceStore) GetByGroupIDs(ctx context.Context, groupIDs []string) ([]*price.Price, error)
- func (s *InMemoryPriceStore) GetByPlanID(ctx context.Context, planID string) ([]*price.Price, error)
- func (s *InMemoryPriceStore) List(ctx context.Context, filter *types.PriceFilter) ([]*price.Price, error)
- func (s *InMemoryPriceStore) ListAll(ctx context.Context, filter *types.PriceFilter) ([]*price.Price, error)
- func (s *InMemoryPriceStore) Update(ctx context.Context, p *price.Price) error
- type InMemoryPriceUnitStore
- func (s *InMemoryPriceUnitStore) ConvertToBaseCurrency(ctx context.Context, code, tenantID, environmentID string, ...) (decimal.Decimal, error)
- func (s *InMemoryPriceUnitStore) ConvertToPriceUnit(ctx context.Context, code, tenantID, environmentID string, ...) (decimal.Decimal, error)
- func (s *InMemoryPriceUnitStore) Count(ctx context.Context, filter *priceunit.PriceUnitFilter) (int, error)
- func (s *InMemoryPriceUnitStore) Create(ctx context.Context, p *priceunit.PriceUnit) error
- func (s *InMemoryPriceUnitStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryPriceUnitStore) ExistsByCode(ctx context.Context, code string) (bool, error)
- func (s *InMemoryPriceUnitStore) GetByCode(ctx context.Context, code, tenantID, environmentID string, status string) (*priceunit.PriceUnit, error)
- func (s *InMemoryPriceUnitStore) GetByID(ctx context.Context, id string) (*priceunit.PriceUnit, error)
- func (s *InMemoryPriceUnitStore) IsUsedByPrices(ctx context.Context, priceUnitID string) (bool, error)
- func (s *InMemoryPriceUnitStore) List(ctx context.Context, filter *priceunit.PriceUnitFilter) ([]*priceunit.PriceUnit, error)
- func (s *InMemoryPriceUnitStore) Update(ctx context.Context, p *priceunit.PriceUnit) error
- type InMemoryPubSub
- func (ps *InMemoryPubSub) ClearMessages()
- func (ps *InMemoryPubSub) Close() error
- func (ps *InMemoryPubSub) GetMessages(topic string) []*message.Message
- func (ps *InMemoryPubSub) Publish(ctx context.Context, topic string, msg *message.Message) error
- func (ps *InMemoryPubSub) Subscribe(ctx context.Context, topic string) (<-chan *message.Message, error)
- type InMemoryPublisherService
- func (p *InMemoryPublisherService) Clear()
- func (p *InMemoryPublisherService) GetEvents() []*events.Event
- func (p *InMemoryPublisherService) HasEvent(id string) bool
- func (p *InMemoryPublisherService) HasMessage(topic, id string) bool
- func (p *InMemoryPublisherService) Publish(ctx context.Context, event *events.Event) error
- func (p *InMemoryPublisherService) Subscribe() chan *message.Message
- type InMemorySecretStore
- func (s *InMemorySecretStore) Clear()
- func (s *InMemorySecretStore) Count(ctx context.Context, filter *types.SecretFilter) (int, error)
- func (s *InMemorySecretStore) Create(ctx context.Context, secret *secret.Secret) error
- func (s *InMemorySecretStore) Delete(ctx context.Context, id string) error
- func (s *InMemorySecretStore) Get(ctx context.Context, id string) (*secret.Secret, error)
- func (s *InMemorySecretStore) GetAPIKeyByValue(ctx context.Context, value string) (*secret.Secret, error)
- func (s *InMemorySecretStore) List(ctx context.Context, filter *types.SecretFilter) ([]*secret.Secret, error)
- func (s *InMemorySecretStore) ListAll(ctx context.Context, filter *types.SecretFilter) ([]*secret.Secret, error)
- func (s *InMemorySecretStore) UpdateLastUsed(ctx context.Context, id string) error
- type InMemorySettingsStore
- func (s *InMemorySettingsStore) Clear()
- func (s *InMemorySettingsStore) Create(ctx context.Context, setting *domainSettings.Setting) error
- func (s *InMemorySettingsStore) DeleteByKey(ctx context.Context, key string) error
- func (s *InMemorySettingsStore) Get(ctx context.Context, id string) (*domainSettings.Setting, error)
- func (s *InMemorySettingsStore) GetAllTenantEnvSubscriptionSettings(ctx context.Context) ([]*types.TenantEnvSubscriptionConfig, error)
- func (s *InMemorySettingsStore) GetByKey(ctx context.Context, key string) (*domainSettings.Setting, error)
- func (s *InMemorySettingsStore) ListAllTenantEnvSettingsByKey(ctx context.Context, key string) ([]*types.TenantEnvConfig, error)
- func (s *InMemorySettingsStore) Update(ctx context.Context, setting *domainSettings.Setting) error
- type InMemoryStore
- func (s *InMemoryStore[T]) Clear()
- func (s *InMemoryStore[T]) Count(ctx context.Context, filter interface{}, filterFn FilterFunc[T]) (int, error)
- func (s *InMemoryStore[T]) Create(ctx context.Context, id string, item T) error
- func (s *InMemoryStore[T]) Delete(ctx context.Context, id string) error
- func (s *InMemoryStore[T]) Get(ctx context.Context, id string) (T, error)
- func (s *InMemoryStore[T]) List(ctx context.Context, filter interface{}, filterFn FilterFunc[T], ...) ([]T, error)
- func (s *InMemoryStore[T]) Update(ctx context.Context, id string, item T) error
- type InMemorySubscriptionLineItemStore
- func (s *InMemorySubscriptionLineItemStore) Clear()
- func (s *InMemorySubscriptionLineItemStore) Count(ctx context.Context, filter *types.SubscriptionLineItemFilter) (int, error)
- func (s *InMemorySubscriptionLineItemStore) Create(ctx context.Context, item *subscription.SubscriptionLineItem) error
- func (s *InMemorySubscriptionLineItemStore) CreateBulk(ctx context.Context, items []*subscription.SubscriptionLineItem) error
- func (s *InMemorySubscriptionLineItemStore) Delete(ctx context.Context, id string) error
- func (s *InMemorySubscriptionLineItemStore) Get(ctx context.Context, id string) (*subscription.SubscriptionLineItem, error)
- func (s *InMemorySubscriptionLineItemStore) GetByPlanID(ctx context.Context, planID string) ([]*subscription.SubscriptionLineItem, error)
- func (s *InMemorySubscriptionLineItemStore) GetByPriceID(ctx context.Context, priceID string) ([]*subscription.SubscriptionLineItem, error)
- func (s *InMemorySubscriptionLineItemStore) List(ctx context.Context, filter *types.SubscriptionLineItemFilter) ([]*subscription.SubscriptionLineItem, error)
- func (s *InMemorySubscriptionLineItemStore) ListByCustomer(ctx context.Context, customerID string) ([]*subscription.SubscriptionLineItem, error)
- func (s *InMemorySubscriptionLineItemStore) ListBySubscription(ctx context.Context, sub *subscription.Subscription) ([]*subscription.SubscriptionLineItem, error)
- func (s *InMemorySubscriptionLineItemStore) Update(ctx context.Context, item *subscription.SubscriptionLineItem) error
- type InMemorySubscriptionStore
- func (s *InMemorySubscriptionStore) Clear()
- func (s *InMemorySubscriptionStore) Count(ctx context.Context, filter *types.SubscriptionFilter) (int, error)
- func (s *InMemorySubscriptionStore) Create(ctx context.Context, sub *subscription.Subscription) error
- func (s *InMemorySubscriptionStore) CreatePause(ctx context.Context, pause *subscription.SubscriptionPause) error
- func (s *InMemorySubscriptionStore) CreateWithLineItems(ctx context.Context, sub *subscription.Subscription, ...) error
- func (s *InMemorySubscriptionStore) Delete(ctx context.Context, id string) error
- func (s *InMemorySubscriptionStore) Get(ctx context.Context, id string) (*subscription.Subscription, error)
- func (s *InMemorySubscriptionStore) GetPause(ctx context.Context, id string) (*subscription.SubscriptionPause, error)
- func (s *InMemorySubscriptionStore) GetWithLineItems(ctx context.Context, id string) (*subscription.Subscription, []*subscription.SubscriptionLineItem, error)
- func (s *InMemorySubscriptionStore) GetWithPauses(ctx context.Context, id string) (*subscription.Subscription, []*subscription.SubscriptionPause, error)
- func (s *InMemorySubscriptionStore) List(ctx context.Context, filter *types.SubscriptionFilter) ([]*subscription.Subscription, error)
- func (s *InMemorySubscriptionStore) ListAll(ctx context.Context, filter *types.SubscriptionFilter) ([]*subscription.Subscription, error)
- func (s *InMemorySubscriptionStore) ListAllTenant(ctx context.Context, filter *types.SubscriptionFilter) ([]*subscription.Subscription, error)
- func (s *InMemorySubscriptionStore) ListByCustomerID(ctx context.Context, customerID string) ([]*subscription.Subscription, error)
- func (s *InMemorySubscriptionStore) ListByIDs(ctx context.Context, ids []string) ([]*subscription.Subscription, error)
- func (s *InMemorySubscriptionStore) ListPauses(ctx context.Context, subscriptionID string) ([]*subscription.SubscriptionPause, error)
- func (s *InMemorySubscriptionStore) ListSubscriptionsDueForRenewal(ctx context.Context) ([]*subscription.Subscription, error)
- func (s *InMemorySubscriptionStore) Update(ctx context.Context, sub *subscription.Subscription) error
- func (s *InMemorySubscriptionStore) UpdatePause(ctx context.Context, pause *subscription.SubscriptionPause) error
- type InMemoryTaskStore
- func (s *InMemoryTaskStore) Count(ctx context.Context, filter *types.TaskFilter) (int, error)
- func (s *InMemoryTaskStore) Create(ctx context.Context, t *task.Task) error
- func (s *InMemoryTaskStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryTaskStore) Get(ctx context.Context, id string) (*task.Task, error)
- func (s *InMemoryTaskStore) GetLastExportTask(ctx context.Context, scheduledJobID string) (*task.Task, error)
- func (s *InMemoryTaskStore) List(ctx context.Context, filter *types.TaskFilter) ([]*task.Task, error)
- func (s *InMemoryTaskStore) Update(ctx context.Context, t *task.Task) error
- type InMemoryTaxAppliedStore
- func (s *InMemoryTaxAppliedStore) Clear()
- func (s *InMemoryTaxAppliedStore) Count(ctx context.Context, filter *types.TaxAppliedFilter) (int, error)
- func (s *InMemoryTaxAppliedStore) Create(ctx context.Context, ta *taxapplied.TaxApplied) error
- func (s *InMemoryTaxAppliedStore) Delete(ctx context.Context, id string) error
- func (s *InMemoryTaxAppliedStore) Get(ctx context.Context, id string) (*taxapplied.TaxApplied, error)
- func (s *InMemoryTaxAppliedStore) GetByIdempotencyKey(ctx context.Context, idempotencyKey string) (*taxapplied.TaxApplied, error)
- func (s *InMemoryTaxAppliedStore) List(ctx context.Context, filter *types.TaxAppliedFilter) ([]*taxapplied.TaxApplied, error)
- func (s *InMemoryTaxAppliedStore) Update(ctx context.Context, ta *taxapplied.TaxApplied) error
- type InMemoryTaxAssociationStore
- func (s *InMemoryTaxAssociationStore) Clear()
- func (s *InMemoryTaxAssociationStore) Count(ctx context.Context, filter *types.TaxAssociationFilter) (int, error)
- func (s *InMemoryTaxAssociationStore) Create(ctx context.Context, ta *taxassociation.TaxAssociation) error
- func (s *InMemoryTaxAssociationStore) Delete(ctx context.Context, ta *taxassociation.TaxAssociation) error
- func (s *InMemoryTaxAssociationStore) Get(ctx context.Context, id string) (*taxassociation.TaxAssociation, error)
- func (s *InMemoryTaxAssociationStore) List(ctx context.Context, filter *types.TaxAssociationFilter) ([]*taxassociation.TaxAssociation, error)
- func (s *InMemoryTaxAssociationStore) Update(ctx context.Context, ta *taxassociation.TaxAssociation) error
- type InMemoryTaxRateStore
- func (s *InMemoryTaxRateStore) Clear()
- func (s *InMemoryTaxRateStore) Count(ctx context.Context, filter *types.TaxRateFilter) (int, error)
- func (s *InMemoryTaxRateStore) Create(ctx context.Context, tr *taxrate.TaxRate) error
- func (s *InMemoryTaxRateStore) Delete(ctx context.Context, tr *taxrate.TaxRate) error
- func (s *InMemoryTaxRateStore) Get(ctx context.Context, id string) (*taxrate.TaxRate, error)
- func (s *InMemoryTaxRateStore) GetByCode(ctx context.Context, code string) (*taxrate.TaxRate, error)
- func (s *InMemoryTaxRateStore) List(ctx context.Context, filter *types.TaxRateFilter) ([]*taxrate.TaxRate, error)
- func (s *InMemoryTaxRateStore) ListAll(ctx context.Context, filter *types.TaxRateFilter) ([]*taxrate.TaxRate, error)
- func (s *InMemoryTaxRateStore) Update(ctx context.Context, tr *taxrate.TaxRate) error
- type InMemoryTenantStore
- func (s *InMemoryTenantStore) Clear()
- func (s *InMemoryTenantStore) Create(ctx context.Context, t *tenant.Tenant) error
- func (s *InMemoryTenantStore) GetByID(ctx context.Context, id string) (*tenant.Tenant, error)
- func (s *InMemoryTenantStore) List(ctx context.Context) ([]*tenant.Tenant, error)
- func (s *InMemoryTenantStore) Update(ctx context.Context, t *tenant.Tenant) error
- type InMemoryUserStore
- func (s *InMemoryUserStore) Clear()
- func (r *InMemoryUserStore) Create(ctx context.Context, user *user.User) error
- func (r *InMemoryUserStore) GetByEmail(ctx context.Context, email string) (*user.User, error)
- func (r *InMemoryUserStore) GetByID(ctx context.Context, userID string) (*user.User, error)
- type InMemoryWalletStore
- func (s *InMemoryWalletStore) Clear()
- func (s *InMemoryWalletStore) ConsumeCredits(ctx context.Context, credits []*wallet.Transaction, amount decimal.Decimal) error
- func (s *InMemoryWalletStore) CountWalletTransactions(ctx context.Context, f *types.WalletTransactionFilter) (int, error)
- func (s *InMemoryWalletStore) CreateTransaction(ctx context.Context, tx *wallet.Transaction) error
- func (s *InMemoryWalletStore) CreateWallet(ctx context.Context, w *wallet.Wallet) error
- func (s *InMemoryWalletStore) FindEligibleCredits(ctx context.Context, walletID string, requiredAmount decimal.Decimal, ...) ([]*wallet.Transaction, error)
- func (s *InMemoryWalletStore) GetTransactionByID(ctx context.Context, id string) (*wallet.Transaction, error)
- func (s *InMemoryWalletStore) GetWalletByID(ctx context.Context, id string) (*wallet.Wallet, error)
- func (s *InMemoryWalletStore) GetWalletsByCustomerID(ctx context.Context, customerID string) ([]*wallet.Wallet, error)
- func (s *InMemoryWalletStore) GetWalletsByFilter(ctx context.Context, filter *types.WalletFilter) ([]*wallet.Wallet, error)
- func (s *InMemoryWalletStore) ListAllWalletTransactions(ctx context.Context, f *types.WalletTransactionFilter) ([]*wallet.Transaction, error)
- func (s *InMemoryWalletStore) ListWalletTransactions(ctx context.Context, f *types.WalletTransactionFilter) ([]*wallet.Transaction, error)
- func (s *InMemoryWalletStore) UpdateTransactionStatus(ctx context.Context, id string, status types.TransactionStatus) error
- func (s *InMemoryWalletStore) UpdateWallet(ctx context.Context, id string, w *wallet.Wallet) error
- func (s *InMemoryWalletStore) UpdateWalletBalance(ctx context.Context, walletID string, ...) error
- func (s *InMemoryWalletStore) UpdateWalletStatus(ctx context.Context, id string, status types.WalletStatus) error
- type MockHTTPClient
- func (m *MockHTTPClient) Clear()
- func (m *MockHTTPClient) RegisterCSVResponse(url string, headers []string, records [][]string)
- func (m *MockHTTPClient) RegisterResponse(url string, resp MockResponse)
- func (m *MockHTTPClient) Send(ctx context.Context, req *httpclient.Request) (*httpclient.Response, error)
- type MockPDFGenerator
- type MockPostgresClient
- func (c *MockPostgresClient) Close() error
- func (c *MockPostgresClient) Reader(ctx context.Context) *ent.Client
- func (c *MockPostgresClient) TxFromContext(ctx context.Context) *ent.Tx
- func (c *MockPostgresClient) WithTx(ctx context.Context, fn func(context.Context) error) error
- func (c *MockPostgresClient) Writer(ctx context.Context) *ent.Client
- type MockResponse
- type SortFunc
- type Stores
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckEnvironmentFilter ¶
CheckEnvironmentFilter is a helper function to check if an item matches the environment filter
func CheckTenantFilter ¶ added in v1.0.34
CheckTenantFilter is a helper function to check if an item matches the tenant filter
func NewInMemoryEntityIntegrationMappingStore ¶ added in v1.0.21
func NewInMemoryEntityIntegrationMappingStore() entityintegrationmapping.Repository
NewInMemoryEntityIntegrationMappingStore creates a new in-memory entity integration mapping store
func NewInMemoryEventPublisher ¶
func NewInMemoryEventPublisher(eventStore *InMemoryEventStore) publisher.EventPublisher
NewInMemoryEventPublisher creates a new instance of InMemoryPublisherService
func NewMockPDFGenerator ¶ added in v1.0.0
func NewMockPostgresClient ¶
NewMockPostgresClient creates a new mock postgres client
func SetupContext ¶
Types ¶
type BaseServiceTestSuite ¶
BaseServiceTestSuite provides common functionality for all service test suites
func (*BaseServiceTestSuite) ClearStores ¶
func (s *BaseServiceTestSuite) ClearStores()
func (*BaseServiceTestSuite) GetCalculator ¶ added in v1.0.25
func (s *BaseServiceTestSuite) GetCalculator() proration.Calculator
func (*BaseServiceTestSuite) GetConfig ¶
func (s *BaseServiceTestSuite) GetConfig() *config.Configuration
GetConfig returns the test configuration
func (*BaseServiceTestSuite) GetContext ¶
func (s *BaseServiceTestSuite) GetContext() context.Context
GetContext returns the test context
func (*BaseServiceTestSuite) GetDB ¶
func (s *BaseServiceTestSuite) GetDB() postgres.IClient
GetDB returns the test database client
func (*BaseServiceTestSuite) GetIntegrationFactory ¶ added in v1.0.30
func (s *BaseServiceTestSuite) GetIntegrationFactory() *integration.Factory
GetIntegrationFactory returns the test integration factory
func (*BaseServiceTestSuite) GetLogger ¶
func (s *BaseServiceTestSuite) GetLogger() *logger.Logger
GetLogger returns the test logger
func (*BaseServiceTestSuite) GetNow ¶
func (s *BaseServiceTestSuite) GetNow() time.Time
GetNow returns the current test time
func (*BaseServiceTestSuite) GetPDFGenerator ¶ added in v1.0.0
func (s *BaseServiceTestSuite) GetPDFGenerator() pdf.Generator
GetPDFGenerator returns the test PDF generator
func (*BaseServiceTestSuite) GetPublisher ¶
func (s *BaseServiceTestSuite) GetPublisher() publisher.EventPublisher
GetPublisher returns the test event publisher
func (*BaseServiceTestSuite) GetStores ¶
func (s *BaseServiceTestSuite) GetStores() Stores
GetStores returns all test repositories
func (*BaseServiceTestSuite) GetUUID ¶
func (s *BaseServiceTestSuite) GetUUID() string
GetUUID returns a new UUID string
func (*BaseServiceTestSuite) GetWebhookPublisher ¶
func (s *BaseServiceTestSuite) GetWebhookPublisher() webhookPublisher.WebhookPublisher
GetWebhookPublisher returns the test webhook publisher
func (*BaseServiceTestSuite) SetupSuite ¶
func (s *BaseServiceTestSuite) SetupSuite()
SetupSuite is called once before running the tests in the suite
func (*BaseServiceTestSuite) SetupTest ¶
func (s *BaseServiceTestSuite) SetupTest()
SetupTest is called before each test
func (*BaseServiceTestSuite) TearDownTest ¶
func (s *BaseServiceTestSuite) TearDownTest()
TearDownTest is called after each test
type FilterFunc ¶
FilterFunc is a generic filter function type
type InMemoryAddonAssociationStore ¶ added in v1.0.21
type InMemoryAddonAssociationStore struct {
*InMemoryStore[*addonassociation.AddonAssociation]
}
InMemoryAddonAssociationStore implements addonassociation.Repository
func NewInMemoryAddonAssociationStore ¶ added in v1.0.21
func NewInMemoryAddonAssociationStore() *InMemoryAddonAssociationStore
NewInMemoryAddonAssociationStore creates a new in-memory addon association store
func (*InMemoryAddonAssociationStore) Count ¶ added in v1.0.21
func (s *InMemoryAddonAssociationStore) Count(ctx context.Context, filter *types.AddonAssociationFilter) (int, error)
func (*InMemoryAddonAssociationStore) Create ¶ added in v1.0.21
func (s *InMemoryAddonAssociationStore) Create(ctx context.Context, aa *addonassociation.AddonAssociation) error
func (*InMemoryAddonAssociationStore) Delete ¶ added in v1.0.21
func (s *InMemoryAddonAssociationStore) Delete(ctx context.Context, id string) error
func (*InMemoryAddonAssociationStore) GetByID ¶ added in v1.0.21
func (s *InMemoryAddonAssociationStore) GetByID(ctx context.Context, id string) (*addonassociation.AddonAssociation, error)
func (*InMemoryAddonAssociationStore) List ¶ added in v1.0.21
func (s *InMemoryAddonAssociationStore) List(ctx context.Context, filter *types.AddonAssociationFilter) ([]*addonassociation.AddonAssociation, error)
func (*InMemoryAddonAssociationStore) Update ¶ added in v1.0.21
func (s *InMemoryAddonAssociationStore) Update(ctx context.Context, aa *addonassociation.AddonAssociation) error
type InMemoryAddonStore ¶ added in v1.0.21
type InMemoryAddonStore struct {
*InMemoryStore[*addon.Addon]
}
InMemoryAddonStore implements addon.Repository
func NewInMemoryAddonStore ¶ added in v1.0.21
func NewInMemoryAddonStore() *InMemoryAddonStore
NewInMemoryAddonStore creates a new in-memory addon store
func (*InMemoryAddonStore) Count ¶ added in v1.0.21
func (s *InMemoryAddonStore) Count(ctx context.Context, filter *types.AddonFilter) (int, error)
func (*InMemoryAddonStore) Delete ¶ added in v1.0.21
func (s *InMemoryAddonStore) Delete(ctx context.Context, id string) error
func (*InMemoryAddonStore) GetByLookupKey ¶ added in v1.0.21
func (*InMemoryAddonStore) List ¶ added in v1.0.21
func (s *InMemoryAddonStore) List(ctx context.Context, filter *types.AddonFilter) ([]*addon.Addon, error)
type InMemoryAlertLogsStore ¶ added in v1.0.29
type InMemoryAlertLogsStore struct {
*InMemoryStore[*domainAlertLogs.AlertLog]
}
InMemoryAlertLogsStore implements an in-memory alert logs repository for testing
func NewInMemoryAlertLogsStore ¶ added in v1.0.29
func NewInMemoryAlertLogsStore() *InMemoryAlertLogsStore
NewInMemoryAlertLogsStore creates a new in-memory alert logs store
func (*InMemoryAlertLogsStore) Count ¶ added in v1.0.29
func (s *InMemoryAlertLogsStore) Count(ctx context.Context, filter *types.AlertLogFilter) (int, error)
Count returns the number of alert logs matching the filter
func (*InMemoryAlertLogsStore) Create ¶ added in v1.0.29
func (s *InMemoryAlertLogsStore) Create(ctx context.Context, alertLog *domainAlertLogs.AlertLog) error
Create creates a new alert log
func (*InMemoryAlertLogsStore) Get ¶ added in v1.0.29
func (s *InMemoryAlertLogsStore) Get(ctx context.Context, id string) (*domainAlertLogs.AlertLog, error)
Get retrieves an alert log by ID
func (*InMemoryAlertLogsStore) GetLatestAlert ¶ added in v1.0.32
func (s *InMemoryAlertLogsStore) GetLatestAlert(ctx context.Context, entityType types.AlertEntityType, entityID string, alertType *types.AlertType, parentEntityType *string, parentEntityID *string) (*domainAlertLogs.AlertLog, error)
GetLatestAlert retrieves the latest alert log based on provided filters All parameters except entityType and entityID are optional
func (*InMemoryAlertLogsStore) List ¶ added in v1.0.29
func (s *InMemoryAlertLogsStore) List(ctx context.Context, filter *types.AlertLogFilter) ([]*domainAlertLogs.AlertLog, error)
List retrieves alert logs with filtering and pagination
func (*InMemoryAlertLogsStore) ListByAlertType ¶ added in v1.0.29
func (s *InMemoryAlertLogsStore) ListByAlertType(ctx context.Context, alertType types.AlertType, limit int) ([]*domainAlertLogs.AlertLog, error)
ListByAlertType retrieves alert logs for a specific alert type with limit
func (*InMemoryAlertLogsStore) ListByEntity ¶ added in v1.0.29
func (s *InMemoryAlertLogsStore) ListByEntity(ctx context.Context, entityType types.AlertEntityType, entityID string, limit int) ([]*domainAlertLogs.AlertLog, error)
ListByEntity retrieves alert logs for a specific entity with limit
type InMemoryAuthRepository ¶
type InMemoryAuthRepository struct {
// contains filtered or unexported fields
}
InMemoryAuthRepository is an in-memory implementation of the auth.Repository interface
func NewInMemoryAuthRepository ¶
func NewInMemoryAuthRepository() *InMemoryAuthRepository
NewInMemoryAuthRepository creates a new instance of InMemoryAuthRepository
func (*InMemoryAuthRepository) Clear ¶
func (r *InMemoryAuthRepository) Clear()
Clear clears all auth records from the in-memory store
func (*InMemoryAuthRepository) CreateAuth ¶
CreateAuth creates a new auth record in the in-memory store
func (*InMemoryAuthRepository) DeleteAuth ¶
func (r *InMemoryAuthRepository) DeleteAuth(ctx context.Context, userID string) error
DeleteAuth deletes an auth record by user ID from the in-memory store
func (*InMemoryAuthRepository) GetAuthByUserID ¶
func (r *InMemoryAuthRepository) GetAuthByUserID(ctx context.Context, userID string) (*auth.Auth, error)
GetAuthByUserID retrieves an auth record by user ID from the in-memory store
func (*InMemoryAuthRepository) UpdateAuth ¶
UpdateAuth updates an existing auth record in the in-memory store
type InMemoryConnectionStore ¶ added in v1.0.21
type InMemoryConnectionStore struct {
// contains filtered or unexported fields
}
func NewInMemoryConnectionStore ¶ added in v1.0.21
func NewInMemoryConnectionStore() *InMemoryConnectionStore
func (*InMemoryConnectionStore) Clear ¶ added in v1.0.21
func (s *InMemoryConnectionStore) Clear()
func (*InMemoryConnectionStore) Count ¶ added in v1.0.21
func (s *InMemoryConnectionStore) Count(ctx context.Context, filter *types.ConnectionFilter) (int, error)
func (*InMemoryConnectionStore) CountByFilter ¶ added in v1.0.21
func (s *InMemoryConnectionStore) CountByFilter(ctx context.Context, filter *types.ConnectionFilter) (int, error)
CountByFilter counts connections based on filter
func (*InMemoryConnectionStore) Create ¶ added in v1.0.21
func (s *InMemoryConnectionStore) Create(ctx context.Context, c *connection.Connection) error
func (*InMemoryConnectionStore) Delete ¶ added in v1.0.21
func (s *InMemoryConnectionStore) Delete(ctx context.Context, connection *connection.Connection) error
func (*InMemoryConnectionStore) Get ¶ added in v1.0.21
func (s *InMemoryConnectionStore) Get(ctx context.Context, id string) (*connection.Connection, error)
func (*InMemoryConnectionStore) GetByProvider ¶ added in v1.0.21
func (s *InMemoryConnectionStore) GetByProvider(ctx context.Context, provider types.SecretProvider) (*connection.Connection, error)
func (*InMemoryConnectionStore) List ¶ added in v1.0.21
func (s *InMemoryConnectionStore) List(ctx context.Context, filter *types.ConnectionFilter) ([]*connection.Connection, error)
func (*InMemoryConnectionStore) ListAll ¶ added in v1.0.21
func (s *InMemoryConnectionStore) ListAll(ctx context.Context, filter *types.ConnectionFilter) ([]*connection.Connection, error)
func (*InMemoryConnectionStore) ListByFilter ¶ added in v1.0.21
func (s *InMemoryConnectionStore) ListByFilter(ctx context.Context, filter *types.ConnectionFilter) ([]*connection.Connection, error)
ListByFilter retrieves connections based on filter
func (*InMemoryConnectionStore) Update ¶ added in v1.0.21
func (s *InMemoryConnectionStore) Update(ctx context.Context, c *connection.Connection) error
type InMemoryCouponApplicationStore ¶ added in v1.0.21
type InMemoryCouponApplicationStore struct {
*InMemoryStore[*coupon_application.CouponApplication]
}
InMemoryCouponApplicationStore implements coupon_application.Repository
func NewInMemoryCouponApplicationStore ¶ added in v1.0.21
func NewInMemoryCouponApplicationStore() *InMemoryCouponApplicationStore
NewInMemoryCouponApplicationStore creates a new in-memory coupon application store
func (*InMemoryCouponApplicationStore) CountBySubscriptionAndCoupon ¶ added in v1.0.21
func (*InMemoryCouponApplicationStore) Create ¶ added in v1.0.21
func (s *InMemoryCouponApplicationStore) Create(ctx context.Context, ca *coupon_application.CouponApplication) error
func (*InMemoryCouponApplicationStore) Delete ¶ added in v1.0.21
func (s *InMemoryCouponApplicationStore) Delete(ctx context.Context, id string) error
func (*InMemoryCouponApplicationStore) Get ¶ added in v1.0.21
func (s *InMemoryCouponApplicationStore) Get(ctx context.Context, id string) (*coupon_application.CouponApplication, error)
func (*InMemoryCouponApplicationStore) GetByInvoice ¶ added in v1.0.21
func (s *InMemoryCouponApplicationStore) GetByInvoice(ctx context.Context, invoiceID string) ([]*coupon_application.CouponApplication, error)
func (*InMemoryCouponApplicationStore) GetBySubscription ¶ added in v1.0.21
func (s *InMemoryCouponApplicationStore) GetBySubscription(ctx context.Context, subscriptionID string) ([]*coupon_application.CouponApplication, error)
func (*InMemoryCouponApplicationStore) GetBySubscriptionAndCoupon ¶ added in v1.0.21
func (s *InMemoryCouponApplicationStore) GetBySubscriptionAndCoupon(ctx context.Context, subscriptionID string, couponID string) ([]*coupon_application.CouponApplication, error)
func (*InMemoryCouponApplicationStore) Update ¶ added in v1.0.21
func (s *InMemoryCouponApplicationStore) Update(ctx context.Context, ca *coupon_application.CouponApplication) error
type InMemoryCouponAssociationStore ¶ added in v1.0.21
type InMemoryCouponAssociationStore struct {
*InMemoryStore[*coupon_association.CouponAssociation]
}
InMemoryCouponAssociationStore implements coupon_association.Repository
func NewInMemoryCouponAssociationStore ¶ added in v1.0.21
func NewInMemoryCouponAssociationStore() *InMemoryCouponAssociationStore
NewInMemoryCouponAssociationStore creates a new in-memory coupon association store
func (*InMemoryCouponAssociationStore) Create ¶ added in v1.0.21
func (s *InMemoryCouponAssociationStore) Create(ctx context.Context, ca *coupon_association.CouponAssociation) error
func (*InMemoryCouponAssociationStore) Delete ¶ added in v1.0.21
func (s *InMemoryCouponAssociationStore) Delete(ctx context.Context, id string) error
func (*InMemoryCouponAssociationStore) Get ¶ added in v1.0.21
func (s *InMemoryCouponAssociationStore) Get(ctx context.Context, id string) (*coupon_association.CouponAssociation, error)
func (*InMemoryCouponAssociationStore) GetBySubscription ¶ added in v1.0.21
func (s *InMemoryCouponAssociationStore) GetBySubscription(ctx context.Context, subscriptionID string) ([]*coupon_association.CouponAssociation, error)
func (*InMemoryCouponAssociationStore) GetBySubscriptionForLineItems ¶ added in v1.0.21
func (s *InMemoryCouponAssociationStore) GetBySubscriptionForLineItems(ctx context.Context, subscriptionID string) ([]*coupon_association.CouponAssociation, error)
GetBySubscriptionForLineItems retrieves coupon associations that target specific subscription line items for a given subscription. It excludes invoice-level associations (those without SubscriptionLineItemID).
func (*InMemoryCouponAssociationStore) Update ¶ added in v1.0.21
func (s *InMemoryCouponAssociationStore) Update(ctx context.Context, ca *coupon_association.CouponAssociation) error
type InMemoryCouponStore ¶ added in v1.0.21
type InMemoryCouponStore struct {
*InMemoryStore[*coupon.Coupon]
}
InMemoryCouponStore implements coupon.Repository
func NewInMemoryCouponStore ¶ added in v1.0.21
func NewInMemoryCouponStore() *InMemoryCouponStore
NewInMemoryCouponStore creates a new in-memory coupon store
func (*InMemoryCouponStore) Count ¶ added in v1.0.21
func (s *InMemoryCouponStore) Count(ctx context.Context, filter *types.CouponFilter) (int, error)
func (*InMemoryCouponStore) Delete ¶ added in v1.0.21
func (s *InMemoryCouponStore) Delete(ctx context.Context, id string) error
func (*InMemoryCouponStore) IncrementRedemptions ¶ added in v1.0.21
func (s *InMemoryCouponStore) IncrementRedemptions(ctx context.Context, id string) error
func (*InMemoryCouponStore) List ¶ added in v1.0.21
func (s *InMemoryCouponStore) List(ctx context.Context, filter *types.CouponFilter) ([]*coupon.Coupon, error)
type InMemoryCreditGrantApplicationStore ¶ added in v1.0.18
type InMemoryCreditGrantApplicationStore struct {
*InMemoryStore[*creditgrantapplication.CreditGrantApplication]
}
InMemoryCreditGrantApplicationStore provides an in-memory implementation of creditgrantapplication.Repository for testing
func NewInMemoryCreditGrantApplicationStore ¶ added in v1.0.18
func NewInMemoryCreditGrantApplicationStore() *InMemoryCreditGrantApplicationStore
NewInMemoryCreditGrantApplicationStore creates a new in-memory credit grant application store
func (*InMemoryCreditGrantApplicationStore) Clear ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) Clear()
Clear removes all credit grant applications from the store
func (*InMemoryCreditGrantApplicationStore) Count ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) Count(ctx context.Context, filter *types.CreditGrantApplicationFilter) (int, error)
Count counts credit grant applications based on filter
func (*InMemoryCreditGrantApplicationStore) Create ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) Create(ctx context.Context, cga *creditgrantapplication.CreditGrantApplication) error
Create creates a new credit grant application
func (*InMemoryCreditGrantApplicationStore) Delete ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) Delete(ctx context.Context, cga *creditgrantapplication.CreditGrantApplication) error
Delete deletes a credit grant application
func (*InMemoryCreditGrantApplicationStore) FindAllScheduledApplications ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) FindAllScheduledApplications(ctx context.Context) ([]*creditgrantapplication.CreditGrantApplication, error)
FindAllScheduledApplications retrieves all scheduled applications
func (*InMemoryCreditGrantApplicationStore) FindByIdempotencyKey ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) FindByIdempotencyKey(ctx context.Context, idempotencyKey string) (*creditgrantapplication.CreditGrantApplication, error)
FindByIdempotencyKey finds a credit grant application by idempotency key
func (*InMemoryCreditGrantApplicationStore) Get ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) Get(ctx context.Context, id string) (*creditgrantapplication.CreditGrantApplication, error)
Get retrieves a credit grant application by ID
func (*InMemoryCreditGrantApplicationStore) List ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) List(ctx context.Context, filter *types.CreditGrantApplicationFilter) ([]*creditgrantapplication.CreditGrantApplication, error)
List retrieves credit grant applications based on filter
func (*InMemoryCreditGrantApplicationStore) ListAll ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) ListAll(ctx context.Context, filter *types.CreditGrantApplicationFilter) ([]*creditgrantapplication.CreditGrantApplication, error)
ListAll retrieves all credit grant applications based on filter without pagination
func (*InMemoryCreditGrantApplicationStore) Update ¶ added in v1.0.18
func (s *InMemoryCreditGrantApplicationStore) Update(ctx context.Context, cga *creditgrantapplication.CreditGrantApplication) error
Update updates an existing credit grant application
type InMemoryCreditGrantStore ¶ added in v1.0.18
type InMemoryCreditGrantStore struct {
*InMemoryStore[*creditgrant.CreditGrant]
}
InMemoryCreditGrantStore provides an in-memory implementation of creditgrant.Repository for testing
func NewInMemoryCreditGrantStore ¶ added in v1.0.18
func NewInMemoryCreditGrantStore() *InMemoryCreditGrantStore
NewInMemoryCreditGrantStore creates a new in-memory credit grant store
func (*InMemoryCreditGrantStore) Clear ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) Clear()
Clear removes all credit grants from the store
func (*InMemoryCreditGrantStore) Count ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) Count(ctx context.Context, filter *types.CreditGrantFilter) (int, error)
Count counts credit grants based on filter
func (*InMemoryCreditGrantStore) Create ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) Create(ctx context.Context, cg *creditgrant.CreditGrant) (*creditgrant.CreditGrant, error)
Create creates a new credit grant
func (*InMemoryCreditGrantStore) CreateBulk ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) CreateBulk(ctx context.Context, creditGrants []*creditgrant.CreditGrant) ([]*creditgrant.CreditGrant, error)
CreateBulk creates multiple credit grants
func (*InMemoryCreditGrantStore) Delete ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) Delete(ctx context.Context, id string) error
Delete deletes a credit grant by ID (soft delete by setting status to archived)
func (*InMemoryCreditGrantStore) DeleteBulk ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) DeleteBulk(ctx context.Context, ids []string) error
DeleteBulk deletes multiple credit grants by IDs (soft delete by setting status to archived)
func (*InMemoryCreditGrantStore) Get ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) Get(ctx context.Context, id string) (*creditgrant.CreditGrant, error)
Get retrieves a credit grant by ID
func (*InMemoryCreditGrantStore) GetByPlan ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) GetByPlan(ctx context.Context, planID string) ([]*creditgrant.CreditGrant, error)
GetByPlan retrieves credit grants for a specific plan
func (*InMemoryCreditGrantStore) GetBySubscription ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) GetBySubscription(ctx context.Context, subscriptionID string) ([]*creditgrant.CreditGrant, error)
GetBySubscription retrieves credit grants for a specific subscription
func (*InMemoryCreditGrantStore) List ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) List(ctx context.Context, filter *types.CreditGrantFilter) ([]*creditgrant.CreditGrant, error)
List retrieves credit grants based on filter
func (*InMemoryCreditGrantStore) ListAll ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) ListAll(ctx context.Context, filter *types.CreditGrantFilter) ([]*creditgrant.CreditGrant, error)
ListAll retrieves all credit grants based on filter without pagination
func (*InMemoryCreditGrantStore) Update ¶ added in v1.0.18
func (s *InMemoryCreditGrantStore) Update(ctx context.Context, cg *creditgrant.CreditGrant) (*creditgrant.CreditGrant, error)
Update updates an existing credit grant
type InMemoryCreditNoteLineItemStore ¶ added in v1.0.18
type InMemoryCreditNoteLineItemStore struct {
*InMemoryStore[*creditnote.CreditNoteLineItem]
}
InMemoryCreditNoteLineItemStore implements the credit note line item repository interface for testing
func NewInMemoryCreditNoteLineItemStore ¶ added in v1.0.18
func NewInMemoryCreditNoteLineItemStore() *InMemoryCreditNoteLineItemStore
NewInMemoryCreditNoteLineItemStore creates a new in-memory credit note line item store
func (*InMemoryCreditNoteLineItemStore) Count ¶ added in v1.0.18
func (s *InMemoryCreditNoteLineItemStore) Count(ctx context.Context, filter *types.CreditNoteLineItemFilter) (int, error)
func (*InMemoryCreditNoteLineItemStore) Create ¶ added in v1.0.18
func (s *InMemoryCreditNoteLineItemStore) Create(ctx context.Context, item *creditnote.CreditNoteLineItem) error
func (*InMemoryCreditNoteLineItemStore) CreateBulk ¶ added in v1.0.18
func (s *InMemoryCreditNoteLineItemStore) CreateBulk(ctx context.Context, lineItems []*creditnote.CreditNoteLineItem) error
func (*InMemoryCreditNoteLineItemStore) Delete ¶ added in v1.0.18
func (s *InMemoryCreditNoteLineItemStore) Delete(ctx context.Context, id string) error
func (*InMemoryCreditNoteLineItemStore) Get ¶ added in v1.0.18
func (s *InMemoryCreditNoteLineItemStore) Get(ctx context.Context, id string) (*creditnote.CreditNoteLineItem, error)
func (*InMemoryCreditNoteLineItemStore) List ¶ added in v1.0.18
func (s *InMemoryCreditNoteLineItemStore) List(ctx context.Context, filter *types.CreditNoteLineItemFilter) ([]*creditnote.CreditNoteLineItem, error)
func (*InMemoryCreditNoteLineItemStore) ListByCreditNote ¶ added in v1.0.18
func (s *InMemoryCreditNoteLineItemStore) ListByCreditNote(ctx context.Context, creditNoteID string) ([]*creditnote.CreditNoteLineItem, error)
func (*InMemoryCreditNoteLineItemStore) ListByInvoiceLineItem ¶ added in v1.0.18
func (s *InMemoryCreditNoteLineItemStore) ListByInvoiceLineItem(ctx context.Context, invoiceLineItemID string) ([]*creditnote.CreditNoteLineItem, error)
func (*InMemoryCreditNoteLineItemStore) Update ¶ added in v1.0.18
func (s *InMemoryCreditNoteLineItemStore) Update(ctx context.Context, item *creditnote.CreditNoteLineItem) error
type InMemoryCreditNoteStore ¶ added in v1.0.18
type InMemoryCreditNoteStore struct {
*InMemoryStore[*creditnote.CreditNote]
// contains filtered or unexported fields
}
InMemoryCreditNoteStore implements the creditnote.Repository interface for testing
func NewInMemoryCreditNoteStore ¶ added in v1.0.18
func NewInMemoryCreditNoteStore() *InMemoryCreditNoteStore
NewInMemoryCreditNoteStore creates a new in-memory credit note store
func (*InMemoryCreditNoteStore) AddLineItems ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) AddLineItems(ctx context.Context, creditNoteID string, items []*creditnote.CreditNoteLineItem) error
AddLineItems adds line items to a credit note
func (*InMemoryCreditNoteStore) Clear ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) Clear()
Clear removes all credit notes from the store
func (*InMemoryCreditNoteStore) Count ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) Count(ctx context.Context, filter *types.CreditNoteFilter) (int, error)
Count returns the total count of credit notes based on the filter
func (*InMemoryCreditNoteStore) Create ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) Create(ctx context.Context, cn *creditnote.CreditNote) error
Create creates a new credit note
func (*InMemoryCreditNoteStore) CreateWithLineItems ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) CreateWithLineItems(ctx context.Context, cn *creditnote.CreditNote) error
CreateWithLineItems creates a credit note with its line items
func (*InMemoryCreditNoteStore) Delete ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) Delete(ctx context.Context, id string) error
Delete marks a credit note as deleted
func (*InMemoryCreditNoteStore) Get ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) Get(ctx context.Context, id string) (*creditnote.CreditNote, error)
Get retrieves a credit note by ID
func (*InMemoryCreditNoteStore) GetByIdempotencyKey ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) GetByIdempotencyKey(ctx context.Context, key string) (*creditnote.CreditNote, error)
GetByIdempotencyKey retrieves a credit note by idempotency key
func (*InMemoryCreditNoteStore) List ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) List(ctx context.Context, filter *types.CreditNoteFilter) ([]*creditnote.CreditNote, error)
List returns a list of credit notes based on the filter
func (*InMemoryCreditNoteStore) RemoveLineItems ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) RemoveLineItems(ctx context.Context, creditNoteID string, itemIDs []string) error
RemoveLineItems removes line items from a credit note
func (*InMemoryCreditNoteStore) Update ¶ added in v1.0.18
func (s *InMemoryCreditNoteStore) Update(ctx context.Context, cn *creditnote.CreditNote) error
Update updates a credit note
type InMemoryCustomerStore ¶
type InMemoryCustomerStore struct {
*InMemoryStore[*customer.Customer]
}
InMemoryCustomerStore implements customer.Repository
func NewInMemoryCustomerStore ¶
func NewInMemoryCustomerStore() *InMemoryCustomerStore
NewInMemoryCustomerStore creates a new in-memory customer store
func (*InMemoryCustomerStore) Count ¶
func (s *InMemoryCustomerStore) Count(ctx context.Context, filter *types.CustomerFilter) (int, error)
func (*InMemoryCustomerStore) CountByFilter ¶ added in v1.0.17
func (s *InMemoryCustomerStore) CountByFilter(ctx context.Context, filter *types.CustomerFilter) (int, error)
CountByFilter counts customers based on filter
func (*InMemoryCustomerStore) GetByLookupKey ¶
func (*InMemoryCustomerStore) List ¶
func (s *InMemoryCustomerStore) List(ctx context.Context, filter *types.CustomerFilter) ([]*customer.Customer, error)
func (*InMemoryCustomerStore) ListAll ¶
func (s *InMemoryCustomerStore) ListAll(ctx context.Context, filter *types.CustomerFilter) ([]*customer.Customer, error)
func (*InMemoryCustomerStore) ListByFilter ¶ added in v1.0.17
func (s *InMemoryCustomerStore) ListByFilter(ctx context.Context, filter *types.CustomerFilter) ([]*customer.Customer, error)
ListByFilter retrieves customers based on filter
type InMemoryEntitlementStore ¶
type InMemoryEntitlementStore struct {
*InMemoryStore[*entitlement.Entitlement]
}
InMemoryEntitlementStore implements entitlement.Repository
func NewInMemoryEntitlementStore ¶
func NewInMemoryEntitlementStore() *InMemoryEntitlementStore
NewInMemoryEntitlementStore creates a new in-memory entitlement store
func (*InMemoryEntitlementStore) Clear ¶
func (s *InMemoryEntitlementStore) Clear()
Clear clears the entitlement store
func (*InMemoryEntitlementStore) Count ¶
func (s *InMemoryEntitlementStore) Count(ctx context.Context, filter *types.EntitlementFilter) (int, error)
func (*InMemoryEntitlementStore) Create ¶
func (s *InMemoryEntitlementStore) Create(ctx context.Context, e *entitlement.Entitlement) (*entitlement.Entitlement, error)
func (*InMemoryEntitlementStore) CreateBulk ¶
func (s *InMemoryEntitlementStore) CreateBulk(ctx context.Context, entitlements []*entitlement.Entitlement) ([]*entitlement.Entitlement, error)
func (*InMemoryEntitlementStore) Delete ¶
func (s *InMemoryEntitlementStore) Delete(ctx context.Context, id string) error
func (*InMemoryEntitlementStore) DeleteBulk ¶
func (s *InMemoryEntitlementStore) DeleteBulk(ctx context.Context, ids []string) error
func (*InMemoryEntitlementStore) Get ¶
func (s *InMemoryEntitlementStore) Get(ctx context.Context, id string) (*entitlement.Entitlement, error)
func (*InMemoryEntitlementStore) List ¶
func (s *InMemoryEntitlementStore) List(ctx context.Context, filter *types.EntitlementFilter) ([]*entitlement.Entitlement, error)
func (*InMemoryEntitlementStore) ListByAddonIDs ¶ added in v1.0.21
func (s *InMemoryEntitlementStore) ListByAddonIDs(ctx context.Context, addonIDs []string) ([]*entitlement.Entitlement, error)
ListByAddonIDs retrieves all entitlements for the given addon IDs
func (*InMemoryEntitlementStore) ListByFeatureIDs ¶ added in v1.0.0
func (s *InMemoryEntitlementStore) ListByFeatureIDs(ctx context.Context, featureIDs []string) ([]*entitlement.Entitlement, error)
ListByFeatureIDs retrieves all entitlements for the given feature IDs
func (*InMemoryEntitlementStore) ListByPlanIDs ¶ added in v1.0.0
func (s *InMemoryEntitlementStore) ListByPlanIDs(ctx context.Context, planIDs []string) ([]*entitlement.Entitlement, error)
ListByPlanIDs retrieves all entitlements for the given plan IDs
func (*InMemoryEntitlementStore) Update ¶
func (s *InMemoryEntitlementStore) Update(ctx context.Context, e *entitlement.Entitlement) (*entitlement.Entitlement, error)
type InMemoryEntityIntegrationMappingStore ¶ added in v1.0.21
type InMemoryEntityIntegrationMappingStore struct {
*InMemoryStore[*entityintegrationmapping.EntityIntegrationMapping]
}
InMemoryEntityIntegrationMappingStore implements entityintegrationmapping.Repository for testing
func (*InMemoryEntityIntegrationMappingStore) Count ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) Count(ctx context.Context, filter *types.EntityIntegrationMappingFilter) (int, error)
Count counts entity integration mappings based on filter
func (*InMemoryEntityIntegrationMappingStore) CountByFilter ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) CountByFilter(ctx context.Context, filter *types.EntityIntegrationMappingFilter) (int, error)
CountByFilter counts entity integration mappings based on filter
func (*InMemoryEntityIntegrationMappingStore) Create ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) Create(ctx context.Context, mapping *entityintegrationmapping.EntityIntegrationMapping) error
Create adds a new entity integration mapping to the store
func (*InMemoryEntityIntegrationMappingStore) Delete ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) Delete(ctx context.Context, mapping *entityintegrationmapping.EntityIntegrationMapping) error
Delete removes an entity integration mapping
func (*InMemoryEntityIntegrationMappingStore) Get ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) Get(ctx context.Context, id string) (*entityintegrationmapping.EntityIntegrationMapping, error)
Get retrieves an entity integration mapping by ID
func (*InMemoryEntityIntegrationMappingStore) GetByEntityAndProvider ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) GetByEntityAndProvider(ctx context.Context, entityID string, entityType types.IntegrationEntityType, providerType string) (*entityintegrationmapping.EntityIntegrationMapping, error)
GetByEntityAndProvider retrieves an entity integration mapping by entity and provider
func (*InMemoryEntityIntegrationMappingStore) GetByProviderEntity ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) GetByProviderEntity(ctx context.Context, providerType, providerEntityID string) (*entityintegrationmapping.EntityIntegrationMapping, error)
GetByProviderEntity retrieves an entity integration mapping by provider entity
func (*InMemoryEntityIntegrationMappingStore) List ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) List(ctx context.Context, filter *types.EntityIntegrationMappingFilter) ([]*entityintegrationmapping.EntityIntegrationMapping, error)
List retrieves entity integration mappings based on filter
func (*InMemoryEntityIntegrationMappingStore) ListByEntity ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) ListByEntity(ctx context.Context, entityID string, entityType types.IntegrationEntityType) ([]*entityintegrationmapping.EntityIntegrationMapping, error)
ListByEntity retrieves entity integration mappings by entity
func (*InMemoryEntityIntegrationMappingStore) ListByFilter ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) ListByFilter(ctx context.Context, filter *types.EntityIntegrationMappingFilter) ([]*entityintegrationmapping.EntityIntegrationMapping, error)
ListByFilter retrieves entity integration mappings based on filter
func (*InMemoryEntityIntegrationMappingStore) ListByProvider ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) ListByProvider(ctx context.Context, providerType string) ([]*entityintegrationmapping.EntityIntegrationMapping, error)
ListByProvider retrieves entity integration mappings by provider
func (*InMemoryEntityIntegrationMappingStore) Update ¶ added in v1.0.21
func (s *InMemoryEntityIntegrationMappingStore) Update(ctx context.Context, mapping *entityintegrationmapping.EntityIntegrationMapping) error
Update updates an entity integration mapping
type InMemoryEnvironmentStore ¶
type InMemoryEnvironmentStore struct {
// contains filtered or unexported fields
}
func NewInMemoryEnvironmentStore ¶
func NewInMemoryEnvironmentStore() *InMemoryEnvironmentStore
func (*InMemoryEnvironmentStore) Clear ¶
func (s *InMemoryEnvironmentStore) Clear()
func (*InMemoryEnvironmentStore) Create ¶
func (s *InMemoryEnvironmentStore) Create(ctx context.Context, env *environment.Environment) error
func (*InMemoryEnvironmentStore) Get ¶
func (s *InMemoryEnvironmentStore) Get(ctx context.Context, id string) (*environment.Environment, error)
func (*InMemoryEnvironmentStore) List ¶
func (s *InMemoryEnvironmentStore) List(ctx context.Context, filter types.Filter) ([]*environment.Environment, error)
func (*InMemoryEnvironmentStore) Update ¶
func (s *InMemoryEnvironmentStore) Update(ctx context.Context, env *environment.Environment) error
type InMemoryEventStore ¶
type InMemoryEventStore struct {
// contains filtered or unexported fields
}
func NewInMemoryEventStore ¶
func NewInMemoryEventStore() *InMemoryEventStore
func (*InMemoryEventStore) BulkInsertEvents ¶ added in v1.0.0
func (*InMemoryEventStore) Clear ¶
func (s *InMemoryEventStore) Clear()
func (*InMemoryEventStore) FindUnprocessedEvents ¶ added in v1.0.17
func (s *InMemoryEventStore) FindUnprocessedEvents(ctx context.Context, params *events.FindUnprocessedEventsParams) ([]*events.Event, error)
func (*InMemoryEventStore) GetDistinctEventNames ¶ added in v1.0.22
func (*InMemoryEventStore) GetEvents ¶
func (s *InMemoryEventStore) GetEvents(ctx context.Context, params *events.GetEventsParams) ([]*events.Event, uint64, error)
func (*InMemoryEventStore) GetUsage ¶
func (s *InMemoryEventStore) GetUsage(ctx context.Context, params *events.UsageParams) (*events.AggregationResult, error)
func (*InMemoryEventStore) GetUsageWithFilters ¶
func (s *InMemoryEventStore) GetUsageWithFilters(ctx context.Context, params *events.UsageWithFiltersParams) ([]*events.AggregationResult, error)
func (*InMemoryEventStore) HasEvent ¶
func (s *InMemoryEventStore) HasEvent(id string) bool
func (*InMemoryEventStore) InsertEvent ¶
type InMemoryFeatureStore ¶
type InMemoryFeatureStore struct {
*InMemoryStore[*feature.Feature]
}
InMemoryFeatureStore implements feature.Repository
func NewInMemoryFeatureStore ¶
func NewInMemoryFeatureStore() *InMemoryFeatureStore
NewInMemoryFeatureStore creates a new in-memory feature store
func (*InMemoryFeatureStore) Clear ¶
func (s *InMemoryFeatureStore) Clear()
Clear clears the feature store
func (*InMemoryFeatureStore) Count ¶
func (s *InMemoryFeatureStore) Count(ctx context.Context, filter *types.FeatureFilter) (int, error)
func (*InMemoryFeatureStore) CreateBulk ¶
func (*InMemoryFeatureStore) Delete ¶
func (s *InMemoryFeatureStore) Delete(ctx context.Context, id string) error
func (*InMemoryFeatureStore) DeleteBulk ¶
func (s *InMemoryFeatureStore) DeleteBulk(ctx context.Context, ids []string) error
func (*InMemoryFeatureStore) List ¶
func (s *InMemoryFeatureStore) List(ctx context.Context, filter *types.FeatureFilter) ([]*feature.Feature, error)
func (*InMemoryFeatureStore) ListAll ¶
func (s *InMemoryFeatureStore) ListAll(ctx context.Context, filter *types.FeatureFilter) ([]*feature.Feature, error)
ListAll returns all features without pagination
type InMemoryInvoiceStore ¶
type InMemoryInvoiceStore struct {
*InMemoryStore[*invoice.Invoice]
}
InMemoryInvoiceStore implements invoice.Repository
func NewInMemoryInvoiceStore ¶
func NewInMemoryInvoiceStore() *InMemoryInvoiceStore
NewInMemoryInvoiceStore creates a new in-memory invoice store
func (*InMemoryInvoiceStore) AddLineItems ¶
func (s *InMemoryInvoiceStore) AddLineItems(ctx context.Context, invoiceID string, items []*invoice.InvoiceLineItem) error
func (*InMemoryInvoiceStore) Clear ¶ added in v1.0.25
func (s *InMemoryInvoiceStore) Clear()
Clear removes all invoices from the store
func (*InMemoryInvoiceStore) Count ¶
func (s *InMemoryInvoiceStore) Count(ctx context.Context, filter *types.InvoiceFilter) (int, error)
func (*InMemoryInvoiceStore) CreateWithLineItems ¶
func (*InMemoryInvoiceStore) Delete ¶
func (s *InMemoryInvoiceStore) Delete(ctx context.Context, id string) error
func (*InMemoryInvoiceStore) ExistsForPeriod ¶
func (*InMemoryInvoiceStore) GetByIdempotencyKey ¶
func (*InMemoryInvoiceStore) GetInvoicesForExport ¶ added in v1.0.32
func (*InMemoryInvoiceStore) GetNextBillingSequence ¶
func (*InMemoryInvoiceStore) GetNextInvoiceNumber ¶
func (s *InMemoryInvoiceStore) GetNextInvoiceNumber(ctx context.Context, invoiceConfig *types.InvoiceConfig) (string, error)
func (*InMemoryInvoiceStore) List ¶
func (s *InMemoryInvoiceStore) List(ctx context.Context, filter *types.InvoiceFilter) ([]*invoice.Invoice, error)
func (*InMemoryInvoiceStore) RemoveLineItems ¶
type InMemoryKafka ¶
type InMemoryKafka struct {
// contains filtered or unexported fields
}
func NewInMemoryKafka ¶
func NewInMemoryKafka() *InMemoryKafka
func (*InMemoryKafka) Close ¶
func (b *InMemoryKafka) Close() error
func (*InMemoryKafka) HasMessage ¶
func (b *InMemoryKafka) HasMessage(topic, id string) bool
func (*InMemoryKafka) Subscribe ¶
func (b *InMemoryKafka) Subscribe() chan *message.Message
type InMemoryMeterStore ¶
type InMemoryMeterStore struct {
*InMemoryStore[*meter.Meter]
}
InMemoryMeterStore implements meter.Repository
func NewInMemoryMeterStore ¶
func NewInMemoryMeterStore() *InMemoryMeterStore
NewInMemoryMeterStore creates a new in-memory meter store
func (*InMemoryMeterStore) Count ¶
func (s *InMemoryMeterStore) Count(ctx context.Context, filter *types.MeterFilter) (int, error)
func (*InMemoryMeterStore) CreateMeter ¶
func (*InMemoryMeterStore) DisableMeter ¶
func (s *InMemoryMeterStore) DisableMeter(ctx context.Context, id string) error
func (*InMemoryMeterStore) List ¶
func (s *InMemoryMeterStore) List(ctx context.Context, filter *types.MeterFilter) ([]*meter.Meter, error)
func (*InMemoryMeterStore) ListAll ¶
func (s *InMemoryMeterStore) ListAll(ctx context.Context, filter *types.MeterFilter) ([]*meter.Meter, error)
func (*InMemoryMeterStore) UpdateMeter ¶
type InMemoryPaymentStore ¶ added in v1.0.0
type InMemoryPaymentStore struct {
*InMemoryStore[*payment.Payment]
// contains filtered or unexported fields
}
InMemoryPaymentStore implements payment.Repository
func NewInMemoryPaymentStore ¶ added in v1.0.0
func NewInMemoryPaymentStore() *InMemoryPaymentStore
NewInMemoryPaymentStore creates a new in-memory payment repository
func (*InMemoryPaymentStore) Clear ¶ added in v1.0.0
func (m *InMemoryPaymentStore) Clear()
Clear resets all stored data
func (*InMemoryPaymentStore) Count ¶ added in v1.0.0
func (m *InMemoryPaymentStore) Count(ctx context.Context, filter *types.PaymentFilter) (int, error)
Count returns the number of payments matching the filter
func (*InMemoryPaymentStore) CreateAttempt ¶ added in v1.0.0
func (m *InMemoryPaymentStore) CreateAttempt(ctx context.Context, attempt *payment.PaymentAttempt) error
CreateAttempt creates a new payment attempt
func (*InMemoryPaymentStore) Delete ¶ added in v1.0.0
func (m *InMemoryPaymentStore) Delete(ctx context.Context, id string) error
Delete removes a payment
func (*InMemoryPaymentStore) GetAttempt ¶ added in v1.0.0
func (m *InMemoryPaymentStore) GetAttempt(ctx context.Context, id string) (*payment.PaymentAttempt, error)
GetAttempt retrieves a payment attempt by ID
func (*InMemoryPaymentStore) GetByIdempotencyKey ¶ added in v1.0.0
func (m *InMemoryPaymentStore) GetByIdempotencyKey(ctx context.Context, key string) (*payment.Payment, error)
GetByIdempotencyKey retrieves a payment by idempotency key
func (*InMemoryPaymentStore) GetCreatedPayments ¶ added in v1.0.0
func (m *InMemoryPaymentStore) GetCreatedPayments() []*payment.Payment
GetCreatedPayments returns all payments that were created, in order of creation This is a helper method for testing
func (*InMemoryPaymentStore) GetLatestAttempt ¶ added in v1.0.0
func (m *InMemoryPaymentStore) GetLatestAttempt(ctx context.Context, paymentID string) (*payment.PaymentAttempt, error)
GetLatestAttempt retrieves the latest attempt for a payment
func (*InMemoryPaymentStore) GetPaymentsForDestination ¶ added in v1.0.0
func (m *InMemoryPaymentStore) GetPaymentsForDestination(ctx context.Context, destinationType types.PaymentDestinationType, destinationID string) ([]*payment.Payment, error)
GetPaymentsForDestination returns payments for a specific destination
func (*InMemoryPaymentStore) List ¶ added in v1.0.0
func (m *InMemoryPaymentStore) List(ctx context.Context, filter *types.PaymentFilter) ([]*payment.Payment, error)
List returns a list of payments based on the filter
func (*InMemoryPaymentStore) ListAttempts ¶ added in v1.0.0
func (m *InMemoryPaymentStore) ListAttempts(ctx context.Context, paymentID string) ([]*payment.PaymentAttempt, error)
ListAttempts returns a list of payment attempts for a payment
func (*InMemoryPaymentStore) UpdateAttempt ¶ added in v1.0.0
func (m *InMemoryPaymentStore) UpdateAttempt(ctx context.Context, attempt *payment.PaymentAttempt) error
UpdateAttempt updates an existing payment attempt
type InMemoryPlanStore ¶
type InMemoryPlanStore struct {
*InMemoryStore[*plan.Plan]
}
InMemoryPlanStore implements plan.Repository
func NewInMemoryPlanStore ¶
func NewInMemoryPlanStore() *InMemoryPlanStore
NewInMemoryPlanStore creates a new in-memory plan store
func (*InMemoryPlanStore) Count ¶
func (s *InMemoryPlanStore) Count(ctx context.Context, filter *types.PlanFilter) (int, error)
func (*InMemoryPlanStore) GetByLookupKey ¶
func (s *InMemoryPlanStore) GetByLookupKey(ctx context.Context, lookupKey string) (*plan.Plan, error)
GetByLookupKey retrieves a plan by its lookup key
func (*InMemoryPlanStore) List ¶
func (s *InMemoryPlanStore) List(ctx context.Context, filter *types.PlanFilter) ([]*plan.Plan, error)
func (*InMemoryPlanStore) ListAll ¶
func (s *InMemoryPlanStore) ListAll(ctx context.Context, filter *types.PlanFilter) ([]*plan.Plan, error)
ListAll returns all plans without pagination
type InMemoryPriceStore ¶
type InMemoryPriceStore struct {
*InMemoryStore[*price.Price]
}
InMemoryPriceStore implements price.Repository
func NewInMemoryPriceStore ¶
func NewInMemoryPriceStore() *InMemoryPriceStore
func (*InMemoryPriceStore) Clear ¶
func (s *InMemoryPriceStore) Clear()
Clear clears the price store
func (*InMemoryPriceStore) ClearByGroupID ¶ added in v1.0.34
func (s *InMemoryPriceStore) ClearByGroupID(ctx context.Context, groupID string) error
ClearByGroupID clears the group ID for all prices in a specific group
func (*InMemoryPriceStore) ClearGroupIDsBulk ¶ added in v1.0.34
func (s *InMemoryPriceStore) ClearGroupIDsBulk(ctx context.Context, ids []string) error
ClearGroupIDsBulk clears the group ID for multiple prices
func (*InMemoryPriceStore) Count ¶
func (s *InMemoryPriceStore) Count(ctx context.Context, filter *types.PriceFilter) (int, error)
func (*InMemoryPriceStore) CreateBulk ¶
CreateBulk creates multiple prices in bulk
func (*InMemoryPriceStore) Delete ¶
func (s *InMemoryPriceStore) Delete(ctx context.Context, id string) error
func (*InMemoryPriceStore) DeleteBulk ¶
func (s *InMemoryPriceStore) DeleteBulk(ctx context.Context, ids []string) error
DeleteBulk deletes multiple prices in bulk
func (*InMemoryPriceStore) GetByGroupIDs ¶ added in v1.0.34
func (*InMemoryPriceStore) GetByPlanID ¶ added in v1.0.25
func (*InMemoryPriceStore) List ¶
func (s *InMemoryPriceStore) List(ctx context.Context, filter *types.PriceFilter) ([]*price.Price, error)
func (*InMemoryPriceStore) ListAll ¶
func (s *InMemoryPriceStore) ListAll(ctx context.Context, filter *types.PriceFilter) ([]*price.Price, error)
ListAll returns all prices without pagination
type InMemoryPriceUnitStore ¶ added in v1.0.21
type InMemoryPriceUnitStore struct {
*InMemoryStore[*priceunit.PriceUnit]
}
InMemoryPriceUnitStore implements priceunit.Repository
func NewInMemoryPriceUnitStore ¶ added in v1.0.21
func NewInMemoryPriceUnitStore() *InMemoryPriceUnitStore
func (*InMemoryPriceUnitStore) ConvertToBaseCurrency ¶ added in v1.0.21
func (*InMemoryPriceUnitStore) ConvertToPriceUnit ¶ added in v1.0.21
func (*InMemoryPriceUnitStore) Count ¶ added in v1.0.21
func (s *InMemoryPriceUnitStore) Count(ctx context.Context, filter *priceunit.PriceUnitFilter) (int, error)
func (*InMemoryPriceUnitStore) Delete ¶ added in v1.0.21
func (s *InMemoryPriceUnitStore) Delete(ctx context.Context, id string) error
func (*InMemoryPriceUnitStore) ExistsByCode ¶ added in v1.0.32
func (*InMemoryPriceUnitStore) IsUsedByPrices ¶ added in v1.0.32
func (*InMemoryPriceUnitStore) List ¶ added in v1.0.21
func (s *InMemoryPriceUnitStore) List(ctx context.Context, filter *priceunit.PriceUnitFilter) ([]*priceunit.PriceUnit, error)
type InMemoryPubSub ¶
type InMemoryPubSub struct {
// contains filtered or unexported fields
}
InMemoryPubSub is an in-memory implementation of pubsub.PubSub interface
func NewInMemoryPubSub ¶
func NewInMemoryPubSub() *InMemoryPubSub
NewInMemoryPubSub creates a new instance of InMemoryPubSub
func (*InMemoryPubSub) ClearMessages ¶
func (ps *InMemoryPubSub) ClearMessages()
ClearMessages clears all stored messages
func (*InMemoryPubSub) Close ¶
func (ps *InMemoryPubSub) Close() error
Close implements pubsub.PubSub interface
func (*InMemoryPubSub) GetMessages ¶
func (ps *InMemoryPubSub) GetMessages(topic string) []*message.Message
GetMessages returns all messages published to a topic
type InMemoryPublisherService ¶
type InMemoryPublisherService struct {
// contains filtered or unexported fields
}
InMemoryPublisherService provides an in-memory implementation of publisher.Service for testing
func (*InMemoryPublisherService) Clear ¶
func (p *InMemoryPublisherService) Clear()
Clear removes all published events and messages
func (*InMemoryPublisherService) GetEvents ¶
func (p *InMemoryPublisherService) GetEvents() []*events.Event
GetEvents returns all published events
func (*InMemoryPublisherService) HasEvent ¶
func (p *InMemoryPublisherService) HasEvent(id string) bool
HasEvent checks if an event with the given ID exists in publisher's memory
func (*InMemoryPublisherService) HasMessage ¶
func (p *InMemoryPublisherService) HasMessage(topic, id string) bool
HasMessage checks if a message with the given ID exists in the given topic
func (*InMemoryPublisherService) Subscribe ¶
func (p *InMemoryPublisherService) Subscribe() chan *message.Message
Subscribe returns a channel for receiving messages
type InMemorySecretStore ¶
type InMemorySecretStore struct {
*InMemoryStore[*secret.Secret]
}
InMemorySecretStore implements secret.Repository
func NewInMemorySecretStore ¶
func NewInMemorySecretStore() *InMemorySecretStore
NewInMemorySecretStore creates a new in-memory secret store
func (*InMemorySecretStore) Clear ¶
func (s *InMemorySecretStore) Clear()
Clear clears the secret store
func (*InMemorySecretStore) Count ¶
func (s *InMemorySecretStore) Count(ctx context.Context, filter *types.SecretFilter) (int, error)
func (*InMemorySecretStore) Delete ¶
func (s *InMemorySecretStore) Delete(ctx context.Context, id string) error
func (*InMemorySecretStore) GetAPIKeyByValue ¶
func (*InMemorySecretStore) List ¶
func (s *InMemorySecretStore) List(ctx context.Context, filter *types.SecretFilter) ([]*secret.Secret, error)
func (*InMemorySecretStore) ListAll ¶
func (s *InMemorySecretStore) ListAll(ctx context.Context, filter *types.SecretFilter) ([]*secret.Secret, error)
func (*InMemorySecretStore) UpdateLastUsed ¶
func (s *InMemorySecretStore) UpdateLastUsed(ctx context.Context, id string) error
type InMemorySettingsStore ¶ added in v1.0.22
type InMemorySettingsStore struct {
*InMemoryStore[*domainSettings.Setting]
}
InMemorySettingsStore implements an in-memory settings repository for testing
func NewInMemorySettingsStore ¶ added in v1.0.22
func NewInMemorySettingsStore() *InMemorySettingsStore
NewInMemorySettingsStore creates a new in-memory settings store
func (*InMemorySettingsStore) Clear ¶ added in v1.0.22
func (s *InMemorySettingsStore) Clear()
Clear removes all settings from the store
func (*InMemorySettingsStore) Create ¶ added in v1.0.22
func (s *InMemorySettingsStore) Create(ctx context.Context, setting *domainSettings.Setting) error
Create creates a new setting
func (*InMemorySettingsStore) DeleteByKey ¶ added in v1.0.22
func (s *InMemorySettingsStore) DeleteByKey(ctx context.Context, key string) error
DeleteByKey deletes a setting by key for a specific tenant and environment
func (*InMemorySettingsStore) Get ¶ added in v1.0.22
func (s *InMemorySettingsStore) Get(ctx context.Context, id string) (*domainSettings.Setting, error)
Get retrieves a setting by ID
func (*InMemorySettingsStore) GetAllTenantEnvSubscriptionSettings ¶ added in v1.0.25
func (s *InMemorySettingsStore) GetAllTenantEnvSubscriptionSettings(ctx context.Context) ([]*types.TenantEnvSubscriptionConfig, error)
GetAllTenantEnvSubscriptionSettings returns all subscription configs across all tenants and environments
func (*InMemorySettingsStore) GetByKey ¶ added in v1.0.22
func (s *InMemorySettingsStore) GetByKey(ctx context.Context, key string) (*domainSettings.Setting, error)
GetByKey retrieves a setting by key for a specific tenant and environment
func (*InMemorySettingsStore) ListAllTenantEnvSettingsByKey ¶ added in v1.0.25
func (s *InMemorySettingsStore) ListAllTenantEnvSettingsByKey(ctx context.Context, key string) ([]*types.TenantEnvConfig, error)
ListAllTenantEnvSettingsByKey returns all settings for a given key across all tenants and environments
func (*InMemorySettingsStore) Update ¶ added in v1.0.22
func (s *InMemorySettingsStore) Update(ctx context.Context, setting *domainSettings.Setting) error
Update updates an existing setting
type InMemoryStore ¶
type InMemoryStore[T any] struct { // contains filtered or unexported fields }
InMemoryStore implements a generic in-memory store
func NewInMemoryStore ¶
func NewInMemoryStore[T any]() *InMemoryStore[T]
NewInMemoryStore creates a new InMemoryStore
func (*InMemoryStore[T]) Clear ¶
func (s *InMemoryStore[T]) Clear()
Clear removes all items from the store
func (*InMemoryStore[T]) Count ¶
func (s *InMemoryStore[T]) Count(ctx context.Context, filter interface{}, filterFn FilterFunc[T]) (int, error)
Count returns the total number of items matching the filter
func (*InMemoryStore[T]) Create ¶
func (s *InMemoryStore[T]) Create(ctx context.Context, id string, item T) error
Create adds a new item to the store
func (*InMemoryStore[T]) Delete ¶
func (s *InMemoryStore[T]) Delete(ctx context.Context, id string) error
Delete removes an item from the store
func (*InMemoryStore[T]) Get ¶
func (s *InMemoryStore[T]) Get(ctx context.Context, id string) (T, error)
Get retrieves an item by ID
func (*InMemoryStore[T]) List ¶
func (s *InMemoryStore[T]) List(ctx context.Context, filter interface{}, filterFn FilterFunc[T], sortFn SortFunc[T]) ([]T, error)
List retrieves items based on filter
type InMemorySubscriptionLineItemStore ¶ added in v1.0.0
type InMemorySubscriptionLineItemStore struct {
*InMemoryStore[*subscription.SubscriptionLineItem]
}
InMemorySubscriptionLineItemStore implements subscription.LineItemRepository
func NewInMemorySubscriptionLineItemStore ¶ added in v1.0.0
func NewInMemorySubscriptionLineItemStore() *InMemorySubscriptionLineItemStore
NewInMemorySubscriptionLineItemStore creates a new in-memory subscription line item store
func (*InMemorySubscriptionLineItemStore) Clear ¶ added in v1.0.23
func (s *InMemorySubscriptionLineItemStore) Clear()
Clear clears all subscription line items from the store
func (*InMemorySubscriptionLineItemStore) Count ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) Count(ctx context.Context, filter *types.SubscriptionLineItemFilter) (int, error)
Count counts subscription line items based on filter
func (*InMemorySubscriptionLineItemStore) Create ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) Create(ctx context.Context, item *subscription.SubscriptionLineItem) error
Create creates a new subscription line item
func (*InMemorySubscriptionLineItemStore) CreateBulk ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) CreateBulk(ctx context.Context, items []*subscription.SubscriptionLineItem) error
CreateBulk creates multiple subscription line items in bulk
func (*InMemorySubscriptionLineItemStore) Delete ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) Delete(ctx context.Context, id string) error
Delete deletes a subscription line item
func (*InMemorySubscriptionLineItemStore) Get ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) Get(ctx context.Context, id string) (*subscription.SubscriptionLineItem, error)
Get retrieves a subscription line item by ID
func (*InMemorySubscriptionLineItemStore) GetByPlanID ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) GetByPlanID(ctx context.Context, planID string) ([]*subscription.SubscriptionLineItem, error)
GetByPlanID retrieves all line items for a plan
func (*InMemorySubscriptionLineItemStore) GetByPriceID ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) GetByPriceID(ctx context.Context, priceID string) ([]*subscription.SubscriptionLineItem, error)
GetByPriceID retrieves all line items for a price
func (*InMemorySubscriptionLineItemStore) List ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) List(ctx context.Context, filter *types.SubscriptionLineItemFilter) ([]*subscription.SubscriptionLineItem, error)
List retrieves subscription line items based on filter
func (*InMemorySubscriptionLineItemStore) ListByCustomer ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) ListByCustomer(ctx context.Context, customerID string) ([]*subscription.SubscriptionLineItem, error)
ListByCustomer retrieves all line items for a customer
func (*InMemorySubscriptionLineItemStore) ListBySubscription ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) ListBySubscription(ctx context.Context, sub *subscription.Subscription) ([]*subscription.SubscriptionLineItem, error)
ListBySubscription retrieves all line items for a subscription
func (*InMemorySubscriptionLineItemStore) Update ¶ added in v1.0.0
func (s *InMemorySubscriptionLineItemStore) Update(ctx context.Context, item *subscription.SubscriptionLineItem) error
Update updates a subscription line item
type InMemorySubscriptionStore ¶
type InMemorySubscriptionStore struct {
*InMemoryStore[*subscription.Subscription]
// contains filtered or unexported fields
}
InMemorySubscriptionStore implements subscription.Repository
func NewInMemorySubscriptionStore ¶
func NewInMemorySubscriptionStore() *InMemorySubscriptionStore
func (*InMemorySubscriptionStore) Clear ¶ added in v1.0.23
func (s *InMemorySubscriptionStore) Clear()
Clear removes all data from the store
func (*InMemorySubscriptionStore) Count ¶
func (s *InMemorySubscriptionStore) Count(ctx context.Context, filter *types.SubscriptionFilter) (int, error)
func (*InMemorySubscriptionStore) Create ¶
func (s *InMemorySubscriptionStore) Create(ctx context.Context, sub *subscription.Subscription) error
func (*InMemorySubscriptionStore) CreatePause ¶
func (s *InMemorySubscriptionStore) CreatePause(ctx context.Context, pause *subscription.SubscriptionPause) error
CreatePause creates a new subscription pause
func (*InMemorySubscriptionStore) CreateWithLineItems ¶
func (s *InMemorySubscriptionStore) CreateWithLineItems(ctx context.Context, sub *subscription.Subscription, items []*subscription.SubscriptionLineItem) error
CreateWithLineItems creates a subscription with its line items
func (*InMemorySubscriptionStore) Delete ¶
func (s *InMemorySubscriptionStore) Delete(ctx context.Context, id string) error
func (*InMemorySubscriptionStore) Get ¶
func (s *InMemorySubscriptionStore) Get(ctx context.Context, id string) (*subscription.Subscription, error)
func (*InMemorySubscriptionStore) GetPause ¶
func (s *InMemorySubscriptionStore) GetPause(ctx context.Context, id string) (*subscription.SubscriptionPause, error)
GetPause gets a subscription pause by ID
func (*InMemorySubscriptionStore) GetWithLineItems ¶
func (s *InMemorySubscriptionStore) GetWithLineItems(ctx context.Context, id string) (*subscription.Subscription, []*subscription.SubscriptionLineItem, error)
GetWithLineItems gets a subscription with its line items
func (*InMemorySubscriptionStore) GetWithPauses ¶
func (s *InMemorySubscriptionStore) GetWithPauses(ctx context.Context, id string) (*subscription.Subscription, []*subscription.SubscriptionPause, error)
GetWithPauses gets a subscription with its pauses
func (*InMemorySubscriptionStore) List ¶
func (s *InMemorySubscriptionStore) List(ctx context.Context, filter *types.SubscriptionFilter) ([]*subscription.Subscription, error)
func (*InMemorySubscriptionStore) ListAll ¶
func (s *InMemorySubscriptionStore) ListAll(ctx context.Context, filter *types.SubscriptionFilter) ([]*subscription.Subscription, error)
ListAll returns all subscriptions without pagination
func (*InMemorySubscriptionStore) ListAllTenant ¶
func (s *InMemorySubscriptionStore) ListAllTenant(ctx context.Context, filter *types.SubscriptionFilter) ([]*subscription.Subscription, error)
ListAllTenant returns all subscriptions across all tenants NOTE: This is a potentially expensive operation and to be used only for CRONs
func (*InMemorySubscriptionStore) ListByCustomerID ¶ added in v1.0.0
func (s *InMemorySubscriptionStore) ListByCustomerID(ctx context.Context, customerID string) ([]*subscription.Subscription, error)
func (*InMemorySubscriptionStore) ListByIDs ¶ added in v1.0.0
func (s *InMemorySubscriptionStore) ListByIDs(ctx context.Context, ids []string) ([]*subscription.Subscription, error)
func (*InMemorySubscriptionStore) ListPauses ¶
func (s *InMemorySubscriptionStore) ListPauses(ctx context.Context, subscriptionID string) ([]*subscription.SubscriptionPause, error)
ListPauses lists all pauses for a subscription
func (*InMemorySubscriptionStore) ListSubscriptionsDueForRenewal ¶ added in v1.0.25
func (s *InMemorySubscriptionStore) ListSubscriptionsDueForRenewal(ctx context.Context) ([]*subscription.Subscription, error)
ListSubscriptionsDueForRenewal retrieves all active subscriptions that are due for renewal in 24 hours
func (*InMemorySubscriptionStore) Update ¶
func (s *InMemorySubscriptionStore) Update(ctx context.Context, sub *subscription.Subscription) error
func (*InMemorySubscriptionStore) UpdatePause ¶
func (s *InMemorySubscriptionStore) UpdatePause(ctx context.Context, pause *subscription.SubscriptionPause) error
UpdatePause updates a subscription pause
type InMemoryTaskStore ¶
type InMemoryTaskStore struct {
*InMemoryStore[*task.Task]
}
InMemoryTaskStore implements task.Repository
func NewInMemoryTaskStore ¶
func NewInMemoryTaskStore() *InMemoryTaskStore
NewInMemoryTaskStore creates a new in-memory task store
func (*InMemoryTaskStore) Count ¶
func (s *InMemoryTaskStore) Count(ctx context.Context, filter *types.TaskFilter) (int, error)
func (*InMemoryTaskStore) Delete ¶
func (s *InMemoryTaskStore) Delete(ctx context.Context, id string) error
func (*InMemoryTaskStore) GetLastExportTask ¶ added in v1.0.32
func (s *InMemoryTaskStore) GetLastExportTask(ctx context.Context, scheduledJobID string) (*task.Task, error)
GetLastExportTask gets the last export task for a scheduled job (regardless of status)
func (*InMemoryTaskStore) List ¶
func (s *InMemoryTaskStore) List(ctx context.Context, filter *types.TaskFilter) ([]*task.Task, error)
type InMemoryTaxAppliedStore ¶ added in v1.0.21
type InMemoryTaxAppliedStore struct {
*InMemoryStore[*taxapplied.TaxApplied]
}
InMemoryTaxAppliedStore implements taxapplied.Repository
func NewInMemoryTaxAppliedStore ¶ added in v1.0.21
func NewInMemoryTaxAppliedStore() *InMemoryTaxAppliedStore
func (*InMemoryTaxAppliedStore) Clear ¶ added in v1.0.21
func (s *InMemoryTaxAppliedStore) Clear()
Clear clears the tax applied store
func (*InMemoryTaxAppliedStore) Count ¶ added in v1.0.21
func (s *InMemoryTaxAppliedStore) Count(ctx context.Context, filter *types.TaxAppliedFilter) (int, error)
func (*InMemoryTaxAppliedStore) Create ¶ added in v1.0.21
func (s *InMemoryTaxAppliedStore) Create(ctx context.Context, ta *taxapplied.TaxApplied) error
func (*InMemoryTaxAppliedStore) Delete ¶ added in v1.0.21
func (s *InMemoryTaxAppliedStore) Delete(ctx context.Context, id string) error
func (*InMemoryTaxAppliedStore) Get ¶ added in v1.0.21
func (s *InMemoryTaxAppliedStore) Get(ctx context.Context, id string) (*taxapplied.TaxApplied, error)
func (*InMemoryTaxAppliedStore) GetByIdempotencyKey ¶ added in v1.0.21
func (s *InMemoryTaxAppliedStore) GetByIdempotencyKey(ctx context.Context, idempotencyKey string) (*taxapplied.TaxApplied, error)
func (*InMemoryTaxAppliedStore) List ¶ added in v1.0.21
func (s *InMemoryTaxAppliedStore) List(ctx context.Context, filter *types.TaxAppliedFilter) ([]*taxapplied.TaxApplied, error)
func (*InMemoryTaxAppliedStore) Update ¶ added in v1.0.21
func (s *InMemoryTaxAppliedStore) Update(ctx context.Context, ta *taxapplied.TaxApplied) error
type InMemoryTaxAssociationStore ¶ added in v1.0.21
type InMemoryTaxAssociationStore struct {
*InMemoryStore[*taxassociation.TaxAssociation]
}
InMemoryTaxAssociationStore implements taxassociation.Repository
func NewInMemoryTaxAssociationStore ¶ added in v1.0.21
func NewInMemoryTaxAssociationStore() *InMemoryTaxAssociationStore
func (*InMemoryTaxAssociationStore) Clear ¶ added in v1.0.21
func (s *InMemoryTaxAssociationStore) Clear()
Clear clears the tax association store
func (*InMemoryTaxAssociationStore) Count ¶ added in v1.0.21
func (s *InMemoryTaxAssociationStore) Count(ctx context.Context, filter *types.TaxAssociationFilter) (int, error)
func (*InMemoryTaxAssociationStore) Create ¶ added in v1.0.21
func (s *InMemoryTaxAssociationStore) Create(ctx context.Context, ta *taxassociation.TaxAssociation) error
func (*InMemoryTaxAssociationStore) Delete ¶ added in v1.0.21
func (s *InMemoryTaxAssociationStore) Delete(ctx context.Context, ta *taxassociation.TaxAssociation) error
func (*InMemoryTaxAssociationStore) Get ¶ added in v1.0.21
func (s *InMemoryTaxAssociationStore) Get(ctx context.Context, id string) (*taxassociation.TaxAssociation, error)
func (*InMemoryTaxAssociationStore) List ¶ added in v1.0.21
func (s *InMemoryTaxAssociationStore) List(ctx context.Context, filter *types.TaxAssociationFilter) ([]*taxassociation.TaxAssociation, error)
func (*InMemoryTaxAssociationStore) Update ¶ added in v1.0.21
func (s *InMemoryTaxAssociationStore) Update(ctx context.Context, ta *taxassociation.TaxAssociation) error
type InMemoryTaxRateStore ¶ added in v1.0.21
type InMemoryTaxRateStore struct {
*InMemoryStore[*taxrate.TaxRate]
}
InMemoryTaxRateStore implements taxrate.Repository
func NewInMemoryTaxRateStore ¶ added in v1.0.21
func NewInMemoryTaxRateStore() *InMemoryTaxRateStore
func (*InMemoryTaxRateStore) Clear ¶ added in v1.0.21
func (s *InMemoryTaxRateStore) Clear()
Clear clears the tax rate store
func (*InMemoryTaxRateStore) Count ¶ added in v1.0.21
func (s *InMemoryTaxRateStore) Count(ctx context.Context, filter *types.TaxRateFilter) (int, error)
func (*InMemoryTaxRateStore) List ¶ added in v1.0.21
func (s *InMemoryTaxRateStore) List(ctx context.Context, filter *types.TaxRateFilter) ([]*taxrate.TaxRate, error)
func (*InMemoryTaxRateStore) ListAll ¶ added in v1.0.21
func (s *InMemoryTaxRateStore) ListAll(ctx context.Context, filter *types.TaxRateFilter) ([]*taxrate.TaxRate, error)
type InMemoryTenantStore ¶
type InMemoryTenantStore struct {
// contains filtered or unexported fields
}
func NewInMemoryTenantStore ¶
func NewInMemoryTenantStore() *InMemoryTenantStore
func (*InMemoryTenantStore) Clear ¶
func (s *InMemoryTenantStore) Clear()
type InMemoryUserStore ¶
type InMemoryUserStore struct {
// contains filtered or unexported fields
}
InMemoryUserStore is an in-memory implementation of the User repository
func NewInMemoryUserStore ¶
func NewInMemoryUserStore() *InMemoryUserStore
NewInMemoryUserStore creates a new instance of InMemoryUserStore
func (*InMemoryUserStore) Clear ¶
func (s *InMemoryUserStore) Clear()
func (*InMemoryUserStore) GetByEmail ¶
GetByEmail retrieves a user by email from the in-memory store
type InMemoryWalletStore ¶
type InMemoryWalletStore struct {
// contains filtered or unexported fields
}
func NewInMemoryWalletStore ¶
func NewInMemoryWalletStore() *InMemoryWalletStore
func (*InMemoryWalletStore) Clear ¶
func (s *InMemoryWalletStore) Clear()
func (*InMemoryWalletStore) ConsumeCredits ¶
func (s *InMemoryWalletStore) ConsumeCredits(ctx context.Context, credits []*wallet.Transaction, amount decimal.Decimal) error
ConsumeCredits consumes credits from a wallet
func (*InMemoryWalletStore) CountWalletTransactions ¶
func (s *InMemoryWalletStore) CountWalletTransactions(ctx context.Context, f *types.WalletTransactionFilter) (int, error)
func (*InMemoryWalletStore) CreateTransaction ¶
func (s *InMemoryWalletStore) CreateTransaction(ctx context.Context, tx *wallet.Transaction) error
CreateTransaction creates a new wallet transaction record
func (*InMemoryWalletStore) CreateWallet ¶
func (*InMemoryWalletStore) FindEligibleCredits ¶
func (s *InMemoryWalletStore) FindEligibleCredits(ctx context.Context, walletID string, requiredAmount decimal.Decimal, pageSize int) ([]*wallet.Transaction, error)
FindEligibleCredits finds eligible credits for a wallet
func (*InMemoryWalletStore) GetTransactionByID ¶
func (s *InMemoryWalletStore) GetTransactionByID(ctx context.Context, id string) (*wallet.Transaction, error)
func (*InMemoryWalletStore) GetWalletByID ¶
func (*InMemoryWalletStore) GetWalletsByCustomerID ¶
func (*InMemoryWalletStore) GetWalletsByFilter ¶ added in v1.0.21
func (s *InMemoryWalletStore) GetWalletsByFilter(ctx context.Context, filter *types.WalletFilter) ([]*wallet.Wallet, error)
GetWalletsByFilter retrieves wallets based on filter criteria
func (*InMemoryWalletStore) ListAllWalletTransactions ¶
func (s *InMemoryWalletStore) ListAllWalletTransactions(ctx context.Context, f *types.WalletTransactionFilter) ([]*wallet.Transaction, error)
func (*InMemoryWalletStore) ListWalletTransactions ¶
func (s *InMemoryWalletStore) ListWalletTransactions(ctx context.Context, f *types.WalletTransactionFilter) ([]*wallet.Transaction, error)
func (*InMemoryWalletStore) UpdateTransactionStatus ¶
func (s *InMemoryWalletStore) UpdateTransactionStatus(ctx context.Context, id string, status types.TransactionStatus) error
func (*InMemoryWalletStore) UpdateWallet ¶
UpdateWallet updates a wallet in the in-memory store
func (*InMemoryWalletStore) UpdateWalletBalance ¶
func (s *InMemoryWalletStore) UpdateWalletBalance(ctx context.Context, walletID string, finalBalance, newCreditBalance decimal.Decimal) error
UpdateWalletBalance updates the wallet's balance and credit balance
func (*InMemoryWalletStore) UpdateWalletStatus ¶
func (s *InMemoryWalletStore) UpdateWalletStatus(ctx context.Context, id string, status types.WalletStatus) error
type MockHTTPClient ¶
type MockHTTPClient struct {
// contains filtered or unexported fields
}
MockHTTPClient implements a mock HTTP client for testing
func NewMockHTTPClient ¶
func NewMockHTTPClient() *MockHTTPClient
NewMockHTTPClient creates a new mock HTTP client
func (*MockHTTPClient) Clear ¶
func (m *MockHTTPClient) Clear()
Clear removes all registered responses
func (*MockHTTPClient) RegisterCSVResponse ¶
func (m *MockHTTPClient) RegisterCSVResponse(url string, headers []string, records [][]string)
RegisterCSVResponse is a helper to register a CSV response
func (*MockHTTPClient) RegisterResponse ¶
func (m *MockHTTPClient) RegisterResponse(url string, resp MockResponse)
RegisterResponse registers a mock response for a given URL
func (*MockHTTPClient) Send ¶
func (m *MockHTTPClient) Send(ctx context.Context, req *httpclient.Request) (*httpclient.Response, error)
Send implements the httpclient.Client interface
type MockPDFGenerator ¶ added in v1.0.0
func (*MockPDFGenerator) RenderInvoicePdf ¶ added in v1.0.0
func (m *MockPDFGenerator) RenderInvoicePdf(ctx context.Context, data *domain.InvoiceData) ([]byte, error)
RenderInvoicePdf implements pdf.Generator.
type MockPostgresClient ¶
type MockPostgresClient struct {
// contains filtered or unexported fields
}
MockPostgresClient is a mock implementation of postgres client for testing
func (*MockPostgresClient) Close ¶ added in v1.0.32
func (c *MockPostgresClient) Close() error
func (*MockPostgresClient) Reader ¶ added in v1.0.32
func (c *MockPostgresClient) Reader(ctx context.Context) *ent.Client
Reader returns the appropriate client for read operations
func (*MockPostgresClient) TxFromContext ¶
func (c *MockPostgresClient) TxFromContext(ctx context.Context) *ent.Tx
TxFromContext returns the transaction from context if it exists
type MockResponse ¶
MockResponse represents a mock HTTP response
type Stores ¶
type Stores struct {
CreditGrantRepo creditgrant.Repository
CreditGrantApplicationRepo creditgrantapplication.Repository
SubscriptionRepo subscription.Repository
SubscriptionLineItemRepo subscription.LineItemRepository
EventRepo events.Repository
PlanRepo plan.Repository
PriceRepo price.Repository
MeterRepo meter.Repository
CustomerRepo customer.Repository
InvoiceRepo invoice.Repository
WalletRepo wallet.Repository
PaymentRepo payment.Repository
AuthRepo auth.Repository
UserRepo user.Repository
TenantRepo tenant.Repository
EnvironmentRepo environment.Repository
EntitlementRepo entitlement.Repository
FeatureRepo feature.Repository
TaskRepo task.Repository
SecretRepo secret.Repository
CreditNoteRepo creditnote.Repository
CreditNoteLineItemRepo creditnote.CreditNoteLineItemRepository
TaxRateRepo taxrate.Repository
TaxAppliedRepo taxapplied.Repository
TaxAssociationRepo taxassociation.Repository
CouponRepo coupon.Repository
CouponAssociationRepo coupon_association.Repository
CouponApplicationRepo coupon_application.Repository
AddonAssociationRepo addonassociation.Repository
ConnectionRepo connection.Repository
EntityIntegrationMappingRepo entityintegrationmapping.Repository
SettingsRepo settings.Repository
AlertLogsRepo alertlogs.Repository
}
Stores holds all the repository interfaces for testing
Source Files
¶
- base_service_suite.go
- context.go
- inmemory_addon_association_store.go
- inmemory_addon_store.go
- inmemory_alert_logs_store.go
- inmemory_auth_store.go
- inmemory_connection_store.go
- inmemory_coupon_application_store.go
- inmemory_coupon_association_store.go
- inmemory_coupon_store.go
- inmemory_creditgrant_store.go
- inmemory_creditgrantapplication_store.go
- inmemory_creditnote_lineitem_store.go
- inmemory_creditnote_store.go
- inmemory_customer_store.go
- inmemory_entitlement_store.go
- inmemory_entityintegrationmapping_store.go
- inmemory_environment_store.go
- inmemory_event_store.go
- inmemory_feature_store.go
- inmemory_invoice_store.go
- inmemory_kafka.go
- inmemory_meter_store.go
- inmemory_payment_store.go
- inmemory_plan_store.go
- inmemory_price_store.go
- inmemory_priceunit_store.go
- inmemory_publisher.go
- inmemory_pubsub.go
- inmemory_secret_store.go
- inmemory_settings_store.go
- inmemory_subscription_line_item_store.go
- inmemory_subscription_store.go
- inmemory_task_store.go
- inmemory_taxapplied_store.go
- inmemory_taxassociation_store.go
- inmemory_taxrate_store.go
- inmemory_tenant_store.go
- inmemory_user_store.go
- inmemory_wallet_store.go
- mock_http_client.go
- mock_pdf_generator.go
- mock_postgres_client.go
- store.go