Documentation
¶
Index ¶
- func BuildMetadata(feature *licenseapi.Feature, isLimit bool, extraMetadata map[string]string) map[string]string
- func EnsureAttachAll(stripeClient *stripeclient.API, features map[string]SyncedFeature, ...) error
- func EnsureFeatureExists(stripeClient *stripeclient.API, syncedFeatures map[string]SyncedFeature, ...) error
- func EnsureFeatureProduct(stripeClient *stripeclient.API, syncedFeature *SyncedFeature) (*stripe.Product, error)
- func EnsureFeatureProducts(stripeClient *stripeclient.API, syncedFeatures map[string]SyncedFeature) error
- func EnsureFeatures(stripeClient *stripeclient.API, syncedFeatures map[string]SyncedFeature, ...) error
- func EnsureStripeFeatures(stripeClient *stripeclient.API, syncedFeatures map[string]SyncedFeature, ...) error
- func SearchProductForFeatures(stripeClient *stripeclient.API, productID string, ...) error
- type EnsureFeatureParams
- type SyncedFeature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildMetadata ¶
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 ¶
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)
Click to show internal directories.
Click to hide internal directories.