record

package module
v0.0.0-...-724f649 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MIT Imports: 20 Imported by: 0

README

Usage

TBD

Development

Install dependencies

On macOS, run:

brew bundle;
make deps;

Build and test

make build test

Documentation

Index

Constants

View Source
const DefaulMaxReports = 100
View Source
const GitSummaryFileName = "git.json"
View Source
const HeaderAPIKey = "X-API-Key"

Variables

This section is empty.

Functions

func Upload

func Upload(l *slog.Logger, osEnv map[string]string, o UploadOptions) error

Types

type Collector

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

func NewCollector

func NewCollector(l *slog.Logger, o UploadOptions, osEnv map[string]string) (*Collector, error)

func (*Collector) Bundle

func (c *Collector) Bundle(initial bool, w io.Writer) error

func (*Collector) Env

func (c *Collector) Env() RunEnv

type GitSummary

type GitSummary struct {
	DiffStat    *git.DiffStat    `json:"diffStat"`
	CommitFiles []git.CommitFile `json:"commitFiles"`
}

type RunEnv

type RunEnv struct {
	ActorName      string
	CIProviderName client.CIProviderName
	GitRef         string
	GitRefName     string
	GitRepo        string
	GitSha         string
	Group          string
	RunAttempt     int
	RunId          int
	RunNumber      int
	CIEnv          *map[string]interface{}
}

type UploadOptions

type UploadOptions struct {
	// Repo is the path to the git repository directory.
	Repo string

	// Reports is the path to the JUnit reports directory.
	Reports string

	// Started is the start time of the run. If nil, `NOW()` is returned from
	// the API.
	Started *time.Time

	// MaxReports is the maximum number of reports that can be found in the
	// reports directory. If it exceeds the threshold, an error is returned.
	//
	// If omitted (or zero), DefaulMaxReports is used.
	MaxReports int

	// Debug enables verbose log messages. By default (false), only messages
	// with level info are visible.
	Debug bool
}

type Uploader

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

func NewUploader

func NewUploader(l *slog.Logger, server, apiKey string) (*Uploader, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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