results

package
v0.0.0-...-0aa9544 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package results contains a Codec to convert JUnit results to claim Results.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressResultsArtifacts

func CompressResultsArtifacts(outputDir string, filePaths []string) (string, error)

Creates a zip file in the outputDir containing each file in the filePaths slice.

func CreateResultsWebFiles

func CreateResultsWebFiles(outputDir, claimFileName string) (filePaths []string, err error)

Creates all the html/web related files needed for parsing the claim file in outputDir. - claimjson.js - results.html - classification.js Returns a slice with the paths of every file created.

func GetCertIDFromConnectAPI

func GetCertIDFromConnectAPI(apiKey, projectID, connectAPIBaseURL, proxyURL, proxyPort string) (string, error)

GetCertIDFromConnectAPI gets the certification ID from the Red Hat Connect API

func SendResultsToConnectAPI

func SendResultsToConnectAPI(zipFile, apiKey, connectBaseURL, certID, proxyURL, proxyPort string) error

SendResultsToConnectAPI sends the results to the Red Hat Connect API

Types

type CertIDResponse

type CertIDResponse struct {
	ID                  int    `json:"id"`
	CaseNumber          string `json:"caseNumber"`
	Status              string `json:"status"`
	CertificationLevel  string `json:"certificationLevel"`
	RhcertURL           string `json:"rhcertUrl"`
	HasStartedByPartner bool   `json:"hasStartedByPartner"`
	CertificationType   struct {
		ID   int    `json:"id"`
		Name string `json:"name"`
	} `json:"certificationType"`
}

type UploadResult

type UploadResult struct {
	UUID         string    `json:"uuid"`
	Type         string    `json:"type"`
	Name         string    `json:"name"`
	Size         int       `json:"size"`
	ContentType  string    `json:"contentType"`
	Desc         string    `json:"desc"`
	DownloadURL  string    `json:"downloadUrl"`
	UploadedBy   string    `json:"uploadedBy"`
	UploadedDate time.Time `json:"uploadedDate"`
	CertID       int       `json:"certId"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