@@ -44,32 +44,6 @@ func SetTimeValidity(time int64) {
4444 timeValidity = time
4545}
4646
47- // Feature custom events
48- var featureCustomEvents bool
49-
50- // GetFeatureCustomEvents returns the featureCustomEvents
51- func GetFeatureCustomEvents () bool {
52- return featureCustomEvents
53- }
54-
55- // SetFeatureCustomEvents returns the time validity
56- func SetFeatureCustomEvents (val bool ) {
57- featureCustomEvents = val
58- }
59-
60- // Feature suggestions
61- var featureSuggestions bool
62-
63- // GetFeatureSuggestions returns the featureSuggestions
64- func GetFeatureSuggestions () bool {
65- return featureSuggestions
66- }
67-
68- // SetFeatureSuggestions returns the time validity
69- func SetFeatureSuggestions (val bool ) {
70- featureSuggestions = val
71- }
72-
7347// maxErrorTime before showing errors if invalid trial / plan in hours
7448var maxErrorTime int64 = 24 // in hrs
7549
@@ -122,19 +96,23 @@ type ClusterPlanResponse struct {
12296
12397// ArcInstanceDetails contains the info about an Arc Instance
12498type ArcInstanceDetails struct {
125- NodeCount int `json:"node_count"`
126- Description string `json:"description"`
127- SubscriptionID string `json:"subscription_id"`
128- SubscriptionCanceled bool `json:"subscription_canceled"`
129- Trial bool `json:"trial"`
130- TrialValidity int64 `json:"trial_validity"`
131- CreatedAt int64 `json:"created_at"`
132- Tier * Plan `json:"tier"`
133- TierValidity int64 `json:"tier_validity"`
134- TimeValidity int64 `json:"time_validity"`
135- Metadata map [string ]interface {} `json:"metadata"`
136- FeatureCustomEvents bool `json:"feature_custom_events"`
137- FeatureSuggestions bool `json:"feature_suggestions"`
99+ NodeCount int `json:"node_count"`
100+ Description string `json:"description"`
101+ SubscriptionID string `json:"subscription_id"`
102+ SubscriptionCanceled bool `json:"subscription_canceled"`
103+ Trial bool `json:"trial"`
104+ TrialValidity int64 `json:"trial_validity"`
105+ CreatedAt int64 `json:"created_at"`
106+ Tier * Plan `json:"tier"`
107+ TierValidity int64 `json:"tier_validity"`
108+ TimeValidity int64 `json:"time_validity"`
109+ Metadata map [string ]interface {} `json:"metadata"`
110+ FeatureCustomEvents bool `json:"feature_custom_events"`
111+ FeatureSuggestions bool `json:"feature_suggestions"`
112+ FeatureRules bool `json:"feature_rules"`
113+ FeatureTemplates bool `json:"feature_templates"`
114+ FeatureFunctions bool `json:"feature_functions"`
115+ FeatureSearchSettings bool `json:"feature_search_settings"`
138116}
139117
140118// SetDefaultTier sets the default tier when billing is disabled
@@ -197,6 +175,10 @@ func getArcInstance(arcID string) (ArcInstance, error) {
197175 SetTier (arcInstanceByID .Tier )
198176 SetFeatureSuggestions (arcInstanceByID .FeatureSuggestions )
199177 SetFeatureCustomEvents (arcInstanceByID .FeatureCustomEvents )
178+ SetFeatureRules (arcInstanceByID .FeatureRules )
179+ SetFeatureFunctions (arcInstanceByID .FeatureFunctions )
180+ SetFeatureSearchSettings (arcInstanceByID .FeatureSearchSettings )
181+ SetFeatureTemplates (arcInstanceByID .FeatureTemplates )
200182 } else {
201183 return arcInstance , errors .New ("No valid instance found for the provided ARC_ID" )
202184 }
0 commit comments