Documentation
¶
Index ¶
- func GetDefaultPkgNameAndVersion(values string) (pkg string, version string)
- func GetMavenPkgNameAndVersion(values string) (pkg string, version string)
- func GetNpmPkgNameAndVersion(values string) (pkg string, version string)
- func GetPkgNameAndVersion(artifactType model.ArtifactType, values string) (pkg string, version string)
- func NewCodingRepository(source *config.Source, target *config.Target, pool *pool.WorkerPool) *codingRepository
- func NewTcrRepository(source *config.Source, target *config.Target, pool *pool.WorkerPool) *tcrRepository
- func RestyClient() *resty.Client
- type ArtifactIteraterFunc
- type CodeUpRepository
- type JfrogRepository
- type NexusRepository
- func (n *NexusRepository) GenNexusOpenApiURL(source *config.Source) string
- func (n *NexusRepository) GetNexusRepoListURL(source *config.Source) string
- func (n *NexusRepository) ListArtifacts(artifactType model.ArtifactType, continuationToken string, name string) ([]*model.Artifact, string, error)
- func (n *NexusRepository) MigrateArtifactByName(artifactType model.ArtifactType, record *model.MigrateRecord, name string) error
- func (n *NexusRepository) MigrateArtifacts(artifactType model.ArtifactType, record *model.MigrateRecord) error
- type OtherRepository
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultPkgNameAndVersion ¶
GetDefaultPkgNameAndVersion 获取包名和版本号 从如下两中种格式中获取 pkgName合version pkgName:version --> pkgName version pkgName --> pkgName ""
func GetMavenPkgNameAndVersion ¶
GetMavenPkgNameAndVersion 获取包名和版本号 从如下三种格式中获取 pkgName合version org.test:cnb:version --> org.test version org.test:cnb --> org.test ""
func GetNpmPkgNameAndVersion ¶
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 NewTcrRepository ¶
func RestyClient ¶
func RestyClient() *resty.Client
Types ¶
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)
func (*CodeUpRepository) MigrateArtifacts ¶
func (c *CodeUpRepository) MigrateArtifacts(artifactType model.ArtifactType, record *model.MigrateRecord) 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
Click to show internal directories.
Click to hide internal directories.