quay

package
v0.0.0-...-d8b41f4 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangTag

type ChangTag struct {
	ManifestDigest string `json:"manifest_digest,omitempty"`
	Expiration     int64  `json:"expiration,omitempty"`
}

ChangTag specifies the options to change an image tag

type Client

type Client struct {
	BaseURL *url.URL

	Tags      TagsServiceManager
	Manifests ManifestsServiceManager
	// contains filtered or unexported fields
}

Client represents the client to access quay.io

func NewClient

func NewClient(httpClient *http.Client) *Client

NewClient builds a new quay.io client

func (*Client) Do

func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*http.Response, error)

Do sends the request to quay.io and parse the response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.

func (*Client) NewRequest

func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error)

NewRequest builds a new http request to send to quay.io The relative path should be specified without a preceding slash

type ListManifestLabelsOptions

type ListManifestLabelsOptions struct {
	Filter string `url:"filter,omitempty"`
}

ListManifestLabelsOptions specifies the options when list manifest labels

type ListTagsOptions

type ListTagsOptions struct {
	OnlyActiveTags bool   `url:"onlyActiveTags,omitempty"`
	Page           int    `url:"page,omitempty"`
	Limit          int    `url:"limit,omitempty"`
	SpecificTag    string `url:"specificTag,omitempty"`
}

ListTagsOptions specifies the options to use when listing image tags

type ManifestLabel

type ManifestLabel struct {
	Id    *string `json:"id,omitempty"`
	Key   *string `json:"key,omitempty"`
	Value *string `json:"value,omitempty"`
}

ManifestLabel represents a label for an image

type ManifestLabelsList

type ManifestLabelsList struct {
	Labels []ManifestLabel `json:"labels,omitempty"`
}

ManifestLabelsList represents a list of ManifestLabels

type ManifestsService

type ManifestsService service

ManifestsService implements ManifestsServiceManager

func (*ManifestsService) ListLabels

func (m *ManifestsService) ListLabels(ctx context.Context, repository string, manifestRef string, options *ListManifestLabelsOptions) (*ManifestLabelsList, *http.Response, error)

Get labels for the given manifest of an image See https://docs.quay.io/api/swagger/#!/manifest/listManifestLabels

type ManifestsServiceManager

type ManifestsServiceManager interface {
	ListLabels(ctx context.Context, repository string, manifestRef string, options *ListManifestLabelsOptions) (*ManifestLabelsList, *http.Response, error)
}

ManifestsServiceManager manages the manifests of a repository See https://docs.quay.io/api/swagger/#!/manifest

type Tag

type Tag struct {
	Name           *string `json:"name,omitempty"`
	ImageId        *string `json:"image_id,omitempty"`
	ManifestDigest *string `json:"manifest_digest,omitempty"`
	DockerImageId  *string `json:"docker_image_id,omitempty"`
}

Tag represents an image tag on quay.io

func (*Tag) String

func (t *Tag) String() string

type TagList

type TagList struct {
	Tags []Tag `json:"tags,omitempty"`
	Page *int  `json:"page,omitempty"`
}

TagList represents a list of image tags on quay.io

type TagsService

type TagsService service

TagsService implements TagsServiceManager

func (*TagsService) Change

func (t *TagsService) Change(ctx context.Context, repository string, tag string, input *ChangTag) (*http.Response, error)

Change an image tag on the repo. See https://docs.quay.io/api/swagger/#!/tag/changeTag

func (*TagsService) List

func (t *TagsService) List(ctx context.Context, repository string, options *ListTagsOptions) (*TagList, *http.Response, error)

List the image tags of a repo. See https://docs.quay.io/api/swagger/#!/tag/listRepoTags

type TagsServiceManager

type TagsServiceManager interface {
	List(ctx context.Context, repository string, options *ListTagsOptions) (*TagList, *http.Response, error)
	Change(ctx context.Context, repository string, tag string, input *ChangTag) (*http.Response, error)
}

TagsServiceManager manages the tags of a repository. See https://docs.quay.io/api/swagger/#!/tag/

Jump to

Keyboard shortcuts

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