WithDescriptor specifies an OCI descriptor. Writer may optionally use the descriptor internally for resolving the location of the actual data. Write does not require any field of desc to be set. If the data size is unknown, desc.Size should be set to 0. Some implementations may also accept negative
(desc ocispec.Descriptor)
| 202 | // If the data size is unknown, desc.Size should be set to 0. |
| 203 | // Some implementations may also accept negative values as "unknown". |
| 204 | func WithDescriptor(desc ocispec.Descriptor) WriterOpt { |
| 205 | return func(opts *WriterOpts) error { |
| 206 | opts.Desc = desc |
| 207 | return nil |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | // WithRef specifies a ref string. |
| 212 | func WithRef(ref string) WriterOpt { |
no outgoing calls
searching dependent graphs…