Something went wrong on our end
Select Git revision
pipelines.go
-
Volker Schukai authoredVolker Schukai authored
pipelines.go 14.53 KiB
//
// Copyright 2021, Igor Varavko
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package gitlab
import (
"fmt"
"net/http"
"time"
)
// PipelinesService handles communication with the repositories related
// methods of the GitLab API.
//
// GitLab API docs: https://docs.gitlab.com/ee/api/pipelines.html
type PipelinesService struct {
client *Client
}
// PipelineVariable represents a pipeline variable.
//
// GitLab API docs: https://docs.gitlab.com/ee/api/pipelines.html
type PipelineVariable struct {
Key string `json:"key"`
Value string `json:"value"`
VariableType VariableTypeValue `json:"variable_type"`
}
// Pipeline represents a GitLab pipeline.
//
// GitLab API docs: https://docs.gitlab.com/ee/api/pipelines.html
type Pipeline struct {
ID int `json:"id"`
IID int `json:"iid"`
ProjectID int `json:"project_id"`
Status string `json:"status"`
Source string `json:"source"`
Ref string `json:"ref"`
Name string `json:"name"`
SHA string `json:"sha"`
BeforeSHA string `json:"before_sha"`
Tag bool `json:"tag"`
YamlErrors string `json:"yaml_errors"`
User *BasicUser `json:"user"`
UpdatedAt *time.Time `json:"updated_at"`
CreatedAt *time.Time `json:"created_at"`
StartedAt *time.Time `json:"started_at"`
FinishedAt *time.Time `json:"finished_at"`
CommittedAt *time.Time `json:"committed_at"`
Duration int `json:"duration"`
QueuedDuration int `json:"queued_duration"`
Coverage string `json:"coverage"`
WebURL string `json:"web_url"`
DetailedStatus *DetailedStatus `json:"detailed_status"`
}
// DetailedStatus contains detailed information about the status of a pipeline.