StorageReference returns the image's reference to the containers storage using the image ID.
()
| 875 | // StorageReference returns the image's reference to the containers storage |
| 876 | // using the image ID. |
| 877 | func (i *Image) StorageReference() (types.ImageReference, error) { |
| 878 | if i.storageReference != nil { |
| 879 | return i.storageReference, nil |
| 880 | } |
| 881 | ref, err := storageTransport.Transport.ParseStoreReference(i.runtime.store, "@"+i.ID()) |
| 882 | if err != nil { |
| 883 | return nil, err |
| 884 | } |
| 885 | i.storageReference = ref |
| 886 | return ref, nil |
| 887 | } |
| 888 | |
| 889 | // source returns the possibly cached image reference. |
| 890 | func (i *Image) source(ctx context.Context) (types.ImageSource, error) { |
no test coverage detected