Documentation ¶
Index ¶
- Constants
- func CleanupJunitFiles(artifactsDir string)
- func GetAndWriteResourceCoverage(webhookIP string, resourceName string, outputFile string, ...) error
- func GetAndWriteTotalCoverage(webhookIP string, outputFile string) error
- func GetDefaultKubePath() (string, error)
- func GetResourceCoverage(webhookIP string, resourceName string) (string, error)
- func GetResourcePercentages(webhookIP string) (*coveragecalculator.CoveragePercentages, error)
- func GetTotalCoverage(webhookIP string) (*coveragecalculator.CoverageValues, error)
- func GetWebhookServiceIP(kubeConfigPath string, clusterName string, namespace string, ...) (string, error)
- func WriteResourcePercentages(outputFile string, coveragePercentages *coveragecalculator.CoveragePercentages) error
Constants ¶
const ( // WebhookResourceCoverageEndPoint constant for resource coverage API endpoint. WebhookResourceCoverageEndPoint = "https://%s:443" + webhook.ResourceCoverageEndPoint + "?resource=%s" // WebhookTotalCoverageEndPoint constant for total coverage API endpoint. WebhookTotalCoverageEndPoint = "https://%s:443" + webhook.TotalCoverageEndPoint // WebhookResourcePercentageCoverageEndPoint constant for // ResourcePercentageCoverage API endpoint. WebhookResourcePercentageCoverageEndPoint = "https://%s:443" + webhook.ResourcePercentageCoverageEndPoint )
Variables ¶
This section is empty.
Functions ¶
func CleanupJunitFiles ¶
func CleanupJunitFiles(artifactsDir string)
Helper function to cleanup any existing Junit XML files. This is done to ensure that we only have one Junit XML file providing the API Coverage summary.
func GetAndWriteResourceCoverage ¶
func GetAndWriteResourceCoverage(webhookIP string, resourceName string, outputFile string, displayRules view.DisplayRules) error
GetAndWriteResourceCoverage is a helper method that uses GetResourceCoverage to get coverage and write it to a file.
func GetAndWriteTotalCoverage ¶
GetAndWriteTotalCoverage uses the GetTotalCoverage method to get total coverage and write it to a output file.
func GetDefaultKubePath ¶
GetDefaultKubePath helper method to fetch kubeconfig path.
func GetResourceCoverage ¶
GetResourceCoverage is a helper method to get Coverage data for a resource from the service webhook.
func GetResourcePercentages ¶
func GetResourcePercentages(webhookIP string) ( *coveragecalculator.CoveragePercentages, error)
GetResourcePercentages calls resource percentage coverage API to retrieve percentage values.
func GetTotalCoverage ¶
func GetTotalCoverage(webhookIP string) (*coveragecalculator.CoverageValues, error)
GetTotalCoverage calls the total coverage API to retrieve total coverage values.
func GetWebhookServiceIP ¶
func GetWebhookServiceIP(kubeConfigPath string, clusterName string, namespace string, serviceName string) (string, error)
GetWebhookServiceIP is a helper method to fetch IP Address of the LoadBalancer webhook service.
func WriteResourcePercentages ¶
func WriteResourcePercentages(outputFile string, coveragePercentages *coveragecalculator.CoveragePercentages) error
WriteResourcePercentages writes CoveragePercentages to junit_xml output file.
Types ¶
This section is empty.