Documentation
¶
Index ¶
- func CreateTargetProperties(properties []string) (*utils.Properties, error)
- func DownloadArtifact(artifactURL string, progressFunc progress.ProgressFunc) (string, error)
- func ExtractSingleFileFromZip(zipFilePath string, options *ExtractOptions) (string, bool, error)
- func IsZipFile(filePath string) bool
- func ParseProperty(prop string) (key, value string, err error)
- type ExtractOptions
- type JFrogClient
- type JFrogConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTargetProperties ¶ added in v0.1.0
func CreateTargetProperties(properties []string) (*utils.Properties, error)
CreateTargetProperties converts string properties to a utils.Properties struct.
func DownloadArtifact ¶
func DownloadArtifact(artifactURL string, progressFunc progress.ProgressFunc) (string, error)
DownloadArtifact downloads a GitHub Release artifact to a temporary directory.
func ExtractSingleFileFromZip ¶ added in v0.1.0
func ExtractSingleFileFromZip(zipFilePath string, options *ExtractOptions) (string, bool, error)
ExtractSingleFileFromZip attempts to extract a single file from a zip archive. If the zip contains exactly one file, it extracts that file to the destination path. Returns the path to the extracted file and a flag indicating if extraction occurred.
func ParseProperty ¶ added in v0.1.0
ParseProperty splits a property string into key and value components.
Types ¶
type ExtractOptions ¶ added in v0.1.0
type ExtractOptions struct {
// DestinationDir is the directory where files should be extracted
// If empty, files will be extracted to the same directory as the archive
DestinationDir string
}
ExtractOptions contains options for extracting files from archives.
type JFrogClient ¶ added in v0.0.3
type JFrogClient struct {
artifactory.ArtifactoryServicesManager
}
JFrogClient is an embedded ArtifactoryServicesManager which adds convenience methods.
func NewJFrogClient ¶ added in v0.0.3
func NewJFrogClient(jc *JFrogConfig) (*JFrogClient, error)
NewJFrogClient creates a new JFrogClient using the provided configuration. It sets up the Artifactory connection details, builds the required service configuration, and initializes the underlying ArtifactoryServicesManager. If initialization fails at any step, an error is returned.
func (*JFrogClient) Put ¶ added in v0.2.0
When the reader supports seeking, it attempts to determine the total content size to enable accurate progress reporting.
func (*JFrogClient) UploadGenericArtifact ¶ added in v0.0.3
func (c *JFrogClient) UploadGenericArtifact( artifact *core.Artifact, content io.Reader, progressFunc progress.ProgressFunc, ) error
UploadGenericArtifact uploads a generic artifact to Artifactory.
type JFrogConfig ¶ added in v0.0.3
JFrogConfig contains the required properties to connect to JFrog Artifactory.