images

package
v0.5.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package images manages application images on KraftCloud.

Index

Constants

View Source
const Endpoint = "/images"

Endpoint is the public path for the images service.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImagesService

type ImagesService interface {
	kcclient.ServiceClient[ImagesService]

	// Lists all existing images. You can filter by digest, tag and based on
	// whether the image is public or not. The returned groups fulfill all
	// provided filter criteria. No particular value is assumed if a filter is not
	// part of the request.
	//
	// See: https://docs.kraft.cloud/api/v1/images/#list-existing-images
	List(ctx context.Context) (*kcclient.ServiceResponse[ListResponseItem], error)

	// Delete an image by its provided name.
	DeleteByName(ctx context.Context, name string) error
}

func NewImagesClientFromOptions

func NewImagesClientFromOptions(opts *options.Options) ImagesService

NewImagesClientFromOptions instantiates a new image services client based on the provided pre-existing options.

type ListResponseItem added in v0.5.0

type ListResponseItem struct {
	Digest      string   `json:"digest"`
	Tags        []string `json:"tags"`
	Initrd      bool     `json:"initrd"`
	SizeInBytes int64    `json:"size_in_bytes"`
	Args        string   `json:"args"`
	KernelArgs  string   `json:"kernel_args"`

	kcclient.APIResponseCommon
}

ListResponseItem is a data item from a response to a /images/list request. https://docs.kraft.cloud/api/v1/images/#list-existing-images

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL