MCPcopy Index your code
hub / github.com/cloudfoundry/cli / ToFields

Method ToFields

cf/api/resources/events.go:39–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37}
38
39func (resource EventResourceNewV2) ToFields() models.EventFields {
40 metadata := generic.NewMap(resource.Entity.Metadata)
41 if metadata.Has("request") {
42 metadata = generic.NewMap(metadata.Get("request"))
43 }
44
45 return models.EventFields{
46 GUID: resource.Metadata.GUID,
47 Name: resource.Entity.Type,
48 Timestamp: resource.Entity.Timestamp,
49 Description: formatDescription(metadata, knownMetadataKeys),
50 Actor: resource.Entity.Actor,
51 ActorName: resource.Entity.ActorName,
52 }
53}
54
55func (resource EventResourceOldV2) ToFields() models.EventFields {
56 return models.EventFields{

Callers

nothing calls this directly

Calls 4

HasMethod · 0.95
GetMethod · 0.95
NewMapFunction · 0.92
formatDescriptionFunction · 0.70

Tested by

no test coverage detected