MCPcopy Create free account
hub / github.com/rilldata/rill / toSubscriptionRow

Function toSubscriptionRow

cli/pkg/printer/resources.go:506–517  ·  view source on GitHub ↗
(s *adminv1.Subscription)

Source from the content-addressed store, hash-verified

504}
505
506func toSubscriptionRow(s *adminv1.Subscription) *subscription {
507 return &subscription{
508 ID: s.Id,
509 PlanName: s.Plan.Name,
510 PlanDisplayName: s.Plan.DisplayName,
511 StartDate: s.StartDate.AsTime().Local().Format(time.DateTime),
512 EndDate: s.EndDate.AsTime().Local().Format(time.DateTime),
513 CurrentBillingCycleStartDate: s.CurrentBillingCycleStartDate.AsTime().Local().Format(time.DateTime),
514 CurrentBillingCycleEndDate: s.CurrentBillingCycleEndDate.AsTime().Local().Format(time.DateTime),
515 TrialEndDate: s.TrialEndDate.AsTime().Local().Format(time.DateTime),
516 }
517}
518
519type subscription struct {
520 ID string `header:"id" json:"id"`

Callers 1

toSubscriptionsTableFunction · 0.85

Calls 1

FormatMethod · 0.65

Tested by

no test coverage detected