(fields []string)
| 152 | } |
| 153 | |
| 154 | func (pi *portInfo) ExportData(fields []string) map[string]interface{} { |
| 155 | data := map[string]interface{}{} |
| 156 | |
| 157 | for _, f := range fields { |
| 158 | switch f { |
| 159 | case "sourcePort": |
| 160 | data[f] = pi.Port.PortNumber |
| 161 | case "visibility": |
| 162 | data[f] = portforwarder.AccessControlEntriesToVisibility(pi.Port.AccessControl.Entries) |
| 163 | case "label": |
| 164 | data[f] = pi.Label() |
| 165 | case "browseUrl": |
| 166 | data[f] = pi.BrowseURL() |
| 167 | default: |
| 168 | panic("unknown field: " + f) |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | return data |
| 173 | } |
| 174 | |
| 175 | type devContainerResult struct { |
| 176 | devContainer *devContainer |
nothing calls this directly
no test coverage detected