openshift/openshift.go
func (c *openshiftClient) getImage(ctx context.Context, imageStreamImageName string) (*image, error) {
	// FIXME: validate components per validation.IsValidPathSegmentName?
	path := fmt.Sprintf("/oapi/v1/namespaces/%s/imagestreamimages/%s@%s", c.ref.namespace, c.ref.stream, imageStreamImageName)
	body, err := c.doRequest(ctx, "GET", path, nil)
	if err != nil {
		return nil, err
	}
	// Note: This does absolutely no kind/version checking or conversions.
	var isi imageStreamImage
	if err := json.Unmarshal(body, &isi); err != nil {
		return nil, err
	}
	return &isi.Image, nil
}
func (c *openshiftClient) getImage(ctx context.Context, imageStreamImageName string) (*image, error) {
	// FIXME: validate components per validation.IsValidPathSegmentName?
	path := fmt.Sprintf("/oapi/v1/namespaces/%s/imagestreamimages/%s@%s", c.ref.namespace, c.ref.stream, imageStreamImageName)
	body, err := c.doRequest(ctx, "GET", path, nil)
	if err != nil {
		return nil, err
	}
	// Note: This does absolutely no kind/version checking or conversions.
	var isi imageStreamImage
	if err := json.Unmarshal(body, &isi); err != nil {
		return nil, err
	}
	return &isi.Image, nil
}
func ( c * openshiftClient ) getImage ( ctx context . Context , imageStreamImageName string ) ( * image , error ) { // FIXME: validate components per validation.IsValidPathSegmentName? path := fmt . Sprintf ( " " , c . ref . namespace , c . ref . stream , imageStreamImageName ) body , err := c . doRequest ( ctx , " " , path , nil ) if err != nil { return nil , err } // Note: This does absolutely no kind/version checking or conversions. var isi imageStreamImage if err := json . Unmarshal ( body , & isi ) ; err != nil { return nil , err } return & isi . Image , nil }
// getImage loads the specified image object.
getImage loads the specified image object .