flexpackupload

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactInfo

type ArtifactInfo struct {
	Type        string `json:"type"`        // e.g., "wheel", "sdist", "jar", "gem"
	Name        string `json:"name"`        // artifact filename
	Path        string `json:"path"`        // local file path
	SHA1        string `json:"sha1"`        // SHA1 checksum
	SHA256      string `json:"sha256"`      // SHA256 checksum
	MD5         string `json:"md5"`         // MD5 checksum
	Size        int64  `json:"size"`        // file size in bytes
	Repository  string `json:"repository"`  // target repository URL
	PublishedAt string `json:"publishedAt"` // publication timestamp (ISO 8601)
}

ArtifactInfo represents metadata about a built package artifact

type FlexPackUploadManager

type FlexPackUploadManager interface {
	// GetBuildArtifacts returns a list of artifacts (packages) that were built/published
	GetBuildArtifacts() []ArtifactInfo

	// CalculateArtifactChecksums calculates checksums for all built artifacts
	CalculateArtifactChecksums() []map[string]interface{}

	// GetPublishCommand returns the command used to publish/upload packages
	GetPublishCommand() string

	// GetArtifactRepository returns the target repository URL where packages are published
	GetArtifactRepository() string

	// ValidateArtifacts checks if artifacts are ready for publication
	ValidateArtifacts() error

	// GetPublishMetadata returns additional metadata about the publish operation
	GetPublishMetadata() map[string]interface{}
}

FlexPackUploadManager defines the interface for package manager upload/publish operations

type PoetryProjectInfo

type PoetryProjectInfo struct {
	Tool struct {
		Poetry struct {
			Name        string   `toml:"name"`
			Version     string   `toml:"version"`
			Description string   `toml:"description"`
			Authors     []string `toml:"authors"`
			Repository  string   `toml:"repository"`
		} `toml:"poetry"`
	} `toml:"tool"`
}

PoetryProjectInfo represents Poetry project metadata from pyproject.toml

type PoetryUploadManager

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

PoetryUploadManager implements basic Poetry upload functionality

func NewPoetryUploadManager

func NewPoetryUploadManager(config UploadConfig) (*PoetryUploadManager, error)

NewPoetryUploadManager creates a new Poetry upload manager

func (*PoetryUploadManager) BuildArtifacts

func (p *PoetryUploadManager) BuildArtifacts() (*PublishResult, error)

BuildArtifacts builds Poetry packages using 'poetry build'

func (*PoetryUploadManager) GetArtifactRepository

func (p *PoetryUploadManager) GetArtifactRepository() string

GetArtifactRepository returns the target repository URL

func (*PoetryUploadManager) GetBuildArtifacts

func (p *PoetryUploadManager) GetBuildArtifacts() []ArtifactInfo

GetBuildArtifacts returns a list of artifacts that were built by Poetry

func (*PoetryUploadManager) GetPublishCommand

func (p *PoetryUploadManager) GetPublishCommand() string

GetPublishCommand returns the Poetry publish command

func (*PoetryUploadManager) GetPublishMetadata

func (p *PoetryUploadManager) GetPublishMetadata() map[string]interface{}

GetPublishMetadata returns additional metadata about the publish operation

func (*PoetryUploadManager) PublishArtifacts

func (p *PoetryUploadManager) PublishArtifacts() (*PublishResult, error)

PublishArtifacts publishes Poetry packages using 'poetry publish'

type PublishResult

type PublishResult struct {
	Success    bool                   `json:"success"`
	Command    string                 `json:"command"`
	Output     string                 `json:"output"`
	Error      string                 `json:"error,omitempty"`
	Artifacts  []ArtifactInfo         `json:"artifacts"`
	Repository string                 `json:"repository"`
	Duration   string                 `json:"duration"`
	Metadata   map[string]interface{} `json:"metadata,omitempty"`
}

PublishResult represents the result of a package publish operation

type UploadConfig

type UploadConfig struct {
	WorkingDirectory string            `json:"workingDirectory"`
	RepositoryURL    string            `json:"repositoryURL"`
	Username         string            `json:"username"`
	Password         string            `json:"password"`
	Token            string            `json:"token"`
	DryRun           bool              `json:"dryRun"`
	ExtraArgs        []string          `json:"extraArgs"`
	Environment      map[string]string `json:"environment"`
}

UploadConfig holds configuration for package upload operations

Jump to

Keyboard shortcuts

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