types

package
v0.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertJob

func ConvertJob(job Job) *typespb.Job

func ConvertJobReference added in v0.10.0

func ConvertJobReference(job JobReference) *typespb.JobReference

func ConvertMergeRequest

func ConvertMergeRequest(mr MergeRequest) *typespb.MergeRequest

func ConvertMergeRequestNoteEvent added in v0.10.0

func ConvertMergeRequestNoteEvent(event MergeRequestNoteEvent) *typespb.MergeRequestNoteEvent

func ConvertMergeRequestReference added in v0.10.0

func ConvertMergeRequestReference(mr MergeRequestReference) *typespb.MergeRequestReference

func ConvertMetric added in v0.10.0

func ConvertMetric(metric Metric) *typespb.Metric

func ConvertPipeline

func ConvertPipeline(pipeline Pipeline) *typespb.Pipeline

func ConvertPipelineReference added in v0.10.0

func ConvertPipelineReference(pipeline PipelineReference) *typespb.PipelineReference

func ConvertProject

func ConvertProject(p Project) *typespb.Project

func ConvertProjectReference added in v0.10.0

func ConvertProjectReference(project ProjectReference) *typespb.ProjectReference

func ConvertSection added in v0.10.0

func ConvertSection(section Section) *typespb.Section

func ConvertTestCase added in v0.10.0

func ConvertTestCase(testcase TestCase) *typespb.TestCase

func ConvertTestReport

func ConvertTestReport(testreport TestReport) *typespb.TestReport

func ConvertTestSuite added in v0.10.0

func ConvertTestSuite(testsuite TestSuite) *typespb.TestSuite

func ConvertUserReference added in v0.10.0

func ConvertUserReference(user UserReference) *typespb.UserReference

func JobSpan added in v0.10.0

func JobSpan(job Job) *tracepb.Span

func NewResourceSpan added in v0.10.0

func NewResourceSpan(attrs map[string]string, spans []*tracepb.Span) *tracepb.ResourceSpans

func PipelineSpan added in v0.10.0

func PipelineSpan(pipeline Pipeline) *tracepb.Span

func SectionSpan added in v0.10.0

func SectionSpan(section Section) *tracepb.Span

Types

type Job added in v0.10.0

type Job struct {
	Id       int64
	Pipeline PipelineReference

	Name          string
	Ref           string
	Status        string
	FailureReason string

	CreatedAt  *time.Time
	QueuedAt   *time.Time
	StartedAt  *time.Time
	FinishedAt *time.Time
	ErasedAt   *time.Time

	Stage string
	Tags  []string

	QueuedDuration time.Duration
	Duration       time.Duration
	Coverage       float64

	AllowFailure bool
	Manual       bool
	Retried      bool
	Retryable    bool

	Kind               JobKind
	DownstreamPipeline *PipelineReference

	RunnerId string
}

type JobKind added in v0.10.0

type JobKind string
const (
	JobKindUnkown JobKind = "unknown"
	JobKindBuild  JobKind = "build"
	JobKindBridge JobKind = "bridge"
)

type JobReference added in v0.10.0

type JobReference struct {
	Id   int64
	Name string

	Pipeline PipelineReference
}

type MergeRequest added in v0.10.0

type MergeRequest struct {
	Id      int64
	Iid     int64
	Project ProjectReference

	CreatedAt *time.Time
	UpdatedAt *time.Time
	MergedAt  *time.Time
	ClosedAt  *time.Time

	Name   string
	Title  string
	Labels []string

	State       string
	MergeStatus string
	MergeError  string

	SourceProjectId int64
	SourceBranch    string
	TargetProjectId int64
	TargetBranch    string

	DiffStats    MergeRequestDiffStats
	DiffRefs     MergeRequestDiffRefs
	Participants MergeRequestParticipants

	Approved  bool
	Conflicts bool
	Draft     bool
	Mergeable bool

	UserNotesCount int64

	Milestone *MilestoneReference
}

type MergeRequestDiffRefs added in v0.10.0

type MergeRequestDiffRefs struct {
	BaseSha  string
	HeadSha  string
	StartSha string

	MergeCommitSha  string
	RebaseCommitSha string
}

type MergeRequestDiffStats added in v0.10.0

