From 51501f920c092791c7d83ac7067874547a37c96a Mon Sep 17 00:00:00 2001 From: David Lu Date: Tue, 6 Sep 2016 18:51:27 -0400 Subject: PLT-3753 Added Segment analytics (#3972) --- model/license.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'model/license.go') diff --git a/model/license.go b/model/license.go index 98b88fdeb..1fce1eeb1 100644 --- a/model/license.go +++ b/model/license.go @@ -46,6 +46,22 @@ type Features struct { FutureFeatures *bool `json:"future_features"` } +func (f *Features) ToMap() map[string]interface{} { + return map[string]interface{}{ + "ldap": *f.LDAP, + "mfa": *f.MFA, + "google": *f.GoogleOAuth, + "office365": *f.Office365OAuth, + "compliance": *f.Compliance, + "cluster": *f.Cluster, + "custom_brand": *f.CustomBrand, + "mhpns": *f.MHPNS, + "saml": *f.SAML, + "password": *f.PasswordRequirements, + "future": *f.FutureFeatures, + } +} + func (f *Features) SetDefaults() { if f.FutureFeatures == nil { f.FutureFeatures = new(bool) -- cgit v1.2.3-1-g7c22