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