artifact

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoArtifactMigrate

func DoArtifactMigrate(
	source *config.Source,
	artifactType model.ArtifactType,
	target *config.Target,
	pool *pool.WorkerPool,
	artifacts []*model.Artifact,
	record *model.MigrateRecord)

DoArtifactMigrate 获取仓库实例

func FilterSnapshotLatestVersion

func FilterSnapshotLatestVersion(source *config.Source, items []*model.Artifact) []*model.Artifact

filterSnapshotLatestVersion snapshot包过滤最新版本,maven-metadata文件放入列表尾部 file UploadSuffixPath : org/example/gradle1/1.0.0-SNAPSHOT/gradle1-1.0.0-20250114.113912-1.jar metadata UploadSuffixPath: org/example/gradle1/1.0.0-SNAPSHOT/maven-metadata.xml

func GenRespFailedLog

func GenRespFailedLog(resp *resty.Response) string

func NewComposerArtifact

func NewComposerArtifact() *composerArtifact

func NewDockerArtifact

func NewDockerArtifact() *dockerArtifact

func SortReleaseArtifacts

func SortReleaseArtifacts(items []*model.Artifact) []*model.Artifact

sortReleaseArtifacts 排序release版本的文件

Types

type Artifact

type Artifact interface {
	// DoMigrate 迁移制品.
	DoMigrate(
		source *config.Source,
		target *config.Target,
		artifacts []*model.Artifact,
		pool *pool.WorkerPool,
		record *model.MigrateRecord,
	) *model.MigrateRecord
}

type ByPkgName

type ByPkgName []*model.Artifact

func (ByPkgName) Len

func (p ByPkgName) Len() int

func (ByPkgName) Less

func (p ByPkgName) Less(i, j int) bool

func (ByPkgName) Swap

func (p ByPkgName) Swap(i, j int)

type MavenArtifact

type MavenArtifact struct {
}

func NewMavenArtifact

func NewMavenArtifact() *MavenArtifact

func (*MavenArtifact) DoMigrate

func (m *MavenArtifact) DoMigrate(
	source *config.Source,
	target *config.Target,
	artifacts []*model.Artifact,
	pool *pool.WorkerPool,
	record *model.MigrateRecord,
) *model.MigrateRecord

type NpmArtifact

type NpmArtifact struct {
}

func NewNpmArtifact

func NewNpmArtifact() *NpmArtifact

func (*NpmArtifact) DoMigrate

func (n *NpmArtifact) DoMigrate(
	source *config.Source,
	target *config.Target,
	artifacts []*model.Artifact,
	pool *pool.WorkerPool,
	record *model.MigrateRecord,
) *model.MigrateRecord

DoMigrate 迁移

type NugetArtifact

type NugetArtifact struct {
}

func NewNugetArtifact

func NewNugetArtifact() *NugetArtifact

func (*NugetArtifact) DoMigrate

func (n *NugetArtifact) DoMigrate(
	source *config.Source,
	target *config.Target,
	artifacts []*model.Artifact,
	pool *pool.WorkerPool,
	record *model.MigrateRecord,
) *model.MigrateRecord

DoMigrate 迁移

type PyPIArtifact

type PyPIArtifact struct {
}

func NewPyPIArtifact

func NewPyPIArtifact() *PyPIArtifact

func (*PyPIArtifact) DoMigrate

func (n *PyPIArtifact) DoMigrate(
	source *config.Source,
	target *config.Target,
	artifacts []*model.Artifact,
	pool *pool.WorkerPool,
	record *model.MigrateRecord,
) *model.MigrateRecord

DoMigrate 迁移

func (*PyPIArtifact) FilterArtifacts

func (n *PyPIArtifact) FilterArtifacts(source *config.Source, items []*model.Artifact) ([]*model.Artifact, []*model.MigrateIgnoreInfo)

FilterArtifacts 按包名称

Source Files

  • artifact.go
  • composer.go
  • docker.go
  • maven.go
  • npm.go
  • nuget.go
  • pypi.go

Jump to

Keyboard shortcuts

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