Documentation ¶
Index ¶
- Constants
- func CreateCloud(ctx context.Context) (*api.Cloud, error)
- func CreatePipeline(ctx context.Context, projectName, user string) (*api.Pipeline, error)
- func CreatePipelineRecord(ctx context.Context, projectName, pipelineName, user string) (*api.PipelineRecord, error)
- func CreateProject(ctx context.Context, user string) (*api.Project, error)
- func DeleteCloud(ctx context.Context, name string) error
- func DeletePipeline(ctx context.Context, projectName, pipelineName string) error
- func DeletePipelineRecord(ctx context.Context, pipelineRecordID string) error
- func DeleteProject(ctx context.Context, name string) error
- func GetEvent(ctx context.Context, eventID string) (*api.Event, error)
- func GetPipeline(ctx context.Context, projectName, pipelineName string, ...) (*api.Pipeline, error)
- func GetPipelineRecord(ctx context.Context, pipelineRecordID string) (*api.PipelineRecord, error)
- func GetPipelineRecordLogStream(ctx context.Context, recordID, stage, task string) error
- func GetPipelineRecordLogs(ctx context.Context, ...) ([]byte, map[string]string, error)
- func GetPipelineRecordTestResult(ctx context.Context, ...) ([]byte, map[string]string, error)
- func GetPipelineStatistics(ctx context.Context, projectName, pipelineName string, start, end string) (*api.PipelineStatusStats, error)
- func GetProject(ctx context.Context, name string) (*api.Project, error)
- func GetProjectStatistics(ctx context.Context, name, start, end string) (*api.PipelineStatusStats, error)
- func GetTemplateType(ctx context.Context, name, repo string) (*api.TemplateType, error)
- func HandleGithubWebhook(ctx context.Context, pipelineID string) (string, error)
- func HandleGitlabWebhook(ctx context.Context, pipelineID string) (string, error)
- func HealthCheck(ctx context.Context) error
- func InitHandler(dataStore *store.DataStore, recordRotationThreshold int) (err error)
- func ListBranches(ctx context.Context, name, repo string) (api.ListResponse, error)
- func ListClouds(ctx context.Context) (api.ListResponse, error)
- func ListConfigTemplates(ctx context.Context) api.ListResponse
- func ListPipelineRecordTestResults(ctx context.Context, projectName, pipelineName, pipelineRecordID string) (api.ListResponse, error)
- func ListPipelineRecords(ctx context.Context, projectName, pipelineName string) (api.ListResponse, error)
- func ListPipelines(ctx context.Context, projectName string, ...) (api.ListResponse, error)
- func ListProjects(ctx context.Context) (api.ListResponse, error)
- func ListRepos(ctx context.Context, name string) (api.ListResponse, error)
- func ListTags(ctx context.Context, name, repo string) (api.ListResponse, error)
- func ListWorkers(ctx context.Context, cloudName, namespace string) (api.ListResponse, error)
- func PingCloud(ctx context.Context, name string) map[string]string
- func ReceivePipelineRecordLogStream(ctx context.Context, recordID, stage, task string) error
- func ReceivePipelineRecordTestResult(ctx context.Context, recordID string) error
- func SetEvent(ctx context.Context, eventID string) (*api.Event, error)
- func UpdatePipeline(ctx context.Context, projectName, pipelineName string) (*api.Pipeline, error)
- func UpdatePipelineRecordStatus(ctx context.Context, pipelineRecordID string) (*api.PipelineRecord, error)
- func UpdateProject(ctx context.Context, name string) (*api.Project, error)
- type GitHubStatusURL
Constants ¶
const TemplatePath = "/config/templates/templates.yaml"
Variables ¶
This section is empty.
Functions ¶
func CreateCloud ¶
CreateCloud handles the request to create a cloud.
func CreatePipeline ¶
CreatePipeline handles the request to create a pipeline.
func CreatePipelineRecord ¶
func CreatePipelineRecord(ctx context.Context, projectName, pipelineName, user string) (*api.PipelineRecord, error)
CreatePipelineRecord handles the request to perform pipeline, which will create a pipeline record.
func CreateProject ¶
CreateProject handles the request to create a project.
func DeleteCloud ¶
DeleteCloud handles the request to delete the cloud.
func DeletePipeline ¶
DeletePipeline handles the request to delete a pipeline.
func DeletePipelineRecord ¶
DeletePipelineRecord handles the request to delete a pipeline record.
func DeleteProject ¶
DeleteProject handles the request to delete a project.
func GetPipeline ¶
func GetPipeline(ctx context.Context, projectName, pipelineName string, recentCount, recentSuccessCount, recentFailedCount int) (*api.Pipeline, error)
GetPipeline handles the request to get a pipeline.
func GetPipelineRecord ¶
GetPipelineRecord handles the request to get a pipeline record.
func GetPipelineRecordLogStream ¶
GetPipelineRecordLogStream gets real-time log of pipeline record refering to recordID
func GetPipelineRecordLogs ¶
func GetPipelineRecordLogs(ctx context.Context, projectName, pipelineName, pipelineRecordID, stage, task string, download bool) ([]byte, map[string]string, error)
getPipelineRecordLogs handles the request to get pipeline record logs, only supports finished pipeline records.
func GetPipelineRecordTestResult ¶
func GetPipelineRecordTestResult(ctx context.Context, projectName, pipelineName, pipelineRecordID, fileName string, download bool) ([]byte, map[string]string, error)
GetPipelineRecordTestResult handles the request to get pipeline record test result.
func GetPipelineStatistics ¶
func GetPipelineStatistics(ctx context.Context, projectName, pipelineName string, start, end string) (*api.PipelineStatusStats, error)
GetPipelineStatistics handles the request to get a pipeline's statistics.
func GetProject ¶
GetProject handles the request to get a project.
func GetProjectStatistics ¶
func GetProjectStatistics(ctx context.Context, name, start, end string) (*api.PipelineStatusStats, error)
GetProjectStatistics handles the request to get a project's statistics.
func GetTemplateType ¶
GetTemplateType handles the request to get project type for SCM repositories.
func HandleGithubWebhook ¶
HandleGithubWebhook handles the webhook request from Github. 1. Parse the pipeline id from request path; 2. Get the pipeline by id; 3. Parse the payload from request header; 4. Parse the payload from request body; 5. First get the event type, and handle it according to its type.
func HandleGitlabWebhook ¶
HandleGitlabWebhook handles the webhook request from Gitlab. 1. Parse the pipeline id from request path; 2. Get the pipeline by id; 3. Parse the payload from request header; 4. Parse the payload from request body; 5. First get the event type, and handle it according to its type.
func HealthCheck ¶
HealthCheck handles the request to check the health of Cyclone server.
func InitHandler ¶
func ListBranches ¶
ListBranches handles the request to list branches for SCM repositories.
func ListClouds ¶
func ListClouds(ctx context.Context) (api.ListResponse, error)
ListClouds handles the request to list all clouds.
func ListConfigTemplates ¶
func ListConfigTemplates(ctx context.Context) api.ListResponse
ListConfigTemplates handles the request to list all cyclone built-in pipeline config templates.
func ListPipelineRecordTestResults ¶
func ListPipelineRecordTestResults(ctx context.Context, projectName, pipelineName, pipelineRecordID string) (api.ListResponse, error)
GetPipelineRecordTestResults handles the request to get pipeline record test results.
func ListPipelineRecords ¶
func ListPipelineRecords(ctx context.Context, projectName, pipelineName string) (api.ListResponse, error)
ListPipelineRecords handles the request to list pipeline records.
func ListPipelines ¶
func ListPipelines(ctx context.Context, projectName string, recentCount, recentSuccessCount, recentFailedCount int) (api.ListResponse, error)
ListPipelines handles the request to list pipelines.
func ListProjects ¶
func ListProjects(ctx context.Context) (api.ListResponse, error)
ListProjects handles the request to list projects.
func ListWorkers ¶
ListWorkers handles the request to list all workers.
func ReceivePipelineRecordLogStream ¶
ReceivePipelineRecordLogStream receives real-time log of pipeline record.
func ReceivePipelineRecordTestResult ¶
ReceivePipelineRecordTestResult receives test result file from cyclone worker.
func UpdatePipeline ¶
UpdatePipeline handles the request to update a pipeline.
func UpdatePipelineRecordStatus ¶
func UpdatePipelineRecordStatus(ctx context.Context, pipelineRecordID string) (*api.PipelineRecord, error)
UpdatePipelineRecordStatus handles the request to update a pipeline record status, only support to set 'Aborted' status for running pipeline records.
Types ¶
type GitHubStatusURL ¶
type GitHubStatusURL struct { }