requests

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TriggerPipelinesStep

func TriggerPipelinesStep(client http.PipelineHttpClient, stepId int) error

Types

type ContentPropertyBag

type ContentPropertyBag struct {
	Path       string `json:"path"`
	CommitSha  string `json:"commitSha"`
	BranchName string `json:"branchName"`
}

type GetPipelinesOptions

type GetPipelinesOptions struct {
	SortBy     string `url:"sortBy,omitempty"`
	FilterBy   string `url:"filterBy,omitempty"`
	Light      bool   `url:"light,omitempty"`
	Limit      int    `url:"limit,omitempty"`
	PipesNames string `url:"names,omitempty"`
}

type GetPipelinesStepsOptions

type GetPipelinesStepsOptions struct {
	PipelineIds       string `url:"pipelineIds,omitempty"`
	PipelineSourceIds string `url:"pipelineSourceIds,omitempty"`
	Names             string `url:"names,omitempty"`
}

type GetResourcesOptions

type GetResourcesOptions struct {
	PipelineSourceIds  string `url:"pipelineSourceIds,omitempty"`  // Can be a csv list
	ResourceVersionIds string `url:"resourceVersionIds,omitempty"` // Can be a csv list
	RunIds             string `url:"runIds,omitempty"`             // Can be a csv list
}

type GetRunResourcesOptions

type GetRunResourcesOptions struct {
	Limit             int    `url:"limit,omitempty"`             // Can be a csv list
	PipelineSourceIds string `url:"pipelineSourceIds,omitempty"` // Can be a csv list
	RunIds            string `url:"runIds,omitempty"`            // Can be a csv list
	SortBy            string `url:"sortBy,omitempty"`
	SortOrder         int    `url:"sortOrder,omitempty"`
}

type GetRunsOptions

type GetRunsOptions struct {
	PipelineIds string `url:"pipelineIds,omitempty"`
	Limit       int    `url:"limit,omitempty"`
	Light       bool   `url:"light,omitempty"`
	StatusCodes string `url:"statusCodes,omitempty"` //Optional. Comma separated string of status codes
	SortBy      string `url:"sortBy,omitempty"`      //Optional. Comma separated list of sort attributes
	SortOrder   int    `url:"sortOrder,omitempty"`   //Optional. 1 for ascending and -1 for descending based on sortBy
	RunNumbers  string `url:"sortOrder,omitempty"`
	RunIds      string `url:"runIds,omitempty"`
}

type GetSourcesOptions

type GetSourcesOptions struct {
	PipelineSourceIds string `url:"pipelineSourceIds,omitempty"` // Can be a csv list
}

type GetStepsOptions

type GetStepsOptions struct {
	RunIds string `url:"runIds,omitempty"`
	Limit  int    `url:"limit,omitempty"`
}

type GetStepsTestReportResponse

type GetStepsTestReportResponse struct {
	TestReports []StepTestReport
}

type Pipeline

type Pipeline struct {
	Name                 string `json:"name"`
	PipelineId           int    `json:"id"`
	LatestRunId          int    `json:"latestRunId"`
	ProjectId            int    `json:"projectId"`
	PipelineSourceId     int    `json:"pipelineSourceId"`
	PipelineSourceBranch string `json:"pipelineSourceBranch"`
	LatestCompletedRunId int    `json:"latestCompletedRunId"`
}

type PipelinesLookupResponse

type PipelinesLookupResponse struct {
	Pipelines []Pipeline
}

type PipelinesSteps

type PipelinesSteps struct {
	Id   int    `json:"id"`
	Name string `json:"name"`
}

type PipelinesStepsResponse

type PipelinesStepsResponse struct {
	Steps []PipelinesSteps
}

type Resource

type Resource struct {
	ContentPropertyBag ContentPropertyBag `json:"contentPropertyBag"`
	Id                 int                `json:"id"`
	ResourceTypeCode   http.ResourceCodes `json:"resourceTypeCode"`
}

type ResourcesResponse

type ResourcesResponse struct {
	Resources []Resource
}

func GetResourceVersions

func GetResourceVersions(client http.PipelineHttpClient, options GetResourcesOptions) (*ResourcesResponse, error)

type Run

type Run struct {
	RunId            int             `json:"id"`
	PipelineId       int             `json:"pipelineId"`
	PipelineSourceId int             `json:"pipelineSourceId"`
	RunNumber        int             `json:"runNumber"`
	StatusCode       http.StatusCode `json:"statusCode"`
	StartedAt        string          `json:"startedAt"`
	EndedAt          string          `json:"endedAt"`
}

type RunContentPropertyBag

type RunContentPropertyBag struct {
	Path       string `json:"path"`
	CommitSha  string `json:"commitSha"`
	BranchName string `json:"branchName"`
}

