Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactSlice ¶
根据 PushTime 对 Artifact 排序
func (ArtifactSlice) Latest ¶
func (t ArtifactSlice) Latest() harborapi.Artifact
func (ArtifactSlice) Len ¶
func (t ArtifactSlice) Len() int
func (ArtifactSlice) Less ¶
func (t ArtifactSlice) Less(i, j int) bool
func (ArtifactSlice) Sort ¶
func (t ArtifactSlice) Sort() ArtifactSlice
func (ArtifactSlice) Swap ¶
func (t ArtifactSlice) Swap(i, j int)
type NotFoundRepoError ¶
type NotFoundRepoError struct {
// contains filtered or unexported fields
}
NotFoundRepoError 未找到对应的 repo
func (NotFoundRepoError) Error ¶
func (e NotFoundRepoError) Error() string
type NotSupportRegisterError ¶
type NotSupportRegisterError struct {
// contains filtered or unexported fields
}
NotSupportRegisterError 不支持的注册中心地址
func (NotSupportRegisterError) Error ¶
func (e NotSupportRegisterError) Error() string
type RepositoryService ¶
type RepositoryService interface { // 获取镜像最新的 tag LatestTag(host, projectName, repoName string) (tag string, err error) }
RepositoryService 镜像服务
func NewRepositoryService ¶
func NewRepositoryService(options *RepositoryServiceOptions) (RepositoryService, error)
TODO support more repository NewRepositoryService
type RepositoryServiceOptions ¶
type RepositoryServiceOptions struct { Mock bool `json:"mock,omitempty" yaml:"mock,omitempty"` MockTags map[string]string `json:"mockTags,omitempty" yaml:"mockTags,omitempty"` // repository address Host string `json:"host" yaml:"host"` Protocol string `json:"protocol" yaml:"protocol"` InsecureSkipVerify bool `json:"insecureSkipVerify" yaml:"insecureSkipVerify"` ApiPathPrefix string `json:"apiPathPrefix" yaml:"apiPathPrefix"` }
func NewRepositoryServiceOptions ¶
func NewRepositoryServiceOptions() *RepositoryServiceOptions
func (*RepositoryServiceOptions) AddFlags ¶
func (r *RepositoryServiceOptions) AddFlags(fs *pflag.FlagSet)
func (*RepositoryServiceOptions) Validate ¶
func (r *RepositoryServiceOptions) Validate() (errs []error)
Click to show internal directories.
Click to hide internal directories.