diff --git a/go.mod b/go.mod index 09198fee..0d0610d2 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/pact-foundation/pact-go v1.10.0 github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 - github.com/replicatedhq/kotskinds v0.0.0-20251029124314-174e89c93554 + github.com/replicatedhq/kotskinds v0.0.0-20251125152515-acc84923a4f5 github.com/robfig/cron/v3 v3.0.1 github.com/spf13/cobra v1.10.1 github.com/spf13/pflag v1.0.10 diff --git a/go.sum b/go.sum index 7efe464f..24320c5e 100644 --- a/go.sum +++ b/go.sum @@ -324,8 +324,8 @@ github.com/redis/go-redis/extra/redisotel/v9 v9.0.5 h1:EfpWLLCyXw8PSM2/XNJLjI3Pb github.com/redis/go-redis/extra/redisotel/v9 v9.0.5/go.mod h1:WZjPDy7VNzn77AAfnAfVjZNvfJTYfPetfZk5yoSTLaQ= github.com/redis/go-redis/v9 v9.7.3 h1:YpPyAayJV+XErNsatSElgRZZVCwXX9QzkKYNvO7x0wM= github.com/redis/go-redis/v9 v9.7.3/go.mod h1:bGUrSggJ9X9GUmZpZNEOQKaANxSGgOEBRltRTZHSvrA= -github.com/replicatedhq/kotskinds v0.0.0-20251029124314-174e89c93554 h1:a9vLewcXgVC/vclEak7CV0gsSYhYinjnWDoUkzrqN4w= -github.com/replicatedhq/kotskinds v0.0.0-20251029124314-174e89c93554/go.mod h1:+k4PHo2wukoU9kdiKrqqgi89Wmj+9AiwppYGVK11zig= +github.com/replicatedhq/kotskinds v0.0.0-20251125152515-acc84923a4f5 h1:NaLh1hQbIrjU/hIppLGEnOWm6FvFdOwNrQP101K7H9g= +github.com/replicatedhq/kotskinds v0.0.0-20251125152515-acc84923a4f5/go.mod h1:+k4PHo2wukoU9kdiKrqqgi89Wmj+9AiwppYGVK11zig= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= diff --git a/pkg/handlers/license.go b/pkg/handlers/license.go index 5bc53f7b..b5bb72db 100644 --- a/pkg/handlers/license.go +++ b/pkg/handlers/license.go @@ -17,20 +17,21 @@ import ( ) type LicenseInfo struct { - LicenseID string `json:"licenseID"` - AppSlug string `json:"appSlug"` - ChannelName string `json:"channelName"` - CustomerName string `json:"customerName"` - CustomerEmail string `json:"customerEmail"` - LicenseType string `json:"licenseType"` - ChannelID string `json:"channelID"` - LicenseSequence int64 `json:"licenseSequence"` - IsAirgapSupported bool `json:"isAirgapSupported"` - IsGitOpsSupported bool `json:"isGitOpsSupported"` - IsIdentityServiceSupported bool `json:"isIdentityServiceSupported"` - IsGeoaxisSupported bool `json:"isGeoaxisSupported"` - IsSnapshotSupported bool `json:"isSnapshotSupported"` - IsSupportBundleUploadSupported bool `json:"isSupportBundleUploadSupported"` + LicenseID string `json:"licenseID"` + AppSlug string `json:"appSlug"` + ChannelName string `json:"channelName"` + CustomerID string `json:"customerID"` + CustomerName string `json:"customerName"` + CustomerEmail string `json:"customerEmail"` + LicenseType string `json:"licenseType"` + ChannelID string `json:"channelID"` + LicenseSequence int64 `json:"licenseSequence"` + IsAirgapSupported bool `json:"isAirgapSupported"` + IsGitOpsSupported bool `json:"isGitOpsSupported"` + IsIdentityServiceSupported bool `json:"isIdentityServiceSupported"` + IsGeoaxisSupported bool `json:"isGeoaxisSupported"` + IsSnapshotSupported bool `json:"isSnapshotSupported"` + IsSupportBundleUploadSupported bool `json:"isSupportBundleUploadSupported"` IsSemverRequired bool `json:"isSemverRequired"` Endpoint string `json:"endpoint"` Entitlements interface{} `json:"entitlements,omitempty"` @@ -138,6 +139,7 @@ func licenseInfoFromWrapper(wrapper licensewrapper.LicenseWrapper) LicenseInfo { LicenseID: wrapper.GetLicenseID(), AppSlug: wrapper.GetAppSlug(), ChannelName: wrapper.GetChannelName(), + CustomerID: wrapper.GetCustomerID(), CustomerName: wrapper.GetCustomerName(), CustomerEmail: wrapper.GetCustomerEmail(), LicenseType: wrapper.GetLicenseType(), diff --git a/pkg/license/license.go b/pkg/license/license.go index 332e2d4e..36be71b9 100644 --- a/pkg/license/license.go +++ b/pkg/license/license.go @@ -105,7 +105,7 @@ func LicenseIsExpired(wrapper licensewrapper.LicenseWrapper) (bool, error) { return false, errors.Errorf("expires_at must be type String: %s", valueType) } - expiresAtValue := ent.GetValue().StrVal + expiresAtValue := ent.GetValue().(string) if expiresAtValue == "" { return false, nil }