event

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChanListener

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

ChanListener listens for audit logs and processes them blocking one event at a time

func NewChanListener

func NewChanListener(inputChan <-chan audit.Log, processor *Processor) *ChanListener

func (*ChanListener) Listen

func (l *ChanListener) Listen(ctx context.Context) error

Listen listens for audit logs and processes them

func (*ChanListener) Process

func (l *ChanListener) Process(ctx context.Context, log audit.Log)

type ChanPublisher

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

ChanPublisher is a blocking audit event publisher

func NewChanPublisher

func NewChanPublisher(target chan<- audit.Log) *ChanPublisher

func (*ChanPublisher) Publish

func (p *ChanPublisher) Publish(ctx context.Context, log audit.Log)

type CheckoutService

type CheckoutService interface {
	Apply(ctx context.Context, ch checkout.Checkout) (*subscription.Subscription, *product.Product, error)
}

type CustomerService

type CustomerService interface {
	Create(ctx context.Context, customer customer.Customer) (customer.Customer, error)
}

type OrganizationService

type OrganizationService interface {
	GetRaw(ctx context.Context, id string) (organization.Organization, error)
}

type PlanService

type PlanService interface {
	GetByID(ctx context.Context, id string) (plan.Plan, error)
}

type Processor

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

func NewProcessor

func NewProcessor(billingConf billing.Config, organizationService OrganizationService,
	checkoutService CheckoutService, customerService CustomerService,
	planService PlanService, userService UserService) *Processor

func (*Processor) EnsureDefaultPlan

func (p *Processor) EnsureDefaultPlan(ctx context.Context, orgID string) error

EnsureDefaultPlan create a new customer account and subscribe to the default plan if configured

type UserService

type UserService interface {
	ListByOrg(ctx context.Context, orgID string, roleFilter string) ([]user.User, error)
}

Jump to

Keyboard shortcuts

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