Help us shape the future of Go! Take the 2026 Go Developer Survey

features

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildMetadata

func BuildMetadata(
	feature *licenseapi.Feature,
	isLimit bool,
	extraMetadata map[string]string,
) map[string]string

func EnsureAttachAll

func EnsureAttachAll(
	stripeClient *stripeclient.API,
	features map[string]SyncedFeature,
	attachTo []stripe.Product,
) error

func EnsureFeatureExists

func EnsureFeatureExists(
	stripeClient *stripeclient.API,
	syncedFeatures map[string]SyncedFeature,
	params EnsureFeatureParams,
) error

func EnsureFeatureProduct

func EnsureFeatureProduct(
	stripeClient *stripeclient.API,
	syncedFeature *SyncedFeature,
) (*stripe.Product, error)

func EnsureFeatureProducts

func EnsureFeatureProducts(
	stripeClient *stripeclient.API,
	syncedFeatures map[string]SyncedFeature,
) error

func EnsureFeatures

func EnsureFeatures(
	stripeClient *stripeclient.API,
	syncedFeatures map[string]SyncedFeature,
	features []*licenseapi.Feature,
	additionalAttachAllProducts []stripe.Product,
	isLimit bool,
) error

func EnsureStripeFeatures

func EnsureStripeFeatures(
	stripeClient *stripeclient.API,
	syncedFeatures map[string]SyncedFeature,
	features []*licenseapi.Feature,
	isLimit bool,
) error

func SearchProductForFeatures

func SearchProductForFeatures(
	stripeClient *stripeclient.API,
	productID string,
	featuresToCheck map[string]SyncedFeature,
) error

Types

type EnsureFeatureParams

type EnsureFeatureParams struct {
	Name          string
	DisplayName   string
	ExtraMetadata map[string]string
}

EnsureFeatureParams holds parameters for EnsureFeatureExists.

type SyncedFeature

type SyncedFeature struct {
	Feature *stripe.EntitlementsFeature
	Product *stripe.Product
}

func FindFeature

func FindFeature(stripeClient *stripeclient.API, id string) (*SyncedFeature, error)

Jump to

Keyboard shortcuts

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