MCPcopy Create free account
hub / github.com/coder/coder / convertLicenses

Function convertLicenses

enterprise/coderd/licenses.go:351–361  ·  view source on GitHub ↗
(licenses []database.License)

Source from the content-addressed store, hash-verified

349}
350
351func convertLicenses(licenses []database.License) ([]codersdk.License, error) {
352 out := make([]codersdk.License, 0, len(licenses))
353 for _, l := range licenses {
354 c, err := decodeClaims(l)
355 if err != nil {
356 return nil, err
357 }
358 out = append(out, convertLicense(l, c))
359 }
360 return out, nil
361}
362
363// decodeClaims decodes the JWT claims from the stored JWT. Note here we do not validate the JWT
364// and just return the claims verbatim. We want to include all licenses on the GET response, even

Callers 1

licensesMethod · 0.85

Calls 2

decodeClaimsFunction · 0.85
convertLicenseFunction · 0.85

Tested by

no test coverage detected