| 19 | } |
| 20 | |
| 21 | func (ctl *controller) removeLicense(ctx context.Context) error { |
| 22 | if _, err := ctl.subscriptionServiceClient.UploadLicense(ctx, connect.NewRequest(&v1pb.UploadLicenseRequest{ |
| 23 | License: "", |
| 24 | })); err != nil { |
| 25 | return errors.Wrap(err, "failed to remove license") |
| 26 | } |
| 27 | return nil |
| 28 | } |
| 29 | |
| 30 | func (ctl *controller) getSubscription(ctx context.Context) (*v1pb.Subscription, error) { |
| 31 | resp, err := ctl.subscriptionServiceClient.GetSubscription(ctx, connect.NewRequest(&v1pb.GetSubscriptionRequest{})) |