MCPcopy Create free account
hub / github.com/bytebase/bytebase / StoreLicense

Method StoreLicense

backend/enterprise/license.go:388–403  ·  view source on GitHub ↗

StoreLicense will store license into file.

(ctx context.Context, workspaceID string, license string)

Source from the content-addressed store, hash-verified

386
387// StoreLicense will store license into file.
388func (s *LicenseService) StoreLicense(ctx context.Context, workspaceID string, license string) error {
389 if license != "" {
390 if _, err := s.parseLicense(license, workspaceID); err != nil {
391 return err
392 }
393 }
394
395 if err := s.store.UpdateLicense(ctx, workspaceID, license); err != nil {
396 return err
397 }
398
399 // Invalidate cache
400 s.cache.Remove(licenseCacheKey(workspaceID))
401
402 return nil
403}
404
405// LicenseParams contains the business fields for license generation.
406type LicenseParams struct {

Callers 3

UploadLicenseMethod · 0.80
CancelPurchaseMethod · 0.80
updateLicenseMethod · 0.80

Calls 3

parseLicenseMethod · 0.95
licenseCacheKeyFunction · 0.85
UpdateLicenseMethod · 0.80

Tested by

no test coverage detected