type RunResource

type RunResource struct {
	ResourceVersionContentPropertyBag RunContentPropertyBag `json:"resourceVersionContentPropertyBag"`
	Id                                int                   `json:"id"`
	RunId                             int                   `json:"runId"`
	ResourceName                      string                `json:"resourceName"`
	ResourceTypeCode                  http.ResourceCodes    `json:"resourceTypeCode"`
}

type RunResourcesResponse

type RunResourcesResponse struct {
	Resources []RunResource
}

func GetRunResourceVersions

func GetRunResourceVersions(client http.PipelineHttpClient, options GetRunResourcesOptions) (*RunResourcesResponse, error)

type RunsResponse

type RunsResponse struct {
	Runs []Run
}

func GetRuns

func GetRuns(client http.PipelineHttpClient, options GetRunsOptions) (*RunsResponse, error)

type Source

type Source struct {
	Id                 int             `json:"id"`
	RepositoryFullName string          `json:"repositoryFullName"`
	LastSyncStatusCode http.StatusCode `json:"lastSyncStatusCode"`
	IsSyncing          bool            `json:"isSyncing"`
	LastSyncStartedAt  string          `json:"lastSyncStartedAt"`
	LastSyncEndedAt    string          `json:"lastSyncEndedAt"`
	LastSyncLogs       string          `json:"lastSyncLogs"`
	SyncUpdatedAt      string          `json:"updatedAt"`
}

type SourcesResponse

type SourcesResponse struct {
	Sources []Source
}

func SyncSource

func SyncSource(client http.PipelineHttpClient, options SyncSourcesOptions) (*SourcesResponse, error)

type Step

type Step struct {
	Id         int             `json:"id"`
	Name       string          `json:"name"`
	StatusCode http.StatusCode `json:"statusCode"`
}

type StepTestReport

type StepTestReport struct {
	Id               int           `json:"id"`
	PipelineSourceId int           `json:"pipelineSourceId"`
	StepId           int           `json:"stepId"`
	DurationSeconds  int           `json:"durationSeconds"`
	TotalTests       int           `json:"totalTests"`
	TotalPassing     int           `json:"totalPassing"`
	TotalFailures    int           `json:"totalFailures"`
	TotalErrors      int           `json:"totalErrors"`
	TotalSkipped     int           `json:"totalSkipped"`
	ErrorDetails     []TestDetails `json:"errorDetails"`
	FailureDetails   []TestDetails `json:"failureDetails"`
}

type StepsResponse

type StepsResponse struct {
	Steps []Step
}

func GetSteps

func GetSteps(client http.PipelineHttpClient, options GetStepsOptions) (*StepsResponse, error)

type StepsTestReportsOptions

type StepsTestReportsOptions struct {
	StepIds string `url:"stepIds,omitempty"`
}

type SyncOptions

type SyncOptions struct {
	PipelineSourceBranches string `url:"pipelineSourceBranches,omitempty"` // Can be a csv list
	PipelineSourceId       int    `url:"pipelineSourceId,omitempty"`
	Light                  bool   `url:"light,omitempty"`
}

type SyncSourcesOptions

type SyncSourcesOptions struct {
	Branch           string `url:"branch,omitempty"`
	ShouldSync       bool   `url:"sync,omitempty"`
	PipelineSourceId int
}

type SyncStatus

type SyncStatus struct {
	Id                   int             `json:"id"`
	PipelineSourceBranch string          `json:"pipelineSourceBranch"`
	PipelineSourceId     int             `json:"pipelineSourceId"`
	IsSyncing            bool            `json:"isSyncing"`
	LastSyncStatusCode   http.StatusCode `json:"lastSyncStatusCode"`
	LastSyncStartedAt    string          `json:"lastSyncStartedAt"`
	LastSyncEndedAt      string          `json:"lastSyncEndedAt"`
	LastSyncLogs         string          `json:"lastSyncLogs"`
	SyncUpdatedAt        string          `json:"updatedAt"`
	ResourceVersionId    int             `json:"triggeredByResourceVersionId"`
}

type SyncStatusResponse

type SyncStatusResponse struct {
	SyncStatuses []SyncStatus
}

func GetSyncStatus

func GetSyncStatus(client http.PipelineHttpClient, options SyncOptions) (*SyncStatusResponse, error)

type TestDetails

type TestDetails struct {
	TestName    string `json:"testName"`
	ClassName   string `json:"className"`
	SuiteName   string `json:"suiteName"`
	Message     string `json:"message"`
	Kind        string `json:"kind"`
	FullMessage string `json:"full"`
}

Jump to

Keyboard shortcuts

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