registry

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	Addr      string
	Ak        string
	Sk        string
	Region    string
	Namespace string
}

type GetRepoImageDetailOption

type GetRepoImageDetailOption struct {
	Endpoint
	Image string
	Tag   string
}

type Image

type Image struct {
	Created string `json:"createdAt"`
	Updated string `json:"updatedAt"`
	Size    int64  `json:"size"`
	Tag     string `json:"tag"`
	Hash    string `json:"hash"`
}

Image ...

type ImagesResp

type ImagesResp struct {
	NameSpace string  `json:"namespace"`
	Name      string  `json:"name"`
	Total     int     `json:"total"`
	Images    []Image `json:"images"`
	NextPage  int
}

ImagesResp ...

type ListRepoImagesOption

type ListRepoImagesOption struct {
	Endpoint
	Repos []string
}

type Repo

type Repo struct {
	Name      string   `json:"name"`
	Namespace string   `json:"namespace"`
	Tags      []string `json:"tags"`
}

Repo ...

type ReposResp

type ReposResp struct {
	Repos    []*Repo `json:"repos"`
	Total    int     `json:"total"`
	NextPage int
}

ReposResp ...

type ReverseStringSlice

type ReverseStringSlice []string

func (ReverseStringSlice) Len

func (rss ReverseStringSlice) Len() int

Len is the number of elements in the collection.

func (ReverseStringSlice) Less

func (rss ReverseStringSlice) Less(i, j int) bool

Less reports whether the element with index i should sort before the element with index j.

func (ReverseStringSlice) Swap

func (rss ReverseStringSlice) Swap(i, j int)

Swap swaps the elements with indexes i and j.

type Service

type Service interface {
	ListRepoImages(option ListRepoImagesOption, log *zap.SugaredLogger) (*ReposResp, error)
	GetImageInfo(option GetRepoImageDetailOption, log *zap.SugaredLogger) (*commonmodels.DeliveryImage, error)
}

func NewV2Service

func NewV2Service(provider string) Service

type SwrService added in v1.3.0

type SwrService struct {
}

func (*SwrService) GetImageInfo added in v1.3.0

func (s *SwrService) GetImageInfo(option GetRepoImageDetailOption, log *zap.SugaredLogger) (di *commonmodels.DeliveryImage, err error)

func (*SwrService) ListRepoImages added in v1.3.0

func (s *SwrService) ListRepoImages(option ListRepoImagesOption, log *zap.SugaredLogger) (resp *ReposResp, err error)

Jump to

Keyboard shortcuts

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