upload

package
v0.0.0-...-9319dc5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: MIT Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributes

type Attributes struct {
	CIBranch          string                 `json:"ci_branch"`
	CIBuildIdentifier string                 `json:"ci_build_identifier"`
	CIBuildURL        string                 `json:"ci_build_url"`
	CICommitSha       string                 `json:"ci_commit_sha"`
	CICommittedAt     int                    `json:"ci_committed_at"`
	CIServiceName     string                 `json:"ci_service_name"`
	GitBranch         string                 `json:"git_branch"`
	CommitSha         string                 `json:"commit_sha"`
	CommittedAt       int                    `json:"committed_at"`
	RunAt             int64                  `json:"run_at"`
	CoveredPercent    float64                `json:"covered_percent"`
	CoveredStrength   int                    `json:"covered_strength"`
	Environment       formatters.Environment `json:"environment"`
	LineCounts        formatters.LineCounts  `json:"line_counts"`
}

type ErrConflict

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

func (*ErrConflict) Error

func (e *ErrConflict) Error() string

type JSONWraper

type JSONWraper struct {
	Data interface{} `json:"data"`
	Meta interface{} `json:"meta"`
}

type SourceFile

type SourceFile struct {
	Type            string                `json:"type"`
	BlobID          string                `json:"blob_id"`
	Coverage        formatters.Coverage   `json:"coverage"`
	CoveredPercent  float64               `json:"covered_percent"`
	CoveredStrength float64               `json:"covered_strength"`
	LineCounts      formatters.LineCounts `json:"line_counts"`
	Path            string                `json:"path"`
}

type TestReport

type TestReport struct {
	Type        string       `json:"type"`
	Attributes  Attributes   `json:"attributes"`
	SourceFiles []SourceFile `json:"-"`
}

func NewTestReport

func NewTestReport(rep formatters.Report) *TestReport

type Uploader

type Uploader struct {
	ReporterID  string
	EndpointURL string
	BatchSize   int
	Input       io.Reader
	Insecure    bool
}

func (Uploader) SendBatches

func (u Uploader) SendBatches(rep *TestReport, url string) error

func (Uploader) TransformPostBatchURL

func (u Uploader) TransformPostBatchURL(rawURL string) (string, error)

func (Uploader) Upload

func (u Uploader) Upload() error

Jump to

Keyboard shortcuts

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