Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
30 changes: 16 additions & 14 deletions pkg/handlers/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@ import (
)

type LicenseInfo struct {
LicenseID string `json:"licenseID"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently we need to add a gofmt check to more repos due to the rise of AI

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"`
Expand Down Expand Up @@ -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(),
Expand Down
2 changes: 1 addition & 1 deletion pkg/license/license.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhhh because it returns an interface now instead?

should we check that the type is string and error otherwise?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah

if expiresAtValue == "" {
return false, nil
}
Expand Down