types

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CfgFile string
	Manager RegistryManager
)

Functions

This section is empty.

Types

type DeleteController

type DeleteController struct {
	DryRun       bool          `mapstructure:"dry-run"`
	IntervalHour time.Duration `mapstructure:"interval-hour"`
	MixCount     int           `mapstructure:"mix-count"`
	Tags         struct {
		Include struct {
			Keys      string `mapstructure:"keys"`
			Regex     string `mapstructure:"regex"`
			KeysRegex string
		} `mapstructure:"include"`
		Exclude struct {
			Keys      string `mapstructure:"keys"`
			Regex     string `mapstructure:"regex"`
			KeysRegex string
		} `mapstructure:"exclude"`
	} `mapstructure:"tags"`
}

func (*DeleteController) NeedDeleteTag

func (d *DeleteController) NeedDeleteTag(tag Tag, count *int) bool

type RegistryManager

type RegistryManager struct {
	Server                string           `mapstructure:"server"`
	InsecureSkipTLSVerify bool             `mapstructure:"insecure-skip-tls-verify"`
	Username              string           `mapstructure:"username"`
	Password              string           `mapstructure:"password"`
	DeleteController      DeleteController `mapstructure:"delete-policy"`
	Client                *registry.Registry
}

func (*RegistryManager) DeleteManifest

func (r *RegistryManager) DeleteManifest(repository, tag string)

func (*RegistryManager) Init

func (r *RegistryManager) Init()

初始化 registry 客户端及检验参数

func (*RegistryManager) Manifest

func (r *RegistryManager) Manifest(repository, reference string) *schema1.SignedManifest

获取镜像层信息

func (*RegistryManager) ManifestCreateTime

func (r *RegistryManager) ManifestCreateTime(s *schema1.SignedManifest) time.Time

通过镜像层信息解析镜像创建时间

func (*RegistryManager) Repositories

func (r *RegistryManager) Repositories() []string

获取仓库列表

func (*RegistryManager) TagObjs

func (r *RegistryManager) TagObjs(repository string) []Tag

获取带创建时间了的tag列表

func (*RegistryManager) Tags

func (r *RegistryManager) Tags(repository string) []string

获取tag列表

type Tag

type Tag struct {
	Name       string
	CreateTime time.Time
}

type Tags

type Tags []Tag

func (Tags) Len

func (tags Tags) Len() int

func (Tags) Less

func (tags Tags) Less(i, j int) bool

func (Tags) Swap

func (tags Tags) Swap(i, j int)

Jump to

Keyboard shortcuts

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