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

Function toServiceRow

cli/pkg/printer/resources.go:339–351  ·  view source on GitHub ↗
(s *adminv1.Service)

Source from the content-addressed store, hash-verified

337}
338
339func toServiceRow(s *adminv1.Service) *service {
340 attrBytes, err := json.Marshal(s.Attributes)
341 if err != nil {
342 panic(fmt.Errorf("failed to marshal service attributes: %w", err))
343 }
344
345 return &service{
346 Name: s.Name,
347 OrgName: s.OrgName,
348 Attributes: string(attrBytes),
349 CreatedAt: s.CreatedOn.AsTime().Local().Format(time.DateTime),
350 }
351}
352
353type service struct {
354 Name string `header:"name" json:"name"`

Callers 1

toServicesTableFunction · 0.85

Calls 2

ErrorfMethod · 0.65
FormatMethod · 0.65

Tested by

no test coverage detected