type MergeRequestDiffStats struct {
	Additions   int64
	Changes     int64
	Deletions   int64
	FileCount   int64
	CommitCount int64
}

type MergeRequestNoteEvent added in v0.10.0

type MergeRequestNoteEvent struct {
	Id           int64
	MergeRequest MergeRequestReference

	CreatedAt *time.Time
	UpdatedAt *time.Time

	Type     string
	System   bool
	Internal bool

	AuthorId int64

	Resolvable bool
	Resolved   bool
	ResolvedAt *time.Time
	ResolverId int64
}

type MergeRequestParticipants added in v0.10.0

type MergeRequestParticipants struct {
	Author    UserReference
	Assignees []UserReference
	Reviewers []UserReference
	Approvers []UserReference
	MergeUser UserReference
}

type MergeRequestReference added in v0.10.0

type MergeRequestReference struct {
	Id  int64
	Iid int64

	Project ProjectReference
}

type Metric added in v0.10.0

type Metric struct {
	Id  string
	Iid int64
	Job JobReference

	Name      string
	Labels    map[string]string
	Value     float64
	Timestamp int64
}

type MilestoneReference added in v0.10.0

type MilestoneReference struct {
	Id      int64
	Iid     int64
	Project ProjectReference
}

type NamespaceReference added in v0.10.0

type NamespaceReference struct {
	Id       int64
	FullPath string
}

type Pipeline added in v0.10.0

type Pipeline struct {
	Id  int64
	Iid int64

	Project ProjectReference

	Name          string
	Ref           string
	Sha           string
	Source        string
	Status        string
	FailureReason string

	CommittedAt *time.Time
	CreatedAt   *time.Time
	UpdatedAt   *time.Time
	StartedAt   *time.Time
	FinishedAt  *time.Time

	QueuedDuration time.Duration
	Duration       time.Duration
	Coverage       float64

	Warnings   bool
	YamlErrors bool

	Child            bool
	UpstreamPipeline *PipelineReference

	MergeRequest *MergeRequestReference

	User UserReference
}

type PipelineReference added in v0.10.0

type PipelineReference struct {
	Id  int64
	Iid int64

	Project ProjectReference
}

type Project added in v0.10.0

type Project struct {
	Id       int64
	Namspace NamespaceReference

	Name        string
	FullName    string
	Path        string
	FullPath    string
	Description string

	CreatedAt      *time.Time
	UpdatedAt      *time.Time
	LastActivityAt *time.Time

	Statistics ProjectStatistics

	Archived   bool
	Visibility string
}

type ProjectReference added in v0.10.0

type ProjectReference struct {
	Id       int64
	FullPath string
}

type ProjectStatistics added in v0.10.0

type ProjectStatistics struct {
	JobArtifactsSize      int64
	ContainerRegistrySize int64
	LfsObjectsSize        int64
	PackagesSize          int64
	PipelineArtifactsSize int64
	RepositorySize        int64
	SnippetsSize          int64
	StorageSize           int64
	UploadsSize           int64
	WikiSize              int64

	CommitCount int64
	StarCount   int64
	ForksCount  int64
}

type Section added in v0.10.0

type Section struct {
	Id  int64
	Job JobReference

	Name       string
	StartedAt  *time.Time
	FinishedAt *time.Time
	Duration   time.Duration
}

type TestCase added in v0.10.0

type TestCase struct {
	Id           string
	TestSuiteId  string
	TestReportId string
	Pipeline     PipelineReference

	Name          string
	Classname     string
	Status        string
	ExecutionTime time.Duration
	File          string
	StackTrace    string
	SystemOutput  string
}

type TestReport added in v0.10.0

type TestReport struct {
	Id       string
	Pipeline PipelineReference

	TotalTime    time.Duration
	TotalCount   int64
	ErrorCount   int64
	FailedCount  int64
	SkippedCount int64
	SuccessCount int64
}

type TestSuite added in v0.10.0

type TestSuite struct {
	Id           string
	TestReportId string
	Pipeline     PipelineReference

	Name         string
	TotalTime    time.Duration
	TotalCount   int64
	ErrorCount   int64
	FailedCount  int64
	SkippedCount int64
	SuccessCount int64
}

type UserReference added in v0.10.0

type UserReference struct {
	Id       int64
	Username string
}

Jump to

Keyboard shortcuts

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