gitlab

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewGitLabClient

func NewGitLabClient(cfg ClientConfig) (*Client, error)

func (*Client) CheckReadiness

func (c *Client) CheckReadiness(ctx context.Context) error

func (*Client) Configure

func (c *Client) Configure(cfg ClientConfig) error

func (*Client) GetJobLog

func (c *Client) GetJobLog(ctx context.Context, projectID int64, jobID int64) (*bytes.Reader, error)

func (*Client) GetPipeline

func (c *Client) GetPipeline(ctx context.Context, projectID int64, pipelineID int64) (*typespb.Pipeline, error)

func (*Client) GetPipelineHierarchy

func (c *Client) GetPipelineHierarchy(ctx context.Context, projectID int64, pipelineID int64, opt *GetPipelineHierarchyOptions) <-chan GetPipelineHierarchyResult

func (*Client) GetPipelineHierarchyTestReports

func (c *Client) GetPipelineHierarchyTestReports(ctx context.Context, ph *models.PipelineHierarchy) (*PipelineTestReportData, error)

func (*Client) GetPipelineTestReport

func (c *Client) GetPipelineTestReport(ctx context.Context, projectID int64, pipelineID int64) (*PipelineTestReportData, error)

func (*Client) GetPipelineTestReportSummary added in v0.5.1

func (c *Client) GetPipelineTestReportSummary(ctx context.Context, projectID int64, pipelineID int64) (*PipelineTestReportSummary, error)

func (*Client) ListJobSections

func (c *Client) ListJobSections(ctx context.Context, projectID int64, jobID int64) <-chan ListJobSectionsResult

func (*Client) ListPipelineBridges

func (c *Client) ListPipelineBridges(ctx context.Context, projectID int64, pipelineID int64) <-chan ListPipelineBridgesResult

func (*Client) ListPipelineJobs

func (c *Client) ListPipelineJobs(ctx context.Context, projectID int64, pipelineID int64) <-chan ListPipelineJobsResult

func (*Client) ListProjectPipelines

func (c *Client) ListProjectPipelines(ctx context.Context, projectID int64, opt ListProjectPipelinesOptions) <-chan ListProjectPipelinesResult

type ClientConfig

type ClientConfig struct {
	URL   string
	Token string

	RateLimit float64
}

type GetPipelineHierarchyOptions

type GetPipelineHierarchyOptions struct {
	FetchSections   bool
	FetchJobMetrics bool
}

type GetPipelineHierarchyResult

type GetPipelineHierarchyResult struct {
	PipelineHierarchy *models.PipelineHierarchy
	Metrics           []*typespb.Metric
	Error             error
}

type JobLogData

type JobLogData struct {
	Sections []SectionData `json:"sections"`
	Metrics  []*MetricData `json:"metrics"`
}

func ParseJobLog

func ParseJobLog(trace *bytes.Reader) (*JobLogData, error)

type ListJobSectionsResult

type ListJobSectionsResult struct {
	Section *typespb.Section
	Error   error
}

type ListOptions

type ListOptions = _gitlab.ListOptions

type ListPipelineBridgesResult

type ListPipelineBridgesResult struct {
	Bridge *typespb.Bridge
	Error  error
}

type ListPipelineJobsResult

type ListPipelineJobsResult struct {
	Job   *typespb.Job
	Error error
}

type ListProjectPipelinesOptions

type ListProjectPipelinesOptions = _gitlab.ListProjectPipelinesOptions

type ListProjectPipelinesResult

type ListProjectPipelinesResult struct {
	Pipeline *typespb.PipelineInfo
	Error    error
}

type MetricData

type MetricData struct {
	Name      string            `json:"name"`
	Labels    map[string]string `json:"labels"`
	Value     float64           `json:"value"`
	Timestamp int64             `json:"timestamp"`
}

type PipelineTestReportData

type PipelineTestReportData struct {
	TestReports []*typespb.TestReport
	TestSuites  []*typespb.TestSuite
	TestCases   []*typespb.TestCase
}

type PipelineTestReportSummary added in v0.5.1

type PipelineTestReportSummary struct {
	Total      *PipelineTestReportSummaryTotal       `json:"total"`
	TestSuites []*PipelineTestReportSummaryTestSuite `json:"test_suites"`
}

type PipelineTestReportSummaryTestSuite added in v0.5.1

type PipelineTestReportSummaryTestSuite struct {
	Name         string  `json:"name"`
	TotalTime    float64 `json:"total_time"`
	TotalCount   int     `json:"total_count"`
	SuccessCount int     `json:"success_count"`
	FailedCount  int     `json:"failed_count"`
	SkippedCount int     `json:"skipped_count"`
	ErrorCount   int     `json:"error_count"`
	BuildIDs     []int   `json:"build_ids"`
	SuiteError   string  `json:"suite_error"`
}

type PipelineTestReportSummaryTotal added in v0.5.1

type PipelineTestReportSummaryTotal struct {
	Time       float64 `json:"time"`
	Count      int     `json:"count"`
	Success    int     `json:"success"`
	Failed     int     `json:"failed"`
	Skipped    int     `json:"skipped"`
	Error      int     `json:"error"`
	SuiteError string  `json:"suite_error"`
}

type SectionData

type SectionData struct {
	Name  string `json:"name"`
	Start int64  `json:"start"`
	End   int64  `json:"end"`
}

Jump to

Keyboard shortcuts

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