notify

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package notify provides post-run notification integrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostCov

func PostCov(webhookURL string, linesPct float64, linesCov, linesTotal int, branchPct, funcPct float64, fileCount int) error

PostCov sends coverage statistics to webhookURL via HTTP POST.

func PostTest

func PostTest(webhookURL string, total, passed, failed, skipped int) error

PostTest sends test run statistics to webhookURL via HTTP POST.

Types

type CovPayload

type CovPayload struct {
	Tool       string  `json:"tool"`
	Timestamp  string  `json:"timestamp"`
	LinesPct   float64 `json:"lines_pct"`
	LinesCov   int     `json:"lines_covered"`
	LinesTotal int     `json:"lines_total"`
	BranchPct  float64 `json:"branch_pct,omitempty"`
	FuncPct    float64 `json:"func_pct,omitempty"`
	FileCount  int     `json:"file_count"`
}

CovPayload is the JSON body sent after a coverage run.

type TestPayload

type TestPayload struct {
	Tool      string  `json:"tool"`
	Timestamp string  `json:"timestamp"`
	Total     int     `json:"total"`
	Passed    int     `json:"passed"`
	Failed    int     `json:"failed"`
	Skipped   int     `json:"skipped"`
	PassPct   float64 `json:"pass_pct"`
}

TestPayload is the JSON body sent after a test run.

Jump to

Keyboard shortcuts

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