(eventStream *management.EventStream)
| 110 | } |
| 111 | |
| 112 | func makeEventStreamView(eventStream *management.EventStream) (*eventStreamView, error) { |
| 113 | var subscriptions []string |
| 114 | for _, subs := range eventStream.GetSubscriptions() { |
| 115 | subscriptions = append(subscriptions, subs.GetEventStreamSubscriptionType()) |
| 116 | } |
| 117 | |
| 118 | configuration, err := toJSONString(eventStream.GetDestination().GetEventStreamDestinationConfiguration()) |
| 119 | if err != nil { |
| 120 | return nil, err |
| 121 | } |
| 122 | |
| 123 | return &eventStreamView{ |
| 124 | ID: ansi.Faint(eventStream.GetID()), |
| 125 | Name: eventStream.GetName(), |
| 126 | Type: eventStream.Destination.GetEventStreamDestinationType(), |
| 127 | Status: eventStream.GetStatus(), |
| 128 | Subscriptions: subscriptions, |
| 129 | Configuration: configuration, |
| 130 | raw: eventStream, |
| 131 | }, nil |
| 132 | } |
| 133 | |
| 134 | /*----------------------------------------------- Delivery ------------------------------------------------.*/ |
| 135 |
no test coverage detected