api

package
v0.0.0-...-5ae9364 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientAPI

type ClientAPI interface {
	CreateReport(params CreateReportParameters) (CreateReportResponse, error)
	UploadAsset(url, path, contentType string) error
	FinishReport(identifier string, allAssetsUploaded bool) error
}

ClientAPI ...

type CreateReportAsset

type CreateReportAsset struct {
	RelativePath string `json:"relative_path"`
	FileSize     int64  `json:"file_size_bytes"`
	ContentType  string `json:"content_type"`
}

CreateReportAsset ...

type CreateReportParameters

type CreateReportParameters struct {
	Title    string              `json:"title"`
	Category string              `json:"category,omitempty"`
	Assets   []CreateReportAsset `json:"assets"`
}

CreateReportParameters ...

type CreateReportResponse

type CreateReportResponse struct {
	Identifier string            `json:"id"`
	AssetURLs  []CreateReportURL `json:"assets"`
}

CreateReportResponse ...

type CreateReportURL

type CreateReportURL struct {
	RelativePath string `json:"relative_path"`
	URL          string `json:"upload_url"`
}

CreateReportURL ...

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient ...

type TestReportClient

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

TestReportClient ...

func NewBitriseClient

func NewBitriseClient(buildURL, authToken string, logger log.Logger) *TestReportClient

NewBitriseClient ...

func (*TestReportClient) CreateReport

CreateReport ...

func (*TestReportClient) FinishReport

func (t *TestReportClient) FinishReport(identifier string, allAssetsUploaded bool) error

FinishReport ...

func (*TestReportClient) UploadAsset

func (t *TestReportClient) UploadAsset(url, path, contentType string) error

UploadAsset ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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