client

package
v0.0.0-...-b04963e Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultGcrRepo       = "k8s.gcr.io"
	DefaultRetryTimes    = 5
	DefaultRetryInterval = time.Second * 5
	DefaultTimeout       = time.Second * 20
	DefaultPushTimeout   = time.Minute * 15
	// LegacyConfigMediaType should be replaced by OCI image spec.
	// More detail: docker/distribution#1622
	LegacyConfigMediaType = "application/octet-stream"
)

Variables

View Source
var (
	ErrUnsupportedMediaType = errors.New("Unsupported MediaType")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	*resty.Client
	// contains filtered or unexported fields
}

func New

func New(options *Options) *Client

func (*Client) AllImages

func (c *Client) AllImages() ([]string, error)

func (*Client) AllTags

func (c *Client) AllTags(baseName string) ([]string, error)

func (*Client) AllTagsWithRepo

func (c *Client) AllTagsWithRepo(repo, baseName string) ([]string, error)

func (*Client) ManifestCheckSum

func (c *Client) ManifestCheckSum(imageName string) (uint32, error)

func (*Client) Sync

func (c *Client) Sync(src, dst string) error

type Manifest

type Manifest struct {
	MediaType     string          `json:"mediaType"`
	SchemaVersion int             `json:"schemaVersion"`
	Signatures    interface{}     `json:"signatures"`
	Config        *ManifestConfig `json:"config""`
}

type ManifestConfig

type ManifestConfig struct {
	MediaType string `json:"mediaType"`
}

type Options

type Options struct {
	Username      string
	Password      string
	Token         string
	Repo          string
	Retry         int
	RetryInterval time.Duration
	ReqTimeout    time.Duration
	PushTimeout   time.Duration
	Ctx           context.Context
	ImageSet      *deps.ImageSet
	AdditionalNS  []string
}

func NewDefaultOptions

func NewDefaultOptions() *Options

Jump to

Keyboard shortcuts

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