entitlement

package
v0.8.29 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPlanEntitlementFailed = fmt.Errorf("plan entitlement failed")
)

Functions

This section is empty.

Types

type OrganizationService added in v0.8.18

type OrganizationService interface {
	MemberCount(ctx context.Context, orgID string) (int64, error)
}

type PlanService added in v0.8.18

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

type ProductService added in v0.8.14

type ProductService interface {
	List(ctx context.Context, f product.Filter) ([]product.Product, error)
	GetFeatureByID(ctx context.Context, id string) (product.Feature, error)
	GetByID(ctx context.Context, id string) (product.Product, error)
}

type Service

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

func NewEntitlementService

func NewEntitlementService(subscriptionService SubscriptionService,
	featureService ProductService, planService PlanService,
	organizationService OrganizationService) *Service

func (*Service) Check

func (s *Service) Check(ctx context.Context, customerID, featureOrProductID string) (bool, error)

func (*Service) CheckPlanEligibility added in v0.8.18

func (s *Service) CheckPlanEligibility(ctx context.Context, customerID string) error

type SubscriptionService

type SubscriptionService interface {
	List(ctx context.Context, filter subscription.Filter) ([]subscription.Subscription, error)
}

Jump to

Keyboard shortcuts

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