(containerpb *containersapi.Container)
| 172 | } |
| 173 | |
| 174 | func containerFromProto(containerpb *containersapi.Container) containers.Container { |
| 175 | var runtime containers.RuntimeInfo |
| 176 | if containerpb.Runtime != nil { |
| 177 | runtime = containers.RuntimeInfo{ |
| 178 | Name: containerpb.Runtime.Name, |
| 179 | Options: containerpb.Runtime.Options, |
| 180 | } |
| 181 | } |
| 182 | extensions := make(map[string]typeurl.Any) |
| 183 | for k, v := range containerpb.Extensions { |
| 184 | extensions[k] = v |
| 185 | } |
| 186 | return containers.Container{ |
| 187 | ID: containerpb.ID, |
| 188 | Labels: containerpb.Labels, |
| 189 | Image: containerpb.Image, |
| 190 | Runtime: runtime, |
| 191 | Spec: containerpb.Spec, |
| 192 | Snapshotter: containerpb.Snapshotter, |
| 193 | SnapshotKey: containerpb.SnapshotKey, |
| 194 | CreatedAt: protobuf.FromTimestamp(containerpb.CreatedAt), |
| 195 | UpdatedAt: protobuf.FromTimestamp(containerpb.UpdatedAt), |
| 196 | Extensions: extensions, |
| 197 | SandboxID: containerpb.Sandbox, |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | func containersFromProto(containerspb []*containersapi.Container) []containers.Container { |
| 202 | var containers []containers.Container |
no test coverage detected
searching dependent graphs…