codecov

package module
v0.0.0-...-a5af766 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const Token = "CODECOV_TOKEN"

Token is the Codecov token environment variable.

Variables

This section is empty.

Functions

func DefaultClient

func DefaultClient() *http.Client

DefaultClient returns the default http.Client for send to Codecov.

Types

type Client

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

Client represents a CodeCov client.

func NewClient

func NewClient(hc *http.Client) *Client

NewClient returns the new Codecov client.

func (*Client) Compress

func (c *Client) Compress(reports []byte) (io.Reader, error)

Compress compresses coverage reports in gzip format.

func (*Client) Prepare

func (c *Client) Prepare(ctx context.Context) (ep Endpoint, err error)

Prepare prepares Codecov endpoint.

func (*Client) Service

func (c *Client) Service()

Service returns the detected service configurations.

This method mainly for debug to detect services.

func (*Client) Upload

func (c *Client) Upload(ctx context.Context, ep Endpoint, reports io.Reader) error

Upload uploads coverage reports to Codecov endpoint.

type Endpoint

type Endpoint struct {
	// URL is the url of Codecov endpoint.
	URL string

	// S3URL is the s3 url of Codecov endpoint.
	S3URL string
}

Endpoint represents a Codecov upload endpoint url and s3 url.

Jump to

Keyboard shortcuts

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