registry

package
v0.0.0-...-88e62a7 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ItemInSlice

func ItemInSlice(item string, slice []string) bool

ItemInSlice check if item is an element of slice

func PrettySize

func PrettySize(size float64) string

PrettySize format bytes in more readable units.

func PurgeOldTags

func PurgeOldTags(client *Client, purgeDryRun bool, purgeTagsKeepDays, purgeTagsKeepCount int)

PurgeOldTags purge old tags.

func SetupLogging

func SetupLogging(name string) *logrus.Entry

SetupLogging setup logger

func SortedMapKeys

func SortedMapKeys(m interface{}) []string

SortedMapKeys sort keys of the map where values can be of any type.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client main class.

func NewClient

func NewClient(url string, verifyTLS bool, username, password string) *Client

NewClient initialize Client.

func (*Client) CountTags

func (c *Client) CountTags(interval uint8)

CountTags count repository tags in background regularly.

func (*Client) DeleteTag

func (c *Client) DeleteTag(repo, tag string)

DeleteTag delete image tag.

func (*Client) ManifestList

func (c *Client) ManifestList(repo, tag string) (string, []gjson.Result)

ManifestList gets manifest list entries for a tag for the repo.

func (*Client) Namespaces

func (c *Client) Namespaces() []string

Namespaces list repo namespaces.

func (*Client) Repositories

func (c *Client) Repositories(useCache bool) map[string][]string

Repositories list repos by namespaces where 'library' is the default one.

func (*Client) TagCounts

func (c *Client) TagCounts() map[string]int

TagCounts return map with tag counts.

func (*Client) TagInfo

func (c *Client) TagInfo(repo, tag string, v1only bool) (string, string, string)

TagInfo get image info for the repo tag or digest sha256.

func (*Client) Tags

func (c *Client) Tags(repo string) []string

Tags get tags for the repo.

Jump to

Keyboard shortcuts

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