Retrieves this container plus a file mounted at the given path.
(path string, source *File, opts ...ContainerWithMountedFileOpts)
| 3311 | |
| 3312 | // Retrieves this container plus a file mounted at the given path. |
| 3313 | func (r *Container) WithMountedFile(path string, source *File, opts ...ContainerWithMountedFileOpts) *Container { |
| 3314 | assertNotNil("source", source) |
| 3315 | q := r.query.Select("withMountedFile") |
| 3316 | for i := len(opts) - 1; i >= 0; i-- { |
| 3317 | // `owner` optional argument |
| 3318 | if !querybuilder.IsZeroValue(opts[i].Owner) { |
| 3319 | q = q.Arg("owner", opts[i].Owner) |
| 3320 | } |
| 3321 | // `expand` optional argument |
| 3322 | if !querybuilder.IsZeroValue(opts[i].Expand) { |
| 3323 | q = q.Arg("expand", opts[i].Expand) |
| 3324 | } |
| 3325 | } |
| 3326 | q = q.Arg("path", path) |
| 3327 | q = q.Arg("source", source) |
| 3328 | |
| 3329 | return &Container{ |
| 3330 | query: q, |
| 3331 | } |
| 3332 | } |
| 3333 | |
| 3334 | // ContainerWithMountedSecretOpts contains options for Container.WithMountedSecret |
| 3335 | type ContainerWithMountedSecretOpts struct { |
no test coverage detected