MCPcopy Create free account
hub / github.com/dagger/dagger / CacheVolume

Method CacheVolume

sdk/python/runtime/internal/dagger/dagger.gen.go:12301–12322  ·  view source on GitHub ↗

Constructs a cache volume for a given cache key.

(key string, opts ...CacheVolumeOpts)

Source from the content-addressed store, hash-verified

12299
12300// Constructs a cache volume for a given cache key.
12301func (r *Query) CacheVolume(key string, opts ...CacheVolumeOpts) *CacheVolume {
12302 q := r.query.Select("cacheVolume")
12303 for i := len(opts) - 1; i >= 0; i-- {
12304 // `source` optional argument
12305 if !querybuilder.IsZeroValue(opts[i].Source) {
12306 q = q.Arg("source", opts[i].Source)
12307 }
12308 // `sharing` optional argument
12309 if !querybuilder.IsZeroValue(opts[i].Sharing) {
12310 q = q.Arg("sharing", opts[i].Sharing)
12311 }
12312 // `owner` optional argument
12313 if !querybuilder.IsZeroValue(opts[i].Owner) {
12314 q = q.Arg("owner", opts[i].Owner)
12315 }
12316 }
12317 q = q.Arg("key", key)
12318
12319 return &CacheVolume{
12320 query: q,
12321 }
12322}
12323
12324// Creates an empty changeset
12325func (r *Query) Changeset() *Changeset {

Callers 3

WithBaseMethod · 0.45
uvMethod · 0.45
WithSDKMethod · 0.45

Calls 2

SelectMethod · 0.65
ArgMethod · 0.45

Tested by

no test coverage detected