File: stubs.go

package info (click to toggle)
golang-github-containers-image 5.28.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,104 kB
  • sloc: sh: 194; makefile: 73
file content (27 lines) | stat: -rw-r--r-- 871 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Package stubs contains trivial stubs for parts of private.ImageDestination.
// It can be used from internal/wrapper, so it should not drag in any extra dependencies.
// Compare with imagedestination/impl, which might require non-trivial implementation work.
//
// There are two kinds of stubs:
//
// First, there are pure stubs, like ImplementsPutBlobPartial. Those can just be included in an imageDestination
// implementation:
//
//	type yourDestination struct {
//		stubs.ImplementsPutBlobPartial
//		…
//	}
//
// Second, there are stubs with a constructor, like NoPutBlobPartialInitialize. The Initialize marker
// means that a constructor must be called:
//
//	type yourDestination struct {
//		stubs.NoPutBlobPartialInitialize
//		…
//	}
//
//	dest := &yourDestination{
//		…
//		NoPutBlobPartialInitialize: stubs.NoPutBlobPartial(ref),
//	}
package stubs