forked from openshift/client-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imagestreamimage.go
47 lines (41 loc) · 1.46 KB
/
imagestreamimage.go
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package v1
import (
image_v1 "github.com/openshift/api/image/v1"
scheme "github.com/openshift/client-go/image/clientset/versioned/scheme"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
rest "k8s.io/client-go/rest"
)
// ImageStreamImagesGetter has a method to return a ImageStreamImageInterface.
// A group's client should implement this interface.
type ImageStreamImagesGetter interface {
ImageStreamImages(namespace string) ImageStreamImageInterface
}
// ImageStreamImageInterface has methods to work with ImageStreamImage resources.
type ImageStreamImageInterface interface {
Get(name string, options v1.GetOptions) (*image_v1.ImageStreamImage, error)
ImageStreamImageExpansion
}
// imageStreamImages implements ImageStreamImageInterface
type imageStreamImages struct {
client rest.Interface
ns string
}
// newImageStreamImages returns a ImageStreamImages
func newImageStreamImages(c *ImageV1Client, namespace string) *imageStreamImages {
return &imageStreamImages{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the imageStreamImage, and returns the corresponding imageStreamImage object, and an error if there is any.
func (c *imageStreamImages) Get(name string, options v1.GetOptions) (result *image_v1.ImageStreamImage, err error) {
result = &image_v1.ImageStreamImage{}
err = c.client.Get().
Namespace(c.ns).
Resource("imagestreamimages").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do().
Into(result)
return
}