repository

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultPkgNameAndVersion

func GetDefaultPkgNameAndVersion(values string) (pkg string, version string)

GetDefaultPkgNameAndVersion 获取包名和版本号 从如下两中种格式中获取 pkgName合version pkgName:version --> pkgName version pkgName --> pkgName ""

func GetMavenPkgNameAndVersion

func GetMavenPkgNameAndVersion(values string) (pkg string, version string)

GetMavenPkgNameAndVersion 获取包名和版本号 从如下三种格式中获取 pkgName合version org.test:cnb:version --> org.test version org.test:cnb --> org.test ""

func GetNpmPkgNameAndVersion

func GetNpmPkgNameAndVersion(values string) (pkg string, version string)

GetNpmPkgNameAndVersion 获取包名和版本号 从如下三种格式中获取 pkgName合version @scope/name:version ---> @scope/name version pkgName:version --> pkgName version pkgName --> pkgName ""

func GetPkgNameAndVersion

func GetPkgNameAndVersion(artifactType model.ArtifactType, values string) (pkg string, version string)

func NewCodingRepository

func NewCodingRepository(source *config.Source, target *config.Target, pool *pool.WorkerPool) *codingRepository

func NewTcrRepository

func NewTcrRepository(source *config.Source, target *config.Target, pool *pool.WorkerPool) *tcrRepository

func RestyClient

func RestyClient() *resty.Client

Types

type ArtifactIteraterFunc

type ArtifactIteraterFunc func() ([]*model.Artifact, bool, error)

type CodeUpRepository

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

func NewCodeUpRepository

func NewCodeUpRepository(source *config.Source, target *config.Target, pool *pool.WorkerPool) *CodeUpRepository

func (*CodeUpRepository) ListArtifacts

func (c *CodeUpRepository) ListArtifacts(
	source *config.Source,
	artifactType model.ArtifactType,
	continuationToken int) ([]*model.Artifact, int, error)

type JfrogRepository

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

func NewJfrogRepository

func NewJfrogRepository(source *config.Source, target *config.Target, pool *pool.WorkerPool) *JfrogRepository

func (*JfrogRepository) MigrateArtifacts

func (j *JfrogRepository) MigrateArtifacts(artifactType model.ArtifactType, record *model.MigrateRecord) error

MigrateArtifacts 从源仓库拉取制品

https://jfrog.com/help/r/jfrog-rest-apis/artifactory-rest-apis

type NexusRepository

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

func NewNexusRepository

func NewNexusRepository(source *config.Source, target *config.Target, pool *pool.WorkerPool) *NexusRepository

func (*NexusRepository) GenNexusOpenApiURL

func (n *NexusRepository) GenNexusOpenApiURL(source *config.Source) string

GenNexusOpenApiURL 获取openApi的url 通过仓库的url 补齐 scheme ,host, registry scheme 为http或者https host 为仓库的host 带端口则补齐端口 registry 为仓库的registry URL 的最后一个路径

func (*NexusRepository) GetNexusRepoListURL

func (n *NexusRepository) GetNexusRepoListURL(source *config.Source) string

func (*NexusRepository) ListArtifacts

func (n *NexusRepository) ListArtifacts(
	artifactType model.ArtifactType,
	continuationToken string,
	name string) ([]*model.Artifact, string, error)

ListArtifacts 从源仓库拉取制品

https://help.sonatype.com/en/search-api.html

func (*NexusRepository) MigrateArtifactByName

func (n *NexusRepository) MigrateArtifactByName(
	artifactType model.ArtifactType,
	record *model.MigrateRecord,
	name string) error

func (*NexusRepository) MigrateArtifacts

func (n *NexusRepository) MigrateArtifacts(artifactType model.ArtifactType, record *model.MigrateRecord) error

type OtherRepository

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

func NewOtherRepository

func NewOtherRepository(source *config.Source, target *config.Target, pool *pool.WorkerPool) *OtherRepository

func (*OtherRepository) MigrateArtifacts

func (c *OtherRepository) MigrateArtifacts(artifactType model.ArtifactType, record *model.MigrateRecord) error

type Repository

type Repository interface {
	//MigrateArtifacts 迁移制品列表
	MigrateArtifacts(
		artifactType model.ArtifactType,
		record *model.MigrateRecord) error
}

func NewRepository

func NewRepository(source *config.Source, target *config.Target, pool *pool.WorkerPool) Repository

NewRepository 创建 仓库 实例.

Source Files

  • codeup.go
  • coding.go
  • jfrog.go
  • nexus.go
  • other.go
  • repository.go
  • tcr.go

Jump to

Keyboard shortcuts

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