Documentation
¶
Index ¶
- func GetConfigWithWorkflow(ci CI, jobs []WorkflowItem, workflows []PipelineWorkflows, j int, w int, ...) (returnData []JobDataSteps, returnEnvConfig []JobDataEnvironment, ...)
- func GetJobData(ci CI, jobId string, vsc string, namespace string, project string, step string, ...) (t []byte)
- func GetPipelineConfig(ci CI, pipelineId string, output string) (prametersItems []Prameters, jobItems []Job, jsonItems string)
- func Me(ci CI) (_ bool)
- type Actor
- type AllData
- type Artifacts
- type ArtifactsItem
- type CI
- type Cache
- type Client
- type CommitInfo
- type DefaultClient
- func (s *DefaultClient) CurlRequest(method, endpoint string) (request *http.Request, err error)
- func (s *DefaultClient) Do(request *http.Request) (body []byte, resp *http.Response, err error)
- func (s *DefaultClient) Get(endpoint string) ([]byte, *http.Response, error)
- func (s *DefaultClient) Info() ServerInfo
- func (s *DefaultClient) NewRequest(method, endpoint string, payload io.Reader) (request *http.Request, err error)
- func (s *DefaultClient) Post(endpoint string, payload io.Reader) ([]byte, *http.Response, error)
- type Errors
- type Job
- type JobDataEnvironment
- type JobDataSteps
- type JobDetails
- type PipelineConfig
- type PipelineItem
- type PipelineWorkflows
- type Prameters
- type ServerInfo
- type TestMetadata
- type Trigger
- type Vcs
- type ViperSub
- type WorkflowItem
- type WorkflowPipeline
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigWithWorkflow ¶
func GetConfigWithWorkflow(ci CI, jobs []WorkflowItem, workflows []PipelineWorkflows, j int, w int, output string) (returnData []JobDataSteps, returnEnvConfig []JobDataEnvironment, orbs []ViperSub, parameters []ViperSub)
func GetJobData ¶
func GetPipelineConfig ¶
Types ¶
type AllData ¶
type AllData struct {
PipelineID string `json:"pipeline_id"`
ID string `json:"id"`
Name string `json:"name"`
ProjectSlug string `json:"project_slug"`
Status string `json:"status"`
StartedBy string `json:"started_by"`
PipelineNumber int `json:"pipeline_number"`
CreatedAt time.Time `json:"created_at"`
StoppedAt time.Time `json:"stopped_at"`
Tag string `json:"tag,omitempty"`
WorkflowPipeline []WorkflowPipeline `json:"workflow_pipeline"`
}
type Artifacts ¶
type Artifacts struct {
Items []ArtifactsItem `json:"items"`
ContinuationToken string `json:"next_page_token"`
}
type ArtifactsItem ¶
type ArtifactsItem struct {
NodeIndex int `json:"node_index"`
Path string `json:"path"`
URL string `json:"url"`
}
func GetJobsArtifacts ¶
func GetJobsArtifacts(ci CI, jobId string, project string, output string) (items []ArtifactsItem)
type Client ¶
type Client interface {
CurlRequest(method, endpoint string) (*http.Request, error)
NewRequest(method, endpoint string, payload io.Reader) (*http.Request, error)
Get(endpoint string) ([]byte, *http.Response, error)
Post(endpoint string, payload io.Reader) ([]byte, *http.Response, error)
Info() ServerInfo
}
Client is the interface which allows interacting with an IQ server
type CommitInfo ¶
type DefaultClient ¶
type DefaultClient struct {
ServerInfo
Debug bool
}
DefaultClient provides an HTTP wrapper with optimized for communicating with a Circle server
func (*DefaultClient) CurlRequest ¶
func (s *DefaultClient) CurlRequest(method, endpoint string) (request *http.Request, err error)
func (*DefaultClient) Info ¶
func (s *DefaultClient) Info() ServerInfo
Info return information about the Nexus server
func (*DefaultClient) NewRequest ¶
func (s *DefaultClient) NewRequest(method, endpoint string, payload io.Reader) (request *http.Request, err error)
NewRequest created an http.Request object based on an endpoint and fills in basic auth
type JobDataEnvironment ¶
type JobDataEnvironment struct {
Sha string `json:"sha"`
HostType string `json:"host_type"`
HostClass string `json:"host_class"`
HostImage string `json:"host_image"`
HostVM string `json:"host_vm"`
HostVolume string `json:"host_volume"`
HostAgent string `json:"host_agent"`
HostRunner string `json:"host_runner"`
ExternalInputs []string `json:"external_inputs"`
Orbs []string `json:"orbs"`
Parameters []string `json:"parameters"`
}
type JobDataSteps ¶
type JobDetails ¶
type JobDetails struct {
WebURL string `json:"web_url"`
Project struct {
ExternalURL string `json:"external_url"`
Slug string `json:"slug"`
Name string `json:"name"`
ID string `json:"id"`
} `json:"project"`
ParallelRuns []struct {
Index int `json:"index"`
Status string `json:"status"`
} `json:"parallel_runs"`
StartedAt time.Time `json:"started_at"`
LatestWorkflow struct {
Name string `json:"name"`
ID string `json:"id"`
} `json:"latest_workflow"`
Name string `json:"name"`
Executor struct {
ResourceClass string `json:"resource_class"`
Type string `json:"type"`
} `json:"executor"`
Parallelism int `json:"parallelism"`
Status string `json:"status"`
Number int `json:"number"`
Pipeline struct {
ID string `json:"id"`
} `json:"pipeline"`
Duration int `json:"duration"`
CreatedAt time.Time `json:"created_at"`
Messages []interface{} `json:"messages"`
Contexts []struct {
Name string `json:"name"`
} `json:"contexts"`
Organization struct {
Name string `json:"name"`
} `json:"organization"`
QueuedAt time.Time `json:"queued_at"`
StoppedAt time.Time `json:"stopped_at"`
}
func GetJobDetails ¶
func GetJobParallel ¶
type PipelineConfig ¶
type PipelineItem ¶
type PipelineItem struct {
ID string `json:"id"`
Errors []Errors `json:"errors"`
ProjectSlug string `json:"project_slug"`
UpdatedAt time.Time `json:"updated_at"`
Number int `json:"number"`
State string `json:"state"`
CreatedAt time.Time `json:"created_at"`
Trigger Trigger `json:"trigger"`
Vcs Vcs `json:"vcs"`
}
func GetPipeline ¶
func GetPipeline(ci CI, org string, output string, page int) (items []PipelineItem)
func GetPipelineById ¶
func GetPipelineById(ci CI, pipelineId string, output string) (items PipelineItem)
type PipelineWorkflows ¶
type PipelineWorkflows struct {
PipelineID string `json:"pipeline_id"`
ID string `json:"id"`
Name string `json:"name"`
ProjectSlug string `json:"project_slug"`
Status string `json:"status"`
StartedBy string `json:"started_by"`
PipelineNumber int `json:"pipeline_number"`
CreatedAt time.Time `json:"created_at"`
StoppedAt time.Time `json:"stopped_at"`
Tag string `json:"tag,omitempty"`
}
func GetPipelineWorkflows ¶
func GetPipelineWorkflows(ci CI, pipelineId string, output string) (items []PipelineWorkflows)
type ServerInfo ¶
type ServerInfo struct {
Host, Token, Project string
}
ServerInfo contains the information needed to connect to a Circle server
type TestMetadata ¶
type TestMetadata struct {
Classname string `json:"classname"`
File string `json:"file"`
Name string `json:"name"`
Result string `json:"result"`
Message string `json:"message"`
RunTime float64 `json:"run_time"`
Source string `json:"source"`
}
func GetTestMetadata ¶
type WorkflowItem ¶
type WorkflowItem struct {
JobNumber int `json:"job_number"`
Id string `json:"id"`
StartedAt string `json:"started_at"`
Name string `json:"name"`
ProjectSlug string `json:"project_slug"`
Status string `json:"status"`
Type string `json:"type"`
StoppedAt string `json:"stopped_at"`
}
func GetWorkflowJob ¶
type WorkflowPipeline ¶
type WorkflowPipeline struct {
JobNumber int `json:"job_number"`
Id string `json:"id"`
StartedAt string `json:"started_at"`
Name string `json:"name"`
ProjectSlug string `json:"project_slug"`
Status string `json:"status"`
Type string `json:"type"`
StoppedAt string `json:"stopped_at"`
JobDataSteps []JobDataSteps `json:"job_data_steps"`
}
Click to show internal directories.
Click to hide internal directories.